Thanks for the comments. Building components does indeed sound like the "proper" way to do it. And creating components is not a difficult thing to do. But where can I find some material on these "...Link" classes -- it would be good if there were some explanation or even examples. The code is hard to comprehend.
Regards, Willem -----Original Message----- From: Jesse Kuhnert [mailto:[EMAIL PROTECTED] Sent: vrijdag 26 mei 2006 22:17 To: Tapestry users Subject: Re: subclass or bean? It depends on exactly what kind of functionality you are working with in these listeners, but I would probably do something similar to: -) If you do have functionality that's not related to the web stuff at all make it a bean that is managed via hivemind, ie make it a service that you inject. http://jakarta.apache.org/hivemind/hivemind/BuilderFactory.html -) Try to avoid subclassing whenever possible. Sometimes it's needed, but often times it usually means there might be a better way. In your case I would do what comes naturally in tapestry when you have common functionality like this, create components. (they can have listeners and do pretty much anything that a page can do ) Wrap all of it in a Border component that itself just wraps these components. Most Border components (you can find ample examples in the tapestry example apps ) wrap Shell Body (custom common fucntionality components, like navigation/etc..) @RenderBody to allow your page to have its content written, and finally a common footer. On 5/26/06, Willem van Asperen <[EMAIL PROTECTED]> wrote: > > Hello, > > I have a set of pages that have very similar behavior. They have listeners > like "handleTransition" and "startNewProcess". The first implementation I > did was, obviously, to capture all these general functionality into XXX a > subclass of BasePage and then sub class my page classes YYY from there. > > Now I can DirectLink to these general listeners directly. > > But -- is that the natural way to implement this? Should I not capture the > general functionality into a bean that is "injected" into the page? But do I > then need to manually wire the listener of the page to the bean's methods? > > Is there a way to <page-description> for the XXX page, such that these are > true for all descendents of it? > > Thanks for your thoughts, > > Regards, > > Willem van Asperen > > PA Consulting Group > Innovation. Responsiveness. Delivery. > Coltbaan 33 > P.O. Box 1043 > 3430 BA Nieuwegein > The Netherlands> > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > -- Jesse Kuhnert Tacos/Tapestry, team member/developer Open source based consulting work centered around dojo/tapestry/tacos/hivemind. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]