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)
adding replicants
System
hi ,
i try to automatically add replicants once the dct is being loaded :
function init()
{
for (i = 1; i <=10; i++)
{
var item = IWDatacapture.getItem("/CrossLinks[" + i + "]/CrossLink");
item.setVisible(true);
item.setValue("test");
// Do something with item.
}
//this doesn't work ..am i wrong or is it impossible to do it ..?
}
In the dct i have :
<item name="CrossLinks">
<replicant required="f" min="1" max="10">
<item name="CrossLink">
<label></label>
<readonly>
<text required="f" maxlength="40" size="40"/>
</readonly>
</item>
</replicant>
</item>
thanks
Find more posts tagged with
Comments
Migrateduser
It seems to be your code is ok. Try without <readonly>
sunil_j
Hi,
I think its not possible to add replicant this way. This should give u null object. U can add replicants only by clicking on the plus (+) button on the DCT.
Sunil
Migrateduser
i tried without readonly and the only replicant i get with the "test" value is the default one ( i modified the code in dct to get one min replicant) ..seem we can't dynamically add replicants
Migrateduser
seems you are right ...except the defaul one ...others are considered as null objects
vahu
Hi,
Its just an idea, but what you could try is, "pressing" the image for the replicant dynamically, and that should do the trick. Hope if u try it out it works :-)
/VaHu