Thanks for your input, Johan.

Alright, I changed the model to an Integer and that fixed it. So it does
seem that this may be a bug - I'm opening a Jira issue for this.

Thanks,

Michael

-----Original Message-----
From: Johan Compagner [mailto:[EMAIL PROTECTED] 
Sent: Monday, April 28, 2008 11:48 PM
To: users@wicket.apache.org
Subject: Re: Int based PropertyModel throws convertion error

Thats weird somehow it translates 0 to null.
Dont know where or why it would do that. Can you make a jira issue for
this?

On 4/29/08, Michael Mehrle <[EMAIL PROTECTED]> wrote:
> I've got a radio group that's tied to a propertymodel which is set to
> '0' by default:
>
>
>
> RadioGroup monthlyRadioGroup = new
> RadioGroup("eventSchedule.intervalOfMonth");
>
>
>
> When saving my form I get this error:
>
>
>
> org.apache.wicket.util.convert.ConversionException: Can't convert null
> value to a primitive class: int for setting it on
> [EMAIL PROTECTED]<null>]
>
>             at
>
org.apache.wicket.util.lang.PropertyResolver$MethodGetAndSet.setValue(Pr
> opertyResolver.java:1079)
>
>
>
> I can see the value of intervalOfMonth being '0' in the setter/getter.
>
>
>
> When I set the value to anything else but '0' it doesn't throw this.
I'm
> must be missing something here, but '0' should be allowed, correct?
>
>
>
> Michael
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to