protected void renderDropRegion(int index) {
   String width = currentRegion.isColumnRegion() ? getMaxDropSize() : getMinDropSize();
   String height = currentRegion.isColumnRegion() ? getMinDropSize() : getMaxDropSize();
   setAttribute("width", width);
   setAttribute("height", height);
   setAttribute("index", index);
   setAttribute("regionId", currentRegion.getId());
   renderFragment("panelDropRegion");
 }
 protected void renderRegionStart() {
   // Render region start
   if (userAdmin) {
     setAttribute("regionId", currentRegion.getId());
     setAttribute("numPanels", regionPanels.size());
     setAttribute("regionDescription", currentRegion.getDescription());
     setAttribute("cellspacingPanels", cellspacingPanels);
     renderFragment("regionStartWithTitle");
   } else {
     setAttribute("cellspacingPanels", cellspacingPanels);
     renderFragment("regionStartWithoutTitle");
   }
 }
 public boolean execute(CommandRequest cmdReq) throws Exception {
   if (log.isDebugEnabled()) log.debug("ShowJSPAjaxResponse: " + jsp);
   cmdReq.getResponseObject().setHeader("Content-Encoding", HTTPSettings.lookup().getEncoding());
   cmdReq
       .getResponseObject()
       .setContentType("text/html;charset=" + HTTPSettings.lookup().getEncoding());
   if (region != null) {
     cmdReq.getRequestObject().setAttribute(Parameters.RENDER_IDREGION, region.getId());
   }
   cmdReq
       .getRequestObject()
       .getRequestDispatcher(jsp)
       .include(cmdReq.getRequestObject(), cmdReq.getResponseObject());
   return true;
 }
  @Override
  public void service(HttpServletRequest request, HttpServletResponse response)
      throws FormatterException {
    currentSection = NavigationManager.lookup().getCurrentSection();
    cellspacingPanels = currentSection.getPanelsCellSpacing().intValue();
    String regionID = (String) request.getAttribute(Parameters.RENDER_IDREGION);
    currentRegion = currentSection.getLayout().getRegion(regionID);
    currentSectionRegion = currentSection.getSectionRegion(currentRegion.getId());

    regionPanels = getRegionPanels();

    panelRecommendedWidth =
        regionPanels.isEmpty()
            ? 100
            : (currentRegion.isRowRegion() ? (100 / regionPanels.size()) : 100);

    WorkspaceImpl workspace = NavigationManager.lookup().getCurrentWorkspace();

    if (workspace != null) {
      WorkspacePermission permToCheck =
          WorkspacePermission.newInstance(workspace, WorkspacePermission.ACTION_ADMIN);
      userAdmin = getUserStatus().hasPermission(permToCheck);
    }
  }
 protected void renderRegionEnd() {
   setAttribute("regionId", currentRegion.getId());
   renderFragment("regionEnd");
 }