[ 
https://issues.apache.org/jira/browse/WICKET-3692?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Bertrand Guay-Paquet closed WICKET-3692.
----------------------------------------


> Providing bound Component to Behavior's onEvent()
> -------------------------------------------------
>
>                 Key: WICKET-3692
>                 URL: https://issues.apache.org/jira/browse/WICKET-3692
>             Project: Wicket
>          Issue Type: Sub-task
>          Components: wicket-core
>    Affects Versions: 1.5-RC4
>            Reporter: Bertrand Guay-Paquet
>            Assignee: Igor Vaynberg
>            Priority: Minor
>              Labels: event
>             Fix For: 1.5-RC5
>
>
> Ater implementing a first Behavior event sink, I noticed that 
> Behavior#onEvent(IEvent<?>) is the only Behavior method which does not 
> receive a reference to the attached Component. This means that a Behavior 
> which wants to work on a Component when an Event is received must keep a 
> reference to it. Because of that, such Behaviors cannot be reused across 
> different components.
> Could the onEvent method signature be modified like so:
> public void onEvent(Component component, IEvent<?> event) ?
> Modifying the signature as proposed entails dropping the IEventSink interface 
> as it is which complicates matters for IEventDispatcher.
> What do you think? Is there a way to work around this issue and make 
> Behavior#onEvent more like other Behavior methods?

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to