0
votes

I have to give rating functionality in message board portlet. for that I have created hook and override view.jsp file of message board portlet. I have added "liferay-ui:rating" tag as

  liferay-ui:ratings

  className="<%= MBMessage.class.getName() %>"

  classPK="<%= message.getMessageId() %>"

  type="stars"

I am getting error while deploying. what should be the values for className and classPK. Also from where can I get class name for message board and class primary key for the same.

1
what is the error you are getting? Please use message.getClassPK() instead of message.getMessageId()Pankaj Kathiriya
Any reason for removing below answer as accepted?Pankaj Kathiriya
At my case message.getMessageId() is giving me correct values, where as message.getClassPK() was throwing exception.Pranoti

1 Answers

1
votes

Have it as shown below.

<liferay-ui:ratings

className="<%= MBMessage.class.getName() %>"

classPK="<%= message.getClassPK() %>"

type="stars"/>