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

Grails 5.1.3 Could not resolve view with name 'list' in servlet with name 'grailsDispatcherServlet' with scaffold #64

Open
dgeiselmanMOO opened this issue Mar 9, 2023 · 0 comments

Comments

@dgeiselmanMOO
Copy link

After working on upgrading to Grails 5, the scaffold setup doesn't seem to be working with the error Could not resolve view with name 'list' in servlet with name 'grailsDispatcherServlet'

GSP file

            <g:link action="list" controller="AuthorisedUser">
                <g:message code="authorised.users.label" default="Maintain Authorised Users for 'Reinsurer Inquiry Status' section" />
            </g:link>

Controller

class AuthorisedUserController {

    static allowedMethods = [save: "POST", update: "POST", delete: "POST"]

    def scaffold = AuthorisedUser
    
    /**
     * Method to display list of Authorized users.
     * @param max
     * @return
     */
    def list(Integer max) {
        params.max = Math.min(max ?: 10, 100)
        [authorisedUserInstanceList: AuthorisedUser.findAllByInactive(false,params), authorisedUserInstanceTotal: AuthorisedUser.count()]
    }
}

Domain

class AuthorisedUser {

    String name 
    Boolean inactive = Boolean.FALSE
    
    static constraints = {
        
        name (blank:false , nullable: false)
        inactive(blank:true, nullable: true)
    }
}

I have tried changing the version of scaffold, changing from list to show, and researching Scaffolding in Grails to see if there is some syntax missing or if any similar issues. I don't see the errors on the screen like I was expecting until I edited the error.gsp to change how it would get the message, otherwise it was a blank page. Expecting to see the list of authorized users.

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