Hi!

Just a small (and stupid?) question:

How do I set a default value for a ComboBox? As the CB does not have the 
value to select when it is created I would have guessed something like:

combobox.setReadOnly(true);   // use it as a select-only listbox
combobox.setValueField("id");   // so that we can set the id, not the text
store.addStoreListener(new StoreListenerAdapter() {
   public void onDataChange(Store store) {
       combobox.setValue("IDnum");   // set the ID of the element
   }
}
combobox.setStore(store);
combobox.setTriggerAction(ComboBox.ALL);

However the onDataChange is never called (breakpoint) and I do not find 
one example which sets a value anywhere in the examples...

Thank you very much in advance!

Best regards,

Anton

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"GWT-Ext Developer Forum" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/gwt-ext?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to