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)
generate button...
hitc
Is there a way to hide or disable these f... buttons (generate and save as)?I'm using formapi and the onsave handler but when the dcr is saved the user can click on the generate button...is there a handler other than onsave,onsavevalid,onsavedone...like onclikgeneratebutton (I dream I know...)
I'm not using the java environement...customer don't like it...
Find more posts tagged with
Comments
Gregg Faus
I was able to disable the SaveAs button with a bit of FormAPI programming. However, there is no way to disable the generate button without a bit of JSP hacking. Now I don't recommend this, but sometimes you just have to (i.e. custom login page, etc...). In my case, I couldn't have our "dummy" users **** up the website by using the generate button. Same goes for the "SaveAs" button.
I've attached a ZIP file with instructions and the support files. You must be the TeamSite admin to be doing this sort of stuff.
Again, use at your own risk.
Gregg Faus
Company39
Gregg Faus
My attachment didn't come through. Here it is.
Gregg Faus
I've revised my attachment to include a new script to disable both the generate button and preview button.
haplo
there is a really simplier way....
Edit the /iw-home/httpd/webapps/webdesk/templating/datacapture_buttonframe.jsp and at the at the line (+/-) 79 change
boolean shouldShowSaveButton = true;
boolean shouldShowSaveAsButton = false;
boolean shouldShowSaveAndCloseButton = true;
boolean shouldShowPreviewButton = true;
boolean shouldShowGenerateButton = false;
boolean shouldShowCloseButton = true;
(put the values you want).
To recompile jsp files :
Go to /iw-home/httpd/webapps/webdesk/WEB-INF and rename
/iw-home/httpd/webapps/webdesk/WEB-INF/web_no_jsp.xml to
/iw-home/httpd/webapps/webdesk/WEB-INF/web.xml.
Finally run /iw-home/bin/iwreset -ui.
Gregg Faus
Simplier if you want to disable this functionality for ALL roles. My script allows you to define which roles can access these buttons on a per DCT basis.
kailash1
gfaus,
Can you mail your zip file tome also as I also want to disable the generate button.
Regards
Kailash
Gregg Faus
I sent it to you. This file was attached to my post as well.
RobertPisor
Thanks for the info, haplo.
Just a word of caution. Modifying Interwoven jsp's might get the results you desire, but you might need to make the changes again after applying patches and fixes.
sef
Hi!
Going on with this disabling-of-generate-button discussion, is it possible to disable the picking of all but one presentation templates for dcrs? lets say i have defined 2 or 3 of them, but i only allow users to actually use the generate button to call one of them. Is it possible to comunicate with that selection dialog using formapi?
And.. is it any way to make the generate button to call generate command with proper encoding?
thanks and regards!
Johnny
Thats the problem with modifying product files.
Its not supported so if you want to get even more tricky you will have to stick code in the jsp you modified to figure out which template is which.
I think you'll be going down a dangerious path.
You can disable the functionality of the generate button in templating.cfg.
<directory dir-regex="Preview_only_then_submit" />
by using a dir-regex that can never be matched, a user wont be able to complete the action.
Its not very user friendly, but at least there is no hacking involved and you can tailor it per template type.
Cheers
John Cuiuli
Consultant
Sydney, Australia
kellyrmilligan
function checkGeneratePage(isBuild) {
if((isBuild) && (IWDatacapture.getRole() != "master")) {;
alert("This command has been disabled.");
return false;
}
else {
return true;
}
}
where do you call this to disable the generate button without hacking into the jsp that is running the gui?
block problem.pdf
Gregg Faus
You can't. I had to modify the file \httpd\webapps\templating\datacapture_button.jsp and tweak the function buildPage. I just added the following code to check for the existance of a form api function "checkGeneratePage":
// Call page generating function if it exists within userscript
if(typeof(api.checkGeneratePage) != "undefined") {
if(!api.checkGeneratePage(isBuild)) {
return;
}
}
Doing it this way allowed me to disable any role or user I wanted because the function can be defined per template. The other approaches here disable it entirely -- even to a MASTER! But as I said before on other threads relating to this topic, do it at your own discretion. If you not confortable modifying JSP's that don't. But it is the only way to provide this functionality unless Interwoven does it themselves in the next release.