示例#1
0
  public void processRender(WebuiRequestContext context) throws Exception {
    UIJCRExplorerPortlet uiPortlet = getAncestorOfType(UIJCRExplorerPortlet.class);
    UIActionBar uiActionBar = findFirstComponentOfType(UIActionBar.class);
    uiActionBar.setRendered(uiPortlet.isShowActionBar());
    UISelectDocumentTemplateTitle uiTemplateTitle =
        findFirstComponentOfType(UISelectDocumentTemplateTitle.class);
    boolean isUITemplateTitleRendered = isUISelectDocumentTemplateTitleRendered();
    uiTemplateTitle.setRendered(isUITemplateTitleRendered);

    super.processRender(context);
  }
 public void processRender(UIContainer uicomponent, WebuiRequestContext context) throws Exception {
   UIWorkingArea uiWorkingArea = uicomponent.getAncestorOfType(UIWorkingArea.class);
   UIActionBar uiActionBar = uiWorkingArea.getChild(UIActionBar.class);
   boolean isUISelectDocumentTemplateTitleRendered =
       uiWorkingArea.isUISelectDocumentTemplateTitleRendered();
   context
       .getWriter()
       .append("<div class=\"")
       .append(uicomponent.getId())
       .append(
           isUISelectDocumentTemplateTitleRendered || uiActionBar.isRendered()
               ? StringUtils.EMPTY
               : " uiDocumentWorkspaceBox")
       .append("\" id=\"")
       .append(uicomponent.getId())
       .append("\">");
   uicomponent.renderChildren(context);
   context.getWriter().append("</div>");
 }