You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "Andrea Del Bene (JIRA)" <ji...@apache.org> on 2013/05/21 16:05:17 UTC

[jira] [Comment Edited] (WICKET-5194) Adding AjaxFormValidatingBehavior to the form prevents form from being filled

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

Andrea Del Bene edited comment on WICKET-5194 at 5/21/13 2:03 PM:
------------------------------------------------------------------

Yes, behavior still be as in 6.6.0. The point is that from ver 6.7.0 to 6.8.0 function Wicket.Ajax.ajax has been changed adding 'Wicket.Ajax._handleEventCancelation(attributes)' which by default  invokes 'evt.preventDefault()'. This last invocation is controlled by attribute AjaxRequestAttributes.allowDefault which is false by default.
In short with ver 6.8.0 every event-based AJAX behavior prevent the default event handling by default. If we try to use an AjaxEventBehavior like this:

textfield.add(new AjaxEventBehavior("keydown") {
			
	@Override
	protected void onEvent(AjaxRequestTarget target) {
				
				
        }
});

we obtain the same issue described here (the textfield is not editable).
                
      was (Author: bitstorm):
    From ver 6.7.0 to 6.8.0 function Wicket.Ajax.ajax has been changed adding 'Wicket.Ajax._handleEventCancelation(attributes)' which by default  invokes 'evt.preventDefault()'. This last invocation is controlled by attribute AjaxRequestAttributes.allowDefault which is false by default.
In short with ver 6.8.0 every event-based AJAX behavior prevent the default event handling by default. If we try to use an AjaxEventBehavior like this:

textfield.add(new AjaxEventBehavior("keydown") {
			
	@Override
	protected void onEvent(AjaxRequestTarget target) {
				
				
        }
});

we obtain the same issue described here (the textfield is not editable).
                  
> Adding AjaxFormValidatingBehavior to the form prevents form from being filled
> -----------------------------------------------------------------------------
>
>                 Key: WICKET-5194
>                 URL: https://issues.apache.org/jira/browse/WICKET-5194
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>    Affects Versions: 6.8.0
>            Reporter: Maxim Solodovnik
>         Attachments: WICKET-5178.patch
>
>
> It is impossible to enter any text in the form fields in case
> AjaxFormValidatingBehavior.addToAllFormComponents(form, "keydown", Duration.ONE_SECOND);
> was added.
> Everything works as expected in 6.7.0

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