On Wed, Nov 17, 2010 at 8:14 AM, Li Ying <liying.cn.2...@gmail.com> wrote:
> I suggest you to do these things in the following way:

This is where I think I messed things up.  My identifyAction didn't
have setters/getters for the fields because the verifyAction captured
the results of that input.

Consequently, when I redirected to IdentifyAction to get the
identify-success.jsp, the values COULDN'T be available.  (Doh!!)

You're suggestion below sounds much more reasonable though.  Thanks
for everyone's help and patience.

>
> (1)put 2 method in IdentifyAction.
> The first [execute] method returns [input],
> show the input page to user.
>
> (2)In the  Identify-input.jsp,
> submit fields to [IdentifyAction] itself, but another method: [verify]
>
> (3)when validation fails, the result will be [input] automatically,
> which means, the input page will be shown again.
>
> (4)when validation validation passes, your method [verify] will be
> executed. You can implement your business logic in it. If the
> verification fails, you can return a result [input], and back to the
> input page again. If the verification pass, you can return another
> result, and forward(or redirect) to the next action; or you can return
> a result [success], show the Identify-success.jsp page.
>
> (5)another thing need to notice is, method [execute] should be marked
> by [skipvalidation] annotation
>



-- 
Greg Akins

http://insomnia-consulting.org
http://www.pghcodingdojo.org
http://pittjug.dev.java.net
http://twitter.com/akinsgre
http://www.linkedin.com/in/akinsgre

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org

Reply via email to