Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

/templates/_fields/_list.gsp is hardcoded #305

Closed
valentingoebel opened this issue Nov 19, 2019 · 3 comments
Closed

/templates/_fields/_list.gsp is hardcoded #305

valentingoebel opened this issue Nov 19, 2019 · 3 comments

Comments

@valentingoebel
Copy link

It is currently possible to override the default _table.gsp template but not the _list.gsp template.

Because of this I am forced to avoid scaffolding in a lot of situations that require minor modifications of the default template. Other users have already asked for a way to customize the behaviour of <f:display/> when only the bean is specified. See: https://github.com/grails-fields-plugin/grails-fields/issues/299 https://github.com/grails-fields-plugin/grails-fields/issues/298 https://github.com/grails-fields-plugin/grails-fields/issues/297 https://github.com/grails-fields-plugin/grails-fields/issues/271

Here is the existing code: https://github.com/grails-fields-plugin/grails-fields/blob/master/grails-app/taglib/grails/plugin/formfields/FormFieldsTagLib.groovy#L246

And here is the code that needs to be modified:
https://github.com/grails-fields-plugin/grails-fields/blob/master/grails-app/taglib/grails/plugin/formfields/FormFieldsTagLib.groovy#L332
https://github.com/grails-fields-plugin/grails-fields/blob/master/grails-app/taglib/grails/plugin/formfields/FormFieldsTagLib.groovy#L869

@daptordarattler
Copy link

I am able to edit the _list.gsp template file and it works great in all my projects for Grails 3 and Grails 4
Maybe the problem you are having is related to a particular fields version? I'm currently using v3.0.0 RC1 on grails 4 with my latest project
Here is where mine is /grails-app/views/templates/_fields/_list.gsp
image

@xpusostomos
Copy link

@daptordarattler nice... but is this documented?

@sbglasius
Copy link
Member

@aadrian has enhanced the tag to take a template This template must still be located in /templates/_fields but can be named anything.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants