You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Pablo Ruggia <pr...@gmail.com> on 2005/04/21 15:48:58 UTC

Specification Inheritance

Hi !!

I'm new to Tapestry and I've found a limitation that I don't like very much.
When I extend a Component, I can't inherit it's "supercomponent" specification.
I have to copy-paste, all properties, beans and assets i want to have
from superclass.
Am I correct, or there is some way to achieve it without copy-paste.

Thanks.

---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org


Re: Specification Inheritance

Posted by Ivano <i....@mclink.it>.
Hola Pablo,
as already stated Tapestry should be used with a collaboration 
development strategy instead of inheritance.
When you inherit a component, you're only inheriting his 
javaclass-defined properties.
Since much of the descriptive behaviour of the component is in the jwc 
descriptor you don't get that as part of the contract.
To better understand this you should think of the feature of creating 
abstract classes that the framework will complete for you.

I like this approach for 2 main reasons:
- I try to separate description from behaviour, creating subclasses of 
components only to create
    controllers (in MVC meaning) or unique complex features that the 
base component doesn't offer
- I appreciate the great freedom offered in component reuse for 
different contexts, by just creating different jw descriptors

Hope it helped, bye!

Ivano.

Pablo Ruggia wrote:

>Hi !!
>
>I'm new to Tapestry and I've found a limitation that I don't like very much.
>When I extend a Component, I can't inherit it's "supercomponent" specification.
>I have to copy-paste, all properties, beans and assets i want to have
>from superclass.
>Am I correct, or there is some way to achieve it without copy-paste.
>
>Thanks.
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>
>
>
>  
>

---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org