That link you provided assumes that a variable flag called mode
will be passed into the view to determine whether you are editing or not. To do this, you will need to pass mode
into the view from your controller like this:
def edit(Long id) {
[bookInstance: new Book(), mode: 'edit']
}
That will force the ${mode == 'edit'}
portion to be true.