Examples of InputElement


Examples of com.google.gwt.dom.client.InputElement

    private InputElement getInputElement(Element parent) {
      // We need to navigate down to our input element.
      TableElement table = parent.getFirstChildElement().cast();
      TableRowElement tr = table.getRows().getItem(0);
      TableCellElement td = tr.getCells().getItem(0);
      InputElement input = td.getFirstChildElement().cast();
      return input;
    }
View Full Code Here

Examples of com.google.gwt.dom.client.InputElement

    /**
     * Update the favorites list based on the state of the input element.
     */
    private void updateFavorites(Element parent, Contact value) {
      // Get the input element.
      InputElement input = getInputElement(parent);

      // Update the favorites based on the checked state.
      if (input.isChecked()) {
        favorites.add(value);
      } else {
        favorites.remove(value);
      }
    }
View Full Code Here

Examples of com.google.gwt.dom.client.InputElement

    Changeable c2 = new Changeable();
    r2.addValueChangeHandler(c2);

    // Brittle, but there's no public access
    InputElement r1Radio = getRadioElement(r1);
    InputElement r2Radio = getRadioElement(r2);

    doClick(r1Radio);
    assertEquals(null, c1.received);
    assertEquals(null, c2.received);
View Full Code Here

Examples of com.google.gwt.dom.client.InputElement

        radioButton).getNextSiblingElement()));
    return r1Label;
  }

  private InputElement getRadioElement(RadioButton radioButton) {
    InputElement r1Radio = InputElement.as(Element.as(radioButton.getElement().getFirstChild()));
    return r1Radio;
  }
View Full Code Here

Examples of com.google.gwt.dom.client.InputElement

    cb.setFormValue("valuable");
    assertEquals("valuable", cb.getFormValue());
  }

  public void testConstructorInputElement() {
    InputElement elm = DOM.createInputCheck().cast();
    CheckBox box = new CheckBox(elm.<Element> cast());
    assertFalse(box.getValue());
    elm.setDefaultChecked(true);
    assertTrue(box.getValue());
  }
View Full Code Here

Examples of com.google.gwt.dom.client.InputElement

  /**
   * Tests that detaching and attaching a CheckBox widget retains the checked
   * state of the element. This is known to be tricky on IE.
   */
  public void testDetachment() {
    InputElement elm = DOM.createInputCheck().cast();
    CheckBox box = new CheckBox(elm.<Element> cast());
    RootPanel.get().add(box);
    elm.setChecked(true);
    RootPanel.get().remove(box);
    RootPanel.get().add(box);
    assertTrue(elm.isChecked());
  }
View Full Code Here

Examples of elemental.html.InputElement

    addClassesToElement(elem, classNames);
    return elem;
  }

  public static InputElement createInputElement(String... classNames) {
    InputElement elem = getDocument().createInputElement();
    addClassesToElement(elem, classNames);
    return elem;
  }
View Full Code Here

Examples of elemental.html.InputElement

    addClassesToElement(elem, classNames);
    return elem;
  }

  public static InputElement createInputTextElement(String... classNames) {
    InputElement elem = getDocument().createInputElement();
    addClassesToElement(elem, classNames);
    elem.setType("text");
    return elem;
  }
View Full Code Here

Examples of elemental.html.InputElement

    String oldLabel = element.getTextContent();
    callback.onBeforeMutation(node);

    // Make a temporary text input box to grab user input, and place it inside
    // the label element.
    InputElement input = Elements.createInputElement();
    if (css != null) {
      input.setClassName(css.nodeNameInput());
    }
    input.setType("text");
    input.setValue(oldLabel);

    // Wipe the content from the element.
    element.setTextContent("");

    // Attach the temporary input box.
    element.appendChild(input);
    input.focus();
    input.select();

    // If we hit enter, commit the action.
    input.addEventListener(Event.KEYUP, keyListener, false);

    // If we lose focus, commit the action.
    input.addEventListener(Event.BLUR, blurListener, false);

    state = new State<D>(node, callback, input, oldLabel);
  }
View Full Code Here

Examples of org.jboss.seam.faces.validation.InputElement

            String id = ip.getMember().getName();

            UIInput component = findComponent(id, id);
            components.put(id, component);

            InputElement inputElementResult = new InputElement(id, component.getClientId(context), component);

            if (component.isLocalValueSet()) {
                inputElementResult.setValue(component.getValue());
            } else {
                Converter converter = component.getConverter();
                if (converter != null) {
                    Object value = converter.getAsObject(context, component, (String) component.getSubmittedValue());
                    inputElementResult.setValue(value);
                } else {
                    inputElementResult.setValue(component.getSubmittedValue());
                }
            }
            return inputElementResult;
        }
        return null;
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.