use of elemental2.dom.HTMLInputElement in project gwt-react-examples by GWTReact.
the class StatefulExample method doChange.
private void doChange(FormEvent event) {
HTMLInputElement e = (HTMLInputElement) event.target;
String val = e.value;
setState(State.make(val));
}
use of elemental2.dom.HTMLInputElement in project gwt-react-examples by GWTReact.
the class TodoItem method componentDidUpdate.
/**
* Safely manipulate the DOM after updating the state when invoking
* `props.onEdit()` in the `handleEdit` method above.
* For more info refer to notes at https://facebook.github.io/react/docs/component-api.html#setstate
* and https://facebook.github.io/react/docs/component-specs.html#updating-componentdidupdate
*/
public void componentDidUpdate(TodoItemProps prevProps, TodoItemProps prevState) {
if (!prevProps.isEditing && props.isEditing) {
HTMLInputElement inputEl = (HTMLInputElement) this.refs.get("editField");
inputEl.focus();
inputEl.select();
}
}
use of elemental2.dom.HTMLInputElement in project gwt-react-examples by GWTReact.
the class StatefulExample method doChange.
private void doChange(FormEvent event) {
HTMLInputElement e = (HTMLInputElement) event.target;
String val = e.value;
setState(State.make(val));
}
use of elemental2.dom.HTMLInputElement in project kie-wb-common by kiegroup.
the class TimePicker method bind.
public void bind(final HTMLInputElement input) {
this.inputBind = input;
final HTMLElement viewElement = view.getElement();
ElementHelper.insertAfter(viewElement, input);
input.onclick = this::inputOnClick;
previousCallback = input.onblur;
input.onblur = this::inputOnBlur;
viewElement.scrollTop = input.scrollTop;
viewElement.scrollLeft = input.scrollLeft;
view.setOnBlur(this::onViewElementBlur);
view.setOnDateChanged(this::onDateChanged);
}
use of elemental2.dom.HTMLInputElement in project kie-wb-common by kiegroup.
the class ReassignmentsEditorWidgetTest method testOneReassignment.
@Test
public void testOneReassignment() {
values.setValues(new ArrayList<>());
values.addValue(new ReassignmentValue());
Assert.assertEquals(1, values.getValues().size());
Assert.assertFalse(values.isEmpty());
reassignmentsEditorWidget.setValue(values);
Assert.assertEquals(1, values.getValues().size());
Assert.assertEquals(1, reassignmentsEditorWidget.getValue().getValues().size());
HTMLInputElement input = getFieldValue(ReassignmentsEditorWidget.class, reassignmentsEditorWidget, "reassignmentsTextBox");
Assert.assertEquals("1 reassignments", input.value);
}
Aggregations