Foren

Liferay 7 inserire custom portlet ad un Theme

thumbnail
Massimo Bevilacqua, geändert vor 6 Jahren.

Liferay 7 inserire custom portlet ad un Theme

Regular Member Beiträge: 210 Beitrittsdatum: 27.12.16 Neueste Beiträge
Ciao,
ho creato una portlet e se eseguo il deploy sul server funziona perfettamente.
Ora ho bisogno di inserirla all'interno di una theme personalizzato che ho creato,; ho provato questo:


   <#assign VOID = freeMarkerPortletPreferences.setValue("portletSetupPortletDecoratorId", "barebone") />
                                      <@liferay_portlet["runtime"]
                                    portletProviderAction=portletProviderAction.VIEW
                                    defaultPreferences="${freeMarkerPortletPreferences}"
                                    portletName="com_test_myPackage_MyPortletClassName" 
   />
  ${freeMarkerPortletPreferences.reset()}


Ma in pagina non vedo nulla e non ho errori.
Ho controllato in
Configuration -> Component -> MyPortlet -> Plugin ID
E ho usato questo ID come portletName (che é lo stesso che ho inserito nelle properties della mia classe java)
"javax.portlet.name=com_test_myPackage_MyPortletClassName"

Se provo ad usare questo:
portletName="com_liferay_site_navigation_language_web_portlet_SiteNavigationLanguagePortlet"

Funziona e riesco a vedere il selettore in pagina

Ho anche provato ad usare portletProviderClassName invece di portletName ma ricevo questo
"An app that can VIEW com_test_myPackage_MyPortletClassName belongs here. Please contact the portal administrator or install such an app from the Liferay Marketplace."

Qualcuno sa come risolvere?
thumbnail
Andrew Jardine, geändert vor 6 Jahren.

RE: Liferay 7 inserire custom portlet ad un Theme (Antwort)

Liferay Legend Beiträge: 2416 Beitrittsdatum: 22.12.10 Neueste Beiträge
Just want to link this one to the other (english) thread in case the answer is found there: https://web.liferay.com/community/forums/-/message_boards/message/92773367