You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "Stefan Franke (Jira)" <ji...@apache.org> on 2020/12/17 09:35:00 UTC

[jira] [Comment Edited] (WICKET-6854) OnChangeAjaxBehaviour is not called if the last character gets removed.

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

Stefan Franke edited comment on WICKET-6854 at 12/17/20, 9:34 AM:
------------------------------------------------------------------

It is only about the assumption that a Behaviour has a defined behavior, which must not change by features of any class.

Therefore the assumption is wrong and actually also the class name.

At least the documentation should be adapted so that the Behaviour does not always behave the same way. Who knows what surprises are waiting for you, depending on which component the Behaviour is used in.

Regarding onError(), etc. p.p.
 It doesn't bother when onError() is called, but it doesn't solve the problem of the Behaviour not behaving correctly.
 I'm already using a derived class that fixes the botch. It calls onError() as well as the Behaviour.


was (Author: bebbo):
It is only about the assumption that a Behaviour has a defined behavior, which must not change by features of any class.

Therefore the assumption is wrong and actually also the class name.

At least the documentation should be adapted so that the Behaviour does not always behave the same way. Who knows what surprises are waiting for you, depending on which component the Behaviour is used in.

Regarding onError(), etc. p.p.
It doesn't bother when onError() is called, or puked on the carpet, but it doesn't solve the problem of the Behaviour not behaving correctly.
I'm already using a derived class that fixes the botch. It calls onError() as well as the Behaviour.

> OnChangeAjaxBehaviour is not called if the last character gets removed.
> -----------------------------------------------------------------------
>
>                 Key: WICKET-6854
>                 URL: https://issues.apache.org/jira/browse/WICKET-6854
>             Project: Wicket
>          Issue Type: Bug
>            Reporter: Stefan Franke
>            Assignee: Martin Tzvetanov Grigorov
>            Priority: Major
>         Attachments: bar.zip
>
>
> Consider this code where a TextField gets a OnChangeAjaxBehaviour 
> {code:java}
> // 
> TextField<String> tf = new TextField<>("id", model);
> tf.add(new OnChangeAjaxBehaviour() {
>   public void onUpdate(AjaxRequestTarget target) {
>     LOG.debug("update");
>   }
> }
> form.add(tf){code}
> entering and modifying text into the TextField is working.
> deleting mostly works too, but not for the last character. It does'nt matter if you use [DEL] or [BS]



--
This message was sent by Atlassian Jira
(v8.3.4#803005)