You can subscribe to this list here.
| 2007 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
(6) |
Aug
(41) |
Sep
(44) |
Oct
(31) |
Nov
(54) |
Dec
(53) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2008 |
Jan
(71) |
Feb
(66) |
Mar
(65) |
Apr
(73) |
May
(68) |
Jun
(69) |
Jul
(28) |
Aug
(49) |
Sep
(44) |
Oct
(77) |
Nov
(64) |
Dec
(78) |
| 2009 |
Jan
(50) |
Feb
(28) |
Mar
(41) |
Apr
(30) |
May
(5) |
Jun
(30) |
Jul
(6) |
Aug
(2) |
Sep
(18) |
Oct
(11) |
Nov
(6) |
Dec
(10) |
| 2010 |
Jan
(5) |
Feb
(8) |
Mar
(4) |
Apr
(1) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
|
From: <tri...@us...> - 2008-12-03 09:24:00
|
Revision: 884
http://equanda.svn.sourceforge.net/equanda/?rev=884&view=rev
Author: triathlon98
Date: 2008-12-03 09:23:54 +0000 (Wed, 03 Dec 2008)
Log Message:
-----------
EQ-287 documentation improvements
Modified Paths:
--------------
trunk/equanda-generate/src/site/site.xml
trunk/equanda-generate/src/site/wiki/index.wiki
trunk/equanda-maven-plugin/src/site/site.xml
trunk/equanda-maven-plugin/src/site/wiki/index.wiki
trunk/src/site/site.xml
Added Paths:
-----------
trunk/src/site/wiki/generate.wiki
trunk/src/site/wiki/plugin/
trunk/src/site/wiki/plugin/archetype.wiki
trunk/src/site/wiki/plugin/ddltool.wiki
trunk/src/site/wiki/plugin/generate.wiki
trunk/src/site/wiki/plugin/import.wiki
trunk/src/site/wiki/plugin/translate.wiki
trunk/src/site/wiki/template.wiki
trunk/src/site/wiki/templates/
Removed Paths:
-------------
trunk/equanda-generate/src/site/wiki/template.wiki
trunk/equanda-generate/src/site/wiki/templates/
trunk/equanda-maven-plugin/src/site/wiki/archetype.wiki
trunk/equanda-maven-plugin/src/site/wiki/ddltool.wiki
trunk/equanda-maven-plugin/src/site/wiki/generate.wiki
trunk/equanda-maven-plugin/src/site/wiki/import.wiki
trunk/equanda-maven-plugin/src/site/wiki/translate.wiki
Modified: trunk/equanda-generate/src/site/site.xml
===================================================================
--- trunk/equanda-generate/src/site/site.xml 2008-12-02 10:19:23 UTC (rev 883)
+++ trunk/equanda-generate/src/site/site.xml 2008-12-03 09:23:54 UTC (rev 884)
@@ -9,14 +9,5 @@
<menu name="generate">
<item name="Introduction" href="index.html"/>
</menu>
-
- <menu name="templates">
- <item name="ejb3" href="templates/ejb3.html"/>
- <item name="t5gui" href="templates/t5gui.html"/>
- <item name="login" href="templates/login.html"/>
- <item name="import" href="templates/import.html"/>
- <item name="ddltool" href="templates/ddltool.html"/>
- <item name="docs" href="templates/docs.html"/>
- </menu>
</body>
</project>
Modified: trunk/equanda-generate/src/site/wiki/index.wiki
===================================================================
--- trunk/equanda-generate/src/site/wiki/index.wiki 2008-12-02 10:19:23 UTC (rev 883)
+++ trunk/equanda-generate/src/site/wiki/index.wiki 2008-12-03 09:23:54 UTC (rev 884)
@@ -1,30 +1,7 @@
-h1. Generating based on domain model
+h1. equanda-generate
-This model handled the code generation based on the domain model.
+The equanda-generate module contains the code and templates which are used to generate the equanda applications.
-Templates are provided for the following aspects.
-- [ejb3|templates/ejb3.html] : EJB3 persistence layer
-- [t5gui|templates/t5gui.html] : tapestry5 user interface
-- [login|templates/login.html] : user management support
-- [import|templates/import.html] : import data
-- [ddltool|templates/ddltool.html] : ddltool
-- [docs|templates/docs.html] : domain model documentation
+For more information about the the contents of this module can be found on the [project site|http://equanda.org/].
-
-h2. Domain model processing
-
-The domain model is parsed using [xstream|http://xstream.codehaus.org/] and then enriched in a couple of steps.
-
-- Handling of includes. The xml files are parsed one by one. And extra steps are need to include the files which are referenced in the model.
-- Enriching the model, this includes things like building the root tables which flatten the inheritance tree.
-- Validation of constraints on the domain model, catching the contradictions.
-
-
-h2. Developing the templates
-
-For the development of the templates, it is recommmended that you first try to make the change in the generated sources and verify that your changes are valid first. This way, the compilation will not require regeneration of the files (as long as you don't clean and don't change the domain model).
-When the changes work, you can then try to incorporate the modifications in the templates. At that point, you have to recompile the module with the templates and then do a clean build on your verification project (the clean build is needed because the changes in the templates are not noticed by the system).
-
-When developing the templates, you can access the processed model. This model (the API of available methods) can be found in the "org.equanda.domain.xml" package.
-
-[Details about the structure of the templates|template.html].
+equanda is a tool which helps you to build enterprise grade (JEE based) applications with minimal effort. Through code generation, a useful and functional base skeleton is created from the domain model. This application can be customized and the customizations remain active when the domain model changes and the skeleton is regenerated. This way, the cost of maintaining an evolving application is reduced by eliminating repetitive coding and assuring a consistent code base and user interface.
Deleted: trunk/equanda-generate/src/site/wiki/template.wiki
===================================================================
--- trunk/equanda-generate/src/site/wiki/template.wiki 2008-12-02 10:19:23 UTC (rev 883)
+++ trunk/equanda-generate/src/site/wiki/template.wiki 2008-12-03 09:23:54 UTC (rev 884)
@@ -1,97 +0,0 @@
-h1. Template structure
-
-For each target you can have several files which are generated. There is a ini file which contains the list of files which need to be generated.
-This ini file is called "_target-name_.ini" and is searched on the classpath.
-
-The file has the following format (excerpt from the ejb3.ini)
-{code}
-[config]
-path=ejb3
-
-[global]
-
-output1=${outputDir}${packageDir}client/LazyEJBList.java
-template1=LazyEJBList.java.vm
-
-output2=${outputDir}${packageDir}client/LazyProxyList.java
-template2=LazyProxyList.java.vm
-
-
-[root-table]
-
-// build entity bean
-output1=${outputDir}${packageDir}server/pm/DM${table}Bean.java
-template1=DMObjectBean.java.vm
-
-// build session facade bean
-output2=${outputDir}${packageDir}server/${table}Bean.java
-template2=ObjectBean.java.vm
-
-// build session facade root mediator
-output3=${outputDir}${packageDir}server/${table}MediatorRoot.java
-template3=MediatorRoot.java.vm
-
-// build SelectorHelper classes
-output4=${outputDir}${packageDir}server/${table}SelectorHelper.java
-template4=ObjectSelectorHelper.java.vm
-skip-if4=${altOutputDir}${packageDir}server/${table}SelectorHelper.java
-
-
-[table]
-
-// build mediator base class (generated)
-output1=${outputDir}${packageDir}server/${table}MediatorBase.java
-template1=MediatorBase.java.vm
-
-// build mediator class (for manual modification)
-output2=${outputDir}${packageDir}server/${table}Mediator.java
-template2=Mediator.java.vm
-skip-if2=${altOutputDir}${packageDir}server/${table}Mediator.java
-
-
-[multiple-field]
-
-// build entity bean
-output1=${outputDir}${packageDir}server/pm/DM${table}_${field}Bean.java
-template1=DMFieldBean.java.vm
-{code}
-
-The "config" section indicates the path which is prepended to each template file. The templates are all retrieved from the classpath, but the prefix allows you to avoid name collisions (like java packages).
-
-All the other sections indicate the possible groupings in the domain model for which files can be generated.
-The can contain _outputX_, _templateX_ and _skip-ifX_ where X is a number from 1 up to the amount needed (needs to be consecutive). In the parameters, you can use variable replacement using the ant/velocity syntax "${var-name}".
-- output indicates the location where the output file needs to be searched
-- template indicates the template file which needs to be used to produce the output
-- skip-if allows you to skip the template generation if the file with given name already exists.
-
-The sections which can be used (including variables for output names and templates) are
-- global : these templates are invoked once.
-- table : these are generated for each table. "table" is the table name for the filenames, of a _Table_ object for the velocity templates.
-- root-table : these are generated for each roottable. "table" is the (root) table name for the filenames, of a _RootTable_ object for the velocity templates.
-- root-table-expected-amount-small : same as "root-table" but only when the expected amount on the root is "small".
-- root-table-with-inheritance : same as "root" but only when the inheritance tree has more than one table.
-- field : each field, has "root-table" variables and "field" name for filenames or _Field_ instance in the templates.
-- field-with-choices : same as "field" but only for fields with choices.
-- select-not-hidden : all selects which are not hidden, has "root-table" variables and "select" name for filenames or _Select_ instance in the templates.
-- action-not-hidden : all actions which are not hidden, has "root-table" variables and "action" name for filenames or _Action_ instance in the templates.
-
-For variable replacement in the filenames, the following are available in all cases.
-- packageName
-- packageDir
-- outputDir
-- altOutputDir
-
-The following variables are always available in te Velocity templates.
-- engine : a reference to the _Generator_ class.
-- name : "equanda'.
-- dollar : "$".
-- dm, data : the actual domain model, instance of the _DomainModel_ class.
-- package : the package name, as passed in the (template specific) configuration. If not defined there, then the "ejb-package" setting from the "extra" sectio is used.
-- generationdate : string representation of the time when the generation started.
-- keyvalue : the keyvalue pairs which are passed in the (template specific) configuration.
-- dbtype : an instance of the convert class as determined in the "database" section.
-
-
-
-
-
Modified: trunk/equanda-maven-plugin/src/site/site.xml
===================================================================
--- trunk/equanda-maven-plugin/src/site/site.xml 2008-12-02 10:19:23 UTC (rev 883)
+++ trunk/equanda-maven-plugin/src/site/site.xml 2008-12-03 09:23:54 UTC (rev 884)
@@ -8,11 +8,6 @@
<menu name="maven-plugin">
<item name="Introduction" href="index.html"/>
- <item name="Generate" href="generate.html"/>
- <item name="Translate" href="translate.html"/>
- <item name="Archetype" href="archetype.html"/>
- <item name="Ddltool" href="ddltool.html"/>
- <item name="Import" href="import.html"/>
</menu>
</body>
</project>
\ No newline at end of file
Deleted: trunk/equanda-maven-plugin/src/site/wiki/archetype.wiki
===================================================================
--- trunk/equanda-maven-plugin/src/site/wiki/archetype.wiki 2008-12-02 10:19:23 UTC (rev 883)
+++ trunk/equanda-maven-plugin/src/site/wiki/archetype.wiki 2008-12-03 09:23:54 UTC (rev 884)
@@ -1,84 +0,0 @@
-h1. Archetype Plugin
-
-h2. Usage
-
-The archetype plugin should be used to generate new equanda project from template.
-
-It can be executed by the following command (all on one line) :
-
-{code}
-mvn equanda:archetype
- -DgroupId=com.mycompany -DartifactId=example
- -DarchetypeVersion=0.9 -DarchetypeGroupId=org.equanda -DarchetypeArtifactId=equanda-maven-plugin
-{code}
-
-All the parameters on the last line are used internally by maven.
-
-The other parameters can either be specified on the commandline using the "-Dkey=value" syntax, or you can put them in a file called "equanda-project.properties". This file itself can be changed by using something like "-DpropertiesFile=myprops.properties".
-
-Possible parameters (those in bold are required) are :
-
-- *groupId* : project group id
-- *artifactId* : project base artifact id
-- archetypeVersion : equanda archetype plugin version
-- archetypeGroupId : equanda archetype plugin group id, has to be "org.equanda"
-- archetypeArtifactId : equanda archetype plugin artifact id, has to be "equanda-maven-plugin"
-- basedir : base project directory (default is current directory)
-- remoteRepositories : remote repositories, comma separated values
-- packageName : default java package, defaults to the "groupId" value
-- version : new project version (default is "1.0-SNAPSHOT")
-
-For details see Maven [Archetype|http://maven.apache.org/plugins/maven-archetype-plugin/] Plugin Page.
-
-h2. Features
-
-The archetype creates an empty project with the equanda "standard" modules (as also used by the test suite, equanda-contact and equanda-sport example projects).
-
-h3. main module
-
-The main project groups the other modules to allow one entry point into the project.
-- The domain model should be placed in the "src/dm" directory. There is a very small sample domain model generated.
-- Basis for the project site under "src/site". This contains a "getting started" document which details information to compile the project, how to setup a database for development etc.
-- The "config" directory contains a checkstyle configuration.
-
-This includes two profiles which help you for development and testing.
-- use "mvn -Drun install" or "mvn -Drun clean install" to compile, install the application and start jboss with the latest version installed. This allows you to manually verify the correct working, especially the user interface. Once jboss is started this will just wait for jboss to end (to press CTRL-C in the console window when finished). The database structure is updated before starting the application.
-- use "mvn -Dfulltest clean install" to do a clean compile and installation, including running the integrations tests from the test module starting from and empty (or more correctly "known" database). The database structure is updated before starting the application.
-
-Apart from the usual maven targets, the following (standard equanda) targets can be applied to the project.
-- "mvn equanda:translate" to edit the translations file.
-- "mvn equanda:ddltool" to update the database structure.
-
-h3. core module
-
-The core module builds a jar file which contains the EJB classes, including the database access layer, mediators etc.
-- The persistence.xml file, configuring the EJB3/JPA entity beans is in "src/main/resources/META-INF/persistence.xml".
-- The base translations file can be found in "src/main/resources/translations.txt". Use "mvn equanda:translate" to edit this file.
-- There are a couple of example mediator files in "src/main/java/".
-
-h3. gui module
-
-The gui module builds the war file with the tapestry web user interface for the application.
-- In "src/main/java" you can find some proposed layout components, a start page and the AppModule class which configures Tapestry.
-- In "src/main/resources" you can find some Tapestry templates for the pages and components.
-- The AppModule class includes a service for timing the time takes for each page invocation (can be removed).
-- The AppModule class includes a service for getting the login information (which includes the authorizations for the data in the interface).
-- In "src/main/webapp" you can find resources (css/images/script) and the servlet configuration files ("WEB-INF/web-xml" and "WEB-INF/jboss-web.xml").
-
-h3. ear module
-
-The ear module builds the ear file which combines the core jar, the gui war and all libraries which need to be included for deploying in JBoss.
-
-h3. t5compo module
-
-The t5compo module is used for defining and including customizations to the generated user interface.
-- The "src/main/resources/t5gui/mytemplates/templates.properties" file contains the template overrides.
-- The "src/main/resources/t5gui/mytemplates/example.tml.vm" file contains an example changed template.
-
-h3. ddltool module
-
-This module is used to generate the database description file which used by the "equanda:ddltool" maven target and when doing the database update when deploying in JBoss or running the integration tests.
-
-h3. test module
-
-This is the integration test module. All the test class included in this modul are only included in the build phase when the "fulltest" profile is active. This will assure that the application is running (inside JBoss, starting from an empty database with database structure update) when the tests are run.
Deleted: trunk/equanda-maven-plugin/src/site/wiki/ddltool.wiki
===================================================================
--- trunk/equanda-maven-plugin/src/site/wiki/ddltool.wiki 2008-12-02 10:19:23 UTC (rev 883)
+++ trunk/equanda-maven-plugin/src/site/wiki/ddltool.wiki 2008-12-03 09:23:54 UTC (rev 884)
@@ -1,26 +0,0 @@
-h1. Ddltool plugin
-
-This plugin allows you to automatically do database definition/update as part of your maven build.
-
-{code}
- <plugin>
- <groupId>org.equanda</groupId>
- <artifactId>equanda-maven-plugin</artifactId>
- <configuration>
- <database>${synca.db.url}</database>
- <dblogin>${synca.db.login}</dblogin>
- <dbpassword>${synca.db.password}</dbpassword>
- <dbmap>be.synergetics.ca.ddltool.EquandaMap</dbmap>
- <ddltargets>update defaults</ddltargets>
- </configuration>
- <executions>
- <execution>
- <id>ddltool</id>
- <phase>test-compile</phase>
- <goals>
- <goal>ddltool</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
-{code}
Deleted: trunk/equanda-maven-plugin/src/site/wiki/generate.wiki
===================================================================
--- trunk/equanda-maven-plugin/src/site/wiki/generate.wiki 2008-12-02 10:19:23 UTC (rev 883)
+++ trunk/equanda-maven-plugin/src/site/wiki/generate.wiki 2008-12-03 09:23:54 UTC (rev 884)
@@ -1,30 +0,0 @@
-h1. Generate plugin
-
-The generate plugin should be used to generate the sources based on the [domain model description|../dm.html].
-
-It is for example used in the core module of the application, and there used as follows
-{code}
- <build>
- ...
- <plugins>
- ...
- <plugin>
- <groupId>org.equanda</groupId>
- <artifactId>equanda-maven-plugin</artifactId>
- <configuration>
- <sourceDirectory>${basedir}/../src/main/om</sourceDirectory>
- <template>ejb3,import,login</template>
- </configuration>
- <executions>
- <execution>
- <goals>
- <goal>generate</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- ...
- </plugins>
- ...
- </build>
-{code}
Deleted: trunk/equanda-maven-plugin/src/site/wiki/import.wiki
===================================================================
--- trunk/equanda-maven-plugin/src/site/wiki/import.wiki 2008-12-02 10:19:23 UTC (rev 883)
+++ trunk/equanda-maven-plugin/src/site/wiki/import.wiki 2008-12-03 09:23:54 UTC (rev 884)
@@ -1,31 +0,0 @@
-h1. Import plugin
-
-This plugin allows you to import data into running instance of your application using the import servlet.
-
-{code}
-<plugin>
- <groupId>org.equanda</groupId>
- <artifactId>equanda-maven-plugin</artifactId>
- <configuration>
- <url>https://localhost:8443/import</url>
- <login>local</login>
- <password>local</password>
- <locations>
- <location>organizations.import.txt</location>
- </locations>
- </configuration>
- <executions>
- <execution>
- <id>import</id>
- <phase>test-compile</phase>
- <goals>
- <goal>import</goal>
- </goals>
- </execution>
- </executions>
-</plugin>
-{code}
-
-It is possible to define several files to import. THe files themselves are first searched in the classpath (test scope), or if that fails, searched on the file system.
-
-Note that when the several maven plugins with the same group/artifact id are used in one pom, then the configuration is read from the first instance (though the execution itself is correct).
Modified: trunk/equanda-maven-plugin/src/site/wiki/index.wiki
===================================================================
--- trunk/equanda-maven-plugin/src/site/wiki/index.wiki 2008-12-02 10:19:23 UTC (rev 883)
+++ trunk/equanda-maven-plugin/src/site/wiki/index.wiki 2008-12-03 09:23:54 UTC (rev 884)
@@ -1,7 +1,7 @@
-h1. equanda maven plugin
+h1. equanda-maven-plugin
-The equanda-maven-plugin module contains several maven targets which can be used to handle some tasks which are important in the compilation and/or maintenance of the application.
+The equanda-maven-plugin module contains maven plugins which help to make optimal use of equanda.
-- [generate|generate.html] plugin
-- [translate|translate.html] plugin
-- [archetype|archetype.html] plugin
+For more information about the the contents of this module can be found on the [project site|http://equanda.org/].
+
+equanda is a tool which helps you to build enterprise grade (JEE based) applications with minimal effort. Through code generation, a useful and functional base skeleton is created from the domain model. This application can be customized and the customizations remain active when the domain model changes and the skeleton is regenerated. This way, the cost of maintaining an evolving application is reduced by eliminating repetitive coding and assuring a consistent code base and user interface.
Deleted: trunk/equanda-maven-plugin/src/site/wiki/translate.wiki
===================================================================
--- trunk/equanda-maven-plugin/src/site/wiki/translate.wiki 2008-12-02 10:19:23 UTC (rev 883)
+++ trunk/equanda-maven-plugin/src/site/wiki/translate.wiki 2008-12-03 09:23:54 UTC (rev 884)
@@ -1,41 +0,0 @@
-h1. translate plugin
-
-To allow easy entering of the translation string for the application, with aid about strings which are not yet translated etc, you can use the translation plugin.
-
-For this to work, shou should edit your .m2/settings.xml file to assure the following bit is included.
-{code}
- ...
- <pluginGroups>
- ...
- <pluginGroup>org.equanda</pluginGroup>
- ...
- </pluginGroups>
- ...
-{code}
-
-In the pom for the core module, you should add the following (probably merging with the existing equanda-maven-plugin configuration).
-{code}
- <build>
- ...
- <plugins>
- ...
- <plugin>
- <groupId>org.equanda</groupId>
- <artifactId>equanda-maven-plugin</artifactId>
- <configuration>
- <sourceDirectory>${basedir}/../src/main/om</sourceDirectory>
- <translateTarget>${basedir}/src/main/resources/translations.txt</translateTarget>
- <verifyLanguages>en;nl</verifyLanguages>
- </configuration>
- </plugin>
- ...
- </plugins>
- ...
- </build>
-{code}
-You may want to change the configuration settings, specifically _verifyLanguages_ as this contains the languages for which translations are needed.
-
-You can now start the translation tool uwing the following maven command.
-{code}
-mvn equanda:translate
-{code}
Modified: trunk/src/site/site.xml
===================================================================
--- trunk/src/site/site.xml 2008-12-02 10:19:23 UTC (rev 883)
+++ trunk/src/site/site.xml 2008-12-03 09:23:54 UTC (rev 884)
@@ -33,6 +33,28 @@
<item name="License" href="license.html"/>
</menu>
+ <menu name="generate">
+ <item name="Introduction" href="index.html"/>
+ </menu>
+
+ <menu name="templates">
+ <item name="template" href="template.html"/>
+ <item name="ejb3" href="templates/ejb3.html"/>
+ <item name="t5gui" href="templates/t5gui.html"/>
+ <item name="login" href="templates/login.html"/>
+ <item name="import" href="templates/import.html"/>
+ <item name="ddltool" href="templates/ddltool.html"/>
+ <item name="docs" href="templates/docs.html"/>
+ </menu>
+
+ <menu name="maven-plugin">
+ <item name="Generate" href="plugin/generate.html"/>
+ <item name="Translate" href="plugin/translate.html"/>
+ <item name="Archetype" href="plugin/archetype.html"/>
+ <item name="Ddltool" href="plugin/ddltool.html"/>
+ <item name="Import" href="plugin/import.html"/>
+ </menu>
+
<menu ref="modules" />
<menu ref="reports" />
</body>
Added: trunk/src/site/wiki/generate.wiki
===================================================================
--- trunk/src/site/wiki/generate.wiki (rev 0)
+++ trunk/src/site/wiki/generate.wiki 2008-12-03 09:23:54 UTC (rev 884)
@@ -0,0 +1,30 @@
+h1. Generating based on domain model
+
+This model handled the code generation based on the domain model.
+
+Templates are provided for the following aspects.
+- [ejb3|templates/ejb3.html] : EJB3 persistence layer
+- [t5gui|templates/t5gui.html] : tapestry5 user interface
+- [login|templates/login.html] : user management support
+- [import|templates/import.html] : import data
+- [ddltool|templates/ddltool.html] : ddltool
+- [docs|templates/docs.html] : domain model documentation
+
+
+h2. Domain model processing
+
+The domain model is parsed using [xstream|http://xstream.codehaus.org/] and then enriched in a couple of steps.
+
+- Handling of includes. The xml files are parsed one by one. And extra steps are need to include the files which are referenced in the model.
+- Enriching the model, this includes things like building the root tables which flatten the inheritance tree.
+- Validation of constraints on the domain model, catching the contradictions.
+
+
+h2. Developing the templates
+
+For the development of the templates, it is recommmended that you first try to make the change in the generated sources and verify that your changes are valid first. This way, the compilation will not require regeneration of the files (as long as you don't clean and don't change the domain model).
+When the changes work, you can then try to incorporate the modifications in the templates. At that point, you have to recompile the module with the templates and then do a clean build on your verification project (the clean build is needed because the changes in the templates are not noticed by the system).
+
+When developing the templates, you can access the processed model. This model (the API of available methods) can be found in the "org.equanda.domain.xml" package.
+
+[Details about the structure of the templates|template.html].
Copied: trunk/src/site/wiki/plugin/archetype.wiki (from rev 883, trunk/equanda-maven-plugin/src/site/wiki/archetype.wiki)
===================================================================
--- trunk/src/site/wiki/plugin/archetype.wiki (rev 0)
+++ trunk/src/site/wiki/plugin/archetype.wiki 2008-12-03 09:23:54 UTC (rev 884)
@@ -0,0 +1,84 @@
+h1. Archetype Plugin
+
+h2. Usage
+
+The archetype plugin should be used to generate new equanda project from template.
+
+It can be executed by the following command (all on one line) :
+
+{code}
+mvn equanda:archetype
+ -DgroupId=com.mycompany -DartifactId=example
+ -DarchetypeVersion=0.9 -DarchetypeGroupId=org.equanda -DarchetypeArtifactId=equanda-maven-plugin
+{code}
+
+All the parameters on the last line are used internally by maven.
+
+The other parameters can either be specified on the commandline using the "-Dkey=value" syntax, or you can put them in a file called "equanda-project.properties". This file itself can be changed by using something like "-DpropertiesFile=myprops.properties".
+
+Possible parameters (those in bold are required) are :
+
+- *groupId* : project group id
+- *artifactId* : project base artifact id
+- archetypeVersion : equanda archetype plugin version
+- archetypeGroupId : equanda archetype plugin group id, has to be "org.equanda"
+- archetypeArtifactId : equanda archetype plugin artifact id, has to be "equanda-maven-plugin"
+- basedir : base project directory (default is current directory)
+- remoteRepositories : remote repositories, comma separated values
+- packageName : default java package, defaults to the "groupId" value
+- version : new project version (default is "1.0-SNAPSHOT")
+
+For details see Maven [Archetype|http://maven.apache.org/plugins/maven-archetype-plugin/] Plugin Page.
+
+h2. Features
+
+The archetype creates an empty project with the equanda "standard" modules (as also used by the test suite, equanda-contact and equanda-sport example projects).
+
+h3. main module
+
+The main project groups the other modules to allow one entry point into the project.
+- The domain model should be placed in the "src/dm" directory. There is a very small sample domain model generated.
+- Basis for the project site under "src/site". This contains a "getting started" document which details information to compile the project, how to setup a database for development etc.
+- The "config" directory contains a checkstyle configuration.
+
+This includes two profiles which help you for development and testing.
+- use "mvn -Drun install" or "mvn -Drun clean install" to compile, install the application and start jboss with the latest version installed. This allows you to manually verify the correct working, especially the user interface. Once jboss is started this will just wait for jboss to end (to press CTRL-C in the console window when finished). The database structure is updated before starting the application.
+- use "mvn -Dfulltest clean install" to do a clean compile and installation, including running the integrations tests from the test module starting from and empty (or more correctly "known" database). The database structure is updated before starting the application.
+
+Apart from the usual maven targets, the following (standard equanda) targets can be applied to the project.
+- "mvn equanda:translate" to edit the translations file.
+- "mvn equanda:ddltool" to update the database structure.
+
+h3. core module
+
+The core module builds a jar file which contains the EJB classes, including the database access layer, mediators etc.
+- The persistence.xml file, configuring the EJB3/JPA entity beans is in "src/main/resources/META-INF/persistence.xml".
+- The base translations file can be found in "src/main/resources/translations.txt". Use "mvn equanda:translate" to edit this file.
+- There are a couple of example mediator files in "src/main/java/".
+
+h3. gui module
+
+The gui module builds the war file with the tapestry web user interface for the application.
+- In "src/main/java" you can find some proposed layout components, a start page and the AppModule class which configures Tapestry.
+- In "src/main/resources" you can find some Tapestry templates for the pages and components.
+- The AppModule class includes a service for timing the time takes for each page invocation (can be removed).
+- The AppModule class includes a service for getting the login information (which includes the authorizations for the data in the interface).
+- In "src/main/webapp" you can find resources (css/images/script) and the servlet configuration files ("WEB-INF/web-xml" and "WEB-INF/jboss-web.xml").
+
+h3. ear module
+
+The ear module builds the ear file which combines the core jar, the gui war and all libraries which need to be included for deploying in JBoss.
+
+h3. t5compo module
+
+The t5compo module is used for defining and including customizations to the generated user interface.
+- The "src/main/resources/t5gui/mytemplates/templates.properties" file contains the template overrides.
+- The "src/main/resources/t5gui/mytemplates/example.tml.vm" file contains an example changed template.
+
+h3. ddltool module
+
+This module is used to generate the database description file which used by the "equanda:ddltool" maven target and when doing the database update when deploying in JBoss or running the integration tests.
+
+h3. test module
+
+This is the integration test module. All the test class included in this modul are only included in the build phase when the "fulltest" profile is active. This will assure that the application is running (inside JBoss, starting from an empty database with database structure update) when the tests are run.
Copied: trunk/src/site/wiki/plugin/ddltool.wiki (from rev 883, trunk/equanda-maven-plugin/src/site/wiki/ddltool.wiki)
===================================================================
--- trunk/src/site/wiki/plugin/ddltool.wiki (rev 0)
+++ trunk/src/site/wiki/plugin/ddltool.wiki 2008-12-03 09:23:54 UTC (rev 884)
@@ -0,0 +1,26 @@
+h1. Ddltool plugin
+
+This plugin allows you to automatically do database definition/update as part of your maven build.
+
+{code}
+ <plugin>
+ <groupId>org.equanda</groupId>
+ <artifactId>equanda-maven-plugin</artifactId>
+ <configuration>
+ <database>${synca.db.url}</database>
+ <dblogin>${synca.db.login}</dblogin>
+ <dbpassword>${synca.db.password}</dbpassword>
+ <dbmap>be.synergetics.ca.ddltool.EquandaMap</dbmap>
+ <ddltargets>update defaults</ddltargets>
+ </configuration>
+ <executions>
+ <execution>
+ <id>ddltool</id>
+ <phase>test-compile</phase>
+ <goals>
+ <goal>ddltool</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+{code}
Copied: trunk/src/site/wiki/plugin/generate.wiki (from rev 883, trunk/equanda-maven-plugin/src/site/wiki/generate.wiki)
===================================================================
--- trunk/src/site/wiki/plugin/generate.wiki (rev 0)
+++ trunk/src/site/wiki/plugin/generate.wiki 2008-12-03 09:23:54 UTC (rev 884)
@@ -0,0 +1,30 @@
+h1. Generate plugin
+
+The generate plugin should be used to generate the sources based on the [domain model description|../dm.html].
+
+It is for example used in the core module of the application, and there used as follows
+{code}
+ <build>
+ ...
+ <plugins>
+ ...
+ <plugin>
+ <groupId>org.equanda</groupId>
+ <artifactId>equanda-maven-plugin</artifactId>
+ <configuration>
+ <sourceDirectory>${basedir}/../src/main/om</sourceDirectory>
+ <template>ejb3,import,login</template>
+ </configuration>
+ <executions>
+ <execution>
+ <goals>
+ <goal>generate</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ ...
+ </plugins>
+ ...
+ </build>
+{code}
Copied: trunk/src/site/wiki/plugin/import.wiki (from rev 883, trunk/equanda-maven-plugin/src/site/wiki/import.wiki)
===================================================================
--- trunk/src/site/wiki/plugin/import.wiki (rev 0)
+++ trunk/src/site/wiki/plugin/import.wiki 2008-12-03 09:23:54 UTC (rev 884)
@@ -0,0 +1,31 @@
+h1. Import plugin
+
+This plugin allows you to import data into running instance of your application using the import servlet.
+
+{code}
+<plugin>
+ <groupId>org.equanda</groupId>
+ <artifactId>equanda-maven-plugin</artifactId>
+ <configuration>
+ <url>https://localhost:8443/import</url>
+ <login>local</login>
+ <password>local</password>
+ <locations>
+ <location>organizations.import.txt</location>
+ </locations>
+ </configuration>
+ <executions>
+ <execution>
+ <id>import</id>
+ <phase>test-compile</phase>
+ <goals>
+ <goal>import</goal>
+ </goals>
+ </execution>
+ </executions>
+</plugin>
+{code}
+
+It is possible to define several files to import. THe files themselves are first searched in the classpath (test scope), or if that fails, searched on the file system.
+
+Note that when the several maven plugins with the same group/artifact id are used in one pom, then the configuration is read from the first instance (though the execution itself is correct).
Copied: trunk/src/site/wiki/plugin/translate.wiki (from rev 883, trunk/equanda-maven-plugin/src/site/wiki/translate.wiki)
===================================================================
--- trunk/src/site/wiki/plugin/translate.wiki (rev 0)
+++ trunk/src/site/wiki/plugin/translate.wiki 2008-12-03 09:23:54 UTC (rev 884)
@@ -0,0 +1,41 @@
+h1. translate plugin
+
+To allow easy entering of the translation string for the application, with aid about strings which are not yet translated etc, you can use the translation plugin.
+
+For this to work, shou should edit your .m2/settings.xml file to assure the following bit is included.
+{code}
+ ...
+ <pluginGroups>
+ ...
+ <pluginGroup>org.equanda</pluginGroup>
+ ...
+ </pluginGroups>
+ ...
+{code}
+
+In the pom for the core module, you should add the following (probably merging with the existing equanda-maven-plugin configuration).
+{code}
+ <build>
+ ...
+ <plugins>
+ ...
+ <plugin>
+ <groupId>org.equanda</groupId>
+ <artifactId>equanda-maven-plugin</artifactId>
+ <configuration>
+ <sourceDirectory>${basedir}/../src/main/om</sourceDirectory>
+ <translateTarget>${basedir}/src/main/resources/translations.txt</translateTarget>
+ <verifyLanguages>en;nl</verifyLanguages>
+ </configuration>
+ </plugin>
+ ...
+ </plugins>
+ ...
+ </build>
+{code}
+You may want to change the configuration settings, specifically _verifyLanguages_ as this contains the languages for which translations are needed.
+
+You can now start the translation tool uwing the following maven command.
+{code}
+mvn equanda:translate
+{code}
Copied: trunk/src/site/wiki/template.wiki (from rev 883, trunk/equanda-generate/src/site/wiki/template.wiki)
===================================================================
--- trunk/src/site/wiki/template.wiki (rev 0)
+++ trunk/src/site/wiki/template.wiki 2008-12-03 09:23:54 UTC (rev 884)
@@ -0,0 +1,97 @@
+h1. Template structure
+
+For each target you can have several files which are generated. There is a ini file which contains the list of files which need to be generated.
+This ini file is called "_target-name_.ini" and is searched on the classpath.
+
+The file has the following format (excerpt from the ejb3.ini)
+{code}
+[config]
+path=ejb3
+
+[global]
+
+output1=${outputDir}${packageDir}client/LazyEJBList.java
+template1=LazyEJBList.java.vm
+
+output2=${outputDir}${packageDir}client/LazyProxyList.java
+template2=LazyProxyList.java.vm
+
+
+[root-table]
+
+// build entity bean
+output1=${outputDir}${packageDir}server/pm/DM${table}Bean.java
+template1=DMObjectBean.java.vm
+
+// build session facade bean
+output2=${outputDir}${packageDir}server/${table}Bean.java
+template2=ObjectBean.java.vm
+
+// build session facade root mediator
+output3=${outputDir}${packageDir}server/${table}MediatorRoot.java
+template3=MediatorRoot.java.vm
+
+// build SelectorHelper classes
+output4=${outputDir}${packageDir}server/${table}SelectorHelper.java
+template4=ObjectSelectorHelper.java.vm
+skip-if4=${altOutputDir}${packageDir}server/${table}SelectorHelper.java
+
+
+[table]
+
+// build mediator base class (generated)
+output1=${outputDir}${packageDir}server/${table}MediatorBase.java
+template1=MediatorBase.java.vm
+
+// build mediator class (for manual modification)
+output2=${outputDir}${packageDir}server/${table}Mediator.java
+template2=Mediator.java.vm
+skip-if2=${altOutputDir}${packageDir}server/${table}Mediator.java
+
+
+[multiple-field]
+
+// build entity bean
+output1=${outputDir}${packageDir}server/pm/DM${table}_${field}Bean.java
+template1=DMFieldBean.java.vm
+{code}
+
+The "config" section indicates the path which is prepended to each template file. The templates are all retrieved from the classpath, but the prefix allows you to avoid name collisions (like java packages).
+
+All the other sections indicate the possible groupings in the domain model for which files can be generated.
+The can contain _outputX_, _templateX_ and _skip-ifX_ where X is a number from 1 up to the amount needed (needs to be consecutive). In the parameters, you can use variable replacement using the ant/velocity syntax "${var-name}".
+- output indicates the location where the output file needs to be searched
+- template indicates the template file which needs to be used to produce the output
+- skip-if allows you to skip the template generation if the file with given name already exists.
+
+The sections which can be used (including variables for output names and templates) are
+- global : these templates are invoked once.
+- table : these are generated for each table. "table" is the table name for the filenames, of a _Table_ object for the velocity templates.
+- root-table : these are generated for each roottable. "table" is the (root) table name for the filenames, of a _RootTable_ object for the velocity templates.
+- root-table-expected-amount-small : same as "root-table" but only when the expected amount on the root is "small".
+- root-table-with-inheritance : same as "root" but only when the inheritance tree has more than one table.
+- field : each field, has "root-table" variables and "field" name for filenames or _Field_ instance in the templates.
+- field-with-choices : same as "field" but only for fields with choices.
+- select-not-hidden : all selects which are not hidden, has "root-table" variables and "select" name for filenames or _Select_ instance in the templates.
+- action-not-hidden : all actions which are not hidden, has "root-table" variables and "action" name for filenames or _Action_ instance in the templates.
+
+For variable replacement in the filenames, the following are available in all cases.
+- packageName
+- packageDir
+- outputDir
+- altOutputDir
+
+The following variables are always available in te Velocity templates.
+- engine : a reference to the _Generator_ class.
+- name : "equanda'.
+- dollar : "$".
+- dm, data : the actual domain model, instance of the _DomainModel_ class.
+- package : the package name, as passed in the (template specific) configuration. If not defined there, then the "ejb-package" setting from the "extra" sectio is used.
+- generationdate : string representation of the time when the generation started.
+- keyvalue : the keyvalue pairs which are passed in the (template specific) configuration.
+- dbtype : an instance of the convert class as determined in the "database" section.
+
+
+
+
+
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <tri...@us...> - 2008-12-02 10:19:29
|
Revision: 883
http://equanda.svn.sourceforge.net/equanda/?rev=883&view=rev
Author: triathlon98
Date: 2008-12-02 10:19:23 +0000 (Tue, 02 Dec 2008)
Log Message:
-----------
EQ-287 documentation improvements
Modified Paths:
--------------
trunk/equanda-client/src/site/wiki/index.wiki
Added Paths:
-----------
trunk/equanda-dm/src/site/
trunk/equanda-dm/src/site/site.xml
trunk/equanda-dm/src/site/wiki/
trunk/equanda-dm/src/site/wiki/index.wiki
Modified: trunk/equanda-client/src/site/wiki/index.wiki
===================================================================
--- trunk/equanda-client/src/site/wiki/index.wiki 2008-12-01 17:55:09 UTC (rev 882)
+++ trunk/equanda-client/src/site/wiki/index.wiki 2008-12-02 10:19:23 UTC (rev 883)
@@ -0,0 +1,7 @@
+h1. equanda-client
+
+The equanda-client module contains the classes which are needed by a client who wants to access the equanda generated application.
+
+For more information about the the contents of this module can be found on the [project site|http://equanda.org/].
+
+equanda is a tool which helps you to build enterprise grade (JEE based) applications with minimal effort. Through code generation, a useful and functional base skeleton is created from the domain model. This application can be customized and the customizations remain active when the domain model changes and the skeleton is regenerated. This way, the cost of maintaining an evolving application is reduced by eliminating repetitive coding and assuring a consistent code base and user interface.
Added: trunk/equanda-dm/src/site/site.xml
===================================================================
--- trunk/equanda-dm/src/site/site.xml (rev 0)
+++ trunk/equanda-dm/src/site/site.xml 2008-12-02 10:19:23 UTC (rev 883)
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project name="equanda-dm">
+ <body>
+ <links>
+ <item name="equanda" href="http://www.equanda.org/"/>
+ <item name="staticwiki" href="http://www.staticwiki.org/"/>
+ </links>
+
+ <menu name="dm">
+ <item name="Introduction" href="index.html"/>
+ </menu>
+ </body>
+</project>
\ No newline at end of file
Added: trunk/equanda-dm/src/site/wiki/index.wiki
===================================================================
--- trunk/equanda-dm/src/site/wiki/index.wiki (rev 0)
+++ trunk/equanda-dm/src/site/wiki/index.wiki 2008-12-02 10:19:23 UTC (rev 883)
@@ -0,0 +1,7 @@
+h1. equanda-dm
+
+The equanda-dm module contains the classes which read and transform the domain model.
+
+For more information about the the contents of this module can be found on the [project site|http://equanda.org/].
+
+equanda is a tool which helps you to build enterprise grade (JEE based) applications with minimal effort. Through code generation, a useful and functional base skeleton is created from the domain model. This application can be customized and the customizations remain active when the domain model changes and the skeleton is regenerated. This way, the cost of maintaining an evolving application is reduced by eliminating repetitive coding and assuring a consistent code base and user interface.
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <tri...@us...> - 2008-12-01 17:55:13
|
Revision: 882
http://equanda.svn.sourceforge.net/equanda/?rev=882&view=rev
Author: triathlon98
Date: 2008-12-01 17:55:09 +0000 (Mon, 01 Dec 2008)
Log Message:
-----------
EQ-288 create equanda-dm module (splitting equanda-generate)
Modified Paths:
--------------
trunk/equanda-dm/src/main/java/org/equanda/domain/db/CodebaseConvert.java
trunk/equanda-dm/src/main/java/org/equanda/domain/xml/Action.java
trunk/equanda-dm/src/main/java/org/equanda/domain/xml/Build.java
trunk/equanda-dm/src/main/java/org/equanda/domain/xml/CaseConversion.java
trunk/equanda-dm/src/main/java/org/equanda/domain/xml/DataFilter.java
trunk/equanda-dm/src/main/java/org/equanda/domain/xml/Default.java
trunk/equanda-dm/src/main/java/org/equanda/domain/xml/DefaultInstance.java
trunk/equanda-dm/src/main/java/org/equanda/domain/xml/DomainModel.java
trunk/equanda-dm/src/main/java/org/equanda/domain/xml/Group.java
trunk/equanda-dm/src/main/java/org/equanda/domain/xml/IncludeData.java
trunk/equanda-dm/src/main/java/org/equanda/domain/xml/OverwriteDefault.java
trunk/equanda-dm/src/main/java/org/equanda/domain/xml/Page.java
trunk/equanda-dm/src/main/java/org/equanda/domain/xml/Set.java
trunk/equanda-dm/src/main/java/org/equanda/domain/xml/SubSelect.java
trunk/equanda-dm/src/main/java/org/equanda/domain/xml/Template.java
trunk/equanda-dm/src/main/java/org/equanda/domain/xml/Type.java
trunk/equanda-dm/src/main/java/org/equanda/domain/xml/aid/DefaultConverter.java
trunk/equanda-dm/src/main/java/org/equanda/domain/xml/aid/DefaultInstanceConverter.java
trunk/equanda-dm/src/main/java/org/equanda/domain/xml/aid/OverwriteDefaultConverter.java
trunk/equanda-dm/src/main/java/org/equanda/domain/xml/aid/SetConverter.java
trunk/equanda-dm/src/test/java/org/equanda/domain/xml/ActionTest.java
trunk/equanda-dm/src/test/java/org/equanda/domain/xml/DefaultInstanceTest.java
trunk/equanda-dm/src/test/java/org/equanda/domain/xml/ParserIncludeTest.java
trunk/equanda-dm/src/test/java/org/equanda/domain/xml/ParserTransformationTest.java
trunk/equanda-dm/src/test/java/org/equanda/domain/xml/XStreamTestAdapter.java
trunk/equanda-dm/src/test/java/org/equanda/domain/xml/aid/ValidationUtilTest.java
trunk/equanda-generate/pom.xml
trunk/equanda-generate/src/test/resources/CaseConversionTest/CaseConversionAuto.xml
trunk/equanda-generate/src/test/resources/CaseConversionTest/CaseConversionBothValueAndClass.xml
trunk/equanda-generate/src/test/resources/CaseConversionTest/CaseConversionCalculated.xml
trunk/equanda-generate/src/test/resources/CaseConversionTest/CaseConversionInvalidType.xml
trunk/equanda-generate/src/test/resources/CaseConversionTest/CaseConversionInvalidValue.xml
trunk/equanda-generate/src/test/resources/CaseConversionTest/CaseConversionNoValueNoClass.xml
trunk/equanda-generate/src/test/resources/ChoicesTest/ChoiceCalculated.xml
trunk/equanda-generate/src/test/resources/ChoicesTest/ChoiceDate.xml
trunk/equanda-generate/src/test/resources/ChoicesTest/ChoiceInvalidBoolean.xml
trunk/equanda-generate/src/test/resources/ChoicesTest/ChoiceInvalidDouble.xml
trunk/equanda-generate/src/test/resources/ChoicesTest/ChoiceInvalidInt.xml
trunk/equanda-generate/src/test/resources/ChoicesTest/ChoiceTimestamp.xml
trunk/equanda-generate/src/test/resources/ChoicesTest/ChoiceTooLong.xml
trunk/equanda-generate/src/test/resources/CompareTest/CompareAuto.xml
trunk/equanda-generate/src/test/resources/CompareTest/CompareBooleanInvalidTest.xml
trunk/equanda-generate/src/test/resources/CompareTest/CompareCalculated.xml
trunk/equanda-generate/src/test/resources/CompareTest/CompareDifferentTypes.xml
trunk/equanda-generate/src/test/resources/CompareTest/CompareGlobalAuto.xml
trunk/equanda-generate/src/test/resources/CompareTest/CompareGlobalBooleanInvalidTest.xml
trunk/equanda-generate/src/test/resources/CompareTest/CompareGlobalCalculated.xml
trunk/equanda-generate/src/test/resources/CompareTest/CompareGlobalDifferentTypes.xml
trunk/equanda-generate/src/test/resources/CompareTest/CompareGlobalLeftImmutable.xml
trunk/equanda-generate/src/test/resources/CompareTest/CompareGlobalMultiple.xml
trunk/equanda-generate/src/test/resources/CompareTest/CompareInvalidBoolean.xml
trunk/equanda-generate/src/test/resources/CompareTest/CompareInvalidDate.xml
trunk/equanda-generate/src/test/resources/CompareTest/CompareInvalidDouble.xml
trunk/equanda-generate/src/test/resources/CompareTest/CompareInvalidInt.xml
trunk/equanda-generate/src/test/resources/CompareTest/CompareInvalidTimestamp.xml
trunk/equanda-generate/src/test/resources/CompareTest/CompareLinkEquals.xml
trunk/equanda-generate/src/test/resources/CompareTest/CompareLinkType.xml
trunk/equanda-generate/src/test/resources/CompareTest/CompareLinkTypeInvalid.xml
trunk/equanda-generate/src/test/resources/CompareTest/CompareMultiple.xml
trunk/equanda-generate/src/test/resources/ConstraintsTest/UniqueAndUniqueFor.xml
trunk/equanda-generate/src/test/resources/ConstraintsTest/UniqueFor.xml
trunk/equanda-generate/src/test/resources/ConstraintsTest/UniqueForOnTable.xml
trunk/equanda-generate/src/test/resources/DefaultTest/DefaultLink.xml
trunk/equanda-generate/src/test/resources/DisplayTest/InternalDisplayed.xml
trunk/equanda-generate/src/test/resources/FailOnInvalidDefinitionTest/Invalid.xml
trunk/equanda-generate/src/test/resources/FailOnInvalidDefinitionTest/Valid.xml
trunk/equanda-generate/src/test/resources/ImmutableAndMutableTest/ImmutableAndMutable.xml
trunk/equanda-generate/src/test/resources/LinksTest/AllowDeleteFieldNotLink.xml
trunk/equanda-generate/src/test/resources/LinksTest/BidirectionalLinksBothRequired.xml
trunk/equanda-generate/src/test/resources/LinksTest/CascadeDeleteFieldNotLink.xml
trunk/equanda-generate/src/test/resources/LinksTest/CascadeDeleteMultiple.xml
trunk/equanda-generate/src/test/resources/LinksTest/CascadeDeleteNotBidirectional.xml
trunk/equanda-generate/src/test/resources/LinksTest/CascadeKeepFieldNotLink.xml
trunk/equanda-generate/src/test/resources/LinksTest/LinkName2Times.xml
trunk/equanda-generate/src/test/resources/LinksTest/LinkNameDifferentRelations1.xml
trunk/equanda-generate/src/test/resources/LinksTest/LinkNameDifferentRelations2.xml
trunk/equanda-generate/src/test/resources/LinksTest/LinksWithSuggest.xml
trunk/equanda-generate/src/test/resources/LinksTest/OtherSideMultipleIncorrect.xml
trunk/equanda-generate/src/test/resources/LinksTest/OtherSideSingleIncorrect.xml
trunk/equanda-generate/src/test/resources/LinksTest/OtherSideSingleWithFieldNotLink.xml
trunk/equanda-generate/src/test/resources/LinksTest/UseRelationTableFieldMultiple.xml
trunk/equanda-generate/src/test/resources/LinksTest/UseRelationTableFieldNotLink.xml
trunk/equanda-generate/src/test/resources/LinksTest/UseRelationTableNotBidirectional.xml
trunk/equanda-generate/src/test/resources/LinksTest/UseRelationTableOtherSideSingle.xml
trunk/equanda-generate/src/test/resources/LinksTest/ValidLinks.xml
trunk/equanda-generate/src/test/resources/LobTest/BlobChoice.xml
trunk/equanda-generate/src/test/resources/LobTest/BlobDescription.xml
trunk/equanda-generate/src/test/resources/LobTest/BlobReference.xml
trunk/equanda-generate/src/test/resources/LobTest/BlobSelection.xml
trunk/equanda-generate/src/test/resources/LobTest/ClobChoice.xml
trunk/equanda-generate/src/test/resources/LobTest/ClobReference.xml
trunk/equanda-generate/src/test/resources/MultipleTest/MultipleDouble.xml
trunk/equanda-generate/src/test/resources/MultipleTest/MultipleInt.xml
trunk/equanda-generate/src/test/resources/NamesTest/InvalidFieldName-0Length.xml
trunk/equanda-generate/src/test/resources/NamesTest/InvalidFieldName-Invalid1stChar.xml
trunk/equanda-generate/src/test/resources/NamesTest/InvalidFieldName-InvalidChar.xml
trunk/equanda-generate/src/test/resources/NamesTest/InvalidLinkName-Invalid1stChar.xml
trunk/equanda-generate/src/test/resources/NamesTest/InvalidLinkName-InvalidChar.xml
trunk/equanda-generate/src/test/resources/NamesTest/InvalidTableName-0Length.xml
trunk/equanda-generate/src/test/resources/NamesTest/InvalidTableName-Invalid1stChar.xml
trunk/equanda-generate/src/test/resources/NamesTest/InvalidTableName-InvalidChar.xml
trunk/equanda-generate/src/test/resources/NamesTest/InvalidTableName-ReservedName.xml
trunk/equanda-generate/src/test/resources/SelectTest/DirectSelectionsAndSubselects.xml
trunk/equanda-generate/src/test/resources/SelectTest/OperatorAddNoSubselects.xml
trunk/equanda-generate/src/test/resources/SelectTest/OperatorAddSingleSelect.xml
trunk/equanda-generate/src/test/resources/SelectTest/OperatorTryNoSubselects.xml
trunk/equanda-generate/src/test/resources/SelectTest/OrderBooleanField.xml
trunk/equanda-generate/src/test/resources/SelectTest/OrderInvalidField.xml
trunk/equanda-generate/src/test/resources/SelectTest/OrderLinkField.xml
trunk/equanda-generate/src/test/resources/SelectTest/OrderMultipleField.xml
trunk/equanda-generate/src/test/resources/SelectTest/SelectionInvalidTest.xml
trunk/equanda-generate/src/test/resources/SelectTest/SingleSelectWithLimit.xml
trunk/equanda-generate/src/test/resources/SubjectoryTest/NoContextOnChoice.xml
trunk/equanda-generate/src/test/resources/SubjectoryTest/NoContextOnField.xml
trunk/equanda-generate/src/test/resources/SubjectoryTest/NoContextOnTable.xml
trunk/equanda-generate/src/test/resources/SubjectoryTest/ValidSubjectory.xml
trunk/equanda-generate/src/test/resources/TableInclude/IncludedTable.table
trunk/equanda-generate/src/test/resources/TableInclude/TableDirInclude.xml
trunk/equanda-generate/src/test/resources/UniqueNameTest/ActionNotUnique.xml
trunk/equanda-generate/src/test/resources/UniqueNameTest/BuildNotUnique.xml
trunk/equanda-generate/src/test/resources/UniqueNameTest/FieldNameNotUnique.xml
trunk/equanda-generate/src/test/resources/UniqueNameTest/GroupJoin.xml
trunk/equanda-generate/src/test/resources/UniqueNameTest/GroupJoinFailed1.xml
trunk/equanda-generate/src/test/resources/UniqueNameTest/GroupJoinFailed2.xml
trunk/equanda-generate/src/test/resources/UniqueNameTest/SelectNotUnique.xml
trunk/equanda-generate/src/test/resources/UniqueNameTest/TableNameNotUnique.xml
trunk/equanda-generate/src/test/resources/UniqueNameTest/TableTypeNotUnique.xml
trunk/equanda-generate/src/test/resources/UniqueTest/UniqueCalculated.xml
trunk/equanda-generate/src/test/resources/UniqueTest/UniqueLink.xml
trunk/equanda-generate/src/test/resources/UniqueTest/UniqueMultiple.xml
trunk/equanda-generate/src/test/resources/ValueWhenNullTest/ValueWhenNullAuto.xml
trunk/equanda-generate/src/test/resources/ValueWhenNullTest/ValueWhenNullCalculated.xml
trunk/equanda-generate/src/test/resources/ValueWhenNullTest/ValueWhenNullInvalidType.xml
trunk/equanda-generate/src/test/resources/ValueWhenNullTest/ValueWhenNullMultiple.xml
trunk/equanda-generate/src/test/resources/ValueWhenNullTest/ValueWhenNullTwice.xml
trunk/equanda-maven-plugin/src/main/resources/archetype-resources/src/main/dm/Address.table
trunk/equanda-maven-plugin/src/main/resources/archetype-resources/src/main/dm/Organization.table
trunk/equanda-maven-plugin/src/main/resources/archetype-resources/src/main/dm/User.table
trunk/equanda-maven-plugin/src/main/resources/archetype-resources/src/main/dm/dm.xml
Added Paths:
-----------
trunk/equanda-dm/src/main/java/org/
trunk/equanda-dm/src/main/java/org/equanda/
trunk/equanda-dm/src/main/java/org/equanda/domain/
trunk/equanda-dm/src/main/resources/equanda.dtd
trunk/equanda-dm/src/main/resources/org/
trunk/equanda-dm/src/test/java/org/
trunk/equanda-dm/src/test/java/org/equanda/
trunk/equanda-dm/src/test/java/org/equanda/domain/
trunk/equanda-dm/src/test/resources/domain/
trunk/equanda-generate/src/test/java/org/equanda/generate/TableTest.java
Removed Paths:
-------------
trunk/equanda-dm/src/test/java/org/equanda/domain/xml/ParseTableTest.java
trunk/equanda-generate/src/main/java/org/equanda/domain/
trunk/equanda-generate/src/main/resources/equanda.dtd
trunk/equanda-generate/src/main/resources/org/
trunk/equanda-generate/src/test/java/org/equanda/domain/
trunk/equanda-generate/src/test/resources/domain/
Modified: trunk/equanda-dm/src/main/java/org/equanda/domain/db/CodebaseConvert.java
===================================================================
--- trunk/equanda-generate/src/main/java/org/equanda/domain/db/CodebaseConvert.java 2008-11-24 13:57:55 UTC (rev 874)
+++ trunk/equanda-dm/src/main/java/org/equanda/domain/db/CodebaseConvert.java 2008-12-01 17:55:09 UTC (rev 882)
@@ -26,6 +26,7 @@
import org.equanda.util.IniFile;
import org.equanda.util.SaveException;
+
import java.io.IOException;
/**
Modified: trunk/equanda-dm/src/main/java/org/equanda/domain/xml/Action.java
===================================================================
--- trunk/equanda-generate/src/main/java/org/equanda/domain/xml/Action.java 2008-11-24 13:57:55 UTC (rev 874)
+++ trunk/equanda-dm/src/main/java/org/equanda/domain/xml/Action.java 2008-12-01 17:55:09 UTC (rev 882)
@@ -28,9 +28,10 @@
import com.thoughtworks.xstream.annotations.XStreamAsAttribute;
import com.thoughtworks.xstream.annotations.XStreamImplicit;
import com.thoughtworks.xstream.annotations.XStreamOmitField;
+import javolution.lang.TextBuilder;
+
import java.util.ArrayList;
import java.util.List;
-import javolution.lang.TextBuilder;
/**
* representation of action tag
Modified: trunk/equanda-dm/src/main/java/org/equanda/domain/xml/Build.java
===================================================================
--- trunk/equanda-generate/src/main/java/org/equanda/domain/xml/Build.java 2008-11-24 13:57:55 UTC (rev 874)
+++ trunk/equanda-dm/src/main/java/org/equanda/domain/xml/Build.java 2008-12-01 17:55:09 UTC (rev 882)
@@ -28,9 +28,10 @@
import com.thoughtworks.xstream.annotations.XStreamAsAttribute;
import com.thoughtworks.xstream.annotations.XStreamImplicit;
import com.thoughtworks.xstream.annotations.XStreamOmitField;
+import javolution.lang.TextBuilder;
+
import java.util.ArrayList;
import java.util.List;
-import javolution.lang.TextBuilder;
/**
Modified: trunk/equanda-dm/src/main/java/org/equanda/domain/xml/CaseConversion.java
===================================================================
--- trunk/equanda-generate/src/main/java/org/equanda/domain/xml/CaseConversion.java 2008-11-24 13:57:55 UTC (rev 874)
+++ trunk/equanda-dm/src/main/java/org/equanda/domain/xml/CaseConversion.java 2008-12-01 17:55:09 UTC (rev 882)
@@ -24,9 +24,9 @@
package org.equanda.domain.xml;
-import org.equanda.domain.xml.aid.CaseConversionValue;
import com.thoughtworks.xstream.annotations.XStreamAlias;
import com.thoughtworks.xstream.annotations.XStreamAsAttribute;
+import org.equanda.domain.xml.aid.CaseConversionValue;
/**
* case conversion tag
Modified: trunk/equanda-dm/src/main/java/org/equanda/domain/xml/DataFilter.java
===================================================================
--- trunk/equanda-generate/src/main/java/org/equanda/domain/xml/DataFilter.java 2008-11-24 13:57:55 UTC (rev 874)
+++ trunk/equanda-dm/src/main/java/org/equanda/domain/xml/DataFilter.java 2008-12-01 17:55:09 UTC (rev 882)
@@ -26,8 +26,6 @@
import com.thoughtworks.xstream.annotations.XStreamAlias;
import com.thoughtworks.xstream.annotations.XStreamAsAttribute;
-import java.util.ArrayList;
-import java.util.List;
/**
* Implementation for data-filter
Modified: trunk/equanda-dm/src/main/java/org/equanda/domain/xml/Default.java
===================================================================
--- trunk/equanda-generate/src/main/java/org/equanda/domain/xml/Default.java 2008-11-24 13:57:55 UTC (rev 874)
+++ trunk/equanda-dm/src/main/java/org/equanda/domain/xml/Default.java 2008-12-01 17:55:09 UTC (rev 882)
@@ -24,10 +24,10 @@
package org.equanda.domain.xml;
+import com.thoughtworks.xstream.annotations.XStreamAlias;
+import com.thoughtworks.xstream.annotations.XStreamConverter;
import org.equanda.domain.xml.aid.DefaultConverter;
import org.equanda.domain.xml.aid.DefaultType;
-import com.thoughtworks.xstream.annotations.XStreamAlias;
-import com.thoughtworks.xstream.annotations.XStreamConverter;
/**
* default value handling
Modified: trunk/equanda-dm/src/main/java/org/equanda/domain/xml/DefaultInstance.java
===================================================================
--- trunk/equanda-generate/src/main/java/org/equanda/domain/xml/DefaultInstance.java 2008-11-24 13:57:55 UTC (rev 874)
+++ trunk/equanda-dm/src/main/java/org/equanda/domain/xml/DefaultInstance.java 2008-12-01 17:55:09 UTC (rev 882)
@@ -24,9 +24,9 @@
package org.equanda.domain.xml;
-import org.equanda.domain.xml.aid.DefaultInstanceConverter;
import com.thoughtworks.xstream.annotations.XStreamAlias;
import com.thoughtworks.xstream.annotations.XStreamConverter;
+import org.equanda.domain.xml.aid.DefaultInstanceConverter;
/**
* default-instance tag
Modified: trunk/equanda-dm/src/main/java/org/equanda/domain/xml/DomainModel.java
===================================================================
--- trunk/equanda-generate/src/main/java/org/equanda/domain/xml/DomainModel.java 2008-11-24 13:57:55 UTC (rev 874)
+++ trunk/equanda-dm/src/main/java/org/equanda/domain/xml/DomainModel.java 2008-12-01 17:55:09 UTC (rev 882)
@@ -24,15 +24,16 @@
package org.equanda.domain.xml;
+import com.thoughtworks.xstream.annotations.XStreamAlias;
+import com.thoughtworks.xstream.annotations.XStreamImplicit;
+import com.thoughtworks.xstream.annotations.XStreamOmitField;
+import org.equanda.domain.xml.aid.ListFilter;
import org.equanda.domain.xml.aid.ObjectGetter;
+import org.equanda.domain.xml.aid.TemplateUtil;
import org.equanda.domain.xml.aid.ValidationUtil;
-import org.equanda.domain.xml.aid.TemplateUtil;
-import org.equanda.domain.xml.aid.ListFilter;
import org.equanda.domain.xml.transform.HasSetLastModified;
import org.equanda.domain.xml.transform.RootTable;
-import com.thoughtworks.xstream.annotations.XStreamAlias;
-import com.thoughtworks.xstream.annotations.XStreamImplicit;
-import com.thoughtworks.xstream.annotations.XStreamOmitField;
+
import java.util.*;
Modified: trunk/equanda-dm/src/main/java/org/equanda/domain/xml/Group.java
===================================================================
--- trunk/equanda-generate/src/main/java/org/equanda/domain/xml/Group.java 2008-11-24 13:57:55 UTC (rev 874)
+++ trunk/equanda-dm/src/main/java/org/equanda/domain/xml/Group.java 2008-12-01 17:55:09 UTC (rev 882)
@@ -28,16 +28,15 @@
import com.thoughtworks.xstream.annotations.XStreamAsAttribute;
import com.thoughtworks.xstream.annotations.XStreamImplicit;
import com.thoughtworks.xstream.annotations.XStreamOmitField;
+import javolution.lang.TextBuilder;
import org.equanda.domain.xml.transform.RootTable;
import org.equanda.util.StringUtil;
import java.util.ArrayList;
+import java.util.HashMap;
import java.util.List;
import java.util.Map;
-import java.util.HashMap;
-import javolution.lang.TextBuilder;
-
/**
* representation of a "group" node.
*
Modified: trunk/equanda-dm/src/main/java/org/equanda/domain/xml/IncludeData.java
===================================================================
--- trunk/equanda-generate/src/main/java/org/equanda/domain/xml/IncludeData.java 2008-11-24 13:57:55 UTC (rev 874)
+++ trunk/equanda-dm/src/main/java/org/equanda/domain/xml/IncludeData.java 2008-12-01 17:55:09 UTC (rev 882)
@@ -26,6 +26,7 @@
import com.thoughtworks.xstream.annotations.XStreamAlias;
import com.thoughtworks.xstream.annotations.XStreamImplicit;
+
import java.util.ArrayList;
import java.util.List;
Modified: trunk/equanda-dm/src/main/java/org/equanda/domain/xml/OverwriteDefault.java
===================================================================
--- trunk/equanda-generate/src/main/java/org/equanda/domain/xml/OverwriteDefault.java 2008-11-24 13:57:55 UTC (rev 874)
+++ trunk/equanda-dm/src/main/java/org/equanda/domain/xml/OverwriteDefault.java 2008-12-01 17:55:09 UTC (rev 882)
@@ -24,10 +24,10 @@
package org.equanda.domain.xml;
-import org.equanda.domain.xml.aid.OverwriteDefaultConverter;
import com.thoughtworks.xstream.annotations.XStreamAlias;
import com.thoughtworks.xstream.annotations.XStreamConverter;
import com.thoughtworks.xstream.annotations.XStreamOmitField;
+import org.equanda.domain.xml.aid.OverwriteDefaultConverter;
/**
* overwrite-default tag
Modified: trunk/equanda-dm/src/main/java/org/equanda/domain/xml/Page.java
===================================================================
--- trunk/equanda-generate/src/main/java/org/equanda/domain/xml/Page.java 2008-11-24 13:57:55 UTC (rev 874)
+++ trunk/equanda-dm/src/main/java/org/equanda/domain/xml/Page.java 2008-12-01 17:55:09 UTC (rev 882)
@@ -28,13 +28,12 @@
import com.thoughtworks.xstream.annotations.XStreamAsAttribute;
import com.thoughtworks.xstream.annotations.XStreamImplicit;
import com.thoughtworks.xstream.annotations.XStreamOmitField;
+import javolution.lang.TextBuilder;
import org.equanda.util.StringUtil;
import java.util.ArrayList;
import java.util.List;
-import javolution.lang.TextBuilder;
-
/**
* representation of a <page> node
*
Modified: trunk/equanda-dm/src/main/java/org/equanda/domain/xml/Set.java
===================================================================
--- trunk/equanda-generate/src/main/java/org/equanda/domain/xml/Set.java 2008-11-24 13:57:55 UTC (rev 874)
+++ trunk/equanda-dm/src/main/java/org/equanda/domain/xml/Set.java 2008-12-01 17:55:09 UTC (rev 882)
@@ -24,9 +24,9 @@
package org.equanda.domain.xml;
-import org.equanda.domain.xml.aid.SetConverter;
import com.thoughtworks.xstream.annotations.XStreamAlias;
import com.thoughtworks.xstream.annotations.XStreamConverter;
+import org.equanda.domain.xml.aid.SetConverter;
/**
* representation of a <set> tag, as can be used inside <build>
Modified: trunk/equanda-dm/src/main/java/org/equanda/domain/xml/SubSelect.java
===================================================================
--- trunk/equanda-generate/src/main/java/org/equanda/domain/xml/SubSelect.java 2008-11-24 13:57:55 UTC (rev 874)
+++ trunk/equanda-dm/src/main/java/org/equanda/domain/xml/SubSelect.java 2008-12-01 17:55:09 UTC (rev 882)
@@ -24,14 +24,15 @@
package org.equanda.domain.xml;
-import org.equanda.domain.xml.transform.RootTable;
import com.thoughtworks.xstream.annotations.XStreamAlias;
import com.thoughtworks.xstream.annotations.XStreamAsAttribute;
import com.thoughtworks.xstream.annotations.XStreamImplicit;
import com.thoughtworks.xstream.annotations.XStreamOmitField;
+import javolution.lang.TextBuilder;
+import org.equanda.domain.xml.transform.RootTable;
+
import java.util.ArrayList;
import java.util.List;
-import javolution.lang.TextBuilder;
/**
* representation of a "subselect" node
Modified: trunk/equanda-dm/src/main/java/org/equanda/domain/xml/Template.java
===================================================================
--- trunk/equanda-generate/src/main/java/org/equanda/domain/xml/Template.java 2008-11-24 13:57:55 UTC (rev 874)
+++ trunk/equanda-dm/src/main/java/org/equanda/domain/xml/Template.java 2008-12-01 17:55:09 UTC (rev 882)
@@ -24,11 +24,12 @@
package org.equanda.domain.xml;
-import org.equanda.domain.xml.aid.TransformationUtil;
-import org.equanda.domain.xml.transform.RootTable;
import com.thoughtworks.xstream.annotations.XStreamAlias;
import com.thoughtworks.xstream.annotations.XStreamAsAttribute;
import com.thoughtworks.xstream.annotations.XStreamImplicit;
+import org.equanda.domain.xml.aid.TransformationUtil;
+import org.equanda.domain.xml.transform.RootTable;
+
import java.util.ArrayList;
import java.util.List;
Modified: trunk/equanda-dm/src/main/java/org/equanda/domain/xml/Type.java
===================================================================
--- trunk/equanda-generate/src/main/java/org/equanda/domain/xml/Type.java 2008-11-24 13:57:55 UTC (rev 874)
+++ trunk/equanda-dm/src/main/java/org/equanda/domain/xml/Type.java 2008-12-01 17:55:09 UTC (rev 882)
@@ -24,8 +24,9 @@
package org.equanda.domain.xml;
+import com.thoughtworks.xstream.annotations.*;
import org.equanda.domain.xml.aid.ImplicitBooleanConverter;
-import com.thoughtworks.xstream.annotations.*;
+
import java.util.List;
/**
Modified: trunk/equanda-dm/src/main/java/org/equanda/domain/xml/aid/DefaultConverter.java
===================================================================
--- trunk/equanda-generate/src/main/java/org/equanda/domain/xml/aid/DefaultConverter.java 2008-11-24 13:57:55 UTC (rev 874)
+++ trunk/equanda-dm/src/main/java/org/equanda/domain/xml/aid/DefaultConverter.java 2008-12-01 17:55:09 UTC (rev 882)
@@ -24,12 +24,12 @@
package org.equanda.domain.xml.aid;
-import org.equanda.domain.xml.Default;
import com.thoughtworks.xstream.converters.Converter;
import com.thoughtworks.xstream.converters.MarshallingContext;
import com.thoughtworks.xstream.converters.UnmarshallingContext;
import com.thoughtworks.xstream.io.HierarchicalStreamReader;
import com.thoughtworks.xstream.io.HierarchicalStreamWriter;
+import org.equanda.domain.xml.Default;
/**
* XStream converter for the "default" node
Modified: trunk/equanda-dm/src/main/java/org/equanda/domain/xml/aid/DefaultInstanceConverter.java
===================================================================
--- trunk/equanda-generate/src/main/java/org/equanda/domain/xml/aid/DefaultInstanceConverter.java 2008-11-24 13:57:55 UTC (rev 874)
+++ trunk/equanda-dm/src/main/java/org/equanda/domain/xml/aid/DefaultInstanceConverter.java 2008-12-01 17:55:09 UTC (rev 882)
@@ -24,12 +24,12 @@
package org.equanda.domain.xml.aid;
-import org.equanda.domain.xml.DefaultInstance;
import com.thoughtworks.xstream.converters.Converter;
import com.thoughtworks.xstream.converters.MarshallingContext;
import com.thoughtworks.xstream.converters.UnmarshallingContext;
import com.thoughtworks.xstream.io.HierarchicalStreamReader;
import com.thoughtworks.xstream.io.HierarchicalStreamWriter;
+import org.equanda.domain.xml.DefaultInstance;
/**
* XStream converter for the "default-instance" node
Modified: trunk/equanda-dm/src/main/java/org/equanda/domain/xml/aid/OverwriteDefaultConverter.java
===================================================================
--- trunk/equanda-generate/src/main/java/org/equanda/domain/xml/aid/OverwriteDefaultConverter.java 2008-11-24 13:57:55 UTC (rev 874)
+++ trunk/equanda-dm/src/main/java/org/equanda/domain/xml/aid/OverwriteDefaultConverter.java 2008-12-01 17:55:09 UTC (rev 882)
@@ -24,12 +24,12 @@
package org.equanda.domain.xml.aid;
-import org.equanda.domain.xml.OverwriteDefault;
import com.thoughtworks.xstream.converters.Converter;
import com.thoughtworks.xstream.converters.MarshallingContext;
import com.thoughtworks.xstream.converters.UnmarshallingContext;
import com.thoughtworks.xstream.io.HierarchicalStreamReader;
import com.thoughtworks.xstream.io.HierarchicalStreamWriter;
+import org.equanda.domain.xml.OverwriteDefault;
/**
* Converter for overwrite-default node.
Modified: trunk/equanda-dm/src/main/java/org/equanda/domain/xml/aid/SetConverter.java
===================================================================
--- trunk/equanda-generate/src/main/java/org/equanda/domain/xml/aid/SetConverter.java 2008-11-24 13:57:55 UTC (rev 874)
+++ trunk/equanda-dm/src/main/java/org/equanda/domain/xml/aid/SetConverter.java 2008-12-01 17:55:09 UTC (rev 882)
@@ -24,12 +24,12 @@
package org.equanda.domain.xml.aid;
-import org.equanda.domain.xml.Set;
import com.thoughtworks.xstream.converters.Converter;
import com.thoughtworks.xstream.converters.MarshallingContext;
import com.thoughtworks.xstream.converters.UnmarshallingContext;
import com.thoughtworks.xstream.io.HierarchicalStreamReader;
import com.thoughtworks.xstream.io.HierarchicalStreamWriter;
+import org.equanda.domain.xml.Set;
/**
* Converter for overwrite-default node.
Copied: trunk/equanda-dm/src/main/resources/equanda.dtd (from rev 874, trunk/equanda-generate/src/main/resources/equanda.dtd)
===================================================================
--- trunk/equanda-dm/src/main/resources/equanda.dtd (rev 0)
+++ trunk/equanda-dm/src/main/resources/equanda.dtd 2008-12-01 17:55:09 UTC (rev 882)
@@ -0,0 +1,623 @@
+c<!--
+ This file is part of the equanda project.
+
+ * The contents of this file are subject to the Mozilla Public License Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at http://www.mozilla.org/MPL/
+ *
+ * Code generated by applying this template can be freely used.
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis, WITHOUT WARRANTY OF
+ * ANY KIND, either express or implied. See the License for the specific language governing rights and
+ * limitations under the License.
+ *
+ * Alternatively, the contents of this file may be used under the terms of
+ * either the GNU General Public License Version 2 or later (the "GPL"), or
+ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
+ * in which case the provisions of the GPL or the LGPL are applicable instead
+ * of those above. If you wish to allow use of your version of this file only
+ * under the terms of either the GPL or the LGPL, and not to allow others to
+ * use your version of this file under the terms of the MPL, indicate your
+ * decision by deleting the provisions above and replace them with the notice
+ * and other provisions required by the GPL or the LGPL. If you do not delete
+ * the provisions above, a recipient may use your version of this file under
+ * the terms of any one of the MPL, the GPL or the LGPL.
+
+ This is the dtd for the XML description of the data model for the application
+
+ Contributor(s):
+ Joachim Van der Auwera (jo...@pr...)
+ NetRom team
+ -->
+
+<!ENTITY % integer "CDATA">
+<!-- a <integer>, for lack of more accurate description -->
+
+<!-- a equanda description can be split into multiple files, the main file always has a "equanda" root element -->
+<!ELEMENT equanda ((type)*,(table)*)>
+
+<!-- an include file normally contains the "include-data" tag as root, the contents in included -->
+<!ELEMENT include-data ((group|field|choice)*),hide?>
+
+<!--
+ Table definition. this can be internal in the XML file, or defined in (a) separate file(s).
+ When defined in separate file(s) the "file" or "dir" attribute should be used
+ "file" indicates the name of the file containing the table definition
+ "dir" indicates the directory. All *.table files will be added as table definitions
+ When this is the actual table definition, then
+ "name" is the name for this table, an error should be reported when not unique
+ "type" is a four letter string which is used as table identifier. This should be unique within the
+ tree of tables which share the same root table.
+ "expected-amount" is an info about the expected number of records for this table. This is used in GUI.
+ "category" allows combining tables in categories, useful for building a menu structure
+ The "internal" attribute when set indicates that this table is only provided to be part of the inheritance tree,
+ but no instances of this type are allowed to exist.
+-->
+<!ELEMENT table (
+ (description)?,
+ (subjectory)?,
+ (template)*,
+ (include)*,
+ (data-filter)*,
+ (default-instance)?,
+ (security-role)?,
+ (security-role-remove)?,
+ (cascade-keep)?,
+ (page)*,
+ (cloneable|not-cloneable)?,
+ (constraints)?,
+ (hide)?,
+ (select)*,
+ (build)*,
+ (action)*
+ )>
+<!ATTLIST table
+name CDATA #IMPLIED
+file CDATA #IMPLIED
+dir CDATA #IMPLIED
+type CDATA #IMPLIED
+expected-amount (small|medium|large) "large"
+category CDATA #IMPLIED
+proxy-interface CDATA #IMPLIED
+internal CDATA #IMPLIED
+>
+
+<!--
+ Template table definition.
+ This is actually a kind of inheritance. As Java only supports single inheritance, the inheritance on the
+ generated mediators is only for the first template. For the other templates all fields and constraints
+ are implicitly copied.
+ In the templates, it is possible to overwrite default values for fields.
+-->
+<!ELEMENT template (overwrite-default)*>
+<!ATTLIST template
+parent CDATA #REQUIRED>
+
+<!ELEMENT overwrite-default (#PCDATA)>
+<!ATTLIST overwrite-default
+field CDATA #REQUIRED>
+
+<!--
+ Specify that this table type is the default instance type.
+ Possibly give a class-name to indicate the default type.
+ You can set whether it is forced that all instanced are of default type.
+ There should only be one default-instance tag in a table hierarchy.
+ This only has effect for the generated pages and components.
+-->
+<!ELEMENT default-instance EMPTY>
+<!ATTLIST default-instance
+class-name CDATA #IMPLIED
+force (true|false) "false">
+
+
+<!--
+ Comma separated list of roles which can access the enclosing entity (field/table/selector/...)
+ There is a special security-role (NONE), meaning the corresponding ejb methods for that entity
+ will be unchecked.
+ For entities other than tables, if the security-role is missing, the one from the root table is
+ used.
+ -->
+<!ELEMENT security-role (#PCDATA)>
+
+
+<!--
+ Comma seperated list of roles which can access the function removeEntity.
+ If missing, this method will not be generated.
+-->
+<!ELEMENT security-role-remove (#PCDATA)>
+
+
+<!--
+ A table is always split into at least one page.
+ This is a visual separation, indicating typically the tab page which contains the field.
+-->
+<!ELEMENT page ((description)?,(field|group|include)*, (hide)?)>
+<!ATTLIST page
+name CDATA #IMPLIED>
+
+
+<!--
+ These are filters which are applied to all the selectors.
+ The name is the name of the selector, children define how the filter is applied (in this table).
+-->
+<!ELEMENT data-filter (filter-query?)>
+<!ATTLIST data-filter
+name CDATA #REQUIRED>
+
+<!--
+ Defines how the filter value can be applied in a ejbql query.The "${}" is replaced by the filter-value.
+-->
+<!ELEMENT filter-query EMPTY>
+<!ATTLIST filter-query
+from CDATA #IMPLIED
+where CDATA #REQUIRED>
+
+
+
+<!-- Allow grouping of fields. In a GUI this could be represented by a box around the items. -->
+<!ELEMENT group ((description)?,(field|group|include)*, (hide)?)>
+<!ATTLIST group
+name CDATA ""
+renderer CDATA #IMPLIED
+>
+
+<!--
+ Definition of a database field.
+ For multiple fields, you can also define the name in singular (default is the name without trailing
+ "s" if any). This name is used for add and remove methods.
+ Some of the constraints need extra explications.
+ An internal field is not available for read or write to the outside.
+ A calculated field has no DB representation and is calculated when requested. It has no setter.
+ A "auto" field has no setter, but is set by as a side-effect of some actions (much like an internal
+ field, except this there is a getter for this).
+ "length" is the maximum size of string fields, and the maximum number of digits for int and double fields in GUI.
+ "display-length" is the number of characters used in GUI for the textbox of this field. Can be different from "length".
+ of the widget for that field. Default length for strings is 50. Default length
+ for dates and timestamps is 10. Default length for int and double is 5.
+ renderer is extra info for rendering the field in GUI.
+ -->
+<!ELEMENT field ( (description)?,
+ (subjectory)?,
+ (internal)?,
+ (link-name)?,
+ (choice)*,
+ (multiple)?,
+ (owner)?,
+ (embedded)?,
+ (auto|calculated)?,
+ (other-side-multiple|other-side-single)?,
+ (use-relation-table|use-relation-field)?,
+ (cascade-delete|cascade-keep|allow-delete)?,
+ default?,
+ suggest?,
+ (cloneable|not-cloneable)?,
+ (constraints)?,
+ (display)?,(hide)?,
+ (indexed)?,
+ (case)?,
+ (is-reference)?,
+ (is-description)?,
+ (include)*
+ )>
+<!ATTLIST field
+name CDATA #REQUIRED
+singular CDATA #IMPLIED
+type CDATA "string"
+length %integer; #IMPLIED
+display-length %integer; #IMPLIED
+renderer CDATA #IMPLIED
+priority %integer; "5"
+>
+
+<!-- simple type definition, which allows certain field settings to be filled automatically -->
+<!ELEMENT type ((description)?,
+ (internal)?,
+ (choice)*,
+ (multiple)?,
+ (embedded)?,
+ default?,
+ suggest?,
+ (constraints)?,
+ (display)?,(hide)?,
+ (indexed)?,
+ (case)?
+ )>
+<!ATTLIST type
+name CDATA #REQUIRED
+type CDATA "string"
+length %integer; #IMPLIED
+display-length %integer; #IMPLIED
+renderer CDATA #IMPLIED
+>
+
+<!--
+ This node will insert the content from the referenced file (as far as applicable) into the data set.
+ The included file normally has "include-data" as root tag.
+-->
+<!ELEMENT include EMPTY>
+<!ATTLIST include
+file CDATA #REQUIRED
+required CDATA #IMPLIED
+>
+
+
+<!--
+ Not allowed for date and timestamp fields
+ Not allowed for for auto and calculated, and multiple.
+ class-name, if specified, must extend org.equanda.validation.Choices
+-->
+
+<!ELEMENT choice ((description)?,
+ (subjectory)?
+ )>
+<!ATTLIST choice
+class-name CDATA #IMPLIED
+name CDATA #IMPLIED
+value CDATA #IMPLIED>
+
+<!ELEMENT description (#PCDATA)>
+
+<!-- subjectory support information -->
+<!ELEMENT subjectory ( (uri)?,
+ (synonym)*,
+ (mapping)*
+ )>
+<!ELEMENT uri (#PCDATA)>
+<!ELEMENT synonym (#PCDATA)>
+
+<!--
+ mapping inside a subjectory element, typically used for microtransformations, import, export
+ context is required and groups the different mappings together
+ can be used to indicate a (data) container the data comes from or should be put into
+ several expressions can be used to indicate the conversion, the type (lowercase) indicates the kind of expression
+ (for exampe (xpath", "groovy", "scala")
+ A translator can be specified which maps from the external format (string) to the internal format and vice versa,
+ this should be a classname which is an instance of org.equanda.subjectory.MappingTranslator.
+-->
+<!ELEMENT mapping ( (context),
+ (container)?,
+ (expr)*,
+ (translator)?
+ )>
+<!ELEMENT context (#PCDATA)>
+<!ELEMENT container (#PCDATA)>
+<!ELEMENT expr (#PCDATA)>
+<!ATTLIST expr
+type CDATA #IMPLIED>
+
+<!ELEMENT translator (#PCDATA)>
+
+<!--
+ Not allowed for int and double fields
+-->
+<!ELEMENT multiple EMPTY>
+
+<!--
+ Indicates that this field is a reference or description field, to allow searching using "-", "\-\-" and "?" constructs.
+-->
+<!ELEMENT is-reference EMPTY>
+<!ELEMENT is-description EMPTY>
+
+
+<!--
+ Requires a bidirectional link and removes the posibility to have an unlinked
+ record on the other side of the link
+-->
+<!ELEMENT embedded EMPTY>
+
+<!--
+ Indicates the owner of the relationship.Alowed only on bidirectional links.
+ For 1-N and N-1 this is defaulted to the 1 side.
+ For 1-1 and N-N this has to be specified.
+-->
+<!ELEMENT owner EMPTY>
+
+<!--
+ Indication of multiplicity for linked fields. By default 1-N or N-1 link.
+-->
+<!ELEMENT other-side-multiple EMPTY>
+<!ELEMENT other-side-single EMPTY>
+
+<!--
+ Indication, for the 1 side of a bidirectional 1-N link, that a relation table should be created or not.
+-->
+<!ELEMENT use-relation-table EMPTY>
+<!ELEMENT use-relation-field EMPTY>
+
+<!--
+ Indication that for a link field, to delete referenced items when the parent is deleted
+ The link field must be single and bidirectional.
+-->
+<!ELEMENT cascade-delete EMPTY>
+
+<!--
+ Indication that for a link field, do not delete when there is a referenced record.
+ This works on the reverse side. When table A has a link to table B which is marked as cascade-keep,
+ then attempts to delete a record from B which is linked in A will fail.
+-->
+<!ELEMENT cascade-keep EMPTY>
+
+<!--
+ Indication for a link field, to allow delete without any checks.
+-->
+<!ELEMENT allow-delete EMPTY>
+
+<!--
+ Specify the default value for a field.
+ The default value can be calculated in the mediator (type="auto"), similar to auto variables,
+ or can be calculated using a specific class (implementation of org.equanda.validation.Default).
+-->
+<!ELEMENT default (#PCDATA)>
+<!ATTLIST default
+type (value|auto|class) "value">
+
+<!--
+ auto fields are calculated by the application and stored in the database. They have no setter.
+ not that auto fields are not cloneable by default (but this can be overwritten)
+-->
+<!ELEMENT auto EMPTY>
+
+<!-- calculated fields are calculated when requested, they are not stored in the database -->
+<!ELEMENT calculated EMPTY>
+
+<!ELEMENT cloneable EMPTY>
+<!ELEMENT not-cloneable EMPTY>
+
+<!--
+ ws-value allow replacement of a UOID with one of the referenced (string) fields for the WS interface
+ Only for link fields.
+ -->
+<!ELEMENT ws-value (#PCDATA)>
+
+<!--
+ Indicate the roles which may view this value, default is "all".
+ Other possible values are "none", or a
+ space or comma seperated list of roles
+-->
+<!ELEMENT ws-role (#PCDATA)>
+
+<!--
+ <display> marks a field for display in a list which represents the object,
+ in the data (eg xml) for the object when referenced, etc.
+
+ <hide> indicates that the field should not be displayed in the user interface
+ A hidden field gets a default ws-role of "none" (only if the "if-class" attribute is null).
+ The attribute if-class indicates a class which is used at runtime to determine if the field should be visible or not.
+
+ When both "display" and "hide" are indicated, then "hide" should have precedence.
+-->
+<!ELEMENT display EMPTY>
+<!ELEMENT hide EMPTY>
+<!ATTLIST hide
+if-class CDATA #IMPLIED>
+
+<!-- Indicates whether there should be a database index for this field -->
+<!ELEMENT indexed EMPTY>
+
+<!-- Indicates a conversion for String fields
+ Value can be one of "upper", "lower", "mixed"
+ Class-name is a class name, indicating an implementation of org.equanda.validation.CaseConverter
+ Not allowed for calculated and auto fields.
+ -->
+<!ELEMENT case EMPTY>
+<!ATTLIST case
+value (upper|lower|mixed) "mixed"
+class-name CDATA #IMPLIED>
+
+
+<!ELEMENT internal EMPTY>
+<!ELEMENT link-name (#PCDATA)>
+
+<!ELEMENT constraints (
+ (unique)?,
+ (unique-for)?,
+ (required)?,
+ (immutable)?,
+ (immutable-if|mutable-even-if|compare)*,
+ (value-when-null)?,
+ (value-when-zero)?
+ )>
+
+<!--
+ Unique fields are not allowed to be multiple, calculated, link.
+-->
+<!ELEMENT unique EMPTY>
+<!ATTLIST unique
+convert-class CDATA #IMPLIED>
+
+<!--
+ unique-for indicates that a field is unique for a specific value in another field in the same table (typically a link field).
+ Same as unique, unique-for fields are not allowed to be multiple, calculated, link.
+-->
+<!ELEMENT unique-for (#PCDATA)>
+
+<!ELEMENT immutable EMPTY>
+<!ELEMENT required EMPTY>
+
+<!ELEMENT immutable-if EMPTY>
+<!ATTLIST immutable-if
+field CDATA #REQUIRED>
+
+<!ELEMENT mutable-even-if EMPTY>
+<!ATTLIST mutable-even-if
+field CDATA #REQUIRED
+when CDATA #IMPLIED>
+
+<!--
+ Constraint where fields need to be compared. Can be defined at field or table level.
+ test can be one of: =,!=,<,>,<=,>=, except for link fields, where only "type" is allowed
+ For boolean fields, only "=" and "!=" are allowed as tests for compare.
+ Not allowed for compare for auto and calculated, and multiple.
+ If defined at table level, left can not be immutable
+-->
+<!ELEMENT compare EMPTY>
+<!ATTLIST compare
+test CDATA #REQUIRED
+value CDATA #IMPLIED
+left CDATA #IMPLIED
+right CDATA #IMPLIED>
+
+<!--
+ Replace the value which is returned by the value of another field when the value for this field is null.
+
+ Only allowed for string, timestamp and date fields, but not for multiple fields.
+
+ Path (if specified) is the name of a field linked to a table which contains the specified field. Otherwise, the field
+ should be in the current table.
+ -->
+<!ELEMENT value-when-null EMPTY>
+<!ATTLIST value-when-null
+field CDATA #REQUIRED
+path CDATA #IMPLIED
+>
+
+
+<!--
+ Replace the value which is returned by the value of another field when the value for this field is zero.
+
+ Only allowed for int and double and boolean fields, but not for multiple fields.
+
+ Path (if specified) is the name of a field linked to a table which contains the specified field. Otherwise, the field
+ should be in the current table.
+ -->
+<!ELEMENT value-when-zero EMPTY>
+<!ATTLIST value-when-zero
+field CDATA #REQUIRED
+path CDATA #IMPLIED
+>
+
+
+<!--
+ define a selector method which selects records based on the selection criteria
+ A select can either define criteria (selection tags), or define a list of subselects.
+ Subselects are a way to build brackets in the selection. The operator which has to be used can be specified.
+ The "TRY" operator is special. The subselects are tried in order.
+ When there was no result, the next subselect is executed.
+ The "ADD" operator is similar, but the result is a combination of the results of the subselects.
+ Though not specified by this model, a (sub)select should have either subselect of selection children,
+ not a combination.
+ "TRY" and "ADD" are not allowed for selects with direct selections (no subselects)
+ "order" is the name of the field, to be used in a order by clause. EQUANDA_MODIFIED is also supported.
+ The field used for order is not allowed to be one of multiple, boolean, link.
+ You may indicate "-field" to have descending order or just "field" for ascending order.
+ "limit"="yes" means the query will have a limit clause too. (Parameter for "limit" is variable).
+ "limit" and "order" are not allowed for selects of type "single".
+-->
+<!ELEMENT select ( (description)?,
+ (subselect)*,
+ (selection)*,
+ (query)?,
+ (security-role)?,
+ (hide)?,
+ (view-filter)?
+ )>
+<!ATTLIST select
+name CDATA #REQUIRED
+type (single|multiple) "multiple"
+operator (AND|OR|TRY|ADD) "AND"
+order CDATA #IMPLIED
+limit (no|yes) "no">
+
+<!ELEMENT subselect ( (description)?,
+ (subselect)*,
+ (selection)*,
+ (query)?
+ )>
+<!ATTLIST subselect
+operator (AND|OR) "AND">
+
+<!--
+ field is used for the field to select on
+ EQUANDA_MODIFIED can be used as a selection too.
+ field cannot be link or calculated.
+ table if the (root) table this field is part of, defaults to the table in which the selector is defined
+ path is the path which is used to get from the current table to the other table, defaults to the table attribute
+ name is the variable name for the parameter on the selector method (defaults to the fields name)
+ from in a possible extra part for the from clause in the EJB-QL statement
+ base is the base object which is added before the path (default "o")
+ test can be one of: =,!=,<,>,<=,>=,is null,is not null,like
+ is null, is not null are not allowed for int, boolean and double fields.
+ like is (partialy) supported. For strings only, you can use an expression "like _?%" (with wildcard), as test. For
+ the rest of types, the substring after "like" is currently neglected.
+ skip-parameter indicates whether this is a parameter to the method or not (allows you to reuse a parameter more than once)
+-->
+<!ELEMENT selection (suggest)?>
+<!ATTLIST selection
+field CDATA #REQUIRED
+table CDATA #IMPLIED
+path CDATA #IMPLIED
+name CDATA #IMPLIED
+from CDATA #IMPLIED
+base CDATA #IMPLIED
+test CDATA #IMPLIED
+skip-parameter (true|false) "false">
+
+<!--
+ Query allow you to explicitly define the EJB-QL query which needs to be used for a selector.
+ The (order and type of the) parameters are defined using the preceding selection tags.
+-->
+<!ELEMENT query (#PCDATA)>
+
+
+<!--
+ Comma separated list of filter names. The select is only visible in gui if NONE of these filters is active.
+-->
+<!ELEMENT view-filter (#PCDATA)>
+
+<!ELEMENT build ((description)?,(parameter)*,(set)*,security-role?)>
+<!ATTLIST build
+name CDATA #REQUIRED>
+
+<!ELEMENT set (#PCDATA)>
+<!ATTLIST set
+field CDATA #REQUIRED>
+
+<!--
+ An action can be defined on a table. These actions always have to be coded in the Mediator class
+ It is advised (but not enforced) that action names do not clash with field names.
+
+ An action can have parameters. The type of these has to be defined as well.
+ Parameters should be either simple types, of fully qualified
+
+ If the result for an action is "java.net.URL" then clicking on the action will jump to that page in the gui.
+-->
+<!ELEMENT action ((description)?, (parameter)*, security-role?, (hide)?)>
+<!ATTLIST action
+name CDATA #REQUIRED
+return CDATA "void"
+>
+
+<!ELEMENT parameter ((description)?, (suggest)?, (case)?)>
+<!ATTLIST parameter
+type CDATA #REQUIRED
+name CDATA #IMPLIED
+>
+
+
+<!--
+ Suggest is something used in GUI, to show a default for a parameter of an action or selector.
+ For selectors and fields, the variants with field and field-with-path are not usable (there is no "current" object,
+ so you could reference a value of a field in it).
+
+ It can be:
+ - a value (a value of the type of the parameter).
+ - a field (a field in the current table).
+ - a field and a path (path is a field in the current table, field is in the path table).
+ - a table and a field (a table name and a field in that table).
+ - a list of values (shown in gui as a choice field), sepparated by comma
+
+ Field and Path cannot be multiple
+ Field cannot be a link.
+ Path should always be a link.
+
+ Suggest is only used for parameters of type string, boolean, int, double, date, timestamp
+ -->
+<!ELEMENT suggest EMPTY>
+
+<!ATTLIST suggest
+value CDATA #IMPLIED
+field CDATA #IMPLIED
+path CDATA #IMPLIED
+table CDATA #IMPLIED
+value-list CDATA #IMPLIED
+>
Modified: trunk/equanda-dm/src/test/java/org/equanda/domain/xml/ActionTest.java
===================================================================
--- trunk/equanda-generate/src/test/java/org/equanda/domain/xml/ActionTest.java 2008-11-24 13:57:55 UTC (rev 874)
+++ trunk/equanda-dm/src/test/java/org/equanda/domain/xml/ActionTest.java 2008-12-01 17:55:09 UTC (rev 882)
@@ -25,6 +25,7 @@
package org.equanda.domain.xml;
import com.thoughtworks.xstream.XStream;
+
import java.util.List;
/**
Modified: trunk/equanda-dm/src/test/java/org/equanda/domain/xml/DefaultInstanceTest.java
===================================================================
--- trunk/equanda-generate/src/test/java/org/equanda/domain/xml/DefaultInstanceTest.java 2008-11-24 13:57:55 UTC (rev 874)
+++ trunk/equanda-dm/src/test/java/org/equanda/domain/xml/DefaultInstanceTest.java 2008-12-01 17:55:09 UTC (rev 882)
@@ -25,7 +25,6 @@
package org.equanda.domain.xml;
import com.thoughtworks.xstream.XStream;
-import org.equanda.domain.xml.aid.DefaultType;
/**
* test for data-filter class
Deleted: trunk/equanda-dm/src/test/java/org/equanda/domain/xml/ParseTableTest.java
===================================================================
--- trunk/equanda-generate/src/test/java/org/equanda/domain/xml/ParseTableTest.java 2008-11-24 13:57:55 UTC (rev 874)
+++ trunk/equanda-dm/src/test/java/org/equanda/domain/xml/ParseTableTest.java 2008-12-01 17:55:09 UTC (rev 882)
@@ -1,66 +0,0 @@
-/**
- * This file is part of the equanda project.
- *
- * The contents of this file are subject to the Mozilla Public License Version 1.1 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis, WITHOUT WARRANTY OF
- * ANY KIND, either express or implied. See the License for the specific language governing rights and
- * limitations under the License.
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- */
-
-package org.equanda.domain.xml;
-
-import org.equanda.util.IniFile;
-import org.equanda.generate.Generator;
-import junit.framework.TestCase;
-import java.util.List;
-
-/**
- * Test transformation and validation of table objects.
- *
- * @author <a href="mailto:jo...@pr...">Joachim Van der Auwera</a>
- */
-public class ParseTableTest
- extends TestCase
-{
- private IniFile ini = new IniFile();
-
- protected void setUp()
- throws Exception
- {
- ini.addValue( "config", "template", "null" );
- ini.addValue( "config", "outputdir", "." );
- }
-
- public void testInvalidTemplateParent()
- throws Exception
- {
- ini.addValue( "config", "definition", "classpath://domain/xml/table/InvalidTemplateParent.xml" );
- Generator gen = new Generator( ini, null );
- gen.generate();
- assertTrue( gen.getFailed() );
- }
-
- public void testInvalidTemplateParent2()
- throws Exception
- {
- ini.addValue( "config", "definition", "classpath://domain/xml/table/InvalidTemplateParent2.xml" );
- Generator gen = new Generator( ini, null );
- gen.generate();
- assertTrue( gen.getFailed() );
- }
-}
Modified: trunk/equanda-dm/src/test/java/org/equanda/domain/xml/ParserIncludeTest.java
===================================================================
--- trunk/equanda-generate/src/test/java/org/equanda/domain/xml/ParserIncludeTest.java 2008-11-24 13:57:55 UTC (rev 874)
+++ trunk/equanda-dm/src/test/java/org/equanda/domain/xml/ParserIncludeTest.java 2008-12-01 17:55:09 UTC (rev 882)
@@ -27,9 +27,7 @@
import junit.framework.TestCase;
import org.equanda.util.IniFile;
-import java.util.Enumeration;
import java.util.List;
-import java.util.Properties;
/**
* Test for proper handling of includes in the parser.
Modified: trunk/equanda-dm/src/test/java/org/equanda/domain/xml/ParserTransformationTest.java
===================================================================
--- trunk/equanda-generate/src/test/java/org/equanda/domain/xml/ParserTransformationTest.java 2008-11-24 13:57:55 UTC (rev 874)
+++ trunk/equanda-dm/src/test/java/org/equanda/domain/xml/ParserTransformationTest.java 2008-12-01 17:55:09 UTC (rev 882)
@@ -24,10 +24,11 @@
package org.equanda.domain.xml;
+import junit.framework.TestCase;
import org.equanda.domain.xml.transform.RootTable;
import org.equanda.util.IniFile;
+
import java.util.List;
-import junit.framework.TestCase;
/**
* Test for proper handling of includes in the parser.
Modified: trunk/equanda-dm/src/test/java/org/equanda/domain/xml/XStreamTestAdapter.java
===================================================================
--- trunk/equanda-generate/src/test/java/org/equanda/domain/xml/XStreamTestAdapter.java 2008-11-24 13:57:55 UTC (rev 874)
+++ trunk/equanda-dm/src/test/java/org/equanda/domain/xml/XStreamTestAdapter.java 2008-12-01 17:55:09 UTC (rev 882)
@@ -24,9 +24,9 @@
package org.equanda.domain.xml;
-import junit.framework.TestCase;
import com.thoughtworks.xstream.XStream;
import com.thoughtworks.xstream.annotations.Annotations;
+import junit.framework.TestCase;
import org.equanda.util.ReflectionUtil;
/**
Modified: trunk/equanda-dm/src/test/java/org/equanda/domain/xml/aid/ValidationUtilTest.java
===================================================================
--- trunk/equanda-generate/src/test/java/org/equanda/domain/xml/aid/ValidationUtilTest.java 2008-11-24 13:57:55 UTC (rev 874)
+++ trunk/equanda-dm/src/test/java/org/equanda/domain/xml/aid/ValidationUtilTest.java 2008-12-01 17:55:09 UTC (rev 882)
@@ -24,9 +24,10 @@
package org.equanda.domain.xml.aid;
-import java.util.Arrays;
import junit.framework.TestCase;
+import java.util.Arrays;
+
/**
* Verify the ValidationUtil class
*
Modified: trunk/equanda-generate/pom.xml
===================================================================
--- trunk/equanda-generate/pom.xml 2008-12-01 17:42:03 UTC (rev 881)
+++ trunk/equanda-generate/pom.xml 2008-12-01 17:55:09 UTC (rev 882)
@@ -31,6 +31,10 @@
<artifactId>equanda-util</artifactId>
</dependency>
<dependency>
+ <groupId>org.equanda</groupId>
+ <artifactId>equanda-dm</artifactId>
+ </dependency>
+ <dependency>
<groupId>org.apache.ant</groupId>
<artifactId>ant</artifactId>
<scope>provided</scope>
Deleted: trunk/equanda-generate/src/main/resources/equanda.dtd
===================================================================
--- trunk/equanda-generate/src/main/resources/equanda.dtd 2008-12-01 17:42:03 UTC (rev 881)
+++ trunk/equanda-generate/src/main/resources/equanda.dtd 2008-12-01 17:55:09 UTC (rev 882)
@@ -1,623 +0,0 @@
-c<!--
- This file is part of the equanda project.
-
- * The contents of this file are subject to the Mozilla Public License Version 1.1 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at http://www.mozilla.org/MPL/
- *
- * Code generated by applying this template can be freely used.
- *
- * Software distributed under the License is distributed on an "AS IS" basis, WITHOUT WARRANTY OF
- * ANY KIND, either express or implied. See the License for the specific language governing rights and
- * limitations under the License.
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser Gen...
[truncated message content] |
|
From: <tri...@us...> - 2008-12-01 17:42:08
|
Revision: 881
http://equanda.svn.sourceforge.net/equanda/?rev=881&view=rev
Author: triathlon98
Date: 2008-12-01 17:42:03 +0000 (Mon, 01 Dec 2008)
Log Message:
-----------
EQ-288 create equanda-dm module (splitting equanda-generate)
Modified Paths:
--------------
trunk/equanda-maven-plugin/src/main/resources/archetype-resources/src/main/dm/Address.table
trunk/equanda-maven-plugin/src/main/resources/archetype-resources/src/main/dm/Organization.table
trunk/equanda-maven-plugin/src/main/resources/archetype-resources/src/main/dm/User.table
trunk/equanda-maven-plugin/src/main/resources/archetype-resources/src/main/dm/dm.xml
Added Paths:
-----------
trunk/equanda-dm/src/test/resources/
Modified: trunk/equanda-maven-plugin/src/main/resources/archetype-resources/src/main/dm/Address.table
===================================================================
--- trunk/equanda-maven-plugin/src/main/resources/archetype-resources/src/main/dm/Address.table 2008-12-01 17:15:51 UTC (rev 880)
+++ trunk/equanda-maven-plugin/src/main/resources/archetype-resources/src/main/dm/Address.table 2008-12-01 17:42:03 UTC (rev 881)
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="ISO-8859-1"?>
-<!DOCTYPE table SYSTEM "equanda.dtd">
+<!DOCTYPE table SYSTEM "/home/joachim/apps/java/equanda/equanda-dm/src/main/resources/equanda.dtd">
<table name="Address" expected-amount="small" category="tables.Main">
Modified: trunk/equanda-maven-plugin/src/main/resources/archetype-resources/src/main/dm/Organization.table
===================================================================
--- trunk/equanda-maven-plugin/src/main/resources/archetype-resources/src/main/dm/Organization.table 2008-12-01 17:15:51 UTC (rev 880)
+++ trunk/equanda-maven-plugin/src/main/resources/archetype-resources/src/main/dm/Organization.table 2008-12-01 17:42:03 UTC (rev 881)
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="ISO-8859-1"?>
-<!DOCTYPE table SYSTEM "equanda.dtd">
+<!DOCTYPE table SYSTEM "/home/joachim/apps/java/equanda/equanda-dm/src/main/resources/equanda.dtd">
<table name="Organization" expected-amount="small" category="tables.Main">
Modified: trunk/equanda-maven-plugin/src/main/resources/archetype-resources/src/main/dm/User.table
===================================================================
--- trunk/equanda-maven-plugin/src/main/resources/archetype-resources/src/main/dm/User.table 2008-12-01 17:15:51 UTC (rev 880)
+++ trunk/equanda-maven-plugin/src/main/resources/archetype-resources/src/main/dm/User.table 2008-12-01 17:42:03 UTC (rev 881)
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="ISO-8859-1"?>
-<!DOCTYPE table SYSTEM "equanda.dtd">
+<!DOCTYPE table SYSTEM "/home/joachim/apps/java/equanda/equanda-dm/src/main/resources/equanda.dtd">
<table name="User" type="USER" category="tables.Settings">
Modified: trunk/equanda-maven-plugin/src/main/resources/archetype-resources/src/main/dm/dm.xml
===================================================================
--- trunk/equanda-maven-plugin/src/main/resources/archetype-resources/src/main/dm/dm.xml 2008-12-01 17:15:51 UTC (rev 880)
+++ trunk/equanda-maven-plugin/src/main/resources/archetype-resources/src/main/dm/dm.xml 2008-12-01 17:42:03 UTC (rev 881)
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="ISO-8859-1"?>
-<!DOCTYPE equanda SYSTEM "equanda.dtd">
+<!DOCTYPE equanda SYSTEM "/home/joachim/apps/java/equanda/equanda-dm/src/main/resources/equanda.dtd">
<equanda>
<type name="referenceString" length="30"/>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <tri...@us...> - 2008-12-01 17:15:56
|
Revision: 880
http://equanda.svn.sourceforge.net/equanda/?rev=880&view=rev
Author: triathlon98
Date: 2008-12-01 17:15:51 +0000 (Mon, 01 Dec 2008)
Log Message:
-----------
EQ-288 create equanda-dm module
Added Paths:
-----------
trunk/equanda-dm/src/test/java/
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <tri...@us...> - 2008-12-01 17:15:19
|
Revision: 879
http://equanda.svn.sourceforge.net/equanda/?rev=879&view=rev
Author: triathlon98
Date: 2008-12-01 17:15:04 +0000 (Mon, 01 Dec 2008)
Log Message:
-----------
EQ-288 create equanda-dm module
Added Paths:
-----------
trunk/equanda-dm/src/main/java/
trunk/equanda-dm/src/main/resources/
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <tri...@us...> - 2008-12-01 16:22:10
|
Revision: 878
http://equanda.svn.sourceforge.net/equanda/?rev=878&view=rev
Author: triathlon98
Date: 2008-12-01 16:22:07 +0000 (Mon, 01 Dec 2008)
Log Message:
-----------
EQ-288 create equanda-dm module
Modified Paths:
--------------
trunk/equanda-test/test-test/src/test/java/org/equanda/test/xejb/LazyInstTest.java
trunk/pom.xml
Added Paths:
-----------
trunk/equanda-dm/
trunk/equanda-dm/pom.xml
trunk/equanda-dm/src/
trunk/equanda-dm/src/main/
trunk/equanda-dm/src/test/
Added: trunk/equanda-dm/pom.xml
===================================================================
--- trunk/equanda-dm/pom.xml (rev 0)
+++ trunk/equanda-dm/pom.xml 2008-12-01 16:22:07 UTC (rev 878)
@@ -0,0 +1,37 @@
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+ <parent>
+ <groupId>org.equanda</groupId>
+ <artifactId>equanda</artifactId>
+ <version>0.9.2-SNAPSHOT</version>
+ </parent>
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>org.equanda</groupId>
+ <artifactId>equanda-dm</artifactId>
+ <packaging>jar</packaging>
+ <version>0.9.2-SNAPSHOT</version>
+ <name>equanda-dm</name>
+ <dependencies>
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.equanda</groupId>
+ <artifactId>equanda-util</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>xerces</groupId>
+ <artifactId>xercesImpl</artifactId>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>com.thoughtworks.xstream</groupId>
+ <artifactId>xstream</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>jalopy</groupId>
+ <artifactId>jalopy</artifactId>
+ </dependency>
+ </dependencies>
+</project>
Modified: trunk/equanda-test/test-test/src/test/java/org/equanda/test/xejb/LazyInstTest.java
===================================================================
--- trunk/equanda-test/test-test/src/test/java/org/equanda/test/xejb/LazyInstTest.java 2008-12-01 14:56:06 UTC (rev 877)
+++ trunk/equanda-test/test-test/src/test/java/org/equanda/test/xejb/LazyInstTest.java 2008-12-01 16:22:07 UTC (rev 878)
@@ -175,6 +175,7 @@
}
}
+ /*
public void testValues()
throws Exception
{
@@ -273,4 +274,5 @@
if ( ver != null ) assertEquals( ver, mock.get() );
assertNull( mock.get() );
}
+ */
}
Modified: trunk/pom.xml
===================================================================
--- trunk/pom.xml 2008-12-01 14:56:06 UTC (rev 877)
+++ trunk/pom.xml 2008-12-01 16:22:07 UTC (rev 878)
@@ -107,6 +107,7 @@
<module>equanda-t5gui</module>
<module>equanda-client</module>
<module>equanda-server</module>
+ <module>equanda-dm</module>
<module>equanda-generate</module>
<module>equanda-maven-plugin</module>
</modules>
@@ -277,6 +278,11 @@
</dependency>
<dependency>
<groupId>org.equanda</groupId>
+ <artifactId>equanda-dm</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.equanda</groupId>
<artifactId>equanda-generate</artifactId>
<version>${project.version}</version>
</dependency>
@@ -573,4 +579,4 @@
<staticwiki-release-version>0.9</staticwiki-release-version>
</properties>
-</project>
\ No newline at end of file
+</project>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <tri...@us...> - 2008-12-01 14:56:10
|
Revision: 877
http://equanda.svn.sourceforge.net/equanda/?rev=877&view=rev
Author: triathlon98
Date: 2008-12-01 14:56:06 +0000 (Mon, 01 Dec 2008)
Log Message:
-----------
EQ-298 assure focus is set by formtraversal and not tapestry form
Modified Paths:
--------------
trunk/equanda-maven-plugin/src/main/resources/archetype-resources/gui/src/main/resources/components/Layout.tml
trunk/equanda-tapestry5/src/site/wiki/formtraversal.wiki
Modified: trunk/equanda-maven-plugin/src/main/resources/archetype-resources/gui/src/main/resources/components/Layout.tml
===================================================================
--- trunk/equanda-maven-plugin/src/main/resources/archetype-resources/gui/src/main/resources/components/Layout.tml 2008-11-26 15:16:09 UTC (rev 876)
+++ trunk/equanda-maven-plugin/src/main/resources/archetype-resources/gui/src/main/resources/components/Layout.tml 2008-12-01 14:56:06 UTC (rev 877)
@@ -50,7 +50,7 @@
<div id="layout-info"><t:delegate to="sidebar"/></div>
<div>
- <t:form><div t:id="formSupport">
+ <t:form autofocus="false"><div t:id="formSupport">
<div id="layout-main">
<t:equanda.ValidationTrackerDelegate/>
<t:errors/>
Modified: trunk/equanda-tapestry5/src/site/wiki/formtraversal.wiki
===================================================================
--- trunk/equanda-tapestry5/src/site/wiki/formtraversal.wiki 2008-11-26 15:16:09 UTC (rev 876)
+++ trunk/equanda-tapestry5/src/site/wiki/formtraversal.wiki 2008-12-01 14:56:06 UTC (rev 877)
@@ -13,6 +13,14 @@
<span t:type="equanda/FormTraversal"/>
{code}
+To assure the first item on the focus receives focus (as controlled by this component), you need to turn off the tapestry built-in autofocus behaviour.
+This can be done by definint your form like this.
+{code}
+<t:form autofocus="false">
+ ....
+</t:form>
+{code}
+
The exact behaviour is influenced by the class on the elements.
- defaultSubmit : the first element which can be found with this class is "clicked on" when the user presses ctrl-enter.
- eqTravSkip : any element marked with this class never receives focus (skip)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <tri...@us...> - 2008-11-26 15:16:14
|
Revision: 876
http://equanda.svn.sourceforge.net/equanda/?rev=876&view=rev
Author: triathlon98
Date: 2008-11-26 15:16:09 +0000 (Wed, 26 Nov 2008)
Log Message:
-----------
EQ-285 upgrade to tapestry 5.0.17
Modified Paths:
--------------
trunk/equanda-generate/src/main/velocity/t5gui/base/EditPageBase.java.vm
trunk/equanda-generate/src/main/velocity/t5gui/components/InlinePrimitiveList.java.vm
trunk/equanda-generate/src/main/velocity/t5gui.ini
trunk/equanda-tapestry5/src/main/java/org/equanda/tapestry5/components/JSPagedLoop.java
trunk/equanda-tapestry5/src/site/wiki/validationtrackerdelegate.wiki
trunk/pom.xml
Modified: trunk/equanda-generate/src/main/velocity/t5gui/base/EditPageBase.java.vm
===================================================================
--- trunk/equanda-generate/src/main/velocity/t5gui/base/EditPageBase.java.vm 2008-11-25 15:34:07 UTC (rev 875)
+++ trunk/equanda-generate/src/main/velocity/t5gui/base/EditPageBase.java.vm 2008-11-26 15:16:09 UTC (rev 876)
@@ -277,7 +277,7 @@
}
}
- void endRender()
+ void afterRender()
{
if ( null != keepException ) environment.pop( MessageContainer.class );
}
Modified: trunk/equanda-generate/src/main/velocity/t5gui/components/InlinePrimitiveList.java.vm
===================================================================
--- trunk/equanda-generate/src/main/velocity/t5gui/components/InlinePrimitiveList.java.vm 2008-11-25 15:34:07 UTC (rev 875)
+++ trunk/equanda-generate/src/main/velocity/t5gui/components/InlinePrimitiveList.java.vm 2008-11-26 15:16:09 UTC (rev 876)
@@ -1,3 +1,7 @@
+#* @vtlmacrolibrary path="../render.vm" *#
+#* @vtlvariable name="dollar" type="java.lang.String" *#
+#* @vtlvariable name="package" type="java.lang.String" *#
+#* @vtlvariable name="engine" type="org.equanda.generate.Generator" *#
#**
* This file is part of the equanda project.
*
@@ -46,15 +50,10 @@
import org.equanda.tapestry5.components.JSPagedLoop;
import org.equanda.tapestry5.translators.StringTranslator;
import org.equanda.persistence.EquandaPersistenceException;
-import org.equanda.persistence.Uoid;
import org.equanda.validation.*;
import java.util.*;
-import ${ejbPackage}.client.${table.Name};
-import ${package}.pages.${table.Name}EquandaAll;
-import ${package}.pages.${table.Name}Edit;
-
/**
* Component for a multiple primitives
*/
Modified: trunk/equanda-generate/src/main/velocity/t5gui.ini
===================================================================
--- trunk/equanda-generate/src/main/velocity/t5gui.ini 2008-11-25 15:34:07 UTC (rev 875)
+++ trunk/equanda-generate/src/main/velocity/t5gui.ini 2008-11-26 15:16:09 UTC (rev 876)
@@ -23,6 +23,12 @@
output8=${outputDir}${packageDir}pages/AuthAndConfigRoles.tml
template8=pages/SelectAuthConfig.tml.vm
+output9=${outputDir}${packageDir}components/InlinePrimitiveList.java
+template9=components/InlinePrimitiveList.java.vm
+output10=${outputDir}${packageDir}components/InlinePrimitiveList.tml
+template10=components/InlinePrimitiveList.tml.vm
+
+
[root-table]
// components for each table
@@ -67,32 +73,27 @@
output16=${outputDir}${packageDir}components/${_table}/InlineLinkList.tml
template16=components/InlineLinkList.tml.vm
-output17=${outputDir}${packageDir}components/InlinePrimitiveList.java
-template17=components/InlinePrimitiveList.java.vm
-output18=${outputDir}${packageDir}components/InlinePrimitiveList.tml
-template18=components/InlinePrimitiveList.tml.vm
+output17=${outputDir}${packageDir}components/${_table}/Display.java
+template17=components/Display.java.vm
+output18=${outputDir}${packageDir}components/${_table}/Display.tml
+template18=components/Display.tml.vm
-output19=${outputDir}${packageDir}components/${_table}/Display.java
-template19=components/Display.java.vm
-output20=${outputDir}${packageDir}components/${_table}/Display.tml
-template20=components/Display.tml.vm
-
// edit page
-output21=${outputDir}${packageDir}pages/${table}Edit.java
-template21=pages/Edit.java.vm
-output22=${outputDir}${packageDir}pages/${table}Edit.tml
-template22=pages/Edit.tml.vm
+output19=${outputDir}${packageDir}pages/${table}Edit.java
+template19=pages/Edit.java.vm
+output20=${outputDir}${packageDir}pages/${table}Edit.tml
+template20=pages/Edit.tml.vm
+output21=${outputDir}${packageDir}pages/${_table}/AuthAndConfig.java
+template21=pages/TableAuthConfig.java.vm
+output22=${outputDir}${packageDir}pages/${_table}/AuthAndConfig.tml
+template22=pages/TableAuthConfig.tml.vm
+
output23=${outputDir}${packageDir}base/${_table}/OneObjectComponentBase.java
template23=base/OneObjectComponentBase.java.vm
-output24=${outputDir}${packageDir}pages/${_table}/AuthAndConfig.java
-template24=pages/TableAuthConfig.java.vm
-output25=${outputDir}${packageDir}pages/${_table}/AuthAndConfig.tml
-template25=pages/TableAuthConfig.tml.vm
-
[action-not-hidden]
// action pages
Modified: trunk/equanda-tapestry5/src/main/java/org/equanda/tapestry5/components/JSPagedLoop.java
===================================================================
--- trunk/equanda-tapestry5/src/main/java/org/equanda/tapestry5/components/JSPagedLoop.java 2008-11-25 15:34:07 UTC (rev 875)
+++ trunk/equanda-tapestry5/src/main/java/org/equanda/tapestry5/components/JSPagedLoop.java 2008-11-26 15:16:09 UTC (rev 876)
@@ -100,7 +100,7 @@
private int rowsPerPage;
@Persist
- private int currentPage = 1;
+ private int currentPage;
// @Persist
private int addedRowCount;
@@ -322,6 +322,7 @@
@SetupRender
Object setupRender()
{
+ currentPage = 1;
rowIds = new ArrayList<String>();
assignedClientId = renderSupport.allocateClientId( clientId );
Modified: trunk/equanda-tapestry5/src/site/wiki/validationtrackerdelegate.wiki
===================================================================
--- trunk/equanda-tapestry5/src/site/wiki/validationtrackerdelegate.wiki 2008-11-25 15:34:07 UTC (rev 875)
+++ trunk/equanda-tapestry5/src/site/wiki/validationtrackerdelegate.wiki 2008-11-26 15:16:09 UTC (rev 876)
@@ -37,7 +37,7 @@
if ( null != keepMessage ) environment.push( MessageContainer.class, new MessageContainer( keepMessage ) );
}
-void endRender()
+void afterRender()
{
if ( null != keepMessage ) environment.pop( MessageContainer.class );
}
Modified: trunk/pom.xml
===================================================================
--- trunk/pom.xml 2008-11-25 15:34:07 UTC (rev 875)
+++ trunk/pom.xml 2008-11-26 15:16:09 UTC (rev 876)
@@ -568,7 +568,7 @@
</profiles>
<properties>
- <tapestry-release-version>5.0.16</tapestry-release-version>
+ <tapestry-release-version>5.0.17</tapestry-release-version>
<tapestry-commons-version>0.5.15</tapestry-commons-version>
<staticwiki-release-version>0.9</staticwiki-release-version>
</properties>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <tri...@us...> - 2008-11-25 15:34:14
|
Revision: 875
http://equanda.svn.sourceforge.net/equanda/?rev=875&view=rev
Author: triathlon98
Date: 2008-11-25 15:34:07 +0000 (Tue, 25 Nov 2008)
Log Message:
-----------
EQ-284 assure tab titles are translated
Modified Paths:
--------------
trunk/equanda-client/src/main/resources/org/equanda/translations/translations-common.txt
trunk/equanda-generate/src/main/velocity/t5gui/edit-tml/pages.tml.vm
Modified: trunk/equanda-client/src/main/resources/org/equanda/translations/translations-common.txt
===================================================================
--- trunk/equanda-client/src/main/resources/org/equanda/translations/translations-common.txt 2008-11-24 13:57:55 UTC (rev 874)
+++ trunk/equanda-client/src/main/resources/org/equanda/translations/translations-common.txt 2008-11-25 15:34:07 UTC (rev 875)
@@ -884,6 +884,8 @@
.label.nl Alle gegevens zichtbaar in selectie
.label.ro Totul vizibil pt selectie
.label.fr Tout visible dans la sélection
+.key page.Metadata/equanda-fixed
+.label.en Metadata
.key title/AdminBorderConfig
.label.en Configure Border
.label.nl Configureer rand
Modified: trunk/equanda-generate/src/main/velocity/t5gui/edit-tml/pages.tml.vm
===================================================================
--- trunk/equanda-generate/src/main/velocity/t5gui/edit-tml/pages.tml.vm 2008-11-24 13:57:55 UTC (rev 874)
+++ trunk/equanda-generate/src/main/velocity/t5gui/edit-tml/pages.tml.vm 2008-11-25 15:34:07 UTC (rev 875)
@@ -9,7 +9,7 @@
#if( !$page.isHidden() )
#if( $page.Name != "ALL" )
<t:parameter name="title$pageindex">
- $page.Name
+ ${dollar}{equanda-message:page.${table.Name}.${page.Name}}
</t:parameter>
#set( $pageindex = $pageindex + 1 )
#end
@@ -22,7 +22,7 @@
#render( "page.${table.Name}.${page.Name}" "page" "" "" )
#end
- <t:parameter name="title$pageindex">Metadata</t:parameter>
+ <t:parameter name="title$pageindex">${dollar}{equanda-message:page.Metadata}</t:parameter>
<t:parameter name="content$pageindex">
<div class="eqFld ${table.Name}-md">
<t:label for="id"/>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <tri...@us...> - 2008-11-24 13:57:58
|
Revision: 874
http://equanda.svn.sourceforge.net/equanda/?rev=874&view=rev
Author: triathlon98
Date: 2008-11-24 13:57:55 +0000 (Mon, 24 Nov 2008)
Log Message:
-----------
EQ-283 required handling
Modified Paths:
--------------
trunk/equanda-generate/src/main/velocity/t5gui/edit-tml/double.tml.vm
trunk/equanda-generate/src/main/velocity/t5gui/edit-tml/int.tml.vm
trunk/equanda-generate/src/main/velocity/t5gui/edit-tml/string.tml.vm
trunk/equanda-maven-plugin/src/main/resources/archetype-resources/gui/src/main/resources/components/Layout.tml
trunk/equanda-tapestry5/src/site/wiki/formtraversal.wiki
Modified: trunk/equanda-generate/src/main/velocity/t5gui/edit-tml/double.tml.vm
===================================================================
--- trunk/equanda-generate/src/main/velocity/t5gui/edit-tml/double.tml.vm 2008-11-24 11:22:38 UTC (rev 873)
+++ trunk/equanda-generate/src/main/velocity/t5gui/edit-tml/double.tml.vm 2008-11-24 13:57:55 UTC (rev 874)
@@ -1 +1 @@
-<input t:type="TextField" t:value="value.${field.Name}" maxlength="$field.Length" size="$field.DisplayLength" #if( $field.isCalculated() || $field.isAuto() )disabled="true"#end/>
\ No newline at end of file
+<input t:type="TextField" t:value="value.${field.Name}" maxlength="$field.Length" size="$field.DisplayLength" #if( $field.isCalculated() || $field.isAuto() )disabled="true"#end #if( $field.isRequired() )t:validate="required"#end />
\ No newline at end of file
Modified: trunk/equanda-generate/src/main/velocity/t5gui/edit-tml/int.tml.vm
===================================================================
--- trunk/equanda-generate/src/main/velocity/t5gui/edit-tml/int.tml.vm 2008-11-24 11:22:38 UTC (rev 873)
+++ trunk/equanda-generate/src/main/velocity/t5gui/edit-tml/int.tml.vm 2008-11-24 13:57:55 UTC (rev 874)
@@ -1 +1 @@
-<input t:type="TextField" t:value="value.${field.Name}" maxlength="$field.Length" size="$field.DisplayLength" #if( $field.isCalculated() || $field.isAuto() )disabled="true"#end/>
\ No newline at end of file
+<input t:type="TextField" t:value="value.${field.Name}" maxlength="$field.Length" size="$field.DisplayLength" #if( $field.isCalculated() || $field.isAuto() )disabled="true"#end #if( $field.isRequired() )t:validate="required"#end />
\ No newline at end of file
Modified: trunk/equanda-generate/src/main/velocity/t5gui/edit-tml/string.tml.vm
===================================================================
--- trunk/equanda-generate/src/main/velocity/t5gui/edit-tml/string.tml.vm 2008-11-24 11:22:38 UTC (rev 873)
+++ trunk/equanda-generate/src/main/velocity/t5gui/edit-tml/string.tml.vm 2008-11-24 13:57:55 UTC (rev 874)
@@ -1,5 +1,5 @@
#if( $field.isMultiple() )
<input t:type="InlinePrimitiveList" t:translator="prop:stringTranslator" t:value="value.${field.VarName}" embedded="${field.isEmbedded()}" #if( $field.isCalculated() || $field.isAuto() )disabled="true"#end #if( $field.isCaseConversionClass() ) caseConversionClass="$field.caseConversion.className" #end #if( $field.isCaseConversionUpper() ) caseConversionUpper="true" #elseif( $field.isCaseConversionLower() ) caseConversionLower="true" #end/>
#else
-<input t:type="TextField" maxlength="$field.Length" size="$field.DisplayLength" #if( $field.isCaseConversionClass() ) t:value="${field.Name}Value" #else t:value="value.${field.Name}" #end #if( $field.isCalculated() || $field.isAuto() )disabled="true"#end #if( $field.hasCaseConversion() )onkeyup="eqCC(this, #if( $field.isCaseConversionUpper()) 2 #elseif( $field.isCaseConversionLower() ) 1 #else 0 #end);"#end/>
+<input t:type="TextField" maxlength="$field.Length" size="$field.DisplayLength" #if( $field.isCaseConversionClass() ) t:value="${field.Name}Value" #else t:value="value.${field.Name}" #end #if( $field.isCalculated() || $field.isAuto() )disabled="true"#end #if( $field.hasCaseConversion() )onkeyup="eqCC(this, #if( $field.isCaseConversionUpper()) 2 #elseif( $field.isCaseConversionLower() ) 1 #else 0 #end);"#end #if( $field.isRequired() )t:validate="required"#end />
#end
\ No newline at end of file
Modified: trunk/equanda-maven-plugin/src/main/resources/archetype-resources/gui/src/main/resources/components/Layout.tml
===================================================================
--- trunk/equanda-maven-plugin/src/main/resources/archetype-resources/gui/src/main/resources/components/Layout.tml 2008-11-24 11:22:38 UTC (rev 873)
+++ trunk/equanda-maven-plugin/src/main/resources/archetype-resources/gui/src/main/resources/components/Layout.tml 2008-11-24 13:57:55 UTC (rev 874)
@@ -9,7 +9,6 @@
<body>
-<span t:type="equanda/FormTraversal"/>
<div id="layout-menu">
<span t:type="equanda/Accordion" t:id="accordion">
<t:parameter name="title1">Menu</t:parameter>
@@ -60,5 +59,7 @@
<div id="layout-buttons"><t:delegate to="buttons"/></div>
</div></t:form>
</div>
+
+<span t:type="equanda/FormTraversal"/>
</body>
</html>
Modified: trunk/equanda-tapestry5/src/site/wiki/formtraversal.wiki
===================================================================
--- trunk/equanda-tapestry5/src/site/wiki/formtraversal.wiki 2008-11-24 11:22:38 UTC (rev 873)
+++ trunk/equanda-tapestry5/src/site/wiki/formtraversal.wiki 2008-11-24 13:57:55 UTC (rev 874)
@@ -7,6 +7,7 @@
- allow page submit by pressing ctrl-enter
To use it, include the following snippet in your template (probably the layout).
+It is recommended to include this is late as possible in your layout to assure the focus is not changed by script code which is executed after this.
{code}
<span t:type="equanda/FormTraversal"/>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <tri...@us...> - 2008-11-24 11:22:41
|
Revision: 873
http://equanda.svn.sourceforge.net/equanda/?rev=873&view=rev
Author: triathlon98
Date: 2008-11-24 11:22:38 +0000 (Mon, 24 Nov 2008)
Log Message:
-----------
don't use t5components/Hidden, it does not function in tapestry 5.0.16/17
Modified Paths:
--------------
trunk/equanda-generate/src/main/velocity/t5gui/components/InlineLinkList.java.vm
trunk/equanda-generate/src/main/velocity/t5gui/components/InlineLinkList.tml.vm
trunk/equanda-generate/src/main/velocity/t5gui/components/InlinePrimitiveList.java.vm
trunk/equanda-generate/src/main/velocity/t5gui/components/InlinePrimitiveList.tml.vm
Modified: trunk/equanda-generate/src/main/velocity/t5gui/components/InlineLinkList.java.vm
===================================================================
--- trunk/equanda-generate/src/main/velocity/t5gui/components/InlineLinkList.java.vm 2008-11-23 20:29:00 UTC (rev 872)
+++ trunk/equanda-generate/src/main/velocity/t5gui/components/InlineLinkList.java.vm 2008-11-24 11:22:38 UTC (rev 873)
@@ -45,10 +45,10 @@
import org.apache.tapestry5.*;
import org.apache.tapestry5.annotations.*;
import org.apache.tapestry5.corelib.base.AbstractField;
+import org.apache.tapestry5.corelib.components.TextField;
import org.apache.tapestry5.ioc.annotations.Inject;
import org.apache.tapestry5.ioc.services.SymbolSource;
import org.apache.tapestry5.services.*;
-import org.apache.tapestry.commons.components.Hidden;
import org.equanda.tapestry5.base.ObjectCreatorDelegate;
import org.equanda.tapestry5.translators.StringTranslator;
import org.equanda.persistence.EquandaPersistenceException;
@@ -76,7 +76,7 @@
//@Component( id = "hiddenDeletedRows", parameters = { "value=deletedRows", "translate=prop:stringTranslator" } )
@Component( id = "hiddenDeletedRows", parameters = { "value=deletedRows" } )
- private Hidden hiddenDeletedRows;
+ private TextField hiddenDeletedRows;
@Environmental
private FormSupport formSupport;
Modified: trunk/equanda-generate/src/main/velocity/t5gui/components/InlineLinkList.tml.vm
===================================================================
--- trunk/equanda-generate/src/main/velocity/t5gui/components/InlineLinkList.tml.vm 2008-11-23 20:29:00 UTC (rev 872)
+++ trunk/equanda-generate/src/main/velocity/t5gui/components/InlineLinkList.tml.vm 2008-11-24 11:22:38 UTC (rev 873)
@@ -5,7 +5,7 @@
#* @vtlvariable name="field" type="org.equanda.domain.xml.Field" *#
<div class="eqInl" xmlns:t="http://tapestry.apache.org/schema/tapestry_5_0_0.xsd">
- <input t:type="t5components/Hidden" t:id="hiddenDeletedRows" />
+ <input t:type="TextField" t:id="hiddenDeletedRows" class="nodisplay" />
<!-- @todo should be pagedloop but this is too slow, EQ-270
<div class="eqInlR" t:id="pagedLoop" t:type="equanda/JSPagedLoop" source="value" value="current" volatile="true" index="index" rowsPerPage="5" additionalRowCount="prop:additionalRowCount" addRowLinkTitle="${dollar}{equanda-message:Add}" objectCreatorDelegate="prop:this">
<t:parameter name="empty"></t:parameter>
Modified: trunk/equanda-generate/src/main/velocity/t5gui/components/InlinePrimitiveList.java.vm
===================================================================
--- trunk/equanda-generate/src/main/velocity/t5gui/components/InlinePrimitiveList.java.vm 2008-11-23 20:29:00 UTC (rev 872)
+++ trunk/equanda-generate/src/main/velocity/t5gui/components/InlinePrimitiveList.java.vm 2008-11-24 11:22:38 UTC (rev 873)
@@ -38,10 +38,10 @@
import org.apache.tapestry5.*;
import org.apache.tapestry5.annotations.*;
import org.apache.tapestry5.corelib.base.AbstractField;
+import org.apache.tapestry5.corelib.components.TextField;
import org.apache.tapestry5.ioc.annotations.Inject;
import org.apache.tapestry5.ioc.services.SymbolSource;
import org.apache.tapestry5.services.*;
-import org.apache.tapestry.commons.components.Hidden;
import org.equanda.tapestry5.base.ObjectCreatorDelegate;
import org.equanda.tapestry5.components.JSPagedLoop;
import org.equanda.tapestry5.translators.StringTranslator;
@@ -103,7 +103,7 @@
//@Component( id = "hiddenDeletedRows", parameters = { "value=deletedRows", "translate=prop:stringTranslator" } )
@Component( id = "hiddenDeletedRows", parameters = { "value=deletedRows" } )
- private Hidden hiddenDeletedRows;
+ private TextField hiddenDeletedRows;
@Component( id = "pagedLoop" )
private JSPagedLoop pagedLoop;
Modified: trunk/equanda-generate/src/main/velocity/t5gui/components/InlinePrimitiveList.tml.vm
===================================================================
--- trunk/equanda-generate/src/main/velocity/t5gui/components/InlinePrimitiveList.tml.vm 2008-11-23 20:29:00 UTC (rev 872)
+++ trunk/equanda-generate/src/main/velocity/t5gui/components/InlinePrimitiveList.tml.vm 2008-11-24 11:22:38 UTC (rev 873)
@@ -5,7 +5,7 @@
#* @vtlvariable name="field" type="org.equanda.domain.xml.Field" *#
<div class="eqInlP" xmlns:t="http://tapestry.apache.org/schema/tapestry_5_0_0.xsd">
- <input t:type="t5components/Hidden" t:id="hiddenDeletedRows" />
+ <input t:type="TextField" t:id="hiddenDeletedRows" class="nodisplay" />
<!-- @todo should be pagedloop but this is too slow, EQ-270
<div class="eqInlPR" t:id="pagedLoop" t:type="equanda/JSPagedLoop" source="value" value="current" volatile="true" index="index" rowsPerPage="5" additionalRowCount="prop:additionalRowCount" addRowLinkTitle="${dollar}{equanda-message:Add}" objectCreatorDelegate="prop:this">
<t:parameter name="empty"></t:parameter>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <tri...@us...> - 2008-11-23 20:29:12
|
Revision: 872
http://equanda.svn.sourceforge.net/equanda/?rev=872&view=rev
Author: triathlon98
Date: 2008-11-23 20:29:00 +0000 (Sun, 23 Nov 2008)
Log Message:
-----------
fix integration tests
Modified Paths:
--------------
trunk/equanda-generate/src/main/java/org/equanda/domain/xml/AbstractSelect.java
trunk/equanda-generate/src/main/velocity/ejb3/ObjectSelectorBean.java.vm
trunk/equanda-test/test-t5-gui/pom.xml
Modified: trunk/equanda-generate/src/main/java/org/equanda/domain/xml/AbstractSelect.java
===================================================================
--- trunk/equanda-generate/src/main/java/org/equanda/domain/xml/AbstractSelect.java 2008-11-21 13:05:56 UTC (rev 871)
+++ trunk/equanda-generate/src/main/java/org/equanda/domain/xml/AbstractSelect.java 2008-11-23 20:29:00 UTC (rev 872)
@@ -156,7 +156,6 @@
String fieldIdType = fieldType;
String varName = selection.getVarName();
String varListName = varName;
- String varListIdName = varName;
if ( selection.getField().isLink() )
{
hasTableParameters = true;
@@ -193,7 +192,7 @@
parametersListSingleSelect.append( "_f" );
parametersList.append( varListName );
- parametersIdList.append( varListIdName );
+ parametersIdList.append( varListName );
parametersListConverted.append( varName ).append( "Converted" );
parametersListWithTypes.append( varName );
parametersListWithIdTypes.append( varName );
@@ -202,7 +201,7 @@
parametersListSingleSelect.append( varName );
parametersListNoLimit.append( "getPageState()." );
parametersListNoLimit.append( varListName );
- parametersIdListNoLimit.append( varListIdName );
+ parametersIdListNoLimit.append( varListName );
parametersListWithTypesNoLimit.append( varName );
parametersListWithIdTypesNoLimit.append( varName );
sep = ", ";
@@ -270,6 +269,7 @@
if ( select.hasLimit() )
{
parametersListWithTypes.append( sep ).append( "int equandaLimit" );
+ parametersListWithIdTypes.append( sep ).append( "int equandaLimit" );
parametersList.append( sep ).append( "equandaLimit" );
parametersIdList.append( sep ).append( "equandaLimit" );
parametersListConverted.append( sep ).append( "equandaLimit" );
Modified: trunk/equanda-generate/src/main/velocity/ejb3/ObjectSelectorBean.java.vm
===================================================================
--- trunk/equanda-generate/src/main/velocity/ejb3/ObjectSelectorBean.java.vm 2008-11-21 13:05:56 UTC (rev 871)
+++ trunk/equanda-generate/src/main/velocity/ejb3/ObjectSelectorBean.java.vm 2008-11-23 20:29:00 UTC (rev 872)
@@ -333,7 +333,7 @@
throws EquandaPersistenceException
{
#if( $select.isSingle() )
- return getEJB( equandaSelect${select.Name}( $select.ParametersNoIdList ) );
+ return getEJB( equandaSelect${select.Name}( $select.ParametersList ) );
#else ## is multiple
return convertListEJB( equandaSelect${select.Name}( $select.ParametersIdList ) );
#end
Modified: trunk/equanda-test/test-t5-gui/pom.xml
===================================================================
--- trunk/equanda-test/test-t5-gui/pom.xml 2008-11-21 13:05:56 UTC (rev 871)
+++ trunk/equanda-test/test-t5-gui/pom.xml 2008-11-23 20:29:00 UTC (rev 872)
@@ -138,5 +138,11 @@
<version>3.7.10</version>
<scope>provided</scope>
</dependency>
+ <dependency>
+ <groupId>geronimo-spec</groupId>
+ <artifactId>geronimo-spec-jta</artifactId>
+ <version>1.0-M1</version>
+ <scope>provided</scope>
+ </dependency>
</dependencies>
</project>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <tri...@us...> - 2008-11-21 13:06:03
|
Revision: 871
http://equanda.svn.sourceforge.net/equanda/?rev=871&view=rev
Author: triathlon98
Date: 2008-11-21 13:05:56 +0000 (Fri, 21 Nov 2008)
Log Message:
-----------
EQ-272, EQ-282 changes in select parameter handling, type specific and correct label
Modified Paths:
--------------
trunk/equanda-generate/src/main/java/org/equanda/domain/xml/AbstractSelect.java
trunk/equanda-generate/src/main/java/org/equanda/domain/xml/Selection.java
trunk/equanda-generate/src/main/velocity/t5gui/components/Edit.java.vm
trunk/equanda-generate/src/main/velocity/t5gui/edit-tml/date.tml.vm
trunk/equanda-generate/src/main/velocity/t5gui/edit-tml/timestamp.tml.vm
trunk/equanda-generate/src/main/velocity/t5gui/pages/Select.java.vm
trunk/equanda-generate/src/main/velocity/t5gui/pages/Select.tml.vm
Added Paths:
-----------
trunk/equanda-generate/src/main/velocity/t5gui/components/choicemodel.java.vm
Modified: trunk/equanda-generate/src/main/java/org/equanda/domain/xml/AbstractSelect.java
===================================================================
--- trunk/equanda-generate/src/main/java/org/equanda/domain/xml/AbstractSelect.java 2008-11-19 09:23:42 UTC (rev 870)
+++ trunk/equanda-generate/src/main/java/org/equanda/domain/xml/AbstractSelect.java 2008-11-21 13:05:56 UTC (rev 871)
@@ -200,6 +200,7 @@
parametersListWithTypesSingleSelect.append( varName );
parametersListWithIdTypesSingleSelect.append( varName );
parametersListSingleSelect.append( varName );
+ parametersListNoLimit.append( "getPageState()." );
parametersListNoLimit.append( varListName );
parametersIdListNoLimit.append( varListIdName );
parametersListWithTypesNoLimit.append( varName );
Modified: trunk/equanda-generate/src/main/java/org/equanda/domain/xml/Selection.java
===================================================================
--- trunk/equanda-generate/src/main/java/org/equanda/domain/xml/Selection.java 2008-11-19 09:23:42 UTC (rev 870)
+++ trunk/equanda-generate/src/main/java/org/equanda/domain/xml/Selection.java 2008-11-21 13:05:56 UTC (rev 871)
@@ -179,7 +179,7 @@
public String getCamelName()
{
- if ( null != name && name.length() > 0 && !Character.isUpperCase( name.charAt( 0 ) ) )
+ if ( null != getName() && name.length() > 0 && !Character.isUpperCase( name.charAt( 0 ) ) )
{
return Character.toUpperCase( name.charAt( 0 ) ) + name.substring( 1 );
}
Modified: trunk/equanda-generate/src/main/velocity/t5gui/components/Edit.java.vm
===================================================================
--- trunk/equanda-generate/src/main/velocity/t5gui/components/Edit.java.vm 2008-11-19 09:23:42 UTC (rev 870)
+++ trunk/equanda-generate/src/main/velocity/t5gui/components/Edit.java.vm 2008-11-21 13:05:56 UTC (rev 871)
@@ -197,79 +197,7 @@
}
#foreach( $field in $table.ChoiceFields )
- public SelectModel get${field.Name}ChoiceModel()
- {
- List<OptionModel> list = new ArrayList<OptionModel>();
-#foreach( $choice in $field.choices )
-#if( $choice.isFromClass() )
-#if( $field.isInt() )
- {
- EnumerableChoice choice = new ${choice.className}();
- if ( choice.getAllowedIntValues() != null && choice.getAllowedIntNames() != null
- && choice.getAllowedIntValues().size() == choice.getAllowedIntNames().size() )
- {
- Iterator<Integer> iteratorValues = choice.getAllowedIntValues().iterator();
- for ( String name : choice.getAllowedIntNames() )
- {
- list.add( new EquandaOptionModel( name, iteratorValues.next() ) );
- }
- }
- }
-#elseif( $field.isBoolean() )
- {
- EnumerableChoice choice = new ${choice.className}();
- if ( choice.getAllowedBooleanValues() != null && choice.getAllowedBooleanNames() != null
- && choice.getAllowedBooleanValues().size() == choice.getAllowedBooleanNames().size() )
- {
- Iterator<Boolean> iteratorValues = choice.getAllowedBooleanValues().iterator();
- for ( String name : choice.getAllowedBooleanNames() )
- {
- list.add( new EquandaOptionModel( name, iteratorValues.next() ) );
- }
- }
- }
-#elseif( $field.isDouble() )
- {
- EnumerableChoice choice = new ${choice.className}();
- if ( choice.getAllowedDoubleValues() != null && choice.getAllowedDoubleNames() != null
- && choice.getAllowedDoubleValues().size() == choice.getAllowedDoubleNames().size() )
- {
- Iterator<Double> iteratorValues = choice.getAllowedDoubleValues().iterator();
- for ( String name : choice.getAllowedDoubleNames() )
- {
- list.add( new EquandaOptionModel( name, iteratorValues.next() ) );
- }
- }
- }
-#else
- {
- EnumerableChoice choice = new ${choice.className}();
- if ( choice.getAllowedStringValues() != null && choice.getAllowedStringNames() != null
- && choice.getAllowedStringValues().size() == choice.getAllowedStringNames().size() )
- {
- Iterator<String> iteratorValues = choice.getAllowedStringValues().iterator();
- for ( String name : choice.getAllowedStringNames() )
- {
- String value = iteratorValues.next();
- if ( choice instanceof ChoiceTranslation )
- {
- list.add( new EquandaOptionModel( ( ( ChoiceTranslation ) choice ).getTranslation( name ), value ) );
- }
- else
- {
- list.add( new EquandaOptionModel( name, value ) );
- }
- }
- }
- }
-#end## end of field type check
-#else## not from class
- list.add( new EquandaOptionModel( messages.get( "choice.${table.Name}.${field.Name}.$choice.Name" ),
- #if( $field.isInt() )new Integer( $choice.value )#elseif( $field.isBoolean() )new Boolean( $choice.value )#elseif( $field.isDouble() )new Double( $choice.value )#else"$choice.value"#end ) );
-#end
-#end## end of choices foreach
- return new EquandaSelectModel( null, list );
- }
+#parse( "components/choicemodel.java.vm" )
#end## end of fields foreach
#foreach( $field in $table.CaseConversionClassFields )
Added: trunk/equanda-generate/src/main/velocity/t5gui/components/choicemodel.java.vm
===================================================================
--- trunk/equanda-generate/src/main/velocity/t5gui/components/choicemodel.java.vm (rev 0)
+++ trunk/equanda-generate/src/main/velocity/t5gui/components/choicemodel.java.vm 2008-11-21 13:05:56 UTC (rev 871)
@@ -0,0 +1,75 @@
+#** @vtlvariable name="dollar" type="java.lang.String" *#
+#** @vtlvariable name="field" type="org.equanda.domain.xml.Field" *#
+public SelectModel get${field.Name}ChoiceModel()
+{
+ List<OptionModel> list = new ArrayList<OptionModel>();
+#foreach( $choice in $field.choices )
+#if( $choice.isFromClass() )
+#if( $field.isInt() )
+ {
+ EnumerableChoice choice = new ${choice.className}();
+ if ( choice.getAllowedIntValues() != null && choice.getAllowedIntNames() != null
+ && choice.getAllowedIntValues().size() == choice.getAllowedIntNames().size() )
+ {
+ Iterator<Integer> iteratorValues = choice.getAllowedIntValues().iterator();
+ for ( String name : choice.getAllowedIntNames() )
+ {
+ list.add( new EquandaOptionModel( name, iteratorValues.next() ) );
+ }
+ }
+ }
+#elseif( $field.isBoolean() )
+ {
+ EnumerableChoice choice = new ${choice.className}();
+ if ( choice.getAllowedBooleanValues() != null && choice.getAllowedBooleanNames() != null
+ && choice.getAllowedBooleanValues().size() == choice.getAllowedBooleanNames().size() )
+ {
+ Iterator<Boolean> iteratorValues = choice.getAllowedBooleanValues().iterator();
+ for ( String name : choice.getAllowedBooleanNames() )
+ {
+ list.add( new EquandaOptionModel( name, iteratorValues.next() ) );
+ }
+ }
+ }
+#elseif( $field.isDouble() )
+ {
+ EnumerableChoice choice = new ${choice.className}();
+ if ( choice.getAllowedDoubleValues() != null && choice.getAllowedDoubleNames() != null
+ && choice.getAllowedDoubleValues().size() == choice.getAllowedDoubleNames().size() )
+ {
+ Iterator<Double> iteratorValues = choice.getAllowedDoubleValues().iterator();
+ for ( String name : choice.getAllowedDoubleNames() )
+ {
+ list.add( new EquandaOptionModel( name, iteratorValues.next() ) );
+ }
+ }
+ }
+#else
+ {
+ EnumerableChoice choice = new ${choice.className}();
+ if ( choice.getAllowedStringValues() != null && choice.getAllowedStringNames() != null
+ && choice.getAllowedStringValues().size() == choice.getAllowedStringNames().size() )
+ {
+ Iterator<String> iteratorValues = choice.getAllowedStringValues().iterator();
+ for ( String name : choice.getAllowedStringNames() )
+ {
+ String value = iteratorValues.next();
+ if ( choice instanceof ChoiceTranslation )
+ {
+ list.add( new EquandaOptionModel( ( ( ChoiceTranslation ) choice ).getTranslation( name ), value ) );
+ }
+ else
+ {
+ list.add( new EquandaOptionModel( name, value ) );
+ }
+ }
+ }
+ }
+#end## end of field type check
+#else## not from class
+ list.add( new EquandaOptionModel( messages.get( "choice.${table.Name}.${field.Name}.$choice.Name" ),
+ #if( $field.isInt() )new Integer( $choice.value )#elseif( $field.isBoolean() )new Boolean( $choice.value )#elseif( $field.isDouble() )new Double( $choice.value )#else"$choice.value"#end ) );
+#end
+#end## end of choices foreach
+ return new EquandaSelectModel( null, list );
+}
Modified: trunk/equanda-generate/src/main/velocity/t5gui/edit-tml/date.tml.vm
===================================================================
--- trunk/equanda-generate/src/main/velocity/t5gui/edit-tml/date.tml.vm 2008-11-19 09:23:42 UTC (rev 870)
+++ trunk/equanda-generate/src/main/velocity/t5gui/edit-tml/date.tml.vm 2008-11-21 13:05:56 UTC (rev 871)
@@ -1,5 +1,5 @@
#if( $field.isMultiple() )
<input t:type="InlinePrimitiveList" t:dateType="true" t:value="value.${field.VarName}" embedded="${field.isEmbedded()}" #if( $field.isCalculated() || $field.isAuto() )disabled="true"#end/>
#else
-<input t:type="DateField" t:value="value.${field.Name}" t:format="dd.MM.yyyy" #if( $field.isCalculated() || $field.isAuto() )disabled="true"#end/>
+<input t:type="t5components/DateTimeField" t:value="value.${field.Name}" t:timePicker="false" t:datePattern="dd.MM.yyyy" #if( $field.isCalculated() || $field.isAuto() )disabled="true"#end/>
#end
Modified: trunk/equanda-generate/src/main/velocity/t5gui/edit-tml/timestamp.tml.vm
===================================================================
--- trunk/equanda-generate/src/main/velocity/t5gui/edit-tml/timestamp.tml.vm 2008-11-19 09:23:42 UTC (rev 870)
+++ trunk/equanda-generate/src/main/velocity/t5gui/edit-tml/timestamp.tml.vm 2008-11-21 13:05:56 UTC (rev 871)
@@ -1,5 +1,5 @@
#if( $field.isMultiple() )
<input t:type="InlinePrimitiveList" t:timestampType="true" t:value="value.${field.VarName}" embedded="${field.isEmbedded()}" #if( $field.isCalculated() || $field.isAuto() )disabled="true"#end/>
#else
-<input t:type="t5components/DateTimeField" t:value="value.${field.Name}" t:timePicker="true" t:datePattern="yyyy-MM-dd HH:mm:ss" #if( $field.isCalculated() || $field.isAuto() )disabled="true"#end/>
+<input t:type="t5components/DateTimeField" t:value="value.${field.Name}" t:timePicker="true" t:datePattern="dd.MM.yyyy HH:mm:ss" #if( $field.isCalculated() || $field.isAuto() )disabled="true"#end/>
#end
Modified: trunk/equanda-generate/src/main/velocity/t5gui/pages/Select.java.vm
===================================================================
--- trunk/equanda-generate/src/main/velocity/t5gui/pages/Select.java.vm 2008-11-19 09:23:42 UTC (rev 870)
+++ trunk/equanda-generate/src/main/velocity/t5gui/pages/Select.java.vm 2008-11-21 13:05:56 UTC (rev 871)
@@ -1,4 +1,5 @@
#* @vtlvariable name="table" type="org.equanda.domain.xml.transform.RootTable" *#
+#* @vtlvariable name="select" type="org.equanda.domain.xml.Select" *#
#* @vtlvariable name="engine" type="org.equanda.generate.Generator" *#
#* @vtlvariable name="package" type="java.lang.String" *#
#* @vtlvariable name="generationdate" type="java.lang.String" *#
@@ -48,6 +49,7 @@
import org.equanda.persistence.EquandaPersistenceException;
import org.equanda.persistence.SelectorsState;
import org.equanda.t5gui.ListGetter;
+import org.equanda.t5gui.SelectedSetter;
import java.util.List;
import java.util.ArrayList;
@@ -67,17 +69,48 @@
@InjectPage
private ${table.Name}Edit equandaCreatePage;
+ @Persist
+ private PageState pageState;
+
+ public PageState getPageState()
+ {
+ if ( null == pageState) pageState=new PageState();
+ return pageState;
+ }
+
public ${table.Name}Edit getEquandaCreatePage() { return equandaCreatePage; }
#foreach( $sel in $select.SelectionsTestAndParameterDeep )
- @Persist
- private ${sel.Field.JavaFieldType} ${sel.Name};
- public ${sel.Field.JavaFieldType} get${sel.CamelName}() { return $sel.Name; }
- public void set${sel.CamelName}( ${sel.Field.JavaFieldType} obj ) { this.$sel.Name = obj; }
+ public ${sel.Field.JavaFieldType} get${sel.CamelName}() { return getPageState().${sel.Name}; }
+ public void set${sel.CamelName}( ${sel.Field.JavaFieldType} obj ) { getPageState().${sel.Name} = obj; }
+#set( $field = $sel.Field )
+#if( $field.isLink() )
+ public SelectedSetter<${ejbPackage}.client.$field.FieldTypeName> get${field.Name}Setter()
+ {
+ return new SelectedSetter<${ejbPackage}.client.${field.FieldTypeName}>() {
+ PageState pageState = getPageState();
+ public void setSelected( ${ejbPackage}.client.${field.FieldTypeName} newValue )
+ {
+#if( !$field.isAuto() ) ## @todo temporary hack!
+ pageState.${field.VarName} = newValue;
#end
+ }
+ };
+ }
+#if( $field.hasLinkTypeCompare() )
+ public String get${field.Name}Filter() { return EquandaGlobal.getQueryString( "${table.Name}.equandaCompareType${field.Name}" ); }
+#end
+#end
+
+#if( $field.hasChoice() )
+#parse( "components/choicemodel.java.vm" )
+#end
+
+#end
+
private final ListGetter<${table.Name}> SELECTOR = new ListGetter<${table.Name}>()
{
public List<${table.Name}> getList()
@@ -124,4 +157,11 @@
}
#end
#end
+
+ public class PageState {
+#foreach( $sel in $select.SelectionsTestAndParameterDeep )
+ public ${sel.Field.JavaFieldType} ${sel.Name};
+#end
+ }
+
}
Modified: trunk/equanda-generate/src/main/velocity/t5gui/pages/Select.tml.vm
===================================================================
--- trunk/equanda-generate/src/main/velocity/t5gui/pages/Select.tml.vm 2008-11-19 09:23:42 UTC (rev 870)
+++ trunk/equanda-generate/src/main/velocity/t5gui/pages/Select.tml.vm 2008-11-21 13:05:56 UTC (rev 871)
@@ -32,9 +32,21 @@
#foreach( $par in $select.SelectionsTestAndParameterDeep )
<div class="eqFld">
<t:label for="${par.Name}"/>
-<input t:type="TextField" t:label="equanda-message:parameter.${table.Name}.${select.Name}.${par.Name}" t:id="${par.Name}" t:value="${par.Name}"/>
-<t:if test="has-equanda-message:parameter.${table.Name}.${select.Name}.${par.Field.Name}.help">
-<div class="eqFldC">${dollar}{equanda-message:parameter.${table.Name}.${select.Name}.${par.Name}.help}</div>
+#if( ${par.Field.isLink()} )
+<input t:type="${par.field.LinkTable.VarName}/LinkOne" t:value="value.${par.Name}" t:setter="${par.field.Name}Setter" #if( $par.field.hasLinkTypeCompare() )filter="${par.field.Name}Filter"#end />
+#elseif( ${par.Field.isBoolean()} )
+<input t:type="CheckBox" t:value="value.${par.Name}" />
+#elseif( ${par.Field.isDate()} )
+<input t:type="DateField" t:value="value.${par.Name}" t:format="dd.MM.yyyy" />
+#elseif( ${par.Field.isTimestamp()} )
+<input t:type="t5components/DateTimeField" t:value="value.${par.Name}" t:timePicker="true" t:datePattern="dd.MM.yyyy HH:mm:ss" />
+#elseif( ${par.Field.hasChoice()} )
+<select t:type="Select" t:model="${par.field.Name}ChoiceModel" t:value="value.${par.field.Name}" t:validate="required" />
+#else
+<input t:type="TextField" t:label="equanda-message:parameter.${table.Name}.${select.Name}.${par.Field.Name}" t:id="${par.Name}" t:value="${par.Name}"/>
+#end
+<t:if test="has-equanda-message:parameter.${table.Name}.${select.Name}.${par.Field.Name}.caption">
+<div class="eqFldC">${dollar}{equanda-message:parameter.${table.Name}.${select.Name}.${par.Name}.caption}</div>
</t:if>
</div>
#end
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <tri...@us...> - 2008-11-19 09:23:47
|
Revision: 870
http://equanda.svn.sourceforge.net/equanda/?rev=870&view=rev
Author: triathlon98
Date: 2008-11-19 09:23:42 +0000 (Wed, 19 Nov 2008)
Log Message:
-----------
EQ-280 upgrade to latest tapestry (CR1!)
Modified Paths:
--------------
trunk/pom.xml
Modified: trunk/pom.xml
===================================================================
--- trunk/pom.xml 2008-11-18 15:31:18 UTC (rev 869)
+++ trunk/pom.xml 2008-11-19 09:23:42 UTC (rev 870)
@@ -568,7 +568,7 @@
</profiles>
<properties>
- <tapestry-release-version>5.0.15</tapestry-release-version>
+ <tapestry-release-version>5.0.16</tapestry-release-version>
<tapestry-commons-version>0.5.15</tapestry-commons-version>
<staticwiki-release-version>0.9</staticwiki-release-version>
</properties>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vla...@us...> - 2008-11-18 15:31:19
|
Revision: 869
http://equanda.svn.sourceforge.net/equanda/?rev=869&view=rev
Author: vladimirt
Date: 2008-11-18 15:31:18 +0000 (Tue, 18 Nov 2008)
Log Message:
-----------
EQ-259 - multiple field handling for password fields
Modified Paths:
--------------
trunk/equanda-generate/src/main/velocity/t5gui/edit-tml/password.tml.vm
Modified: trunk/equanda-generate/src/main/velocity/t5gui/edit-tml/password.tml.vm
===================================================================
--- trunk/equanda-generate/src/main/velocity/t5gui/edit-tml/password.tml.vm 2008-11-18 15:26:21 UTC (rev 868)
+++ trunk/equanda-generate/src/main/velocity/t5gui/edit-tml/password.tml.vm 2008-11-18 15:31:18 UTC (rev 869)
@@ -3,4 +3,3 @@
#else
<input t:type="PasswordField" t:value="value.${field.Name}" #if( $field.isCalculated() || $field.isAuto() )disabled="true"#end/>
#end
-PASSWORD
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vla...@us...> - 2008-11-18 15:26:30
|
Revision: 868
http://equanda.svn.sourceforge.net/equanda/?rev=868&view=rev
Author: vladimirt
Date: 2008-11-18 15:26:21 +0000 (Tue, 18 Nov 2008)
Log Message:
-----------
EQ-259 - multiple field handling for password fields
Modified Paths:
--------------
trunk/equanda-generate/src/main/velocity/t5gui/components/InlinePrimitiveList.tml.vm
Modified: trunk/equanda-generate/src/main/velocity/t5gui/components/InlinePrimitiveList.tml.vm
===================================================================
--- trunk/equanda-generate/src/main/velocity/t5gui/components/InlinePrimitiveList.tml.vm 2008-11-18 15:22:55 UTC (rev 867)
+++ trunk/equanda-generate/src/main/velocity/t5gui/components/InlinePrimitiveList.tml.vm 2008-11-18 15:26:21 UTC (rev 868)
@@ -28,12 +28,12 @@
<t:if t:test="timestampType">
<input t:type="t5components/DateTimeField" t:value="current" t:timePicker="true" t:datePattern="yyyy-MM-dd HH:mm:ss" t:disabled="prop:disabled"/>
</t:if>
- <!--<t:if t:test="textType">
+ #*<t:if t:test="textType">
<textarea t:type="TextArea" t:translate="prop:translator" rows="5" cols="50" t:mixins="t5components/Resizable" t:value="current" t:disabled="prop:disabled" onkeyup="eqCC(this, ${clientCaseConversion});"/>
</t:if>
<t:if t:test="booleanType">
<input t:type="CheckBox" t:value="current" t:disabled="prop:disabled"/>
- </t:if>-->
+ </t:if>*#
<t:if t:test="passwordType">
<input t:type="PasswordField" t:translate="prop:translator" t:value="current" t:disabled="prop:disabled"/>
</t:if>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vla...@us...> - 2008-11-18 15:23:03
|
Revision: 867
http://equanda.svn.sourceforge.net/equanda/?rev=867&view=rev
Author: vladimirt
Date: 2008-11-18 15:22:55 +0000 (Tue, 18 Nov 2008)
Log Message:
-----------
EQ-259 - multiple field handling for password fields
Modified Paths:
--------------
trunk/equanda-generate/src/main/velocity/t5gui/components/InlinePrimitiveList.java.vm
trunk/equanda-generate/src/main/velocity/t5gui/components/InlinePrimitiveList.tml.vm
trunk/equanda-generate/src/main/velocity/t5gui/edit-tml/boolean.tml.vm
trunk/equanda-generate/src/main/velocity/t5gui/edit-tml/password.tml.vm
trunk/equanda-generate/src/main/velocity/t5gui/edit-tml/text.tml.vm
trunk/equanda-generate/src/main/velocity/t5gui/list-tml/password.tml.vm
trunk/equanda-generate/src/main/velocity/t5gui/view-tml/boolean.tml.vm
trunk/equanda-generate/src/main/velocity/t5gui/view-tml/password.tml.vm
trunk/equanda-generate/src/main/velocity/t5gui/view-tml/string.tml.vm
Added Paths:
-----------
trunk/equanda-generate/src/main/velocity/t5gui/list-tml/text.tml.vm
Modified: trunk/equanda-generate/src/main/velocity/t5gui/components/InlinePrimitiveList.java.vm
===================================================================
--- trunk/equanda-generate/src/main/velocity/t5gui/components/InlinePrimitiveList.java.vm 2008-11-18 10:45:09 UTC (rev 866)
+++ trunk/equanda-generate/src/main/velocity/t5gui/components/InlinePrimitiveList.java.vm 2008-11-18 15:22:55 UTC (rev 867)
@@ -78,6 +78,15 @@
private boolean timestampType;
@Parameter
+ private boolean textType;
+
+ @Parameter
+ private boolean passwordType;
+
+ @Parameter
+ private boolean booleanType;
+
+ @Parameter
private String caseConversionClass;
@Parameter
@@ -161,6 +170,11 @@
return translator;
}
+ public boolean isStringType()
+ {
+ return !dateType && !timestampType && !textType && !passwordType && !booleanType;
+ }
+
public boolean isDateType()
{
return dateType;
@@ -171,6 +185,21 @@
return timestampType;
}
+ public boolean isTextType()
+ {
+ return textType;
+ }
+
+ public boolean isPasswordType()
+ {
+ return passwordType;
+ }
+
+ public boolean isBooleanType()
+ {
+ return booleanType;
+ }
+
public String getDeletedRows()
{
return deletedRows;
Modified: trunk/equanda-generate/src/main/velocity/t5gui/components/InlinePrimitiveList.tml.vm
===================================================================
--- trunk/equanda-generate/src/main/velocity/t5gui/components/InlinePrimitiveList.tml.vm 2008-11-18 10:45:09 UTC (rev 866)
+++ trunk/equanda-generate/src/main/velocity/t5gui/components/InlinePrimitiveList.tml.vm 2008-11-18 15:22:55 UTC (rev 867)
@@ -19,17 +19,24 @@
<a href="javascript:;" id="ea-${dollar}{clientId}-${dollar}{index}" onclick="eqRevDel( this, '${dollar}{deletedHiddenId}', ${dollar}{index}, 'er-${dollar}{clientId}-${dollar}{index}', 'ed-${dollar}{clientId}-${dollar}{index}' )" style="display: none;" title="Undo Delete"><img src="${dollar}{asset:classpath:org/equanda/t5gui/undo_delete.gif}" alt="${dollar}{equanda-message:UndoDelete}" /></a>
</div>
<div class="eqInlPRD er-${dollar}{clientId}-${dollar}{index}">
+ <t:if t:test="stringType">
+ <input t:type="TextField" t:translate="prop:translator" t:value="current" t:disabled="prop:disabled" onkeyup="eqCC(this, ${clientCaseConversion});"/>
+ </t:if>
<t:if t:test="dateType">
- <t:parameter name="else">
- <t:if t:test="timestampType">
- <input t:type="t5components/DateTimeField" t:value="current" t:timePicker="true" t:datePattern="yyyy-MM-dd HH:mm:ss" t:disabled="prop:disabled"/>
- <t:parameter name="else">
- <input t:type="TextField" t:translate="prop:translator" t:value="current" t:disabled="prop:disabled" onkeyup="eqCC(this, ${clientCaseConversion});"/>
- </t:parameter>
- </t:if>
- </t:parameter>
<input t:type="DateField" t:value="current" t:format="%d.%m.%Y" t:disabled="prop:disabled"/>
</t:if>
+ <t:if t:test="timestampType">
+ <input t:type="t5components/DateTimeField" t:value="current" t:timePicker="true" t:datePattern="yyyy-MM-dd HH:mm:ss" t:disabled="prop:disabled"/>
+ </t:if>
+ <!--<t:if t:test="textType">
+ <textarea t:type="TextArea" t:translate="prop:translator" rows="5" cols="50" t:mixins="t5components/Resizable" t:value="current" t:disabled="prop:disabled" onkeyup="eqCC(this, ${clientCaseConversion});"/>
+ </t:if>
+ <t:if t:test="booleanType">
+ <input t:type="CheckBox" t:value="current" t:disabled="prop:disabled"/>
+ </t:if>-->
+ <t:if t:test="passwordType">
+ <input t:type="PasswordField" t:translate="prop:translator" t:value="current" t:disabled="prop:disabled"/>
+ </t:if>
</div>
</div>
<t:equanda.formactionlink t:id="Add">${dollar}{equanda-message:Add}</t:equanda.formactionlink>
Modified: trunk/equanda-generate/src/main/velocity/t5gui/edit-tml/boolean.tml.vm
===================================================================
--- trunk/equanda-generate/src/main/velocity/t5gui/edit-tml/boolean.tml.vm 2008-11-18 10:45:09 UTC (rev 866)
+++ trunk/equanda-generate/src/main/velocity/t5gui/edit-tml/boolean.tml.vm 2008-11-18 15:22:55 UTC (rev 867)
@@ -1,5 +1,5 @@
#if( $field.isMultiple() )
-@todo
+##<input t:type="InlinePrimitiveList" t:booleanType="true" t:translator="prop:stringTranslator" t:value="value.${field.Name}" embedded="${field.isEmbedded()}" #if( $field.isCalculated() || $field.isAuto() )disabled="true"#end #if( $field.isCaseConversionClass() ) caseConversionClass="$field.caseConversion.className" #end #if( $field.isCaseConversionUpper() ) caseConversionUpper="true" #elseif( $field.isCaseConversionLower() ) caseConversionLower="true" #end/>
#else
<input t:type="CheckBox" t:value="value.${field.Name}" #if( $field.isCalculated() || $field.isAuto() )disabled="true"#end/>
#end
Modified: trunk/equanda-generate/src/main/velocity/t5gui/edit-tml/password.tml.vm
===================================================================
--- trunk/equanda-generate/src/main/velocity/t5gui/edit-tml/password.tml.vm 2008-11-18 10:45:09 UTC (rev 866)
+++ trunk/equanda-generate/src/main/velocity/t5gui/edit-tml/password.tml.vm 2008-11-18 15:22:55 UTC (rev 867)
@@ -1,5 +1,6 @@
#if( $field.isMultiple() )
-@todo
+<input t:type="InlinePrimitiveList" t:passwordType="true" t:translator="prop:stringTranslator" t:value="value.${field.VarName}" embedded="${field.isEmbedded()}" #if( $field.isCalculated() || $field.isAuto() )disabled="true"#end/>
#else
-<textarea t:type="PasswordField" t:value="value.${field.Name}"/>
+<input t:type="PasswordField" t:value="value.${field.Name}" #if( $field.isCalculated() || $field.isAuto() )disabled="true"#end/>
#end
+PASSWORD
Modified: trunk/equanda-generate/src/main/velocity/t5gui/edit-tml/text.tml.vm
===================================================================
--- trunk/equanda-generate/src/main/velocity/t5gui/edit-tml/text.tml.vm 2008-11-18 10:45:09 UTC (rev 866)
+++ trunk/equanda-generate/src/main/velocity/t5gui/edit-tml/text.tml.vm 2008-11-18 15:22:55 UTC (rev 867)
@@ -1,5 +1,5 @@
#if( $field.isMultiple() )
-@todo
+##<input t:type="InlinePrimitiveList" t:textType="true" t:translator="prop:stringTranslator" t:value="value.${field.Name}" embedded="${field.isEmbedded()}" #if( $field.isCalculated() || $field.isAuto() )disabled="true"#end #if( $field.isCaseConversionClass() ) caseConversionClass="$field.caseConversion.className" #end #if( $field.isCaseConversionUpper() ) caseConversionUpper="true" #elseif( $field.isCaseConversionLower() ) caseConversionLower="true" #end/>
#else
<textarea t:type="TextArea" rows="5" cols="50" t:mixins="t5components/Resizable" t:value="value.${field.Name}" #if( $field.isCalculated() || $field.isAuto() )disabled="true"#end #if( $field.hasCaseConversion() )onkeyup="eqCC(this, #if( $field.isCaseConversionUpper()) 2 #elseif( $field.isCaseConversionLower() ) 1 #else 0 #end);"#end/>
#end
Modified: trunk/equanda-generate/src/main/velocity/t5gui/list-tml/password.tml.vm
===================================================================
--- trunk/equanda-generate/src/main/velocity/t5gui/list-tml/password.tml.vm 2008-11-18 10:45:09 UTC (rev 866)
+++ trunk/equanda-generate/src/main/velocity/t5gui/list-tml/password.tml.vm 2008-11-18 15:22:55 UTC (rev 867)
@@ -1,5 +1,5 @@
#if( $field.isMultiple() )
-@todo
+***
#else
***
#end
\ No newline at end of file
Added: trunk/equanda-generate/src/main/velocity/t5gui/list-tml/text.tml.vm
===================================================================
--- trunk/equanda-generate/src/main/velocity/t5gui/list-tml/text.tml.vm (rev 0)
+++ trunk/equanda-generate/src/main/velocity/t5gui/list-tml/text.tml.vm 2008-11-18 15:22:55 UTC (rev 867)
@@ -0,0 +1,7 @@
+#if( $field.isMultiple() )
+<div t:type="Loop" t:source="value.${field.VarName}" t:value="currentMultipleRow" t:index="currentMultipleIndex">
+<span t:type="equanda/Truncate" t:text="prop:currentMultipleRow"/>
+</div>
+#else
+<span t:type="equanda/Truncate" t:text="value.${field.VarName}"/>
+#end
Modified: trunk/equanda-generate/src/main/velocity/t5gui/view-tml/boolean.tml.vm
===================================================================
--- trunk/equanda-generate/src/main/velocity/t5gui/view-tml/boolean.tml.vm 2008-11-18 10:45:09 UTC (rev 866)
+++ trunk/equanda-generate/src/main/velocity/t5gui/view-tml/boolean.tml.vm 2008-11-18 15:22:55 UTC (rev 867)
@@ -3,5 +3,5 @@
<t:if test="isRenderCurrentMultipleIndex()">, </t:if>${dollar}{currentMultipleRow}
</span>
#else
-${dollar}{currentMultipleRow}
+${dollar}{value.${field.Name}}
#end
Modified: trunk/equanda-generate/src/main/velocity/t5gui/view-tml/password.tml.vm
===================================================================
--- trunk/equanda-generate/src/main/velocity/t5gui/view-tml/password.tml.vm 2008-11-18 10:45:09 UTC (rev 866)
+++ trunk/equanda-generate/src/main/velocity/t5gui/view-tml/password.tml.vm 2008-11-18 15:22:55 UTC (rev 867)
@@ -1,6 +1,5 @@
-<input t:type="TextField" t:value="literal:?" length="1" disabled="true" style="display:none"/>
#if( $field.isMultiple() )
-@todo
+***
#else
***
#end
\ No newline at end of file
Modified: trunk/equanda-generate/src/main/velocity/t5gui/view-tml/string.tml.vm
===================================================================
--- trunk/equanda-generate/src/main/velocity/t5gui/view-tml/string.tml.vm 2008-11-18 10:45:09 UTC (rev 866)
+++ trunk/equanda-generate/src/main/velocity/t5gui/view-tml/string.tml.vm 2008-11-18 15:22:55 UTC (rev 867)
@@ -1,6 +1,6 @@
#if( $field.isMultiple() )
<div t:type="Loop" t:source="value.${field.VarName}" t:value="currentMultipleRow" t:index="currentMultipleIndex">
-<span t:type="equanda/Truncate" t:text="value.${field.VarName}"/>
+<span t:type="equanda/Truncate" t:text="prop:currentMultipleRow"/>
</div>
#else
<span t:type="equanda/Truncate" t:text="value.${field.VarName}"/>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <tri...@us...> - 2008-11-18 10:45:32
|
Revision: 866
http://equanda.svn.sourceforge.net/equanda/?rev=866&view=rev
Author: triathlon98
Date: 2008-11-18 10:45:09 +0000 (Tue, 18 Nov 2008)
Log Message:
-----------
EQ-279 refactor import servlet
Modified Paths:
--------------
trunk/equanda-server/src/main/java/org/equanda/ymport/Servlet.java
Added Paths:
-----------
trunk/equanda-server/src/main/java/org/equanda/ymport/ImportWorker.java
trunk/equanda-server/src/main/java/org/equanda/ymport/ImportWorkerUtil.java
Removed Paths:
-------------
trunk/equanda-server/src/main/java/org/equanda/ymport/ImportServletUtil.java
Deleted: trunk/equanda-server/src/main/java/org/equanda/ymport/ImportServletUtil.java
===================================================================
--- trunk/equanda-server/src/main/java/org/equanda/ymport/ImportServletUtil.java 2008-11-14 21:51:14 UTC (rev 865)
+++ trunk/equanda-server/src/main/java/org/equanda/ymport/ImportServletUtil.java 2008-11-18 10:45:09 UTC (rev 866)
@@ -1,92 +0,0 @@
-/**
- * This file is part of the equanda project.
- *
- * The contents of this file are subject to the Mozilla Public License Version 1.1 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis, WITHOUT WARRANTY OF
- * ANY KIND, either express or implied. See the License for the specific language governing rights and
- * limitations under the License.
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- */
-
-package org.equanda.ymport;
-
-import javax.transaction.UserTransaction;
-
-/**
- * Utility class, routines and fields needed both in the servlet and in the generator used in GUI
- *
- * @author NetRom team
- */
-public class ImportServletUtil
-{
- public static final String FAILURE = "FAILURE at line ";
- public static final String TABLE_DIRECTIVE_START = ":table:";
- public static final char COMMENT_CHAR1 = ';'; // comment lines can start with this character
- public static final char COMMENT_CHAR2 = '#'; // comment lines can start with this character
- public static final char DIRECTIVE_CHAR = ':'; // directives start with this character
-
- /**
- * build failure message
- *
- * @param line line number at which failure occured
- * @param msg error message
- * @return complete failure message
- */
- public static String failure( int line, String msg )
- {
- return FAILURE + line + " : " + msg;
- }
-
- public static boolean isComment( String line )
- {
- return line != null && ( line.charAt( 0 ) == COMMENT_CHAR1 || line.charAt( 0 ) == COMMENT_CHAR2 );
- }
-
- public static boolean isDirective( String line )
- {
- return line != null && line.charAt( 0 ) == DIRECTIVE_CHAR;
- }
-
- public static boolean isTableDirective( String line )
- {
- return line != null && line.startsWith( TABLE_DIRECTIVE_START );
- }
-
-
- public static boolean isEmptyLine( String line )
- {
- return line == null || line.trim().length() == 0;
- }
-
- /**
- * Utility routine to rollback a UserTransaction if it exists
- *
- * @param tx UserTransaction which needs to be rolled back
- */
- public static void rollback( UserTransaction tx )
- {
- if ( tx != null )
- {
- try
- {
- tx.rollback();
- }
- catch ( Exception exc )
- {/*ignore*/}
- }
- }
-}
Added: trunk/equanda-server/src/main/java/org/equanda/ymport/ImportWorker.java
===================================================================
--- trunk/equanda-server/src/main/java/org/equanda/ymport/ImportWorker.java (rev 0)
+++ trunk/equanda-server/src/main/java/org/equanda/ymport/ImportWorker.java 2008-11-18 10:45:09 UTC (rev 866)
@@ -0,0 +1,182 @@
+/**
+ * This file is part of the equanda project.
+ *
+ * The contents of this file are subject to the Mozilla Public License Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis, WITHOUT WARRANTY OF
+ * ANY KIND, either express or implied. See the License for the specific language governing rights and
+ * limitations under the License.
+ *
+ * Alternatively, the contents of this file may be used under the terms of
+ * either the GNU General Public License Version 2 or later (the "GPL"), or
+ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
+ * in which case the provisions of the GPL or the LGPL are applicable instead
+ * of those above. If you wish to allow use of your version of this file only
+ * under the terms of either the GPL or the LGPL, and not to allow others to
+ * use your version of this file under the terms of the MPL, indicate your
+ * decision by deleting the provisions above and replace them with the notice
+ * and other provisions required by the GPL or the LGPL. If you do not delete
+ * the provisions above, a recipient may use your version of this file under
+ * the terms of any one of the MPL, the GPL or the LGPL.
+ */
+
+package org.equanda.ymport;
+
+import org.apache.log4j.Logger;
+
+import javax.naming.InitialContext;
+import javax.transaction.Status;
+import javax.transaction.UserTransaction;
+import java.io.BufferedReader;
+import java.io.IOException;
+import java.io.Reader;
+
+/**
+ * Base class importing data based on a reader. This class can be used for direct import in server side object (like
+ * the import servlet).
+ *
+ * @author <a href="mailto:jo...@pr...">Joachim Van der Auwera</a>
+ */
+public class ImportWorker
+{
+ private static final Logger log = Logger.getLogger( ImportWorker.class );
+
+ /**
+ * Import the data from the import reader. The reader is closed by the method.
+ *
+ * @param reader stuff to import
+ * @param databaseMap database description for import
+ * @return error string or null
+ */
+ public String ymport( Reader reader, DatabaseMap databaseMap )
+ {
+ ImportHandler handler = null;
+ String output = null;
+ int lineNumber = 1;
+
+ BufferedReader in;
+ if ( reader instanceof BufferedReader )
+ {
+ in = (BufferedReader) reader;
+ }
+ else
+ {
+ in = new BufferedReader( reader );
+ }
+
+ String line;
+ UserTransaction tx = null;
+
+ try
+ {
+ while ( ( output == null ) && ( ( line = in.readLine() ) != null ) )
+ {
+ if ( log.isDebugEnabled() ) log.debug( line );
+
+ // hack to make testing using a servlet possible
+ if ( lineNumber == 1 && line.startsWith( "data=" ) )
+ {
+ line = line.substring( 5 );
+ }
+
+ if ( ImportWorkerUtil.isEmptyLine( line ) || ImportWorkerUtil.isComment( line ) )
+ {
+ // do nothing
+ }
+ else if ( ImportWorkerUtil.isDirective( line ) )
+ {
+ // for now, we assume all directives are table directives...
+ if ( ImportWorkerUtil.isTableDirective( line ) )
+ {
+ handler =
+ ImportHandler.buildImportHandler( databaseMap,
+ line.substring(
+ ImportWorkerUtil.TABLE_DIRECTIVE_START.length() ) );
+ }
+ else
+ {
+ output = ImportWorkerUtil.failure( lineNumber, "unknown directive" );
+ }
+ }
+ else
+ {
+ // so it's a data line...
+ if ( handler == null )
+ {
+ output = ImportWorkerUtil.failure( lineNumber, "data line found before any command line" );
+ }
+ else
+ {
+ // each line has to be imported in its own UserTransaction
+ if ( tx == null )
+ {
+ InitialContext ctx = new InitialContext();
+ tx = (UserTransaction) ctx.lookup( "UserTransaction" );
+ ctx.close();
+ }
+ tx.begin();
+ handler.ymport( ImportParser.parse( line ) );
+ tx.commit();
+ }
+ }
+ lineNumber++;
+ }
+ }
+ catch ( ImportHandlerException ihe )
+ {
+ if ( log.isDebugEnabled() ) log.debug( ihe, ihe );
+ output = ImportWorkerUtil.failure( lineNumber, ihe.toString() );
+ try
+ {
+ tx.setRollbackOnly();
+ }
+ catch ( Exception e )
+ {/*ignore*/}
+ }
+ catch ( Exception ex )
+ {
+ if ( log.isDebugEnabled() ) log.debug( ex, ex );
+ output = ImportWorkerUtil.failure( lineNumber, "unexpected exception " + ex.toString() );
+ try
+ {
+ tx.setRollbackOnly();
+ }
+ catch ( Exception e )
+ {/*ignore*/}
+ }
+ finally
+ {
+ try
+ {
+ // commit or rollback transaction
+ if ( tx != null )
+ {
+ if ( tx.getStatus() == Status.STATUS_ACTIVE )
+ {
+ tx.commit();
+ }
+ else if ( tx.getStatus() == Status.STATUS_MARKED_ROLLBACK )
+ {
+ tx.rollback();
+ }
+ }
+ }
+ catch ( Exception ex )
+ {
+ log.error( "cannot end transaction", ex );
+ }
+ }
+ try
+ {
+ in.close();
+ }
+ catch ( IOException ioe )
+ {
+ log.error( ioe, ioe );
+ }
+
+ return output;
+ }
+}
Copied: trunk/equanda-server/src/main/java/org/equanda/ymport/ImportWorkerUtil.java (from rev 865, trunk/equanda-server/src/main/java/org/equanda/ymport/ImportServletUtil.java)
===================================================================
--- trunk/equanda-server/src/main/java/org/equanda/ymport/ImportWorkerUtil.java (rev 0)
+++ trunk/equanda-server/src/main/java/org/equanda/ymport/ImportWorkerUtil.java 2008-11-18 10:45:09 UTC (rev 866)
@@ -0,0 +1,92 @@
+/**
+ * This file is part of the equanda project.
+ *
+ * The contents of this file are subject to the Mozilla Public License Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis, WITHOUT WARRANTY OF
+ * ANY KIND, either express or implied. See the License for the specific language governing rights and
+ * limitations under the License.
+ *
+ * Alternatively, the contents of this file may be used under the terms of
+ * either the GNU General Public License Version 2 or later (the "GPL"), or
+ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
+ * in which case the provisions of the GPL or the LGPL are applicable instead
+ * of those above. If you wish to allow use of your version of this file only
+ * under the terms of either the GPL or the LGPL, and not to allow others to
+ * use your version of this file under the terms of the MPL, indicate your
+ * decision by deleting the provisions above and replace them with the notice
+ * and other provisions required by the GPL or the LGPL. If you do not delete
+ * the provisions above, a recipient may use your version of this file under
+ * the terms of any one of the MPL, the GPL or the LGPL.
+ */
+
+package org.equanda.ymport;
+
+import javax.transaction.UserTransaction;
+
+/**
+ * Utility class, routines and fields needed both in the servlet and in the generator used in GUI
+ *
+ * @author NetRom team
+ */
+public class ImportWorkerUtil
+{
+ public static final String FAILURE = "FAILURE at line ";
+ public static final String TABLE_DIRECTIVE_START = ":table:";
+ public static final char COMMENT_CHAR1 = ';'; // comment lines can start with this character
+ public static final char COMMENT_CHAR2 = '#'; // comment lines can start with this character
+ public static final char DIRECTIVE_CHAR = ':'; // directives start with this character
+
+ /**
+ * build failure message
+ *
+ * @param line line number at which failure occured
+ * @param msg error message
+ * @return complete failure message
+ */
+ public static String failure( int line, String msg )
+ {
+ return FAILURE + line + " : " + msg;
+ }
+
+ public static boolean isComment( String line )
+ {
+ return line != null && ( line.charAt( 0 ) == COMMENT_CHAR1 || line.charAt( 0 ) == COMMENT_CHAR2 );
+ }
+
+ public static boolean isDirective( String line )
+ {
+ return line != null && line.charAt( 0 ) == DIRECTIVE_CHAR;
+ }
+
+ public static boolean isTableDirective( String line )
+ {
+ return line != null && line.startsWith( TABLE_DIRECTIVE_START );
+ }
+
+
+ public static boolean isEmptyLine( String line )
+ {
+ return line == null || line.trim().length() == 0;
+ }
+
+ /**
+ * Utility routine to rollback a UserTransaction if it exists
+ *
+ * @param tx UserTransaction which needs to be rolled back
+ */
+ public static void rollback( UserTransaction tx )
+ {
+ if ( tx != null )
+ {
+ try
+ {
+ tx.rollback();
+ }
+ catch ( Exception exc )
+ {/*ignore*/}
+ }
+ }
+}
Modified: trunk/equanda-server/src/main/java/org/equanda/ymport/Servlet.java
===================================================================
--- trunk/equanda-server/src/main/java/org/equanda/ymport/Servlet.java 2008-11-14 21:51:14 UTC (rev 865)
+++ trunk/equanda-server/src/main/java/org/equanda/ymport/Servlet.java 2008-11-18 10:45:09 UTC (rev 866)
@@ -24,17 +24,17 @@
package org.equanda.ymport;
+import javolution.lang.TextBuilder;
import org.apache.log4j.Logger;
+import sun.reflect.generics.reflectiveObjects.NotImplementedException;
+import javax.servlet.GenericServlet;
+import javax.servlet.ServletException;
+import javax.servlet.ServletRequest;
+import javax.servlet.ServletResponse;
import java.io.*;
+import java.nio.CharBuffer;
-import javax.servlet.*;
-import javax.transaction.UserTransaction;
-import javax.transaction.Status;
-import javax.naming.InitialContext;
-
-import javolution.lang.TextBuilder;
-
/**
* Table handler. Builds a proxy object from the collection of fields
*
@@ -46,6 +46,7 @@
{
private static final Logger log = Logger.getLogger( Servlet.class );
private DatabaseMap databaseMap;
+ private ImportWorker importWorker = new ImportWorker();
/**
* initialise servlet, get DatabaseMap
@@ -91,119 +92,16 @@
public void service( ServletRequest req, ServletResponse res )
throws IOException
{
- ImportHandler handler = null;
String output = null;
- int lineNumber = 1;
// ICT-326 fix for Tomcat problems with readline when file longer than 8kB
// BufferedReader in = req.getReader();
LineReader in = new LineReader( req.getReader() );
- String line;
- UserTransaction tx = null;
-
res.setContentType( "text/plain" );
- try
- {
- while ( ( output == null ) && ( ( line = in.readLine() ) != null ) )
- {
- if ( log.isDebugEnabled() ) log.debug( line );
+ output = importWorker.ymport( in, databaseMap );
- // hack to make testing using a servlet possible
- if ( lineNumber == 1 && line.startsWith( "data=" ) )
- {
- line = line.substring( 5 );
- }
-
- if ( ImportServletUtil.isEmptyLine( line ) || ImportServletUtil.isComment( line ) )
- {
- // do nothing
- }
- else if ( ImportServletUtil.isDirective( line ) )
- {
- // for now, we assume all directives are table directives...
- if ( ImportServletUtil.isTableDirective( line ) )
- {
- handler =
- ImportHandler.buildImportHandler( databaseMap,
- line.substring(
- ImportServletUtil.TABLE_DIRECTIVE_START.length() ) );
- }
- else
- {
- output = ImportServletUtil.failure( lineNumber, "unknown directive" );
- }
- }
- else
- {
- // so it's a data line...
- if ( handler == null )
- {
- output = ImportServletUtil.failure( lineNumber, "data line found before any command line" );
- }
- else
- {
- // each line has to be imported in its own UserTransaction
- if ( tx == null )
- {
- InitialContext ctx = new InitialContext();
- tx = (UserTransaction) ctx.lookup( "UserTransaction" );
- ctx.close();
- }
- tx.begin();
- handler.ymport( ImportParser.parse( line ) );
- tx.commit();
- }
- }
- lineNumber++;
- }
- }
- catch ( ImportHandlerException ihe )
- {
- if ( log.isDebugEnabled() ) log.debug( ihe, ihe );
- output = ImportServletUtil.failure( lineNumber, ihe.toString() );
- try
- {
- tx.setRollbackOnly();
- }
- catch ( Exception e )
- {/*ignore*/}
- }
- catch ( Exception ex )
- {
- if ( log.isDebugEnabled() ) log.debug( ex, ex );
- output = ImportServletUtil.failure( lineNumber, "unexpected exception " + ex.toString() );
- try
- {
- tx.setRollbackOnly();
- }
- catch ( Exception e )
- {/*ignore*/}
- }
- finally
- {
- try
- {
- // commit or rollback transaction
- if ( tx != null )
- {
- if ( tx.getStatus() == Status.STATUS_ACTIVE )
- {
- tx.commit();
- }
- else if ( tx.getStatus() == Status.STATUS_MARKED_ROLLBACK )
- {
- tx.rollback();
- }
- }
- }
- catch ( Exception ex )
- {
- log.error( "cannot end transaction", ex );
- }
- }
- in.close();
// produce the result
PrintStream out = new PrintStream( res.getOutputStream() );
out.println( output == null ? "OK" : output );
@@ -213,11 +111,16 @@
// ICT-326 special class to fix problems in Tomcat readline when file is longer than 8kB
// this may add or suppress empty lines
private class LineReader
+ extends BufferedReader
{
protected Reader reader;
TextBuilder tb = TextBuilder.newInstance();
- public LineReader( Reader in ) { reader = in; }
+ public LineReader( Reader in )
+ {
+ super( new StringReader( "" ) ); // assure parent constructor does not fail
+ reader = in;
+ }
public String readLine()
throws IOException
@@ -244,5 +147,73 @@
public void close()
throws IOException
{ reader.close(); }
+
+ public LineReader( Reader reader, int i )
+ {
+ super( new StringReader( "" ) ); // assure parent constructor does not fail
+ throw new NotImplementedException();
+ }
+
+ @Override
+ public int read()
+ throws IOException
+ {
+ throw new NotImplementedException();
+ }
+
+ @Override
+ public int read( char[] chars, int i, int i1 )
+ throws IOException
+ {
+ throw new NotImplementedException();
+ }
+
+ @Override
+ public long skip( long l )
+ throws IOException
+ {
+ throw new NotImplementedException();
+ }
+
+ @Override
+ public boolean ready()
+ throws IOException
+ {
+ throw new NotImplementedException();
+ }
+
+ @Override
+ public boolean markSupported()
+ {
+ throw new NotImplementedException();
+ }
+
+ @Override
+ public void mark( int i )
+ throws IOException
+ {
+ throw new NotImplementedException();
+ }
+
+ @Override
+ public void reset()
+ throws IOException
+ {
+ throw new NotImplementedException();
+ }
+
+ @Override
+ public int read( CharBuffer charBuffer )
+ throws IOException
+ {
+ throw new NotImplementedException();
+ }
+
+ @Override
+ public int read( char[] chars )
+ throws IOException
+ {
+ throw new NotImplementedException();
+ }
}
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <tri...@us...> - 2008-11-14 21:51:21
|
Revision: 865
http://equanda.svn.sourceforge.net/equanda/?rev=865&view=rev
Author: triathlon98
Date: 2008-11-14 21:51:14 +0000 (Fri, 14 Nov 2008)
Log Message:
-----------
fix sort on translated headers
Modified Paths:
--------------
trunk/equanda-generate/src/main/velocity/t5gui/components/Select.java.vm
trunk/equanda-generate/src/main/velocity/t5gui/components/Select.tml.vm
Modified: trunk/equanda-generate/src/main/velocity/t5gui/components/Select.java.vm
===================================================================
--- trunk/equanda-generate/src/main/velocity/t5gui/components/Select.java.vm 2008-11-14 13:49:11 UTC (rev 864)
+++ trunk/equanda-generate/src/main/velocity/t5gui/components/Select.java.vm 2008-11-14 21:51:14 UTC (rev 865)
@@ -90,6 +90,7 @@
#foreach( $field in $table.Fields )
#if( $field.isReference() || $field.isDescription() || $field.isDisplay() )
model.add( "$field.VarName" );
+ model.get( "$field.VarName" ).label( messages.get( "field.${table.Name}.${field.Name}" ) );
#end
#end
return model;
Modified: trunk/equanda-generate/src/main/velocity/t5gui/components/Select.tml.vm
===================================================================
--- trunk/equanda-generate/src/main/velocity/t5gui/components/Select.tml.vm 2008-11-14 13:49:11 UTC (rev 864)
+++ trunk/equanda-generate/src/main/velocity/t5gui/components/Select.tml.vm 2008-11-14 21:51:14 UTC (rev 865)
@@ -25,7 +25,6 @@
#foreach( $field in $table.Fields )
-<t:parameter name="${field.VarName}Header">${dollar}{equanda-message:field.${table.Name}.${field.Name}}</t:parameter>
<t:parameter name="${field.VarName}Cell">
#set( $renderfirst = "" )
#set( $renderfirst = "$!field.RendererName" )
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <tri...@us...> - 2008-11-14 13:49:25
|
Revision: 864
http://equanda.svn.sourceforge.net/equanda/?rev=864&view=rev
Author: triathlon98
Date: 2008-11-14 13:49:11 +0000 (Fri, 14 Nov 2008)
Log Message:
-----------
EQ-277 import maven plugin
Modified Paths:
--------------
trunk/equanda-maven-plugin/src/site/site.xml
trunk/equanda-server/src/test/java/org/equanda/ymport/ImportParserTest.java
trunk/equanda-util/src/main/java/org/equanda/util/ymport/ImportUtil.java
trunk/pom.xml
Added Paths:
-----------
trunk/equanda-maven-plugin/src/main/java/org/equanda/plugin/ImportPlugin.java
trunk/equanda-maven-plugin/src/site/wiki/ddltool.wiki
trunk/equanda-maven-plugin/src/site/wiki/import.wiki
trunk/equanda-util/src/main/java/org/equanda/util/ymport/LenientSslProtocolSocketFactory.java
Added: trunk/equanda-maven-plugin/src/main/java/org/equanda/plugin/ImportPlugin.java
===================================================================
--- trunk/equanda-maven-plugin/src/main/java/org/equanda/plugin/ImportPlugin.java (rev 0)
+++ trunk/equanda-maven-plugin/src/main/java/org/equanda/plugin/ImportPlugin.java 2008-11-14 13:49:11 UTC (rev 864)
@@ -0,0 +1,181 @@
+/**
+ * This file is part of the equanda project.
+ *
+ * The contents of this file are subject to the Mozilla Public License Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis, WITHOUT WARRANTY OF
+ * ANY KIND, either express or implied. See the License for the specific language governing rights and
+ * limitations under the License.
+ *
+ * Alternatively, the contents of this file may be used under the terms of
+ * either the GNU General Public License Version 2 or later (the "GPL"), or
+ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
+ * in which case the provisions of the GPL or the LGPL are applicable instead
+ * of those above. If you wish to allow use of your version of this file only
+ * under the terms of either the GPL or the LGPL, and not to allow others to
+ * use your version of this file under the terms of the MPL, indicate your
+ * decision by deleting the provisions above and replace them with the notice
+ * and other provisions required by the GPL or the LGPL. If you do not delete
+ * the provisions above, a recipient may use your version of this file under
+ * the terms of any one of the MPL, the GPL or the LGPL.
+ */
+
+package org.equanda.plugin;
+
+import org.apache.commons.httpclient.protocol.Protocol;
+import org.apache.maven.plugin.AbstractMojo;
+import org.apache.maven.plugin.MojoExecutionException;
+import org.equanda.util.SaveException;
+import org.equanda.util.io.StreamUtil;
+import org.equanda.util.ymport.ImportCredentials;
+import org.equanda.util.ymport.ImportUtil;
+import org.equanda.util.ymport.LenientSslProtocolSocketFactory;
+
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.InputStream;
+import java.net.MalformedURLException;
+import java.net.URL;
+import java.net.URLClassLoader;
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * equanda maven plugin to send some files to the import servlet.
+ * Note that these files are assumed to be in UTF-8 encoding.
+ *
+ * @author <a href="mailto:jo...@pr...">Joachim Van der Auwera</a>
+ * @goal import
+ * @requiresDependencyResolution test
+ * @description equanda maven plugin to send some files to the import servlet
+ */
+public class ImportPlugin
+ extends AbstractMojo
+{
+ /** @parameter expression="http://localhost:8080/import" */
+ private String url;
+
+ /** @parameter expression="local" */
+ private String login;
+
+ /** @parameter expression="local" */
+ private String password;
+
+ /**
+ * Import files to import.
+ *
+ * @parameter expression=""
+ */
+ private List<String> locations;
+
+ /** @parameter expression="${basedir}/" */
+ private String basedir;
+
+ /** @parameter expression="${project.testClasspathElements}" */
+ private List<String> classpathElements;
+
+ private MojoExecutionException rememberException;
+
+ public void execute()
+ throws MojoExecutionException
+ {
+ Thread runner = new Thread()
+ {
+ public void run()
+ {
+ importLocations();
+ }
+ };
+ URLClassLoader classloader = new URLClassLoader( createClassPath(),
+ Thread.currentThread().getContextClassLoader() );
+ runner.setContextClassLoader( classloader );
+ rememberException = null;
+ runner.start();
+ try
+ {
+ runner.join();
+ if ( null != rememberException ) throw rememberException;
+ }
+ catch ( InterruptedException ie )
+ {
+ throw new MojoExecutionException( "equanda generation was interrupted" );
+ }
+ }
+
+ protected URL[] createClassPath()
+ {
+ List<URL> list = new ArrayList<URL>();
+
+ try
+ {
+ File dir = new File( basedir + "src/main/resources" );
+ if ( dir.isDirectory() ) list.add( dir.toURI().toURL() );
+ }
+ catch ( MalformedURLException mue )
+ {/*ignore*/}
+
+ // Add the projects dependencies
+ if ( classpathElements != null )
+ {
+ for ( String cpel : classpathElements )
+ {
+ try
+ {
+ list.add( new File( cpel ).toURI().toURL() );
+ }
+ catch ( MalformedURLException mue )
+ {/*ignore*/}
+ }
+ }
+ return list.toArray( new URL[list.size()] );
+ }
+
+ private void importLocations()
+ {
+ try
+ {
+ // assure SSL can be used without certificate problems...
+ Protocol myhttps = new Protocol( "https", new LenientSslProtocolSocketFactory(), 443 );
+ Protocol.registerProtocol( "https", myhttps );
+
+ if ( null == locations ) return;
+
+ ImportCredentials credentials = new ImportCredentials( login, password );
+
+ for ( String location : locations )
+ {
+ String toImport = null;
+ InputStream is = Thread.currentThread().getContextClassLoader().getResourceAsStream( location );
+ if ( null != is ) toImport = StreamUtil.slurp( is );
+ if ( null == toImport )
+ {
+ File file = new File( location );
+ if ( file.exists() ) toImport = StreamUtil.slurp( new FileInputStream( file ) );
+ }
+ if ( null == toImport ) throw new MojoExecutionException( "Could not find " + location );
+
+ log( "data to import\n" + toImport );
+ String res = ImportUtil.importData( toImport, url, credentials );
+ log( "result " + res );
+ if ( null != res ) throw new MojoExecutionException( "Import failed\n" + res );
+ }
+ }
+ catch ( MojoExecutionException mee )
+ {
+ rememberException = mee;
+ }
+ catch ( Throwable ex )
+ {
+ SaveException.saveException( ex );
+ rememberException = new MojoExecutionException( "problems while running import", ex );
+ }
+ }
+
+ private void log( String msg )
+ {
+ SaveException.error( msg );
+ }
+
+}
Modified: trunk/equanda-maven-plugin/src/site/site.xml
===================================================================
--- trunk/equanda-maven-plugin/src/site/site.xml 2008-11-13 17:19:21 UTC (rev 863)
+++ trunk/equanda-maven-plugin/src/site/site.xml 2008-11-14 13:49:11 UTC (rev 864)
@@ -11,6 +11,8 @@
<item name="Generate" href="generate.html"/>
<item name="Translate" href="translate.html"/>
<item name="Archetype" href="archetype.html"/>
+ <item name="Ddltool" href="ddltool.html"/>
+ <item name="Import" href="import.html"/>
</menu>
</body>
</project>
\ No newline at end of file
Added: trunk/equanda-maven-plugin/src/site/wiki/ddltool.wiki
===================================================================
--- trunk/equanda-maven-plugin/src/site/wiki/ddltool.wiki (rev 0)
+++ trunk/equanda-maven-plugin/src/site/wiki/ddltool.wiki 2008-11-14 13:49:11 UTC (rev 864)
@@ -0,0 +1,26 @@
+h1. Ddltool plugin
+
+This plugin allows you to automatically do database definition/update as part of your maven build.
+
+{code}
+ <plugin>
+ <groupId>org.equanda</groupId>
+ <artifactId>equanda-maven-plugin</artifactId>
+ <configuration>
+ <database>${synca.db.url}</database>
+ <dblogin>${synca.db.login}</dblogin>
+ <dbpassword>${synca.db.password}</dbpassword>
+ <dbmap>be.synergetics.ca.ddltool.EquandaMap</dbmap>
+ <ddltargets>update defaults</ddltargets>
+ </configuration>
+ <executions>
+ <execution>
+ <id>ddltool</id>
+ <phase>test-compile</phase>
+ <goals>
+ <goal>ddltool</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+{code}
Added: trunk/equanda-maven-plugin/src/site/wiki/import.wiki
===================================================================
--- trunk/equanda-maven-plugin/src/site/wiki/import.wiki (rev 0)
+++ trunk/equanda-maven-plugin/src/site/wiki/import.wiki 2008-11-14 13:49:11 UTC (rev 864)
@@ -0,0 +1,31 @@
+h1. Import plugin
+
+This plugin allows you to import data into running instance of your application using the import servlet.
+
+{code}
+<plugin>
+ <groupId>org.equanda</groupId>
+ <artifactId>equanda-maven-plugin</artifactId>
+ <configuration>
+ <url>https://localhost:8443/import</url>
+ <login>local</login>
+ <password>local</password>
+ <locations>
+ <location>organizations.import.txt</location>
+ </locations>
+ </configuration>
+ <executions>
+ <execution>
+ <id>import</id>
+ <phase>test-compile</phase>
+ <goals>
+ <goal>import</goal>
+ </goals>
+ </execution>
+ </executions>
+</plugin>
+{code}
+
+It is possible to define several files to import. THe files themselves are first searched in the classpath (test scope), or if that fails, searched on the file system.
+
+Note that when the several maven plugins with the same group/artifact id are used in one pom, then the configuration is read from the first instance (though the execution itself is correct).
Modified: trunk/equanda-server/src/test/java/org/equanda/ymport/ImportParserTest.java
===================================================================
--- trunk/equanda-server/src/test/java/org/equanda/ymport/ImportParserTest.java 2008-11-13 17:19:21 UTC (rev 863)
+++ trunk/equanda-server/src/test/java/org/equanda/ymport/ImportParserTest.java 2008-11-14 13:49:11 UTC (rev 864)
@@ -24,10 +24,8 @@
package org.equanda.ymport;
-import org.equanda.ymport.ImportParser;
-import org.equanda.ymport.ImportHandlerException;
-import org.equanda.util.ymport.ImportUtil;
import junit.framework.TestCase;
+import org.equanda.util.ymport.ImportUtil;
import java.util.Collection;
import java.util.Iterator;
Modified: trunk/equanda-util/src/main/java/org/equanda/util/ymport/ImportUtil.java
===================================================================
--- trunk/equanda-util/src/main/java/org/equanda/util/ymport/ImportUtil.java 2008-11-13 17:19:21 UTC (rev 863)
+++ trunk/equanda-util/src/main/java/org/equanda/util/ymport/ImportUtil.java 2008-11-14 13:49:11 UTC (rev 864)
@@ -33,9 +33,11 @@
import org.apache.commons.httpclient.cookie.CookiePolicy;
import org.apache.commons.httpclient.methods.GetMethod;
import org.apache.commons.httpclient.methods.PostMethod;
+import org.apache.commons.httpclient.methods.StringRequestEntity;
import org.apache.commons.httpclient.params.HttpConnectionManagerParams;
-import java.io.*;
+import java.io.BufferedReader;
+import java.io.FileReader;
import java.net.Authenticator;
import java.net.PasswordAuthentication;
@@ -128,7 +130,7 @@
// now do the real post, as otherwise the character set is not remembered
post = new PostMethod( urlString );
post.setRequestHeader( "Content-Type", "text/plain; charset=UTF-8" );
- post.setRequestBody( importData );
+ post.setRequestEntity( new StringRequestEntity( importData ) );
httpConn.executeMethod( post );
responseBody = post.getResponseBodyAsString();
post.releaseConnection();
Added: trunk/equanda-util/src/main/java/org/equanda/util/ymport/LenientSslProtocolSocketFactory.java
===================================================================
--- trunk/equanda-util/src/main/java/org/equanda/util/ymport/LenientSslProtocolSocketFactory.java (rev 0)
+++ trunk/equanda-util/src/main/java/org/equanda/util/ymport/LenientSslProtocolSocketFactory.java 2008-11-14 13:49:11 UTC (rev 864)
@@ -0,0 +1,150 @@
+/**
+ * This file is part of the equanda project.
+ *
+ * The contents of this file are subject to the Mozilla Public License Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis, WITHOUT WARRANTY OF
+ * ANY KIND, either express or implied. See the License for the specific language governing rights and
+ * limitations under the License.
+ *
+ * Alternatively, the contents of this file may be used under the terms of
+ * either the GNU General Public License Version 2 or later (the "GPL"), or
+ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
+ * in which case the provisions of the GPL or the LGPL are applicable instead
+ * of those above. If you wish to allow use of your version of this file only
+ * under the terms of either the GPL or the LGPL, and not to allow others to
+ * use your version of this file under the terms of the MPL, indicate your
+ * decision by deleting the provisions above and replace them with the notice
+ * and other provisions required by the GPL or the LGPL. If you do not delete
+ * the provisions above, a recipient may use your version of this file under
+ * the terms of any one of the MPL, the GPL or the LGPL.
+ */
+
+package org.equanda.util.ymport;
+
+import org.apache.commons.httpclient.ConnectTimeoutException;
+import org.apache.commons.httpclient.HttpClientError;
+import org.apache.commons.httpclient.params.HttpConnectionParams;
+import org.apache.commons.httpclient.protocol.ProtocolSocketFactory;
+import org.apache.log4j.Logger;
+import org.equanda.util.security.SslUtil;
+
+import javax.net.SocketFactory;
+import javax.net.ssl.SSLContext;
+import javax.net.ssl.TrustManager;
+import java.io.IOException;
+import java.net.*;
+
+/**
+ * A ssl socket factory for commons-httpclient which accepts self-signed certificates.
+ * Needs to be registered before use
+ *
+ * Protocol myhttps = new Protocol( "https", new LenientSslProtocolSocketFactory(), 443 );
+ * Protocol.registerProtocol( "https", myhttps );
+ *
+ * @author <a href="mailto:jo...@pr...">Joachim Van der Auwera</a>
+ */
+public class LenientSslProtocolSocketFactory
+ implements ProtocolSocketFactory
+{
+ private static final Logger log = Logger.getLogger( LenientSslProtocolSocketFactory.class );
+
+ private SSLContext sslcontext = null;
+
+ public LenientSslProtocolSocketFactory()
+ {
+ super();
+ }
+
+ /**
+ * Attempts to get a new socket connection to the given host within the given time limit.
+ * <p>
+ * To circumvent the limitations of older JREs that do not support connect timeout a
+ * controller thread is executed. The controller thread attempts to create a new socket
+ * within the given limit of time. If socket constructor does not return until the
+ * timeout expires, the controller terminates and throws an {@link ConnectTimeoutException}
+ * </p>
+ *
+ * @param host the host name/IP
+ * @param port the port on the host
+ * @param localAddress the local host name/IP to bind the socket to
+ * @param localPort the port on the local machine
+ * @param params {@link HttpConnectionParams Http connection parameters}
+ * @return Socket a new socket
+ * @throws IOException if an I/O error occurs while creating the socket
+ * @throws UnknownHostException if the IP address of the host cannot be
+ * determined
+ */
+ public Socket createSocket( final String host, final int port, final InetAddress localAddress, final int localPort,
+ final HttpConnectionParams params )
+ throws IOException
+ {
+ if ( null == params )
+ {
+ throw new IllegalArgumentException( "Parameters may not be null" );
+ }
+ int timeout = params.getConnectionTimeout();
+ SocketFactory socketfactory = getSSLContext().getSocketFactory();
+ if ( timeout == 0 )
+ {
+ return socketfactory.createSocket( host, port, localAddress, localPort );
+ }
+ else
+ {
+ Socket socket = socketfactory.createSocket();
+ SocketAddress localaddr = new InetSocketAddress( localAddress, localPort );
+ SocketAddress remoteaddr = new InetSocketAddress( host, port );
+ socket.bind( localaddr );
+ socket.connect( remoteaddr, timeout );
+ return socket;
+ }
+ }
+
+ public Socket createSocket( String host, int port, InetAddress clientHost, int clientPort )
+ throws IOException
+ {
+ return getSSLContext().getSocketFactory().createSocket( host, port, clientHost, clientPort );
+ }
+
+ public Socket createSocket( String host, int port )
+ throws IOException
+ {
+ return getSSLContext().getSocketFactory().createSocket( host, port );
+ }
+
+ public boolean equals( Object obj )
+ {
+ return ( ( obj != null ) && obj.getClass().equals( LenientSslProtocolSocketFactory.class ) );
+ }
+
+ public int hashCode()
+ {
+ return LenientSslProtocolSocketFactory.class.hashCode();
+ }
+
+ private static SSLContext createEasySSLContext()
+ {
+ try
+ {
+ SSLContext context = SSLContext.getInstance( "SSL" );
+ context.init( null, new TrustManager[]{ new SslUtil.TrustAllX509TrustManager() }, null );
+ return context;
+ }
+ catch ( Exception e )
+ {
+ log.error( e.getMessage(), e );
+ throw new HttpClientError( e.toString() );
+ }
+ }
+
+ private SSLContext getSSLContext()
+ {
+ if ( this.sslcontext == null )
+ {
+ this.sslcontext = createEasySSLContext();
+ }
+ return this.sslcontext;
+ }
+}
Modified: trunk/pom.xml
===================================================================
--- trunk/pom.xml 2008-11-13 17:19:21 UTC (rev 863)
+++ trunk/pom.xml 2008-11-14 13:49:11 UTC (rev 864)
@@ -425,7 +425,7 @@
<dependency>
<groupId>commons-httpclient</groupId>
<artifactId>commons-httpclient</artifactId>
- <version>2.0.2</version>
+ <version>3.1</version>
</dependency>
<dependency>
<groupId>com.toedter</groupId>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <bri...@us...> - 2008-11-13 17:19:32
|
Revision: 863
http://equanda.svn.sourceforge.net/equanda/?rev=863&view=rev
Author: brian_reynolds
Date: 2008-11-13 17:19:21 +0000 (Thu, 13 Nov 2008)
Log Message:
-----------
GlobalAuthConfig.tml.vm & GlobalAuthConfig.java.vm: Added getWrite method (combines isGui and getRole). Ensure cache is called.
AuthAndConfigField.tml.vm & AuthAndConfigGroup.tml.vm: Rename page boxes to avoid clashes. Use <div> to improve look n feel. Use new javascript methods.
TableAuthConfig.tml.vm & TableAuthConfig.java.vm: Added getWrite method (combines isGui and getRole). Rename page boxes to avoid clashes. Use <div> to improve look n feel. Use new javascript methods.
authandconfig.js: Added methods to handle read clicks at field level. Added methods to determine if any or all boxes are checked within a fieldset. Added a method to set all checkboxes within a fieldset. Improve code formatting.
Modified Paths:
--------------
trunk/equanda-generate/src/main/velocity/t5gui/pages/AuthAndConfigField.tml.vm
trunk/equanda-generate/src/main/velocity/t5gui/pages/AuthAndConfigGroup.tml.vm
trunk/equanda-generate/src/main/velocity/t5gui/pages/GlobalAuthConfig.java.vm
trunk/equanda-generate/src/main/velocity/t5gui/pages/GlobalAuthConfig.tml.vm
trunk/equanda-generate/src/main/velocity/t5gui/pages/TableAuthConfig.java.vm
trunk/equanda-generate/src/main/velocity/t5gui/pages/TableAuthConfig.tml.vm
trunk/equanda-tapestry5/src/main/resources/org/equanda/tapestry5/resources/authandconfig.js
Modified: trunk/equanda-generate/src/main/velocity/t5gui/pages/AuthAndConfigField.tml.vm
===================================================================
--- trunk/equanda-generate/src/main/velocity/t5gui/pages/AuthAndConfigField.tml.vm 2008-11-13 09:38:19 UTC (rev 862)
+++ trunk/equanda-generate/src/main/velocity/t5gui/pages/AuthAndConfigField.tml.vm 2008-11-13 17:19:21 UTC (rev 863)
@@ -6,25 +6,43 @@
$!{page.Name}
-#set ($readBox="${page.Name}_page_readCheck")
-#set ($writeBox="${page.Name}_page_writeCheck")
- <input t:id="${readBox}" name="${readBox}" value="${readBox}" onclick="eqDisableBoxes( ${readBox}, ${writeBox}, false, false, false)" t:type="CheckBox"/>
+#set ($readBox="${page.Name}_pageReadCheck")
+#set ($writeBox="${page.Name}_pageWriteCheck")
+ <input t:id="${readBox}" name="${readBox}" value="${readBox}"
+ onclick="eqHandlePageReadBox( ${readBox}, '$!{page.Name}', '_readCheck')" t:type="CheckBox"/>
<t:if test="roleName">
- <t:label for="${readBox}">${dollar}{equanda-message:authAndConfig.label.Read}</t:label>
+ <t:label for="${readBox}"> ${dollar}{equanda-message:authAndConfig.label.Read} </t:label>
<t:parameter name="else">
- <t:label for="${readBox}">${dollar}{equanda-message:authAndConfig.label.Visible}</t:label>
+ <t:label for="${readBox}"> ${dollar}{equanda-message:authAndConfig.label.Visible} </t:label>
</t:parameter>
</t:if>
- <t:if test="equanda-readable:page.${table.Name}.${page.Name}">
+ <!--
+ <t:if test="writeAllowed">
<input t:id="${writeBox}" name="${writeBox}" value="${writeBox}" onclick="eqEnableBoxes( ${readBox}, ${writeBox}, false)" t:type="CheckBox"/>
- <t:label for="${writeBox}">${dollar}{equanda-message:authAndConfig.label.Write}</t:label>
+ <t:label for="${writeBox}"> ${dollar}{equanda-message:authAndConfig.label.Write} </t:label>
</t:if>
- <br/>
-
+ -->
+
</legend>
+ <div>
+ <t:if test="roleName">
+ <div class="readCol">${dollar}{equanda-message:authAndConfig.label.Read}</div>
+ <t:parameter name="else">
+ <div class="readCol">${dollar}{equanda-message:authAndConfig.label.Visible}</div>
+ </t:parameter>
+ </t:if>
+ <t:if test="writeAllowed">
+ <div class="writeCol">${dollar}{equanda-message:authAndConfig.label.Write}</div>
+ </t:if>
+ <div class="listCol">${dollar}{equanda-message:authAndConfig.label.List}</div>
+ <div class="summaryCol">${dollar}{equanda-message:authAndConfig.label.Summary}</div>
+ <div class="printCol">${dollar}{equanda-message:authAndConfig.label.Print}</div>
+ </div>
+ <br/>
+
#foreach( $field in $page.Fields)
#set ($readBox="${field.Name}_readCheck")
#set ($writeBox="${field.Name}_writeCheck")
@@ -33,32 +51,42 @@
#set ($printBox="${field.Name}_printCheck")
<t:if test="equanda-readable:field.${table.Name}.${field.Name}">
+
+ <div>
- <label>${dollar}{equanda-message:field.${table.Name}.${field.Name}}</label><br/>
+ <div class="nameCol">
+ <label>${dollar}{equanda-message:field.${table.Name}.${field.Name}}</label>
+ </div>
+
+ <div class="readCol">
+ <input t:id="${readBox}" name="${readBox}" value="${readBox}"
+ onclick="eqHandleFieldReadBox( ${page.Name}_pageReadCheck, this, ${writeBox}, ${listBox}, ${summaryBox}, ${printBox} )" t:type="CheckBox"/>
+ </div>
+ <t:if test="writeAllowed">
+ <div class="writeCol">
+ <input t:id="${writeBox}" name="${writeBox}" value="${writeBox}"
+ onclick="eqEnableBoxes( ${readBox}, ${writeBox}, false)" t:type="CheckBox"/>
+ </div>
+ </t:if>
- <input t:id="${readBox}" name="${readBox}" value="${readBox}" onclick="eqDisableBoxes( ${readBox}, ${writeBox}, ${listBox}, ${summaryBox}, ${printBox})" t:type="CheckBox"/>
- <t:if test="roleName">
- <t:label for="${readBox}">${dollar}{equanda-message:authAndConfig.label.Read}</t:label>
- <t:parameter name="else">
- <t:label for="${readBox}">${dollar}{equanda-message:authAndConfig.label.Visible}</t:label>
- </t:parameter>
- </t:if>
+ <div class="listCol">
+ <input t:id="${listBox}" name="${listBox}" value="${listBox}"
+ onclick="eqEnableBoxes( ${readBox}, ${listBox}, false)" t:type="CheckBox"/>
+ </div>
- <input t:id="${writeBox}" name="${writeBox}" value="${writeBox}" onclick="eqEnableBoxes( ${readBox}, ${writeBox}, false)" t:type="CheckBox"/>
- <t:label for="${writeBox}">${dollar}{equanda-message:authAndConfig.label.Write}</t:label>
+ <div class="summaryCol">
+ <input t:id="${summaryBox}" name="${summaryBox}" value="${summaryBox}"
+ onclick="eqEnableBoxes( ${readBox}, ${summaryBox}, false)" t:type="CheckBox"/>
+ </div>
- <input t:id="${listBox}" name="${listBox}" value="${listBox}" onclick="eqEnableBoxes( ${readBox}, ${listBox}, false)" t:type="CheckBox"/>
- <t:label for="${listBox}">${dollar}{equanda-message:authAndConfig.label.List}</t:label>
-
- <input t:id="${summaryBox}" name="${summaryBox}" value="${summaryBox}" onclick="eqEnableBoxes( ${readBox}, ${summaryBox}, false)" t:type="CheckBox"/>
- <t:label for="${summaryBox}">${dollar}{equanda-message:authAndConfig.label.Summary}</t:label>
-
- <input t:id="${printBox}" name="${printBox}" value="${printBox}" onclick="eqEnableBoxes( ${readBox}, ${printBox}, false)" t:type="CheckBox"/>
- <t:label for="${printBox}">${dollar}{equanda-message:authAndConfig.label.Print}</t:label>
+ <div class="printCol">
+ <input t:id="${printBox}" name="${printBox}" value="${printBox}"
+ onclick="eqEnableBoxes( ${readBox}, ${printBox}, false)" t:type="CheckBox"/>
+ </div>
+ </div>
<br/>
- <br/>
</t:if>
#end
Modified: trunk/equanda-generate/src/main/velocity/t5gui/pages/AuthAndConfigGroup.tml.vm
===================================================================
--- trunk/equanda-generate/src/main/velocity/t5gui/pages/AuthAndConfigGroup.tml.vm 2008-11-13 09:38:19 UTC (rev 862)
+++ trunk/equanda-generate/src/main/velocity/t5gui/pages/AuthAndConfigGroup.tml.vm 2008-11-13 17:19:21 UTC (rev 863)
@@ -10,24 +10,44 @@
$!{group.Name}
-#set ($readBox="${group.Name}_group_readCheck")
-#set ($writeBox="${group.Name}_group_writeCheck")
- <input t:id="${readBox}" name="${readBox}" value="${readBox}" onclick="eqDisableBoxes( ${readBox}, ${writeBox}, false, false, false)" t:type="CheckBox"/>
+#set ($readBox="${group.Name}_groupReadCheck")
+#set ($writeBox="${group.Name}_groupWriteCheck")
+ <input t:id="${readBox}" name="${readBox}" value="${readBox}"
+ onclick="eqHandlePageReadBox( ${readBox}, '$!{group.Name}', '_readCheck')"
+ t:type="CheckBox"/>
<t:if test="roleName">
- <t:label for="${readBox}">${dollar}{equanda-message:authAndConfig.label.Read}</t:label>
+ <t:label for="${readBox}"> ${dollar}{equanda-message:authAndConfig.label.Read} </t:label>
<t:parameter name="else">
- <t:label for="${readBox}">${dollar}{equanda-message:authAndConfig.label.Visible}</t:label>
+ <t:label for="${readBox}"> ${dollar}{equanda-message:authAndConfig.label.Visible} </t:label>
</t:parameter>
</t:if>
- <t:if test="equanda-readable:group.${table.Name}.${group.Name}">
+ <!--
+ <t:if test="writeAllowed">
<input t:id="${writeBox}" name="${writeBox}" value="${writeBox}" onclick="eqEnableBoxes( ${readBox}, ${writeBox},false)" t:type="CheckBox"/>
- <t:label for="${writeBox}">${dollar}{equanda-message:authAndConfig.label.Write}</t:label>
+ <t:label for="${writeBox}"> ${dollar}{equanda-message:authAndConfig.label.Write} </t:label>
</t:if>
+ -->
</legend>
+ <div>
+ <t:if test="roleName">
+ <div class="readCol">${dollar}{equanda-message:authAndConfig.label.Read}</div>
+ <t:parameter name="else">
+ <div class="readCol">${dollar}{equanda-message:authAndConfig.label.Visible}</div>
+ </t:parameter>
+ </t:if>
+ <t:if test="writeAllowed">
+ <div class="writeCol">${dollar}{equanda-message:authAndConfig.label.Write}</div>
+ </t:if>
+ <div class="listCol">${dollar}{equanda-message:authAndConfig.label.List}</div>
+ <div class="summaryCol">${dollar}{equanda-message:authAndConfig.label.Summary}</div>
+ <div class="printCol">${dollar}{equanda-message:authAndConfig.label.Print}</div>
+ </div>
+ <br/>
+
#foreach( $field in $group.Fields)
#set ($readBox="${field.Name}_readCheck")
#set ($writeBox="${field.Name}_writeCheck")
@@ -37,31 +57,39 @@
<t:if test="equanda-readable:field.${table.Name}.${field.Name}">
- <label>${dollar}{equanda-message:field.${table.Name}.${field.Name}}</label><br/>
+ <div>
+
+ <div class="nameCol">
+ <label>${dollar}{equanda-message:field.${table.Name}.${field.Name}}</label><br/>
+ </div>
- <input t:id="${readBox}" name="${readBox}" value="${readBox}" onclick="eqDisableBoxes( ${readBox}, ${writeBox}, ${listBox}, ${summaryBox}, ${printBox})" t:type="CheckBox"/>
+ <div class="readCol">
+ <input t:id="${readBox}" name="${readBox}" value="${readBox}"
+ onclick="eqHandleFieldReadBox( ${group.Name}_groupReadCheck, this, ${writeBox}, ${listBox}, ${summaryBox}, ${printBox} )" t:type="CheckBox"/>
+ </div>
- <t:if test="roleName">
- <t:label for="${readBox}">${dollar}{equanda-message:authAndConfig.label.Read}</t:label>
- <t:parameter name="else">
- <t:label for="${readBox}">${dollar}{equanda-message:authAndConfig.label.Visible}</t:label>
- </t:parameter>
- </t:if>
+ <div class="writeCol">
+ <input t:id="${writeBox}" name="${writeBox}" value="${writeBox}"
+ onclick="eqEnableBoxes( ${readBox}, ${writeBox}, false)" t:type="CheckBox"/>
+ </div>
+
+ <div class="listCol">
+ <input t:id="${listBox}" name="${listBox}" value="${listBox}"
+ onclick="eqEnableBoxes( ${readBox}, ${listBox}, false)" t:type="CheckBox"/>
+ </div>
+
+ <div class="summaryCol">
+ <input t:id="${summaryBox}" name="${summaryBox}" value="${summaryBox}"
+ onclick="eqEnableBoxes( ${readBox}, ${summaryBox}, false)" t:type="CheckBox"/>
+ </div>
- <input t:id="${writeBox}" name="${writeBox}" value="${writeBox}" onclick="eqEnableBoxes( ${readBox}, ${writeBox}, false)" t:type="CheckBox"/>
- <t:label for="${writeBox}">${dollar}{equanda-message:authAndConfig.label.Write}</t:label>
+ <div class="printCol">
+ <input t:id="${printBox}" name="${printBox}" value="${printBox}"
+ onclick="eqEnableBoxes( ${readBox}, ${printBox}, false)" t:type="CheckBox"/>
+ </div>
- <input t:id="${listBox}" name="${listBox}" value="${listBox}" onclick="eqEnableBoxes( ${readBox}, ${listBox}, false)" t:type="CheckBox"/>
- <t:label for="${listBox}">${dollar}{equanda-message:authAndConfig.label.List}</t:label>
-
- <input t:id="${summaryBox}" name="${summaryBox}" value="${summaryBox}" onclick="eqEnableBoxes( ${readBox}, ${summaryBox}, false)" t:type="CheckBox"/>
- <t:label for="${summaryBox}">${dollar}{equanda-message:authAndConfig.label.Summary}</t:label>
-
- <input t:id="${printBox}" name="${printBox}" value="${printBox}" onclick="eqEnableBoxes( ${readBox}, ${printBox}, false)" t:type="CheckBox"/>
- <t:label for="${printBox}">${dollar}{equanda-message:authAndConfig.label.Print}</t:label>
-
+ </div>
<br/>
- <br/>
</t:if>
#end
Modified: trunk/equanda-generate/src/main/velocity/t5gui/pages/GlobalAuthConfig.java.vm
===================================================================
--- trunk/equanda-generate/src/main/velocity/t5gui/pages/GlobalAuthConfig.java.vm 2008-11-13 09:38:19 UTC (rev 862)
+++ trunk/equanda-generate/src/main/velocity/t5gui/pages/GlobalAuthConfig.java.vm 2008-11-13 17:19:21 UTC (rev 863)
@@ -87,6 +87,12 @@
return isGuiAdmin;
}
+ private boolean writeAllowed;
+ public boolean getWriteAllowed()
+ {
+ return getIsGuiAdmin() && (getRoleName() != null);
+ }
+
@Persist
private Object returnPage;
public Object getReturnPage()
@@ -158,6 +164,14 @@
{
aacProvider.setHidden(key);
}
+
+ if( this.roleName != null ){
+ LoginCache.setRoleAuths( this.roleName, aacProvider ) ;
+ }
+ else
+ {
+ LoginCache.setUserAuths( loginInfoService.getLoginInfo().getUser().getUserName(), aacProvider );
+ }
}
public void onSelectedFromSave()
Modified: trunk/equanda-generate/src/main/velocity/t5gui/pages/GlobalAuthConfig.tml.vm
===================================================================
--- trunk/equanda-generate/src/main/velocity/t5gui/pages/GlobalAuthConfig.tml.vm 2008-11-13 09:38:19 UTC (rev 862)
+++ trunk/equanda-generate/src/main/velocity/t5gui/pages/GlobalAuthConfig.tml.vm 2008-11-13 17:19:21 UTC (rev 863)
@@ -30,14 +30,14 @@
<input name="allRead" type="checkbox" onclick="eqEnableMultiple( allRead, '_readCheck' )" />
</th>
- <t:if test="isGuiAdmin">
+ <t:if test="writeAllowed">
<th>
${dollar}{equanda-message:authAndConfig.label.Write}
<input name="allWrite" type="checkbox" onclick="eqEnableMultiple( allWrite, '_writeCheck' )" />
</th>
</t:if>
- <t:if test="isGuiAdmin">
+ <t:if test="writeAllowed">
<th>
${dollar}{equanda-message:authAndConfig.label.Delete}
<input name="allDelete" type="checkbox" onclick="eqEnableMultiple( allDelete, '_deleteCheck' )" />
@@ -65,25 +65,21 @@
</td>
<td style="align: center;">
- <input t:id="${readBox}" name="${readBox}" t:value="${readBox}"
- onclick="eqHandleReadBox( ${readBox}, ${writeBox}, ${deleteBox}, 'configurelink_${table.Name}')" t:type="CheckBox" />
+ <input t:id="${readBox}" name="${readBox}" t:value="${readBox}"
+ onclick="eqHandleReadBox( ${readBox}, '${writeBox}', '${deleteBox}', 'configurelink_${table.Name}')" t:type="CheckBox" />
</td>
-
- <t:if test="isGuiAdmin">
+
+ <t:if test="writeAllowed">
<td style="align: center;">
- <t:if test="equanda-writable:table.${table.Name}">
<input t:id="${writeBox}" name="${writeBox}" t:value="${writeBox}"
onclick="eqHandleWriteBox( ${readBox}, ${writeBox}, ${deleteBox})" t:type="CheckBox" />
- </t:if>
</td>
</t:if>
- <t:if test="isGuiAdmin">
+ <t:if test="writeAllowed">
<td style="align: center;">
- <t:if test="equanda-writable:table.${table.Name}">
<input t:id="${deleteBox}" name="${deleteBox}" t:value="${deleteBox}"
onclick="eqHandleDeleteBox( ${readBox}, ${writeBox}, ${deleteBox})" t:type="CheckBox" />
- </t:if>
</td>
</t:if>
Modified: trunk/equanda-generate/src/main/velocity/t5gui/pages/TableAuthConfig.java.vm
===================================================================
--- trunk/equanda-generate/src/main/velocity/t5gui/pages/TableAuthConfig.java.vm 2008-11-13 09:38:19 UTC (rev 862)
+++ trunk/equanda-generate/src/main/velocity/t5gui/pages/TableAuthConfig.java.vm 2008-11-13 17:19:21 UTC (rev 863)
@@ -108,10 +108,16 @@
return roleName;
}
+ private boolean writeAllowed;
+ public boolean getWriteAllowed()
+ {
+ return getIsGuiAdmin() && (getRoleName() != null);
+ }
+
## R/W checkboxes for every group Pages
#foreach( $page in $table.Pages )
-#set ($readBox="${page.Name}_page_readCheck")
-#set ($writeBox="${page.Name}_page_writeCheck")
+#set ($readBox="${page.Name}_pageReadCheck")
+#set ($writeBox="${page.Name}_pageWriteCheck")
@Persist
private boolean $readBox;
public boolean get$readBox(){ return $readBox; }
@@ -127,8 +133,8 @@
## R/W checkboxes for every group Groups
#foreach( $page in $table.Pages )
#foreach( $group in $page.Groups)
-#set ($readBox="${group.Name}_group_readCheck")
-#set ($writeBox="${group.Name}_group_writeCheck")
+#set ($readBox="${group.Name}_groupReadCheck")
+#set ($writeBox="${group.Name}_groupWriteCheck")
@Persist
private boolean $readBox;
public boolean get$readBox(){ return $readBox; }
@@ -296,7 +302,7 @@
}
else
{
- LoginCache.setRoleAuths( loginInfoService.getLoginInfo().getUser().getUserName(), aacProvider );
+ LoginCache.setUserAuths( loginInfoService.getLoginInfo().getUser().getUserName(), aacProvider );
}
}
Modified: trunk/equanda-generate/src/main/velocity/t5gui/pages/TableAuthConfig.tml.vm
===================================================================
--- trunk/equanda-generate/src/main/velocity/t5gui/pages/TableAuthConfig.tml.vm 2008-11-13 09:38:19 UTC (rev 862)
+++ trunk/equanda-generate/src/main/velocity/t5gui/pages/TableAuthConfig.tml.vm 2008-11-13 17:19:21 UTC (rev 863)
@@ -34,11 +34,11 @@
<legend>${dollar}{equanda-message:SelectsSection}</legend>
#foreach( $select in $table.SelectsNotHidden)
#set ($selectBox="${select.Name}_selectCheck")
- <p>${dollar}{equanda-message:select.${table.Name}.${select.Name}}</p>
- <input t:id="$selectBox" value="$selectBox" t:type="CheckBox"/>
- <t:label for="${selectBox}">${dollar}{equanda-message:authAndConfig.label.Enable}</t:label>
+ <div class="nameCol">${dollar}{equanda-message:select.${table.Name}.${select.Name}}</div>
+ <div class="readCol">
+ <input t:id="$selectBox" value="$selectBox" t:type="CheckBox"/>
+ </div>
<br/>
- <br/>
#end
</fieldset>
#end
@@ -51,11 +51,11 @@
<legend>${dollar}{equanda-message:ActionsSection}</legend>
#foreach( $action in $table.Actions)
#set ($actionBox="${action.Name}_actionCheck")
- <p>${dollar}{equanda-message:action.${table.Name}.${action.Name}}</p>
- <input t:id="$actionBox" value="$actionBox" t:type="CheckBox"/>
- <t:label for="${actionBox}">${dollar}{equanda-message:authAndConfig.label.Enable}</t:label>
+ <div class="nameCol">${dollar}{equanda-message:action.${table.Name}.${action.Name}}</div>
+ <div class="readCol">
+ <input t:id="$actionBox" value="$actionBox" t:type="CheckBox"/>
+ </div>
<br/>
- <br/>
#end
</fieldset>
#end
Modified: trunk/equanda-tapestry5/src/main/resources/org/equanda/tapestry5/resources/authandconfig.js
===================================================================
--- trunk/equanda-tapestry5/src/main/resources/org/equanda/tapestry5/resources/authandconfig.js 2008-11-13 09:38:19 UTC (rev 862)
+++ trunk/equanda-tapestry5/src/main/resources/org/equanda/tapestry5/resources/authandconfig.js 2008-11-13 17:19:21 UTC (rev 863)
@@ -40,25 +40,84 @@
}
-function eqHandleReadBox( readBox, writeBox, deleteBox, trName )
+/**
+ * Ensure other components are enabled/disabled when read is checked or unchecked
+ *
+ * @param Checkbox readbox The read checkbox object (this)
+ * @param String writeBoxName The name of the write box to be disabled
+ * @param String deleteBoxName The name of the delete box to be disabled
+ * @param String trName The name of the tr element that contains the Configure link to be disabled.
+ */
+function eqHandleReadBox( readBox, writeBoxName, deleteBoxName, trName )
{
if( readBox.checked == false )
{
- writeBox.checked = false;
- deleteBox.checked = false;
+ var writeInput = $$( "input#" + writeBoxName );
+ if( writeInput.length != 0 )
+ writeInput[ 0 ].checked = false;
+
+ var deleteInput = $$( "input#" + deleteBoxName );
+ if( deleteInput.length != 0 )
+ deleteInput[ 0 ].checked = false;
}
if( trName != null )
{
- var allLinks=$$('tr#' + trName + ' a' );
+ var allLinks = $$( 'tr#' + trName + ' a' );
if( readBox.checked == true )
- allLinks[0].show();
+ allLinks[ 0 ].show();
else
- allLinks[0].hide();
+ allLinks[ 0 ].hide();
}
}
+/**
+ *
+ */
+function eqHandlePageReadBox( pageReadBox, fieldSetId, inputId )
+{
+ if( pageReadBox.checked == false )
+ {
+ if( anyFieldsChecked( fieldSetId, inputId ) && allFieldsChecked( fieldSetId, inputId ) == false )
+ {
+ // if pageCheck=true and is clicked again (thus firing this event),
+ // it enables all field boxes, and stay enabled.
+ setFieldChecks( true, fieldSetId, inputId );
+ pageReadBox.checked = true;
+ }
+ else
+ {
+ // if any field boxes are already enabled, it should uncheck all field boxes
+ setFieldChecks( false, fieldSetId, inputId );
+ }
+ }
+}
+
+/**
+ *
+ */
+function eqHandleFieldReadBox( pageReadCheck, fieldReadCheck, fieldWriteCheck, fieldListCheck, fieldSummaryCheck, fieldPrintCheck )
+{
+ if( pageReadCheck.checked == false && fieldReadCheck.checked == true)
+ pageReadCheck.click();
+
+ if( fieldReadCheck.checked == false )
+ {
+ fieldWriteCheck.checked=false;
+ fieldListCheck.checked=false;
+ fieldSummaryCheck.checked=false;
+ fieldPrintCheck.checked=false;
+ }
+}
+
+/**
+ * Ensure other components are enabled/disabled when write is checked or unchecked
+ *
+ * @param Checkbox readbox The read checkbox object
+ * @param Checkbox writeBox The read checkbox object (this)
+ * @param Checkbox deleteBox The read checkbox object
+ */
function eqHandleWriteBox( readBox, writeBox, deleteBox )
{
if( writeBox.checked == true )
@@ -73,6 +132,9 @@
}
}
+/**
+ * Ensure other components are enabled/disabled when delete is checked or unchecked
+ */
function eqHandleDeleteBox( readBox, writeBox, deleteBox )
{
if( deleteBox.checked == true )
@@ -80,28 +142,86 @@
if( writeBox.checked == false )
writeBox.click();
}
-
- if( deleteBox.checked == false )
+}
+
+/**
+ * Determine if any of the checkbox within the given fieldSetId are checked
+ *
+ * @param String fieldSetId The id attribute of the field set
+ * @param String inputId The name of the checkboxes that are to be inspected
+ * @return True if there are unchecked boxes
+ * False if all boxes are checked
+ */
+function anyFieldsChecked( fieldSetId, inputId )
+{
+ var allInputs = $$( 'fieldSet#' + fieldSetId + " input" );
+ for( i = 0; i < allInputs.length; i++ )
{
- if( writeBox.checked == true )
- writeBox.click();
- }
+ if( allInputs[ i ].name.match( inputId ) )
+ {
+ if( allInputs[ i ].checked )
+ return true;
+ }
+ }
+ return false;
}
/**
+ * Determine if all of the checkbox within the given fieldSetId are checked
+ *
+ * @param String fieldSetId The id attribute of the field set
+ * @param String inputId The name of the checkboxes that are to be inspected
+ * @return boolean True if there all boxes are checked
+
+ */
+function allFieldsChecked( fieldSetId, inputId )
+{
+ var allInputs = $$( 'fieldSet#' + fieldSetId + " input" );
+ for( i = 0; i < allInputs.length; i++ )
+ {
+ if( allInputs[ i ].name.match( inputId ) )
+ {
+ if( allInputs[ i ].checked == false)
+ return false;
+ }
+ }
+ return true;
+}
+
+/**
+ * Set all the checkboxes for a given fieldSetId to to given value
+ *
+ * @param boolean value The value to set the boxes to
+ * @param String fieldSetId The id attribute of the field set
+ * @param String inputId The name of the checkboxes that need to be enabled.
+ */
+function setFieldChecks( value, fieldSetId, inputId )
+{
+ var allInputs = $$( 'fieldSet#' + fieldSetId + " input" );
+ for( i = 0; i < allInputs.length; i++ )
+ {
+ if( allInputs[ i ].name.match( inputId ) )
+ {
+ if( allInputs[ i ].checked != value )
+ allInputs[ i ].click();
+ }
+ }
+}
+
+/**
* Allow a "master" checkbox to turn on a number of others.
*/
function eqEnableMultiple( masterCheck, identityString )
{
// var allInputs=$$( 'fieldSet#' + identityString + ' input');
- var allInputs=$$('input');
+ var allInputs=$$( 'input' );
for(i = 0; i < allInputs.length; i++)
{
- var inputNameAttr = allInputs[i].attributes.getNamedItem("name").nodeValue;
+ var inputNameAttr = allInputs[ i ].attributes.getNamedItem( "name" ).nodeValue;
if( inputNameAttr.match( identityString ) )
{
- if( allInputs[i].checked != masterCheck.checked ){
- allInputs[i].click();
+ if( allInputs[ i ].checked != masterCheck.checked ){
+ allInputs[ i ].click();
}
}
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <bri...@us...> - 2008-11-13 09:38:24
|
Revision: 862
http://equanda.svn.sourceforge.net/equanda/?rev=862&view=rev
Author: brian_reynolds
Date: 2008-11-13 09:38:19 +0000 (Thu, 13 Nov 2008)
Log Message:
-----------
Added delete binding
Modified Paths:
--------------
trunk/equanda-t5gui/src/main/java/org/equanda/t5gui/services/T5guiModule.java
Added Paths:
-----------
trunk/equanda-t5gui/src/main/java/org/equanda/t5gui/bindings/AuthDeleteFactory.java
Added: trunk/equanda-t5gui/src/main/java/org/equanda/t5gui/bindings/AuthDeleteFactory.java
===================================================================
--- trunk/equanda-t5gui/src/main/java/org/equanda/t5gui/bindings/AuthDeleteFactory.java (rev 0)
+++ trunk/equanda-t5gui/src/main/java/org/equanda/t5gui/bindings/AuthDeleteFactory.java 2008-11-13 09:38:19 UTC (rev 862)
@@ -0,0 +1,70 @@
+/**
+ * This file is part of the equanda project.
+ *
+ * The contents of this file are subject to the Mozilla Public License Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis, WITHOUT WARRANTY OF
+ * ANY KIND, either express or implied. See the License for the specific language governing rights and
+ * limitations under the License.
+ *
+ * Alternatively, the contents of this file may be used under the terms of
+ * either the GNU General Public License Version 2 or later (the "GPL"), or
+ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
+ * in which case the provisions of the GPL or the LGPL are applicable instead
+ * of those above. If you wish to allow use of your version of this file only
+ * under the terms of either the GPL or the LGPL, and not to allow others to
+ * use your version of this file under the terms of the MPL, indicate your
+ * decision by deleting the provisions above and replace them with the notice
+ * and other provisions required by the GPL or the LGPL. If you do not delete
+ * the provisions above, a recipient may use your version of this file under
+ * the terms of any one of the MPL, the GPL or the LGPL.
+ */
+
+package org.equanda.t5gui.bindings;
+
+import org.apache.tapestry5.Binding;
+import org.apache.tapestry5.ComponentResources;
+import org.apache.tapestry5.ioc.Location;
+import org.apache.tapestry5.services.BindingFactory;
+import org.equanda.client.AuthAndConfigProvider;
+import org.equanda.t5gui.services.LoginInfoService;
+
+/**
+ * Binding prefix factory for "equanda-delete".
+ *
+ * @author <a href="mailto:bri...@ri...">Brian Reynolds</a>
+ */
+public class AuthDeleteFactory
+ implements BindingFactory
+{
+ LoginInfoService loginInfo;
+
+ public AuthDeleteFactory( LoginInfoService loginInfo )
+ {
+ this.loginInfo = loginInfo;
+ }
+
+ /**
+ * Creates new manifest binding
+ *
+ * @param description of the binding
+ * @param container the component, as represented by its resources, for which a binding is to be created.
+ * @param componentResources the component whose parameter is to be bound by the resulting binding (rarely used)
+ * @param expression expression
+ * @param location from which the binding was generate, or null if not known
+ * @return the new equanda message binding instance
+ */
+ public Binding newBinding( String description, ComponentResources container, ComponentResources componentResources,
+ String expression, Location location )
+ {
+ return new AuthAndConfigBinding( loginInfo, expression )
+ {
+ public boolean get( AuthAndConfigProvider aac, String expression )
+ {
+ return aac.isDelete( expression );
+ }
+ };
+ }
+}
Modified: trunk/equanda-t5gui/src/main/java/org/equanda/t5gui/services/T5guiModule.java
===================================================================
--- trunk/equanda-t5gui/src/main/java/org/equanda/t5gui/services/T5guiModule.java 2008-11-12 16:41:43 UTC (rev 861)
+++ trunk/equanda-t5gui/src/main/java/org/equanda/t5gui/services/T5guiModule.java 2008-11-13 09:38:19 UTC (rev 862)
@@ -265,6 +265,7 @@
configuration.add( "has-equanda-message", new HasEquandaMessageBindingFactory( messagesSource ) );
configuration.add( "equanda-readable", new AuthReadableFactory( loginInfo ) );
configuration.add( "equanda-writable", new AuthWritableFactory( loginInfo ) );
+ configuration.add( "equanda-delete", new AuthDeleteFactory( loginInfo ) );
configuration.add( "equanda-summary", new DisplaySummaryFactory( loginInfo ) );
configuration.add( "equanda-list", new DisplayListFactory( loginInfo ) );
configuration.add( "equanda-print", new DisplayPrintFactory( loginInfo ) );
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <bri...@us...> - 2008-11-12 16:41:54
|
Revision: 861
http://equanda.svn.sourceforge.net/equanda/?rev=861&view=rev
Author: brian_reynolds
Date: 2008-11-12 16:41:43 +0000 (Wed, 12 Nov 2008)
Log Message:
-----------
Correct typo
Modified Paths:
--------------
trunk/equanda-generate/src/main/velocity/t5gui/pages/TableAuthConfig.tml.vm
Modified: trunk/equanda-generate/src/main/velocity/t5gui/pages/TableAuthConfig.tml.vm
===================================================================
--- trunk/equanda-generate/src/main/velocity/t5gui/pages/TableAuthConfig.tml.vm 2008-11-12 16:38:05 UTC (rev 860)
+++ trunk/equanda-generate/src/main/velocity/t5gui/pages/TableAuthConfig.tml.vm 2008-11-12 16:41:43 UTC (rev 861)
@@ -31,7 +31,7 @@
## Render selects
#if( !$table.SelectsNotHidden.isEmpty() )
<fieldset>
- <legend>${dollar}{equanda-message:SelectsSection</legend>
+ <legend>${dollar}{equanda-message:SelectsSection}</legend>
#foreach( $select in $table.SelectsNotHidden)
#set ($selectBox="${select.Name}_selectCheck")
<p>${dollar}{equanda-message:select.${table.Name}.${select.Name}}</p>
@@ -48,7 +48,7 @@
## Render actions
#if( !$table.Actions.isEmpty() )
<fieldset>
- <legend>${dollar}{equanda-message:ActionsSection</legend>
+ <legend>${dollar}{equanda-message:ActionsSection}</legend>
#foreach( $action in $table.Actions)
#set ($actionBox="${action.Name}_actionCheck")
<p>${dollar}{equanda-message:action.${table.Name}.${action.Name}}</p>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <bri...@us...> - 2008-11-12 16:38:08
|
Revision: 860
http://equanda.svn.sourceforge.net/equanda/?rev=860&view=rev
Author: brian_reynolds
Date: 2008-11-12 16:38:05 +0000 (Wed, 12 Nov 2008)
Log Message:
-----------
translations-common.txt: Added labels for AAC messages.
TableAuthConfig.tml.vm, AuthAndConfigGroup.tml.vm, AuthAndConfigField.tml.vm, GlobalAuthConfig.tml.vm: Use equanda-message
TableAuthConfig.java.vm: Code tidy. Persist rights correct
GlobalAuthConfig.java.vm: Code tidy.
authandconfig.js: Clean up the eqDisableBoxes function
Modified Paths:
--------------
trunk/equanda-client/src/main/resources/org/equanda/translations/translations-common.txt
trunk/equanda-generate/src/main/velocity/t5gui/pages/AuthAndConfigField.tml.vm
trunk/equanda-generate/src/main/velocity/t5gui/pages/AuthAndConfigGroup.tml.vm
trunk/equanda-generate/src/main/velocity/t5gui/pages/GlobalAuthConfig.java.vm
trunk/equanda-generate/src/main/velocity/t5gui/pages/GlobalAuthConfig.tml.vm
trunk/equanda-generate/src/main/velocity/t5gui/pages/TableAuthConfig.java.vm
trunk/equanda-generate/src/main/velocity/t5gui/pages/TableAuthConfig.tml.vm
trunk/equanda-tapestry5/src/main/resources/org/equanda/tapestry5/resources/authandconfig.js
Modified: trunk/equanda-client/src/main/resources/org/equanda/translations/translations-common.txt
===================================================================
--- trunk/equanda-client/src/main/resources/org/equanda/translations/translations-common.txt 2008-11-12 15:31:07 UTC (rev 859)
+++ trunk/equanda-client/src/main/resources/org/equanda/translations/translations-common.txt 2008-11-12 16:38:05 UTC (rev 860)
@@ -507,6 +507,26 @@
.label.en Configure Tables
.key authAndConfig.configure/equanda-fixed
.label.en Auth and Config settings for
+.key authAndConfig.label.Table/equanda-fixed
+.label.en Table Name
+.key authAndConfig.label.Read/equanda-fixed
+.label.en Read
+.key authAndConfig.label.Write/equanda-fixed
+.label.en Write
+.key authAndConfig.label.Delete/equanda-fixed
+.label.en Delete
+.key authAndConfig.label.Visible/equanda-fixed
+.label.en Visible
+.key authAndConfig.label.List/equanda-fixed
+.label.en List
+.key authAndConfig.label.Summary/equanda-fixed
+.label.en Summary
+.key authAndConfig.label.Print/equanda-fixed
+.label.en Print
+.key authAndConfig.label.Configure/equanda-fixed
+.label.en Configure
+.key authAndConfig.label.Enable/equanda-fixed
+.label.en Enable
.key button.Save/equanda-fixed
.label.en Save
.label.nl Opslaan
Modified: trunk/equanda-generate/src/main/velocity/t5gui/pages/AuthAndConfigField.tml.vm
===================================================================
--- trunk/equanda-generate/src/main/velocity/t5gui/pages/AuthAndConfigField.tml.vm 2008-11-12 15:31:07 UTC (rev 859)
+++ trunk/equanda-generate/src/main/velocity/t5gui/pages/AuthAndConfigField.tml.vm 2008-11-12 16:38:05 UTC (rev 860)
@@ -11,15 +11,15 @@
<input t:id="${readBox}" name="${readBox}" value="${readBox}" onclick="eqDisableBoxes( ${readBox}, ${writeBox}, false, false, false)" t:type="CheckBox"/>
<t:if test="roleName">
- <t:label for="${readBox}"> Read </t:label>
+ <t:label for="${readBox}">${dollar}{equanda-message:authAndConfig.label.Read}</t:label>
<t:parameter name="else">
- <t:label for="${readBox}"> Visible </t:label>
+ <t:label for="${readBox}">${dollar}{equanda-message:authAndConfig.label.Visible}</t:label>
</t:parameter>
</t:if>
<t:if test="equanda-readable:page.${table.Name}.${page.Name}">
<input t:id="${writeBox}" name="${writeBox}" value="${writeBox}" onclick="eqEnableBoxes( ${readBox}, ${writeBox}, false)" t:type="CheckBox"/>
- <t:label for="${writeBox}"> Write </t:label>
+ <t:label for="${writeBox}">${dollar}{equanda-message:authAndConfig.label.Write}</t:label>
</t:if>
<br/>
@@ -39,23 +39,23 @@
<input t:id="${readBox}" name="${readBox}" value="${readBox}" onclick="eqDisableBoxes( ${readBox}, ${writeBox}, ${listBox}, ${summaryBox}, ${printBox})" t:type="CheckBox"/>
<t:if test="roleName">
- <t:label for="${readBox}"> Read </t:label>
+ <t:label for="${readBox}">${dollar}{equanda-message:authAndConfig.label.Read}</t:label>
<t:parameter name="else">
- <t:label for="${readBox}"> Visible </t:label>
+ <t:label for="${readBox}">${dollar}{equanda-message:authAndConfig.label.Visible}</t:label>
</t:parameter>
</t:if>
<input t:id="${writeBox}" name="${writeBox}" value="${writeBox}" onclick="eqEnableBoxes( ${readBox}, ${writeBox}, false)" t:type="CheckBox"/>
- <t:label for="${writeBox}"> Write </t:label>
+ <t:label for="${writeBox}">${dollar}{equanda-message:authAndConfig.label.Write}</t:label>
<input t:id="${listBox}" name="${listBox}" value="${listBox}" onclick="eqEnableBoxes( ${readBox}, ${listBox}, false)" t:type="CheckBox"/>
- <t:label for="${listBox}"> List </t:label>
+ <t:label for="${listBox}">${dollar}{equanda-message:authAndConfig.label.List}</t:label>
<input t:id="${summaryBox}" name="${summaryBox}" value="${summaryBox}" onclick="eqEnableBoxes( ${readBox}, ${summaryBox}, false)" t:type="CheckBox"/>
- <t:label for="${summaryBox}"> Summary </t:label>
+ <t:label for="${summaryBox}">${dollar}{equanda-message:authAndConfig.label.Summary}</t:label>
<input t:id="${printBox}" name="${printBox}" value="${printBox}" onclick="eqEnableBoxes( ${readBox}, ${printBox}, false)" t:type="CheckBox"/>
- <t:label for="${printBox}"> Print </t:label>
+ <t:label for="${printBox}">${dollar}{equanda-message:authAndConfig.label.Print}</t:label>
<br/>
<br/>
Modified: trunk/equanda-generate/src/main/velocity/t5gui/pages/AuthAndConfigGroup.tml.vm
===================================================================
--- trunk/equanda-generate/src/main/velocity/t5gui/pages/AuthAndConfigGroup.tml.vm 2008-11-12 15:31:07 UTC (rev 859)
+++ trunk/equanda-generate/src/main/velocity/t5gui/pages/AuthAndConfigGroup.tml.vm 2008-11-12 16:38:05 UTC (rev 860)
@@ -15,15 +15,15 @@
<input t:id="${readBox}" name="${readBox}" value="${readBox}" onclick="eqDisableBoxes( ${readBox}, ${writeBox}, false, false, false)" t:type="CheckBox"/>
<t:if test="roleName">
- <t:label for="${readBox}"> Read </t:label>
+ <t:label for="${readBox}">${dollar}{equanda-message:authAndConfig.label.Read}</t:label>
<t:parameter name="else">
- <t:label for="${readBox}"> Visible </t:label>
+ <t:label for="${readBox}">${dollar}{equanda-message:authAndConfig.label.Visible}</t:label>
</t:parameter>
</t:if>
<t:if test="equanda-readable:group.${table.Name}.${group.Name}">
<input t:id="${writeBox}" name="${writeBox}" value="${writeBox}" onclick="eqEnableBoxes( ${readBox}, ${writeBox},false)" t:type="CheckBox"/>
- <t:label for="${writeBox}"> Write </t:label>
+ <t:label for="${writeBox}">${dollar}{equanda-message:authAndConfig.label.Write}</t:label>
</t:if>
</legend>
@@ -39,26 +39,26 @@
<label>${dollar}{equanda-message:field.${table.Name}.${field.Name}}</label><br/>
- <input t:id="${readBox}" name="${readBox}" value="${readBox}" onclick="eqDisableBoxes( ${readBox}, ${writeBox}, ${listBox}, ${summaryBox}, ${printBox} )" t:type="CheckBox"/>
+ <input t:id="${readBox}" name="${readBox}" value="${readBox}" onclick="eqDisableBoxes( ${readBox}, ${writeBox}, ${listBox}, ${summaryBox}, ${printBox})" t:type="CheckBox"/>
<t:if test="roleName">
- <t:label for="${readBox}"> Read </t:label>
+ <t:label for="${readBox}">${dollar}{equanda-message:authAndConfig.label.Read}</t:label>
<t:parameter name="else">
- <t:label for="${readBox}"> Visible </t:label>
+ <t:label for="${readBox}">${dollar}{equanda-message:authAndConfig.label.Visible}</t:label>
</t:parameter>
</t:if>
<input t:id="${writeBox}" name="${writeBox}" value="${writeBox}" onclick="eqEnableBoxes( ${readBox}, ${writeBox}, false)" t:type="CheckBox"/>
- <t:label for="${writeBox}"> Write </t:label>
+ <t:label for="${writeBox}">${dollar}{equanda-message:authAndConfig.label.Write}</t:label>
<input t:id="${listBox}" name="${listBox}" value="${listBox}" onclick="eqEnableBoxes( ${readBox}, ${listBox}, false)" t:type="CheckBox"/>
- <t:label for="${listBox}"> List </t:label>
+ <t:label for="${listBox}">${dollar}{equanda-message:authAndConfig.label.List}</t:label>
<input t:id="${summaryBox}" name="${summaryBox}" value="${summaryBox}" onclick="eqEnableBoxes( ${readBox}, ${summaryBox}, false)" t:type="CheckBox"/>
- <t:label for="${summaryBox}"> Summary </t:label>
+ <t:label for="${summaryBox}">${dollar}{equanda-message:authAndConfig.label.Summary}</t:label>
<input t:id="${printBox}" name="${printBox}" value="${printBox}" onclick="eqEnableBoxes( ${readBox}, ${printBox}, false)" t:type="CheckBox"/>
- <t:label for="${printBox}"> Print </t:label>
+ <t:label for="${printBox}">${dollar}{equanda-message:authAndConfig.label.Print}</t:label>
<br/>
<br/>
Modified: trunk/equanda-generate/src/main/velocity/t5gui/pages/GlobalAuthConfig.java.vm
===================================================================
--- trunk/equanda-generate/src/main/velocity/t5gui/pages/GlobalAuthConfig.java.vm 2008-11-12 15:31:07 UTC (rev 859)
+++ trunk/equanda-generate/src/main/velocity/t5gui/pages/GlobalAuthConfig.java.vm 2008-11-12 16:38:05 UTC (rev 860)
@@ -215,13 +215,13 @@
if( this.roleName != null )
{
EquandaRole thisRole = EquandaRole.selectRole(this.roleName);
- thisRole.setAuthAndConfig(aacProvider.getAuthAndConfigString());
+ thisRole.setAuthAndConfig( aacProvider.getAuthAndConfigString() );
thisRole.equandaUpdate();
}
else
{
EquandaUser thisUser = (EquandaUser)loginInfoService.getLoginInfo().getUser();
- thisUser.setAuthAndConfig(aacProvider.getAuthAndConfigString());
+ thisUser.setAuthAndConfig( aacProvider.getAuthAndConfigString() );
thisUser.equandaUpdate();
}
}
Modified: trunk/equanda-generate/src/main/velocity/t5gui/pages/GlobalAuthConfig.tml.vm
===================================================================
--- trunk/equanda-generate/src/main/velocity/t5gui/pages/GlobalAuthConfig.tml.vm 2008-11-12 15:31:07 UTC (rev 859)
+++ trunk/equanda-generate/src/main/velocity/t5gui/pages/GlobalAuthConfig.tml.vm 2008-11-12 16:38:05 UTC (rev 860)
@@ -19,12 +19,12 @@
<table class="t-data-grid">
<thead>
<tr>
- <th>Table Name</th>
+ <th>${dollar}{equanda-message:authAndConfig.label.Table}</th>
<th>
<t:if test="roleName">
- Read
+ ${dollar}{equanda-message:authAndConfig.label.Read}
<t:parameter name="else">
- Visible
+ ${dollar}{equanda-message:authAndConfig.label.Visible}
</t:parameter>
</t:if>
<input name="allRead" type="checkbox" onclick="eqEnableMultiple( allRead, '_readCheck' )" />
@@ -32,19 +32,19 @@
<t:if test="isGuiAdmin">
<th>
- Write
+ ${dollar}{equanda-message:authAndConfig.label.Write}
<input name="allWrite" type="checkbox" onclick="eqEnableMultiple( allWrite, '_writeCheck' )" />
</th>
</t:if>
<t:if test="isGuiAdmin">
<th>
- Delete
+ ${dollar}{equanda-message:authAndConfig.label.Delete}
<input name="allDelete" type="checkbox" onclick="eqEnableMultiple( allDelete, '_deleteCheck' )" />
</th>
</t:if>
- <th>Configure</th>
+ <th>${dollar}{equanda-message:authAndConfig.label.Configure}</th>
</tr>
</thead>
Modified: trunk/equanda-generate/src/main/velocity/t5gui/pages/TableAuthConfig.java.vm
===================================================================
--- trunk/equanda-generate/src/main/velocity/t5gui/pages/TableAuthConfig.java.vm 2008-11-12 15:31:07 UTC (rev 859)
+++ trunk/equanda-generate/src/main/velocity/t5gui/pages/TableAuthConfig.java.vm 2008-11-12 16:38:05 UTC (rev 860)
@@ -199,7 +199,7 @@
{
try
{
- refreshBoxes( false );
+ refreshBoxes();
}
catch ( EquandaPersistenceException epe )
{
@@ -242,7 +242,7 @@
{
try
{
- refreshBoxes( true );
+ refreshBoxes();
nextPage = null;
}
catch ( EquandaPersistenceException epe )
@@ -268,39 +268,39 @@
if( readBox )
{
- aacProvider.setReadable(key);
+ aacProvider.setReadable( key );
}
if( writeBox )
{
- aacProvider.setWritable(key);
+ aacProvider.setWritable( key );
}
if( listBox )
{
- aacProvider.setDisplayList(key);
+ aacProvider.setDisplayList( key );
}
if( summaryBox )
{
- aacProvider.setDisplaySummary(key);
+ aacProvider.setDisplaySummary( key );
}
if( printBox )
{
- aacProvider.setDisplayPrint(key);
+ aacProvider.setDisplayPrint( key );
}
if( readBox == false && writeBox == false && listBox == false && summaryBox == false && printBox == false)
{
- aacProvider.setHidden(key);
+ aacProvider.setHidden( key );
}
if( this.roleName != null ){
- LoginCache.setRoleAuths( this.roleName, aacProvider);
+ LoginCache.setRoleAuths( this.roleName, aacProvider ) ;
}
else
{
- LoginCache.setRoleAuths( loginInfoService.getLoginInfo().getUser().getUserName(), aacProvider);
+ LoginCache.setRoleAuths( loginInfoService.getLoginInfo().getUser().getUserName(), aacProvider );
}
}
- private void refreshBoxes( boolean reportErrors )
+ private void refreshBoxes()
throws EquandaPersistenceException
{
AuthAndConfigProvider aacProvider = getAuthsForSelection();
@@ -339,22 +339,26 @@
}
}
+ /**
+ * This method should be called when the rights have been set in the cache.
+ * It then ensures these rights are persistant.
+ */
private void commitAuths()
throws EquandaPersistenceException
{
- // TODO : can we equanda update using the cache?
- if( this.roleName != null ){
- for( EquandaRole role : EquandaRole.selectAllRoles())
- {
- if( this.roleName.equals( role.getRoleName() ))
- {
- role.equandaUpdate();
- }
- }
+ ParsedAuthAndConfigProvider aacProvider = (ParsedAuthAndConfigProvider)getAuthsForSelection();
+
+ if( this.roleName != null )
+ {
+ EquandaRole thisRole = EquandaRole.selectRole(this.roleName);
+ thisRole.setAuthAndConfig( aacProvider.getAuthAndConfigString() );
+ thisRole.equandaUpdate();
}
else
{
- ((EquandaUser)loginInfoService.getLoginInfo().getUser()).equandaUpdate();
+ EquandaUser thisUser = (EquandaUser)loginInfoService.getLoginInfo().getUser();
+ thisUser.setAuthAndConfig( aacProvider.getAuthAndConfigString() );
+ thisUser.equandaUpdate();
}
}
}
Modified: trunk/equanda-generate/src/main/velocity/t5gui/pages/TableAuthConfig.tml.vm
===================================================================
--- trunk/equanda-generate/src/main/velocity/t5gui/pages/TableAuthConfig.tml.vm 2008-11-12 15:31:07 UTC (rev 859)
+++ trunk/equanda-generate/src/main/velocity/t5gui/pages/TableAuthConfig.tml.vm 2008-11-12 16:38:05 UTC (rev 860)
@@ -31,12 +31,12 @@
## Render selects
#if( !$table.SelectsNotHidden.isEmpty() )
<fieldset>
- <legend>Selectors</legend>
+ <legend>${dollar}{equanda-message:SelectsSection</legend>
#foreach( $select in $table.SelectsNotHidden)
#set ($selectBox="${select.Name}_selectCheck")
<p>${dollar}{equanda-message:select.${table.Name}.${select.Name}}</p>
<input t:id="$selectBox" value="$selectBox" t:type="CheckBox"/>
- <t:label for="${selectBox}"> Enable </t:label>
+ <t:label for="${selectBox}">${dollar}{equanda-message:authAndConfig.label.Enable}</t:label>
<br/>
<br/>
#end
@@ -48,12 +48,12 @@
## Render actions
#if( !$table.Actions.isEmpty() )
<fieldset>
- <legend>Actions</legend>
+ <legend>${dollar}{equanda-message:ActionsSection</legend>
#foreach( $action in $table.Actions)
#set ($actionBox="${action.Name}_actionCheck")
<p>${dollar}{equanda-message:action.${table.Name}.${action.Name}}</p>
<input t:id="$actionBox" value="$actionBox" t:type="CheckBox"/>
- <t:label for="${actionBox}"> Enable </t:label>
+ <t:label for="${actionBox}">${dollar}{equanda-message:authAndConfig.label.Enable}</t:label>
<br/>
<br/>
#end
Modified: trunk/equanda-tapestry5/src/main/resources/org/equanda/tapestry5/resources/authandconfig.js
===================================================================
--- trunk/equanda-tapestry5/src/main/resources/org/equanda/tapestry5/resources/authandconfig.js 2008-11-12 15:31:07 UTC (rev 859)
+++ trunk/equanda-tapestry5/src/main/resources/org/equanda/tapestry5/resources/authandconfig.js 2008-11-12 16:38:05 UTC (rev 860)
@@ -27,32 +27,21 @@
/**
* Disable all enabled boxes when readCheck is unchecked
- * Also Enable/disable a link if the read button is checked/unchecked
*/
-function eqDisableBoxes( readCheck, writeCheck, deleteCheck, listCheck, summaryCheck, printCheck, trName )
+function eqDisableBoxes( readCheck, writeCheck, listCheck, summaryCheck, printCheck )
{
if( readCheck.checked == false )
{
writeCheck.checked = false;
- deleteCheck.checked = false;
listCheck.checked = false;
summaryCheck.checked = false;
printCheck.checked = false;
}
- if( trName != null ){
- var allLinks=$$('tr#' + trName + ' a' );
-
- if( readCheck.checked == true )
- allLinks[0].show();
- else
- allLinks[0].hide();
- }
}
function eqHandleReadBox( readBox, writeBox, deleteBox, trName )
{
-
if( readBox.checked == false )
{
writeBox.checked = false;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|