RE: dynamic return when validation failed

2009-07-09 Thread Martin Gainty
9 Jul 2009 07:36:58 -0700 > From: mailtolouis2020-str...@yahoo.com > Subject: Re: dynamic return when validation failed > To: user@struts.apache.org > > > /xxx/MyWizardPage${page}.jsp > > oh yes, this does the trick! Thanks! > > I just found another problem when using xml based

Re: dynamic return when validation failed

2009-07-09 Thread mailtolouis2020-struts
ts2, is there any replacement for that? From: Greg Lindholm To: Struts Users Mailing List Sent: Thursday, July 9, 2009 2:32:17 PM Subject: Re: dynamic return when validation failed > > > > > > Well, if I remove my validation code in the

Re: dynamic return when validation failed

2009-07-09 Thread Greg Lindholm
> > > > > > Well, if I remove my validation code in the validate() method and put it > > into execute() method, then I can easily control which logical name to be > > return, but I thought that is not a good way to do that right? > > > > While this might not be a "good way to do that," it's what I

Re: dynamic return when validation failed

2009-07-09 Thread Jim Kiley
On Thu, Jul 9, 2009 at 5:26 AM, wrote: > > Well, if I remove my validation code in the validate() method and put it > into execute() method, then I can easily control which logical name to be > return, but I thought that is not a good way to do that right? > While this might not be a "good way t

Re: dynamic return when validation failed

2009-07-09 Thread Oscar Alvarez
ook in it, > didn't found any good tip to solve my problem. > > Regards > Louis > > > > > From: Oscar Alvarez > To: Struts Users Mailing List > Sent: Wednesday, July 8, 2009 7:09:35 PM > Subject: Re: dynamic return when

Re: dynamic return when validation failed

2009-07-09 Thread mailtolouis2020-struts
Thanks for let me know another struts2 book, have a quick look in it, didn't found any good tip to solve my problem. Regards Louis From: Oscar Alvarez To: Struts Users Mailing List Sent: Wednesday, July 8, 2009 7:09:35 PM Subject: Re: dynamic return

Re: dynamic return when validation failed

2009-07-09 Thread mailtolouis2020-struts
Hi Dale & Greg, Thanks for all your discussion. >>> > The problem is that the OP doesn't understand his problem. If the > validation step knows what the result page should be, he shouldn't be > returning "input", but rather the name of the logical step to be rendered. > He's right that the cod

Re: dynamic return when validation failed

2009-07-08 Thread Greg Lindholm
Dale Newfield wrote: > Greg Lindholm wrote: > > Not sure why you think I don't understand referer. > > I already quoted the bits that illustrate this perceived misunderstanding, > but since you apparently want me to be more specific: > Actually I just wanted to move off the whole referer topic

Re: dynamic return when validation failed

2009-07-08 Thread Dale Newfield
Greg Lindholm wrote: > Not sure why you think I don't understand referer. I already quoted the bits that illustrate this perceived misunderstanding, but since you apparently want me to be more specific: Greg Lindholm wrote: The referer header will contain the URL of the last request It won

Re: dynamic return when validation failed

2009-07-08 Thread Oscar Alvarez
2009/7/8 Oscar Alvarez > Hi... > > Try to get the Ian Roughley's "Starting Struts2 online" ebook for free, and > study "PRODUCTIVITY TIPS" -> "Re-Using Action Configurations"... and see if > there are some other tips for you. > And of course "PRODUCTIVITY TIPS" -> "Use Pattern Matching Wildcard

Re: dynamic return when validation failed

2009-07-08 Thread Oscar Alvarez
Hi... Try to get the Ian Roughley's "Starting Struts2 online" ebook for free, and study "PRODUCTIVITY TIPS" -> "Re-Using Action Configurations"... and see if there are some other tips for you. HTH 2009/7/8 Greg Lindholm > > Greg Lindholm wrote: > > > >> The referer header will contain the URL

Re: dynamic return when validation failed

2009-07-08 Thread Greg Lindholm
> Greg Lindholm wrote: > >> The referer header will contain the URL of the last request, which will be >> the action URL not the jsp page that rendered the result. So this wouldn't >> help the OP if I understood his problem. >> > > I think you misunderstand what the referer field contains. It'll b

Re: dynamic return when validation failed

2009-07-08 Thread mailtolouis2020-struts
09 5:52:25 PM Subject: Re: dynamic return when validation failed The referer header will contain the URL of the last request, which will be the action URL not the jsp page that rendered the result. So this wouldn't help the OP if I understood his problem. On Wed, Jul 8, 2009 at 11:50 AM, Dale New

Re: dynamic return when validation failed

2009-07-08 Thread Dale Newfield
Greg Lindholm wrote: The referer header will contain the URL of the last request, which will be the action URL not the jsp page that rendered the result. So this wouldn't help the OP if I understood his problem. I think you misunderstand what the referer field contains. It'll be the url that

Re: dynamic return when validation failed

2009-07-08 Thread Greg Lindholm
The referer header will contain the URL of the last request, which will be the action URL not the jsp page that rendered the result. So this wouldn't help the OP if I understood his problem. On Wed, Jul 8, 2009 at 11:50 AM, Dale Newfield wrote: > Greg Lindholm wrote: > >> There is nothing in a r

Re: dynamic return when validation failed

2009-07-08 Thread Dale Newfield
Greg Lindholm wrote: There is nothing in a request that will tell you which page you came from unless you put it there (as with the hidden parameter). While this is mostly true, it's not 100% true. HTTP has a "referer" (yes, misspelled in the spec) field so most of the time you can know from

Re: dynamic return when validation failed

2009-07-08 Thread Greg Lindholm
__ > From: Greg Lindholm > To: Struts Users Mailing List > Sent: Wednesday, July 8, 2009 2:46:00 PM > Subject: Re: dynamic return when validation failed > > One way would be to pass a hidden parameter that tells you which page you > came from. > In page1.jsp form you c

Re: dynamic return when validation failed

2009-07-08 Thread mailtolouis2020-struts
uly 8, 2009 2:46:00 PM Subject: Re: dynamic return when validation failed One way would be to pass a hidden parameter that tells you which page you came from. In page1.jsp form you could add: You would need to add a setter and getter in you action for page variable. Then your result could be:

Re: dynamic return when validation failed

2009-07-08 Thread Greg Lindholm
One way would be to pass a hidden parameter that tells you which page you came from. In page1.jsp form you could add: You would need to add a setter and getter in you action for page variable. Then your result could be: /WEB-INF/pages/${page}.jsp Another way would to have different actions

dynamic return when validation failed

2009-07-08 Thread mailtolouis2020-struts
Hello, I'm new to struts2, and learning the validation in struts 2 at the moment. I'm not able to get the validation work in the way I want in the webflow (or wizard kind of page) design. Everytime when validation failed, it always return to INPUT page, I wondering is there a way I can tell str