struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dun...@sapio.co.uk (Duncan Harris)
Subject Re: Forwarding if Validation Fails
Date Thu, 01 Jan 1970 00:00:00 GMT
s45652001@yahoo.com (Antony Stace) wrote:

> I want to use this a validationTest() approach but am not sure  how to use
> it in my case.  I don't want to have this logic in the ActionForm since
> the logic is quite long to work out if the data is valid. 
> I have a AddNewUserDetails page in my application
> and if a admin user enters a new user with a userName which is already used
> then I want to
> 
> 1.  Create an ActionError and add this to the errors in this Action using
>     saveErrors()
> 2.  Delete the value of userName in the ActionForm(so when the AddNewUser
>     is displayed again the userName field is not filled in, but blank) 
> 
> Once these are done, I will return the user to AddNewUserDetails page by way of
> the getInput() method.
>  
> What is the best way to go about this?


What are you specifically stuck with?
You seem to have described all the steps.

Duncan Harris
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Hartford, Cheshire, U.K., Tel: 07968 060418
Looking for STRUTS contract work in the U.K.

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


Mime
View raw message