I have a requirement to automatically lock and unlock pages when an author opens and closes a page respectively (in order to avoid two authors editing the same page simulatenously). I was trying to leverage the currentPage.lock() and .unlock() methods - the .lock() method is easy enough to execute on page load, but I have no good means of triggering .unlock() when the page closes since currentPage isn't in the scope of jspDestroy(). Am I going about this the wrong way, or is there an easy way in CQ5.6 to trigger the unlock when the page is closed?
Thanks in advance.
Solved! Go to Solution.
Views
Replies
Total Likes
For this use case -- the event can only be tracked at the page level. So you could use a jquery event and send a callback through Sling to execute your lock command. Hope this helps you.
Views
Replies
Total Likes
For this use case -- the event can only be tracked at the page level. So you could use a jquery event and send a callback through Sling to execute your lock command. Hope this helps you.
Views
Replies
Total Likes