Jeff Storey
Jeff Storey

Reputation: 57192

grails dynamic view

I'm pretty new to grails. I was wondering how to dynamically generate views, like I can a controller. For example, I have domain class

class Student {
     String firstName
     String lastName
}

class StudentController {
     def scaffold = true
 }

Now I can create my views with grails generate-views, but if I add a field to Student for example, then I need to re-run that command. Is there a way to dynamically create the view (based on the default templates) if I am just using the default view?

Upvotes: 0

Views: 492

Answers (1)

Ethan Shepherd
Ethan Shepherd

Reputation: 569

grails generate-views is for generating a static view file that you'll then begin to tweak yourself. If you don't do grails generate-views, then your scaffolding for views should be created dynamically at runtime, and will reflect changes to your domain classes.

See here.

Upvotes: 2

Related Questions