struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Robert Leland <>
Subject Re: Input form field values...
Date Thu, 25 Sep 2003 17:39:17 GMT
Take a look at the nightly struts validator example.

The pattern is:
   <!-- JavaScript Type Action -->
      <action    path="/editJsType"
         <forward name="success"              path="/jsType.jsp"/>

    <action    path="/saveJsType"
       <forward name="success"              path="/index.jsp"/>

The key is always going through the editXXXX action which loads the 
combo boxes etc...
When an error happens since the input is
This action is called with a parameter telling the form to ignore an 
attempt to reset it's
current values.
Also notice how every thing is stored in the request, otherwise putting 
items in the session ,
any real application with 100's or 1000's of users you'll needlessly use 
up all of your memory resources,
not to mention run slow.

Again get a nightly build and look at the example.


Joseph William wrote:

>This is with regards to my question about retaining the form field values when the error
messages shouw up thru the Action errors... Just now, I figured out it was coz of the <html:form/>
In this tag, I had added the name and type attribute too -- This is coz I wanna do the client
side javascripting too for which I need the form name... 
>When I remove the name and type attribute(which is mandatory if we specify the name!)
from the form tag, I am able to retain the form element values in the error messages page!!!
Why is this so??? How to solve this???
>Can anybody out there explain???
>Im trying to develop a small application using struts. Everything works 
>fine except the Action Errors part -- When the error messages show up, 
>the form element values from the previous screen are not being 
>retrieved in the next screen -- Am I missing something??? Help appreciated...
>Do you Yahoo!?
>The New Yahoo! Shopping - with improved product search

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message