Thank you Christoph for reply
In fact, when I choose these elements from the drop-down list, I save them in 
the database.
After I go to an other page And I do something next I return to the first one 
but the éléments are not selected in the drop-down list but they are realy 
savez in the database And I want that they apear as selected items.
Thank you

Regards

Amine

Envoyé de mon iPhone

Le 6 août 2014 à 11:33, Christoph Nenning <christoph.nenn...@lex-com.net> a 
écrit :

>> Hi All.
>> I retry because I need help, please.
>>> 
>>> I want to know how to select (color) the chosen elements in a
>> drop-down list ?
>>> First, I've selected 3 elements from a drop-down list and I saved
>> them and I go to an other page.
>>> Next, I return to the page and I want to see these selected
>> elements but until now, They are not !
>>> I use java 6 and Struts 2.
>>> 
>>> Thank you in advance.
>>> 
>>> Amine
> 
> 
> 
> 
> This is the important point:
> 
>> and I go to an other page.
> 
> Your question is about "state". Which item the user chose on a previous 
> page is a form of application state. It is your job to maintain that 
> state.
> 
> Some of your options are:
> - include the selected item as parameter in all requests (GET and POST, 
> that means you have to add it all your links/redirects and forms as hidden 
> field, this is a "stateless" approach)
> - store it in http session (this is bad practice and causes other 
> problems)
> - store it in the browser, e.g. in a cookie or via some html5 
> local-storage api
> 
> 
> 
> regards,
> Christoph
> 
> This Email was scanned by Sophos Anti Virus
> 

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

Reply via email to