http://jakarta.apache.org/struts/userGuide/building_model.html#actionform
The name you give the form in the struts-config is also its attribute name in request or session scope. If you save the ActionForm to the session under the appropriate name, when you come back to the page, the value will be selected again. By default, Struts will save the form to session scope for you, so you don't really have to do anything. This much is automatic =:)
If you are working on a small application for a modest number of users, you can just create an ActionForm for each of your HTML forms, each using a unique name. Each will be saved in the session for you, and preserve the last thing they entered. If you need to populate the form, you can transfer data to it in the Action.
The one thing to watch for are checkboxes. If you use checkboxes on a session-scoped ActionForm, you need to clear them in the reset method. Otherwise, you do not need to clear any other properties of the rest method.
-Ted.
koen boutsen wrote:
Hi
I'm using a <html:select>. When an option is selected, I put the selected value in the session. When come back on the page with this select, I want the previously selected option to be selected. Can anyone tell me how I can do that ?
thanks
Koen
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

