> -----Original Message----- > From: Woodchuck [mailto:[EMAIL PROTECTED] > Sent: Wednesday, August 25, 2004 10:42 AM > To: Struts Users Mailing List > Subject: RE: ActionForm.validate() to dynamic input? > > > > --- Jim Barrows <[EMAIL PROTECTED]> wrote: > > > > > > > > -----Original Message----- > > > From: Woodchuck [mailto:[EMAIL PROTECTED] > > > Sent: Wednesday, August 25, 2004 10:24 AM > > > To: Struts Users Mailing List; Hubert Rabago > > > Subject: Re: ActionForm.validate() to dynamic input? > > > > > > > > > hi Hubert, > > > > > > thanks, but unfortunately i know about manually validating and > > > forwarding in the Action object. i was hoping there was a > > > way to avoid > > > doing this. > > > > > > this is because if you use ActionForm to validate, your Action > > object > > > does not even get created. this is more efficient, and > it would be > > > nice if i could avoid the Action object if possible. > > > > > > and i did try that mapping.setInput() function but of course > > > that would > > > be just too easy (ie. it didn't work). > > > > What about the page number that the validation uses for multi-page > > forms? The struts validation will allow you to validate > some, or all > > of a form based on what page in a sequence of pages you are on. > > > > Your input could also be to an action that will forward to the page > > you want. > > well, the problem is because my Action can be arrived at from > different > places. and upon requesting for my Action if there are validation > errors i want to return the user back to where they came from. > > i'm not sure about what you suggested.. i don't know what you mean by > multi-page forms and validation based on the page number..
The validation framework allows you to use a page property on the field element on each field element, and provides a corresoponding page property on the ValidatorForm. This is useful for when you have multiple pages filling in a form. Also don't forget that you can have more then one action mapping per class. > > are you talking about putting flags on the html form that i can use > upon submit to decide what to validate? i can do that, but how can i > instruct the Struts ActionForm.validate() mechanism to go somewhere > else other than the Action definition input attribute value? > > > > > > > > > > woodchuck > > > > > > > > > --- Hubert Rabago <[EMAIL PROTECTED]> wrote: > > > > > > > See > > > http://marc.theaimsgroup.com/?l=struts-user&m=109302108205069&w=2 > > > > > > > > On Wed, 25 Aug 2004 09:56:01 -0700 (PDT), Woodchuck > > > > <[EMAIL PROTECTED]> wrote: > > > > > hihi, > > > > > > > > > > i'm using Struts' built-in ActionForm validation > mechanism, and > > it > > > > > works fine. If the ActionErrors container is not empty, it > > will > > > > > automatically forward me to the specified value of the "input" > > > > > attribute of my Action definition. > > > > > > > > > > however, is there a way to programmatically change > this "input" > > > > value > > > > > so we can forward to different pages instead of always > > > going to the > > > > one > > > > > specified in the Action definition? > > > > > > > > > > thanks in advance, > > > > > woodchuck > > > > > > > > > > __________________________________ > Do you Yahoo!? > Yahoo! Mail is new and improved - Check it out! > http://promotions.yahoo.com/new_mail > > --------------------------------------------------------------------- > 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]