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

scaffolding generated pagination mismatch to RestfulController #16

Open
xmlking opened this issue May 7, 2014 · 0 comments
Open

scaffolding generated pagination mismatch to RestfulController #16

xmlking opened this issue May 7, 2014 · 0 comments

Comments

@xmlking
Copy link

xmlking commented May 7, 2014

Grails's RestfulController creates count as xyzCount but scaffolding plugin generated pagination expects xyzInstanceCount which mismatchs to RestfulController
This leads to improper pagination for dynamically scaffolded RestfulController.

    def index(Integer max) {
        params.max = Math.min(max ?: 10, 100)
        respond listAllResources(params), model: [("${resourceName}Count".toString()): countResources()]
    }

scaffolding plugins's index.gsp template

<div class="pagination">
    <g:paginate total="\${${propertyName}Count ?: 0}" />
</div>

generates something like

<div class="pagination">
    <g:paginate total="${xyzInstanceCount ?: 0}" />
</div>
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

1 participant