You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "Alec Swan (JIRA)" <ji...@apache.org> on 2012/09/09 09:00:07 UTC

[jira] [Created] (WICKET-4755) "'NEW VALUE' is not a valid Serializable" error during ajax form submission

Alec Swan created WICKET-4755:
---------------------------------

             Summary: "'NEW VALUE' is not a valid Serializable" error during ajax form submission
                 Key: WICKET-4755
                 URL: https://issues.apache.org/jira/browse/WICKET-4755
             Project: Wicket
          Issue Type: Bug
    Affects Versions: 1.5.8
            Reporter: Alec Swan


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

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Resolved] (WICKET-4755) "'NEW VALUE' is not a valid Serializable" error during ajax form submission

Posted by "Sven Meier (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/WICKET-4755?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Sven Meier resolved WICKET-4755.
--------------------------------

       Resolution: Fixed
    Fix Version/s: 6.1.0
         Assignee: Sven Meier

DefaultConverter now casts if possible
                
> "'NEW VALUE' is not a valid Serializable" error during ajax form submission
> ---------------------------------------------------------------------------
>
>                 Key: WICKET-4755
>                 URL: https://issues.apache.org/jira/browse/WICKET-4755
>             Project: Wicket
>          Issue Type: Bug
>    Affects Versions: 1.5.8
>            Reporter: Alec Swan
>            Assignee: Sven Meier
>             Fix For: 6.1.0
>
>
> 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

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Updated] (WICKET-4755) "'NEW VALUE' is not a valid Serializable" error during ajax form submission

Posted by "Alec Swan (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/WICKET-4755?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Alec Swan updated WICKET-4755:
------------------------------

    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

  was:
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

    
> "'NEW VALUE' is not a valid Serializable" error during ajax form submission
> ---------------------------------------------------------------------------
>
>                 Key: WICKET-4755
>                 URL: https://issues.apache.org/jira/browse/WICKET-4755
>             Project: Wicket
>          Issue Type: Bug
>    Affects Versions: 1.5.8
>            Reporter: Alec Swan
>
> 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

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira