Griffon 0.9.5-rc2

griffon.core
[Java] Interface MVCHandler


public interface MVCHandler

Base contract for classes that can manipulate MVC groups. There are 3 types of methods used for instantiating a group:

It's worth mentioning that the value of the mvcName parameter must be unique otherwise a collision will occur. When that happens the application will report and exception and terminate. This behavior can be configured to be more lenient, by defining a configuration flag griffon.mvcid.collision in Config.groovy.
Accepted values are

Authors:
Andres Almiray
Since:
0.9.3


Method Summary
MVCGroup buildMVCGroup(String mvcType)

Instantiates an MVC group of the specified type.

MVCGroup buildMVCGroup(String mvcType, String mvcName)

Instantiates an MVC group of the specified type with a particular name.

MVCGroup buildMVCGroup(Map args, String mvcType)

Instantiates an MVC group of the specified type with additional variables.

MVCGroup buildMVCGroup(String mvcType, Map args)

Instantiates an MVC group of the specified type with additional variables.

MVCGroup buildMVCGroup(Map args, String mvcType, String mvcName)

Instantiates an MVC group of the specified type with a particular name.

MVCGroup buildMVCGroup(String mvcType, String mvcName, Map args)

Instantiates an MVC group of the specified type with a particular name.

List createMVCGroup(String mvcType)

Instantiates an MVC group of the specified type returning only the MVC parts.

List createMVCGroup(Map args, String mvcType)

Instantiates an MVC group of the specified type with additional variables.

List createMVCGroup(String mvcType, Map args)

Instantiates an MVC group of the specified type with additional variables.

List createMVCGroup(String mvcType, String mvcName)

Instantiates an MVC group of the specified type with a particular name.

List createMVCGroup(Map args, String mvcType, String mvcName)

Instantiates an MVC group of the specified type with a particular name.

List createMVCGroup(String mvcType, String mvcName, Map args)

Instantiates an MVC group of the specified type with a particular name.

void destroyMVCGroup(String mvcName)

Destroys an MVC group identified by a particular name.

void withMVCGroup(String mvcType, Closure handler)

Instantiates an MVC group of the specified type then destroys it after it has been handled.

void withMVCGroup(String mvcType, String mvcName, Closure handler)

Instantiates an MVC group of the specified type then destroys it after it has been handled.

void withMVCGroup(String mvcType, String mvcName, Map args, Closure handler)

Instantiates an MVC group of the specified type then destroys it after it has been handled.

void withMVCGroup(Map args, String mvcType, String mvcName, Closure handler)

Instantiates an MVC group of the specified type then destroys it after it has been handled.

void withMVCGroup(String mvcType, Map args, Closure handler)

Instantiates an MVC group of the specified type then destroys it after it has been handled.

void withMVCGroup(Map args, String mvcType, Closure handler)

Instantiates an MVC group of the specified type then destroys it after it has been handled.

void withMVCGroup(String mvcType, MVCClosure handler)

Instantiates an MVC group of the specified type then destroys it after it has been handled.

void withMVCGroup(String mvcType, String mvcName, MVCClosure handler)

Instantiates an MVC group of the specified type then destroys it after it has been handled.

void withMVCGroup(String mvcType, String mvcName, Map args, MVCClosure handler)

Instantiates an MVC group of the specified type then destroys it after it has been handled.

void withMVCGroup(Map args, String mvcType, String mvcName, MVCClosure handler)

Instantiates an MVC group of the specified type then destroys it after it has been handled.

void withMVCGroup(String mvcType, Map args, MVCClosure handler)

Instantiates an MVC group of the specified type then destroys it after it has been handled.

void withMVCGroup(Map args, String mvcType, MVCClosure handler)

Instantiates an MVC group of the specified type then destroys it after it has been handled.

 

Method Detail

buildMVCGroup

public MVCGroup buildMVCGroup(String mvcType)
Instantiates an MVC group of the specified type.

MVC Groups must be previously configured with the application's metadata before they can be used. This registration process usually takes place automatically at boot time. The type of the group can be normally found in the application's configuration file.

For example, with the following entry available in Application.groovy

 mvcGroups {
     'foo' {
         model      = 'com.acme.FooModel'
         view       = 'com.acme.FooView'
         controller = 'com.acme.FooController'
     }
 }
 

An instance of the "foo" group can be created as follows

 Map fooGroup = buildMVCGroup('foo')
 assert (fooGroup.controller instanceof FooController)
 
