[REVIEW] Make controller instantiation customizable
Tom Schindl
tom.schindl at bestsolution.at
Wed Dec 14 06:58:30 PST 2011
Am 14.12.11 15:44, schrieb Greg Brown:
> Have you looked at the "staticLoad" property? It is designed to support design-time tooling. When this flag is set to true, FXMLLoader does not attempt to wire up event handlers, etc.
>
Well ok - now I know what this flag is for :-) Thanks. Would make sense
to document it a bit better stating that this puts the FXMLLoader into a
mode where it doesn't try to wire fields, ... .
But I guess this flag does not help with e.g. the include directive
which uses the current class path, right?
I also think that sometimes completely turning of all is also not the
desired effect e.g. think about the situation where the Controller
implements Initializable and e.g. part is hidden/show, values are
populated, ... turning on and off different things sometimes simply is a
nice feature.
Once more I really don't think that any average user will use this API
and beside the include problem I already solved all the problems I
described above so it is certainly doable with the current API too.
Tom
> On Dec 14, 2011, at 9:40 AM, Tom Schindl wrote:
>
>> Hi,
>>
>> In the other reply I concentrated on runtime this reply talks about
>> design time
>>
>> Am 14.12.11 15:16, schrieb Greg Brown:
>>> This seems pretty complex to me. Again, the design philosophy we have tried to apply here is "making simple things easy and difficult things possible". You can do quite a few "difficult" things with a custom class loader and the proposed ControllerFactory interface. For example, if an include needs a different class loader from its parent, your custom class loader can handle that by composition.
>>>
>>
>> When looking from a Tooling implementor on this allowing me to intercept
>> FXMLLoader makes it a lot easier for me e.g. support a live preview of
>> an FXML-File which e.g. uses includes because I don't have to build up a
>> classpath before.
>>
>> Same is true for e.g. Controller creation, event binding, ... who
>> currently require me to build up a complete classpath because FXMLLoader
>> is so greedy creating bindings, ... which makes sense at runtime but not
>> at design time. The trick to get around some of those restrictions is
>> that I preprocess the file before passing it to FXMLLoader.
>>
>> Tom
>>
>> --
>> 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
>
--
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