Hi,

you could put/get from session like so:

ActionContext.getContext().getSession();

You can define a "parent" action (implementing preparable) with a prepare() method that retrieves data and store it in session for later (and check each time if data is already in session) and puts it into properties with public getters that your other actions extending that one (and jsps) will inherit.

Em 27-04-2010 09:36, Upasana Sharma escreveu:
Hi

I have a jsp that displays some data . To refine the data based on some
criteria i have two comboboxes.

<s:select list="categoryList" id="categorySelect" name="categorySelect"
onchange="getDisplayCriteria();" emptyOption="true"></s:select>

  <s:select list="statusList" id="statusSelect" name="statusSelect"
onchange="getDisplayCriteria();" emptyOption="true"></s:select>


the lists for these two select option are obtained from the action that
calls the page containing them..

public String getAllLists() throws Exception{

  ActionContext.getContext().put("categoryList", EComplaintType.values());
ActionContext.getContext().put("statusList", EComplaintStatus.values());
return SUCCESS;
}

but the problem is that whatever we put in this action context , those
values are for that action only.... if we call any other action that renders
the same jsp.... these values are not accessible.

there is some issue with session management what i feel... can u suggest how
should i approach this problem...... to make the values stay in the session
after the first call.



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

Reply via email to