code: @Override
  	protected void preparePaintComponent(final Request request) {
  		super.preparePaintComponent(request);
  		WComponent content = getContent();
  
  		if (content != null) {
  			switch (getMode()) {
  				case EAGER: {
  					// Will always be visible
  					content.setVisible(true);
  					AjaxHelper.registerContainer(getId(), getId() + "-content", content.getId());
  					break;
  				}
  				case LAZY: {
  					content.setVisible(isOpen());
  					if (!isOpen()) {
  						AjaxHelper.registerContainer(getId(), getId() + "-content", content.getId());
  					}
  
  					break;
  				}
  				case DYNAMIC: {
  					content.setVisible(isOpen());
  					AjaxHelper.registerContainer(getId(), getId() + "-content", content.getId());
  					break;
  				}
  				case SERVER: {
  					content.setVisible(isOpen());
  					break;
  				}
  				case CLIENT: {
  					// Will always be visible
  					content.setVisible(true);
  					break;
  				}
  
  				default:
  					// do nothing.
  					break;
  			}
  		}
  	}
docs: Override preparePaintComponent in order to correct the visibility of the tab's content before it is rendered.
  
  @param request the request being responded to.