I think the best practice here is to create your own events, that way you
don't have to build dependencies on child components internal structure.
Your subcomponent would catch the events from it's dependencies and
translate them to events that it exposes.
http://tapestry.apache.org/tapestry5/apidocs/org/apache/tapestry5/ComponentResourcesCommon.html
triggerEvent or triggerContextEvent

Josh

On Tue, Sep 9, 2008 at 3:32 AM, Blower, Andy
<[EMAIL PROTECTED]>wrote:

> I found the answer by searching the list (see:
> http://markmail.org/message/fjev6gt76fpc6akq) but I think the T5
> documentation should be updated to include these details.
>
> I also wonder if allowing more specificity would be useful as an option
> even if it did mean that changes in the child component could break event
> handlers in the parent. What I'm thinking of is allowing
> @OnEvent(component="childcomponentid.eventfiringcomponentid") as an option.
> Not sure how this could be expressed in a method name convention, but that's
> not necessary for this IMHO.
>
> Now I'll wait for Howard to tell me an obvious reason this can't be done
> that'll make me feel silly... lol
>
> Andy.
>
> > -----Original Message-----
> > From: Blower, Andy
> > Sent: 09 September 2008 11:08
> > To: 'Tapestry users'
> > Subject: T5: Event bubbling
> >
> > I'm trying to handle an event in a parent component of one that fires
> > the event and it doesn't seem to work unless it's a generic catch all
> > event handler like onAction(). If I specify the component id like
> > onActionFromThing() or specifying component="thing" in an OnEvent
> > annotation it doesn't catch the event from the child component in the
> > parent component. I've scoured the T5 documentation, but I can't find
> > any details on how to do this.
> >
> > Can anyone help me with this?
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


-- 
--
TheDailyTube.com. Sign up and get the best new videos on the internet
delivered fresh to your inbox.

Reply via email to