PDA

View Full Version : keyup listner for combobox



mrhari
2 Jan 2011, 4:09 AM
hi,
I added keyup listner for a conbobox.but getvalue method is returning null value


hre is my code

ComboBox<ModelData> test=new ComboBox<ModelData>();
test.setStore(store);

test.addListener(Events.

OnKeyUp, new Listener<FieldEvent>() {


@Override
publicvoid handleEvent(FieldEvent be) {
Window.alert(""+be.getValue())
}
});

sven
2 Jan 2011, 4:23 AM
Probably because the value in the field does not match anything in the store. What do you want to get? The string you entered in the input field? Than you need to call test.getRawValue();