GXT 3 ComboBox event handler for changing the field value on selection - Solution

comboInstance.addSelectionHandler(new SelectionHandler(){

 @Override
 public void onSelection(SelectionEvent event) {
  //fire events if boolean fireEvents is true and value is new
  comboInstance.setValue(event.getSelectedItem(), true); 

 }
 
}); 

comboInstance.addValueChangeHandler(new ValueChangeHandler(){

 @Override
 public void onValueChange(ValueChangeEvent event) {
  //TODO Enter the code or method call here you want carried out once the user makes a selection
  
 }
 
});


For more background on the implementation of the event handlers on the ComboBox;

http://www.sencha.com/forum/showthread.php?160547-%28Beta%29-ComboBox-issues&p=779655&viewfull=1#post779655

Comments

Popular posts from this blog

Getting Started: Quick Setup for GXT 3 (includes reset.css link how to)

How to setup GXT 3 examples, samples and demos

ExtJs4 : Dynamically Add Columns