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)
Event to control Generate Button
archie23
Hi all,
I want to validate the 'path' that the user generates HTML in. Is there any IWEventRegistry method which gives me the handle on CLick of the generate button.
I am looking for a functionality SIMILAR to the event handler in FORMAPI for save button. That is, IWEventRegistry.addFormHandler( "onSaveNameSpecified", validateName );
Thanks and Regards
Archie
Find more posts tagged with
Comments
jamesk
i have also been trying to do this, but dont think there is an easy solution. You can use the onSave event trigger when someone clicks generate but thats all.
In the past where i have wanted to generate an index page or something, but i dont want the user to specify a path for the html. I have created a button on the form, which triggers the generate using the command line tools iwgen etc. This way u can control the generated path better.
Gregg Faus
There is not an event that is fired when clicking either the generate or preview button exclusively. There are events that can be caught when going through the save handler, but this is generally not useful.
I've been able to add custom code to the "datacapture_buttonframe.jsp" page to fire a trigger. But this is purely custom. Let me know if this solution interests you.
- gf
archie23
Please share the solution.
Thanks
Archie
Gregg Faus
Check out my attachment in this thread:
http://devnet.interwoven.com/forums/cgi-bin/showthreaded.pl?Cat=&Board=PRODUCTS_TEMPLATING&Number=2392
This should provide you with all you need.
pawlr
I also found this info in the FormAPI documentation (sec. 2.4.2 below the map of onSave flow).. but I'm not sure how it would be used, or whether its actually implemented..
Below the diagram mention is made of an integer that is passed to the onSave event handler. This integer indicates how the save was initiated.. if it was from a "generate" or "preview" action, I suppose you could terminate the save from within the save event handler, but again, I'm not sure how you would do this.. might be easier than mucking around with the .jsps though..
function saveHandler(button) {
switch (button) {
case IWDatacapture.SAVE_BUTTON:
case IWDatacapture.SAVEAS_BUTTON:
case IWDatacapture.SAVECLOSE_BUTTON:
// User clicked 'Save', 'Save As' or 'Save and Close'
...
break;
case IWDatacapture.PREVIEW_BUTTON:
case IWDatacapture.GENERATE_BUTTON:
// User clicked 'Preview' or 'Generate'
...
break;
}
}
Migrateduser
This actually works only for the save events. I think there is a bug in the DCT engine. Take a look at:
http://devnet.interwoven.com/forums/cgi-bin/showthreaded.pl?Cat=&Board=PRODUCTS_TEMPLATING&Number=7276&page=&view=&sb=&o=&vc=1#Post7276
Paulo Gouveia
Royal Caribbean and Celebrity Cruises
Information Tecnology
archie23
Thanks gfaus!