Proposal for improving nested controller interaction in JavaFX 2.2
greg.x.brown at oracle.com
Tue Feb 21 11:35:01 PST 2012
> Initial reaction is positive, it matches more closely with what my intuition was (and, since FXML doesn't _require_ extending from Controller, nobody is forced to use it, but if you do use it you get more for free).
Actually, I was thinking that we might ultimately want to require controllers to extend this class, but obviously we wouldn't do that right now so backwards compatibility is preserved.
> One question: is there a way that somebody externally could do this themselves? That is, although we could (and perhaps should) provide this API ourselves, what would perhaps be even more useful is if the underlying plumbing were rich enough that somebody else would be able to build their on "Controller" base class with this support, rather than requiring that they extend our Controller.
I don't think so. It is possible that it could be done via a LoadListener, but that's an internal interface that is primarily used by SB to preserve document structure. More importantly, it doesn't currently provide any information about controllers, and probably shouldn't. So I think that we'd be best off adding this functionality to FXMLLoader directly.
More information about the openjfx-dev