Discussions
Categories
Choose a Product
THRUST SERVICES
CORE APPS
CE PRODUCTS
...
Quick Links
POPULAR
HELPFUL TIPS
Groups
My Links
FOR SIGNED IN MEMBERS:
Back to website
Home
TeamSite
TeamSite, LiveSite and OpenDeploy
reverse engineering FormAPI
System
I am having some issues with VFE and FormAPI.
Sometimes an onSave event on a template fails with no error message. It gets through part of my JavaScript function, but this call is failing:
IWDatacapture.getItem( name ).getValue();
name is the Interwoven specification for one of my VFE-enabled fields. From debugging like this:
for ( prop in IWDatacapture.getItem( name ) )
{
alert( prop + "=" + IWDatacapture.getItem( name )[prop] );
}
it looks like IWDatacapture.getItem( name ).getValue() will first call IWDatacapture.getItem( name ).itemImpl.saveVFControlValue(), then IWDatacapture.getItem( name ).itemImpl.getValue(). From debugging like this:
for ( prop in IWDatacapture.getItem( name ).itemImpl )
{
alert( prop + "=" + IWDatacapture.getItem( name ).itemImpl[prop] );
}
it looks like saveVFControlValue may sometimes be undefined. For whatever reason the try/catch block I put around this was not catching this.
I guess I should just call IWDatacapture.getItem( name ).itemImpl.getValue() directly. This may break in future release and I would want to call the documented function if it works. I would prefer to check if this property is undefined and set it to a function that does nothing, but that doesn't seem to work - does anyone know how that could be done?
I also noticed that if I change the value of a VFE field in the onSave event, if the VFE is in source view mode the change does not show in the HTML - the form refreshes (putting the VFE back in WYSIWYG mode), but the content has not been updated. What gets written to the DCR has the change though. If the VFE is in WYSIWYG mode then changing the value in the onSave does seem to work. Also in source mode If I do IWDatacapture.redraw() after changing the value it seems to work. Is there a FormAPI command (other than redraw) to put a VFE field in WYSIWYG mode before I change the value? If the VFE is in WYSIWYG mode and I redraw it removes the content from the VFE field though (but it is saved to the DCR correctly, at least the first time).
Find more posts tagged with
Comments
There are no comments yet