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

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

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 1.5.8
    • 6.1.0
    • None
    • 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

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

            Dates

              Created:
              Updated:
              Resolved: