use of com.google.gwt.event.dom.client.BlurHandler in project drools-wb by kiegroup.
the class ActionInsertFactFieldsPageViewImpl method initialiseValueList.
private void initialiseValueList() {
// Copy value back to model
txtValueList.addValueChangeHandler(new ValueChangeHandler<String>() {
@Override
public void onValueChange(final ValueChangeEvent<String> event) {
final String valueList = txtValueList.getText();
chosenFieldsSelection.setValueList(valueList);
// ValueList is optional, no need to advise of state change
}
});
// Update Default Value widget if necessary
txtValueList.addBlurHandler(new BlurHandler() {
@Override
public void onBlur(final BlurEvent event) {
presenter.assertDefaultValue(chosenFieldsSelection);
makeDefaultValueWidget();
}
});
}
use of com.google.gwt.event.dom.client.BlurHandler in project drools-wb by kiegroup.
the class FactPatternConstraintsPageViewImpl method initialiseValueList.
private void initialiseValueList() {
// Copy value back to model
txtValueList.addValueChangeHandler(new ValueChangeHandler<String>() {
@Override
public void onValueChange(final ValueChangeEvent<String> event) {
final String valueList = txtValueList.getText();
chosenConditionsSelection.setValueList(valueList);
// ValueList is optional, no need to advise of state change
}
});
// Update Default Value widget if necessary
txtValueList.addBlurHandler(new BlurHandler() {
@Override
public void onBlur(final BlurEvent event) {
presenter.assertDefaultValue(availablePatternsSelection, chosenConditionsSelection);
makeDefaultValueWidget();
}
});
}
use of com.google.gwt.event.dom.client.BlurHandler in project drools-wb by kiegroup.
the class ListBoxSingletonDOMElementFactoryTest method checkDOMElementCreationBlurHandler.
@Test
@SuppressWarnings("unchecked")
public void checkDOMElementCreationBlurHandler() {
final InOrder order = inOrder(factory);
final GridBodyCellRenderContext context = mock(GridBodyCellRenderContext.class);
final Callback<ListBoxDOMElement<String, ListBox>> onCreation = mock(Callback.class);
final Callback<ListBoxDOMElement<String, ListBox>> onDisplay = mock(Callback.class);
when(context.getTransform()).thenReturn(mock(Transform.class));
factory.attachDomElement(context, onCreation, onDisplay);
final ArgumentCaptor<BlurHandler> blurHandlerCaptor = ArgumentCaptor.forClass(BlurHandler.class);
verify(listBox).addBlurHandler(blurHandlerCaptor.capture());
final BlurEvent e = mock(BlurEvent.class);
final BlurHandler blurHandler = blurHandlerCaptor.getValue();
blurHandler.onBlur(e);
order.verify(factory).flush();
order.verify(factory).destroyResources();
verify(gridLayer).batch();
verify(gridLienzoPanel).setFocus(eq(true));
}
Aggregations