[REVIEW] Make controller instantiation customizable

Tom Schindl tom.schindl at bestsolution.at
Thu Dec 15 07:34:39 PST 2011

Am 15.12.11 16:21, schrieb Greg Brown:
>> What's missing finally to get full power is that field bindings could go
>> through a method instead of a field else we can't use Interfaces as types.
> When you say "bindings", I assume you mean controller field injection? There is actually already a JIRA ticket for this:


> http://javafx-jira.kenai.com/browse/RT-12843

I'm unable to access this ticket "Permission Violation" :-)

> I was initially opposed to this because bean properties are inherently public, so you may end up exposing values in your controller that should otherwise be private or protected. However, if we supported private or protected property setters via the @FXML annotation (like we do with fields), we could get around this. Not a bad idea.
> Either way, you don't really need this in order to inject fields into an interface-based controller - FXMLLoader performs reflection on the actual type of the instantiated controller, not the type specified in the fx:controller attribute. So basically, it will look for fields on whatever type your controller factory returns.


I guess the support for interfaces means for me as a tooling developer
anyways that I need to locate all classes implementing the fx:controller
interface and show a validation error, auto-completion, refactoring
support, ... .


B e s t S o l u t i o n . a t                        EDV Systemhaus GmbH
tom schindl                 geschäftsführer/CEO
eduard-bodem-gasse 5-7/1   A-6020 innsbruck     fax      ++43 512 935833
http://www.BestSolution.at                      phone    ++43 512 935834

More information about the openjfx-dev mailing list