Jukka Zitting wrote:
Hi,

On Mon, Jul 21, 2008 at 7:13 PM, Carsten Ziegeler <[EMAIL PROTECTED]> wrote:
Now, actually, I need this second use case as well :)

Hmm, interesting. What's the use case? I.e. what would your "process"
actions look like in:

    if (event.isLocal() ) {
        // process local event
    } else {
        // process external event
    }

Yes.

Most notably, what's the "process external event" action that isn't
also performed for local events?

In the local case I do some post processing - so the isLocal() check ensures that the post processing is done once.

In both cases I'm generating application events out of the observation events, like a page has changed event, removed etc. The post processing is actually done based on this application events, so if a page has changed, some action is started. Therefore my application events need to be marked as local as well.

So basically my code looks like this:
     if (event.isLocal() ) {
         // send local app event
     } else {
         // send remote app event
     }

Carsten
--
Carsten Ziegeler
[EMAIL PROTECTED]

Reply via email to