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)
Get user specified DCR Name using FormAPI
hummingbird
I encountered a problem where the IWDCRInfo.getDCRName() is not returning the name of the DCR if the user creates a new DCR and specifies the DCR name in the browser window. It seems to work on existing DCRs if the user is only editing. Any insight would be appreciated.
Find more posts tagged with
Comments
LooseCannon
I'm assuming you're attempting to get the name before the onSaveDone event?
If so register a function for the onSaveNameSpecified event. The event will pass the newly created name to the function.
see below:
IWEventRegistry.addFormHandler("onSaveNameSpecified", grab_specified_name);
function grab_specified_name(path) {
var bits = path.split(/\//);
bits.reverse();
dcrname = bits[0];
return true;
}
gzevin
a hint:
use
<iw_ifcase name="...blah">
<iw_case type="...">
and so on
Greg Zevin, Ph.D. Comp. Sc.
Independent Interwoven Consultant/Architect
Sydney, AU
LooseCannon
what!
I'm assuming you made this post in error
hummingbird
Thanks for the response. Actually I would like to get the DCR name on the onSaveDone event. But somehow it's working only for existing dcrs and not for new dcrs that the user is creating. I'm using the IWDCRInfo.getDCRName (). Also, I tried testing out your funtion, but it doesn't seem to be doing anything. I also simplied everything and just put in the following funtion in my Javascript file and it doesn't even return the confirm box at the "onSaveNameSpecified" event.
function init()
{
IWEventRegistry.addFormHandler("onSaveNameSpecified", dcrName);
}
function dcrName(path)
{
return confirm("dcrName");
}
init();
Hans
We have also had problems with this. Interwoven has confirmed there is a bug with onSaveNameSpecified event in TS6.0 (and earlier?) prevents it from registering (bug # 50505). To be fixed in 6.1 coming soon.
Hans
gzevin
oops... I meant to answer this in a different topic.... long day, probably .....
Greg Zevin, Ph.D. Comp. Sc.
Independent Interwoven Consultant/Architect
Sydney, AU
LooseCannon
Try doing a "Save As" instead of "Save".
Does the event fire then?
Also what version of tst are you running?
The code I posted is used on 5.5.2