How do I know that the user leaves an edited object for good?

Author Message

Gabriel Ambuehl

Friday 04 February 2005 5:40:03 am

I'm working on a custom datatype that needs to store some information in the session. However, I need that information to be deleted after the user stops editing the current object (it
needs to stay if he goes browsing for related objects and the like) by either publishing or explicitely saving the draft.

How do I know that from inside a datatype?

Visit http://triligon.org

Lazaro Ferreira

Friday 04 February 2005 7:09:33 am

Hi,

I only know one way to do it, programming an extension that check DRAFT and PUBLISH content actions and decide what to do with the session data, i.e : destroy session variables

On the other hand you may also have code that start new session variables when content object is created( don't remember which content action is)

Lazaro
http://www.mzbusiness.com

Gabriel Ambuehl

Friday 04 February 2005 7:18:35 am

If that's really the only way (and there's not a POST variable or some such that indicates this reliably) I'll rather find another way to keep state ;-). It's only a list of ints anyhow, so I can put them on the form too.

Visit http://triligon.org

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.