I've tried to scaffold dynamically some domains in GRAILS , but after adding items into database they doesn't show up in the listing view (User/index) in this case :
User.groovy
package scaffold_test
class User {
String username
String address
static constraints = {
}
}
UserController.groovy
package scaffold_test
class UserController {
def scaffold=true
def index() { }
}
so after running the application, I can see the User controller in the Grails home page,I can add Users, and I can see the added instances via DbConsole. But i can't list the instances in the User/index view. Thanks !
Delete def index() { }
to let the scaffolding generate all of the methods.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With