Hi,I have one main Container with OR Condition.Do you know any Event or any option from that i can know,Which option is selected by User? which will apperar when we click on Add Container plus button.I want to handle Condition for only one sub Container should be display at one time. I want to restrict for second one.I have tried onreplicantBeforeadd but its of no use..Please help me...
Thank you.I am using 6.7.2 Teamsite version.Please see attached DCT Structure.for Chapter container[html]IWEventRegistry.addItemHandler("/content/main_content/chapter","OnReplicantAdded",resetChildrenItemChapter1);function resetChildrenItemChapter1(){ IWEventRegistry.addItemHandler(oContainerArrayAdd.getName()+"/chapter_content","OnReplicantAdded",resetMediaParagraph); resetMediaParagraph(IWDatacapture.getItem(oContainerArrayAdd.getName()+"/chapter_content"));}function resetMediaParagraph(item){ item=item.getName(); var abc = 0; var parent = IWDatacapture.getItem(item + "/..").getName(); alert("parent :"+parent); var oContainerArrayAdd1 = IWDatacapture.getItem(parent+"/chapter_content").getChildren(); alert("All Child"+oContainerArrayAdd1.length); for(var x=0; x { alert("Name :"+oContainerArrayAdd1.getName()); var sub_item = IWDatacapture.getItem(oContainerArrayAdd1.getName()).getLabel(); alert("Label :"+sub_item); var chapterArray=IWDatacapture.getItem(oContainerArrayAdd1.getName()).getChildren(); alert("Child :"+chapterArray); alert("Lenght "+chapterArray.length); var a = chapterArray.toString(); alert("A1 :"+a); var b = a.indexOf("mediaContent"); alert(b); if (b == "-1") { alertTS("ccococ"); } else { abc = abc + 1; alertTS("There cannot be multiple Media for one Chapter Content :"+abc); } IWEventRegistry.addItemHandler(oContainerArrayAdd1.getName()+"/mediaContent/srcFile","onCallout",displaySWFFile); if (abc >= 2) { alert("ting : "+oContainerArrayAdd1[1].getName()); var sItem = IWDatacapture.getItem("/content/main_content/chapter[1]/chapter_content"); alert("get item"+sItem); var sBool = sItem.deleteInstance(2); IWDatacapture.redraw(); //IWDatacapture.getItem("/content/main_content/chapter[1]/chapter_content").deleteInstance(1); alertTS("Blast"+sBool); } }}[/html]The main concern is related to chapter_content containerOn replicant Add of chapter_content container. it asks for which sub container want to display ( mediaContent OR Paragraph ).If user select mediaContent one time. its ok.but if he clickes on mediaContent second time, here i want to restrict user.That only one mediaContent applicable for one Chapter. Paragraph Conatiner can be multible.here i am not getting how can i know, on which subcontainer user ckick.Problem with onReplicantBeforeAdd event is : This event trigger before new Container add in DCT.So this function dont know which option is click on Plus button.it only get which are Conatiners present previously.we cant compare old one with new one. because we dont know new one.Please provide inputs []