Couple of Grails tricks to remember: reload scaffolding and fieldValue formatting

Dec 14, 2010 18:29


Originally published at Fiberglass flowers. You can comment here or there.

  • Grails doesn’t reload scaffolding on-the-fly if you change local templates. But you can open a Groovy console inside application and run in it:
    org.codehaus.groovy.grails.scaffolding.view.
        ScaffoldingViewResolver.scaffoldedViews.clear()
  • In order to change default g:fieldValue formatting for, say, BigDecimal, have a CustomEditorRegistrar in your resources.groovy, and register custom PropertyEditor:
    registry.registerCustomEditor(BigDecimal.class, 'myProperty',
        new OurBigDecimalEditor(BigDecimal.class))

blog

Previous post Next post
Up