OGNL can be used to access session attributes; if the user list is already in session:You can also use Nishan's suggestion of retrieving the user list object in the action and exposing it as an action property, but it's probably easier and more testable to implement SessionAware and load the action property from the session attribute map.
Implementing SessionAware doesn't involve any static utilities and makes actions easier to test in isolation.
Joined: Oct 12, 2008
Hi David and Nishan,
thanks for your replies.. I am not yet able to try this out. What I want more in this is that I want to use say UserID as Key of list and UserName as display value. And the other thing is, when I change value of this select, say I changed name to "Vishal", at that time the other <s:select> should show list of say "hobbies" of the user "Vishal". So how do I do that? Should I do ajax request to server on value change event? if yes, then how do I do that? if no, then what is alternative of doing it..