Proposal for improving nested controller interaction in JavaFX 2.2
deep.blue.6802 at gmail.com
Wed Feb 22 00:31:52 PST 2012
Richard is one time zone closer to you than I am ... I'm up late. I'm
a night owl.
Yes, I'd forgotten about the lookup method. Thanks for the reminder.
using the lookup method works for the three most useful scenarios for
me (1) get a component by id. (2) Get a component by providing a
selector expression. (3) get a component by class. It looks as if the
Node API and the lookup method offers the DOM style functionality I
was discussing in my previous post.
On Wed, Feb 22, 2012 at 12:34 AM, Jonathan Giles
<jonathan.giles at oracle.com> wrote:
>> +1 This brings me to my next question. Once you bring a scene graph into
>> memory, what utils/tools does the JavaFX offer or support for traversing
>> the scene graph? FXML would benefit from having tools/utils that make it
>> easier to query and traverse the scene graph. A DOM like API would be
>> A DOM would allow developers to do something like:
>> Button submitButton scene.getById("submit_button"); //Gets the object with
>> an fx.id == "submit_button"
>> XPath could be used to traverse and query the graph. The graph can be
>> treated like XML and the graph is essentially a DOM instance.
> I'll leave Rich to expand on this tomorrow (if he feels compelled), but
> given it appears you're closer to my time zone (NZ) than his (US) (or you
> just work late), I thought I'd quickly respond to point you to the
> Node.lookup(String selector) and Node.lookupAll(String selector) methods
> You can also find similar methods in Scene:
> -- Jonathan
More information about the openjfx-dev