Allows fine grained control of binding request parameters from strings onto objects and the necessary types (data binding).


// binds request parameters to a target object
bindData(target, params) 
// exclude firstName and lastName (since 0.4)
bindData(target, params, ['firstName', 'lastName']) 
// only use parameters starting with "author." e.g. (since 0.5.5)
bindData(target, this.params, "author") 
bindData(target, this.params, ['firstName', 'lastName'], "author")

// using inclusive map bindData(target, this.params, [include:['firstName', 'lastName']], "author") // using exclusive map bindData(target, this.params, [exclude:['firstName', 'lastName']], "author")


Usage: bindData(target, params, excludes, prefix)


The underlying implementation uses Spring's Data Binding framework. If the target is a domain class type conversion errors are stored in the errors property of the domain class.

Refer to the section on Data Binding in the user guide for more information.