org.springframework.web.servlet.view.json
Class JsonView

java.lang.Object
  extended by org.springframework.context.support.ApplicationObjectSupport
      extended by org.springframework.web.context.support.WebApplicationObjectSupport
          extended by org.springframework.web.servlet.view.AbstractView
              extended by org.springframework.web.servlet.view.json.JsonView
All Implemented Interfaces:
org.springframework.beans.factory.BeanNameAware, org.springframework.context.ApplicationContextAware, org.springframework.web.context.ServletContextAware, org.springframework.web.servlet.View

public class JsonView
extends org.springframework.web.servlet.view.AbstractView


Field Summary
static String DEFAULT_HIJACKSAVE_PREFIX_POSTFIX
           
static String DEFAULT_JSON_CONTENT_TYPE
           
 
Fields inherited from class org.springframework.web.servlet.view.AbstractView
DEFAULT_CONTENT_TYPE
 
Fields inherited from class org.springframework.context.support.ApplicationObjectSupport
logger
 
Constructor Summary
JsonView()
           
 
Method Summary
protected  org.springframework.validation.BindingResult getBindingResult(Map model)
           
protected  String getCommandName(org.springframework.validation.BindingResult br)
           
protected  JsonWriterConfiguratorTemplateRegistry getConfiguratorTemplateRegistry(javax.servlet.http.HttpServletRequest request)
           
 String getEncoding()
           
 boolean getHijackSafe()
           
 String getHijackSafePrefixPostFix()
           
 List<JsonErrorHandler> getJsonErrors()
           
 JsonViewCallback getJsonViewCallback()
           
 JsonViewFilter getJsonViewFilter()
           
 JsonStringWriter getJsonWriter()
           
protected  org.springframework.web.servlet.support.RequestContext getRequestContext(Map model)
           
protected  boolean hasErrors(org.springframework.web.servlet.support.RequestContext rc, org.springframework.validation.BindingResult br)
           
 void renderMergedOutputModel(Map model, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
           
 void setEncoding(String encoding)
           
 void setHijackSafe(boolean hijackSafe)
           
 void setHijackSafePrefixPostFix(String hijackSafePrefixPostFix)
           
 void setJsonErrors(List<JsonErrorHandler> jsonErrors)
           
 void setJsonViewCallback(JsonViewCallback jsonViewCallback)
           
 void setJsonViewFilter(JsonViewFilter jsonViewFilter)
           
 void setJsonWriter(JsonStringWriter jsonWriter)
           
protected  void triggerJsonErrors(Map model, org.springframework.web.servlet.support.RequestContext rc, org.springframework.validation.BindingResult br, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
           
 
Methods inherited from class org.springframework.web.servlet.view.AbstractView
addStaticAttribute, createRequestContext, createTemporaryOutputStream, exposeModelAsRequestAttributes, generatesDownloadContent, getAttributesMap, getBeanName, getContentType, getRequestContextAttribute, getStaticAttributes, prepareResponse, render, setAttributes, setAttributesCSV, setAttributesMap, setBeanName, setContentType, setRequestContextAttribute, toString, writeToResponse
 
Methods inherited from class org.springframework.web.context.support.WebApplicationObjectSupport
getServletContext, getTempDir, getWebApplicationContext, initApplicationContext, initServletContext, isContextRequired, setServletContext
 
Methods inherited from class org.springframework.context.support.ApplicationObjectSupport
getApplicationContext, getMessageSourceAccessor, initApplicationContext, requiredContextClass, setApplicationContext
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

DEFAULT_JSON_CONTENT_TYPE

public static final String DEFAULT_JSON_CONTENT_TYPE
See Also:
Constant Field Values

DEFAULT_HIJACKSAVE_PREFIX_POSTFIX

public static final String DEFAULT_HIJACKSAVE_PREFIX_POSTFIX
See Also:
Constant Field Values
Constructor Detail

JsonView

public JsonView()
Method Detail

renderMergedOutputModel

public void renderMergedOutputModel(Map model,
                                    javax.servlet.http.HttpServletRequest request,
                                    javax.servlet.http.HttpServletResponse response)
                             throws Exception
Specified by:
renderMergedOutputModel in class org.springframework.web.servlet.view.AbstractView
Throws:
Exception

hasErrors

protected boolean hasErrors(org.springframework.web.servlet.support.RequestContext rc,
                            org.springframework.validation.BindingResult br)

triggerJsonErrors

protected void triggerJsonErrors(Map model,
                                 org.springframework.web.servlet.support.RequestContext rc,
                                 org.springframework.validation.BindingResult br,
                                 javax.servlet.http.HttpServletRequest request,
                                 javax.servlet.http.HttpServletResponse response)
                          throws Exception
Throws:
Exception

getBindingResult

protected org.springframework.validation.BindingResult getBindingResult(Map model)

getCommandName

protected String getCommandName(org.springframework.validation.BindingResult br)

getRequestContext

protected org.springframework.web.servlet.support.RequestContext getRequestContext(Map model)

getConfiguratorTemplateRegistry

protected JsonWriterConfiguratorTemplateRegistry getConfiguratorTemplateRegistry(javax.servlet.http.HttpServletRequest request)

getJsonErrors

public List<JsonErrorHandler> getJsonErrors()

setJsonErrors

public void setJsonErrors(List<JsonErrorHandler> jsonErrors)

getJsonViewCallback

public JsonViewCallback getJsonViewCallback()

setJsonViewCallback

public void setJsonViewCallback(JsonViewCallback jsonViewCallback)

getJsonWriter

public JsonStringWriter getJsonWriter()

setJsonWriter

public void setJsonWriter(JsonStringWriter jsonWriter)

getEncoding

public String getEncoding()

setEncoding

public void setEncoding(String encoding)

getHijackSafe

public boolean getHijackSafe()

setHijackSafe

public void setHijackSafe(boolean hijackSafe)

getHijackSafePrefixPostFix

public String getHijackSafePrefixPostFix()

setHijackSafePrefixPostFix

public void setHijackSafePrefixPostFix(String hijackSafePrefixPostFix)

getJsonViewFilter

public JsonViewFilter getJsonViewFilter()

setJsonViewFilter

public void setJsonViewFilter(JsonViewFilter jsonViewFilter)


Copyright © 2010. All Rights Reserved.