struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Oleg Tim" <oleg...@gmail.com>
Subject [S2] submitting object from <s:select>
Date Fri, 28 Nov 2008 21:43:29 GMT
Was wondering if struts built-in data conversion will work to receive
an object from select list. So, if select list populated with
List<State> stateList and the variable submitted from s:select is a
State object, is it possible to actually get this object in the
receiving action?

so if:

State state;

State {
int id;
String name;
}

and

<s:select name="state" list='stateList' listValue="name" listKey="id" />

Any way to have struts 2 make the conversion so I don't to manually
look up the State object via submitted key?

Thanks a lot, Oleg

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


Mime
View raw message