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)
Adding eventhandler for replicants
Bhupathi
Hi,
I would like to eventhandler for "onItemChange" of a radio button in a replicant. I m trying to do as follows:
[html]
Radio button items here
Label
Radio button name
Radio button values
Option Value
Default Value
[/html]
and the js file is:
IWEventRegistry.addItemHandler("/radio/values", "onItemChange", replicantHandler);
replicantHandler(item){
alert("hi")
}
Find more posts tagged with
Comments
Bhargav Coca
Read your Form API Manual for Replicants. the way you are calling it will never work.
Thanks
Adam Stoller
I'd also suggest you consider using "xml" style DCTs / DCRs rather than the "iwov" style you appear to be using. Not sure that it will necessarily help resolve this particular problem - but I think in the long-run you'll be happier with it.
Bhupathi
I got it by registering as IWEventRegistry.addItemHandler("/radio/values/default", "onItemChange", replicantHandler);
--Bhupathi
nipper
You should also take into account what ghoti and lilley said. XML style DCRs are the way I write all of my new DCRs. So if you are creating a new system, you should use those.
Understanding of formapi is also very critical. There are multiple behaviors of onReplicantAdd. It can be used to set other event handlers or it can be used to say yes or no you cannot add this replicant.
Andy