Fórum
Liferay Rating API
azhar shaikh, modificado 7 Anos atrás.
Liferay Rating API
Junior Member Postagens: 43 Data de Entrada: 29/08/15 Postagens Recentes
Hello Everyone,
I have used liferay-ui:rating tag for Like in my portlet.
Now I need to perform custom action such as notify the user whose content is liked.So how can I achieve this.
i have already gone through the liferay src and found rating.js and page.jsp.
There is one attribute "url" in liferay-ui:rating tag I cannot find any documentation on what it does ?
I created a action handler and passed its url. Now when I click thumbs button the handler is getting called but the ratings api is not updated
I have used liferay-ui:rating tag for Like in my portlet.
Now I need to perform custom action such as notify the user whose content is liked.So how can I achieve this.
i have already gone through the liferay src and found rating.js and page.jsp.
There is one attribute "url" in liferay-ui:rating tag I cannot find any documentation on what it does ?
I created a action handler and passed its url. Now when I click thumbs button the handler is getting called but the ratings api is not updated
Amos Fong, modificado 7 Anos atrás.
RE: Liferay Rating API
Liferay Legend Postagens: 2047 Data de Entrada: 07/10/08 Postagens Recentes
Hi Azhar,
One way you could do this is to write a portal hook, I'm not sure which liferay version you're using but here's the 6.2 docs:
https://dev.liferay.com/develop/tutorials/-/knowledge_base/6-2/overriding-a-portal-service-using-a-hook
You can override the RatingsEntryLocalServiceImpl.updateEntry() method and from there, you can send an email to the original asset's creator looked up by the className and classPK.
One way you could do this is to write a portal hook, I'm not sure which liferay version you're using but here's the 6.2 docs:
https://dev.liferay.com/develop/tutorials/-/knowledge_base/6-2/overriding-a-portal-service-using-a-hook
You can override the RatingsEntryLocalServiceImpl.updateEntry() method and from there, you can send an email to the original asset's creator looked up by the className and classPK.
azhar shaikh, modificado 7 Anos atrás.
RE: Liferay Rating API
Junior Member Postagens: 43 Data de Entrada: 29/08/15 Postagens RecentesAmos Fong:
Hi Azhar,
One way you could do this is to write a portal hook, I'm not sure which liferay version you're using but here's the 6.2 docs:
https://dev.liferay.com/develop/tutorials/-/knowledge_base/6-2/overriding-a-portal-service-using-a-hook
You can override the RatingsEntryLocalServiceImpl.updateEntry() method and from there, you can send an email to the original asset's creator looked up by the className and classPK.
Hi Amos,
I am using liferay 6.2.
There is url attribute in tag.I have passed an action url in that my handler is getting called but I dnt know how rating api works.I cannot find any document about Rating API
Amos Fong, modificado 7 Anos atrás.
RE: Liferay Rating API
Liferay Legend Postagens: 2047 Data de Entrada: 07/10/08 Postagens Recentes
You shouldn't have to pass a URL in the taglib. I think it's if you want to have a custom action when users rate the asset. If you leave it blank, there should a default action that updates the ratings data.
Looking at the source code is probably the best documentation for this if you can't find it at dev.liferay.com.
Looking at the source code is probably the best documentation for this if you can't find it at dev.liferay.com.
azhar shaikh, modificado 7 Anos atrás.
RE: Liferay Rating API (Resposta)
Junior Member Postagens: 43 Data de Entrada: 29/08/15 Postagens Recentes
Thanks for your help.I have found a solution.I wanted to notify user when someone comments on there post.
I have completed this by creating a resource handler .Will be posting the solution code soon
I have completed this by creating a resource handler .Will be posting the solution code soon