/** * Returns the value property of the input element that backs this widget. * This is the value that will be associated with the CheckBox name and * submitted to the server if a {@link FormPanel} that holds it is submitted * and the box is checked. * <p> * Don't confuse this with {@link #getValue}, which returns true or false if * the widget is checked. */ public String getFormValue() { return inputElem.getValue(); }
/** * Gets the value of the hidden field. * * @return the value */ public String getValue() { return getInputElement().getValue(); }
/** * Gets the filename selected by the user. This property has no mutator, as * browser security restrictions preclude setting it. * * @return the widget's filename */ public String getFilename() { return getInputElement().getValue(); }
/** * Returns the value property of the input element that backs this widget. * This is the value that will be associated with the check box name and * submitted to the server if a {@link FormPanel} that holds it is submitted * and the box is checked. * <p> * Don't confuse this with {@link #getValue}, which returns true or false if * the widget is checked. */ public String getFormValue() { return getInputElement().getValue(); }
/** * Update the view data based on the current value. * * @param parent the parent element * @param viewData the {@link ViewData} object to update * @param isEditing true if in edit mode * @return the new value */ private String updateViewData(Element parent, ViewData viewData, boolean isEditing) { InputElement input = (InputElement) parent.getFirstChild(); String value = input.getValue(); viewData.setText(value); viewData.setEditing(isEditing); return value; } }
@Override public void onBrowserEvent(Context context, Element parent, String value, NativeEvent event, ValueUpdater<String> valueUpdater) { super.onBrowserEvent(context, parent, value, event, valueUpdater); // Ignore events that don't target the input. InputElement input = getInputElement(parent); Element target = event.getEventTarget().cast(); if (!input.isOrHasChild(target)) { return; } String eventType = event.getType(); Object key = context.getKey(); if (BrowserEvents.CHANGE.equals(eventType)) { finishEditing(parent, value, key, valueUpdater); } else if (BrowserEvents.KEYUP.equals(eventType)) { // Record keys as they are typed. ViewData vd = getViewData(key); if (vd == null) { vd = new ViewData(value); setViewData(key, vd); } vd.setCurrentValue(input.getValue()); } }
@Override protected void finishEditing(Element parent, String value, Object key, ValueUpdater<String> valueUpdater) { String newValue = getInputElement(parent).getValue(); // Get the view data. ViewData vd = getViewData(key); if (vd == null) { vd = new ViewData(value); setViewData(key, vd); } vd.setCurrentValue(newValue); // Fire the value updater if the value has changed. if (valueUpdater != null && !vd.getCurrentValue().equals(vd.getLastValue())) { vd.setLastValue(newValue); valueUpdater.update(newValue); } // Blur the element. super.finishEditing(parent, newValue, key, valueUpdater); }
/** * Returns the value property of the input element that backs this widget. * This is the value that will be associated with the CheckBox name and * submitted to the server if a {@link FormPanel} that holds it is submitted * and the box is checked. * <p> * Don't confuse this with {@link #getValue}, which returns true or false if * the widget is checked. */ public String getFormValue() { return inputElem.getValue(); }
/** * Returns the value property of the input element that backs this widget. * This is the value that will be associated with the CheckBox name and * submitted to the server if a {@link FormPanel} that holds it is submitted * and the box is checked. * <p> * Don't confuse this with {@link #getValue}, which returns true or false if * the widget is checked. */ public String getFormValue() { return inputElem.getValue(); }
/** * get the form value of the input element * * @return the form value */ public String getFormValue() { return inputRadio.getValue(); }
/** * get the form value of the input element * * @return the form value */ public String getFormValue() { return inputRadio.getValue(); }
/** * Returns the value property of the input element that backs this widget. * This is the value that will be associated with the CheckBox name and * submitted to the server if a {@link FormPanel} that holds it is submitted * and the box is checked. * <p> * Don't confuse this with {@link #getValue}, which returns true or false if * the widget is checked. */ public String getFormValue() { return inputElem.getValue(); }
/** * {@inheritDoc} */ @Override public String getValue() { return asInputElement().getValue(); }
/** * Gets the filename selected by the user. This property has no mutator, as * browser security restrictions preclude setting it. * * @return the widget's filename */ public String getFilename() { return getInputElement().getValue(); }
/** * Gets the filename selected by the user. This property has no mutator, as * browser security restrictions preclude setting it. * * @return the widget's filename */ public String getFilename() { return getInputElement().getValue(); }
/** * Gets the value of the hidden field. * * @return the value */ public String getValue() { return getInputElement().getValue(); }
/** * Returns the value property of the input element that backs this widget. * This is the value that will be associated with the check box name and * submitted to the server if a {@link FormPanel} that holds it is submitted * and the box is checked. * <p> * Don't confuse this with {@link #getValue}, which returns true or false if * the widget is checked. */ public String getFormValue() { return getInputElement().getValue(); }
/** * Gets the value of the hidden field. * * @return the value */ public String getValue() { return getInputElement().getValue(); }
/** * {@inheritDoc} */ @Override public String getText() { return asInputElement().getValue(); }
@EventHandler("inputSearch") public void onInputSearchKeyDownEvent(KeyDownEvent event) { if (event.getNativeKeyCode() == KeyCodes.KEY_ENTER) { presenter.onSearchedEvent(inputSearch.getValue()); } }