I would like the action to perform (not fail as validator specifies) but
give feedback to the user about the entered data.  For example in certain
fields you can use a table as a select but override the selection, and other
input would be added to the selection.  You would want to let the user know
that the information was added to the allowed list.

I am doing your other selection in the action class as well.

My intermeditate solution, is to extend the ActionForm and add an
informational message ActionMessages property and a special tag for
displaying any pending informational messages.

Edgar

> -----Original Message-----
> From: Max Cooper [mailto:[EMAIL PROTECTED] 
> Sent: Monday, September 15, 2003 5:38 AM
> To: Struts Users Mailing List
> Subject: Re: Errors / Messages
> 
> 
> Edgar,
> 
> What is your aim in doing this? If there is a validation 
> error, the Struts framework sends the user back to the input 
> page to inform them of the problem, and possibly allow them 
> to fix it and resubmit. If the request still gets passed to 
> the action, the action will need to do conditional processing 
> based on the presence of errors, and then it is unclear how 
> control will pass back to Struts so that it can send the user 
> back to the input page to inform them of what went wrong.
> 
> I have sometimes thought about having the action produce a 
> validation-style error if something goes wrong in processing 
> the request, after which it could pass control back to the 
> Struts framework to send the user back to the input page. You 
> can of course add another <forward> or something, but it 
> would be nice if you could just tell Struts more cleary that 
> something went wrong and that Struts should send the user 
> back to the input form (as it does with a validation error), 
> but I am not sure if there is an elegant way to do that. This 
> is distinct from your proposed flow, but it seems the same 
> feature (tell Struts there was an error and user should be 
> sent back to input form) could support both of our scenarios.
> 
> What is the scenario you wish to support with the control 
> flow that are looking for?
> 
> -Max
> 
> ----- Original Message ----- 
> From: "Edgar P Dollin" <[EMAIL PROTECTED]>
> To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
> Sent: Monday, September 15, 2003 2:54 AM
> Subject: Errors / Messages
> 
> 
> > In validate, if you add an error to the message list, validator 
> > returns without forwarding.  Has anyone done anything with an 
> > alternate message
> file
> > or prioritized messages, so you can add a message yet still forward.
> >
> > Thanks in advance.
> >
> > Edgar
> >
> > 
> ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
> 
> 
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to