Hello,
do you think it is a good idea to make OptionList accept null values?
I tried to use it with null values but in method indexOfValue it crashes:
public int indexOfValue (String value)
{
int numChildren = DOM.getChildCount(getElement());
for (int i = 0; i < numChildren; i++) {
if (getValue(i).equals(value)) {
return i;
}
}
return -1;
}
getValue(i) is null and so equals is not possible.
it could be fixed with:
String ithValue = getValue(i);
if (ithValue != null && ithValue.equals(value)
|| ithValue == value) {
return i;
}
Regards
Andreas