I've faced the same situation more than once trying to build my own components that extend or slightly changes some existing T5-core component. For example, subclassing the Label component so it always ignores its body and generates the label name from the corresponding field id. That could be (almost) accomplished if I could override its afterRender() method (http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/corelib/components/Label.java?view=markup). The only solution I've found yet was copying the original component class and then changing it.

Other examples are an ActionLink and a PageLink subclasses that have it's own activation context logic, having an object as parameter, not the context value itself. Again, I had to copy code instead of subclassing.

Question to Howard: instead of having package visibility, could the core components have methods with protected visibility? And could their fields hava protected getters, so component subclasses can access superclass' parameter values? Or the current situation is the best one?

Thank you very much in advance.

Thiago

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to