Adobe Livecycle问题-更改所有子窗体实例的背景

时间:2019-05-07 11:54:44

标签: adobe livecycle

我有一个Adobe LiveCycle es3表格。有一个名为AdditionalMaterial的重复子表单,其中包含5个字段。我希望能够通过单击按钮更改所有实例中每个字段的背景色。该按钮称为SignNow,无论我做什么,它只会更改第一个实例的背景颜色。

这是我的代码,它将检查一组字段是否为空,并更改必填字段的背景颜色,并隐藏签名字段。

我看过Adobe论坛,在其他任何地方都可以找到对Adobe JavaScript的引用。

if ((this.resolveNode("Questions1-5.COC_SUPPLIER_CODE").rawValue != null && this.resolveNode("Questions1-5.COC_SUPPLIER_CODE").rawValue != "") && (this.resolveNode("Questions1-5.COC_BULLETIN_SECTION").rawValue != null && this.resolveNode("Questions1-5.COC_BULLETIN_SECTION").rawValue != "") && (this.resolveNode("Questions1-5.OTHER_SPEC").rawValue != null && this.resolveNode("Questions1-5.OTHER_SPEC").rawValue != "") &&(this.resolveNode("AdditionalMaterials.COC_LOT").rawValue != null && this.resolveNode("AdditionalMaterials.COC_LOT").rawValue != "") &&(this.resolveNode("AdditionalMaterials.COC_QUANTITY").rawValue != null && this.resolveNode("AdditionalMaterials.COC_QUANTITY").rawValue != "") &&(this.resolveNode("AdditionalMaterials.COC_MATERIAL_DESC").rawValue != null && this.resolveNode("AdditionalMaterials.COC_MATERIAL_DESC").rawValue != "") && (this.resolveNode("SIGNATORY_NAME").rawValue != null && this.resolveNode("SIGNATORY_NAME").rawValue != "") && (this.resolveNode("SIGNATORY_TITLE").rawValue != null && this.resolveNode("SIGNATORY_TITLE").rawValue != "") &&(this.resolveNode("SIGNATORY_COMPANY").rawValue != null && this.resolveNode("SIGNATORY_COMPANY").rawValue != "")) {
  this.resolveNode("SignatureField").presence = "visible";
  this.resolveNode("$").presence = "hidden";
  oTargetField = this.resolveNode("SignatureField");
    oTargetField.access = "open";
}
else {
this.resolveNode("SignatureField").presence = "hidden";
this.resolveNode("$").presence = "visible"
  xfa.host.messageBox("You must complete all required fields prior to signing this form.  Required fields are highlighted in Yellow on this form", "Required Fields Incomplete", 0);
  this.resolveNode("SIGNATORY_NAME").ui.oneOfChild.border.fill.color.value = "255, 255, 153";
this.resolveNode("Questions1-5.COC_SUPPLIER_CODE").ui.oneOfChild.border.fill.color.value = "255, 255, 153";
this.resolveNode("Questions1-5.COC_BULLETIN_SECTION").ui.oneOfChild.border.fill.color.value = "255, 255, 153";  
this.resolveNode("Questions1-5.SHIPPED_TO_COMPANY").ui.oneOfChild.border.fill.color.value = "255, 255, 153";  
this.resolveNode("AdditionalMaterials.COC_LOT").ui.oneOfChild.border.fill.color.value = "255, 255, 153";  
this.resolveNode("AdditionalMaterials.COC_QUANTITY").ui.oneOfChild.border.fill.color.value = "255, 255, 153";  
this.resolveNode("AdditionalMaterials.COC_MATERIAL_DESC").ui.oneOfChild.border.fill.color.value = "255, 255, 153";  
this.resolveNode("SIGNATORY_NAME").ui.oneOfChild.border.fill.color.value = "255, 255, 153";  
this.resolveNode("SIGNATORY_TITLE").ui.oneOfChild.border.fill.color.value = "255, 255, 153"; 
this.resolveNode("SIGNATORY_COMPANY").ui.oneOfChild.border.fill.color.value = "255, 255, 153";  
this.resolveNode("Questions1-5.OTHER_SPEC").ui.oneOfChild.border.fill.color.value = "255, 255, 153";  
this.resolveNode("AdditionalMaterials.COC_UOM").ui.oneOfChild.border.fill.color.value = "255, 255, 153";  
}

只有第一个实例的背景颜色发生变化。我认为问题可能出在oneofChild上,但是如果我删除该引用,则子窗体中的任何内容都不会更改颜色。

0 个答案:

没有答案