From: Chad B. <cwb...@us...> - 2007-09-17 17:40:53
|
User: cwbrandon Date: 07/09/17 10:40:53 Modified: andromda-jsf2/src/main/resources/templates/jsf2/configuration validator-rules.xml.vsl Log: make sure validateEqual works with tr:form as well as h:form Revision Changes Path 1.3 +12 -1 cartridges/andromda-jsf2/src/main/resources/templates/jsf2/configuration/validator-rules.xml.vsl Index: validator-rules.xml.vsl =================================================================== RCS file: /cvsroot/andromdaplugins/cartridges/andromda-jsf2/src/main/resources/templates/jsf2/configuration/validator-rules.xml.vsl,v retrieving revision 1.2 retrieving revision 1.3 diff -u -w -r1.2 -r1.3 --- validator-rules.xml.vsl 2 Jul 2007 18:54:59 -0000 1.2 +++ validator-rules.xml.vsl 17 Sep 2007 17:40:50 -0000 1.3 @@ -612,6 +612,17 @@ (value.length > 0) && field.disabled == false) { var equalField = document.getElementById(equalFieldName); + if (!equalField) + { + // - try getting the field the way that trinidad identifies it (it doesn't give the element + // the prefix of the form name like regular JSF forms do). + var formAndFieldName = equalFieldName.split(':'); + var formObject = document.getElementById(formAndFieldName[0]); + if (formObject) + { + equalField = formObject.elements[formAndFieldName[1]]; + } + } if (equalField) { var valid = equalField.value == value; |