掲示板
How to check whether a thread is locked using Velocity?
9年前 に Alla Sapozhnikova によって更新されました。
How to check whether a thread is locked using Velocity?
Junior Member 投稿: 81 参加年月日: 12/03/02 最新の投稿
I need to check whether a thread in a message board is locked using Velocity. Does anyone know how this can be done?
Do unLockThread and lockThread methods work in Velocity?
I tried
#set ($MBThreadService= $serviceLocator.findService("com.liferay.portlet.messageboards.service.MBThreadLocalService"))
#set ($Lock = $MBThreadService.lockThread($getterUtil.getLong($thread.threadId)))
and
$MBThreadService.unlockThread($getterUtil.getLong($thread.threadId))
The methods don't seem to work.
Are there any other options?
Update: LockLocalService worked. I used isLocked method.
Do unLockThread and lockThread methods work in Velocity?
I tried
#set ($MBThreadService= $serviceLocator.findService("com.liferay.portlet.messageboards.service.MBThreadLocalService"))
#set ($Lock = $MBThreadService.lockThread($getterUtil.getLong($thread.threadId)))
and
$MBThreadService.unlockThread($getterUtil.getLong($thread.threadId))
The methods don't seem to work.
Are there any other options?
Update: LockLocalService worked. I used isLocked method.