You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "Igor Vaynberg (JIRA)" <ji...@apache.org> on 2008/09/16 17:30:44 UTC

[jira] Resolved: (WICKET-1577) Int based PropertyModel throws convertion error

     [ https://issues.apache.org/jira/browse/WICKET-1577?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Igor Vaynberg resolved WICKET-1577.
-----------------------------------

    Resolution: Won't Fix
      Assignee: Igor Vaynberg  (was: Johan Compagner)

we are not going to do anything about this because the current behavior is correct. primitive types do not support null values, so if you want to have null use the equivalent object type. the definition of nullness varies for the primitive types per usecase so a global setting wont help; besides, it is very easy to perform the proper conversion in the imodel where it belongs.

> Int based PropertyModel throws convertion error
> -----------------------------------------------
>
>                 Key: WICKET-1577
>                 URL: https://issues.apache.org/jira/browse/WICKET-1577
>             Project: Wicket
>          Issue Type: Bug
>         Environment: Replicated on Windows XP and Mac OS X
>            Reporter: Michael Mehrle
>            Assignee: Igor Vaynberg
>             Fix For: 1.3.5
>
>         Attachments: patch-1577.diff
>
>
> Setup: Create a radio group that's tied to a propertymodel which is set to '0' by default, e.g.:
> RadioGroup myRadioGroup = new RadioGroup("interval"); // interval is an int property of a bean 
> When saving the form one encounters this error:
> org.apache.wicket.util.convert.ConversionException: Can't convert null value to a primitive class: int for setting it on com.evite.event.model.EventSchedule@1b33228[id=<null>]
>             at
> org.apache.wicket.util.lang.PropertyResolver$MethodGetAndSet.setValue(Pr
> opertyResolver.java:1079)
> When setting the value to anything else but '0' it doesn't throw this. Also, changing the model type to Integer fixes the issue. 
> Suspected bug and this issue was opened per Johan's request.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.