Uploaded image for project: 'Wicket'
  1. Wicket
  2. WICKET-4755

"'NEW VALUE' is not a valid Serializable" error during ajax form submission

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.5.8
    • Fix Version/s: 6.1.0
    • Component/s: None
    • Labels:
      None

      Description

      I attached a quickstart with a test in TestHomePage#formSubmitsSuccessfully.

      The test throws "'NEW VALUE' is not a valid Serializable" error when "NEW VALUE" string in "value" textField is submitted as a part of myForm ajax submission.

      The problem is that a call to Objects#convertValue(nonNullNonArrayValue, Object.class) will always return null if nonNullNonArrayValue is a value that is not null and not an array! Shouldn't it always return the first parameter when the second parameter is Object.class?

      Sven on Wicket forum suggested to fix this as by adding another if-statement in Objects#convertValue() if (toType.isInstance(value)) {
      result = toType.cast(value);
      }

      See the following forum thread for more information http://apache-wicket.1842946.n4.nabble.com/Issues-with-default-type-conversion-in-1-5-td4651857.html

        Attachments

          Activity

            People

            • Assignee:
              svenmeier Sven Meier
              Reporter:
              alecswan Alec Swan
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: