code: @Override
  	protected void preparePaintComponent(final Request request) {
  		super.preparePaintComponent(request);
  
  		if (content != null) {
  			switch (getMode()) {
  				case EAGER: {
  					// Always visible
  					content.setVisible(true);
  					AjaxHelper.registerContainer(getId(), getId() + "-content", content.getId());
  					break;
  				}
  				case LAZY:
  					content.setVisible(!isCollapsed());
  
  					if (isCollapsed()) {
  						AjaxHelper.registerContainer(getId(), getId() + "-content", content.getId());
  					}
  
  					break;
  
  				case DYNAMIC: {
  					content.setVisible(!isCollapsed());
  					AjaxHelper.registerContainer(getId(), getId() + "-content", content.getId());
  					break;
  				}
  				case SERVER: {
  					content.setVisible(!isCollapsed());
  					break;
  				}
  				case CLIENT: {
  					// Will always be visible
  					content.setVisible(true);
  					break;
  				}
  				default: {
  					throw new SystemException("Unknown mode: " + getMode());
  				}
  			}
  		}
  	}
docs: Override preparePaintComponent in order to toggle the visibility of the content, or to register the appropriate
  ajax operation.
  
  @param request the request being responded to