(Quick Reference)

7.2.7 MetaComponent - Reference Documentation

Authors: Andres Almiray

Version: 1.2.0

7.2.7 MetaComponent

Provided by: Griffon

Enables the usage of a meta-component as a View node. Meta-components are MVC groups that contain additional configuration, for example

mvcGroups {
    'custom' {
        model      = 'sample.CustomModel'
        view       = 'sample.CustomView'
        controller = 'sample.CustomController'
        config {
            component = true
            title = 'My Default Title'
        }
    }
}

The metaComponent() node instantiates the MVC group and attaches the top node from the groups' View member into the current hierarchy. Using the previous group definition in a View script is straight forward

metaComponent('custom', title: 'Another Title')