Uploaded image for project: 'PUBLIC - Liferay Portal Community Edition'
  1. PUBLIC - Liferay Portal Community Edition
  2. LPS-33607

MVCPortlet can not get localized portlet title (portlet-topper > h1) in control panel

    Details

      Description

      reproduction:
      1 add a MCVporlet to control panel
      2 the portlet need a localized title like javax.title.portletId=???
      3 the <h1> title can not be localized.
      detail
      in portlet.jsp, the logic to get portlet title:
      // Portlet title
      String portletTitle = PortletConfigurationUtil.getPortletTitle(portletSetup, themeDisplay.getLanguageId());
      if (portletDisplay.isAccess() && portletDisplay.isActive() && (portletTitle == null)) {
      portletTitle = HtmlUtil.extractText(renderResponseImpl.getTitle());
      }
      if (portletTitle == null) {
      portletTitle = PortalUtil.getPortletTitle(portlet, application, locale);
      }
      portletDisplay.setTitle(portletTitle);

      because MVCportlet doesn't implement getTitle() method like liferayPortlet.
      and renderResponseImpl.getTitle() load before localed title.
      so it always get the title from portlet.xml => <portlet-info>.

        Attachments

          Activity

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Days since last comment:
                6 years, 26 weeks, 5 days ago

                Packages

                Version Package
                6.1.20 EE GA2