Re: Event Bubbling Help Required.

2014-08-31 Thread Sumanth
Thank you. On Sat, Aug 30, 2014 at 12:54 PM, Geoff Callender < geoff.callender.jumpst...@gmail.com> wrote: > I can't see anything wrong with your code. As requested, here is a new > example: Event Bubbling With Context: > > > http://jumpstart.doublenegative.com.au/jumpstart7/examples/component/e

Re: Event Bubbling Help Required.

2014-08-30 Thread Geoff Callender
I can't see anything wrong with your code. As requested, here is a new example: Event Bubbling With Context: http://jumpstart.doublenegative.com.au/jumpstart7/examples/component/eventbubblingwithcontext Geoff On 30 Aug 2014, at 8:44 am, Sumanth wrote: > There is already a solution pr

Re: Event Bubbling Help Required.

2014-08-29 Thread Sumanth
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 ple

Re: Event Bubbling Help Required.

2014-08-29 Thread Yubraj Ghimire
sorry typo error with pageRenderlinkresources.. It should have been componentResources.triggerEventWithContext On Fri, Aug 29, 2014 at 11:59 PM, Yubraj Ghimire wrote: > Hello Guys, > > I've stumbled upon a problem with EventLinks and Im unable to find a > solution. > > I have a component A w

Re: Event Bubbling not working

2013-07-03 Thread Lance Java
Thanks guys, I think I might be able to handle the event in the pager. Ultimately the event needs to update a binding (the current page) and return the zone body to be rendered. I can probably pass the binding and the zone in the PagerContainerModel environmental. It's a bit messy but should work.

Re: Event Bubbling not working

