Java Mailing List Archive

http://www.junlu.com/

Home » Home (12/2007) » Struts 2 »

Help for Struts2 with JSTL

Nagraj Rao

2006-12-14

Replies:

Hi

Needed some help on struts2 for getting the id of a list i have in my sessionScope (say StateList). This individual object in this list is State which has fields "id" and "name". I'm using the following code to get a checkbox rendered with its id being the id of the state

<s:checkbox name="stateCheck" id="%{ StateList.id }/>

In the final HTML page i get the code as id="". Please do help me figure out how should i get the id.

I've tried out the following with all the 3 : "$", "#", "%"
StateList.id
StateList.state.id
sessionScope.StateList.id

Kindly help,



regards,
Nagraj
©2008 junlu.com - Jax Systems, LLC, U.S.A.