(*) ^Items marked like this were available in the old tapestry4 version and will be available again for the tapestry5 version.^
To make sure the generated site works properly, you need to include the following dependencies.
<dependency>
<groupId>org.equanda</groupId>
<artifactId>equanda-tapestry5</artifactId>
<version>${tapestry-version}</version>
</dependency>
<dependency>
<groupId>org.equanda</groupId>
<artifactId>equanda-t5gui</artifactId>
<version>${tapestry-version}</version>
</dependency>
<dependency>
<groupId>org.apache.tapestry</groupId>
<artifactId>t5c-commons</artifactId>
<version>0.5.10</version>
</dependency>
and following repositories
<repositories>
<repository>
<id>progs</id>
<url>http://maven.progs.be/m2repo</url>
</repository>
<repository>
<id>t5components</id>
<name>T5Components Maven Repository</name>
<url>http://213.160.23.119:8080/t5components/maven-repository</url>
</repository>
</repositories>
For each (root) table the following components are generated.
Also one universal component are generated.
For each (root) table the following pages are generated.
For each action on each table.
For each select defined on a table.
In the domain model, it is possible to overwrite the rendering of specific fields or groups using the "renderer" parameter on the definition.
TODO : documentation to be completed
The generation of forms is multi-layered to allow configuration of how specific elements will be generated. This makes the user interface highly customizeable, it assures consistency and assures the user interface can be updated based on the domain model.
At field or group level, the rendering can be overwritten using the "renderer" parameter in the domain model. However, some generic changes can also be handled as generation parameters.
In the configuration file "dm.ini" you can define which files should be read to get the properties.
[t5gui]
keyvalue1=t5gui/templates.properties
keyvalue2=t5gui/mytemplates/templates.properties
The first file included above is always included and contains the default mappings. You can include as many keyvalueX keys as needed, but there should be no gaps in the numbering.
The references properties files are searched on the classpath. As an example the default (t5gui/templates.properties) is included below.
When several mappings exist for the same key, the last one is applied.
Note that any templates mentioned in the properties file should be in a path starting with "t5gui", and this should not be included in the file name (this is to allow several template sets to coexist easily).
pages=edit-tml/pages.tml.vm
page=edit-tml/page.tml.vm
group=edit-tml/group.tml.vm
field=edit-tml/field.tml.vm
fieldData=edit-tml/fieldData.tml.vm
edit.type.string=edit-tml/string.tml.vm
edit.type.clob=edit-tml/text.tml.vm
edit.type.double=edit-tml/double.tml.vm
edit.type.int=edit-tml/int.tml.vm
edit.type.date=edit-tml/date.tml.vm
edit.type.timestamp=edit-tml/timestamp.tml.vm
edit.type.boolean=edit-tml/boolean.tml.vm
edit.type.link.one=edit-tml/linkone.tml.vm
edit.type.link.list=edit-tml/linklist.tml.vm
edit.type.choice=edit-tml/choice.tml.vm
edit.field.EquandaUser.Password=edit-tml/password.tml.vm
edit.field.EquandaType=edit-tml/type.tml.vm
edit.renderer.text=edit-tml/text.tml.vm
edit.renderer.wiki=edit-tml/text.tml.vm
view.type.string=view-tml/string.tml.vm
view.type.clob=view-tml/text.tml.vm
view.type.double=view-tml/tostring.tml.vm
view.type.int=view-tml/tostring.tml.vm
view.type.date=view-tml/date.tml.vm
view.type.timestamp=view-tml/timestamp.tml.vm
view.type.boolean=view-tml/tostring.tml.vm
view.type.link.one=view-tml/linkone.tml.vm
view.type.link.list=view-tml/linklist.tml.vm
view.type.choice=view-tml/choice.tml.vm
view.field.EquandaUser.Password=view-tml/password.tml.vm
view.field.EquandaType=view-tml/type.tml.vm
view.renderer.text=view-tml/text.tml.vm
view.renderer.wiki=view-tml/text.tml.vm
list.type.string=list-tml/string.tml.vm
list.type.clob=list-tml/string.tml.vm
list.type.double=list-tml/tostring.tml.vm
list.type.int=list-tml/tostring.tml.vm
list.type.date=list-tml/date.tml.vm
list.type.timestamp=list-tml/timestamp.tml.vm
list.type.boolean=list-tml/boolean.tml.vm
list.type.link.one=list-tml/linkone.tml.vm
list.type.link.list=list-tml/linklist.tml.vm
list.type.choice=list-tml/choice.tml.vm
list.field.EquandaUser.Password=list-tml/password.tml.vm
list.field.EquandaType=list-tml/type.tml.vm
list.renderer.text=list-tml/string.tml.vm
list.renderer.wiki=list-tml/string.tml.vm
summary.type.string=list-tml/string.tml.vm
summary.type.clob=list-tml/text.tml.vm
summary.type.double=list-tml/tostring.tml.vm
summary.type.int=list-tml/tostring.tml.vm
summary.type.date=list-tml/date.tml.vm
summary.type.timestamp=list-tml/timestamp.tml.vm
summary.type.boolean=list-tml/tostring.tml.vm
summary.type.link.one=summary-tml/linkone.tml.vm
summary.type.link.list=summary-tml/linklist.tml.vm
summary.type.choice=list-tml/choice.tml.vm
summary.field.EquandaUser.Password=list-tml/password.tml.vm
summary.field.EquandaType=list-tml/type.tml.vm
summary.renderer.text=list-tml/string.tml.vm
summary.renderer.wiki=list-tml/string.tml.vm
You can define the templates (and thus tapestry objects) which are used for the display based on the structure.
The default field handling uses the keyvalue settings again to read the velocity templates used to build the .tml tapestry template.
Below are the possible configurations which are used, in order. Of course only the types which are possible according to the field type apply.
The names are aways prefixed by an indication of the usage. This can be either "edit." "view." or "list.".
When a renderer is specified, the name is prefixed by "edit.renderer." "view.renderer." or "list.renderer." to find the templates to be used.
Important
When customizing the templates which are used, you have to do a clean build ("mvn clean install") in your project to assure the modified templates are applied. As the templates are read from the classpath, the system is unable to know the timestamp for the templates and thus does not know when to overwrite the generated files if the domain model has not changed.
When you used the archetype to create your empty project, the t5compo module is intended to write your custom components and templates which are used during generation. It also contains a templates.properties file for you to extend.
For generating links, the default rendering is to have a compact display of the record, and all operations are done on different pages. There is also an option to have links being displayed inline. For this add lines like the following in your templates.properties file :
type.link.Address.list=edit-tml/inlinelinklist.tml.vm
type.link.Score.list=edit-tml/inlinelinklist.tml.vm
In this example, all links to the Address or Score table whill be rendered inline.