Vista combinada Visión Plana Vista de árbol
Discusiones [ Anterior | Siguiente ]
toggle
Pranay R Patadiya
How to check if forum post is answered or not?
1 de diciembre de 2011 21:22
Respuesta

Pranay R Patadiya

Ranking: Regular Member

Mensajes: 181

Fecha de incorporación: 22 de febrero de 2010

Mensajes recientes

Hi Folks,

I have a scenario that, in our liferay portal one can post a thread marked as question.

Then people can answer that post and thread owner will mark anyone answer as "answer".

Now i want to check if that post is answered or not, so how can i check that?


Thanks,
Pranay
Pankaj Kathiriya
RE: How to check if forum post is answered or not?
2 de diciembre de 2011 2:09
Respuesta

Pankaj Kathiriya

Ranking: Liferay Master

Mensajes: 563

Fecha de incorporación: 4 de agosto de 2010

Mensajes recientes

Hi Pranay,
I have checked view_thread_message.jspf, there i found following snippet that checks if thread is answered.

<!--
<div class="answer <%=
!message.isRoot() && MBMessageFlagLocalServiceUtil.hasAnswerFlag(message.getMessageId())
? "" : "aui-helper-hidden" %>" id="<portlet:namespace />deleteAnswerFlag_<%= message.getMessageId() %>">
<liferay-ui:icon
image="checked"
label="<%= true %>"
message="answer"
/>

<c:if test="<%= (message.getRootMessageId() != MBMessageConstants.DEFAULT_PARENT_MESSAGE_ID) && MBMessagePermission.contains(permissionChecker, message.getRootMessageId(), ActionKeys.UPDATE) %>">
(<a href="javascript:<portlet:namespace />deleteAnswerFlag('<%= message.getMessageId() %>');"><liferay-ui:message key="unmark" /></a>)
</c:if>
</div>
--!>

The line in block letter can help you in find if thread is answered or not!

Hope this helps.


Thanks,
Pankaj