public void copyFrom(PortletDisplay master) {
   _access = master.isAccess();
   _active = master.isActive();
   _columnId = master.getColumnId();
   _content = master.getContent();
   _customCSSClassName = master.getCustomCSSClassName();
   _description = master.getDescription();
   _id = master.getId();
   _instanceId = master.getInstanceId();
   _modeAbout = master.isModeAbout();
   _modeConfig = master.isModeConfig();
   _modeEdit = master.isModeEdit();
   _modeEditDefaults = master.isModeEditDefaults();
   _modeEditGuest = master.isModeEditGuest();
   _modeHelp = master.isModeHelp();
   _modePreview = master.isModePreview();
   _modePrint = master.isModePrint();
   _namespace = master.getNamespace();
   _portletName = master.getPortletName();
   _portletSetup = master.getPortletSetup();
   _resourcePK = master.getResourcePK();
   _restoreCurrentView = master.isRestoreCurrentView();
   _rootPortletId = master.getRootPortletId();
   _showBackIcon = master.isShowBackIcon();
   _showCloseIcon = master.isShowCloseIcon();
   _showConfigurationIcon = master.isShowConfigurationIcon();
   _showEditDefaultsIcon = master.isShowEditDefaultsIcon();
   _showEditGuestIcon = master.isShowEditGuestIcon();
   _showEditIcon = master.isShowEditIcon();
   _showHelpIcon = master.isShowHelpIcon();
   _showMaxIcon = master.isShowMaxIcon();
   _showMinIcon = master.isShowMinIcon();
   _showMoveIcon = master.isShowMoveIcon();
   _showPortletCssIcon = master.isShowPortletCssIcon();
   _showPortletIcon = master.isShowPortletIcon();
   _showPrintIcon = master.isShowPrintIcon();
   _showRefreshIcon = master.isShowRefreshIcon();
   _stateExclusive = master.isStateExclusive();
   _stateMax = master.isStateMax();
   _stateMin = master.isStateMin();
   _stateNormal = master.isStateNormal();
   _statePopUp = master.isStatePopUp();
   _themeDisplay = master.getThemeDisplay();
   _title = master.getTitle();
   _urlBack = master.getURLBack();
   _urlClose = master.getURLClose();
   _urlConfiguration = master.getURLConfiguration();
   _urlEdit = master.getURLEdit();
   _urlEditDefaults = master.getURLEditDefaults();
   _urlExportImport = master.getURLExportImport();
   _urlHelp = master.getURLHelp();
   _urlMax = master.getURLMax();
   _urlMin = master.getURLMin();
   _urlPortlet = master.getURLPortlet();
   _urlPortletCss = master.getURLPortletCss();
   _urlPrint = master.getURLPrint();
   _urlRefresh = master.getURLRefresh();
   _webDAVEnabled = master.isWebDAVEnabled();
 }
  @Override
  public String getOnClick() {
    PortletDisplay portletDisplay = themeDisplay.getPortletDisplay();

    StringBuilder sb = new StringBuilder(11);

    sb.append("Liferay.Portlet.openWindow('#p_p_id_");
    sb.append(portletDisplay.getId());
    sb.append("_', '");
    sb.append(portletDisplay.getId());
    sb.append("', '");
    sb.append(HtmlUtil.escapeJS(portletDisplay.getURLConfiguration()));
    sb.append("', '");
    sb.append(portletDisplay.getNamespace());
    sb.append("', '");
    sb.append(LanguageUtil.get(themeDisplay.getLocale(), "configuration"));
    sb.append("'); return false;");

    return sb.toString();
  }
示例#3
0
  @Override
  public int doStartTag() {
    HttpServletRequest request = (HttpServletRequest) pageContext.getRequest();

    ThemeDisplay themeDisplay = (ThemeDisplay) request.getAttribute(WebKeys.THEME_DISPLAY);

    if (_direction == null) {
      if (_align.equals("left")) {
        _direction = "right";
      } else {
        _direction = "left";
      }
    }

    if (_icon == null) {
      _icon = themeDisplay.getPathThemeImages() + "/common/tool.png";
    }

    if (Validator.isNull(_id)) {
      String randomKey = PortalUtil.generateRandomKey(request, IconMenuTag.class.getName());

      _id = randomKey + StringPool.UNDERLINE + "menu";
    } else {
      PortletDisplay portletDisplay = themeDisplay.getPortletDisplay();

      String namespace = portletDisplay.getNamespace();

      _id = namespace.concat(_id);
    }

    request.setAttribute("liferay-ui:icon-menu:icon-count", new IntegerWrapper());
    request.setAttribute(
        "liferay-ui:icon-menu:showWhenSingleIcon", String.valueOf(_showWhenSingleIcon));

    return EVAL_BODY_BUFFERED;
  }