Wicket
  1. Wicket
  2. WICKET-1577

Int based PropertyModel throws convertion error

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Won't Fix
    • Affects Version/s: None
    • Fix Version/s: 1.3.5
    • Component/s: None
    • Labels:
      None
    • Environment:
      Replicated on Windows XP and Mac OS X

      Description

      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.

      1. patch-1577.diff
        3 kB
        Bruno Borges

        Activity

        Michael Mehrle created issue -
        Igor Vaynberg made changes -
        Field Original Value New Value
        Assignee Johan Compagner [ jcompagner ]
        Martijn Dashorst made changes -
        Fix Version/s 1.3.5 [ 12313175 ]
        Fix Version/s 1.3.4 [ 12313089 ]
        Bruno Borges made changes -
        Attachment patch-1577.diff [ 12390157 ]
        Igor Vaynberg made changes -
        Resolution Won't Fix [ 2 ]
        Assignee Johan Compagner [ jcompagner ] Igor Vaynberg [ ivaynberg ]
        Status Open [ 1 ] Resolved [ 5 ]

          People

          • Assignee:
            Igor Vaynberg
            Reporter:
            Michael Mehrle
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development