Foren
How to check whether a thread is locked using Velocity?
Alla Sapozhnikova, geändert vor 9 Jahren.
How to check whether a thread is locked using Velocity?
Junior Member Beiträge: 81 Beitrittsdatum: 02.03.12 Neueste Beiträge
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.