@java.lang.SuppressWarnings("rawtypes") @java.lang.Deprecated public class GrailsDataBinder extends org.springframework.web.bind.ServletRequestDataBinder
A data binder that handles binding dates that are specified with a "struct"-like syntax in request parameters. For example for a set of fields defined as:
This would set the property "myDate" of type java.util.Date with the specified values.Modifiers | Name | Description |
---|---|---|
static java.lang.String |
DEFAULT_DATE_FORMAT |
|
static java.lang.String[] |
DOMAINCLASS_DISALLOWED |
|
static java.lang.String[] |
GROOVY_DISALLOWED |
|
static java.lang.String[] |
GROOVY_DOMAINCLASS_DISALLOWED |
|
static java.lang.String |
NULL_ASSOCIATION |
|
protected org.springframework.beans.BeanWrapper |
bean |
Fields inherited from class | Fields |
---|---|
class org.springframework.web.bind.ServletRequestDataBinder |
DEFAULT_FIELD_MARKER_PREFIX, DEFAULT_FIELD_DEFAULT_PREFIX, DEFAULT_OBJECT_NAME, DEFAULT_AUTO_GROW_COLLECTION_LIMIT |
class org.springframework.web.bind.WebDataBinder |
DEFAULT_FIELD_MARKER_PREFIX, DEFAULT_FIELD_DEFAULT_PREFIX, DEFAULT_OBJECT_NAME, DEFAULT_AUTO_GROW_COLLECTION_LIMIT |
Constructor and description |
---|
GrailsDataBinder
(java.lang.Object target, java.lang.String objectName) Create a new GrailsDataBinder instance. |
Type | Name and description |
---|---|
protected void |
autoCreateIfPossible(org.springframework.beans.MutablePropertyValues mpvs) Auto-creates the a type if it is null and is possible to auto-create. |
void |
bind(org.springframework.beans.PropertyValues propertyValues) |
void |
bind(GrailsParameterMap params) Binds from a GrailsParameterMap object |
void |
bind(GrailsParameterMap params, java.lang.String prefix) |
void |
bind(org.springframework.beans.PropertyValues propertyValues, java.lang.String prefix) |
void |
bind(javax.servlet.ServletRequest request) |
void |
bind(javax.servlet.ServletRequest request, java.lang.String prefix) |
protected void |
bindAssociations(org.springframework.beans.MutablePropertyValues mpvs) Interrogates the specified properties looking for properites that represent associations to other classes (e.g., 'author.id'). |
protected void |
checkFieldMarkers(org.springframework.beans.MutablePropertyValues mpvs) This overrides the method from WebDataBinder to allow for nested checkbox handling, so property paths such as a. |
static GrailsDataBinder |
createBinder(java.lang.Object target, java.lang.String objectName, javax.servlet.http.HttpServletRequest request) Utility method for creating a GrailsDataBinder instance |
static GrailsDataBinder |
createBinder(java.lang.Object target, java.lang.String objectName) Utility method for creating a GrailsDataBinder instance |
protected void |
doBind(org.springframework.beans.MutablePropertyValues mpvs) |
protected boolean |
isAllowed(java.lang.String field) |
static void |
registerCustomEditors(GrailsWebRequest grailsWebRequest, org.springframework.beans.PropertyEditorRegistry registry, java.util.Locale locale) Registers all known |
Methods inherited from class | Name |
---|---|
class org.springframework.web.bind.ServletRequestDataBinder |
org.springframework.web.bind.ServletRequestDataBinder#bind(javax.servlet.ServletRequest), org.springframework.web.bind.ServletRequestDataBinder#closeNoCatch(), org.springframework.web.bind.ServletRequestDataBinder#setFieldMarkerPrefix(java.lang.String), org.springframework.web.bind.ServletRequestDataBinder#getFieldMarkerPrefix(), org.springframework.web.bind.ServletRequestDataBinder#setFieldDefaultPrefix(java.lang.String), org.springframework.web.bind.ServletRequestDataBinder#getFieldDefaultPrefix(), org.springframework.web.bind.ServletRequestDataBinder#setBindEmptyMultipartFiles(boolean), org.springframework.web.bind.ServletRequestDataBinder#isBindEmptyMultipartFiles(), org.springframework.web.bind.ServletRequestDataBinder#validate([Ljava.lang.Object;), org.springframework.web.bind.ServletRequestDataBinder#validate(), org.springframework.web.bind.ServletRequestDataBinder#getObjectName(), org.springframework.web.bind.ServletRequestDataBinder#close(), org.springframework.web.bind.ServletRequestDataBinder#bind(org.springframework.beans.PropertyValues), org.springframework.web.bind.ServletRequestDataBinder#getTarget(), org.springframework.web.bind.ServletRequestDataBinder#getValidators(), org.springframework.web.bind.ServletRequestDataBinder#getValidator(), org.springframework.web.bind.ServletRequestDataBinder#registerCustomEditor(java.lang.Class, java.beans.PropertyEditor), org.springframework.web.bind.ServletRequestDataBinder#registerCustomEditor(java.lang.Class, java.lang.String, java.beans.PropertyEditor), org.springframework.web.bind.ServletRequestDataBinder#setConversionService(org.springframework.core.convert.ConversionService), org.springframework.web.bind.ServletRequestDataBinder#convertIfNecessary(java.lang.Object, java.lang.Class, java.lang.reflect.Field), org.springframework.web.bind.ServletRequestDataBinder#convertIfNecessary(java.lang.Object, java.lang.Class, org.springframework.core.MethodParameter), org.springframework.web.bind.ServletRequestDataBinder#convertIfNecessary(java.lang.Object, java.lang.Class), org.springframework.web.bind.ServletRequestDataBinder#getConversionService(), org.springframework.web.bind.ServletRequestDataBinder#setExtractOldValueForEditor(boolean), org.springframework.web.bind.ServletRequestDataBinder#findCustomEditor(java.lang.Class, java.lang.String), org.springframework.web.bind.ServletRequestDataBinder#setAutoGrowNestedPaths(boolean), org.springframework.web.bind.ServletRequestDataBinder#isAutoGrowNestedPaths(), org.springframework.web.bind.ServletRequestDataBinder#setAutoGrowCollectionLimit(int), org.springframework.web.bind.ServletRequestDataBinder#getAutoGrowCollectionLimit(), org.springframework.web.bind.ServletRequestDataBinder#getBindingResult(), org.springframework.web.bind.ServletRequestDataBinder#initBeanPropertyAccess(), org.springframework.web.bind.ServletRequestDataBinder#initDirectFieldAccess(), org.springframework.web.bind.ServletRequestDataBinder#setIgnoreUnknownFields(boolean), org.springframework.web.bind.ServletRequestDataBinder#isIgnoreUnknownFields(), org.springframework.web.bind.ServletRequestDataBinder#setIgnoreInvalidFields(boolean), org.springframework.web.bind.ServletRequestDataBinder#isIgnoreInvalidFields(), org.springframework.web.bind.ServletRequestDataBinder#setAllowedFields([Ljava.lang.String;), org.springframework.web.bind.ServletRequestDataBinder#getAllowedFields(), org.springframework.web.bind.ServletRequestDataBinder#setDisallowedFields([Ljava.lang.String;), org.springframework.web.bind.ServletRequestDataBinder#getDisallowedFields(), org.springframework.web.bind.ServletRequestDataBinder#setRequiredFields([Ljava.lang.String;), org.springframework.web.bind.ServletRequestDataBinder#getRequiredFields(), org.springframework.web.bind.ServletRequestDataBinder#setMessageCodesResolver(org.springframework.validation.MessageCodesResolver), org.springframework.web.bind.ServletRequestDataBinder#setBindingErrorProcessor(org.springframework.validation.BindingErrorProcessor), org.springframework.web.bind.ServletRequestDataBinder#getBindingErrorProcessor(), org.springframework.web.bind.ServletRequestDataBinder#setValidator(org.springframework.validation.Validator), org.springframework.web.bind.ServletRequestDataBinder#addValidators([Lorg.springframework.validation.Validator;), org.springframework.web.bind.ServletRequestDataBinder#replaceValidators([Lorg.springframework.validation.Validator;), org.springframework.web.bind.ServletRequestDataBinder#wait(long, int), org.springframework.web.bind.ServletRequestDataBinder#wait(long), org.springframework.web.bind.ServletRequestDataBinder#wait(), org.springframework.web.bind.ServletRequestDataBinder#equals(java.lang.Object), org.springframework.web.bind.ServletRequestDataBinder#toString(), org.springframework.web.bind.ServletRequestDataBinder#hashCode(), org.springframework.web.bind.ServletRequestDataBinder#getClass(), org.springframework.web.bind.ServletRequestDataBinder#notify(), org.springframework.web.bind.ServletRequestDataBinder#notifyAll() |
class org.springframework.web.bind.WebDataBinder |
org.springframework.web.bind.WebDataBinder#setFieldMarkerPrefix(java.lang.String), org.springframework.web.bind.WebDataBinder#getFieldMarkerPrefix(), org.springframework.web.bind.WebDataBinder#setFieldDefaultPrefix(java.lang.String), org.springframework.web.bind.WebDataBinder#getFieldDefaultPrefix(), org.springframework.web.bind.WebDataBinder#setBindEmptyMultipartFiles(boolean), org.springframework.web.bind.WebDataBinder#isBindEmptyMultipartFiles(), org.springframework.web.bind.WebDataBinder#validate([Ljava.lang.Object;), org.springframework.web.bind.WebDataBinder#validate(), org.springframework.web.bind.WebDataBinder#getObjectName(), org.springframework.web.bind.WebDataBinder#close(), org.springframework.web.bind.WebDataBinder#bind(org.springframework.beans.PropertyValues), org.springframework.web.bind.WebDataBinder#getTarget(), org.springframework.web.bind.WebDataBinder#getValidators(), org.springframework.web.bind.WebDataBinder#getValidator(), org.springframework.web.bind.WebDataBinder#registerCustomEditor(java.lang.Class, java.beans.PropertyEditor), org.springframework.web.bind.WebDataBinder#registerCustomEditor(java.lang.Class, java.lang.String, java.beans.PropertyEditor), org.springframework.web.bind.WebDataBinder#setConversionService(org.springframework.core.convert.ConversionService), org.springframework.web.bind.WebDataBinder#convertIfNecessary(java.lang.Object, java.lang.Class, java.lang.reflect.Field), org.springframework.web.bind.WebDataBinder#convertIfNecessary(java.lang.Object, java.lang.Class, org.springframework.core.MethodParameter), org.springframework.web.bind.WebDataBinder#convertIfNecessary(java.lang.Object, java.lang.Class), org.springframework.web.bind.WebDataBinder#getConversionService(), org.springframework.web.bind.WebDataBinder#setExtractOldValueForEditor(boolean), org.springframework.web.bind.WebDataBinder#findCustomEditor(java.lang.Class, java.lang.String), org.springframework.web.bind.WebDataBinder#setAutoGrowNestedPaths(boolean), org.springframework.web.bind.WebDataBinder#isAutoGrowNestedPaths(), org.springframework.web.bind.WebDataBinder#setAutoGrowCollectionLimit(int), org.springframework.web.bind.WebDataBinder#getAutoGrowCollectionLimit(), org.springframework.web.bind.WebDataBinder#getBindingResult(), org.springframework.web.bind.WebDataBinder#initBeanPropertyAccess(), org.springframework.web.bind.WebDataBinder#initDirectFieldAccess(), org.springframework.web.bind.WebDataBinder#setIgnoreUnknownFields(boolean), org.springframework.web.bind.WebDataBinder#isIgnoreUnknownFields(), org.springframework.web.bind.WebDataBinder#setIgnoreInvalidFields(boolean), org.springframework.web.bind.WebDataBinder#isIgnoreInvalidFields(), org.springframework.web.bind.WebDataBinder#setAllowedFields([Ljava.lang.String;), org.springframework.web.bind.WebDataBinder#getAllowedFields(), org.springframework.web.bind.WebDataBinder#setDisallowedFields([Ljava.lang.String;), org.springframework.web.bind.WebDataBinder#getDisallowedFields(), org.springframework.web.bind.WebDataBinder#setRequiredFields([Ljava.lang.String;), org.springframework.web.bind.WebDataBinder#getRequiredFields(), org.springframework.web.bind.WebDataBinder#setMessageCodesResolver(org.springframework.validation.MessageCodesResolver), org.springframework.web.bind.WebDataBinder#setBindingErrorProcessor(org.springframework.validation.BindingErrorProcessor), org.springframework.web.bind.WebDataBinder#getBindingErrorProcessor(), org.springframework.web.bind.WebDataBinder#setValidator(org.springframework.validation.Validator), org.springframework.web.bind.WebDataBinder#addValidators([Lorg.springframework.validation.Validator;), org.springframework.web.bind.WebDataBinder#replaceValidators([Lorg.springframework.validation.Validator;), org.springframework.web.bind.WebDataBinder#wait(long, int), org.springframework.web.bind.WebDataBinder#wait(long), org.springframework.web.bind.WebDataBinder#wait(), org.springframework.web.bind.WebDataBinder#equals(java.lang.Object), org.springframework.web.bind.WebDataBinder#toString(), org.springframework.web.bind.WebDataBinder#hashCode(), org.springframework.web.bind.WebDataBinder#getClass(), org.springframework.web.bind.WebDataBinder#notify(), org.springframework.web.bind.WebDataBinder#notifyAll() |
Create a new GrailsDataBinder instance.
target
- target object to bind ontoobjectName
- objectName of the target objectAuto-creates the a type if it is null and is possible to auto-create.
mpvs
- A MutablePropertyValues instanceBinds from a GrailsParameterMap object
params
- The GrailsParameterMap objectInterrogates the specified properties looking for properites that represent associations to other classes (e.g., 'author.id'). If such a property is found, this method attempts to load the specified instance of the association (by ID) and set it on the target object.
mpvs
- the MutablePropertyValues
object holding the parameters from the requestThis overrides the method from WebDataBinder to allow for nested checkbox handling, so property paths such as a._b will result in the boolean b on object a getting set to false.
Utility method for creating a GrailsDataBinder instance
target
- The target object to bind toobjectName
- The name of the objectrequest
- A request instanceUtility method for creating a GrailsDataBinder instance
target
- The target object to bind toobjectName
- The name of the objectRegisters all known