WorldWander logo
Main

The Road Behind

Venezuela
Trinidad
Curacao
Galapagos
Ecuador
Peru
Bolivia
Paraguay
Argentina
Chile
Hong Kong
Thailand North
Thailand South
Malaysia
Cambodia
Singapore
Nepal
Kathmandu
Royal Trek
Nepal Trek
India
India Palace
Udaipur
Bangalore
Greece
Islands
Rhodes
Camping
Olympia
Turkey
Istanbul
Bath
Bursa
Cappadocia
Bodrum
South Africa
Garden Route
Cape Town
Namibia
Fish River
Etosha
Botswana
Zimbabwe
Wedding
Great Ruins
Germany
Bathroom
Netherlands
Spain
Madrid
Seville
Granada
Gibraltar
Morocco
Portugal
Sintra
France
Normandy
Egypt
Pyramids
Nile
Aswan
Abusimbel
Luxor
Valley of Kings
Alexandria
Red Sea
Jordan
Kings Valley
Aman
Palestine

The Road Ahead

Isreal
Czech Republic
Austria
Italy
Switzerland
England
Find pages
Unused pages
Undefined pages
Page Index

Set your name in
UserPreferences


Referenced by
...nobody




JSPWiki v2.2.33


CheckLockTag


Checks the existence of a page lock. A page lock is created when an user starts editing a page. You can use this tag to warn the user, prevent the page from being modified (by removing the editor text area, for example), etc.

Usage

<wiki:CheckLock mode="locked|unlocked|owned" id="<variable>">

content
</wiki:CheckLock>

Parameters

mode
If set to "locked", will include the content if the page has been locked. If set to "o
wned", will include only if the page is locked by the current user. Value "unlocked" includes if the page is not locked.
id
The JSP variable named in this parameter will be set to an instance of PageLock class.

Example

      <wiki:CheckLock mode="locked" id="lock">
         <P CLASS="locknote">User '<%=lock.getLocker()%>' has started to edit this page, but has not yet
         saved.  I won't stop you from editing this page anyway, BUT be aware that
         the other person might be quite annoyed.  It would be courteous to wait for his lock
         to expire or until he stops editing the page.  The lock expires in
         <%=lock.getTimeLeft()%> minutes.
         </P>
      </wiki:CheckLock>

The PageLock class

The PageLock class has the following methods you can use:

public WikiPage getPage()
Returns the current page.
public java.lang.String getLocker()
Returns the user name as a string.
public java.util.Date getAcquisitionTime()
Returns the timestamp when this lock was acquired (i.e. the user started to edit the page.
public java.util.Date getExpiryTime()
Returns the timestamp when this lock expires (if the user has not saved or clicked "cancel")
public long getTimeLeft()
A convinience method, which returns the remaining time to expiry in minutes.




Go to top  
This page last changed on 11-Apr-2003 21:54:26 EDT by unknown.
Please make one.