One more thing, I'm creating my action classes by using Spring 2, in this way:<bean id="comboboxTag " scope="prototype"class="com.myproject.comboboxTag "><constructor-arg ref="fruitService" /></bean> -- Thx, Milan Milanovic
----- Original Message ---- From: Milan Milanovic <[EMAIL PROTECTED]> To: Struts Users Mailing List <user@struts.apache.org> Sent: Monday, May 12, 2008 4:34:09 PM Subject: [Struts 2] Combo box question Hi, I have a simple action class, for example like this: public class comboboxTag extends ActionSupport{ private List<Fruit> fruits; private FruitService service; public String execute()throws Exception{ fruits = service.getFruits(); return SUCCESS; } } fruits field should be connected to combobox in my jsp page. I have two questions, the first is list for combobox should be only List<String> type or it can be List<Fruit> ? The second question is that I don't want every time to call my service to repopulate fruits field (and combo box), when one work in this page, I want to do this just once (in first start of the page) ? I ask this because I will have 5 combo boxes on a master/detail jsp page. -- Thx, Milan Milanovic ____________________________________________________________________________________ Be a better friend, newshound, and know-it-all with Yahoo! Mobile. Try it now. http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ ____________________________________________________________________________________ Be a better friend, newshound, and know-it-all with Yahoo! Mobile. Try it now. http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