Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
THRUST SERVICES & TOOLS
CLOUD EDITIONS
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Web CMS (TeamSite)
Form API problem
avdhut
I have added a form API save handler to my dcr template.
This however does not seem to work.
On save it should show the "demo name" string as the file name in the file save dialog box. This is not working...
enable_formapi=true
is set in the iw.cfg
Any help?
===============================
datacapture.cfg
<?xml version="1.0" standalone="no"?>
<!DOCTYPE datacapture SYSTEM "datacapture4.5.dtd">
<data-capture-requirements type="content" name="standard">
<ruleset name="Standard Information">
<description>
This allows for the entry of details relating to a standard pages.
</description>
<item name="Title">
<database data-type="VARCHAR2(100)" />
<text/>
</item>
<script language="javascript">
<![CDATA[
function onSave()
{
return handleNameDCR();
}
function handleNameDCR()
{
var dcrName = "Demo Name";
IWDCRInfo.setDCRName(dcrName);
return true;
}
]]>
</script>
</ruleset>
</data-capture-requirements>
Find more posts tagged with
Comments
Migrateduser
avdhut;
You need to register your handeNameDCR function for it to handle onClose events. To do this, you must call IWEventRegistry.addFormHandler("onClose", "handleName");
The onSave function you have is not needed--replace it with the above.
bw
Bob Walden [bob.walden@interwoven.com]
Interwoven Education Group
IM: Yahoo, MSN bob_walden
avdhut
I tried this suggestion
here is the modified code..
even then it is not working
<ruleset name="Standard Information">
<description>
This allows for the entry of details relating to a standard pages.
</description>
<item name="Title">
<database data-type="VARCHAR2(100)" />
<text/>
</item>
<script language="javascript">
<![CDATA[
IWEventRegistry.addFormHandler("onClose", "handleNameDCR");
function handleNameDCR()
{
var dcrName = "Demo Name";
IWDCRInfo.setDCRName(dcrName);
return true;
}
]]>
</script>
</ruleset>
avdhut
Actually I am using Java based templating GUI and here is what the documentation says ...
The FormAPI is only available for browser-based templating. It is not supported for Java-based templating.
The FormAPI supports both Interwoven and custom DTD DCRs.
My question now is
Is there any way to set the default file name in the Save dialog box for java based templating GUI ???
Can you set any save event triggers from the java callouts ??
Migrateduser
Sorry, didn't realize you're using the Java UI. The FormAPI library currently only supports the browser UI.
Bob Walden [bob.walden@interwoven.com]
Interwoven Education Group
IM: Yahoo, MSN bob_walden