The power of software is the power of thoughts and ideas.

2007-09-01

Grails Widget list...

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....

  1. textField
  2. hiddenField
  3. submitButton
  4. field
  5. textArea
  6. form
  7. actionSubmit
  8. actionSubmitImage
  9. datePicker
  10. renderNoSelectionOption
  11. timeZoneSelect
  12. localeSelect
  13. currencySelect
  14. select
  15. checkBox
  16. radio

3 comments:

Kevin Williams said...

you'd think "password" would be on the list too...

Shawn Hartsock said...

Yeah, last I checked you had to manually edit the generated GSP to add in a password input type.

Anonymous said...

Starting Grails 1.0.3 you can set password:true in the constraints to enable password text field.