throws:
griffon.exceptions.MVCGroupInstantiationException - if the type specified is not found in the application's configuration or if a group with the same mvcName exists already.
Parameters:
mvcType - the type of group to build.
Returns:
an MVCGroup instance of the desired type


buildMVCGroup

public MVCGroup buildMVCGroup(String mvcType, String mvcName)
Instantiates an MVC group of the specified type with a particular name.

MVC Groups must be previously configured with the application's metadata before they can be used. This registration process usually takes place automatically at boot time. The type of the group can be normally found in the application's configuration file.

For example, with the following entry available in Application.groovy

 mvcGroups {
     'foo' {
         model      = 'com.acme.FooModel'
         view       = 'com.acme.FooView'
         controller = 'com.acme.FooController'
     }
 }
 

An instance of the "foo" group can be created as follows

 Map fooGroup = buildMVCGroup('foo', 'foo' + System.currentTimeMillis())
 assert (fooGroup.controller instanceof FooController)
 

MVC groups must have an unique name.

throws:
griffon.exceptions.MVCGroupInstantiationException - if the type specified is not found in the application's configuration or if a group with the same mvcName exists already.
Parameters:
mvcType - the type of group to build.
mvcName - the name to assign to the built group.
Returns:
an MVCGroup instance of the desired type


buildMVCGroup

public MVCGroup buildMVCGroup(Map args, String mvcType)
Instantiates an MVC group of the specified type with additional variables.

MVC Groups must be previously configured with the application's metadata before they can be used. This registration process usually takes place automatically at boot time. The type of the group can be normally found in the application's configuration file.

The args Map can contain any value that will be used in one of the following scenarios

For example, with the following entry available in Application.groovy

 mvcGroups {
     'foo' {
         model      = 'com.acme.FooModel'
         view       = 'com.acme.FooView'
         controller = 'com.acme.FooController'
     }
     'bar' {
         model      = 'com.acme.FooModel'
         view       = 'com.acme.BarView'
         controller = 'com.acme.BarController'
     }
 }
 

Notice that groups "foo" and "bar share the same model type, We can make them share the same model instance by creating the groups in the following way:

 Map fooGroup = buildMVCGroup('foo')
 Map barGroup = buildMVCGroup('bar', model: fooGroup.model)
 assert fooGroup.model == barGroup.model
 
throws:
griffon.exceptions.MVCGroupInstantiationException - if the type specified is not found in the application's configuration or if a group with the same mvcName exists already.
Parameters:
args - any useful values that can be set as properties on each MVC member or that identify a member that can be shared with other groups.
mvcType - the type of group to build.
Returns:
an MVCGroup instance of the desired type


buildMVCGroup

public MVCGroup buildMVCGroup(String mvcType, Map args)
Instantiates an MVC group of the specified type with additional variables.

MVC Groups must be previously configured with the application's metadata before they can be used. This registration process usually takes place automatically at boot time. The type of the group can be normally found in the application's configuration file.

The args Map can contain any value that will be used in one of the following scenarios

For example, with the following entry available in Application.groovy

 mvcGroups {
     'foo' {
         model      = 'com.acme.FooModel'
         view       = 'com.acme.FooView'
         controller = 'com.acme.FooController'
     }
     'bar' {
         model      = 'com.acme.FooModel'
         view       = 'com.acme.BarView'
         controller = 'com.acme.BarController'
     }
 }
 

Notice that groups "foo" and "bar share the same model type, We can make them share the same model instance by creating the groups in the following way:

 Map fooGroup = buildMVCGroup('foo')
 Map barGroup = buildMVCGroup('bar', model: fooGroup.model)
 assert fooGroup.model == barGroup.model
 
throws:
griffon.exceptions.MVCGroupInstantiationException - if the type specified is not found in the application's configuration or if a group with the same mvcName exists already.
Parameters:
mvcType - the type of group to build.
args - any useful values that can be set as properties on each MVC member or that identify a member that can be shared with other groups.
Returns:
an MVCGroup instance of the desired type


buildMVCGroup

public MVCGroup buildMVCGroup(Map args, String mvcType, String mvcName)
Instantiates an MVC group of the specified type with a particular name.

MVC Groups must be previously configured with the application's metadata before they can be used. This registration process usually takes place automatically at boot time. The type of the group can be normally found in the application's configuration file.

The args Map can contain any value that will be used in one of the following scenarios

