code: @Override
  	public void doRender(final WComponent component, final WebXmlRenderContext renderContext) {
  		WFileWidget fileWidget = (WFileWidget) component;
  		XmlStringBuilder xml = renderContext.getWriter();
  		boolean readOnly = fileWidget.isReadOnly();
  
  		xml.appendTagOpen(TAG_NAME);
  		xml.appendAttribute("id", component.getId());
  		xml.appendOptionalAttribute("class", component.getHtmlClass());
  		xml.appendOptionalAttribute("track", component.isTracking(), "true");
  		xml.appendOptionalAttribute("hidden", component.isHidden(), "true");
  		if (readOnly) {
  			xml.appendAttribute("readOnly", "true");
  			xml.appendEnd();
  			return;
  		}
  		xml.appendOptionalAttribute("disabled", fileWidget.isDisabled(), "true");
  		xml.appendOptionalAttribute("required", fileWidget.isMandatory(), "true");
  		xml.appendOptionalAttribute("toolTip", fileWidget.getToolTip());
  		xml.appendOptionalAttribute("accessibleText", fileWidget.getAccessibleText());
  		xml.appendOptionalAttribute("acceptedMimeTypes", typesToString(fileWidget.getFileTypes()));
  		long maxFileSize = fileWidget.getMaxFileSize();
  		xml.appendOptionalAttribute("maxFileSize", maxFileSize > 0, maxFileSize);
  
  		List<Diagnostic> diags = fileWidget.getDiagnostics(Diagnostic.ERROR);
  		if (diags == null || diags.isEmpty()) {
  			xml.appendEnd();
  			return;
  		}
  		xml.appendClose();
  		DiagnosticRenderUtil.renderDiagnostics(fileWidget, renderContext);
  		xml.appendEndTag(TAG_NAME);
  	}
docs: Paints the given WFileWidget.
  
  @param component the WFileWidget to paint.
  @param renderContext the RenderContext to paint to.