Cannot read before/after with onUpdateProperties behaviour.
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-31-2009 01:20 AM
I've written a JavaScript-based behaviour to hook into onUpdateProperties for one of my custom types. I would like to take some action when a single property, xx:visibility, changes. I followed the steps outlined in Jeff Potts' excellent guide (http://ecmarchitect.com/archives/2007/09/26/770) and it mostly works, but it seems like Alfresco is not setting the before/after variables as they are "null" in my script. That is, I have this script code:
if (behaviour.args.length == 3) { var node = behaviour.args[0]; // "node" is set and I can access its properties, even node.properties['xx:visibility']. var before = behaviour.args[1]; var after = behaviour.args[2]; // "before" and "after" are "null" and not useful. They should represent the state of the properties before and after the change. }
Am I missing something? Are these values not available to JavaScript scripts?
Labels:
- Labels:
-
Archive
1 REPLY 1

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-23-2012 09:07 AM
