public class ExtDirectResponseBuilder
extends java.lang.Object
ExtDirectResponse. A form
handler must return an instance of such type.| Constructor and Description |
|---|
ExtDirectResponseBuilder(javax.servlet.http.HttpServletRequest request)
Creates a builder that builds the response object needed for form handler
and form upload handler methods.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addErrors(org.springframework.validation.BindingResult bindingResult)
Creates a errors property in the response if there are any errors in the
bindingResult Sets the success flag to false if there are errors
|
void |
addErrors(java.util.Locale locale,
org.springframework.context.MessageSource messageSource,
org.springframework.validation.BindingResult bindingResult)
Creates a errors property in the response if there are any errors in the
bindingResult Sets the success flag to false if there are errors
|
void |
addResultProperty(java.lang.String key,
java.lang.Object value)
Add additional property to the response
|
ExtDirectResponse |
build()
Builds the response object
|
void |
buildAndWriteUploadResponse(javax.servlet.http.HttpServletResponse servletResponse)
Builds and writes the response to the OutputStream of the response.
|
void |
successful()
Sets success flag to true
|
void |
unsuccessful()
Sets success flag to false
|
public ExtDirectResponseBuilder(javax.servlet.http.HttpServletRequest request)
request - the current requestpublic void addErrors(org.springframework.validation.BindingResult bindingResult)
bindingResult - public void addErrors(java.util.Locale locale,
org.springframework.context.MessageSource messageSource,
org.springframework.validation.BindingResult bindingResult)
locale - messageSource - bindingResult - public void addResultProperty(java.lang.String key,
java.lang.Object value)
key - the key of the propertyvalue - the value of this propertypublic void successful()
public void unsuccessful()
public ExtDirectResponse build()
public void buildAndWriteUploadResponse(javax.servlet.http.HttpServletResponse servletResponse)
throws java.io.IOException
servletResponse - current servlet responsejava.io.IOExceptionjava.io.IOExceptionCopyright © 2010-2012. All Rights Reserved.