Fix [ 1883143 ] Process Delete Import doesn't allow to select table

This commit is contained in:
Carlos Ruiz 2008-01-31 02:56:40 +00:00
parent 0029eb6f93
commit c0912859ca
1 changed files with 16 additions and 5 deletions

View File

@ -95,11 +95,22 @@ public class Listbox extends org.zkoss.zul.Listbox
List<ListItem> items = getItems();
for (ListItem item : items)
{
if (value.equals(item.getValue()))
{
setSelectedItem(item);
break;
}
if (value.getClass() != item.getValue().getClass()) {
// if the classes of value and item are different convert both to String
String stringValue = value.toString();
String stringItem = item.getValue().toString();
if (stringValue.equals(stringItem))
{
setSelectedItem(item);
break;
}
} else {
if (value.equals(item.getValue()))
{
setSelectedItem(item);
break;
}
}
}
}