org.infohazard.maverick.view
Class RedirectView

java.lang.Object
  |
  +--org.infohazard.maverick.view.RedirectView
All Implemented Interfaces:
View

public class RedirectView
extends java.lang.Object
implements View

This view causes a client redirect. If the model is a String, that overrides the path. ControllerContext params become query parameters. If the model is a Map, the key/value pairs are converted into parameters for the target URL, but this behavior is deprecated. The key "#" in context params (or Map model) is appended to the end of the redirect URL as a named anchor.


Field Summary
protected  java.lang.String target
          Redirect string.
 
Method Summary
protected  void addQueryParam(java.lang.StringBuffer url, java.lang.String key, java.lang.Object value)
           
protected  java.lang.String addQueryParams(java.lang.String start, java.util.Map params)
           
 void go(ViewContext vctx)
          Produces an http redirect.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

target

protected java.lang.String target
Redirect string.

Method Detail

go

public void go(ViewContext vctx)
        throws java.io.IOException,
               javax.servlet.ServletException
Produces an http redirect.

Specified by:
go in interface View
java.io.IOException
javax.servlet.ServletException
See Also:
View.go(org.infohazard.maverick.flow.ViewContext)

addQueryParams

protected java.lang.String addQueryParams(java.lang.String start,
                                          java.util.Map params)

addQueryParam

protected void addQueryParam(java.lang.StringBuffer url,
                             java.lang.String key,
                             java.lang.Object value)