Right now your confiugration specifies in the "nodeType" node data that it wants to be notified only about events concerning nodes of type "mgnl:contentNode" You need to change that. Look at other observers for examples. Jan
On Jun 30, 2010, at 2:26 PM, Suraj wrote: > > Thanks Jan! > > Just another quick related question - the command only seems to respond to > Node added and Node name change events? I would like Observation to listen to > page changes so that, for example, if I add content to a news page, my > command should be activated...is this possible? > > This is my Observation configuration structure: > > sendXML10-06-30, 12:48 > listener10-06-30, 13:01 > classinfo.magnolia.module.observation.sample.NodeListenerString-- > nodeTypemgnl:contentNodeString-- > activetrueString-- > delay31String-- > descriptionXML is output upon page changesString-- > eventTypes-String-- > maxDelay40String-- > path/SampleWebsite/Index/News/String-- > repositorywebsite > > > ----- Original Message ---- > From: Jan Haderka <[email protected]> > To: Magnolia User-List <[email protected]> > Sent: Tue, 29 June, 2010 12:07:26 > Subject: Re: [magnolia-user] Get node data of last updated node? > > > The event should contain the path which was a reason for triggering the > command. Use that path to retrieve the content. > Please note that observation is asynchronous and happens after the even that > triggered the observer occurred, so listening for DELETED events still gives > you the path to the node that was deleted, but that node is already gone and > you wan't be able to retrieve it from the repo anymore. > > HTH, > Jan > > On Jun 29, 2010, at 11:09 AM, Suraj wrote: > >> >> I was wondering if anyone could suggest a way to retrieve node details of a >> node that has just been created/modified/deleted in the Admin interface. >> >> What I'm trying to do is hook up a custom module to the observation command >> so that every time a node is created/modified/deleted, an XML file is >> exported with the details of the node. >> >> I have managed to hook my module to the observation command and export >> details of nodes using getContent e.g. Content nodeDescr = >> hm.getContent("en/home"); , however I'm not able to work out how to >> dynamically retrieve content of the last updated node. >> >> Thanks! >> >> >> ---------------------------------------------------------------- >> For list details see >> http://www.magnolia-cms.com/home/community/mailing-lists.html >> To unsubscribe, E-mail to: <[email protected]> >> ---------------------------------------------------------------- > > > > ---------------------------------------------------------------- > For list details see > http://www.magnolia-cms.com/home/community/mailing-lists.html > To unsubscribe, E-mail to: <[email protected]> > ---------------------------------------------------------------- > > > ---------------------------------------------------------------- > For list details see > http://www.magnolia-cms.com/home/community/mailing-lists.html > To unsubscribe, E-mail to: <[email protected]> > ---------------------------------------------------------------- ---------------------------------------------------------------- For list details see http://www.magnolia-cms.com/home/community/mailing-lists.html To unsubscribe, E-mail to: <[email protected]> ----------------------------------------------------------------
