Proposal: Avoiding nested views with a merge tag

Tom Schindl tom.schindl at bestsolution.at
Mon Dec 17 15:44:53 PST 2012


Am 17.12.12 23:16, schrieb Knut Arne Vedaa:
> Ok, so more like:
> 
> host.fxml:
> 
> <VBox>
>  <TextField/>
>  <ComboBox/>
>  <fx:merge source="morecontrols.fxml"/>
>  <fx:merge source="evenmorecontrols.fxml"/>
> </VBox>
> 

<VBox>
 <TextField/>
 <ComboBox/>
 <fx:include source="morecontrols.fxml"/>
 <fx:include source="morecontrols.fxml"/>
</VBox>

Maybe we don't even need to fx:merge because we could always pass on the
current node as the parent ot the sub-fxml loader which would act
appropriately dependening if the sub-fxml use fx:root or creates its own
root node

> morecontrols.fxml:
> 
> <fx:merge>
>  <Label/>
>  <TabPane/>
> </fx:merge>
> 

<fx:root type="VBox">
  <TabPane/>
</fx:root>


> evenmorecontrols.fxml:
> 
> <fx:merge>
>  <ListView/>
> </fx:merge>
> 

<fx:root type="VBox">
  <ListView/>
</fx:root>


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