Flash Gradient

In my Grails application, I have a controller action that does this:

def activeMember = {ConfirmSignUpCommand signupCommand ->

    flash.signupCommand = signupCommand
    render(view: "confirmPassword")
}

      

When submitting the form to confirmPassword.gsp, the following action is performed:

def validatePasswordConfirmation = {

    def password = params.password
    def command = flash.signupCommand
}        

      

However, when I reach the validatePasswordConfirmation action, the flash area is empty. I am 100% sure that there are no requests between these two controller actions. Where did my flash object go?

+2


source to share


1 answer


The flash object will be available for the next request, in your script, which is a render of the confirmPassword.gsp page (it has also been used many times to pass objects to another controller via a redirect). When the confirmPassword.gsp page sends this other request, and the object you placed in flash is automatically cleared.



+6


source







All Articles