redirect
Purpose
To redirect flow from one action to the next using an HTTP redirect.Examples
redirect(uri:"book/list")
redirect(url:"http://www.blogjava.net/BlueSUN")
redirect(action:"show")
redirect(controller:"book",action:"list")
redirect(action:"show",id:4, params:[author:"Stephen King"])
redirect(controller: "book", action: "show", fragment: "profile")
Description
Redirects the current action to another action, optionally passing parameters and/or errors.Parameters
uri
- The full uri to redirect to (example /book/list, book/show/2)
url
- The absolute url to redirect to (example: "http://www.blogjava.net/BlueSUN")
controller
- The controller to redirect to, defaults to the current controller if not specified
action
- The action to redirect to, either a string name or a reference to an action within the current controller
id
- The id to use in redirection
params
- Parameters to pass to the action redirected to.
fragment
- A URI fragment to append to the end of the target URI, as in ".../show#profile". The value for this parameter should not include the '#'.