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.

--
Thiago H. de Paula Figueiredo
Independent Java, Apache Tapestry 5 and Hibernate consultant, developer, and instructor
Owner, Ars Machina Tecnologia da Informação Ltda.
http://www.arsmachina.com.br

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

Reply via email to