-
FEATURED COMPONENTS
First time here? Check out the FAQ!
hi,
i wanted to load the combo box with the name of countries from the database what i did is stored the name in string array and casted it to list model like.
<zscript><![CDATA[
CountryService conSvc = new CountryService();
ListModel conset = new SimpleListModel(conSvc.getCountry());
]]>
</zscript>
conSvc.getCountry() return array,
and used it has
<combobox id="countryCmb" width="150px" model="${strset}" constraint="no empty" />
by this i get all the name in the combo box, but i want to know whether this is the right method.
also when i retrieve the values while editing the record i am not able to select default value from the combo list,
i used the same above method to load the combo,
<combobox id="bunitCmb" width="150px" model="${strset}" constraint="no empty" value=${country.Name}/>
by this i get only one name of the country by which i have saved the record.
what should be done so that i can get all the list and selected with one which i have saved the record.
thanks in advance.
@ samchuang
Thanks for your reply.
Asked: 2010-01-15 03:06:28 +0800
Seen: 642 times
Last updated: Jan 28 '10