Bean-Fields plugin 0.6 released

Posted by: on Mar 13, 2010 | 4 Comments

I have released Bean-Fields plugin 0.6. This extremely handy plugin for Grails applications makes your data form GSPs DRY by centralizing the rendering and styling of your fields, handling <label> rendering, rendering appropriate HTML field based on property type, application of HTML max length constraints, rendering “required field” indicators, and rendering per-field errors. Rendering a whole bean’s worth of fields can be as simple as:

<bean:form beanName="book" properties="title, primaryAuthor.name, isbn"/>

Version 0.6 fixes a bunch of bugs related to rendering fields for nested property paths e.g. propertyName=”book.author.firstName” and introduces support for list / array properties eg “book.authors[3].firstName” (This was really quite painful to implement!). Radio groups are working properly now, and test coverage much improved – thanks to contribs from Antony Stubbs.

It also adds a user-definable threshold for whether a radio group or select list should be used for a field with an inList constraint.

Full list of resolved issues is here.

4 Comments

  1. Robert Kasanicky
    March 18, 2010

    Hi Marc,

    We just discovered the bean-fields plugin and it looks pretty useful. However we’re struggling with trying to modify the precision of generated datepicker.

    Is there an issue tracker or forum for the bean-fields plugin? I couldn’t find any good place to seek advice.

    Thanks
    Robert

    Reply
    • Marc Palmer
      March 22, 2010

      Hi Robert –

      Like most Grails plugins, the issue track is at jira.codehaus.org in the GRAILSPLUGINS project, component “grails-bean-fields”.

      Furthermore most grails plugin support is handled on the main grails-user mailing list (see grails.org for mailing list sub info).

      It should suffice to just pass in the standard datepicker attribute.

      Reply
  2. Haranal
    August 11, 2010

    Hi Palmer,

    I am unable to add css and inline style for the bean-field tags.
    please suggest me to overcome this challenge.

    Thanks,
    Mallikarjun.

    Reply
    • Marc Palmer
      August 24, 2010

      Inline style attributes are bad, but should be passed through if you specify them (except maybe for bean:field). Just use CSS styling. It works fine.

      Reply

Leave a Reply