Provides utility methods used to support meta-programming. In particular commons methods to register tag library method invokations as new methods an a given MetaClass.
Type Params | Return Type | Name and description |
---|---|---|
|
static void |
enhanceCommandObject(org.springframework.context.ApplicationContext ctx, java.lang.Class commandObjectClass) Enhances a command object with new capabilities such as validation and constraints handling |
|
static DataBindingSource |
getCommandObjectBindingSource(java.lang.Class commandObjectClass, DataBindingSource params) Use getCommandObjectBindingSourceForPrefix instead. |
|
static DataBindingSource |
getCommandObjectBindingSourceForPrefix(java.lang.String prefix, DataBindingSource params) Return a DataBindingSource for a command object which has a parameter name matching the specified prefix. |
|
static boolean |
isCommandObjectAction(groovy.lang.Closure callable) Checks whether the given action is a command object action |
|
static groovy.lang.Closure |
prepareCommandObjectBindingAction(groovy.lang.Closure action, groovy.lang.Closure originalAction, java.lang.String actionName, java.lang.Object controller, org.springframework.context.ApplicationContext ctx) Prepares a command object binding action for usage |
|
static void |
prepareCommandObjectBindingAction(java.lang.reflect.Method action, java.lang.Class[] commandObjectClasses, org.springframework.context.ApplicationContext ctx) Prepares a command object binding action for usage |
|
static void |
registerCommonWebProperties(groovy.lang.MetaClass mc, GrailsApplication application) This creates the difference dynamic methods and properties on the controllers. |
Methods inherited from class | Name |
---|---|
class java.lang.Object |
java.lang.Object#wait(long, int), java.lang.Object#wait(long), java.lang.Object#wait(), java.lang.Object#equals(java.lang.Object), java.lang.Object#toString(), java.lang.Object#hashCode(), java.lang.Object#getClass(), java.lang.Object#notify(), java.lang.Object#notifyAll() |
Enhances a command object with new capabilities such as validation and constraints handling
commandObjectClass
- The command object classUse getCommandObjectBindingSourceForPrefix instead.
Return a DataBindingSource for a command object which has a parameter name matching the specified prefix. If params include something like widget.name=Thing and prefix is widget then the returned binding source will include name=thing, not widget.name=Thing.
prefix
- The parameter name for the command objectparams
- The original binding source associated with the requestChecks whether the given action is a command object action
callable
- The action to checkPrepares a command object binding action for usage
action
- The binding actionoriginalAction
- The original action to be replacecactionName
- The action namecontroller
- The controllerPrepares a command object binding action for usage
action
- The binding actionThis creates the difference dynamic methods and properties on the controllers. Most methods are implemented by looking up the current request from the RequestContextHolder (RCH)