code: @Override
  	public void doRender(final WComponent component, final WebXmlRenderContext renderContext) {
  		WPanel panel = (WPanel) component;
  		XmlStringBuilder xml = renderContext.getWriter();
  		WButton submitButton = panel.getDefaultSubmitButton();
  		String submitId = submitButton == null ? null : submitButton.getId();
  		String titleText = panel.getTitleText();
  
  		boolean renderChildren = isRenderContent(panel);
  
  		xml.appendTagOpen("ui:panel");
  		xml.appendAttribute("id", component.getId());
  		xml.appendOptionalAttribute("class", component.getHtmlClass());
  		xml.appendOptionalAttribute("track", component.isTracking(), "true");
  		if (PanelMode.LAZY.equals(panel.getMode())) {
  			xml.appendOptionalAttribute("hidden", !renderChildren, "true");
  		} else {
  			xml.appendOptionalAttribute("hidden", component.isHidden(), "true");
  		}
  		xml.appendOptionalAttribute("buttonId", submitId);
  		xml.appendOptionalAttribute("title", titleText);
  		xml.appendOptionalAttribute("accessKey", Util.upperCase(panel.getAccessKeyAsString()));
  		xml.appendOptionalAttribute("type", getPanelType(panel));
  		xml.appendOptionalAttribute("mode", getPanelMode(panel));
  
  		xml.appendClose();
  
  		// Render margin
  		MarginRendererUtil.renderMargin(panel, renderContext);
  
  		if (renderChildren) {
  			renderChildren(panel, renderContext);
  		} else {
  			// Content will be loaded via AJAX
  			xml.append("<ui:content/>");
  		}
  
  		xml.appendEndTag("ui:panel");
  	}
docs: Paints the given container.
  
  @param component the container to paint.
  @param renderContext the RenderContext to paint to.