apache / apache/grails-core

Allow 'propertyName' without specific 'class' or 'superclass' as override template.

Open
#14,206 0 comments 0 reactions 0 assignees View on GitHub
relates-to: grails-fields
Dominant language
Groovy
Stars
2.9k
Forks
975
Avg merge
1d 22h
Merged PRs (30d)
92

Description

Please allow to override **propertyName** without a **class** or **superclass**.

For the moment only:
`grails-app/views/_fields/class/propertyName/`
or
`grails-app/views/_fields/superclass/propertyName/`
are supported.

But in quite a few cases, the same name, e.g. "description" , or "notes" needs the same rendering across all domain classes (e.g. a text area or an editor field for the mentioned case).

Thank you.

Contributor guide

Open the contributing guide

Research direction

Start by tracing template resolution for grails-app/views/_fields/class/propertyName/ and grails-app/views/_fields/superclass/propertyName/. Determine where a propertyName-only override could fit in the lookup order, then verify that one shared template is used for fields with the same name across different domain classes. Done means propertyName-only overrides work without requiring a class or superclass.

Written by the indexing model from the issue text.

Assessment

Tech stack
groovy
Domain
web-dev
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.