Hi there,
I'm able to read values from MessageResources in JSP files. But in special
case I need to read such values in java-classes. Unfortunatelly I need it in
ActionForm in validate() method...
To understand me I'm attaching my vision of how it could be very easy (it
doesn't work):
public ActionErrors validate(ActionMapping mapping, HttpServletRequest
request){
MessageResources mr = request.getMessageResources();
ActionErrors errors = new ActionErrors();
if (anyReasonToFailValidation){
errors.add("Error found", new ActionError("key.to.this.error",
mr.getMessage("key.to.errorMessageParameter")));
return errors;
}
I think it's clear why I need to have an object of Messageresources in
ValidatorForm.
Please, could anybody help me?
Thanks a lot.
Sporak
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]