What kind of model are you attaching to a the text field? Anyway, you could
always do:

public class EmptyStringModel extend WhatEverModelYouAreUsing<String> {

     .....Constructors....

     public void setObject(String value) {
         if(value != null) {
             super.setObject(value);
         } else {
             super.setObject("");
         }
     }
}

and use EmptyStringModel  instead of the one you are using now?

Best

Ernesto

On Wed, Feb 25, 2009 at 9:21 AM, SantiagoA <[email protected]> wrote:

>
> I have a TextField with some input.
> If a user deletes the input and submit the setter sets the value to "NULL".
> How can i avoid this behavior and force an empty String "" to bet set?
>
> Thanks for any help!
> Santiago
> --
> View this message in context:
> http://www.nabble.com/how-to-avoid-value-set-to-null-if-value-of-textfield-gets-deleted-tp22198221p22198221.html
> Sent from the Wicket - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>
>

Reply via email to