To be honest, these kind of page-to-page interactions may be better
implemented as ordinary Java methods, rather than events:

Page A injects page B and invokes arbitrary method m() on it.  This
can be made cleaner by defining method m() in an interface, perhaps
... hm, then you have to use @InjectPage("pageb") which is less
refactoring-safe than if you match PageB by type.

On Nov 6, 2007 1:16 PM, Howard Lewis Ship <[EMAIL PROTECTED]> wrote:
> You can get the page, cast it to ComponentResourcesAware to get the
> ComponentResources.  At that point, you can invoke triggerEvent().
>
> This is not so cool ... I wonder if there's a way we could build a bit
> more of an event bus into Tapestry.  Now that Tapestry knows all the
> pages at startup, we could do some pretty sophisticated things:  Have
> annotations that register methods for application events, rather than
> page events.
>
> The framework could automatically load page instances in order to
> receive such events.
>
> It implies a bit more work at startup: all page classes will need to
> be transformed at startup, or at least, on first request.  It's an
> interesting idea though.
>
>
> On Nov 6, 2007 12:30 PM, Dan Adams <[EMAIL PROTECTED]> wrote:
> > How do you fire an event on a different page (like a normal page
> > activate event) but with a different name for the event (for instance,
> > 'add' or 'edit' instead of 'activate')?
> >
> > --
> > Dan Adams
> > Senior Software Engineer
> > Interactive Factory
> > 617.235.5857
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
>
>
>
> --
> Howard M. Lewis Ship
> Partner and Senior Architect at Feature50
>
> Creator Apache Tapestry and Apache HiveMind
>



-- 
Howard M. Lewis Ship
Partner and Senior Architect at Feature50

Creator Apache Tapestry and Apache HiveMind

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to