Proposal: Avoiding nested views with a merge tag

Tom Schindl tom.schindl at bestsolution.at
Mon Dec 17 11:03:01 PST 2012


Yes that would be an idea, the problem is however is that this syntax only allows to "merge" in 1 subfxml, unless we'd allow to reference multiple fxmls there separated through e.g. ",".

Tom

Von meinem iPhone gesendet

Am 17.12.2012 um 19:57 schrieb Knut Arne Vedaa <knut.arne.vedaa at broadpark.no>:

> Wild suggestion:
> 
> host.fxml:
> 
> <VBox fx:include="morecontrols.fxml">
> <TextField/>
> <ComboBox/>
> </VBox>
> 
> morecontrols.fxml:
> 
> <fx:root type="VBox">
>  <Label/>
> </fx:root>
> 
> I.e. a kind of "mixin" or "partial nodes" syntax. Parser should ensure that the root type (or "self type") of morecontrols.fxml is (in this case) VBox.
> 
> So what you end up with is:
> 
> <VBox>
> <TextField/>
> <ComboBox/>
> <Label/>
> </VBox>
> 
> 
> Knut Arne Vedaa


More information about the openjfx-dev mailing list