Recent Bloggers

Milen Dyankov

5 Mensagens
9 de Dezembro de 2016

gulnaaz Shaik

2 Mensagens
8 de Dezembro de 2016

Javeed Chida

15 Mensagens
8 de Dezembro de 2016

Neeraj Gautam

1 Mensagens
7 de Dezembro de 2016

David H Nebinger

32 Mensagens
6 de Dezembro de 2016

Vikash Chandrol

1 Mensagens
2 de Dezembro de 2016

Eduardo P. Garcia

10 Mensagens
2 de Dezembro de 2016

James Hinkey

6 Mensagens
29 de Novembro de 2016

Adrian Johnson

1 Mensagens
22 de Novembro de 2016

Lauri Hiltunen

8 Mensagens
21 de Novembro de 2016

Liferay Hook Plugin Support | Netbeans Portal Pack 3.0.2

General Blogs 22 de Março de 2009 Por Santh Chetan Chadalavada


Portal Pack makes life easier yet again !!. This time with the NetBeans Hook Plugin for Liferay.

Available @ Netbeans PortalPack 3.0.2

Introduction: This plugin has been developed to provide hook tooling support through Netbeans Portal Pack. For more information

on Liferay Hook checkout the Portal Hook Plugins Wiki

This new feature will help creating different kinds of hooks supported by Liferay Portal. Lets look each type of hook and how we can create them using Netbeans Portal Pack plugin.

  • Event Type Hook :  Liferay provides different kind of event type hooks and Portal Pack now supports all the different kinds of event hooks. For example, add a post login hook to do your custom stuff after each user login.
  1. Create a web project:
  2. In Server and Settings choose Liferay Portal Server 5.2.2 and click on Finish the create the project.
  3. Right click on the project. In Categories Select WebSpace/Liferay Plugins -> Hook Plugin. 
  4. Click On Next. From the Hooks Wizard top dropdown choose Event Handler Hook.
  5. Provide ClassName and Package. Choose the Event Type from the bottom drop down and click Finish. 
  6. liferay-hook.xml,, Event class files will be generated with the provided information.You can edit the java file put some code and save.
  7. Right click on the project and select Deploy.
  • Model Listener Hook : Using this hooks, you can do specific tasks whenever there is any CRUD operation in a specific model.
  1. Right click on the project-> Select Hook Plugin -> Choose Model Listeners Hook. 
  2. Choose the model by Clicking on Search. 
  3. Click Finish. Modify the code generated by Portal Pack Plugin, save it, Right click on the project and deploy. 
  • Jsp Hook : Using this hook, user can customize the core portal jsps/portlet in a decoupled manner without touching the core. For example, you can change the look and feel of the blog portlet in your hook application. And once you undeploy the hook application, the customization will go away. The Portal Pack provides wizard to create jsp hooks where user can select the core portal components which he/she wants to customize and the required files will be automatically imported to the hooks application. This feature can be used by SI for the portal customization.
  1. From the Hook Plugin Wizard choose the Jsp Hook from the drop down. Liferay Core jsp root folder(html) will be populated in the left pane. 
  3. Once clicked on Finish, folder structure will be created under the default custom jsp directory "/WEB-INF/jsp".
  • Hook : You can override certain through your hooks application.
  1. Select the Properties Hook from the drop down on a Clean Web Project(Which does not have a hook created to it).
  2. will be create with commented pre entires supported to be overriden.


Undeploying Hooks:

All the deployed hook plugins can be undeployed from Netbeans -> Services -> Liferay Server -> Global -> Hooks.

Right Click on the Hook Plugin and selecting Undeploy will undeploy it from the Portal Server. 


Mostrando 1 resultado.