On Thu, May 13, 2010 at 3:29 PM, Thiago H. de Paula Figueiredo <
thiag...@gmail.com> wrote:

> On Thu, 13 May 2010 15:44:50 -0300, Benny Law <benny.mk....@gmail.com>
> wrote:
>
>  I want the user to consciously choose a value.
>>
>
> <select t:type="Select" validate="required" blankOption="always" ...> does
> the trick, no?
>

No, because I don't want the blank option if there is only one valid option
in the model, or if there is a valid initial value (if the bound property is
not null to begin with and is one of the valid options). Again, this logic
depends on the number of options available (as well as the current value),
and I don't know the option list size if it is a dynamic list.

I want this logic in the Select component across the board because it is
generic and not specific to special cases. I don't want to incur extra code
per usage. The simplest solution is just to override the spot in Select
where it decides what to do when BlankOption is AUTO. It's a very simple
case where inheritance + override would be very effective.


>
> --
> 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