Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Web CMS (TeamSite)
Get null WIItem object
sachin_jauhariin
I am using form api in my DCT. When i am setting the value of item named 'title' , the value is not getting assigned on load of the DCT.
Here is piece of code in my cfg file.
Also attached is the datacapture.cfg file.
<br> <br> IWEventRegistry.addFormHandler("onFormInit", init);<br> function init() { <br> IWDatacapture.getItem("/head/title").setValue("Hello");<br> # this value should be displayed in the DCT item named title on load of DCT.<br> }<br>
Also IWDatacapture.getItem("/head/title") is not returning me an object of type IWItem.
Regards,
Sachin
Find more posts tagged with
Comments
sachin_jauhariin
I was able to resolve the problem.
Regards,
Sachin
kaalraa
Please share along .... as the forum is meant for that as well.
I was able to resolve the problem.
Regards,
Sachin
sachin_jauhariin
We need to access the item using root container also in the access path to the item.
ie :
WDatacapture.getItem("/Header-Page/head/title").setValue("this is title item");
Regards,
Sachin