public class GrailsDataBinder
extends org.springframework.web.bind.ServletRequestDataBinder
This would set the property "myDate" of type java.util.Date with the specified values.| Modifier and Type | Field and Description |
|---|---|
protected org.springframework.beans.BeanWrapper |
bean |
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 |
| Constructor and Description |
|---|
GrailsDataBinder(java.lang.Object target,
java.lang.String objectName)
Create a new GrailsDataBinder instance.
|
| Modifier and Type | Method 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(GrailsParameterMap params)
Binds from a GrailsParameterMap object
|
void |
bind(GrailsParameterMap params,
java.lang.String prefix) |
void |
bind(org.springframework.beans.PropertyValues propertyValues) |
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._b will result in the boolean b on object a getting set to false.
|
static GrailsDataBinder |
createBinder(java.lang.Object target,
java.lang.String objectName)
Utility method for creating a GrailsDataBinder instance
|
static GrailsDataBinder |
createBinder(java.lang.Object target,
java.lang.String objectName,
javax.servlet.http.HttpServletRequest request)
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
|
addBindValues, closeNoCatchbindMultipart, bindMultipartFiles, checkFieldDefaults, getEmptyValue, getFieldDefaultPrefix, getFieldMarkerPrefix, isBindEmptyMultipartFiles, setBindEmptyMultipartFiles, setFieldDefaultPrefix, setFieldMarkerPrefixaddValidators, applyPropertyValues, checkAllowedFields, checkRequiredFields, close, convertIfNecessary, convertIfNecessary, convertIfNecessary, findCustomEditor, getAllowedFields, getAutoGrowCollectionLimit, getBindingErrorProcessor, getBindingResult, getConversionService, getDisallowedFields, getErrors, getInternalBindingResult, getObjectName, getPropertyAccessor, getPropertyEditorRegistry, getRequiredFields, getSimpleTypeConverter, getTarget, getTypeConverter, getValidator, getValidators, initBeanPropertyAccess, initDirectFieldAccess, isAutoGrowNestedPaths, isIgnoreInvalidFields, isIgnoreUnknownFields, registerCustomEditor, registerCustomEditor, replaceValidators, setAllowedFields, setAutoGrowCollectionLimit, setAutoGrowNestedPaths, setBindingErrorProcessor, setConversionService, setDisallowedFields, setExtractOldValueForEditor, setIgnoreInvalidFields, setIgnoreUnknownFields, setMessageCodesResolver, setRequiredFields, setValidator, validate, validateprotected org.springframework.beans.BeanWrapper bean
public static final java.lang.String[] GROOVY_DISALLOWED
public static final java.lang.String[] DOMAINCLASS_DISALLOWED
public static final java.lang.String[] GROOVY_DOMAINCLASS_DISALLOWED
public static final java.lang.String NULL_ASSOCIATION
public static final java.lang.String DEFAULT_DATE_FORMAT
public GrailsDataBinder(java.lang.Object target,
java.lang.String objectName)
target - target object to bind ontoobjectName - objectName of the target objectpublic static GrailsDataBinder createBinder(java.lang.Object target, java.lang.String objectName, javax.servlet.http.HttpServletRequest request)
target - The target object to bind toobjectName - The name of the objectrequest - A request instancepublic static void registerCustomEditors(GrailsWebRequest grailsWebRequest, org.springframework.beans.PropertyEditorRegistry registry, java.util.Locale locale)
grailsWebRequest - registry - locale - public static GrailsDataBinder createBinder(java.lang.Object target, java.lang.String objectName)
target - The target object to bind toobjectName - The name of the objectpublic void bind(org.springframework.beans.PropertyValues propertyValues)
bind in class org.springframework.validation.DataBinderpublic void bind(GrailsParameterMap params)
params - The GrailsParameterMap objectpublic void bind(GrailsParameterMap params, java.lang.String prefix)
public void bind(org.springframework.beans.PropertyValues propertyValues,
java.lang.String prefix)
public void bind(javax.servlet.ServletRequest request)
bind in class org.springframework.web.bind.ServletRequestDataBinderpublic void bind(javax.servlet.ServletRequest request,
java.lang.String prefix)
protected void doBind(org.springframework.beans.MutablePropertyValues mpvs)
doBind in class org.springframework.web.bind.WebDataBinderprotected void autoCreateIfPossible(org.springframework.beans.MutablePropertyValues mpvs)
mpvs - A MutablePropertyValues instanceprotected boolean isAllowed(java.lang.String field)
isAllowed in class org.springframework.validation.DataBinderprotected void bindAssociations(org.springframework.beans.MutablePropertyValues mpvs)
mpvs - the MutablePropertyValues object holding the parameters from the requestprotected void checkFieldMarkers(org.springframework.beans.MutablePropertyValues mpvs)
checkFieldMarkers in class org.springframework.web.bind.WebDataBinder