Hi the earlier thread become wierd !!! continuing here.the T.S version i am using is 6.7.1 with S.P-1 and O.S used is Windows 2003 S.P-1 the datacapture.cfg file i am attaching here is "datacapture.cfg.txt" please suggest solution.i tried it with using Javascript, its need to specify All the Container and item's name in function arguments to collapse. is there any way we can handle through loop ?
dcr-type="xml"
root-container
Thanks All, the DCT type is "XML" in templating.cfg however i made changes in datacapture.cfg file by applying pathid attribute in item and location attribute in container.I am also attaching revised DCT.It works fine if i call for below three container 1. collapseItem("/html_page/title");2. collapseItem("/html_page/controls"); 3. collapseItem("/html_page/pageInformation");but not working for "body" container and its child , Please review DCT throughly, i have written JS function in same DCT . also suggest me some looping logic through which i can traverse through all container in single loop. its v.imp.
replicant-render="collapsed"
While processing on your DCT. It is working fine with Javascript and replicant-render="collapsed" all container comes as collapsed.What is the browser and version you are using? It is might be problem with browser.
I-E 6.0.3790.1830 , realy all the container and its item collapsed ? i realy eagre to see at my place , can we do through a loop ?
Your browser is too old. Update your browser. It is working fine with IE 6 (newer than you) and IE 7 as well as Mozilla Firefox.Cheers with newer
Hi, its seems ok at my end also. the only problem is ,this solution is not feasible as if tommorow some new container will be added in to DCT, i agin need to write the code for collapse new container also. so do we have any solution that makes all container collapsed at single loop or any method ? I am using Form API functions to collapse like IWDatacapture.getRootItems() but i am not able to get children of that root container by using getChildren() please suggest me any idea. your help will be usfull for me. thanks.
var arrItems=IWDatacapture.getRootItems();//alert("Main Root="+arrItems.length);for(var i=0; i < arrItems.length; i++){ //alert("Main Root="+arrItems); var children = arrItems.getChildren(); //alert("children= "+children.length); for(var j=0; j < children.length; j++) { //alert(children); children.setCollapsed(true); }}
Actually your FormApi script is not dynamic because you have passed a static string for each item name to collapse. So in future that would be a problem when add a new container. Although if a DCT is developed then it should not be changed frequently that will affect the data or DCRs.Anyway you can go ahead with this code it will work fantasitcally: var arrItems=IWDatacapture.getRootItems();//alert("Main Root="+arrItems.length);for(var i=0; i < arrItems.length; i++){ //alert("Main Root="+arrItems); var children = arrItems.getChildren(); //alert("children= "+children.length); for(var j=0; j < children.length; j++) { //alert(children); children.setCollapsed(true); }} So now you do not need of collapseItem() function.Cheers !!
Thanks for helping ,the only issue is the top most container get expanded as the default focus is top most container item. how to handle that ?