wow - that's a lot easier than I expected. Thanks folks.
Just tried it quickly by adding control to generic.mobl (source below). It works in the editor but still shows up as a single line text box on the generated page rather than multiline. Presume I need to add a style and/or mixin, something akin to
textFieldStyle /
textFieldStyleMixin?
As an aside: when I look at the source of the generated page, there don't seem to be any html elements corresponding to the controls in the moblpage definition: so no textArea, input, etc. I'm guessing they're injected by the following call:
mobl.call("j21Complaints.root", [mobl.ref(false), mobl.ref("none")], function() {});
Is that correct? If so, is there any way to debug what html code is generated for each mobl control? If not where do they come from?
Thanks,
Scott.
extension to generic.mobl as follows:
control textArea(s : String, placeholder : String = null, label : String = null, rows: String = "4", cols: String="50", style : Style = textFieldStyle, onchange : Callback = null, onkeyup : Callback = null) {
when(label) {
mobl::label(label, style=textFieldLabelStyle)
}
<textArea rows=rows cols=cols class=style placeholder=placeholder databind=s onchange=onchange onkeyup=onkeyup onblur={ scrollUp(); }/>
}