Another DSL. Structural DSL like this:
form {
input {
name = "bob"
label = "Bob"
}
button {
action = #{bean.submit}
}
}
I've actually wrote a C code generator DSL over the top of Win32 many years ago that did this so the financial app I was working on so we didn't have to write millions of dialogs in win32 loops.