I have a rule define as following,
and then I have a GlobalUserForm which is an editor for GlobalUser domain object. But when I set a GlobalUser on editor byCode:private Rules createGlobalUserRules() { return new Rules(GlobalUser.class) { protected void initRules() { add("firstName", getNameValueConstraint()); add("lastName", getNameValueConstraint()); add(not(eqProperty("firstName", "lastName"))); } }; }
Event though the selected user has first name and last name which are not equal and have valid values, form still show error on these two fields and Apply button is not enabled. Now if i just add a space and then delete it or just delete the last character in firstName and type it again then everything is fine. Seems like my form is not getting validated correctly on setFormObject().Code:globalUserEditorModel.setFormObject(selectedObject);
Amad


Reply With Quote