``` class TransactionType : View("Transaction Type...
# tornadofx
j
Copy code
class TransactionType : View("Transaction Type") {
    val wizard: TransactionWizard by inject()

    override val root: Parent = form {
        fieldset(title) {
            field("Type") {
                combobox<String> {
                    items = FXCollections.observableArrayList(
                        "Create Payee",
                        "Create Payor"
                    )
                    valueProperty().addListener { _, oldValue, newValue ->
                        when(newValue) {
                            "Create Payee" -> {
                                wizard.pages
                                wizard.add(CreatePayeeForm::class)
                            }
                            "Create Payor" -> {
                                wizard.add(CreatePayorForm::class)
                            }
                        }
                    }
                }
            }
        }
    }
}