There is already a solution provided by Howard Lewis Ship. I also hope this
makes up available as an example in jumpstart or the documentation of
tapestry itself as it is a common problem. It is as simple as just adding
From"ComponentName" for each of the bubbling up event.
For more explanation please look at this link
http://markmail.org/message/fjev6gt76fpc6akq and even this link which
points out to the previous link.
Hope this helps
http://apache-tapestry-mailing-list-archives.1045711.n5.nabble.com/T5-Event-bubbling-td2423435.html
.




On Sat, Aug 30, 2014 at 12:11 AM, Yubraj Ghimire <eass2014.mast...@gmail.com
> wrote:

> sorry typo error with pageRenderlinkresources..
>
> It should have been
>
> componentResources.triggerEventWithContext
>
>
>
> On Fri, Aug 29, 2014 at 11:59 PM, Yubraj Ghimire <
> eass2014.mast...@gmail.com
> > wrote:
>
> > Hello Guys,
> >
> > I've stumbled upon a problem with EventLinks and Im unable to find a
> > solution.
> >
> > I have a component A with eventlink and component B which acts as
> > container for component B.
> >
> > ComponentA.tml
> >
> > ///all other code
> > <a t:type="eventlink" t:event="redirect" context="prop:messageId"></a>
> >
> > ///all other code
> > ComponentA.java
> >
> > void onRedirect(String context) {
> >    dosomething..
> > }
> > This is working fine .But i want to handle this event in Component B and
> I
> > also need the context which is passed to the component A onRedirect
> method.
> >
> > So I removed onredirect from componentA and moved it component B thinking
> > that it bubbles up.
> > ComponentB.java
> >
> > void onRedirect(String context) {
> >   dosomething
> > }
> >
> > But I'm getting exception. I've searched jumpstart but their i saw
> > examples for event bubbling without context. How to bubble up events
> which
> > have context.
> >
> > Im pretty new and would like to get a start in the right direction. If
> > this question has been previously answered please give me the link. I
> could
> > not find any.
> >
> > I also saw pageRenderLinkResources.eventlinkwithcontext, but have no idea
> > how to pass this context in the second parameter. I know i'm doing
> > something wrong.
> >
> > Help me outt..
> >
> > thank you
> >
>

Reply via email to