You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "Sven Meier (JIRA)" <ji...@apache.org> on 2014/08/04 08:33:12 UTC

[jira] [Commented] (WICKET-5658) Incorrect behaviour of AjaxFormComponentUpdatingBehavior

    [ https://issues.apache.org/jira/browse/WICKET-5658?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14084358#comment-14084358 ] 

Sven Meier commented on WICKET-5658:
------------------------------------

Returning false from #getUpdateModel() is meant to be used by behavior that update the component's model by themselves (after doing something which needs the old value).

I assume you're trying to do some validation here, am I right?

> Incorrect behaviour of AjaxFormComponentUpdatingBehavior
> --------------------------------------------------------
>
>                 Key: WICKET-5658
>                 URL: https://issues.apache.org/jira/browse/WICKET-5658
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>    Affects Versions: 6.16.0
>            Reporter: Ilia Naryzhny
>              Labels: ajax, dropdown
>
> Setup: case requires OnChangeAjaxBehavior with getUpdateModel returning false on DropDownChoice.
> Result: ajax response contain model's object, but not new value.
> Explanation: There is following lines in AjaxFormComponentUpdatingBehaviour
> 			formComponent.inputChanged();
> 			formComponent.validate();
> 			if (formComponent.isValid())
> 			{
> >>>>>>>>		formComponent.valid();
> 				if (getUpdateModel())
> 				{
> 					formComponent.updateModel();
> 				}
> 				onUpdate(target);
> 			}
> Let me note that "formComponent.valid()" is cleaning raw Input. But it's required in subsequent AbstractChoice.onComponentTagBody.



--
This message was sent by Atlassian JIRA
(v6.2#6252)