You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Ted Steen <te...@gmail.com> on 2007/10/17 17:45:01 UTC

T5: Why does the default string translator translate the empty string to null?

In most cases I want my empty text areas and text fields to translate
to an empty string.
especially when my model is a hibernate entity with not null constraints.
Now I have to contribute my own translator and also add
translator="myTranslator" on every field...

So, what is so good about translating to null?

-- 
/ted

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


Re: T5: Why does the default string translator translate the empty string to null?

Posted by Yunhua Sang <yu...@gmail.com>.
Your way may reduce the portability of your application.

In Oracle, there is no difference between empty text and NULL, empty text is
NULL.

Yunhua

On 10/17/07, Ted Steen <te...@gmail.com> wrote:
>
> In most cases I want my empty text areas and text fields to translate
> to an empty string.
> especially when my model is a hibernate entity with not null constraints.
> Now I have to contribute my own translator and also add
> translator="myTranslator" on every field...
>
> So, what is so good about translating to null?
>
> --
> /ted
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>