struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Milan Milanovic <>
Subject [Struts 2] Combo box question
Date Mon, 12 May 2008 14:34:09 GMT
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.;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message