Listening for changes made on a value list

Hi,
I have a document of type selection:valuelist and would like to listen to changes made on this document. I noticed however, that no HippoEvent is fired on editing and saving the document. Is there any other way I can react on changes made? I already have a rough implementation using a jcr EventListener, but a more high level approach that is implemented within the cms application would be preferable as this reduces complexity.

Thank you for your time!

Unfortunately a valuelist is a simple document without workflow. I think a JCR event listener is probably the best bet. You could try to make a new document that inherits from selection:valuelist and hippostdpubwf:document (I think) but I don’t know how well that would work.

We’re going for a new document type. That will keep things somewhat simpler. The current implementation already uses a custom dropdown plugin class so we’ll use that instead of inheriting from selection:valuelist.

I noticed, via use of a debugger, the jcr event was of type EventImpl and contained the external field in its state. As it did not seem to implement the org.apache.jackrabbit.api.observation.JackrabbitEvent interface I was unable to get the value of the external field. I thought to use this field as a simple way to prevent the logic from running on every node in the cluster. This was another form of added complexity that made us go for the new document type solution. I do wonder why it didn’t work. Any thoughts on this?

I haven’t used jcr events in a long time, so my knowledge on this is rusty. Was the JCREvent you receive of the following type?

org.apache.jackrabbit.rmi.observation.ClientEventPoll.JCREvent

I can’t give you much more than this as I am also not all too familiar with how it works.

Sorry for taking so long, but I remember the event being of type org.apache.jackrabbit.core.observation.EventImpl. Therefore I expected the instanceof JackrabbitEvent check to return true, but it didn’t.

By now we have a working implementation based on workflow events and a new document type.