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)
FormAPI>accessing readonly container items
catorarn
Hi,
I am trying to retrieve value of an node within a container via FormAPI.
I tried accessing it via:
scriptFrame.IWDatacapture.getItem ('/metadata/id')
and by looping through the children collection
var metadata=scriptFrame.IWDatacapture.getItem ('/metadata');
var children=metadata.getChildren();
for(var counter=0;counter<children.length;counter++){
var item=children[counter];
alert(item.getName()+' '+item.getValue());
}
In both cases, i get a value of null though in the DCR there is a value.
Can you tell me how should I access elements within a container.
Thanks.
Find more posts tagged with
Comments
Jeremy
Hi Arnout,
I posted a similar problem today. I have found that if you use the following code:
IWDatacapture.getItem ('/metadata/id')
and the field <id> is not <readonly> in the DCT but actually has <text /> then the above code returns the result correctly.
If you change your DCR to reflect this you should be able to read the value. What we are still trying to do is figure out how we can read the value if the field is readonly? Don't think there is a way around it though. See the following link:
http://devnet.interwoven.com/forums/cgi-bin/showflat.pl?Cat=&Board=PRODUCTS_TEMPLATING&Number=13125&page=0&view=collapsed&sb=5&o=0&part=
Thanks
Jeremy