Take a look at this...
def constraints = {
description(widget:'textarea')
}
... which I got from the Grails site. So, if you want to use the code generators to create views for a form and want a string to have a text area as its input you can use the constraints on the object to specify text area. But wait, what other widgets can you specify?
I did a little digging in the Grails source code and came up with this list....
- textField
- hiddenField
- submitButton
- field
- textArea
- form
- actionSubmit
- actionSubmitImage
- datePicker
- renderNoSelectionOption
- timeZoneSelect
- localeSelect
- currencySelect
- select
- checkBox
- radio

3 comments:
you'd think "password" would be on the list too...
Yeah, last I checked you had to manually edit the generated GSP to add in a password input type.
Starting Grails 1.0.3 you can set password:true in the constraints to enable password text field.
Post a Comment