An index is a kind of a link between a value and its displayable
representation. Having an index in getDisplayValue method we would do
something like:
List<Integer> lang_choices = Arrays.asList (new Object [] { 1, 2, 4, 8 });
Object [] lang_labels = new Object [] { "php", "perl", "java", "c++" };
public Object getDisplayValue (Object object, int index) {
return lang_labels [index];
}
public String getValueId (Object object, int index) {
return String.valueOf (object);
}
It should be more efficient then to do a map lookup for every
option especially in case of a long option list.
Personally I think that things could be more simple and logical
with less faceless model. I mean having a model which is based on an
interface (not a simple single object container) like in swing or
tapestry would help.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]