I think it is easy to understand that Page A doesn't know what's wrapped in 
component B, like 'addToChart', so you can only deal with event froom B but not 
'addToChart'.
And I think ActionLink is a more general EventLink, with event name "action".

For your case, you can use EventLink to specify special event name.

Or you can fire your customized event name in Component B like what Form 
component does.

Component B.java

@Inject
    private ComponentResources _resource;
void onActionFromAddToChart() {
    _resource.triggerEvent("addToChart", new Object[]{values}, null);
}

Then in Page A

void onAddToChart() {
    // Do your logic.
}


Hope that helps.

Thanks!

DH


----- Original Message ----- 
From: "maxthesecond" <[EMAIL PROTECTED]>
To: <[email protected]>
Sent: Thursday, May 08, 2008 6:01 PM
Subject: T5 Event bubling


> 
> 
> a page:  A
>      a wraper component: B
>           a component:  C inside wraper having an action link with
> id=addToChart
> 
> 
> At the page level by now I can only trap the events from C like
> 
>          @OnEvent(component="B")
>   void whatevernamewilldothejob(String ID){
>          }
> 
> or
>   void onActionFromB(String Id){
>    }
> 
> 
> Are those the only posiblities?
> I reviewed all posts related to events and see no clear statment about the
> isue.
> 
> And of course the problem is: what shall I do to distinguish two different
> acction links in my component?
> After all If I look at the generated url from the action link it contains
> afaik all the needed information 
> 
> /page.container.component.addToChart
> 
> If the way to go is EventLink component Ok but then ActionLinks is much less
> useful.
> 
> Thanks
> 
> 
> -- 
> View this message in context: 
> http://www.nabble.com/T5-Event-bubling-tp17124159p17124159.html
> Sent from the Tapestry - User mailing list archive at Nabble.com.
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
>

Reply via email to