buildMVCGroup(*)
Purpose
Create a new MVC group instance, which may contain non-standard members (like actions, dialogs, etc).Examples
class SampleController {
def action = { evt = null ->
MVCGroup group = buildMVCGroup('Other')
}
}
Description
This method lets you create new instances of an MVC group. There are several ways to invoke this method depending on your needs
buildMVCGroup(String groupName)
- creates a new group identified by <groupName> with default settings.
buildMVCGroup(String groupName, groupId)
- creates a new group identified by <groupName> with default settings and an specific <groupId>. You can reference the whole group later by accessing app.groups.<groupId>
.
buildMVCGroup(String groupName, Map params)
- creates a new group identified by <groupName> with additional params. The params
argument will be fed as the args
value of mvcGroupInit()
.
buildMVCGroup(String groupName, String groupId, Map params)
- a combination of all previous definitions.
Use this method when building a group that may contain additional MVC members as createMVCGroup()
returns strict MVC members only (Model, View, Controller).
Fired Events:
NewInstance
- for each member of the MVC group that had to be instantiated
InitializeMVCGroup
- before each group member is initialized
CreateMVCGroup
- after the group has been created