I have this code and do action is never fired
TextBox textbox = new TextBox();
textbox .addValueChangeHandler(new ValueChangeHandler<String>() {
@Override
public void onValueChange(ValueChangeEvent<String> event) {
//do action
}
});
what am I doing wrong ?
One information a forgot the textBox was setEnable(true), is for this reason i don't use other handler. I find a solution the way to fire the event is when the textBox was set and for that i use coutTotal.setText("someText") but for fire the event i need to use coutTotal.setValue("sometext", true)
private void computeTotal() {
Double total = 0.0;
for (int i = 0; i < discloserPanel.getWidgetCount(); i++) {
if (discloserPanel.getWidget(i) instanceof LigneCout) {
LigneCout ligneCout = (LigneCout) discloserPanel.getWidget(i);
total += ligneCout.getSousTotal();
}
}
coutTotal.setValue(FormHelper.prepareDoubleForForm(total, 0), true);
}