You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "Jezza (JIRA)" <ji...@apache.org> on 2018/06/11 16:09:00 UTC

[jira] [Comment Edited] (WICKET-6561) Behaviours receive events regardless if they were rejected by the component.

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

Jezza edited comment on WICKET-6561 at 6/11/18 4:08 PM:
--------------------------------------------------------

Ehhhhhh, one could imagine behaviours as "attributes" to a give node, and therefore children, but that's subjective.

But yeah, I was thinking about this earlier.
I would want to implement it without introducing more flags into the event system, and don't go deeper fit it nicely.
Granted, there is a side-effect here because if it was capable of holding children, they won't get the event.

Ideally, if `isBehaviourRejected` is public, it would be easy to check if the behaviour should receive events, but I don't know the implications of that being made public.


was (Author: jezza):
Ehhhhhh, one could imagine behaviours as "attributes" to a give node, and therefore children.

But yeah, I was thinking about this earlier.
I would want to implement it without introducing more flags into the event system, and don't go deeper fit it nicely.
Granted, there is a side-effect here because if it was capable of holding children, they won't get the event.

Ideally, if `isBehaviourRejected` is public, it would be easy to check if the behaviour should receive events, but I don't know the implications of that being made public.

> Behaviours receive events regardless if they were rejected by the component.
> ----------------------------------------------------------------------------
>
>                 Key: WICKET-6561
>                 URL: https://issues.apache.org/jira/browse/WICKET-6561
>             Project: Wicket
>          Issue Type: Improvement
>          Components: wicket
>            Reporter: Jezza
>            Priority: Minor
>
> A behaviour will receive events regardless if the behaviour was rejected or not.
> I can see some reasons the behaviour might want to still receive events, but I think it should at least be controllable from the component.
> Currently, there's no way to stop the event from propagating to the behaviour.
> I propose a simple fix.
> https://github.com/apache/wicket/blob/master/wicket-core/src/main/java/org/apache/wicket/ComponentEventSender.java#L279
> After visiting the component, simply check if the shallow flag was set.
> If so, reset it, and return, continuing on the way.
> Otherwise, send the event the to the behaviours.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)