struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Niall Pemberton" <niall.pember...@blueyonder.co.uk>
Subject Re: form validation, assigning context
Date Wed, 09 Jun 2004 13:33:51 GMT
No is the short answer, but theres nothing to stop you storing them in the
request under your own key as well in your ActionForm's validate method.

Niall

----- Original Message ----- 
From: "Bullard, James" <JBullard@AR.SONY.COM>
To: <user@struts.apache.org>
Sent: Tuesday, June 08, 2004 9:26 PM
Subject: form validation, assigning context


> Is there anyway to declare that a validator should create ActionErrors
under
> a given key. For instance in my code I write something like this:
>
> new ActionErrors("user-errors", new ActionError("errors.user.invalid",
> username));
>
> Then in the page (I am using velocity, but this is not important bear with
> the code) I have something like this:
>
> #displayErrorMarkup("user-errors")
>
> The problem is that when this macro goes and fetches the errors it uses
the
> key "user-errors" to fetch the errors, so errors which the validator
> generated will not be displayed, I did not see anyway for a form element
in
> validation.xml to be declared with ActionErrors context key which I think
is
> quite necessary, so I am probably missing something simple.
>
>
> Thanks in advance,
>
> jim
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Mime
View raw message