[REVIEW] Make controller instantiation customizable

Greg Brown greg.x.brown at oracle.com
Wed Dec 14 07:03:08 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, … .

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.

> 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.



More information about the openjfx-dev mailing list