|
Griffon 0.9.5-rc2 | |||||||
FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectgroovy.lang.GroovyObjectSupport
org.codehaus.griffon.runtime.core.AbstractGriffonArtifact
org.codehaus.griffon.runtime.core.AbstractGriffonMvcArtifact
org.codehaus.griffon.runtime.core.AbstractGriffonView
public abstract class AbstractGriffonView extends AbstractGriffonMvcArtifact
Base implementation of the GriffonView interface.
Field Summary | |
---|---|
private FactoryBuilderSupport |
builder
|
Fields inherited from class AbstractGriffonArtifact | |
---|---|
app, log, resourceLocator |
Constructor Summary | |
AbstractGriffonView()
|
Method Summary | |
---|---|
void
|
buildViewFromXml(Map args)
Transforms an XML file into a Groovy script and evaluates it using a builder. |
void
|
buildViewFromXml(Map args, String fileName)
Transforms an XML file into a Groovy script and evaluates it using a builder. |
protected String
|
getArtifactType()
|
FactoryBuilderSupport
|
getBuilder()
|
void
|
setBuilder(FactoryBuilderSupport builder)
|
Methods inherited from class AbstractGriffonMvcArtifact | |
---|---|
mvcGroupDestroy, mvcGroupInit |
Methods inherited from class GroovyObjectSupport | |
---|---|
setProperty, getProperty, getMetaClass, setMetaClass, invokeMethod, wait, wait, wait, equals, toString, hashCode, getClass, notify, notifyAll |
Field Detail |
---|
private FactoryBuilderSupport builder
Constructor Detail |
---|
AbstractGriffonView()
Method Detail |
---|
public void buildViewFromXml(Map args)
The file name matches the name of this class plus '.xml'. It must be found somewhere in the classpath.
Every XML attribute that represents a string literal must be single quoted explicitly otherwise the build will not be able to parse it. The following XML contents
are translated to
application(title: app.config.application.title, pack: true) { actions { action(id: 'clickAction', name: 'Click', closure: {controller.click(it)}) } gridLayout(cols: 1, rows: 3) textField(id: 'input', text: bind('value', target: model), columns: 20) textField(id: 'output', text: bind{target.model}, columns: 20, editable: false) button(action: clickAction) }
args
- a Map containing all relevant values that the build might need to build the
View; this typically includes 'app', 'controller' and 'model'.
public void buildViewFromXml(Map args, String fileName)
Every XML attribute that represents a string literal must be single quoted explicitly otherwise the build will not be able to parse it. The following XML contents
are translated to
application(title: app.config.application.title, pack: true) { actions { action(id: 'clickAction', name: 'Click', closure: {controller.click(it)}) } gridLayout(cols: 1, rows: 3) textField(id: 'input', text: bind('value', target: model), columns: 20) textField(id: 'output', text: bind{target.model}, columns: 20, editable: false) button(action: clickAction) }
args
- a Map containing all relevant values that the build might need to build the
View; this typically includes 'app', 'controller' and 'model'.fileName
- the name of an XML file
protected String getArtifactType()
public FactoryBuilderSupport getBuilder()
public void setBuilder(FactoryBuilderSupport builder)
Groovy Documentation