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)
controlling DCR name
Hans
I am using javascript to enforce a naming convention for DCRs. This worked when we had TeamSite 5.5 but we upgraded 6.0 and now it doesn't work. Has anything changed with form API? Here is the javascript
(I added the alert to the init() function to see if it is firing and it works)
// set event handler
function init() {
IWEventRegistry.addFormHandler("onSaveNameSpecified",doDCRName);
// alert("init() works");
}
function doDCRName(dcrName) {
if(dcrName.substr(dcrName.length - 2) != "_e") {
alert("The filename must end in '_e'.");
return false;
} else {
return true;
}
}
// call the initialization function on load
init();
Find more posts tagged with
Comments
Adam Stoller
I'm not sure if the FormAPI code that worked pre-6.0 still works - but 6.0 provides a "built-in" function for doing this, so you might want to check the manuals and retrofit your code accordingly (I don't remember what it is off-hand, otherwise I would have included that information here)
--fish
Senior Consultant, Quotient Inc.
http://www.quotient-inc.com
Hans
I've looked at the manual (FormAPI Developer’s Guide Release 6.0, page 23) and what I'm using is almost exactly like the example. But the onSaveNameSpecified event isn't firing. To test I tried the following directly in the DCT, rather than linking to the js file, and I get nothing (no alert):
IWEventRegistry.addFormHandler("onSaveNameSpecified", nameChosen);
function nameChosen(path) {
alert(path);
}
For 'built-in' are you refering to auto-dcr functionality? Or maybe you are looking at a different manual?
Thanks very much. This seems too simple to be causing problems, but I there's something I just don't get here
Hans
Adam Stoller
I was referring to IWNameFactory and related functions - starting around page 58 in the 6.0 FormAPI manual.
You appear to be referencing page 23 - which, if it doesn't work as documented should be reported through Support to determine if it is a bug in the product (when can a fix be expected?) or the documentation (what is the correct text? will it be fixed in the next document rev?)
Note though, the paragraph on page 24 which indicates that is possible to save the DCR without triggering the onSaveNameSpecified event - just in case this is what you're running into.
Good luck...
--fish
Senior Consultant, Quotient Inc.
http://www.quotient-inc.com
Form.png
Ariane
Reported this to interwoven, this is a known bug, should be fixed in version 6.1
Supposed to come out in Q1, 2004.