public class ExtDirectResponseBuilder extends 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(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(String key,
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(Locale locale, org.springframework.context.MessageSource messageSource, org.springframework.validation.BindingResult bindingResult)
locale - messageSource - bindingResult - public void addResultProperty(String key, 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 IOException
servletResponse - current servlet responseIOExceptionIOExceptionCopyright © 2010-2012. All Rights Reserved.