2013-05-01 51 views
1

然而,在解决方案不再适用于我的应用程序之前,我问了一个类似的问题,我需要单击按钮以在表中创建一个新行(FailureInstance)(故障表)我需要它从在别处填充填充场三连数据的单元格这里是我的代码:form1.failuretable.AddFailureButton ::点击 - (JavaScript中,客户端)按钮添加一行并从文本字段中输入单元格值

xfa.host.messageBox("Failure Recorded and Added To Table Below. Please Continue Filling Out the Form Until All Failures Have Been Recorded. Then Please Save and Submit the Form.", "Continue/Save/Submit", 3); 
if (xfa.host.version < 8) { 
    xfa.form.recalculate(1); 
} 
var newRow = failuretable._FailureInstance.addInstance(1); 
newRow.FailureCode.rawValue = form1.FailureType.rawValue; 
newRow.Location.rawValue = form1.CellLocation.rawValue; 
newRow.Comments.rawValue = form1.AdditionalComments.rawValue; 

现在这并未”。即使为我的桌子创建一个新的行...任何帮助表示赞赏!

回答

0

您应该检查是否允许一个行的多个实例。在层次视图中选择FailureInstance,然后在Object-> Binding中(如果您没有看到它转到窗口菜单并选择Object),请选中“为每个数据项重复行”。如果没有,然后选择它,你的代码应该可以正常工作。

我也建议您在Adobe Reader中启用JavaScript调试,因为它比您应该看到错误何时出现以及它的含义如何。打开Reade进入编辑 - >首选项 - > JavaScript并选择“Show error on errors and messages”。然后您将需要重新启动Designer。

相关问题