Uploaded image for project: 'Click'
  1. Click
  2. CLK-77

Make ClickUtils.invokeListener handle anonyoumous innerclasses



    • Type: New Feature
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: None
    • Labels:


      Anonymous innerclasses are handy if you don't want to 'polute' your api with a class which does just a very specific task. Typically they are used for listeners. This is not how click does it (for good reason) still there are people who prefer it this way and there are other situations. Ie I have a use case where I define an ajax-action as an anoymous inner class the action creates controls adds them to the page etc and than registers itself as an listener (like a page normally does). But the listener part does not work.

      Anyway as said on the mailing-list I'd like to setAccessible(true) for public methods on such anonyomous innerclasse. I don't know wheter this causes security isses on other AppServers. However the setAccesible(true) in the following code is restricted to anonymous innerclasses public methods only (all other methods are not effected) . So IMO if an AppServer makes problems the way to go is either give ClickUtils the privilege or just don't use anon innerclasses as listeners. In my tests on Jetty and Tomcat there are no problems.




            • Assignee:
              click_christian Christian Essl
              click_christian Christian Essl
            • Votes:
              0 Vote for this issue
              0 Start watching this issue


              • Created: