Overview | Package | Class | Deprecated | Index | Help
| Groovy Documentation
| FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.codehaus.groovy.grails.web.plugins.support
[Groovy] Class WebMetaUtils

    java.lang.Object
      org.codehaus.groovy.grails.web.plugins.support.WebMetaUtils

    class WebMetaUtils

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.

Authors:
  Graeme Rocher

Since:
  1.0

Method Summary
`static groovy.lang.Closure` | `createAndPrepareCommandObjectAction(groovy.lang.GroovyObject controller, groovy.lang.Closure originalAction, java.lang.String actionName, ApplicationContext ctx)`
`static groovy.lang.Closure` | `createCommandObjectBindingAction(ApplicationContext ctx)` Creates a command object binding action that can be used to replace an existing action
`static void` | `enhanceCommandObject(ApplicationContext ctx, java.lang.Class commandObjectClass)` Enhances a command object with new capabilities such as validation and constraints handling
`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, ApplicationContext ctx)` Prepares a command object binding action for usage
`static java.lang.Object` | `registerCommonWebProperties(groovy.lang.MetaClass mc, GrailsApplication application)` This creates the difference dynamic methods and properties on the controllers.
`static java.lang.Object` | `registerMethodMissingForTags(groovy.lang.MetaClass mc, TagLibraryLookup gspTagLibraryLookup, java.lang.String namespace, java.lang.String name)`
`static java.lang.Object` | `registerMethodMissingForTags(groovy.lang.MetaClass mc, ApplicationContext ctx, GrailsTagLibClass tagLibraryClass, java.lang.String name)`
`static java.lang.Object` | `registerStreamCharBufferMetaClass()`

Methods inherited from class java.lang.Object
java.lang.Object#wait(), java.lang.Object#wait(long), java.lang.Object#wait(long, int), 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()

Method Detail

### createAndPrepareCommandObjectAction

    static groovy.lang.Closure createAndPrepareCommandObjectAction(groovy.lang.GroovyObject controller, groovy.lang.Closure originalAction, java.lang.String actionName, ApplicationContext ctx)

### createCommandObjectBindingAction

    static groovy.lang.Closure createCommandObjectBindingAction(ApplicationContext ctx)

  Creates a command object binding action that can be used to replace an existing action
  Parameters:
    `ctx` - The ApplicationContext
  Returns:
    The command object binding action

### enhanceCommandObject

    static void enhanceCommandObject(ApplicationContext ctx, java.lang.Class commandObjectClass)

  Enhances a command object with new capabilities such as validation and constraints handling
  Parameters:
    `commandObjectClass` - The command object class

### isCommandObjectAction

    static boolean isCommandObjectAction(groovy.lang.Closure callable)

  Checks whether the given action is a command object action
  Parameters:
    `callable` - The action to check
  Returns:
    True if it is a command object action

### prepareCommandObjectBindingAction

    static groovy.lang.Closure prepareCommandObjectBindingAction(groovy.lang.Closure action, groovy.lang.Closure originalAction, java.lang.String actionName, java.lang.Object controller, ApplicationContext ctx)

  Prepares a command object binding action for usage
  Parameters:
    `action` - The binding action
    `originalAction` - The original action to be replacec
    `actionName` - The action name
    `controller` - The controller
  Returns:
    The new binding action

### registerCommonWebProperties

    static java.lang.Object registerCommonWebProperties(groovy.lang.MetaClass mc, GrailsApplication application)

  This creates the difference dynamic methods and properties on the controllers. Most methods are implemented by looking up the current request from the RequestContextHolder (RCH)

### registerMethodMissingForTags

    static java.lang.Object registerMethodMissingForTags(groovy.lang.MetaClass mc, TagLibraryLookup gspTagLibraryLookup, java.lang.String namespace, java.lang.String name)

### registerMethodMissingForTags

    static java.lang.Object registerMethodMissingForTags(groovy.lang.MetaClass mc, ApplicationContext ctx, GrailsTagLibClass tagLibraryClass, java.lang.String name)

### registerStreamCharBufferMetaClass

    static java.lang.Object registerStreamCharBufferMetaClass()

Groovy Documentation