I have custom component with few labels and few textFields. I need to instantiate it 3 times, but each version must have all labels prefixed with different String.
Fragment of my component fxml:
<Label text="inclusions type:"/>
<Label text="inclusions size:" GridPane.rowIndex="1"/>
<Label text="inclusions number:" GridPane.rowIndex="2"/>
I would like to achieve some kind of code placeholder like:
<Label text="$variable inclusions type:"/>
<Label text="$variable size:" GridPane.rowIndex="1"/>
<Label text="$variable number:" GridPane.rowIndex="2"/>
I try to avoid injecting all labels one by one, as I know there is no possibility to inject all labels at once to controller like ex. Collection<Label> allLabels;
Question: How to pass String from controller code to fxml view, avoiding duplication and unnecessary work?