Hello Form API Experts,
I need a help. I have a check box item "show_abstract"in my DCT. Requirement is, In a replicant, If the chekbox is uncheked at any level, so all the checkboxes under child replcants should be unchecked.
I am able to retrieve the Container Array and number of child but ot able to get and set the value as per the requirement.
Attached is my code, could anyone help me / suggest how to do that. I dig devnet posts but could not find a right help.
Please look for the attached DCt code and following Formapi code.
Thanks in Adv.
function init()
{
IWEventRegistry.addItemHandler("/section/Top Headlines/headlines_ap_mods/subsection_headlines/show_abstract","onItemChange", setCheckBox);
}
function setCheckBox()
{
alert("calling...");
var replicant = IWDatacapture.getItem("/section/Top Headlines/headlines_ap_mods/subsection_headlines");
alert("Current replicant name is .. "+replicant);
var replicantArray = replicant.getChildren();
alert("Number of childerns.."+replicantArray);
var numberOfItems = replicantArray.length;
alert(numberOfItems);
for (i = 0; i < numberOfItems; i++)
{
alert("its calling....");
alert("replicantArray.getName......."+replicantArray.getName());
//alert("replicantArray.getType....."+replicantArray.getType())
//alert("replicantArray.getValue...."+replicantArray.getValue());;
var paraItem = replicantArray.getName();
alert("Para item is...."+paraItem);
var para1Item = paraItem.getItem("/show_abstract").getValue();
alert("Para value is...."+para1Item);
}
}