There are two approaches to correcting this.

1. If you are using Sessions, Place the datalist into the session instead of the request. This will insure the datalist is available, but can does add overhead to the application. Additionally, if you do not clean up the data, this can use up memory unnessicarily.

2. Instead of returning the page to the input page, set the input of the action to action1. This will return the page to the action that builds the input page instead of returning to the imput page directly.

Inactive hide details for "Thai Dang Vu" <[EMAIL PROTECTED]>"Thai Dang Vu" <[EMAIL PROTECTED]>


          "Thai Dang Vu" <[EMAIL PROTECTED]>

          06/28/2005 11:34 AM

          Please respond to
          "Struts Users Mailing List" <user@struts.apache.org>

To

<user@struts.apache.org>

cc


Subject

Help me with my problem in Automatic Validation please

Hi everybody,

This is the situation:

welcome.jsp ----> action1 ---(forward)---> dataform.jsp ---(submit)---> action2 ----> view.jsp

I use a drop-down list in dataform.jsp. The data for the list in dataform.jsp are got from an attribute attached to the request. I use automatic validation for dataform.jsp. When I go from action1 to dataform.jsp, I can attach a datalist to the request. My problem is: when I click submit in dataform.jsp and the data don't meet all the validation requirements, the request is forwarded back to dataform.jsp. At that time no datalist is attached to the request so the dataform.jsp can not display correctly. How can I solve this problem?

Sincerely.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Reply via email to