Allow custom code for registering event handlers

XMLWordPrintable

    • Type: Enhancement
    • Resolution: Unresolved
    • Priority: P3
    • tbd
    • Affects Version/s: 7u45, 8
    • Component/s: javafx

      Currently FXMLLoader allows a custom Controller factory to be registered, however it assumes all action handlers to be public methods on the controller instance. This hinders the ability of libraries and frameworks to handle controller methods in their own way, for example, by wrapping controller methods with custom logic that always executes said methods outside of the UI thread.

      Apparently the API I'm looking for existed in the past as reflected in https://bitbucket.org/openjfxmirrors/openjfx-8-graphics-rt/raw/883cf5301bec6c00d6829a6f1897a1e014a23be1/javafx-fxml/src/javafx/fxml/FXMLLoader.java where you can appreciate two protected methods (getControllerFields and getControlleMethods). These methods are now found inside an static private class named ControllerAcessor; and their visibility modifier has been "downgraded" to package private to booth.

      Please consider opening up for extension the strategy to locate controller fields and methods.

            Assignee:
            Unassigned
            Reporter:
            J. Duke
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Imported: