De: Jason Carreira [mailto:[EMAIL PROTECTED]
Enviada em: segunda-feira, 22 de setembro de 2003 15:13
Para: [EMAIL PROTECTED]
Assunto: RE: [OS-webwork] basic flow?
-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Monday, September 22, 2003 1:23 PM
To: [EMAIL PROTECTED]
Subject: [OS-webwork] basic flow?Hi folks! :)
I'm trying to build a simple wizard to add an user to my system. I created a simple action that puts a new User object into the session and chains it to subsequent actions, which go filling the User object's setters for me, and then, at the end of the chain, I save everything putting a message on a JMS queue.
The problem here is that, when using the XWork Validation Framework, the first hit doesn't even call execute() or validate(), but goes directly to the input page, with the errors assigned. I defined the action mappings like this:
(...)
<action name="step1" class="foo.actions.CadastroWizardAction">
<result name="input" type="velocity">
<param name="location">user/add/step1.vm</param>
</result>
<result name="success" type="chain">
<param name="actionName">step2</param>
</result>
<interceptor-ref name="validationWorkflowStack"/>
</action><action name="step2" class="foo.actions.CadastroWizardAction">
<result name="input" type="velocity">
<param name="location">user/add/step2.vm</param>
</result>
<result name="success" type="chain">
<param name="actionName">step3</param>
</result>
<interceptor-ref name="validationWorkflowStack"/>
</action>(...)
I'm using the same action throughout the wizard, cause they just need to chain to the next step until the last one, which does the real work:
<action name="step2" class="foo.actions.SendNewUserToQueueAction">
<result name="success" type="velocity">
<param name="location">user/add/added.vm</param>
</result>
<result name="error" type="velocity">
<param name="location">user/add/error.vm</param>
</result>
<interceptor-ref name="validationWorkflowStack"/>
</action>I surely know this is a dumb question, but how do I make it show the input page with no errors flagged when I access it for the first time, if it doesn't even call execute()?
Thanks in advance!
-cv