-
FEATURED COMPONENTS
First time here? Check out the FAQ!
I had loaded the combobox value by databinding i need to take id of combobox values in database to store i get only values my code is as follows
in zul i had combobox which loads cities but i need id of selected city in DB to store
<zscript>
Iterator iter4=null;
List citylist= signupWnd.getCity();
List citymodel = new LinkedList();
for(iter4=citylist.iterator();iter4.hasNext();)
{ City city=(City)iter4.next();
city.setCity_id(city.getCity_id());
city.setCity_name(city.getCity_name());
citymodel.add(city);
}
Object selected4=citymodel.get(0);
<zscript>
<row>City:<combobox id="CityCmb" model="@{citymodel}" selectedItem="@{selected4}" value="@{selected4.city_name}">
<comboitem self="@{each=city}" label="@{city.city_name}" value="@{city.city_id}"/></combobox></row>
i get city_name in java files by
Combobox shopcity_t = (Combobox)this.getFellow("CityCmb");
shopcity_t.getValue();
but i need id of city for further operations what should i do.
plz help
Asked: 2010-03-08 04:32:57 +0800
Seen: 649 times
Last updated: Mar 09 '10