For example, with the following entry available in Application.groovy

 mvcGroups {
     'foo' {
         model      = 'com.acme.FooModel'
         view       = 'com.acme.FooView'
         controller = 'com.acme.FooController'
     }
 }
 

We can create two instances of the same group that share the same model instance in the following way:

 Map fooGroup1 = buildMVCGroup('foo', 'foo1')
 Map fooGroup2 = buildMVCGroup('bar', 'foo2', model: fooGroup1.model)
 assert fooGroup1.model == fooGroup2.model
 

MVC groups must have an unique name.

throws:
griffon.exceptions.MVCGroupInstantiationException - if the type specified is not found in the application's configuration or if a group with the same mvcName exists already.
Parameters:
args - any useful values that can be set as properties on each MVC member or that identify a member that can be shared with other groups.
mvcType - the type of group to build.
mvcName - the name to assign to the built group.
Returns:
an MVCGroup instance of the desired type


buildMVCGroup

public MVCGroup buildMVCGroup(String mvcType, String mvcName, Map args)
Instantiates an MVC group of the specified type with a particular name.

MVC Groups must be previously configured with the application's metadata before they can be used. This registration process usually takes place automatically at boot time. The type of the group can be normally found in the application's configuration file.

The args Map can contain any value that will be used in one of the following scenarios

For example, with the following entry available in Application.groovy

 mvcGroups {
     'foo' {
         model      = 'com.acme.FooModel'
         view       = 'com.acme.FooView'
         controller = 'com.acme.FooController'
     }
 }
 

We can create two instances of the same group that share the same model instance in the following way:

 Map fooGroup1 = buildMVCGroup('foo', 'foo1')
 Map fooGroup2 = buildMVCGroup('bar', 'foo2', model: fooGroup1.model)
 assert fooGroup1.model == fooGroup2.model
 

MVC groups must have an unique name.

throws:
griffon.exceptions.MVCGroupInstantiationException - if the type specified is not found in the application's configuration or if a group with the same mvcName exists already.
Parameters:
mvcType - the type of group to build.
mvcName - the name to assign to the built group.
args - any useful values that can be set as properties on each MVC member or that identify a member that can be shared with other groups.
Returns:
an MVCGroup instance of the desired type


createMVCGroup

public List createMVCGroup(String mvcType)
Instantiates an MVC group of the specified type returning only the MVC parts.

MVC Groups must be previously configured with the application's metadata before they can be used. This registration process usually takes place automatically at boot time. The type of the group can be normally found in the application's configuration file.

For example, with the following entry available in Application.groovy

 mvcGroups {
     'foo' {
         model      = 'com.acme.FooModel'
         view       = 'com.acme.FooView'
         controller = 'com.acme.FooController'
     }
 }
 

An instance of the "foo" group can be created as follows

 def (m, v, c) = createMVCGroup('foo')
 assert (c instanceof FooController)
 
throws:
griffon.exceptions.MVCGroupInstantiationException - if the type specified is not found in the application's configuration or if a group with the same mvcName exists already.
Parameters:
mvcType - the type of group to build.
Returns:
a List with the canonical MVC members of the group


createMVCGroup

public List createMVCGroup(Map args, String mvcType)
Instantiates an MVC group of the specified type with additional variables.

MVC Groups must be previously configured with the application's metadata before they can be used. This registration process usually takes place automatically at boot time. The type of the group can be normally found in the application's configuration file.

The args Map can contain any value that will be used in one of the following scenarios

For example, with the following entry available in Application.groovy

 mvcGroups {
     'foo' {
         model      = 'com.acme.FooModel'
         view       = 'com.acme.FooView'
         controller = 'com.acme.FooController'
     }
     'bar' {
         model      = 'com.acme.FooModel'
         view       = 'com.acme.BarView'
         controller = 'com.acme.BarController'
     }
 }
 

Notice that groups "foo" and "bar share the same model type, We can make them share the same model instance by creating the groups in the following way:

 def (m1, v1, c1) = createMVCGroup('foo')
 def (m2, v2, c2) = createMVCGroup('bar', model: m1)
 assert fm1 == m2
 
throws:
griffon.exceptions.MVCGroupInstantiationException - if the type specified is not found in the application's configuration or if a group with the same mvcName exists already.
Parameters:
args - any useful values that can be set as properties on each MVC member or that identify a member that can be shared with other groups.
mvcType - the type of group to build.
Returns:
a List with the canonical MVC members of the group


createMVCGroup

