com.interface21.web.bind
Class BindUtils
java.lang.Object
|
+--com.interface21.web.bind.BindUtils
- public abstract class BindUtils
- extends java.lang.Object
Offers convenience methods for binding servlet request parameters
to objects, including optional validation.
- Since:
- 10.03.2003
- Author:
- Juergen Hoeller
|
Method Summary |
static BindException |
bind(javax.servlet.ServletRequest request,
java.lang.Object object,
java.lang.String objectName)
Bind the parameters from the given request to the given object. |
static BindException |
bindAndValidate(javax.servlet.ServletRequest request,
java.lang.Object object,
java.lang.String objectName,
Validator validator)
Bind the parameters from the given request to the given object,
invoking the given validator. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
BindUtils
public BindUtils()
bind
public static BindException bind(javax.servlet.ServletRequest request,
java.lang.Object object,
java.lang.String objectName)
- Bind the parameters from the given request to the given object.
- Parameters:
request - request containing the parametersobject - object to bind the parameters toobjectName - name of the bind object- Returns:
- the binder used (can be treated as DataBinder or Errors instance)
bindAndValidate
public static BindException bindAndValidate(javax.servlet.ServletRequest request,
java.lang.Object object,
java.lang.String objectName,
Validator validator)
- Bind the parameters from the given request to the given object,
invoking the given validator.
- Parameters:
request - request containing the parametersobject - object to bind the parameters toobjectName - name of the bind objectvalidator - validator to be invoked, or null if no validation- Returns:
- the binder used (can be treated as Errors instance)
Rod Johnson and Spring contributors 2001-2003.