Hi everyone, I was wondering if there is a more automatic way of building a
DropDownChoice out of resource bundles.
Here is the case:
1- I have form inside a panel, which in turn has a dropdownchoice that has
to be built with options on a resource bundle for i18n reasons. In this case
off the top of my head something like this might do it
class mappeddropdownchoice extends dropdownchoice {
private map val;
public mappeddropdownchoice(string id, final map val) {
super(id);
this.val=val;
setchoices(map.keys());
setchoicerenderer(new ichoicerenderer()) {
Of the top of your head worked up fine!!!
Thanks. Heres is the final code.
private class MappedDropDownChoice extends DropDownChoice {
private final Map mapValues;
public MappedDropDownChoice(String id, final Map values) {
super(id);
this.mapValues=values;