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.