Hi Richard
I have aotovalidation turned on - it means that after reset method of my
form bean validate() is called, and if it sucessfull action's execute() is
invoked.
But whatever i do in validate of my form bean is my business. For me
autovalidation means that validate() of form bean is invoked
at this point, but that's one way to
approach the problem.
Q
-Original Message-
From: Jakub Milkiewicz [mailto:[EMAIL PROTECTED]
Sent: Sunday, May 07, 2006 2:14 PM
To: Struts Users Mailing List
Subject: Re: page validation in wizzard app
Hi Richard.
I can't because of autovalidation
On 5/8/06, Jakub Milkiewicz [EMAIL PROTECTED] wrote:
Up to now the best soulution ( as i think) is to turn off autovalidation and
validate in Action classes calling actionForm validate(). Obviously i will
set proper value of page property in each action before validation.
Turning off
.
-Richard
-Original Message-
From: Jakub Milkiewicz [mailto:[EMAIL PROTECTED]
mailto:[EMAIL PROTECTED] ]
Sent: Monday, May 08, 2006 11:20 AM
To: Struts Users Mailing List
Subject: Re: page validation in wizzard app
Hi Richard
I have aotovalidation turned on - it means that after reset
You could have the ActionForward mapped to an Action class in your
struts_config.xml file just as easily as a JSP, e.g. forward
name=validation_failed action=RepopulateAction/ and then just
'return ActionForward(validation_failed)' if validation failed on
page1.
HTH,
-ed
On 5/6/06, Jakub
Jakub,
Why can't you reset the page attribute to the appropriate value in your
Action classes when validation fails.
-Richard
Richard Yee wrote:
Jakub,
I think the more elegant solution is to do the validations in the
ActionForm validate method and also use a hidden static 'page'
variable
Hi
I do not catch it:
forward
name=validation_failed action=RepopulateAction/
I do not think this synax is ok.
The problem is that i use autovalidation.
If validation fails i am forwarded to another action specified by input
attribute.Let's call it action2.
But action2 is never executed
Hi Richard.
I can't because of autovalidation. Remember that all my action have the same
actionForm which is storred in session.
If validation fails i am forwarded to previous action but this action is not
even executed cause before this previous action can be invoked validation
process occurs.
On 5/7/06, Jakub Milkiewicz [EMAIL PROTECTED] wrote:
Hi
I do not catch it:
forward
name=validation_failed action=RepopulateAction/
I do not think this synax is ok.
The forward .../ is inside of a action block in your
struts-config.xml, the syntax is approximate and should be enough to
give
Jakub,
Even though you are using autovalidation, don't you still have a
validate() method in your ActionForm that is getting called? Can you
alter the page attribute appropriately there (ie. if (errors.size() 0)
page--;
-Richard
Jakub Milkiewicz wrote:
Hi Richard.
I can't because of
Users Mailing List
Subject: Re: page validation in wizzard app
Hi Richard.
I can't because of autovalidation. Remember that all my
action have the same
actionForm which is storred in session.
If validation fails i am forwarded to previous action but
this action is not
even executed
Jakub,
I think the more elegant solution is to do the validations in the
ActionForm validate method and also use a hidden static 'page' variable
in the JSP. Your Action.execute method should be fairly small and mainly
have code that calls business delegates and that necessary for
determining
Hi Jakub-
I'm not sure if I fully understand your pageflow, but here goes. I
would turn off automatic validation in struts_config.xml. In each
action, one of the first things I would do is call
form.setPage(pageNo) and then call form.validate(...), and if there
are any errors I'd return an
Hi
Thanks for your answer but i do not understand what :
hidden static 'page' variable in the JSP
Please note that if i submit a form i sent it along with page parameter.
And if form is not valid i do not go to any JSP page - i am forwarding to
previous ACTION.
Because of autovalidation i
Hi Ed
Thanks for an answer. The problem with your idea is:
IF validation fails i can not forward to previous JSP!
I need to forward to previous action to prepare me a view - retireve
something from DB and put it in html:select.
I have the same idea to put form.setPage(pageNo) as first thing in
15 matches
Mail list logo