You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@grails.apache.org by "jamesfredley (via GitHub)" <gi...@apache.org> on 2026/05/02 20:48:27 UTC
[PR] Fix grails-fields v8: JDK 21 minimum, start.grails.org, correct table-template paths [grails-static-website]
jamesfredley opened a new pull request, #483:
URL: https://github.com/apache/grails-static-website/pull/483
## Summary
Three independent corrections to the v8 grails-fields guide that landed in #479. All confirmed against authoritative sources before applying.
### 1. JDK requirement (`requirements.adoc`)
The guide said JDK 17 minimum. Apache Grails 8 actually requires JDK 21:
- [`apache/grails-core/blob/8.0.x/gradle.properties`](https://github.com/apache/grails-core/blob/8.0.x/gradle.properties): `javaVersion=21`
- [`apache/grails-core/blob/8.0.x/.sdkmanrc`](https://github.com/apache/grails-core/blob/8.0.x/.sdkmanrc): `java=21.0.7-librca`
Updated to "JDK 21 or later. JDK 21 LTS is the minimum required by Apache Grails 8; JDK 25 LTS also works."
### 2. Starter source (`createApp.adoc` + `download.adoc`)
- Replaced `prev-snapshot.grails.org` references with [`start.grails.org`](https://start.grails.org). That's where contributors normally land; pointing readers at prev-snapshot was unnecessary friction.
- Dropped the `curl`/`unzip` block, the four-bullet query-string-feature-toggle explanation, and the NOTE callout about prev-snapshot.grails.org being unreachable. Readers can use the start.grails.org UI to configure the project; explaining the API query string is extra ceremony.
### 3. Table-template chapter rewrite (the substantive bug)
**The old chapter documented an unreachable path.** The previous `bookTableTemplate.adoc` told readers to put the override at `grails-app/views/_fields/book/_table.gsp`. **That path is never picked up by the plugin.** Verified against [`FormFieldsTagLib.groovy`](https://github.com/apache/grails-core/blob/8.0.x/grails-fields/grails-app/taglib/grails/plugin/formfields/FormFieldsTagLib.groovy): the `<f:table>` tag uses a hardcoded `render(template: '/templates/_fields/$ emplate')` call, **not** the standard `FormFieldsTemplateService.findTemplate()` chain that `<f:field>` and `<f:displayWidget>` use. There is no per-class lookup for tables.
Rewrote the chapter to describe the three layers that *actually* work:
1. **App-wide _table.gsp** at `grails-app/views/templates/_fields/_table.gsp` (replaces every `<f:table>` rendering in the app).
2. **Per-page template= attribute**: `<f:table template="bookCards"/>` resolves to `grails-app/views/templates/_fields/_bookCards.gsp` (opt-in for one specific list view).
3. **Per-column cells** via `_fields/<class>/<property>/_displayWidget.gsp` - this DOES go through the standard chain because `<f:displayWidget>` (called from inside the table template) uses `findTemplate()`.
File-level changes:
- `customTable.adoc` (chapter intro) - rewrote to describe the three layers correctly with a `CAUTION:` block citing the FormFieldsTagLib source.
- Renamed `bookTableTemplate.adoc` -> `appWideTable.adoc` and rewrote content to point at `templates/_fields/_table.gsp`.
- Added new `perDomainTable.adoc` covering the `template=` attribute pattern with a card-grid example.
- Renamed `bookTableColumns.adoc` -> `perColumnCells.adoc` (content unchanged - per-property `_displayWidget.gsp` overrides DO work via the standard chain).
- Moved the vendored snippet from `snippets/grails-app/views/_fields/book/_table.gsp` -> `snippets/grails-app/views/templates/_fields/_table.gsp` to match the corrected path.
- Updated the v8 toc block in `conf/guides.yml`: `bookTableTemplate` -> `appWideTable`, added `perDomainTable`, `bookTableColumns` -> `perColumnCells`.
## Verification
```bash
./gradlew validateGuides -PvalidationMode=both --no-configuration-cache
# 84 guides, 0 errors
./gradlew renderGuide_grails_fields_custom_widgets_and_wrappers_8 --rerun-tasks --no-configuration-cache
# 39 HTML pages, 0 Unresolved directive errors
```
Manually inspected `appWideTable.html`, `perDomainTable.html`, and `perColumnCells.html` - all reference the correct `templates/_fields/` path.
## Coordination with #482
#482 (the global code-block CSS + README cleanup) and this PR touch different files - no conflicts. They can land in either order.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@grails.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Fix grails-fields v8: JDK 21 minimum, start.grails.org, correct table-template paths [grails-static-website]
Posted by "jamesfredley (via GitHub)" <gi...@apache.org>.
jamesfredley merged PR #483:
URL: https://github.com/apache/grails-static-website/pull/483
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@grails.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org