I need to call the one method before action method calls in portlet controller.
So here I am using a hook like:
- Create Hook
- Create a class and extend Action.
- Override run method write my own logic.
- Create portal.properties file and added following line
servlet.service.events.pre=com.liferay.sample.hook.LoginAction
- Pointing it fron liferay-hook.xml
Every thing was went fine but here the problem with this one is the created hook is executed each and every time page load but I want execute this hook is only when I click on the Action buttons(Action urls) in any portlet.
Can any help me out on it?
Thanks in Advance.
Naresh Kallamadi