I agree.
I'm upgrading a big project from tapestry 3 to 5.
As I looked into the documentation and sources of tapestry 5 I thought:
wow, this is really great. it could not be any better!
But if components are no meant to be subclassed this seems like a
drawback for me. You have to copy and adjust the code which does not fit
into the tapestry world (DRY principle)
If you use embedded components to extend a component you need an
additional (more or less useless) template file and you come in trouble
if you use this component multiple times in a page (because of the
embedded components id binding)
Anyway, even if there is way to get around these problems with embedded
components I described, it would feel more natural for me if I just
could subclass a component.
Andreas
I ended up copying
Nicolas Bouillon wrote:
Le 11/05/2010 21:34, Thiago H. de Paula Figueiredo a écrit :
1.) Extend MySelect from Select
I found no way to assign my model to the selects privat model. There
is a setModel in Select but it seems to be there only for unit tests.
Tapestry components weren't meant to be subclassed.
By the way, why that ?
It's one thing I felt difficult, for example to change the way the
GridPager is displayed (to display the number of pages, number of
items), we had to do a big copy paste of the Grid component and the
related components, instead of subclassing it.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org