2013-05-01 30 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。

相關問題