struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christoph Nenning <>
Subject Re: Please Need help how to select the chosen elements
Date Wed, 06 Aug 2014 09:33:50 GMT
> 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 

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 
- store it in the browser, e.g. in a cookie or via some html5 
local-storage api


This Email was scanned by Sophos Anti Virus

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message