Foros de discusión

Notifications api in liferay 6.2GA1

janakisrinivas devalla, modificado hace 10 años.

Notifications api in liferay 6.2GA1

New Member Mensajes: 2 Fecha de incorporación: 9/12/13 Mensajes recientes
Hello Friends,

I want to use notifications which is plugged-in by default in lfy 6.2 ga1. We have already implemented our own service for notification which will be created our db.
I want to show those notifications using notification portlet . can anybody know How to use this notification api to display our custom notifications.
thumbnail
Vilmos Papp, modificado hace 10 años.

RE: Notifications api in liferay 6.2GA1

Liferay Master Mensajes: 529 Fecha de incorporación: 21/10/10 Mensajes recientes
I haven't tried it yet, but if I'm right, you can check the source code of the chat portlet to see it's usage (if I'm right and you think about that notification mechanism)

Cheers,
Vilmos
janakisrinivas devalla, modificado hace 10 años.

RE: Notifications api in liferay 6.2GA1

New Member Mensajes: 2 Fecha de incorporación: 9/12/13 Mensajes recientes
Hello Vilmos ,
Thanks for the reply. I have gone through the chat portlet source code I did not find use of notfications portlet.
I have to show notifications of portal logged in user in the portal dockbar notification area.
What I am thinking is I have to get our notification object of a user from my service and add it to the liferay database using notification api addXXX methods.

If this correct please give some sample code how to call those API's. If I am wrong suggest me the alternative approach How to do that.
thumbnail
Gnaniyar Zubair, modificado hace 10 años.

RE: Notifications api in liferay 6.2GA1

Liferay Master Mensajes: 722 Fecha de incorporación: 19/12/07 Mensajes recientes
You can write the logic in dockbar portlet of view.jsp (html\portlet\dockbar) by getting from your service which can be accessed globally and add into liferay Alert / Announcement Service APIs.
thumbnail
Vilmos Papp, modificado hace 10 años.

RE: Notifications api in liferay 6.2GA1

Liferay Master Mensajes: 529 Fecha de incorporación: 21/10/10 Mensajes recientes
Hi,

Sorry, I misunderstood what you were searching for. I checked it but I'm not familiar with that framework yet.
Tonmoy Tarafdar, modificado hace 10 años.

RE: Notifications api in liferay 6.2GA1

New Member Mensajes: 2 Fecha de incorporación: 3/02/14 Mensajes recientes
Vilmos Papp:
Hi,

Sorry, I misunderstood what you were searching for. I checked it but I'm not familiar with that framework yet.


I also want to implement this but do not know how.I created a custom portlet through which i want to send notification to user which will be shown in the dockbar.I directly add a entry in User Notification table for a notification.so the counter increase in the dockbar but when i click on it nothing shows.I have created a custom table where i am saving my data and pass the primary key in payload attribute in notification table.what to do.please help..
Chiến Ngọc, modificado hace 9 años.

RE: Notifications api in liferay 6.2GA1

Junior Member Mensajes: 35 Fecha de incorporación: 9/10/13 Mensajes recientes
Hi Tonmoy ,

You must create custom class CustomUserNotificationHandler extends BaseUserNotificationHandler
and declare it in liferay-portlet.xml :
<user-notification-handler-class>xxx.xxx.CustomUserNotificationHandler </user-notification-handler-class>

Regards,
thumbnail
Reigo Reinmets, modificado hace 9 años.

RE: Notifications api in liferay 6.2GA1

New Member Mensajes: 6 Fecha de incorporación: 9/05/14 Mensajes recientes
I wrote a short tutorial about how to handle custom notifications in Liferay 6.2. While it might not be perfect it's better than any other data I found using Google. I spent a lot of time reading the Liferay source code to understand properly how the notification system is working. In short, you need to define you "user-notification-definitions" and "user-notification-handler-class" in liferay-portlet.xml. Then you need to actually implement those properly. Also there's an important catch that "notification-type" has to actually be a valid Portlet ID, otherwise you start getting random NullPointerExceptions.

You can read the full tutorial here:
http://www.codeyouneed.com/liferay-custom-notifications/

Good luck!
tito gutierrez, modificado hace 9 años.

RE: Notifications api in liferay 6.2GA1

New Member Mensajes: 4 Fecha de incorporación: 8/11/14 Mensajes recientes
Hola, me puedes apoyar por favor con el tema de las notificaciones, tengo 3 tipos de notificaciones, y quisiera que cada notificacion al hacer click me jale a distintos portlets, como puedo hacerlo por favor?