Thank you for that clarification!
But what am I supposed to put in that template, if I bound all the parameters already in the java class?

java:
     @Component(parameters= { "model=myModel", "value=myValue" })
     private Select select;

and again(?) in the template:

<t:select t:id="select" model="myModel" value="myValue/>

Can you give me a hint, please?
Thanks,
Andreas



Thiago H. de Paula Figueiredo wrote:
On Tue, 11 May 2010 16:01:56 -0300, Andreas Bohnert <a...@weberhofer.at> wrote:

Hi,

Hi!

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.

2.) Embed Select in MySelect
It seems that I have to provide a template for this approach (I'm getting this error described at http://tapestry.apache.org/tapestry5/guide/component-classes.html). I don't want to provide a template. I just want to pass my model to the component, which I did as described:

     @Component(parameters= { "model=myModel", "value=myValue" })
     private Select select;

Is there a way to do this without a template?

No.

Is there a better way to do this at all?

You could also create your own component extending AbstractField and taking some inspiration from the Select source.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org

Reply via email to