2013-07-03 Thread Thiago H de Paula Figueiredo
On Tue, 02 Jul 2013 17:08:24 -0300, Lance Java wrote: Ah, gotcha. Can you elaborate on this complicated logic? Hmm, that complicated logic will be complicated. :P Tapestry has basically three ways of passing data between components, mixins and pages: 1) Component and mixin parameters (t

Re: Event Bubbling not working

2013-07-02 Thread Lance Java
Ah, gotcha. Can you elaborate on this complicated logic? On 2 Jul 2013 20:30, "Cezary Biernacki" wrote: > Hi Lace, > > PagerContainer is not a parent to Pager. > Pager is part of PageDemo page. > It is just rendered in body of of PagerContainer, > but it is not belong to PagerContainer, they do

Re: Event Bubbling not working

2013-07-02 Thread Cezary Biernacki
Hi Lace, PagerContainer is not a parent to Pager. Pager is part of PageDemo page. It is just rendered in body of of PagerContainer, but it is not belong to PagerContainer, they do not form any hierarchy. That is why the event bubbling seems not to work in this case. You would need more complica

Re: Event Bubbling not working

2013-07-02 Thread Dmitry Gusev
Can you verify that container of stitch.pager is PageContainer using ComponentResources.getContainer()? I can suggest its parent is actually PagerDemo. Can you move handlers there and check if bubbling works there? The only difference in your examples is that stitch.pager physically located in Pa

Re: Event Bubbling not working

2013-07-02 Thread Lance Java
Ok, I'm totally stumped. Event bubbling works here: http://tapestry-stitch.uklance.cloudbees.net/eventbubbledemo But doesn't work here: http://tapestry-stitch.uklance.cloudbees.net/pagerdemo I have eventlinks in Pager.tml Event1 Event2 Event3 And I have handlers in PagerContainer.java

Re: Event Bubbling not working

2013-07-02 Thread Lance Java
Hmm... I've stripped my example down to it's bare bones and events are now bubbling up... I must be doing something stupid in my original code. And yes, the parent component is in the components package, it's in mybasepackage.components. On 2 July 2013 16:19, Howard Lewis Ship wrote: > This is

Re: Event Bubbling not working

2013-07-02 Thread Howard Lewis Ship
This is odd; it feels like something in Tapestry that's too rock-solid to fail. Is there any chance the parent class is not being instrumented as a component class? What package is it in? On Tue, Jul 2, 2013 at 1:58 AM, Lance Java wrote: > As I said in my previous message, I've tried triggerEven

Re: Event Bubbling not working

2013-07-02 Thread Lance Java
As I said in my previous message, I've tried triggerEvent on the ComponentResources and ComponentResources.getContainerResources(). Neither bubble up to the parent.

Re: Event Bubbling not working

2013-07-02 Thread D.R.
Hi, ComponentResources.triggerEvent(...) is the way to go, isn't it? Parent.java: @OnEvent(component = "child", value = "childEventCall") void childEventCall(final String someString, final int someInt) { //dosomething } Child.java: void onSomeEvent() { _resources.tri

Re: Event Bubbling not working

2013-07-02 Thread Lance Java
No typos, if I move the event handler from parent to child it fires as expected. I've also tried ComponentResources.triggerEvent(...) and ComponentResources.getContainerResources().triggerEvent(...) in the child but nothing seems to bubble up. FYI This is tapestry 5.3.7

Re: Event Bubbling not working

2013-07-01 Thread Cezary Biernacki
Are you sure that your problem is not something trivial like e.g. a typo? Cezary On Mon, 1 Jul 2013 22:23:39 +0100 Lance Java wrote: I'm scratching my head over this one... hoping someone can point it out. I've got a page which renders a parent component. The parent component renders a child

Re: Event bubbling - how to implement a top level catch-all target

2009-09-30 Thread Massimo Lusetti
On Tue, Sep 29, 2009 at 11:24 PM, Andreas Pardeike wrote: > How can I make sure that information from component construction time will > survive so it can be used when the ajax event is processed? That's how things works, currently. It's a task for your "service" to provide that. Cheers -- Mas

Re: Event bubbling - how to implement a top level catch-all target

2009-09-29 Thread Andreas Pardeike
On 29 sep 2009, at 16.12, Thiago H. de Paula Figueiredo wrote: One simple question related to this: if I have a service that is used by many components and that holds a list of component related information, how do I make this request related? Your service must have the perthread scope. A

Re: Event bubbling - how to implement a top level catch-all target

2009-09-29 Thread Andreas Pardeike
Thanks for the reply Thiago. One simple question related to this: if I have a service that is used by many components and that holds a list of component related information, how do I make this request related? That is, if I want i.e. have a list of all those components nested ids for a given requ

Re: Event bubbling - how to implement a top level catch-all target

2009-09-29 Thread Thiago H. de Paula Figueiredo
Em Tue, 29 Sep 2009 11:08:01 -0300, Andreas Pardeike escreveu: Thanks for the reply Thiago. You're welcome! :) One simple question related to this: if I have a service that is used by many components and that holds a list of component related information, how do I make this request relate

Re: Event bubbling - how to implement a top level catch-all target

2009-09-29 Thread Thiago H. de Paula Figueiredo
Em Tue, 29 Sep 2009 03:21:40 -0300, Andreas Pardeike escreveu: Thiago, Hi! I have a test version up in a project and I wonder why Tapestry does not support this kind of loose event handling where components register themselves for zone refreshes or method calls that are related to events.

Re: Event bubbling - how to implement a top level catch-all target

2009-09-28 Thread Andreas Pardeike
Thiago, Actually, an error page is not what I want. I want to implement a message center (I call it switchboard) that distributes events and takes care of cross-component zone updates. I have a test version up in a project and I wonder why Tapestry does not support this kind of loose event handl

Re: Event bubbling - how to implement a top level catch-all target

2009-09-28 Thread Thiago H. de Paula Figueiredo
Em Mon, 28 Sep 2009 10:41:35 -0300, Cordenier Christophe escreveu: Hi Hi! Take a look ComponentEventRequestHandlerImpl, following code are calling the event on requested Component and Event : boolean handled = element.triggerContextEvent(parameters.getEventType(), parameters.getEvent

RE: Event bubbling - how to implement a top level catch-all target

2009-09-28 Thread Cordenier Christophe
Hi Since not handled event are considered as error, an exception is thrown when event is not handled. I think you can catch it in a ComponentEventRequestFilter instance. Take a look ComponentEventRequestHandlerImpl, following code are calling the event on requested Component and Event : boole

Re: Event bubbling question

2009-06-16 Thread Piero Sartini
> 2) Normally, what I do in these situations, is to encapsulate the > events with a custom event. That hides the details of component from > users of the component, so even if, eg, form component events change, > or if I change the guts of the component to operate differently, I can > still keep t

Re: Event bubbling question

2009-06-15 Thread Robert Zeigler
Two comments: 1) onSuccessFromComponent, in theory, should work, but IFF "Component" doesn't also have its own onSuccess handler. 2) Normally, what I do in these situations, is to encapsulate the events with a custom event. That hides the details of component from users of the component, s

