Hi Isomorphic,
I'm looking to archive basically the same as is done in http://www.smartclient.com/smartgwt/showcase/#styled_combobox_category , but with databinding. I want a SelectItem with flags next to the name.
My ID column is numerical, the flags are named like "de.png", "us.png", etc. which is data I have in the ISO_3166_1_ALPHA_2 column.
I'd code it like this, but one method is missing.
I don't think I can solve this easily with ValueIconMapper, and I'm not sure what actually does.
Is there an easy way to do this, or do I have to fetch the data myself from the DS, then build ID->Name and ID->Countrycode mappings and set them via setValueMap and setValueIcons?
Thank you & Best regards,
Blama
I'm looking to archive basically the same as is done in http://www.smartclient.com/smartgwt/showcase/#styled_combobox_category , but with databinding. I want a SelectItem with flags next to the name.
My ID column is numerical, the flags are named like "de.png", "us.png", etc. which is data I have in the ISO_3166_1_ALPHA_2 column.
I'd code it like this, but one method is missing.
Code:
setOptionDataSource(countryDS);
setOptionOperationId("fetchDropdowndata");
setValueField(countryDS.getPrimaryKeyFieldName());
setDisplayField("SHORTNAME_DE");
setSortField("SHORTNAME_DE");
etDefaultToFirstOption(true);
setImageURLPrefix("flags/16/");
setImageURLSuffix(".png");
setValueIconDSField("ISO_3166_1_ALPHA_2"); //API missing
Is there an easy way to do this, or do I have to fetch the data myself from the DS, then build ID->Name and ID->Countrycode mappings and set them via setValueMap and setValueIcons?
Thank you & Best regards,
Blama
Comment