public List createMVCGroup(String mvcType, Map args)
Instantiates an MVC group of the specified type with additional variables.

MVC Groups must be previously configured with the application's metadata before they can be used. This registration process usually takes place automatically at boot time. The type of the group can be normally found in the application's configuration file.

The args Map can contain any value that will be used in one of the following scenarios

For example, with the following entry available in Application.groovy

 mvcGroups {
     'foo' {
         model      = 'com.acme.FooModel'
         view       = 'com.acme.FooView'
         controller = 'com.acme.FooController'
     }
     'bar' {
         model      = 'com.acme.FooModel'
         view       = 'com.acme.BarView'
         controller = 'com.acme.BarController'
     }
 }
 

Notice that groups "foo" and "bar share the same model type, We can make them share the same model instance by creating the groups in the following way:

 def (m1, v1, c1) = createMVCGroup('foo')
 def (m2, v2, c2) = createMVCGroup('bar', model: m1)
 assert fm1 == m2
 
throws:
griffon.exceptions.MVCGroupInstantiationException - if the type specified is not found in the application's configuration or if a group with the same mvcName exists already.
Parameters:
mvcType - the type of group to build.
args - any useful values that can be set as properties on each MVC member or that identify a member that can be shared with other groups.
Returns:
a List with the canonical MVC members of the group


createMVCGroup

public List createMVCGroup(String mvcType, String mvcName)
Instantiates an MVC group of the specified type with a particular name.

MVC Groups must be previously configured with the application's metadata before they can be used. This registration process usually takes place automatically at boot time. The type of the group can be normally found in the application's configuration file.

For example, with the following entry available in Application.groovy

 mvcGroups {
     'foo' {
         model      = 'com.acme.FooModel'
         view       = 'com.acme.FooView'
         controller = 'com.acme.FooController'
      }
 }
 

An instance of the "foo" group can be created as follows

 def (m, v, c) = createMVCGroup('foo', 'foo' + System.currenttimeMillis())
 assert (c instanceof FooController)
 

MVC groups must have an unique name.

throws:
griffon.exceptions.MVCGroupInstantiationException - if the type specified is not found in the application's configuration or if a group with the same mvcName exists already.
Parameters:
mvcType - the type of group to build.
mvcName - the name to assign to the built group.
Returns:
a List with the canonical MVC members of the group


createMVCGroup

public List createMVCGroup(Map args, String mvcType, String mvcName)
Instantiates an MVC group of the specified type with a particular name.

MVC Groups must be previously configured with the application's metadata before they can be used. This registration process usually takes place automatically at boot time. The type of the group can be normally found in the application's configuration file.

The args Map can contain any value that will be used in one of the following scenarios

For example, with the following entry available in Application.groovy

 mvcGroups {
     'foo' {
         model      = 'com.acme.FooModel'
         view       = 'com.acme.FooView'
         controller = 'com.acme.FooController'
     }
 }
 

We can create two instances of the same group that share the same model instance in the following way:

 def (m1, v1, c1) = createMVCGroup('foo', 'foo1')
 def (m2, v2, c2) = createMVCGroup('foo', 'foo2', model: m1)
 assert fm1 == m2
 

MVC groups must have an unique name.

throws:
griffon.exceptions.MVCGroupInstantiationException - if the type specified is not found in the application's configuration or if a group with the same mvcName exists already.
Parameters:
args - any useful values that can be set as properties on each MVC member or that identify a member that can be shared with other groups.
mvcType - the type of group to build.
mvcName - the name to assign to the built group.
Returns:
a List with the canonical MVC members of the group


createMVCGroup

public List createMVCGroup(String mvcType, String mvcName, Map args)
Instantiates an MVC group of the specified type with a particular name.

MVC Groups must be previously configured with the application's metadata before they can be used. This registration process usually takes place automatically at boot time. The type of the group can be normally found in the application's configuration file.

The args Map can contain any value that will be used in one of the following scenarios

For example, with the following entry available in Application.groovy

 mvcGroups {
     'foo' {
         model      = 'com.acme.FooModel'
         view       = 'com.acme.FooView'
         controller = 'com.acme.FooController'
     }
 }
 

We can create two instances of the same group that share the same model instance in the following way:

 def (m1, v1, c1) = createMVCGroup('foo', 'foo1')
 def (m2, v2, c2) = createMVCGroup('foo', 'foo2', model: m1)
 assert fm1 == m2
 

