April 27, 2022
Welcome to EnProwess blogs. In this post, I am going to talk about notification feature and how to create custom notification in DXP. Before we talk about notification feature in DXP, lets understand what has changed in DXP with compare to Liferay 6.2.
Now let’s understand how to define custom notification in DXP. Before you start further, ensure you have following prerequisite installed/configured
Following are the steps to implement custom notification.
To create Liferay modules, Click File menu → Click New → Select Liferay Module Project. Provide appropriate name for module and click finish.
You have successfully implemented custom notification class. Now its time to make notification entry in DB. Generally, this entry would be done from custom portlet based on business requirement to notify user about different events. Just to demonstrate how it works, I am adding one dummy entry in usernotificationevent table.
With above steps, you have successfully implemented custom notification and made database table entry to display notification. It’s time to deploy code to see how it looks like. In my case, this custom notification is being rendered as following snapshot,
I hope this post gives idea about difference between Liferay6.2 and DXP to implement custom notification. EnProwess believed in learning and sharing. You can read different implementation approaches for DXP on our site. Keep learning!
Post by,
Zeenesh Patel