@Override public void setValue(final String value, final boolean fireEvents) { if (!isValidValue(value, false)) { final String validValue = makeValidValue(value); super.setValue(validValue, fireEvents); ValueChangeEvent.fire(AbstractRestrictedEntryTextBox.this, validValue); } else { super.setValue(value, fireEvents); } }
@Override public NameEditBoxWidget.View show(final String name) { nameBox.setValue(name); nameBox.setText(name); mainPanel.setVisible(true); return this; }
public void init(String value, final Listener listener) { this.listener = listener; if (value != null) input.setValue(value); input.addValueChangeHandler( new ValueChangeHandler<String>() { public void onValueChange(ValueChangeEvent<String> event) { listener.valueChanged(event.getValue()); } }); }
/** {@inheritDoc} */ @Override public void setValue(final Date value, final boolean fireEvents) { errorHandlerMixin.clearErrors(); textBox.setValue(value != null ? dateTimeFormat.format(value) : null); update(textBox.getElement()); if (fireEvents) { ValueChangeEvent.fire(DatePickerBase.this, value); } }
private void editCustomValue(String value) { comboBox.view.textBoxGotFocus(); textBox.setValue(value); comboBox.view.textBoxLostFocus(); comboBox.view.listBoxGotFocus(); assertEquals(listBox.isVisible(), true); assertEquals(textBox.isVisible(), false); String listBoxValue = this.quoteStringValues ? StringUtils.createQuotedConstant(value) : value; verify(modelPresenter).setTextBoxModelValue(textBox, listBoxValue); assertEquals(comboBox.getValue(), listBoxValue); }
@Override public void setName(String name) { nameBox.setValue(name); }