ComboBoxItem does not show matches when clicked out and back in when using property setAddUnknownValues(false).
In the sample code included,
1 - click in the combo box and type "x", the 3 values starting with x show up - all good.
2 - Without selecting anything, click in the Item 1 text box, the x is removed from the ComboBoxItem - all good.
3 - click back in the combo box and type "x" just like in step 1 above. Nothing happens, no items are displayed to select from.
Code level: SmartClient Version: v9.1p_2014-08-01/Pro Deployment (built 2014-08-01)
In the sample code included,
1 - click in the combo box and type "x", the 3 values starting with x show up - all good.
2 - Without selecting anything, click in the Item 1 text box, the x is removed from the ComboBoxItem - all good.
3 - click back in the combo box and type "x" just like in step 1 above. Nothing happens, no items are displayed to select from.
Code:
public void onModuleLoad() {
final DynamicForm form = new DynamicForm();
form.setWidth(250);
FormItem item1 = new TextItem();
item1.setTitle("Item 1");
ComboBoxItem item2 = new ComboBoxItem();
item2.setTitle("ComboBox");
item2.setHint("<nobr>A non-empty ComboBoxItem</nobr>");
item2.setType("comboBox");
item2.setAddUnknownValues(Boolean.FALSE);
item2.setValueMap("abc", "abcd", "abcde", "xxx", "xyz", "xxyyzz");
SelectItem item3 = new SelectItem();
item3.setTitle("Select");
item3.setHint("<nobr>A SelectItem with styled entries</nobr>");
item3.setValueMap("<span style='color:#FF0000;'>Red</span>", "<span style='color:#00FF00;'>Green</span>",
"<span style='color:#0000FF;'>Blue</span>");
form.setFields(item1, item2, item3);
form.draw();
}
Comment