Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Web CMS (TeamSite)
Regenerate message
rpjoseph
Everytime a content creator saves their modified templated document they are faced with the the alert 'You have not regenerated the page you started editing. Would you like to regenerate?'
Does anybody know how to get rid of this message?
I tell users to hit 'cancel'. They are then asked if they want to 'Submit the file for approval' We have a custom workflow that does not necessarily include approval. Can we change this message to 'Do you want to post this file' or something similar?
Thank you.
Find more posts tagged with
Comments
akshathp
I remember these questions have already been answered on DevNet. If you search the Forums, you might find what you need.
Those posts also say a very important point. And that is, as these customizations are not supported, for any upgrade or install, you would loose the changes or have to re-do them.
Hope this helps!
Akshat Pramod Sharma
Interwoven Inc.
Migrateduser
I don't actually have an answer to this but a related question.
1. Every DCR has rules for generating output files (for instance, templatedata/category/type/data/folder1/folder2/file always generates /folder1/folder2/file.asp), and there is only one presentation template or some condition in the data (such as a radio group) that indicates which presentation template should be used.
2. In that presentation template there is conditional with two possibilities:
a. if a custom flag is not set the presentation template sets the flag and calls itself to generate the output file according to the rules.
b. within this second call to the same presentation template the flag is set so it just writes the HTML or other output to the output file determined above.
3. When control returns to the parent template call it detects no error in the child and redirects the browser to the output file it just generated, or writes an error message.
Would this get rid of the "do you want to regenerate" message? In other words, is it actually looking at the file system to determine if it's been regenerated, or just some javascript property that indicates whether the user has generated manually?
Migrateduser
function abortGenerate()
{
parent.frames.datacapture_buttonframe.regenerateNeedsTobeDone = false;
return( true );
}
IWEventRegistry.addFormHandler( "onClose", abortGenerate );
Migrateduser
I would not put this in dc_operations.js. You could try it, and the advantage of doing it that way is that it would apply to all templates, but I am not sure it would work as I saw some of the JavaScript in other files (JSP and java files, maybe part of a servlet) so I am not sure that file is even used. One disadvantage if it does work is that you would have to be sure to maintain that change whenever you upgrade or patch TeamSite.
I would put the function in the custom file IWHOME/httpd/iw/formAPIfunctions.js. This way the code itself can be shared to all templates, along with all other functions (such as to maximize the window, show/hide the navigation frame, etc):
// appropriate comments
function abortGenerate()
{
parent.frames.datacapture_buttonframe.regenerateNeedsTobeDone = false;
return( true );
}
Then in each DCT that I want to disable this prompt in I would add this right before the </ruleset>:
<script language="javascript" location="webserver" src="/iw/formAPIfunctions.js"/>
<script>
// appropriate comments
IWEventRegistry.addFormHandler( "onClose", abortGenerate );
</script>
Note that in order for FormAPI to work you have to have this line in the [teamsite_templating] section of IWHOME/etc/iw.cfg. I think you may have to reboot or iwreset -ui after making this change:
enable_formapi=true
Also, this has only been tested in an uplevel version of Internet Explorer. Finally, it doesn't really solve the bug - you might want the user to be prompted to regenerate (so files don't show last modified by SYSTEM when workflow regenerates them), at least for some templates (the client I am working for at the moment has opened a case and placed this as a feature request, and we are trying to determine if this column can be removed from the UI because it is basically useless). Adding this will cause templating to never show this prompt, not even the first time. It would be nice if someone could extend it to just avoid the infinite loop. This was the quickest way I could find to get rid of the infinite loop is to add this code to the DCT.
Hope this helps someone,
-John
Edited by john on 12/21/02 03:07 PM (server time).