makados
17 Jun 2008, 9:43 AM
If I try to use method select just after creation ComboBox throws a NullPointerException. For example the next code:
ComboBox comboBox = new ComboBox();
comboBox.setStore(listStore);
comboBox.setDisplayField("name");
comboBox.setEditable(true);
comboBox.select(1);gives
[ERROR] Uncaught exception escaped
java.lang.NullPointerException: null
at com.extjs.gxt.ui.client.widget.form.ComboBox.select(ComboBox.java:351)PS. I have 3 items in the comboBox and it works well without using method select. But I need to select values.
ComboBox comboBox = new ComboBox();
comboBox.setStore(listStore);
comboBox.setDisplayField("name");
comboBox.setEditable(true);
comboBox.select(1);gives
[ERROR] Uncaught exception escaped
java.lang.NullPointerException: null
at com.extjs.gxt.ui.client.widget.form.ComboBox.select(ComboBox.java:351)PS. I have 3 items in the comboBox and it works well without using method select. But I need to select values.