MVC groups must have an unique name.

throws:
griffon.exceptions.MVCGroupInstantiationException - if the type specified is not found in the application's configuration or if a group with the same mvcName exists already.
Parameters:
mvcType - the type of group to build.
mvcName - the name to assign to the built group.
args - any useful values that can be set as properties on each MVC member or that identify a member that can be shared with other groups.
Returns:
a List with the canonical MVC members of the group


destroyMVCGroup

public void destroyMVCGroup(String mvcName)
Destroys an MVC group identified by a particular name.

ATTENTION: make sure to call the super implementation if you override this method otherwise group references will not be kept up to date.

Parameters:
mvcName - the name of the group to destroy and dispose.


withMVCGroup

public void withMVCGroup(String mvcType, Closure handler)
Instantiates an MVC group of the specified type then destroys it after it has been handled.

This method is of particular interest when working with short lived MVC groups such as those used to build dialogs.

MVC Groups must be previously configured with the application's metadata before they can be used. This registration process usually takes place automatically at boot time. The type of the group can be normally found in the application's configuration file.

For example, with the following entry available in Application.groovy

 mvcGroups {
     'foo' {
         model      = 'com.acme.FooModel'
         view       = 'com.acme.FooView'
         controller = 'com.acme.FooController'
     }
 }
 

An instance of the "foo" group can be used as follows

 withMVCGroup('foo') { m, v, c->
     m.someProperty = someValue
     c.invokeAnAction()
 }
 
throws:
griffon.exceptions.MVCGroupInstantiationException - if the type specified is not found in the application's configuration
Parameters:
mvcType - the type of group to build.
handler - a code block used to configure and manage the instantiated group
Since:
0.9.3


withMVCGroup

public void withMVCGroup(String mvcType, String mvcName, Closure handler)
Instantiates an MVC group of the specified type then destroys it after it has been handled.

This method is of particular interest when working with short lived MVC groups such as those used to build dialogs.

MVC Groups must be previously configured with the application's metadata before they can be used. This registration process usually takes place automatically at boot time. The type of the group can be normally found in the application's configuration file.

For example, with the following entry available in Application.groovy

 mvcGroups {
     'foo' {
         model      = 'com.acme.FooModel'
         view       = 'com.acme.FooView'
         controller = 'com.acme.FooController'
     }
 }
 

An instance of the "foo" group can be used as follows

 withMVCGroup('foo', 'foo1') { m, v, c->
     m.someProperty = someValue
     c.invokeAnAction()
 }
 

MVC groups must have an unique name.

throws:
griffon.exceptions.MVCGroupInstantiationException - if the type specified is not found in the application's configuration
Parameters:
mvcType - the type of group to build.
mvcName - the name to assign to the built group.
handler - a code block used to configure and manage the instantiated group
Since:
0.9.3


withMVCGroup

public void withMVCGroup(String mvcType, String mvcName, Map args, Closure handler)
Instantiates an MVC group of the specified type then destroys it after it has been handled.

This method is of particular interest when working with short lived MVC groups such as those used to build dialogs.

MVC Groups must be previously configured with the application's metadata before they can be used. This registration process usually takes place automatically at boot time. The type of the group can be normally found in the application's configuration file.

The args Map can contain any value that will be used in one of the following scenarios


withMVCGroup

public void withMVCGroup(Map args, String mvcType, String mvcName, Closure handler)
Instantiates an MVC group of the specified type then destroys it after it has been handled.

This method is of particular interest when working with short lived MVC groups such as those used to build dialogs.

MVC Groups must be previously configured with the application's metadata before they can be used. This registration process usually takes place automatically at boot time. The type of the group can be normally found in the application's configuration file.

The args Map can contain any value that will be used in one of the following scenarios


withMVCGroup

public void withMVCGroup(String mvcType, Map args, Closure handler)
Instantiates an MVC group of the specified type then destroys it after it has been handled.

This method is of particular interest when working with short lived MVC groups such as those used to build dialogs.

MVC Groups must be previously configured with the application's metadata before they can be used. This registration process usually takes place automatically at boot time. The type of the group can be normally found in the application's configuration file.

The args Map can contain any value that will be used in one of the following scenarios


withMVCGroup

public void withMVCGroup(Map args, String mvcType, Closure handler)
Instantiates an MVC group of the specified type then destroys it after it has been handled.

This method is of particular interest when working with short lived MVC groups such as those used to build dialogs.

