掲示板

Liferay 6.2 Hook Adapter

7年前 に Koffi AGHOSTO によって更新されました。

Liferay 6.2 Hook Adapter

Junior Member 投稿: 67 参加年月日: 14/05/27 最新の投稿
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
7年前 に Olaf Kock によって更新されました。

RE: Liferay 6.2 Hook Adapter

Liferay Legend 投稿: 6403 参加年月日: 08/09/23 最新の投稿
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
7年前 に Koffi AGHOSTO によって更新されました。

RE: Liferay 6.2 Hook Adapter

Junior Member 投稿: 67 参加年月日: 14/05/27 最新の投稿
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
7年前 に Koffi AGHOSTO によって更新されました。

RE: Liferay 6.2 Hook Adapter (回答)

Junior Member 投稿: 67 参加年月日: 14/05/27 最新の投稿
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!