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)
setVisible Function on Replicants in 6.0
pacer11
Is this an Interwoven BUG!!!!
I know that in 5.5.2 you are able to do this using replicants, but can anyone verify that you can indeed perform a setVisible on a container in 6.0.
I have tried various combinations with no avail. The only thing I can do is loop through and perform a setVisible on the fields within the container.
code sniplet
function addMoremetaFields(item)
{
var flag = item.getOptions()[parseInt(item.getValue())].value == "yes";
var count = 1;
var children;
IWDatacapture.getItem("/ecards/moremeta").setVisisble(flag);
// while (IWDatacapture.getItem("/ecards/moremeta["+count+"]"))
// {
// children = IWDatacapture.getItem("/ecards/moremeta["+count+"]").getChildren();
// for (var index=0; index < children.length; index++)
// children[index].setVisible(flag);
// count++;
// }
IWDatacapture.redraw();
}
DCT sniplet
<?xml version="1.0" standalone="no"?>
<!DOCTYPE datacapture SYSTEM "datacapture6.0.dtd">
<data-capture-requirements name="interactives">
<ruleset name="Interactive Pages(s)">
<label>
This is the Label for Apps Ecards
</label>
<description>
Enter Interactive Page(s) information
</description>
<script src="wellFormed.js"/>
<!-- network selection -->
<root-container name="ecards" location="ecards">
<container name="moremeta" max="6" min="0" default="0" location="moremeta">
<label>
MOREMETA
</label>
<item name="other_meta_name" pathid="other_meta_name">
<label>
Other Meta Name
</label>
<description>
name of the tag ( i.e. keyword )
</description>
<text size="40" maxlength="35" />
</item>
<item name="other_meta_value" pathid="other_meta_value">
<label>
Other Meta Value
</label>
<description>
content / data used in tag above
</description>
<text size="50" />
</item>
</container>
</root-container>
</ruleset>
</data-capture-requirements>
Find more posts tagged with
Comments
Migrateduser
I recalled seeing a similar thread before. Is this the behavior you say works for you?
http://devnet.interwoven.com/forums/cgi-bin/showthreaded.pl?Cat=&Board=PRODUCTS_TEMPLATING&Number=25518&page=&view=&sb=&o=&vc=1#Post25518
lissa
pacer11
The functionality mentioned in the post link that you replied with is exactly what I want to do, but It doesn't work as mentioned. The code that I posted shows fields being in a container but the setVisible Functionality doesn't work on the container.
Again, I know that this worked in 5.5.2, but I have a feeling that since "replicants" are no longer supported in the datacapture6.0.dtd that this functionality got lost along with it.
I just need to verify this with Interwoven so that I can think of a workaround.
Any feedback would be greatly appreciated!!
pagein.dcpackage
Migrateduser
Unfortunately, Form API does not support references to Replicant Instance Containers.
Replicant instances can be returned [e.g. IWDatacapture.getItem("/ecards/moremeta[1]") ], but not the "instance container" itself. Even in 5.5.2 this was so.
It is still possible to refer to simple containers, as it was in 5.5.2.
In 6.0 that means that containers with min = max = 1 are referenceable, but not if their min or max != 1.
Thus a possible, though less than ideal, solution is to wrap the "moremeta" container in another container whose min & max = 1.
for example:
IWDatacapture.getItem("/ecards/metadata_container").setVisible(flag);
<?xml version="1.0" standalone="no"?>
<!DOCTYPE datacapture SYSTEM "datacapture6.0.dtd">
<data-capture-requirements name="interactives">
<ruleset name="Interactive Pages(s)">
<label>
This is the Label for Apps Ecards
</label>
<description>
Enter Interactive Page(s) information
</description>
<script src="wellFormed.js"/>
<!-- network selection -->
<root-container name="ecards" location="ecards">
<container name="metadata_container" location="metadata_container">
<container name="moremeta" max="6" min="0" default="0" location="moremeta">
<label>
MOREMETA
</label>
<item name="other_meta_name" pathid="other_meta_name">
<label>
Other Meta Name
</label>
<description>
name of the tag ( i.e. keyword )
</description>
<text size="40" maxlength="35" />
</item>
<item name="other_meta_value" pathid="other_meta_value">
<label>
Other Meta Value
</label>
<description>
content / data used in tag above
</description>
<text size="50" />
</item>
</container>
</container>
</root-container>
</ruleset>
</data-capture-requirements>
This is not a bug, but I believe it is a sorely needed feature to be able to reference replicant "instance containers"; this would be an excellent feature request.
pacer11
Thank you very much for the information. I did try wraping the replicant around in a simple container and the functionality worked fine, but like you have indicated not necessarily ideal.
How do I get this on the feature list, or better question how do I know if this is already on their list because I know that based upon previous posts that this is a much needed functionality?
Also, Interwoven has come a long way as far as documentation, but they still have a ways to go. Adequate documentation (especially on something like this)would definetely reduce the amount of trial and error coding being done.
Migrateduser
I've filed a feature request for you [#51120].
Thanks,
Kerry Kartchner
IWOV Engineering.