You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Jencity <je...@hotmail.com> on 2011/08/17 13:18:23 UTC

NumberFormatException

Hello,

i have got a problem with getting my form working. I have got a form called
gatewayForm. I added several textfields and a CompoundPropertyModel to this
form. Everytime I submit the form I get a NumberFormatException. All
textfields are Strings.

/
TextField<String> name = new TextField<String>("name");
...
Form gatewayForm = new Form("gatewayForm");
CompoundPropertyModel gatewayModel = new CompoundPropertyModel(gateway);
gatewayForm.setModel(gatewayModel);
gatewayForm.add(name);
.../

I tried different notations, but the failure doesn't change. I hope someone
can explain me why this happens or how to get it working. 

Thank you very much,

Jencity

--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/NumberFormatException-tp3749632p3749632.html
Sent from the Users forum mailing list archive at Nabble.com.

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


Re: NumberFormatException

Posted by Andrea Del Bene <an...@libero.it>.
Hi  Jencity,

you use 'gateway' as model object. Probably this object has one or more 
numeric field binded to a String TextField.
In this case you should use a numeric TextField (for example 
TextField<Integer>...)


> Hello,
>
> i have got a problem with getting my form working. I have got a form called
> gatewayForm. I added several textfields and a CompoundPropertyModel to this
> form. Everytime I submit the form I get a NumberFormatException. All
> textfields are Strings.
>
> /
> TextField<String>  name = new TextField<String>("name");
> ...
> Form gatewayForm = new Form("gatewayForm");
> CompoundPropertyModel gatewayModel = new CompoundPropertyModel(gateway);
> gatewayForm.setModel(gatewayModel);
> gatewayForm.add(name);
> .../
>
> I tried different notations, but the failure doesn't change. I hope someone
> can explain me why this happens or how to get it working.
>
> Thank you very much,
>
> Jencity
>
> --
> View this message in context: http://apache-wicket.1842946.n4.nabble.com/NumberFormatException-tp3749632p3749632.html
> Sent from the Users forum mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>


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