You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tapestry.apache.org by Petter Måhlén <pe...@elevance.se> on 2004/03/04 11:51:11 UTC
Order of pageBeginRender events
Hi,
As you guys probably have seen, I have had some problems with understanding
the way that component rendering happens (actually, pageBeginRender events
are fired). I even filed a bug report,
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=27415. I have looked
around a bit in the source, and have tentatively come up with an idea that I
think might be a simplification for developers using Tapestry. As far as I
can understand from the behaviour of my Tapestry application, the order of
the event listeners returned by
javax.swing.event.EventListenerList.getEventListenerList() is kind of
undefined. Or, potentially, it is the order in which event listeners are
added by Tapestry that is undefined and will vary from time to time. For me,
it would be nice to be able to know that when an event listener for a
component is called, the event listeners for the containing component has
already been executed. That means that a depth-first search through the
event listeners would be appropriate:
Page
Component 1
Component 1.1
Component 1.2
Component 2
Component 2.1
Component 2.2
One possible order for the event listeners could be:
Page
Component 1
Component 1.2
Component 1.1
Component 2
Component 2.1
Component 2.2
I think that one way of ensuring that is through subclassing the
EventListenerList class, or maybe even through implementing a completely new
class. But before looking into something like that, I would like to bounce
it off people on this list to see if first, this is a problem at all,
second, if it is an OK solution.
/ Petter
---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-dev-help@jakarta.apache.org