[opencms-dev] Locking an entry

Jorg Heymans jh at coeno.com
Mon Feb 10 15:28:09 CET 2003


Hi Andras,

You nearly have it working then :)
All you need to do is to persist the contentdefinition back to the 
database.
Your contentdefinition has to implement the method "public void 
write(CmsObject cms) throws Exception". This method gets called by the 
framework after the locking/unlocking action is done. If you add some 
method logging you can verify this for yourself.
After you did the persistence, opencms will call your module filter 
again, which will retrieve the updated module data (and hopefully your 
"locked" item).

Hope this helps
Jorg

Andras Balogh wrote:

>Hi all,
>
>I am trying to create a simple new module in opencms. I have managed to
>define
>my filter methods and provide the list to be displayed.
>Now i want to lock an entry to be edited.
>If i use the Lock link the setLockstate() method is called correctly in my
>ContentDefintion class.
>In my table that contains my entries (products) i have a field defined
>cms_lock.
>But i don't understand how the lock value(2)
> will be stored back in my table.
>Is there a method that should be implemented like write or something ?
>I did search the archive and it seems that it is working to you:
>http://www.opencms.com/cgibin/wilma_hiliter/opencms-dev/0208/msg00043.html
>
>Thank you,
>
>Andras.
>
>
>
>
>  
>




More information about the opencms-dev mailing list