[REVIEW] Make controller instantiation customizable

Tom Schindl tom.schindl at bestsolution.at
Wed Dec 14 07:13:36 PST 2011

Am 14.12.11 16:03, schrieb Greg Brown:
>> 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, … .
> It's currently considered an "implementation" feature so it isn't well-documented. But if/when it becomes public, we'll add more detail to the docs.
>> But I guess this flag does not help with e.g. the include directive
>> which uses the current class path, right?
> I'm not sure what you mean by that.

Well if have an project structure like this;

 + my.package.test
 + my.package.test.ui

and where ApplicationView.fxml looks like this:

  <fx:include source="/my/package/test/HeaderPart.fxml" />
  <!-- -->

If you now want to render a preview of the document the FXMLLoader
locates the file by walking the Classpath so to render the preview I'll
have to make up the complete classpath (well including even libraries

Or did I read the document of fx:include in the wrong way? I'm using an
absolute path here because in theory the HeaderPart.fxml could come from
another project jar and so relative look up makes no sense to me.


>> 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.
> The Scene Builder team (currently the primary client for this feature), felt that it would be best to disable all logic in design mode. I tend to agree.
>> 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.
> That is good to know.  :-)  If there are other (better) ways to handle it, maybe we will remove this feature from a future release.

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