You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "dan simko (JIRA)" <ji...@apache.org> on 2012/07/07 13:14:33 UTC
[jira] [Created] (WICKET-4643)
AjaxFormChoiceComponentUpdatingBehavior not set model object
dan simko created WICKET-4643:
---------------------------------
Summary: AjaxFormChoiceComponentUpdatingBehavior not set model object
Key: WICKET-4643
URL: https://issues.apache.org/jira/browse/WICKET-4643
Project: Wicket
Issue Type: Bug
Components: wicket
Affects Versions: 6.0.0
Reporter: dan simko
AjaxFormChoiceComponentUpdatingBehavior cause ajax request but model object is not set. Quickstart is attached.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Reopened] (WICKET-4643)
AjaxFormChoiceComponentUpdatingBehavior not set model object
Posted by "Martin Grigorov (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/WICKET-4643?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Martin Grigorov reopened WICKET-4643:
-------------------------------------
Assignee: Martin Grigorov
I reverted to use POST method again for FormChoiceComponentUpdatingBehavior.
If POST data is added dynamically then set the content type to jqXHR manually.
Dynamic extra parameters are added in #beforeSend() since WICKET-4606 as an optimization to not calculate them if a precondition disallows the Ajax call.
> AjaxFormChoiceComponentUpdatingBehavior not set model object
> ------------------------------------------------------------
>
> Key: WICKET-4643
> URL: https://issues.apache.org/jira/browse/WICKET-4643
> Project: Wicket
> Issue Type: Bug
> Components: wicket
> Affects Versions: 6.0.0
> Reporter: dan simko
> Assignee: Martin Grigorov
> Fix For: 6.0.0-RC1
>
> Attachments: quickstart1.zip
>
>
> AjaxFormChoiceComponentUpdatingBehavior cause ajax request but model object is not set. Quickstart is attached.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Resolved] (WICKET-4643)
AjaxFormChoiceComponentUpdatingBehavior not set model object
Posted by "Martin Grigorov (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/WICKET-4643?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Martin Grigorov resolved WICKET-4643.
-------------------------------------
Resolution: Fixed
> AjaxFormChoiceComponentUpdatingBehavior not set model object
> ------------------------------------------------------------
>
> Key: WICKET-4643
> URL: https://issues.apache.org/jira/browse/WICKET-4643
> Project: Wicket
> Issue Type: Bug
> Components: wicket
> Affects Versions: 6.0.0
> Reporter: dan simko
> Assignee: Martin Grigorov
> Fix For: 6.0.0-RC1
>
> Attachments: quickstart1.zip
>
>
> AjaxFormChoiceComponentUpdatingBehavior cause ajax request but model object is not set. Quickstart is attached.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (WICKET-4643)
AjaxFormChoiceComponentUpdatingBehavior not set model object
Posted by "dan simko (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/WICKET-4643?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
dan simko updated WICKET-4643:
------------------------------
Attachment: quickstart1.zip
> AjaxFormChoiceComponentUpdatingBehavior not set model object
> ------------------------------------------------------------
>
> Key: WICKET-4643
> URL: https://issues.apache.org/jira/browse/WICKET-4643
> Project: Wicket
> Issue Type: Bug
> Components: wicket
> Affects Versions: 6.0.0
> Reporter: dan simko
> Attachments: quickstart1.zip
>
>
> AjaxFormChoiceComponentUpdatingBehavior cause ajax request but model object is not set. Quickstart is attached.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Resolved] (WICKET-4643)
AjaxFormChoiceComponentUpdatingBehavior not set model object
Posted by "Sven Meier (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/WICKET-4643?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Sven Meier resolved WICKET-4643.
--------------------------------
Resolution: Fixed
Fix Version/s: 6.0.0-RC1
switched from post to get, since without data jQuery will not set contentType
> AjaxFormChoiceComponentUpdatingBehavior not set model object
> ------------------------------------------------------------
>
> Key: WICKET-4643
> URL: https://issues.apache.org/jira/browse/WICKET-4643
> Project: Wicket
> Issue Type: Bug
> Components: wicket
> Affects Versions: 6.0.0
> Reporter: dan simko
> Fix For: 6.0.0-RC1
>
> Attachments: quickstart1.zip
>
>
> AjaxFormChoiceComponentUpdatingBehavior cause ajax request but model object is not set. Quickstart is attached.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (WICKET-4643)
AjaxFormChoiceComponentUpdatingBehavior not set model object
Posted by "Sven Meier (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/WICKET-4643?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13408889#comment-13408889 ]
Sven Meier commented on WICKET-4643:
------------------------------------
When wicket-ajax-jquery calls jQuery.ajax(), it passes the serialized field as the settings' data. But since the choice is not actually a form component, data is empty.
Since data is empty, jQuery doesn't set the default content-type (would be application/x-www-form-urlencoded):
if ( s.data && s.hasContent && s.contentType !== false || options.contentType ) {
jqXHR.setRequestHeader( "Content-Type", s.contentType );
}
settings.data *is* changed in beforeSend() via AjaxFormChoiceComponentUpdatingBehavior's attrs.dep (dynamic extra parameters), but this is too late for the content-type.
Without "application/x-www-form-urlencoded" contentType, Wicket doesn't get hold on the post parameters via request#getParameter().
I've fixed the problem by using a GET instead of a POST. I'm not sure whether it would be better to evaluate attrs.dep *before* invoking jQuery's ajax() though.
> AjaxFormChoiceComponentUpdatingBehavior not set model object
> ------------------------------------------------------------
>
> Key: WICKET-4643
> URL: https://issues.apache.org/jira/browse/WICKET-4643
> Project: Wicket
> Issue Type: Bug
> Components: wicket
> Affects Versions: 6.0.0
> Reporter: dan simko
> Attachments: quickstart1.zip
>
>
> AjaxFormChoiceComponentUpdatingBehavior cause ajax request but model object is not set. Quickstart is attached.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira