My point is that if you inject into a field whose type is an
interface, then you have to specify the page name.

However, and perhaps this is your point, we could extend the concept
of marker annotations to pages and have a mechanism to inject based on
the intersection of type (the interface) and marker.  But again, it
does require that all page classes be loaded and transformed at app
startup (or first request). That's ok with 10 or 20 or maybe 50 pages,
but it starts to impact the development cycle once you have 100 or
1000 pages.

On Nov 8, 2007 3:04 PM, Massimo Lusetti <[EMAIL PROTECTED]> wrote:
> On Nov 8, 2007 4:46 PM, Howard Lewis Ship <[EMAIL PROTECTED]> wrote:
>
> > To be honest, these kind of page-to-page interactions may be better
> > implemented as ordinary Java methods, rather than events:
>
> Right, so the events we are talking about are external, right? This
> seems to put a lot of power inside Tapestry5 to let us use in other
> forms like 'new age' web services :)
>
> > 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.
>
> Here Guice and all the dust around has shown the way to go... don't you?
>
> --
> Massimo
> http://meridio.blogspot.com
>
> ---------------------------------------------------------------------
>
> 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

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

Reply via email to