Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8092163

Allow Controller Component injection via setter methods (@FXML)

    XMLWordPrintable

    Details

    • Type: Enhancement
    • Status: Open
    • Priority: P4
    • Resolution: Unresolved
    • Affects Version/s: 7u15
    • Fix Version/s: tbd
    • Component/s: javafx
    • Labels:
    • Subcomponent:

      Description

      When using CDI to managed controllers, one can not mark a controller as @ApplicationScoped
      because:
      - @FXML on private fields do not get populated as the controller instance is a proxy instance which does not export private fields
      - public fields can not be used as @ApplicationScoped does not allow for public fields

      If FXML Loader inject Controller Fields via setter method a controller could be annotated as @ApplicationScoped

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              Unassigned Unassigned
              Reporter:
              atechnolojfx Anahata Technologies (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Dates

                Created:
                Updated:
                Imported: