|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.springframework.validation.DataBinder org.springframework.web.bind.WebDataBinder org.springframework.web.bind.ServletRequestDataBinder org.codehaus.groovy.grails.web.binding.GrailsDataBinder
public class GrailsDataBinder
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.
Field Summary | |
---|---|
protected BeanWrapper |
bean
|
static String |
DEFAULT_DATE_FORMAT
|
static String[] |
DOMAINCLASS_DISALLOWED
|
static String[] |
GROOVY_DISALLOWED
|
static String[] |
GROOVY_DOMAINCLASS_DISALLOWED
|
static String |
NULL_ASSOCIATION
|
Fields inherited from class org.springframework.web.bind.WebDataBinder |
---|
DEFAULT_FIELD_DEFAULT_PREFIX, DEFAULT_FIELD_MARKER_PREFIX |
Fields inherited from class org.springframework.validation.DataBinder |
---|
DEFAULT_OBJECT_NAME, logger |
Constructor Summary | |
---|---|
GrailsDataBinder(Object target,
String objectName)
Create a new GrailsDataBinder instance. |
Method Summary | |
---|---|
protected void |
autoCreateIfPossible(MutablePropertyValues mpvs)
Method that auto-creates the a type if it is null and is possible to auto-create |
void |
bind(org.codehaus.groovy.grails.web.servlet.mvc.GrailsParameterMap params)
Binds from a GrailsParameterMap object |
void |
bind(org.codehaus.groovy.grails.web.servlet.mvc.GrailsParameterMap params,
String prefix)
|
void |
bind(PropertyValues propertyValues)
|
void |
bind(PropertyValues propertyValues,
String prefix)
|
void |
bind(ServletRequest request)
|
void |
bind(ServletRequest request,
String prefix)
|
protected void |
bindAssociations(MutablePropertyValues mpvs)
Interrogates the specified properties looking for properites that represent associations to other classes (e.g., 'author.id'). |
static GrailsDataBinder |
createBinder(Object target,
String objectName)
Utility method for creating a GrailsDataBinder instance |
static GrailsDataBinder |
createBinder(Object target,
String objectName,
HttpServletRequest request)
Utility method for creating a GrailsDataBinder instance |
protected void |
doBind(MutablePropertyValues mpvs)
|
static void |
registerCustomEditors(PropertyEditorRegistry registry,
Locale locale)
Registers all known |
Methods inherited from class org.springframework.web.bind.ServletRequestDataBinder |
---|
closeNoCatch |
Methods inherited from class org.springframework.web.bind.WebDataBinder |
---|
bindMultipartFiles, checkFieldDefaults, checkFieldMarkers, getEmptyValue, getFieldDefaultPrefix, getFieldMarkerPrefix, isBindEmptyMultipartFiles, setBindEmptyMultipartFiles, setFieldDefaultPrefix, setFieldMarkerPrefix |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected BeanWrapper bean
public static final String[] GROOVY_DISALLOWED
public static final String[] DOMAINCLASS_DISALLOWED
public static final String[] GROOVY_DOMAINCLASS_DISALLOWED
public static final String NULL_ASSOCIATION
public static final String DEFAULT_DATE_FORMAT
Constructor Detail |
---|
public GrailsDataBinder(Object target, String objectName)
target
- target object to bind ontoobjectName
- objectName of the target objectMethod Detail |
---|
public static GrailsDataBinder createBinder(Object target, String objectName, HttpServletRequest request)
target
- The target object to bind toobjectName
- The name of the objectrequest
- A request instance
public static void registerCustomEditors(PropertyEditorRegistry registry, Locale locale)
registry
- locale
- public static GrailsDataBinder createBinder(Object target, String objectName)
target
- The target object to bind toobjectName
- The name of the object
public void bind(PropertyValues propertyValues)
bind
in class DataBinder
public void bind(org.codehaus.groovy.grails.web.servlet.mvc.GrailsParameterMap params)
params
- The GrailsParameterMap objectpublic void bind(org.codehaus.groovy.grails.web.servlet.mvc.GrailsParameterMap params, String prefix)
public void bind(PropertyValues propertyValues, String prefix)
public void bind(ServletRequest request)
bind
in class ServletRequestDataBinder
public void bind(ServletRequest request, String prefix)
protected void doBind(MutablePropertyValues mpvs)
doBind
in class WebDataBinder
protected void autoCreateIfPossible(MutablePropertyValues mpvs)
mpvs
- A MutablePropertyValues instanceprotected void bindAssociations(MutablePropertyValues mpvs)
mpvs
- the MutablePropertyValues
object holding the parameters from the request
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |