code: @Override
  	protected void preparePaintComponent(final Request request) {
  		if (getAttribute(ERROR_KEY) == null) {
  			try {
  				for (int i = 0; i < shim.getChildCount(); i++) {
  					shim.getChildAt(i).preparePaint(request);
  				}
  			} catch (final Exception e) {
  				if (isAjaxOrTargetedRequest(request)) {
  					throw new SystemException(e.getMessage(), e);
  				} else {
  					setAttribute(ERROR_KEY, e);
  				}
  			}
  		}
  	}
docs: <p>
  Override preparePaintComponent to provide some protection against bad code when examples are being developed,
  resulting in invalid XML.</p>
  
  <p>
  Real applications should not emit HTML directly.</p>
  
  @param request the request being responded to.