I've got a page-class hierachy which all use component BaseLayout as their
layout. This BaseLayout-component contains a component called QuickForm. 

Each page-class must render a QuickForm-component but the implementation may
differ (so there is more than 1 actual QuickForm-component. 

I started experimenting with the following: 

BaseLayout
-----------------------------
@Component
@Parameter(required=true)
private QuickForm quickForm;


SuperPage
---------------------------
@Component(parameters = {"page=this","quickform=quickform"})
private BaseLayout bl;
        
@Component
private QuickForm quickForm;

So that he actual quickform can be passed as a parameter from (int this
case) SuperPage to baselayout. 
However, then component quickForm in class SuperPage must exist in the
template, which can be done by putting it in a block,  (But SuperPage is
just what its called, an abstract base-class ,which doens't have a
termplate, so I must put the block in the templates of all actual
implementations of SuperPage, etc. ,etc. ) Excuse the ranting, but I think
you get the point.

All in all, I don't like this approach at all. Am I missing something here? 

Thanks in advance,
Geert-Jan 
-- 
View this message in context: 
http://www.nabble.com/T5%3A-how-to-let-subclass-decide-which-component-to-render-tf4820991.html#a13792436
Sent from the Tapestry - User mailing list archive at Nabble.com.


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

Reply via email to