struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Hubert Rabago <hrab...@gmail.com>
Subject Re: patterns for preloading forms and page scope data
Date Mon, 01 Nov 2004 20:39:57 GMT
Yes, you can do this, and it'll work.  You can set the "input"
attribute to an action, and that action will be called when there are
validation errors.  Or, you can set "validate=false" as Frank
suggested and call the form bean's "validate()" method yourself.  If
there are errors, you can do a "return mapping.getInputForward()" to
forward the control to the page you set in the "input" attribute.

Hubert

On Mon, 1 Nov 2004 12:32:26 -0800 (PST), fzlists@omnytex.com
<fzlists@omnytex.com> wrote:
> On Mon, November 1, 2004 3:26 pm, Gary S. Cuozzo said:
> >> The forward attribute of your action mappings can point to another
> >> action mapping.  Would that do the trick for you?
> > I suppose it would.  How would struts know which mapping I wanted to go
> > to in the case of validation errors?  Would I just add a forward with
> > the same name as the input form or something?
> 
> Well, what you can do (and I don't think I'd recommend this, but just to discuss what's
possible)... When a validation error occurrs, you get forwarded to the page named by the "input"
attribute of the mapping... Unless I'm wrong )and I might be, I haven't tried this), you can
specify another action mapping for this attribute (I actually was thinking of the <forward>
element before, but I think this holds for "input" just the same).
> 
> Frank
> 
> 
> ---------------------------------------------------------------------
> 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