Java Mailing List Archive

http://www.gg3721.com/

Home » Struts Users Mailing List »

[S2] submitting object from <s:select>

Oleg Tim

2008-11-28

Replies: Find Java Web Hosting

Author LoginPost Reply
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@(protected)
For additional commands, e-mail: user-help@(protected)

©2008 gg3721.com - Jax Systems, LLC, U.S.A.