That looks mostly reasonable, though I've never really seen this identity validator before.
Is there someone else who'd be able to patch things up? On 6/13/07, Lionel Touati <[EMAIL PROTECTED]> wrote:
Hi List, There is no way AFAIK to specify a different message to be displayed for the Identity validator. For example, when using the following format match=password[%user_general_info_ERR12], it does not pickup the specified message. When looking at the code the Identity class looks for the message in the _identityMessage field which does not seem be settable. So I've modified the code this way the Identity class to get the message properly protected String buildIdentityMessage(ValidationMessages messages, IFormComponent field, IFormComponent referent) { Object[] parameters = new Object[]{ field.getDisplayName(), new Integer(_matchType), referent.getDisplayName() }; if(_identityMessage!=null) { return messages.formatValidationMessage(_identityMessage, ValidationStrings.INVALID_FIELD_EQUALITY, parameters); } else { return messages.formatValidationMessage(getMessage(), ValidationStrings.INVALID_FIELD_EQUALITY, parameters); } } Tell me if this is the right way to do it, or if I miss something Thanks --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
-- Jesse Kuhnert Tapestry/Dojo team member/developer Open source based consulting work centered around dojo/tapestry/tacos/hivemind. http://blog.opencomponentry.com