Vista combinada Visión Plana Vista de árbol
Discusiones [ Anterior | Siguiente ]
toggle
Debasis Padhi
To Work with Hooks
7 de mayo de 2012 3:15
Respuesta

Debasis Padhi

Ranking: Junior Member

Mensajes: 55

Fecha de incorporación: 23 de marzo de 2012

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>
Hitoshi Ozawa
RE: To Work with Hooks
12 de abril de 2012 17:26
Respuesta

Hitoshi Ozawa

Ranking: Liferay Legend

Mensajes: 7954

Fecha de incorporación: 23 de marzo de 2010

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
Debasis Padhi
RE: To Work with Hooks
7 de mayo de 2012 3:18
Respuesta

Debasis Padhi

Ranking: Junior Member

Mensajes: 55

Fecha de incorporación: 23 de marzo de 2012

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
Hitoshi Ozawa
RE: To Work with Hooks
7 de mayo de 2012 7:32
Respuesta

Hitoshi Ozawa

Ranking: Liferay Legend

Mensajes: 7954

Fecha de incorporación: 23 de marzo de 2010

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?
David H Nebinger
RE: To Work with Hooks
7 de mayo de 2012 7:51
Respuesta

David H Nebinger

Ranking: Liferay Legend

Mensajes: 7512

Fecha de incorporación: 1 de septiembre de 2006

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, ...
Hitoshi Ozawa
RE: To Work with Hooks
7 de mayo de 2012 15:37
Respuesta

Hitoshi Ozawa

Ranking: Liferay Legend

Mensajes: 7954

Fecha de incorporación: 23 de marzo de 2010

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. :-)
Debasis Padhi
RE: To Work with Hooks
16 de mayo de 2012 6:13
Respuesta

Debasis Padhi

Ranking: Junior Member

Mensajes: 55

Fecha de incorporación: 23 de marzo de 2012

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
Hitoshi Ozawa
RE: To Work with Hooks
16 de mayo de 2012 16:44
Respuesta

Hitoshi Ozawa

Ranking: Liferay Legend

Mensajes: 7954

Fecha de incorporación: 23 de marzo de 2010

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.
Debasis Padhi
RE: To Work with Hooks
18 de mayo de 2012 3:54
Respuesta

Debasis Padhi

Ranking: Junior Member

Mensajes: 55

Fecha de incorporación: 23 de marzo de 2012

Mensajes recientes

For the time being I want to share My knowledge with my followers
in my team who are out of station
Hitoshi Ozawa
RE: To Work with Hooks
18 de mayo de 2012 4:13
Respuesta

Hitoshi Ozawa

Ranking: Liferay Legend

Mensajes: 7954

Fecha de incorporación: 23 de marzo de 2010

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".