Proposal: Avoiding nested views with a merge tag

Yennick Trevels yennick.trevels at gmail.com
Mon Dec 17 07:03:01 PST 2012


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 bestsolution.at>wrote:

> Isn't that what
>
> <fx:root xmlns:fx="http://javafx.com/fxml" 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:
> >
> http://android-developers.blogspot.com/2009/03/android-layout-tricks-3-optimize-by.html
> >
> > 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
> http://www.BestSolution.at                      phone    ++43 512 935834
>


More information about the openjfx-dev mailing list