Proposal for improving nested controller interaction in JavaFX 2.2 (original) (raw)

Daniel Zwolenski zonski at googlemail.com
Tue Feb 21 12:21:52 PST 2012


Hi Guys,

Should we assume based on this proposal that there's no intent/interest in addressing the issues around FXML having such an explicit coupling with its controller (as discussed back in December: http://mail.openjdk.java.net/pipermail/openjfx-dev/2011-December/000175.html )?

This seems to be heading in the opposite direction, making FXML's concept of controllers and FXML's definition of modularisation even more explicit and interwoven into our code ('controllers' and how they are structured would normally be part of an application framework, which we've just discussed the pitfalls around including in JFX in this thread: http://mail.openjdk.java.net/pipermail/openjfx-dev/2012-February/000667.html ).

Cheers, Dan

On Wed, Feb 22, 2012 at 5:35 AM, Greg Brown <greg.x.brown at oracle.com> wrote:

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



More information about the openjfx-dev mailing list