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)
FormAPI functionality with a replicant
gsundeep
Hi Friends,
I am experiencing problems with FormAPI functionality within a replicant.I know there were issues raised before me but i wanted to refresh the same.
I am running
TeamSite 5.5.2 on Solaris 8
Current Scenario
--------------------
My DCT have a "Titles" container which consists of three items to capture "Title1","Title2" and "Title3" .The "Title[1-3]" are select fields.The "Title2" field is populated dynamically using FormAPI whenever "Title1" is selected and similarily, "Title3" is populated dynamically using FormAPI whenever "Title2" is selected.
Future Scenario
--------------------
I wanted to capture multiple set of "Title1" ,"Title2" and "Title3" using a replicant.I have changed "container" to "item" and added replicant .Eventhough i am able to see replicants icon but the FormAPI functionality is not working, i.e the "Title2" and "Title3" fields are now not responding to my selection for "Title1" and "Title2" resp.
Summary
-----------
I want to add replicant to "Titles" field while maintaining the FormAPI functionality intact.
Any help will be appreciated.
Thanks,
Sundeep
Find more posts tagged with
Comments
LooseCannon
You just need to update your xPath...
The examples below show the differences between accessing a field in a container vs replicant
CONTAINER:
<container name="titles">
<label>Titles</label>
<item name="title1">
<label>Title 1</label>
<text size="75" maxlength="75" required="t"/>
</item>
<item name="title2">
<label>Title 2</label>
<text size="75" maxlength="75" required="t"/>
</item>
<item name="title3">
<label>Title 3</label>
<text size="75" maxlength="75" required="t"/>
</item>
</container>
var title1 = IWDatacapture.getItem("/titles/title1").getValue();
REPLICANT:
<item name="titles">
<label>Titles</label>
<replicant max="5">
<item name="title1">
<label>Title 1</label>
<text size="75" maxlength="75" required="t"/>
</item>
<item name="title2">
<label>Title 2</label>
<text size="75" maxlength="75" required="t"/>
</item>
<item name="title3">
<label>Title 3</label>
<text size="75" maxlength="75" required="t"/>
</item>
</replicant>
</item>
var children = IWDatacapture.getItem("/titles").getChildren();
if (children != null ) {
for (var i = 1; i <= children.length; i++ ) {
var title1 = IWDatacapture.getItem("/titles["+i+"]/title1").getValue();
...