I have users inside an ArrayList of UserDetails. UserDetails has 2 fields: id and name.
I would like to have a Struts2 select tag which populates the user names, but on the click of submit button it should post the user id.
s:select list="users.userName" value="users.userId" size="0"
This is what i did..but it is not working for me.
How can I achieve this?
just like @AleksandrM said, check the Document here
It should look like this: