Foros de discusión

To Work with Hooks

thumbnail
Debasis Padhi, modificado hace 12 años.

To Work with Hooks

Junior Member Mensajes: 54 Fecha de incorporación: 23/03/12 Mensajes recientes
To override the out of the box features of Liferay we are use the Hook plugins
for example
  • to change in the Portal Properties,
  • Attach custom listners to Events
  • Jsps
______________________
Now create a new hook inside the plugin
create the exact folder structure for the source-file which is going to be changed or modified
example if we want to change in my jsp page then we have to create a folder structure of my .jsp file
docroot/META-INF/custom_jsps/html/portlet/myJsp

then do something change in your docroot/WEB-INF/liferay-hook.xml

<hook>
< !--for change in the portal properties -->
<portal-properties>portal.properties</portal-properties>

< !--for change in the Events -->
<event>
<event-class>com.project.object.ServicePreAction</event-class>
<event-type>servlet.service.events.pre.</event-type>
</event>

< !--for change in the Listner -->
<model-listener>
<model-listener-class>com.project.MyListner</model-listener-class>
<model-name>com.liferay.portlet.model.MyModel</model-name>
</model-listener>

< !--for change in the jsp file -->
<custom-jsp-dir>/META-INF/custom_jsps</custom-jsp-dir>

</hook>
thumbnail
Hitoshi Ozawa, modificado hace 12 años.

RE: To Work with Hooks

Liferay Legend Mensajes: 7942 Fecha de incorporación: 24/03/10 Mensajes recientes
If you just want to share information you know, it may be better to create a wiki page instead of posting to a thread.emoticon
thumbnail
Debasis Padhi, modificado hace 11 años.

RE: To Work with Hooks

Junior Member Mensajes: 54 Fecha de incorporación: 23/03/12 Mensajes recientes
Thank's dear One of my friend ask me about the above so I Transfer this information to him..
unfortunately he did not a logged-in user
thumbnail
Hitoshi Ozawa, modificado hace 11 años.

RE: To Work with Hooks

Liferay Legend Mensajes: 7942 Fecha de incorporación: 24/03/10 Mensajes recientes
Is there a question in the first post? It's very to find what the question is. Can you restate the question in different terms?
thumbnail
Debasis Padhi, modificado hace 11 años.

RE: To Work with Hooks

Junior Member Mensajes: 54 Fecha de incorporación: 23/03/12 Mensajes recientes
Sory Hitoshi Ozawa
for using forums as my communication
Due to I'm new in liferay
I don't know how to create wikipage in liferay fourms
thumbnail
Hitoshi Ozawa, modificado hace 11 años.

RE: To Work with Hooks

Liferay Legend Mensajes: 7942 Fecha de incorporación: 24/03/10 Mensajes recientes
Do you want to share your information with everybody or just to somebody you know?
Liferay wiki pages are to be used to share information about liferay. Once it's written, it shouldn't be deleted.
thumbnail
Debasis Padhi, modificado hace 11 años.

RE: To Work with Hooks

Junior Member Mensajes: 54 Fecha de incorporación: 23/03/12 Mensajes recientes
For the time being I want to share My knowledge with my followers
in my team who are out of station
thumbnail
Hitoshi Ozawa, modificado hace 11 años.

RE: To Work with Hooks

Liferay Legend Mensajes: 7942 Fecha de incorporación: 24/03/10 Mensajes recientes
For the time being I want to share My knowledge with my followers
in my team who are out of station


Then, you can write on your wall instead of in the forum. Just click on "Go to My Profile" and enter your content in the "Wall" and click "Post".
thumbnail
David H Nebinger, modificado hace 11 años.

RE: To Work with Hooks

Liferay Legend Mensajes: 14916 Fecha de incorporación: 2/09/06 Mensajes recientes
Debasis Padhi:
Thank's dear One of my friend ask me about the above so I Transfer this information to him..
unfortunately he did not a logged-in user


Thanks for using the forum as your personal communication platform. Too bad there aren't more appropriate mechanisms like email, pastebin, ...
thumbnail
Hitoshi Ozawa, modificado hace 11 años.

RE: To Work with Hooks

Liferay Legend Mensajes: 7942 Fecha de incorporación: 24/03/10 Mensajes recientes
Thanks for using the forum as your personal communication platform. Too bad there aren't more appropriate mechanisms like email, pastebin, ...


Thanks David. I now understand his reply. :-)