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)
TS 6.7.1 FormAPI setVisible() problem
System
In TS6.7.1 FormsPublisher, if my custom script set an item within a replicant container invisible using setVisible() when the replicant is first added, then I'm not able to make this item visible again. The same code worked fine in TS 6.5. It looks like a bug to me. Here is the javascript. Also see the datacapture.cfg in attachment. I notice that if I put setChildStatus(contactItem, true); instead of setChildStatus(contactItem, false); in addOneHandler(), then the show and hide button works fine. However, we need to hide the detail field first.
function init() {
IWEventRegistry.addItemHandler("/contacts/show_button",
"onCallout", showDetail);
IWEventRegistry.addItemHandler("/contacts/hide_button",
"onCallout", hideDetail);
IWEventRegistry.addItemHandler("/contacts/individual_contact",
"onReplicantAdded", addOneHandler);
hideDetail();
}
function showDetail(item) {
var i = 1;
var contactItem;
while (contactItem = IWDatacapture.getItem("/contacts/individual_contact[" + i + "]")) {
setChildStatus(contactItem, true);
i++;
}
}
function hideDetail(item) {
var i = 1;
var contactItem;
while (contactItem = IWDatacapture.getItem("/contacts/individual_contact[" + i + "]")) {
setChildStatus(contactItem, false);
i++;
}
}
function addOneHandler(contactItem) {
setChildStatus(contactItem, false);
}
function setChildStatus(item, status) {
var child = item.getChildByName("contact_detail");
child.setVisible(status);
}
// Call the initialization routine on load.
IWEventRegistry.addFormHandler("onFormInit", init);
Find more posts tagged with
Comments
jumbo
I am also facing the same problem.
Seems to be the Teamsite bug.But still i am doing some research on that.
I will keep posted if there is anything i found interesting.
jumbo
Migrateduser
I've open a case with Interwoven support. They were able to reproduce it. I will post the updates when I hear from them. So far I've filed half a dozen other bugs on TS6.7.1.
jumbo
Thank you so much for the updates.I appreciate it.
I too open the case on the same.I will keep u updated if i find any..
Jumbo
work4u
I am encountering the same issue. Please if you could keep me in the loop if you find a resolution.
Thanks to all!
Migrateduser
Interwoven gave me a bug number: 69648. But they did not say when it will be fixed.
Migrateduser
Any resolution to this problem yet?
Migrateduser
A workaround to the issue is to do the following after you set the visibility of the items:
replicantItem.setCollapsed(true);
replicantItem.setCollapsed(false);
This will collapse and uncollapse the replicant that contains the items and your items that you have set to be visible will appear.
Phanie
I am having the same problem with setVisible()
Do we have any updates on the bug reported.
Thanks all