Thanks for your responses, my guess is that I should build one component that will render the dynamic part of the pages (it has the same appearance in all of them), ant this component will receive a parameter to specify the name of the SQL sentence that will feed it. This way, I can use the same class for all pages -or even no class at all, only .page files and the class for the component-. The rest of the details of the page (labels and titles, mostly) can be hardcoded as they're not dynamic.
I noticed that in Tapestry in Action, Howard uses inheritance very often, ie the ToDo examples. While it sounds like a desirable approach, I still can't force my mind to think in terms of page hierarchies. That's the reason why I asked this question... Regards, On 7/11/05, Pablo Ruggia <[EMAIL PROTECTED]> wrote: > If your java classes will look equals, then just create only one java class > and reference it from all your .page files. > If you have some logic, then create a super class and extend it when you > need it. > You should subclass only for things like data, security, logic, etc. > > For same titlte, layout, etc, the best way to achive it is by creating a > Border component and include it in your page templates. > > > On 7/11/05, Darío Vasconcelos <[EMAIL PROTECTED]> wrote: > > > > Hi, > > > > I have a burning question in my mind: suppose I have 10 pages that > > have the same basic layout: some titles and a table containing the > > results from some DB query. Now, I know I can use the power of > > Tapestry to build components out of my 10 pages and that would save me > > a lot of effort. My question is, what about the .java files? Should > > they use some kind of inheritance? I'm thinking they might only > > implement pageBeginRender, that's all the funcionality my pages need. > > Is it worth to define a class hierarchy and thus create a .java file > > per each .html and .page? Or is there a nicer way to to this? > > > > Regards, > > > > -- > > Communism is man's exploitation of man. Capitalism is just the opposite. > > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: > [EMAIL PROTECTED] > > For additional commands, e-mail: > [EMAIL PROTECTED] > > > > > > -- Communism is man's exploitation of man. Capitalism is just the opposite. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]