public abstract class AbstractMVCGroup extends AbstractMVCHandler implements MVCGroup
MVCGroup
interfaceModifier and Type | Field and Description |
---|---|
protected Map<String,MVCGroup> |
children |
protected MVCGroupConfiguration |
configuration |
protected Context |
context |
protected Map<String,Object> |
members |
protected String |
mvcId |
protected MVCGroup |
parentGroup |
Constructor and Description |
---|
AbstractMVCGroup(MVCGroupManager mvcGroupManager,
MVCGroupConfiguration configuration,
String mvcId,
Map<String,Object> members,
MVCGroup parentGroup) |
Modifier and Type | Method and Description |
---|---|
protected void |
checkIfAlive() |
<MVC extends TypedMVCGroup> |
createMVC(Class<? extends MVC> mvcType)
Instantiates an MVC group of the specified type returning only the MVC parts.
|
<MVC extends TypedMVCGroup> |
createMVC(Class<? extends MVC> mvcType,
Map<String,Object> args)
Instantiates an MVC group of the specified type with additional variables.
|
<MVC extends TypedMVCGroup> |
createMVC(Class<? extends MVC> mvcType,
String mvcId)
Instantiates an MVC group of the specified type with a particular name.
|
<MVC extends TypedMVCGroup> |
createMVC(Class<? extends MVC> mvcType,
String mvcId,
Map<String,Object> args)
Instantiates an MVC group of the specified type with a particular name.
|
<MVC extends TypedMVCGroup> |
createMVC(Map<String,Object> args,
Class<? extends MVC> mvcType)
Instantiates an MVC group of the specified type with additional variables.
|
<MVC extends TypedMVCGroup> |
createMVC(Map<String,Object> args,
Class<? extends MVC> mvcType,
String mvcId)
Instantiates an MVC group of the specified type with a particular name.
|
List<? extends GriffonMvcArtifact> |
createMVC(Map<String,Object> args,
String mvcType)
Instantiates an MVC group of the specified type with additional variables.
|
List<? extends GriffonMvcArtifact> |
createMVC(Map<String,Object> args,
String mvcType,
String mvcId)
Instantiates an MVC group of the specified type with a particular name.
|
List<? extends GriffonMvcArtifact> |
createMVC(String mvcType)
Instantiates an MVC group of the specified type returning only the MVC parts.
|
List<? extends GriffonMvcArtifact> |
createMVC(String mvcType,
Map<String,Object> args)
Instantiates an MVC group of the specified type with additional variables.
|
List<? extends GriffonMvcArtifact> |
createMVC(String mvcType,
String mvcId)
Instantiates an MVC group of the specified type with a particular name.
|
List<? extends GriffonMvcArtifact> |
createMVC(String mvcType,
String mvcId,
Map<String,Object> args)
Instantiates an MVC group of the specified type with a particular name.
|
<MVC extends TypedMVCGroup> |
createMVCGroup(Class<? extends MVC> mvcType)
Instantiates an MVC group of the specified type.
|
<MVC extends TypedMVCGroup> |
createMVCGroup(Class<? extends MVC> mvcType,
Map<String,Object> args)
Instantiates an MVC group of the specified type with additional variables.
|
<MVC extends TypedMVCGroup> |
createMVCGroup(Class<? extends MVC> mvcType,
String mvcId)
Instantiates an MVC group of the specified type with a particular name.
|
<MVC extends TypedMVCGroup> |
createMVCGroup(Class<? extends MVC> mvcType,
String mvcId,
Map<String,Object> args)
Instantiates an MVC group of the specified type with a particular name.
|
<MVC extends TypedMVCGroup> |
createMVCGroup(Map<String,Object> args,
Class<? extends MVC> mvcType)
Instantiates an MVC group of the specified type with additional variables.
|
<MVC extends TypedMVCGroup> |
createMVCGroup(Map<String,Object> args,
Class<? extends MVC> mvcType,
String mvcId)
Instantiates an MVC group of the specified type with a particular name.
|
MVCGroup |
createMVCGroup(Map<String,Object> args,
String mvcType)
Instantiates an MVC group of the specified type with additional variables.
|
MVCGroup |
createMVCGroup(Map<String,Object> args,
String mvcType,
String mvcId)
Instantiates an MVC group of the specified type with a particular name.
|
MVCGroup |
createMVCGroup(String mvcType)
Instantiates an MVC group of the specified type.
|
MVCGroup |
createMVCGroup(String mvcType,
Map<String,Object> args)
Instantiates an MVC group of the specified type with additional variables.
|
MVCGroup |
createMVCGroup(String mvcType,
String mvcId)
Instantiates an MVC group of the specified type with a particular name.
|
MVCGroup |
createMVCGroup(String mvcType,
String mvcId,
Map<String,Object> args)
Instantiates an MVC group of the specified type with a particular name.
|
void |
destroy()
Destroys the current group.
|
Map<String,MVCGroup> |
getChildrenGroups()
Returns an immutable view of all children groups for which this group is a parent
|
MVCGroupConfiguration |
getConfiguration()
Returns the configuration of this group.
|
Context |
getContext()
Returns the context belonging to this group.
|
GriffonController |
getController()
Returns the Controller portion of this group.
|
List<Object> |
getInjectedInstances() |
Object |
getMember(String name)
Returns the specified member type.
|
Map<String,Object> |
getMembers()
Returns a read-only view of all instance members.
|
GriffonModel |
getModel()
Returns the Model portion of this group.
|
String |
getMvcId()
Returns the id of the group.
|
String |
getMvcType()
Returns the type of this group as set in the application's configuration.
|
MVCGroup |
getParentGroup()
Returns the parent
MVCGroup of this group. |
GriffonView |
getView()
Returns the View portion of this group.
|
boolean |
isAlive()
Returns whether this group has been destroyed or not.
|
void |
notifyMVCGroupDestroyed(String mvcId)
Notifies the group when another MVC group has been destroyed, potentially
a child group.
|
<MVC extends TypedMVCGroup,M extends GriffonModel,V extends GriffonView,C extends GriffonController> |
withMVC(Class<? extends MVC> mvcType,
Map<String,Object> args,
MVCFunction<M,V,C> handler)
Instantiates an MVC group of the specified type then destroys it after it has been handled.
|
<MVC extends TypedMVCGroup,M extends GriffonModel,V extends GriffonView,C extends GriffonController> |
withMVC(Class<? extends MVC> mvcType,
MVCFunction<M,V,C> handler)
Instantiates an MVC group of the specified type then destroys it after it has been handled.
|
<MVC extends TypedMVCGroup,M extends GriffonModel,V extends GriffonView,C extends GriffonController> |
withMVC(Class<? extends MVC> mvcType,
String mvcId,
Map<String,Object> args,
MVCFunction<M,V,C> handler)
Instantiates an MVC group of the specified type then destroys it after it has been handled.
|
<MVC extends TypedMVCGroup,M extends GriffonModel,V extends GriffonView,C extends GriffonController> |
withMVC(Class<? extends MVC> mvcType,
String mvcId,
MVCFunction<M,V,C> handler)
Instantiates an MVC group of the specified type then destroys it after it has been handled.
|
<MVC extends TypedMVCGroup,M extends GriffonModel,V extends GriffonView,C extends GriffonController> |
withMVC(Map<String,Object> args,
Class<? extends MVC> mvcType,
MVCFunction<M,V,C> handler)
Instantiates an MVC group of the specified type then destroys it after it has been handled.
|
<MVC extends TypedMVCGroup,M extends GriffonModel,V extends GriffonView,C extends GriffonController> |
withMVC(Map<String,Object> args,
Class<? extends MVC> mvcType,
String mvcId,
MVCFunction<M,V,C> handler)
Instantiates an MVC group of the specified type then destroys it after it has been handled.
|
<M extends GriffonModel,V extends GriffonView,C extends GriffonController> |
withMVC(Map<String,Object> args,
String mvcType,
MVCFunction<M,V,C> handler)
Instantiates an MVC group of the specified type then destroys it after it has been handled.
|
<M extends GriffonModel,V extends GriffonView,C extends GriffonController> |
withMVC(Map<String,Object> args,
String mvcType,
String mvcId,
MVCFunction<M,V,C> handler)
Instantiates an MVC group of the specified type then destroys it after it has been handled.
|
<M extends GriffonModel,V extends GriffonView,C extends GriffonController> |
withMVC(String mvcType,
Map<String,Object> args,
MVCFunction<M,V,C> handler)
Instantiates an MVC group of the specified type then destroys it after it has been handled.
|
<M extends GriffonModel,V extends GriffonView,C extends GriffonController> |
withMVC(String mvcType,
MVCFunction<M,V,C> handler)
Instantiates an MVC group of the specified type then destroys it after it has been handled.
|
<M extends GriffonModel,V extends GriffonView,C extends GriffonController> |
withMVC(String mvcType,
String mvcId,
Map<String,Object> args,
MVCFunction<M,V,C> handler)
Instantiates an MVC group of the specified type then destroys it after it has been handled.
|
<M extends GriffonModel,V extends GriffonView,C extends GriffonController> |
withMVC(String mvcType,
String mvcId,
MVCFunction<M,V,C> handler)
Instantiates an MVC group of the specified type then destroys it after it has been handled.
|
<MVC extends TypedMVCGroup> |
withMVCGroup(Class<? extends MVC> mvcType,
Map<String,Object> args,
TypedMVCGroupFunction<MVC> handler)
Instantiates an MVC group of the specified type then destroys it after it has been handled.
|
<MVC extends TypedMVCGroup> |
withMVCGroup(Class<? extends MVC> mvcType,
String mvcId,
Map<String,Object> args,
TypedMVCGroupFunction<MVC> handler)
Instantiates an MVC group of the specified type then destroys it after it has been handled.
|
<MVC extends TypedMVCGroup> |
withMVCGroup(Class<? extends MVC> mvcType,
String mvcId,
TypedMVCGroupFunction<MVC> handler)
Instantiates an MVC group of the specified type then destroys it after it has been handled.
|
<MVC extends TypedMVCGroup> |
withMVCGroup(Class<? extends MVC> mvcType,
TypedMVCGroupFunction<MVC> handler)
Instantiates an MVC group of the specified type then destroys it after it has been handled.
|
<MVC extends TypedMVCGroup> |
withMVCGroup(Map<String,Object> args,
Class<? extends MVC> mvcType,
String mvcId,
TypedMVCGroupFunction<MVC> handler)
Instantiates an MVC group of the specified type then destroys it after it has been handled.
|
<MVC extends TypedMVCGroup> |
withMVCGroup(Map<String,Object> args,
Class<? extends MVC> mvcType,
TypedMVCGroupFunction<MVC> handler)
Instantiates an MVC group of the specified type then destroys it after it has been handled.
|
void |
withMVCGroup(Map<String,Object> args,
String mvcType,
MVCGroupFunction handler)
Instantiates an MVC group of the specified type then destroys it after it has been handled.
|
void |
withMVCGroup(Map<String,Object> args,
String mvcType,
String mvcId,
MVCGroupFunction handler)
Instantiates an MVC group of the specified type then destroys it after it has been handled.
|
void |
withMVCGroup(String mvcType,
Map<String,Object> args,
MVCGroupFunction handler)
Instantiates an MVC group of the specified type then destroys it after it has been handled.
|
void |
withMVCGroup(String mvcType,
MVCGroupFunction handler)
Instantiates an MVC group of the specified type then destroys it after it has been handled.
|
void |
withMVCGroup(String mvcType,
String mvcId,
Map<String,Object> args,
MVCGroupFunction handler)
Instantiates an MVC group of the specified type then destroys it after it has been handled.
|
void |
withMVCGroup(String mvcType,
String mvcId,
MVCGroupFunction handler)
Instantiates an MVC group of the specified type then destroys it after it has been handled.
|
destroyMVCGroup, getMvcGroupManager
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
destroyMVCGroup
protected final MVCGroupConfiguration configuration
protected final String mvcId
protected final Context context
protected MVCGroup parentGroup
@Nonnull public Context getContext()
MVCGroup
getContext
in interface MVCGroup
@Nullable public MVCGroup getParentGroup()
MVCGroup
MVCGroup
of this group.
The parent may be null if this is a top level MVC group.
getParentGroup
in interface MVCGroup
@Nonnull public MVCGroupConfiguration getConfiguration()
MVCGroup
getConfiguration
in interface MVCGroup
@Nonnull public String getMvcType()
MVCGroup
getMvcType
in interface MVCGroup
@Nonnull public String getMvcId()
MVCGroup
@Nullable public GriffonModel getModel()
MVCGroup
@Nullable public GriffonView getView()
MVCGroup
@Nullable public GriffonController getController()
MVCGroup
getController
in interface MVCGroup
@Nullable public Object getMember(@Nonnull String name)
MVCGroup
@Nonnull public Map<String,Object> getMembers()
MVCGroup
getMembers
in interface MVCGroup
public void destroy()
MVCGroup
public void notifyMVCGroupDestroyed(@Nonnull String mvcId)
MVCGroup
notifyMVCGroupDestroyed
in interface MVCGroup
mvcId
- the id of the group that has been destroyedpublic boolean isAlive()
MVCGroup
protected void checkIfAlive()
@Nonnull public MVCGroup createMVCGroup(@Nonnull String mvcType, @Nonnull String mvcId)
MVCHandler
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 Config.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
MVCGroup fooGroup = createMVCGroup('foo', 'foo' + System.currentTimeMillis()) assert (fooGroup.controller instanceof FooController)MVC groups must have an unique name.
createMVCGroup
in interface MVCHandler
createMVCGroup
in class AbstractMVCHandler
mvcType
- the type of group to build.mvcId
- the name to assign to the built group.@Nonnull public MVCGroup createMVCGroup(@Nonnull String mvcType)
MVCHandler
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 Config.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
MVCGroup fooGroup = createMVCGroup('foo') assert (fooGroup.controller instanceof FooController)
createMVCGroup
in interface MVCHandler
createMVCGroup
in class AbstractMVCHandler
mvcType
- the type of group to build.@Nonnull public MVCGroup createMVCGroup(@Nonnull Map<String,Object> args, @Nonnull String mvcType)
MVCHandler
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
Config.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:
MVCGroup fooGroup = createMVCGroup('foo') MVCGroup barGroup = createMVCGroup('bar', model: fooGroup.model) assert fooGroup.model == barGroup.model
createMVCGroup
in interface MVCHandler
createMVCGroup
in class AbstractMVCHandler
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.@Nonnull public MVCGroup createMVCGroup(@Nonnull Map<String,Object> args, @Nonnull String mvcType, @Nonnull String mvcId)
MVCHandler
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
Config.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:
MVCGroup fooGroup1 = createMVCGroup('foo', 'foo1') MVCGroup fooGroup2 = createMVCGroup('foo', 'foo2', model: fooGroup1.model) assert fooGroup1.model == fooGroup2.modelMVC groups must have an unique name.
createMVCGroup
in interface MVCHandler
createMVCGroup
in class AbstractMVCHandler
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.mvcId
- the name to assign to the built group.@Nonnull public MVCGroup createMVCGroup(@Nonnull String mvcType, @Nonnull Map<String,Object> args)
MVCHandler
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
Config.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:
MVCGroup fooGroup = createMVCGroup('foo') MVCGroup barGroup = createMVCGroup('bar', model: fooGroup.model) assert fooGroup.model == barGroup.model
createMVCGroup
in interface MVCHandler
createMVCGroup
in class AbstractMVCHandler
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.@Nonnull public MVCGroup createMVCGroup(@Nonnull String mvcType, @Nonnull String mvcId, @Nonnull Map<String,Object> args)
MVCHandler
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
Config.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:
MVCGroup fooGroup1 = createMVCGroup('foo', 'foo1') MVCGroup fooGroup2 = createMVCGroup('foo', 'foo2', model: fooGroup1.model) assert fooGroup1.model == fooGroup2.modelMVC groups must have an unique name.
createMVCGroup
in interface MVCHandler
createMVCGroup
in class AbstractMVCHandler
mvcType
- the type of group to build.mvcId
- 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.@Nonnull public <MVC extends TypedMVCGroup> MVC createMVCGroup(@Nonnull Class<? extends MVC> mvcType, @Nonnull String mvcId)
MVCHandler
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 Config.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
FooMVCGroup fooGroup = createMVCGroup(FooMVCGroup, 'foo' + System.currentTimeMillis()) assert (fooGroup.controller instanceof FooController)MVC groups must have an unique name.
createMVCGroup
in interface MVCHandler
createMVCGroup
in class AbstractMVCHandler
mvcType
- the type of group to build.mvcId
- the name to assign to the built group.@Nonnull public <MVC extends TypedMVCGroup> MVC createMVCGroup(@Nonnull Class<? extends MVC> mvcType)
MVCHandler
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 Config.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
FooMVCGroup fooGroup = createMVCGroup(FooMVCGroup) assert (fooGroup.controller instanceof FooController)
createMVCGroup
in interface MVCHandler
createMVCGroup
in class AbstractMVCHandler
mvcType
- the type of group to build.@Nonnull public <MVC extends TypedMVCGroup> MVC createMVCGroup(@Nonnull Map<String,Object> args, @Nonnull Class<? extends MVC> mvcType)
MVCHandler
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
Config.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:
FooMVCGroup fooGroup = createMVCGroup(FooMVCGroup) BarMVCGroup barGroup = createMVCGroup(BarMVCGroup, model: fooGroup.model) assert fooGroup.model == barGroup.model
createMVCGroup
in interface MVCHandler
createMVCGroup
in class AbstractMVCHandler
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.@Nonnull public <MVC extends TypedMVCGroup> MVC createMVCGroup(@Nonnull Map<String,Object> args, @Nonnull Class<? extends MVC> mvcType, @Nonnull String mvcId)
MVCHandler
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
Config.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:
FooMVCGroup fooGroup1 = createMVCGroup(FooMVCGroup, 'foo1') FooMVCGroup fooGroup2 = createMVCGroup(FooMVCGroup, 'foo2', model: fooGroup1.model) assert fooGroup1.model == fooGroup2.modelMVC groups must have an unique name.
createMVCGroup
in interface MVCHandler
createMVCGroup
in class AbstractMVCHandler
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.mvcId
- the name to assign to the built group.@Nonnull public <MVC extends TypedMVCGroup> MVC createMVCGroup(@Nonnull Class<? extends MVC> mvcType, @Nonnull Map<String,Object> args)
MVCHandler
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
Config.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:
FooMVCGroup fooGroup = createMVCGroup(FooMVCGroup) BarMVCGroup barGroup = createMVCGroup(BarMVCGroup, model: fooGroup.model) assert fooGroup.model == barGroup.model
createMVCGroup
in interface MVCHandler
createMVCGroup
in class AbstractMVCHandler
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.@Nonnull public <MVC extends TypedMVCGroup> MVC createMVCGroup(@Nonnull Class<? extends MVC> mvcType, @Nonnull String mvcId, @Nonnull Map<String,Object> args)
MVCHandler
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
Config.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:
FooMVCGroup fooGroup1 = createMVCGroup(FooMVCGroup, 'foo1') FooMVCGroup fooGroup2 = createMVCGroup(FooMVCGroup, 'foo2', model: fooGroup1.model) assert fooGroup1.model == fooGroup2.modelMVC groups must have an unique name.
createMVCGroup
in interface MVCHandler
createMVCGroup
in class AbstractMVCHandler
mvcType
- the type of group to build.mvcId
- 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.@Nonnull public List<? extends GriffonMvcArtifact> createMVC(@Nonnull String mvcType, @Nonnull String mvcId)
MVCHandler
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 Config.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) = createMVC('foo', 'foo' + System.currentTimeMillis()) assert (c instanceof FooController)MVC groups must have an unique name.
createMVC
in interface MVCHandler
createMVC
in class AbstractMVCHandler
mvcType
- the type of group to build.mvcId
- the name to assign to the built group.@Nonnull public List<? extends GriffonMvcArtifact> createMVC(@Nonnull String mvcType)
MVCHandler
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 Config.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) = createMVC('foo') assert (c instanceof FooController)
createMVC
in interface MVCHandler
createMVC
in class AbstractMVCHandler
mvcType
- the type of group to build.@Nonnull public List<? extends GriffonMvcArtifact> createMVC(@Nonnull Map<String,Object> args, @Nonnull String mvcType)
MVCHandler
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
Config.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) = createMVC('foo') def (m2, v2, c2) = createMVC('bar', model: m1) assert fm1 == m2
createMVC
in interface MVCHandler
createMVC
in class AbstractMVCHandler
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.@Nonnull public List<? extends GriffonMvcArtifact> createMVC(@Nonnull Map<String,Object> args, @Nonnull String mvcType, @Nonnull String mvcId)
MVCHandler
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
Config.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) = createMVC('foo', 'foo1') def (m2, v2, c2) = createMVC('foo', 'foo2', model: m1) assert fm1 == m2MVC groups must have an unique name.
createMVC
in interface MVCHandler
createMVC
in class AbstractMVCHandler
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.mvcId
- the name to assign to the built group.@Nonnull public List<? extends GriffonMvcArtifact> createMVC(@Nonnull String mvcType, @Nonnull Map<String,Object> args)
MVCHandler
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
Config.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) = createMVC('foo') def (m2, v2, c2) = createMVC('bar', model: m1) assert fm1 == m2
createMVC
in interface MVCHandler
createMVC
in class AbstractMVCHandler
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.@Nonnull public List<? extends GriffonMvcArtifact> createMVC(@Nonnull String mvcType, @Nonnull String mvcId, @Nonnull Map<String,Object> args)
MVCHandler
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
Config.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) = createMVC('foo', 'foo1') def (m2, v2, c2) = createMVC('foo', 'foo2', model: m1) assert fm1 == m2MVC groups must have an unique name.
createMVC
in interface MVCHandler
createMVC
in class AbstractMVCHandler
mvcType
- the type of group to build.mvcId
- 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.@Nonnull public <MVC extends TypedMVCGroup> List<? extends GriffonMvcArtifact> createMVC(@Nonnull Class<? extends MVC> mvcType, @Nonnull String mvcId)
MVCHandler
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 Config.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) = createMVC(FooMVCGroup, 'foo' + System.currentTimeMillis()) assert (c instanceof FooController)MVC groups must have an unique name.
createMVC
in interface MVCHandler
createMVC
in class AbstractMVCHandler
mvcType
- the type of group to build.mvcId
- the name to assign to the built group.@Nonnull public <MVC extends TypedMVCGroup> List<? extends GriffonMvcArtifact> createMVC(@Nonnull Class<? extends MVC> mvcType)
MVCHandler
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 Config.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) = createMVC(FooMVCGroup) assert (c instanceof FooController)
createMVC
in interface MVCHandler
createMVC
in class AbstractMVCHandler
mvcType
- the type of group to build.@Nonnull public <MVC extends TypedMVCGroup> List<? extends GriffonMvcArtifact> createMVC(@Nonnull Map<String,Object> args, @Nonnull Class<? extends MVC> mvcType)
MVCHandler
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
Config.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) = createMVC(FooMVCGroup) def (m2, v2, c2) = createMVC(BarMVCGroup, model: m1) assert fm1 == m2
createMVC
in interface MVCHandler
createMVC
in class AbstractMVCHandler
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.@Nonnull public <MVC extends TypedMVCGroup> List<? extends GriffonMvcArtifact> createMVC(@Nonnull Map<String,Object> args, @Nonnull Class<? extends MVC> mvcType, @Nonnull String mvcId)
MVCHandler
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
Config.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) = createMVC(FooMVCGroup, 'foo1') def (m2, v2, c2) = createMVC(FooMVCGroup, 'foo2', model: m1) assert fm1 == m2MVC groups must have an unique name.
createMVC
in interface MVCHandler
createMVC
in class AbstractMVCHandler
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.mvcId
- the name to assign to the built group.@Nonnull public <MVC extends TypedMVCGroup> List<? extends GriffonMvcArtifact> createMVC(@Nonnull Class<? extends MVC> mvcType, @Nonnull Map<String,Object> args)
MVCHandler
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
Config.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) = createMVC(FooMVCGroup) def (m2, v2, c2) = createMVC(BarMVCGroup, model: m1) assert fm1 == m2
createMVC
in interface MVCHandler
createMVC
in class AbstractMVCHandler
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.@Nonnull public <MVC extends TypedMVCGroup> List<? extends GriffonMvcArtifact> createMVC(@Nonnull Class<? extends MVC> mvcType, @Nonnull String mvcId, @Nonnull Map<String,Object> args)
MVCHandler
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
Config.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) = createMVC(FooMVCGroup, 'foo1') def (m2, v2, c2) = createMVC(FooMVCGroup, 'foo2', model: m1) assert fm1 == m2MVC groups must have an unique name.
createMVC
in interface MVCHandler
createMVC
in class AbstractMVCHandler
mvcType
- the type of group to build.mvcId
- 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.public <M extends GriffonModel,V extends GriffonView,C extends GriffonController> void withMVC(@Nonnull Map<String,Object> args, @Nonnull String mvcType, @Nonnull MVCFunction<M,V,C> handler)
MVCHandler
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 scenariosConfig.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
Mapmap = ... // initialized elsewhere withMVC("foo", map, new MVCFunction<FooModel, FooView, FooController>() { public void call(FooModel m, FooView v, FooController c) { m.setSomeProperty(someValue); c.invokeAnAction(); } });
withMVC
in interface MVCHandler
withMVC
in class AbstractMVCHandler
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.handler
- a code block used to configure and manage the instantiated grouppublic <M extends GriffonModel,V extends GriffonView,C extends GriffonController> void withMVC(@Nonnull Map<String,Object> args, @Nonnull String mvcType, @Nonnull String mvcId, @Nonnull MVCFunction<M,V,C> handler)
MVCHandler
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 scenariosConfig.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
MapMVC groups must have an unique name.map = ... // initialized elsewhere withMVC("foo", "foo1", map, new MVCFunction<FooModel, FooView, FooController>() { public void call(FooModel m, FooView v, FooController c) { m.setSomeProperty(someValue); c.invokeAnAction(); } });
withMVC
in interface MVCHandler
withMVC
in class AbstractMVCHandler
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.mvcId
- the name to assign to the built group.handler
- a code block used to configure and manage the instantiated grouppublic <M extends GriffonModel,V extends GriffonView,C extends GriffonController> void withMVC(@Nonnull String mvcType, @Nonnull Map<String,Object> args, @Nonnull MVCFunction<M,V,C> handler)
MVCHandler
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 scenariosConfig.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
Mapmap = ... // initialized elsewhere withMVC("foo", map, new MVCFunction<FooModel, FooView, FooController>() { public void call(FooModel m, FooView v, FooController c) { m.setSomeProperty(someValue); c.invokeAnAction(); } });
withMVC
in interface MVCHandler
withMVC
in class AbstractMVCHandler
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.handler
- a code block used to configure and manage the instantiated grouppublic <M extends GriffonModel,V extends GriffonView,C extends GriffonController> void withMVC(@Nonnull String mvcType, @Nonnull String mvcId, @Nonnull Map<String,Object> args, @Nonnull MVCFunction<M,V,C> handler)
MVCHandler
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 scenariosConfig.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
MapMVC groups must have an unique name.map = ... // initialized elsewhere withMVC("foo", "foo1", map, new MVCFunction<FooModel, FooView, FooController>() { public void call(FooModel m, FooView v, FooController c) { m.setSomeProperty(someValue); c.invokeAnAction(); } });
withMVC
in interface MVCHandler
withMVC
in class AbstractMVCHandler
mvcType
- the type of group to build.mvcId
- 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.handler
- a code block used to configure and manage the instantiated grouppublic <M extends GriffonModel,V extends GriffonView,C extends GriffonController> void withMVC(@Nonnull String mvcType, @Nonnull MVCFunction<M,V,C> handler)
MVCHandler
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 inConfig.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
withMVC("foo", new MVCFunction<FooModel, FooView, FooController>() { public void call(FooModel m, FooView v, FooController c) { m.setSomeProperty(someValue); c.invokeAnAction(); } });
withMVC
in interface MVCHandler
withMVC
in class AbstractMVCHandler
mvcType
- the type of group to build.handler
- a code block used to configure and manage the instantiated grouppublic <M extends GriffonModel,V extends GriffonView,C extends GriffonController> void withMVC(@Nonnull String mvcType, @Nonnull String mvcId, @Nonnull MVCFunction<M,V,C> handler)
MVCHandler
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 inConfig.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
withMVC("foo", "foo1", new MVCFunction<FooModel, FooView, FooController>() { public void call(FooModel m, FooView v, FooController c) { m.setSomeProperty(someValue); c.invokeAnAction(); } });MVC groups must have an unique name.
withMVC
in interface MVCHandler
withMVC
in class AbstractMVCHandler
mvcType
- the type of group to build.mvcId
- the name to assign to the built group.handler
- a code block used to configure and manage the instantiated grouppublic <MVC extends TypedMVCGroup,M extends GriffonModel,V extends GriffonView,C extends GriffonController> void withMVC(@Nonnull Map<String,Object> args, @Nonnull Class<? extends MVC> mvcType, @Nonnull MVCFunction<M,V,C> handler)
MVCHandler
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 scenariosConfig.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
Mapmap = ... // initialized elsewhere withMVC(FooMVCGroup.class, map, new MVCFunction<FooModel, FooView, FooController>() { public void call(FooModel m, FooView v, FooController c) { m.setSomeProperty(someValue); c.invokeAnAction(); } });
withMVC
in interface MVCHandler
withMVC
in class AbstractMVCHandler
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.handler
- a code block used to configure and manage the instantiated grouppublic <MVC extends TypedMVCGroup,M extends GriffonModel,V extends GriffonView,C extends GriffonController> void withMVC(@Nonnull Map<String,Object> args, @Nonnull Class<? extends MVC> mvcType, @Nonnull String mvcId, @Nonnull MVCFunction<M,V,C> handler)
MVCHandler
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 scenariosConfig.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
MapMVC groups must have an unique name.map = ... // initialized elsewhere withMVC(FooMVCGroup.class, "foo1", map, new MVCFunction<FooModel, FooView, FooController>() { public void call(FooModel m, FooView v, FooController c) { m.setSomeProperty(someValue); c.invokeAnAction(); } });
withMVC
in interface MVCHandler
withMVC
in class AbstractMVCHandler
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.mvcId
- the name to assign to the built group.handler
- a code block used to configure and manage the instantiated grouppublic <MVC extends TypedMVCGroup,M extends GriffonModel,V extends GriffonView,C extends GriffonController> void withMVC(@Nonnull Class<? extends MVC> mvcType, @Nonnull Map<String,Object> args, @Nonnull MVCFunction<M,V,C> handler)
MVCHandler
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 scenariosConfig.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
Mapmap = ... // initialized elsewhere withMVC(FooMVCGroup.class, map, new MVCFunction<FooModel, FooView, FooController>() { public void call(FooModel m, FooView v, FooController c) { m.setSomeProperty(someValue); c.invokeAnAction(); } });
withMVC
in interface MVCHandler
withMVC
in class AbstractMVCHandler
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.handler
- a code block used to configure and manage the instantiated grouppublic <MVC extends TypedMVCGroup,M extends GriffonModel,V extends GriffonView,C extends GriffonController> void withMVC(@Nonnull Class<? extends MVC> mvcType, @Nonnull String mvcId, @Nonnull Map<String,Object> args, @Nonnull MVCFunction<M,V,C> handler)
MVCHandler
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 scenariosConfig.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
MapMVC groups must have an unique name.map = ... // initialized elsewhere withMVC(FooMVCGroup.class, "foo1", map, new MVCFunction<FooModel, FooView, FooController>() { public void call(FooModel m, FooView v, FooController c) { m.setSomeProperty(someValue); c.invokeAnAction(); } });
withMVC
in interface MVCHandler
withMVC
in class AbstractMVCHandler
mvcType
- the type of group to build.mvcId
- 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.handler
- a code block used to configure and manage the instantiated grouppublic <MVC extends TypedMVCGroup,M extends GriffonModel,V extends GriffonView,C extends GriffonController> void withMVC(@Nonnull Class<? extends MVC> mvcType, @Nonnull MVCFunction<M,V,C> handler)
MVCHandler
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 inConfig.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
withMVC(FooMVCGroup.class, new MVCFunction<FooModel, FooView, FooController>() { public void call(FooModel m, FooView v, FooController c) { m.setSomeProperty(someValue); c.invokeAnAction(); } });
withMVC
in interface MVCHandler
withMVC
in class AbstractMVCHandler
mvcType
- the type of group to build.handler
- a code block used to configure and manage the instantiated grouppublic <MVC extends TypedMVCGroup,M extends GriffonModel,V extends GriffonView,C extends GriffonController> void withMVC(@Nonnull Class<? extends MVC> mvcType, @Nonnull String mvcId, @Nonnull MVCFunction<M,V,C> handler)
MVCHandler
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 inConfig.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
withMVC(FooMVCGroup.class, "foo1", new MVCFunction<FooModel, FooView, FooController>() { public void call(FooModel m, FooView v, FooController c) { m.setSomeProperty(someValue); c.invokeAnAction(); } });MVC groups must have an unique name.
withMVC
in interface MVCHandler
withMVC
in class AbstractMVCHandler
mvcType
- the type of group to build.mvcId
- the name to assign to the built group.handler
- a code block used to configure and manage the instantiated grouppublic void withMVCGroup(@Nonnull Map<String,Object> args, @Nonnull String mvcType, @Nonnull MVCGroupFunction handler)
MVCHandler
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 scenariosConfig.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
Mapmap = ... // initialized elsewhere withMVCGroup("foo", map, new MVCGroupFunction() { public void call(MVCGroup group) { group.getModel().setSomeProperty(someValue); group.getController().invokeAnAction(); } });
withMVCGroup
in interface MVCHandler
withMVCGroup
in class AbstractMVCHandler
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.handler
- a code block used to configure and manage the instantiated grouppublic void withMVCGroup(@Nonnull Map<String,Object> args, @Nonnull String mvcType, @Nonnull String mvcId, @Nonnull MVCGroupFunction handler)
MVCHandler
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 scenariosConfig.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
MapMVC groups must have an unique name.map = ... // initialized elsewhere withMVCGroup("foo", "foo1", map, new MVCGroupFunction() { public void call(MVCGroup group) { group.getModel().setSomeProperty(someValue); group.getController().invokeAnAction(); } });
withMVCGroup
in interface MVCHandler
withMVCGroup
in class AbstractMVCHandler
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.mvcId
- the name to assign to the built group.handler
- a code block used to configure and manage the instantiated grouppublic void withMVCGroup(@Nonnull String mvcType, @Nonnull Map<String,Object> args, @Nonnull MVCGroupFunction handler)
MVCHandler
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 scenariosConfig.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
Mapmap = ... // initialized elsewhere withMVCGroup("foo", map, new MVCGroupFunction() { public void call(MVCGroup group) { group.getModel().setSomeProperty(someValue); group.getController().invokeAnAction(); } });
withMVCGroup
in interface MVCHandler
withMVCGroup
in class AbstractMVCHandler
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.handler
- a code block used to configure and manage the instantiated grouppublic void withMVCGroup(@Nonnull String mvcType, @Nonnull String mvcId, @Nonnull Map<String,Object> args, @Nonnull MVCGroupFunction handler)
MVCHandler
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 scenariosConfig.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
MapMVC groups must have an unique name.map = ... // initialized elsewhere withMVCGroup("foo", "foo1", map, new MVCGroupFunction() { public void call(MVCGroup group) { group.getModel().setSomeProperty(someValue); group.getController().invokeAnAction(); } });
withMVCGroup
in interface MVCHandler
withMVCGroup
in class AbstractMVCHandler
mvcType
- the type of group to build.mvcId
- 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.handler
- a code block used to configure and manage the instantiated grouppublic void withMVCGroup(@Nonnull String mvcType, @Nonnull MVCGroupFunction handler)
MVCHandler
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 inConfig.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 MVCGroupFunction() { public void call(MVCGroup group) { group.getModel().setSomeProperty(someValue); group.getController().invokeAnAction(); } });
withMVCGroup
in interface MVCHandler
withMVCGroup
in class AbstractMVCHandler
mvcType
- the type of group to build.handler
- a code block used to configure and manage the instantiated grouppublic void withMVCGroup(@Nonnull String mvcType, @Nonnull String mvcId, @Nonnull MVCGroupFunction handler)
MVCHandler
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 inConfig.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 MVCGroupFunction() { public void call(MVCGroup group) { group.getModel().setSomeProperty(someValue); group.getController().invokeAnAction(); } });MVC groups must have an unique name.
withMVCGroup
in interface MVCHandler
withMVCGroup
in class AbstractMVCHandler
mvcType
- the type of group to build.mvcId
- the name to assign to the built group.handler
- a code block used to configure and manage the instantiated grouppublic <MVC extends TypedMVCGroup> void withMVCGroup(@Nonnull Map<String,Object> args, @Nonnull Class<? extends MVC> mvcType, @Nonnull TypedMVCGroupFunction<MVC> handler)
MVCHandler
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 scenariosConfig.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
Mapmap = ... // initialized elsewhere withMVCGroup(FooMVCGroup.class, map, new TypedMVCGroupFunction<>() { public void call(MVC group) { group.getModel().setSomeProperty(someValue); group.getController().invokeAnAction(); } });
withMVCGroup
in interface MVCHandler
withMVCGroup
in class AbstractMVCHandler
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.handler
- a code block used to configure and manage the instantiated grouppublic <MVC extends TypedMVCGroup> void withMVCGroup(@Nonnull Map<String,Object> args, @Nonnull Class<? extends MVC> mvcType, @Nonnull String mvcId, @Nonnull TypedMVCGroupFunction<MVC> handler)
MVCHandler
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 scenariosConfig.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
MapMVC groups must have an unique name.map = ... // initialized elsewhere withMVCGroup(FooMVCGroup.class, "foo1", map, new TypedMVCGroupFunction<>() { public void call(MVC group) { group.getModel().setSomeProperty(someValue); group.getController().invokeAnAction(); } });
withMVCGroup
in interface MVCHandler
withMVCGroup
in class AbstractMVCHandler
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.mvcId
- the name to assign to the built group.handler
- a code block used to configure and manage the instantiated grouppublic <MVC extends TypedMVCGroup> void withMVCGroup(@Nonnull Class<? extends MVC> mvcType, @Nonnull Map<String,Object> args, @Nonnull TypedMVCGroupFunction<MVC> handler)
MVCHandler
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 scenariosConfig.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
Mapmap = ... // initialized elsewhere withMVCGroup(FooMVCGroup.class, map, new TypedMVCGroupFunction<>() { public void call(MVC group) { group.getModel().setSomeProperty(someValue); group.getController().invokeAnAction(); } });
withMVCGroup
in interface MVCHandler
withMVCGroup
in class AbstractMVCHandler
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.handler
- a code block used to configure and manage the instantiated grouppublic <MVC extends TypedMVCGroup> void withMVCGroup(@Nonnull Class<? extends MVC> mvcType, @Nonnull String mvcId, @Nonnull Map<String,Object> args, @Nonnull TypedMVCGroupFunction<MVC> handler)
MVCHandler
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 scenariosConfig.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
MapMVC groups must have an unique name.map = ... // initialized elsewhere withMVCGroup(FooMVCGroup.class, "foo1", map, new TypedMVCGroupFunction<>() { public void call(MVC group) { group.getModel().setSomeProperty(someValue); group.getController().invokeAnAction(); } });
withMVCGroup
in interface MVCHandler
withMVCGroup
in class AbstractMVCHandler
mvcType
- the type of group to build.mvcId
- 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.handler
- a code block used to configure and manage the instantiated grouppublic <MVC extends TypedMVCGroup> void withMVCGroup(@Nonnull Class<? extends MVC> mvcType, @Nonnull TypedMVCGroupFunction<MVC> handler)
MVCHandler
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 inConfig.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(FooMVCGroup.class, new TypedMVCGroupFunction<>() { public void call(MVC group) { group.getModel().setSomeProperty(someValue); group.getController().invokeAnAction(); } });
withMVCGroup
in interface MVCHandler
withMVCGroup
in class AbstractMVCHandler
mvcType
- the type of group to build.handler
- a code block used to configure and manage the instantiated grouppublic <MVC extends TypedMVCGroup> void withMVCGroup(@Nonnull Class<? extends MVC> mvcType, @Nonnull String mvcId, @Nonnull TypedMVCGroupFunction<MVC> handler)
MVCHandler
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 inConfig.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(FooMVCGroup.class, "foo1", new TypedMVCGroupFunction<>() { public void call(MVC group) { group.getModel().setSomeProperty(someValue); group.getController().invokeAnAction(); } });MVC groups must have an unique name.
withMVCGroup
in interface MVCHandler
withMVCGroup
in class AbstractMVCHandler
mvcType
- the type of group to build.mvcId
- the name to assign to the built group.handler
- a code block used to configure and manage the instantiated group@Nonnull public Map<String,MVCGroup> getChildrenGroups()
MVCGroup
getChildrenGroups
in interface MVCGroup