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

Ernesto Reinaldo Barreiro commented on WICKET-7142:
---------------------------------------------------

[~patrick1701] I fixed for wicket 10.7.0.  Do you need this for 9.x too?

> Allow public access for AbstractAjaxBehavior#getComponent()
> -----------------------------------------------------------
>
>                 Key: WICKET-7142
>                 URL: https://issues.apache.org/jira/browse/WICKET-7142
>             Project: Wicket
>          Issue Type: Wish
>          Components: wicket-core
>    Affects Versions: 9.19.0, 10.3.0
>            Reporter: Patrick Davids
>            Assignee: Ernesto Reinaldo Barreiro
>            Priority: Major
>             Fix For: 10.7.0
>
>
> Hi Wicket Team,
>  
> in order to modify all AjaxRequest using an
> {color:#000000}AjaxRequestTarget{color}.{color:#000000}IListener 
> impementation (updateAjaxAttributes()), registered with {color}
> (({color:#000000}WebApplication{color}) 
> application).getAjaxRequestTargetListeners().add(IListener), we need public 
> access to AbstractAjaxBehavior#getComponent().
>  
> example:
>  
> {code:java}
> ((WebApplication) application).getAjaxRequestTargetListeners().add(new 
> AjaxRequestTarget.IListener(){
>   @Override
>   public void updateAjaxAttributes(AbstractDefaultAjaxBehavior behavior,   
> AjaxRequestAttributes attributes) {
>     behavior.getComponent() // not accassible due to protected qualifier
>   }
> });{code}
> Component is needed to due further tasks. Currently, we implemented access by 
> java reflection features with setAccessible(true), which is not available 
> anymore in java17.
>  
> kind regards
> Patrick



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to