Проблема Adobe Livecycle - изменение фона во всех экземплярах подчиненной формы - PullRequest
0 голосов
/ 07 мая 2019

У меня есть форма Adobe LiveCycle es3.Существует повторяющаяся подчиненная форма с именем AdditionalMaterial с 5 полями в ней.Я хочу иметь возможность изменять цвет фона для каждого поля во всех случаях одним нажатием кнопки.Кнопка называется SignNow. Независимо от того, что я делаю, она только изменит цвет фона для 1-го экземпляра.

Вот мой код, он проверяет, является ли набор полей пустыми, меняет ли цвет фона обязательных полей, а также скрывает поле подписи.

Я смотрел на форумах 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";  
}

Только 1-й экземпляр меняет цвет фона.Я думаю, что проблема может быть с oneofChild, но если я удалю эту ссылку, то ничто в подчиненной форме не изменит цвет.

...