|
Groovy Documentation | |||||||
| FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Objectorg.springframework.web.bind.ServletRequestDataBinder
org.codehaus.groovy.grails.web.binding.GrailsDataBinder
@SuppressWarnings("rawtypes")
public class GrailsDataBinder
extends 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.
| Field Summary | |
|---|---|
static java.lang.String |
DEFAULT_DATE_FORMAT
|
static String[] |
DOMAINCLASS_DISALLOWED
|
static String[] |
GROOVY_DISALLOWED
|
static String[] |
GROOVY_DOMAINCLASS_DISALLOWED
|
static java.lang.String |
NULL_ASSOCIATION
|
protected BeanWrapper |
bean
|
| Constructor Summary | |
GrailsDataBinder(java.lang.Object target, java.lang.String objectName)
Create a new GrailsDataBinder instance. |
|
| Method Summary | |
|---|---|
protected void
|
autoCreateIfPossible(MutablePropertyValues mpvs)
Auto-creates the a type if it is null and is possible to auto-create. |
void
|
bind(PropertyValues propertyValues)
|
void
|
bind(GrailsParameterMap params)
Binds from a GrailsParameterMap object |
void
|
bind(GrailsParameterMap params, java.lang.String prefix)
|
void
|
bind(PropertyValues propertyValues, java.lang.String prefix)
|
void
|
bind(ServletRequest request)
|
void
|
bind(ServletRequest request, java.lang.String prefix)
|
protected void
|
bindAssociations(MutablePropertyValues mpvs)
Interrogates the specified properties looking for properites that represent associations to other classes (e.g., 'author.id'). |
protected void
|
checkFieldMarkers(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, 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(MutablePropertyValues mpvs)
|
static void
|
registerCustomEditors(PropertyEditorRegistry registry, java.util.Locale locale)
Registers all known |
| Field Detail |
|---|
public static final java.lang.String DEFAULT_DATE_FORMAT
public static final String[] DOMAINCLASS_DISALLOWED
public static final String[] GROOVY_DISALLOWED
public static final String[] GROOVY_DOMAINCLASS_DISALLOWED
public static final java.lang.String NULL_ASSOCIATION
protected BeanWrapper bean
| Constructor Detail |
|---|
@SuppressWarnings("unchecked")
public GrailsDataBinder(java.lang.Object target, java.lang.String objectName)
target - target object to bind ontoobjectName - objectName of the target object
| Method Detail |
|---|
protected void autoCreateIfPossible(MutablePropertyValues mpvs)
mpvs - A MutablePropertyValues instance
@Override public void bind(PropertyValues propertyValues)
public void bind(GrailsParameterMap params)
params - The GrailsParameterMap object
public void bind(GrailsParameterMap params, java.lang.String prefix)
public void bind(PropertyValues propertyValues, java.lang.String prefix)
@Override public void bind(ServletRequest request)
public void bind(ServletRequest request, java.lang.String prefix)
protected void bindAssociations(MutablePropertyValues mpvs)
mpvs - the MutablePropertyValues object holding the parameters from the request
@Override protected void checkFieldMarkers(MutablePropertyValues mpvs)
public static GrailsDataBinder createBinder(java.lang.Object target, java.lang.String objectName, HttpServletRequest request)
target - The target object to bind toobjectName - The name of the objectrequest - A request instance
public static GrailsDataBinder createBinder(java.lang.Object target, java.lang.String objectName)
target - The target object to bind toobjectName - The name of the object
@Override protected void doBind(MutablePropertyValues mpvs)
public static void registerCustomEditors(PropertyEditorRegistry registry, java.util.Locale locale)
Groovy Documentation