You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Vinay Cerejo <vi...@xoriant.com> on 2001/09/06 10:41:35 UTC

Mainatinig Select list state

HI,
 I have two select lists, one filled with data and the other empty
Lets call the filled list as AllElements
and the empty list as UserElements

AllElements		UserElements
 ------------------              -------------------          
| element1    |	        |   		   |
| element2    |       >> |		   |
| element3    |            |		   |
| element4    |      <<  |		   |	
-------------------             --------------------

The user selects items from AllElements and moves them to UserElements
and then submits the form. 

Now when any validation error in the Form bean. i throw the user back to the
same form 

But my user selections have been lost. How do i maintain these. 

Ofcourse i can maintain it by doing some coding to retreive all elements
again from the database 
and using the request attributes and filtereing the selected ones etc, 
but is there no support from struts for maintaing state in such scenario??

many Thanks,
Vinay