Fórum

Capturing events in liferay menu items

Gururaj Nayak, modificado 11 Anos atrás.

Capturing events in liferay menu items

New Member Postagens: 4 Data de Entrada: 10/08/12 Postagens Recentes
Iam a liferay newbie, with very limited experience in liferay. When we add a page in liferay it will appear as one of the top menu bar items. Let us call this page "Portlet A". Now every time user clicks on the menu item Portlet A a new page is displayed.
Now i want to capture the event when user clicks on "PortletA" menu item ? So that i execute my own function in the backend.
Can some one guide me in doing the same preferably with code.

Thanks,
Guru
thumbnail
Paul ., modificado 11 Anos atrás.

RE: Capturing events in liferay menu items

Liferay Master Postagens: 522 Data de Entrada: 29/08/11 Postagens Recentes
There can be a number of approaches to achieve what you need to do.
For instance you can :-

1. Hook the jsp's that get's called when any of the liferay page is rendered
2. You can monitor each service request by a service pre action hook and check condition and do what you need to
3. You can have a custom portlet / scheduled job that can get the user tracks using UserTrackerUtil and getting all UserTracks and thereby there paths.
4. You can include a javascript to call your custom ajax method call in theme on each page render / click

All of them have different performance trade off's depending on what you want to do