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

Andrea Del Bene commented on WICKET-5603:
-----------------------------------------

OnChangeAjaxBehavioris triggered by two events: 'inputchange' and 'change'. 
Some browser (like Chrome and Opera) are compatible with boyh of them, that's 
why AJAX request is done twice.
I did some tests and I think we could solve this issue using just 'change' 
event. I've tried this fix with Opera, Chrom Firefox and IE 8.
In the meantime as workaround you could substitute OnChangeAjaxBehavior with 
'new AjaxFormComponentUpdatingBehavior("change")' .

> OnChangeAjaxBehavior attached to DropDownChoice produces two Ajax requests in 
> Chrome v35
> ----------------------------------------------------------------------------------------
>
>                 Key: WICKET-5603
>                 URL: https://issues.apache.org/jira/browse/WICKET-5603
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>    Affects Versions: 6.9.1
>         Environment: Chrome 35.0.1916.114
>            Reporter: Andrey Krasnopolsky
>         Attachments: test.zip
>
>
> I have a DropDownChoice with attached OnChangeAjaxBehavior, like this:
> {code:borderStyle=solid}
> new DropDownChoice<>("dd", new Model<>(), Arrays.asList( "First", "Second"))
>     .add( new OnChangeAjaxBehavior() {
>         @Override
>         protected void onUpdate(AjaxRequestTarget target) {
>             System.out.println( "update" );
>         }
> });
> {code}
> When selecting any of drop down options, two Ajax requests being generated.
> It behaves OK in IE, FF and Chrome v34, only Chrome v35 is affected 
>  



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

Reply via email to