1

My problem is to recuperate the list of the portlet created in liferay 6.2 without display the default portlet in liferay 6.2. i try this code <% boolean includeSystemPortlets = false;

                        List<Portlet> portlets = PortletLocalServiceUtil.getPortlets(company.getCompanyId(), includeSystemPortlets, false);

portlets = ListUtil.sort(portlets, new PortletTitleComparator(application, locale));

                        for (Portlet curPortlet : portlets) {
                            if (Validator.isNull(curPortlet.getPortletId()) || hiddenPortletIds.contains(curPortlet.getPortletId())) {
                                continue;
                            }

                            editPermissionsURL.setParameter("portletResource", curPortlet.getPortletId());
                        %>

but it display all the portlet created and the default portlet

i want to change this code : " List portlets = PortletLocalServiceUtil.getPortlets(company.getCompanyId(), includeSystemPortlets, false); " because it display all the portlet

  • please help my problem is to display only the portlet created without the default portlets of liferay – jdaida sedki Jun 23 '15 at 09:57
  • i resolve this problem by this code : <% boolean includeSystemPortlets = false; List portlets = PortletLocalServiceUtil.getPortlets(company.getCompanyId(), includeSystemPortlets, true); List portletsToShow = new ArrayList(); for (Portlet curPortlet : portlets) { if(curPortlet.getRootPortletId().contains("_WAR_nmshtaportlet")) { portletsToShow.add(curPortlet); } } portlets = portletsToShow; – jdaida sedki Jun 23 '15 at 11:33

0 Answers0