After a user creates a record in my Grails application it takes that information and populates and displays a graph. The user can then click a button on that page and be redirected to the create page. When that happens I would like the previous data entered to be displayed as the defaults for those fields.
In my controller right now we instantiate the domain class.
def create() {
[apiInstance: new Api(params)]
}
Let's say the Api class contains two properties, a string called name and an integer called myValue.
What do I need to do to show the latest values of name and myValue in the database as the new defaults for the fields in the create page?