How to clear previous validation error messages coming from Command object when a user clicks on the browser back button?
Here is the sample code:
def create = { UserInfoCommand cmd ->
if (cmd.validate()) {
println("Command obect Show")
render(view:"Show");
} else {
println("Command obect Show")
render(view: "Create", model: [cmd:cmd]);
}
}
Scenario
Step 1: Submit the form without entering any data then validation messages will display on GSP from command object.
Step 2: Submit the form with the data and user navigated to the success page.
Step 3: click on the browser back button and notice previous validation messages.
Any idea what is a workaround to clear validation messages?