Re: Event bubbling

2008-05-14 Thread Josh Canfield
I need two terms here and I don't know what they are, so I'll make something up and then someone can correct me. Owning Container: The component that owns the template that your component is referenced from. (eg Your Page) Render Container: The component that wraps your component in the Owning C

Re: Event bubbling

2008-05-14 Thread Toby Hobson
I've now managed to trigger an event in my component and handle it in the enclosing page but is there a way to make the event "bubble" up the component tree so that if a page doesn't handle the event, Border.java will. Basicall I'm looking for the event to behave like a RuntimeException - it wil

Re: Event bubbling

2008-02-18 Thread Francois Armand
Steph wrote: Each time a piece of information is rendered several times in a page. Say for example in a contact list. Each contact is displayed by a component including 'remove', 'update', 'details' links. I already know what you will say ... "move the handler from the page to the component" ;-

Re: Event bubbling

2008-02-18 Thread Steph
Each time a piece of information is rendered several times in a page. Say for example in a contact list. Each contact is displayed by a component including 'remove', 'update', 'details' links. I already know what you will say ... "move the handler from the page to the component" ;-) But, in th

Re: Event bubbling

2008-02-18 Thread Davor Hrg
please say more about your use case, maybe a different approach can help :) Davor Hrg On Feb 18, 2008 10:47 AM, Steph <[EMAIL PROTECTED]> wrote: > Thanks Davor for the explanation. > I understand the event type is intact but can you confirm me that i > can't make a distinction between all the eve

Re: Event bubbling

2008-02-18 Thread Steph
Thanks Davor for the explanation. I understand the event type is intact but can you confirm me that i can't make a distinction between all the events bubbling from B in my C component ? In practice, if i have 2 actionlinks A and A' in my B component. I don't know from which actionlink comes an

Re: Event bubbling

2008-02-18 Thread Davor Hrg
the event type is intact, but the source changes onSubmitFromA onSubmitFromB onActionFromA onActionFromB On Feb 18, 2008 10:26 AM, Steph <[EMAIL PROTECTED]> wrote: > Thanks Howard, > But if my event from A is seen as "FromB" in component C, all events > from components B are melted and one can'

Re: Event bubbling

2008-02-18 Thread Steph
Thanks Howard, But if my event from A is seen as "FromB" in component C, all events from components B are melted and one can't handle a specific event ! Shouldn't we be able to differ events from their id or at least from their type from Form, Links, ... ? Howard Lewis Ship a écrit : This si

Re: Event bubbling

2008-02-17 Thread Howard Lewis Ship
This simply isn't how its done. Once an event bubbles up from component A to container B to container C, it will appear as "FromB" in the methods of C. Is that clear? This is explicitly to enforce that component implementations are private to the component, such that a component (A or B) may chan

Re: Event bubbling

2008-02-16 Thread Steph
I've achieved to handle the event of my component in its container by changing the event handler like this : @OnEvent(component="the_name_of_my_component_in_the_container") So i can handle now all the events bubbling from my component. But what if i just want to handle the event of my 'detaillin

Re: Event bubbling in IE doesn't work

2007-04-16 Thread Diego
On 4/13/07, Kristian Marinkovic <[EMAIL PROTECTED]> wrote: ... maybe ff and ie handle this scenario differently... i'll test it and report my results on monday :) another solution would be to have a small script in place (onclick) that checks the incoming events on the div node and triggers th

Re: Event bubbling in IE doesn't work

2007-04-14 Thread Jesse Kuhnert
I'm shocked to hear that ie isn't behaving as expected! ;) http://www.quirksmode.org/js/introevents.html On 4/13/07, Diego <[EMAIL PROTECTED]> wrote: Hello, I want to use event bubbling to find out what checkbox is click with an Ajax call. To do this I attach the EventListener to a div surro