Foren

Home » Liferay Portal » English » 3. Development

Kombinierte Ansicht Flache Ansicht Baumansicht
Threads [ Zurück | Nächste ]
toggle
Mazhar Alam
Adding rating functionality to message boards -threads
3. Januar 2013 04:04
Antwort

Mazhar Alam

Rang: Regular Member

Nachrichten: 188

Eintrittsdatum: 25. November 2011

Neue Beiträge

Hi all,
Im trying to add rating feature using-

<liferay-ui:ratings
className="<%= MBMessage.class.getName() %>"
classPK="<%= message.getMessageId() %>"
type="stars"
/>

But when i rate and suppose i gave 4 rating(stars) to any thread post..An error comes--

com.liferay.portlet.ratings.EntryScoreException
at com.liferay.portlet.ratings.service.impl.RatingsEntryLocalServiceImpl.validate(RatingsEntryLocalServiceImpl.java:266)
at com.liferay.portlet.ratings.service.impl.RatingsEntryLocalServiceImpl.updateEntry(RatingsEntryLocalServiceImpl.java:151)


Any ideas how to resolve this...
Hitoshi Ozawa
RE: Adding rating functionality to message boards -threads
6. Januar 2013 14:59
Antwort

Hitoshi Ozawa

Rang: Liferay Legend

Nachrichten: 7952

Eintrittsdatum: 23. März 2010

Neue Beiträge

If you look at the ratingsentry and ratingstats table (or related definition in service.xml), it seems you wont be able to use liferay's rating in message board posts.
Mazhar Alam
RE: Adding rating functionality to message boards -threads
12. April 2013 03:47
Antwort

Mazhar Alam

Rang: Regular Member

Nachrichten: 188

Eintrittsdatum: 25. November 2011

Neue Beiträge

I checked my portal source, which wasn't updated one..so i was not able to resolve..now i ' ve resolved the issue..Thanks anyway for you help...:-)
Vitaliy Koshelenko
RE: Adding rating functionality to message boards -threads
26. März 2015 10:37
Antwort

Vitaliy Koshelenko

Rang: Regular Member

Nachrichten: 240

Eintrittsdatum: 25. März 2011

Neue Beiträge

Add the following properties:

1ratings.max.score[com.liferay.portlet.messageboards.model.MBDiscussion]=5
2ratings.min.score[com.liferay.portlet.messageboards.model.MBDiscussion]=1
3
4ratings.max.score[com.liferay.portlet.messageboards.model.MBMessage]=5
5ratings.min.score[com.liferay.portlet.messageboards.model.MBMessage]=1