Out of the box it:
- renders a field using a UI element appropriate for the property type. Constraints are used to set maximum lengths etc.
- automatically renders
- renders “required” indicators if the field is nullable:false and/or blank:false
- renders errors adjacent to the field that had the error
- renders the current value as appropriate
Here’s an example of how you can render all this for a bunch of bean properties:
<bean:withBean beanName="form"> <bean:field property="firstName"> <bean:field property="lastName"> <bean:field property="company"> <bean:field property="email"> </bean:withBean>
You can find more elaborate examples as well as instructions for use on the plugin page.
Diese Artikel könnten Sie noch interessieren:
- Scaffolding in Grails: More than a one-night stand? Scaffolding in Grails (from my point of view) is like...
- I18N-Problem in Grails Wenn man eine mehrsprachenfähige Webanwendung erstellen will, unterstützt Grails recht...
- Paypal plugin 0.5 for Grails released today David Russell notified me about a bug in the Paypal...
- Apache Camel plug-in for Grails The Apache Camel Grails plug-in allows you to send and route...
- Make your Grails app show content There is a great way to show content from inside...
Berater, Coach und Trainer für effektive Produktentwicklung