19 Nov 10:06
Modify document property during documentModified Event
From: sean.radford.tacola.com <sean.radford@...>
Subject: Modify document property during documentModified Event
Newsgroups: gmane.comp.cms.nuxeo.general
Date: 2008-11-19 09:08:13 GMT
Subject: Modify document property during documentModified Event
Newsgroups: gmane.comp.cms.nuxeo.general
Date: 2008-11-19 09:08:13 GMT
Hi,
Any ideas on what I'm not doing? Basically I'm trying to update a property
of a document as it is being saved from an edit via the front-end UI. I'm
trying to do this via an EventListener, but any changes I make are not
persisted. My listener is something like:
public class MyEventListener extends AbstractEventListener implements
AsynchronousEventListener {
public void handleEvent(CoreEvent coreEvent) throws Exception {
String eventId = coreEvent.getEventId();
if (eventId.equals("documentModified")) {
doc.setProperty("myschema", "myproperty", "SOME_VALUE");
}
}
}
Any ideas? In my actual implementatation the value is computed from other
just entered fields - is there a better way to implement 'computed' fields?
Thanks,
Sean
--
--
Dr. Sean Radford, MBBS, MSc
w: http://www.tacola.com
t: 07802 24 24 86
RSS Feed