Using a LabelValueBean properly

Viewed 8096

I have a variable:

private ArrayList<LabelValueBean> circleNameIdList;

inside my Action class where it's value get populated.

I want to display the label in my drop-down in JSP and when one label is selected, the corresponding value to that particular label in circleNameIdList to be passed to the server. Eg.: If label: NewYork is selected then it's corresponding id = 5, is sent to the server.

How can I achieve this?

Up till now I was doing like this in JSP:

<s:select list="#session.circleNameIdList" label="Select Circle:" name="circleNameIdList" id="circleNameIdList"></s:select>

However, it display is not correct.

1 Answers
Related