/** 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()); } }