|Re: [CDO] Listen to passive updates. [message #431042 is a reply to message #431033]
||Thu, 25 June 2009 07:04
|| Eike Stepper
Registered: July 2009
This is a multi-part message in MIME format.|
Content-Type: text/plain; charset=ISO-8859-15
Kai Schlamp schrieb:
> Hy Simon,
> comment below.
> Simon Mc Duff wrote:
>> Kai Schlamp wrote:
>> Hello! :-)
>>> Is it somehow possible for a view/transaction to listen and get the
>> that is updated (activ or
>>> I could add a IListener that indeed is called, but it doesn't tell
>>> me what
>>> A CDOTransactionHandler can only monitor what the transaction does
>>> But how do I get those objects that are passive updated?
>>> I don't want to add an Adapter to every object in my view.
>> For the passive you can do the following
>> http://wiki.eclipse.org/FAQ_for_CDO_and_Net4j#How_can_I_reac t_to_remote_changes_to_my_objects.3F
>> - getDirtyObjects and getDetchedObject
>> private IListener viewListener = new IListener()
>> public void notifyEvent(IEvent event)
>> if (event instanceof CDOViewInvalidationEvent)
>> CDOViewInvalidationEvent e = (CDOViewInvalidationEvent)event;
>> // Remove detached object from selection, could incur into
>> unwanted exceptions
>> Quick note:
>> CDOViewInvalidationEvent will only include dirtyObjects that you have
>> in your views. CDOSessionInvalidationEvent will gives you ALL dirty
>> CDOID that happens passively.
>> Is it helping you ?
> Yes, looks good. The problem is that I don't have the method
> CDOView.setInvalidationNotificationEnabled(boolean enabled);
> available. When I browse the source by hitting F3 on the class, I see
> it's there. But when I try to access it in the editor, it tells my
> that it is undefined ... strange.
> Most probably a setup problem. I will reinstall everything (I only
> updated for several Milestones and RCs now) and report back then. It's
> even a good time for reinstallation ... the new Galileo release ;-)
Content-Type: text/html; charset=ISO-8859-15
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<body bgcolor="#ffffff" text="#000000">
Powered by FUDForum
. Page generated in 0.02078 seconds