Although overriding Freemarker templates are the preferred way of handling display logic, it is sometimes useful to modify the default behaviour of the provided Freemarker templater
Potential Solutions:
Improve default field naming: if the field is called someVal, the field should be displayed as Some Val. This should be the default. This should happen without the @Display.
@Display annation to hide a field: @Display(visible=false) This should work in all the various places: where the field is displayed as a column, or a row in a bean.
@Display annotation to rename a field: @Display(name="Some ABC Field Name (complicated)")
Further Customisation
Adding Styles to the annotation doesn't feel like the right approach, as it breaks the separation between display logic (in the template) and business logic (in the bean). As @sureshrupnar points out, usually these tasks are handled by different team members, so we should try and keep these separate.
Feature Request
Description of Problem:
Although overriding Freemarker templates are the preferred way of handling display logic, it is sometimes useful to modify the default behaviour of the provided Freemarker templater
Potential Solutions:
Improve default field naming: if the field is called
someVal
, the field should be displayed asSome Val
. This should be the default. This should happen without the @Display.@Display annation to hide a field:
@Display(visible=false)
This should work in all the various places: where the field is displayed as a column, or a row in a bean.@Display annotation to rename a field:
@Display(name="Some ABC Field Name (complicated)")
Further Customisation
Adding Styles to the annotation doesn't feel like the right approach, as it breaks the separation between display logic (in the template) and business logic (in the bean). As @sureshrupnar points out, usually these tasks are handled by different team members, so we should try and keep these separate.