Hi, new to this list, please enroll me.

I would like to use FXML and builders in conjunction i.e. build the general
UI with SceneBuilder but for dynamic aspects e.g building tables based on a
target RDMS table , I would like to use GroovyFX  builders e.g. iterate
over column specs retrieved from an RDMS and generate via GroovyFX builder
syntax the corresponding TableColumns which would then be set on the
TableView.

Is this possible? , can somebody point me to an example and/or to spots in
docs or code that could shed insights into this scenario.

Btw, the assumption is that I would have had a reference to the tableView
via a @FXML annotation e.g.

@FXML
TableView<RDMSColumn> tableView

maybe

tableView.with {

tableColumn(editable: true, property: "name", text: "Name", prefWidth: 150,
    onEditCommit: { event ->
        Person item = event.tableView.items.get(event.tablePosition.row)
        item.name = event.newValue
    }
)
tableColumn(editable: true, property: "age", text: "Age", prefWidth:
50, type: Integer,
    onEditCommit: { event ->
        Person item = event.tableView.items.get(event.tablePosition.row)
        item.age = Integer.valueOf(event.newValue)
    }
)


}

just a wild guess, thought I ask before I start chasing my own tail.

thanks

-Charles

Reply via email to