简体   繁体   English

Adobe LiveCycle处理重复子窗体

[英]Adobe LiveCycle working with Repeating Subforms

I have repeating subforms with buttons on them. 我有重复的子窗体,上面有按钮。 I want to be able to remove buttons that have been added with each addition of a subform. 我希望能够删除每次添加子窗体时已添加的按钮。 By the searching I've done, the following code should work, but it doesn't. 通过搜索,以下代码应该可以工作,但不能。 Can someone please set me straight? 有人可以让我挺直吗?

var IGdelbut = xfa.resolveNodes("ItemGroup[*].ItemHeader.Delbutton");
for (var i = 0; i < IGdelbut; i++) {
    IGdelbut.presence = "invisible";
}

(I apologize for repeating my earlier question, but I'm hoping I'm giving someone better information to work with.) (对于重复我先前的问题,我深表歉意,但我希望能给别人更好的信息。)

Your script has a couple of issues iterating over the result of resolveNodes() call. 您的脚本在解决resolveNodes()调用的结果上有几个问题。 If i get this right, you are trying to hide all the * DelButton *s on the subforms. 如果我做对了,您正在尝试隐藏子窗体上的所有* DelButton *。

Try the following 尝试以下

var allDeleteButtons = xfa.resolveNodes("ItemGroup[*].ItemHeader.Delbutton");
var len = allDeleteButtons.length;
for (var i = 0; i < len; i++) {
    allDeleteButtons.item(i).presence = "invisible";
}

Assuming you have this script on the parent subform of repeating ItemGroup subforms. 假设您在重复ItemGroup子表单的父子表单上具有此脚本。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM