Proposal: Avoiding nested views with a merge tag

Richard Bair richard.bair at
Mon Dec 17 07:43:59 PST 2012

In fx there is not a display list, and nodes cannot be repeated in the scene graph, so you have to have the duplicate hbox.

ListView is a powerful tool for doing virtualized views, maybe that is what you need? What is the use case?

On Dec 17, 2012, at 7:03 AM, Yennick Trevels <yennick.trevels at> wrote:

> But if I understand this tag correctly it will still create an instance of
> HBox? So this root tag will still create a container (which will be added
> as a Node to the displaylist), which may be unnecessary.
> Is it possible with this tag to not create a node in the displaylist, so
> that elements defined under the root tag are added to the container in
> which the fxml view is being used?
> On Mon, Dec 17, 2012 at 3:45 PM, Tom Schindl <tom.schindl at>wrote:
>> Isn't that what
>> <fx:root xmlns:fx="" type="HBox">
>> </fx:root>
>> is good for?
>> Tom
>> Am 17.12.12 15:40, schrieb Yennick Trevels:
>>> One of the most common performance problems in RIA frameworks is having a
>>> deeply nested component tree. One of the reasons is the use of xml for
>>> declaring the layout (fxml in case of JavaFx). The problem with xml is
>> that
>>> when you want to group multiple components in a separate fxml for reuse
>>> purposes, you have to define a root tag, which in most frameworks will
>>> create an extra (potentially unnecessary) node in the displaylist.
>>> The way Android has solved this is by using a <merge> tag, which doesn't
>>> create an extra node in the displayList. A good overview of this tag can
>> be
>>> found here:
>>> Imo such a tag is something which can also be very useful for JavaFx
>> since
>>> it's also node-based, certainly since performance is key in RIA
>>> applications.
>>> Is something like this already in development and if not, what are your
>>> thoughts about this?
>>> Greetz,
>>> Yennick
>> --
>> B e s t S o l u t i o n . a t                        EDV Systemhaus GmbH
>> ------------------------------------------------------------------------
>> tom schindl                 geschäftsführer/CEO
>> ------------------------------------------------------------------------
>> eduard-bodem-gasse 5-7/1   A-6020 innsbruck     fax      ++43 512 935833
>>                      phone    ++43 512 935834

More information about the openjfx-dev mailing list