This content has been marked as final. Show 2 replies
I would perform the initialization steps that do not depend on the value of A property in initialize(), and perform the initialization steps that depend on the value of A property whenever that value is changed.
If A is a simple bean property - that would probably mean doing part of the initialization in the setter for A. If A is an observable property, then you could register a ChangeListener (or InvalidationListener) on A in initialize - and defer the initialization/set up of everything that depends on the value of A to that listener.
Hope this helps,
Well, with single property using setter for initializing may work, although it's ugly. But what if there are more than one property? And initialization should be done when all are ready? I'm just want to be sure I haven't missed any other jfx-provided callbacks/tricks before adding Guice to my project ;)
Thank you for helping!