As I'm starting with Grails I've started to create a small project. I wanted to integrate scaffolding so I could see and edit my domain fields.
But when I do 'run-app' I get the following error:
ERROR ScaffoldingGrailsPlugin - Cannot generate controller logic for scaffolded class true. It is not a domain class!
Although this allows the server to start up on my localhost but when trying to open my ProductType controller page I get a gsp error:
HTTP Status 404 - "/WEB-INF/grails-app/views/productType/index.gsp" not found.
So I figure the index.gsp page was not created since I haven't coded any gsp pages with that name.
The code for my test Model:
package grailstest
class ProductType {
String productCode
String productName
String productDescr
static constraints = {
productCode (size: 3..20, unique: true, nullable: false)
productName (maxSize: 45, blank: false)
productDescr (maxSize: 500, blank: true)
}
}
And the code for my test Controller:
package grailTest
class ProductTypeController {
static scaffold = true
def index() { }
}
So it's as basic as you can get. Obviously it must be something very simple staring at me mocking me.
def index() { }from the controller and run agrails refresh-dependenciesbefore running the app. - dmahapatro