MVC Groups must be previously configured with the application's metadata before they can be used. This registration process usually takes place automatically at boot time. The type of the group can be normally found in the application's configuration file.

The args Map can contain any value that will be used in one of the following scenarios


withMVCGroup

public void withMVCGroup(String mvcType, MVCClosure handler)
Instantiates an MVC group of the specified type then destroys it after it has been handled.

This method is of particular interest when working with short lived MVC groups such as those used to build dialogs.

MVC Groups must be previously configured with the application's metadata before they can be used. This registration process usually takes place automatically at boot time. The type of the group can be normally found in the application's configuration file.

For example, with the following entry available in Application.groovy

 mvcGroups {
     'foo' {
         model      = 'com.acme.FooModel'
         view       = 'com.acme.FooView'
         controller = 'com.acme.FooController'
    }
 }
 

An instance of the "foo" group can be used as follows

 withMVCGroup("foo", new MVCClosure<FooModel, FooView, FooController>() {
     public void call(FooModel m, FooView v, FooController c) {
         m.setSomeProperty(someValue);
         c.invokeAnAction();
     }
 });
 
throws:
griffon.exceptions.MVCGroupInstantiationException - if the type specified is not found in the application's configuration
Parameters:
mvcType - the type of group to build.
handler - a code block used to configure and manage the instantiated group
Since:
0.9.3


withMVCGroup

public void withMVCGroup(String mvcType, String mvcName, MVCClosure handler)
Instantiates an MVC group of the specified type then destroys it after it has been handled.

This method is of particular interest when working with short lived MVC groups such as those used to build dialogs.

MVC Groups must be previously configured with the application's metadata before they can be used. This registration process usually takes place automatically at boot time. The type of the group can be normally found in the application's configuration file.

For example, with the following entry available in Application.groovy

 mvcGroups {
     'foo' {
         model      = 'com.acme.FooModel'
         view       = 'com.acme.FooView'
         controller = 'com.acme.FooController'
     }
 }
 

An instance of the "foo" group can be used as follows

 withMVCGroup("foo", "foo1", new MVCClosure<FooModel, FooView, FooController>() {
     public void call(FooModel m, FooView v, FooController c) {
         m.setSomeProperty(someValue);
         c.invokeAnAction();
     }
 });
 

MVC groups must have an unique name.

throws:
griffon.exceptions.MVCGroupInstantiationException - if the type specified is not found in the application's configuration
Parameters:
mvcType - the type of group to build.
mvcName - the name to assign to the built group.
handler - a code block used to configure and manage the instantiated group
Since:
0.9.3


withMVCGroup

public void withMVCGroup(String mvcType, String mvcName, Map args, MVCClosure handler)
Instantiates an MVC group of the specified type then destroys it after it has been handled.

This method is of particular interest when working with short lived MVC groups such as those used to build dialogs.

MVC Groups must be previously configured with the application's metadata before they can be used. This registration process usually takes place automatically at boot time. The type of the group can be normally found in the application's configuration file.

The args Map can contain any value that will be used in one of the following scenarios


withMVCGroup

public void withMVCGroup(Map args, String mvcType, String mvcName, MVCClosure handler)
Instantiates an MVC group of the specified type then destroys it after it has been handled.

This method is of particular interest when working with short lived MVC groups such as those used to build dialogs.

MVC Groups must be previously configured with the application's metadata before they can be used. This registration process usually takes place automatically at boot time. The type of the group can be normally found in the application's configuration file.

The args Map can contain any value that will be used in one of the following scenarios


withMVCGroup

public void withMVCGroup(String mvcType, Map args, MVCClosure handler)
Instantiates an MVC group of the specified type then destroys it after it has been handled.

This method is of particular interest when working with short lived MVC groups such as those used to build dialogs.

MVC Groups must be previously configured with the application's metadata before they can be used. This registration process usually takes place automatically at boot time. The type of the group can be normally found in the application's configuration file.

The args Map can contain any value that will be used in one of the following scenarios


withMVCGroup

public void withMVCGroup(Map args, String mvcType, MVCClosure handler)
Instantiates an MVC group of the specified type then destroys it after it has been handled.

This method is of particular interest when working with short lived MVC groups such as those used to build dialogs.

MVC Groups must be previously configured with the application's metadata before they can be used. This registration process usually takes place automatically at boot time. The type of the group can be normally found in the application's configuration file.

The args Map can contain any value that will be used in one of the following scenarios


 

Groovy Documentation