Uploaded image for project: 'Click'
  1. Click
  2. CLK-53

ClickUtils.copyFormToObject does not work on primitive properties

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: core
    • Labels:
      None
    • Environment:
      JDK1.5

      Description

      Don't know wheter it is a bug however:

      ClickUtils.copyFormToObject does not work on bean properties which take a primitive type as parameter. Ie setQuantity(int quant); setActive(boolean true);

      The reason is that the various if statements in the paramObject conversation do only check for the Object representation of the primitive types and not for the primitive types as such. ie

      if(paramClass == Integer.class) ...

      should be

      if(paramClass == Integer.class || paramClass == Integer.TYPE) ...

        Attachments

          Activity

            People

            • Assignee:
              medgar Malcolm Edgar
              Reporter:
              click_christian Christian Essl
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: