just committed it:

FormComponent
protected Object convertValue(String value) throws ConversionException
    {
        return value != null?value.trim():null;
    }

so if you don't want trimming, override that method and return directly the value.

I think it is a better default.

We could make a global property to switch it again, but personally i don't see many uses for that.

johan



On 3/10/06, Ari Suutari <[EMAIL PROTECTED]> wrote:
To sum up discussion, I understood that trimming is going
to be default behaviour on text fields (soon) ? Correct ?

    Ari S.

----- Original Message -----
From: "Ari Suutari" < [EMAIL PROTECTED]>
To: <wicket-user@lists.sourceforge.net>
Sent: Monday, March 06, 2006 3:25 PM
Subject: [Wicket-user] TextField and trimming blanks at end (and maybe at beginning)


> Hi,
>
> What might be the simplest way to change behaviour of whole wicket application
> so that TextField have their input trimmed of blanks at end ?
>
> I tried to do this via converters (I have my own converter factory),
> but it didn't work because Converter.convert doesn't do anything
> if String is being assigned to String field in model (it uses isAssignableFrom
> for this check).
>
>    Ari S.
>
>
>
>
> -------------------------------------------------------
> This SF.Net email is sponsored by xPML, a groundbreaking scripting language
> that extends applications into web and mobile media. Attend the live webcast
> and join the prime developer group breaking into this new coding territory!
> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
> _______________________________________________
> Wicket-user mailing list
> Wicket-user@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/wicket-user
>


-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user

Reply via email to