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
Share it :
©EnProwess, 2017 All Right Reserved.
Leave a Reply
19 Comments on "Learn Liferay DXP custom notification in 5 minute"
Can you please send the github link for this demo code ?
Hi Harsh,
Thank you for your comment, It is not in github. You may share your email id with us at (info@enprowess.com) and we would be happy to share code bundle with you.
Hi ,I have requirement to implement notification on upload the file.I follows all the step but I am not getting the notification
Please Help me
I created Module and impalement the classes but when I depoly the module but then also it is not getting store in usernotificationevent table can you please help me
Hi Pallavi,
Thank you for visting the blog and comment.
Please check if there is any exception.
If you can share more details(like key code block and feature where you have implemented this), it will help me to understand the issue.
Further to this, I can share the code bundle (explained in this blog) with you if you can share your email-id.
Best Regards,
Zeenesh Patel
Hi…nice work.. Can you share your code please?..thank you
Hi Nicolae,
Thank you for your comment, Please share your email id with us at (info@enprowess.com) and we would be happy to share code bundle with you.
Hi, I have followed all the above listed instructions and created a module to show custom notifications. Its creating a record in usernotificationevent table but neither it shows the count nor the notification. Could you please help me out by sharing the the code bundle explained in this blog ? Thanks in advance!
Hi Sandhu,
Are you getting any exception? or any warning in tomcat log?
If you can share more detail, I would surely try to help you further.
Also, You may share your email id with us at (info@enprowess.com) and we would be happy to share code bundle with you.
Hi..could you please share the above code since we are looking for similar functionality to be implemented in our project
Sure!
Source code is sent to your email id.
Best Regards,
EnProwess Technologies.
Hi, can you share your code please, my email is trash6x@gmail.com, thank you.
Sure!
Source code is sent to your email id.
Best Regards,
EnProwess Technologies.
As Others, Can I have your code, Please…My email is mkassab_99@yahoo.com
Thanks
Hi Maria,
Source code is sent to your email address. Hope it helps.
Best Regards,
Team EnProwess.
Hi,
Thanks for your post. It’s really useful.
Could you please share your code. my email is lonelyemerald@gmail.com.
Thanks
Hi Duy,
Source code is sent to your email address. Hope it helps.
Best Regards,
Team EnProwess.