Beispiel #1
0
 private El getGroup(String groupName) {
   El g = el().selectNode("#" + getId() + "-" + groupName);
   if (g == null) {
     g = new El(DOM.createDiv());
     g.makePositionable(true);
     g.dom.setAttribute("role", "group");
     g.addStyleName(HideMode.OFFSETS.value());
     g.addStyleName("x-menu-radio-group");
     g.setId(getId() + "-" + groupName);
     el().appendChild(g.dom);
   }
   return g;
 }
  /** Creates the underlying file input. */
  private void createFileInput() {

    if (file != null) {
      el().removeChild(file.dom);
    }

    final InputElement fileElement = Document.get().createFileInputElement();

    file = new El((Element) fileElement.cast());
    file.addEventsSunk(Event.ONCHANGE | Event.FOCUSEVENTS);
    file.setId(XDOM.getUniqueId());
    file.addStyleName("x-form-file");
    file.setTabIndex(-1);
    getFileInput().setName(name);
    getFileInput().setAccept(accept);
    file.insertInto(getElement(), 1);
    if (file != null) {
      file.setEnabled(isEnabled());
    }
  }