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

Allow Controller Component injection via setter methods (@FXML)

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Unresolved
    • Icon: P4 P4
    • tbd
    • 7u15
    • javafx

      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

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

              Created:
              Updated:
              Imported: