Foren

Liferay 6.2 Hook Adapter

Koffi AGHOSTO, geändert vor 7 Jahren.

Liferay 6.2 Hook Adapter

Junior Member Beiträge: 67 Beitrittsdatum: 27.05.14 Neueste Beiträge
Hello everybody,

I have a serious problem with Liferay 6.2 Hook Adapter. I'am using this link : https://dev.liferay.com/develop/tutorials/-/knowledge_base/6-2/customizing-sites-and-site-templates-with-application-adapters

When I choose the hook in the Application adapter for my liferay site in the control panel, I don't see my modification. I have overwritten only one JSP : asset_publisher/add_asset.jspf.
in my hook adapter

I see very well my hook file deployed successfully in the server by creating me the file add_asset.lcd-portal-hook in the ROOT.war but I don't have the expected result in the view.

My Environment configuration : Liferay 6.2 EE SP11 - MySQL - JBOSS EAP Server 6.2

Please, if somebody can help me, thank in Advanced.

Koffi
thumbnail
Olaf Kock, geändert vor 7 Jahren.

RE: Liferay 6.2 Hook Adapter

Liferay Legend Beiträge: 6403 Beitrittsdatum: 23.09.08 Neueste Beiträge
If you build an application adapter, you'll need to choose this in the site you want it to be enabled (see site properties, where you can choose the application adapter). If you want to see your modification everywhere, just make it a regular JSP hook instead of an Application Adapter. The difference is a single boolean value in liferay-hook.xml
Koffi AGHOSTO, geändert vor 7 Jahren.

RE: Liferay 6.2 Hook Adapter

Junior Member Beiträge: 67 Beitrittsdatum: 27.05.14 Neueste Beiträge
Hello Olaf,

First of all, I want to thank you for your answer. I enabled it by choosing my hook adapter in site configuration in the control panel,
but unfortunately, I don't see any of my JSP modification when I 'am on my site. I override only one JSP
which is "asset_publisher/add_asset.jspf".
I also add the property <custom-jsp-global>false</custom-jsp-global> in the liferay-hook.xml file.

My question is : Must I add or modified something in the portal-ext.properties before enabled it in the control panel ?

When I go to my JBoss Server, I see my hook adapter deployed successfully and I see the override JSP in the ROOT source.

Thank you in Advanced,

Koffi
Koffi AGHOSTO, geändert vor 7 Jahren.

RE: Liferay 6.2 Hook Adapter (Antwort)

Junior Member Beiträge: 67 Beitrittsdatum: 27.05.14 Neueste Beiträge
Hello everybody,

I find solution of my problem. I want to share it maybe it will help somebody.

If you created adapter hook, not forget that for each 'jspf' file, you must override the '.jsp' file which call each of them to
modify the filename because the filename changed with adapter hook.

See this posts which help me a lot : https://web.liferay.com/fr/community/forums/-/message_boards/message/52753196


Thank you very much!