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...> - 2009-01-06 13:24:02
|
Revision: 959
http://equanda.svn.sourceforge.net/equanda/?rev=959&view=rev
Author: triathlon98
Date: 2009-01-06 13:24:00 +0000 (Tue, 06 Jan 2009)
Log Message:
-----------
t5gui docs, hide unauth selections and actions, EQ-32 rename equanda-delete to equanda-deletable (for consistency)
Modified Paths:
--------------
trunk/equanda-client/src/main/java/org/equanda/client/AuthAndConfigProvider.java
trunk/equanda-generate/src/main/velocity/t5gui/edit-tml/group.tml.vm
trunk/equanda-generate/src/main/velocity/t5gui/pages/Edit.tml.vm
trunk/equanda-generate/src/main/velocity/t5gui/pages/Select.tml.vm
trunk/equanda-generate/src/main/velocity/t5gui/pages/TableAuthConfig.java.vm
trunk/equanda-server/src/main/java/org/equanda/auth/AuthAndConfigCombined.java
trunk/equanda-server/src/main/java/org/equanda/auth/AuthAndConfigProviderAdapter.java
trunk/equanda-server/src/test/java/org/equanda/auth/AuthAndConfigCombinedTest.java
trunk/equanda-t5gui/src/main/java/org/equanda/t5gui/services/T5guiModule.java
trunk/src/site/wiki/t5gui.wiki
trunk/src/site/wiki/templates/t5guiAuthorization.wiki
Added Paths:
-----------
trunk/equanda-t5gui/src/main/java/org/equanda/t5gui/bindings/AuthDeletableFactory.java
Removed Paths:
-------------
trunk/equanda-t5gui/src/main/java/org/equanda/t5gui/bindings/AuthDeleteFactory.java
Modified: trunk/equanda-client/src/main/java/org/equanda/client/AuthAndConfigProvider.java
===================================================================
--- trunk/equanda-client/src/main/java/org/equanda/client/AuthAndConfigProvider.java 2009-01-05 20:37:57 UTC (rev 958)
+++ trunk/equanda-client/src/main/java/org/equanda/client/AuthAndConfigProvider.java 2009-01-06 13:24:00 UTC (rev 959)
@@ -61,7 +61,7 @@
* @param key key to get authorization for
* @return true when field is allowed to be deleted
*/
- boolean isDelete( String key );
+ boolean isDeletable( String key );
/**
* Should the data be included in summary displays?
Modified: trunk/equanda-generate/src/main/velocity/t5gui/edit-tml/group.tml.vm
===================================================================
--- trunk/equanda-generate/src/main/velocity/t5gui/edit-tml/group.tml.vm 2009-01-05 20:37:57 UTC (rev 958)
+++ trunk/equanda-generate/src/main/velocity/t5gui/edit-tml/group.tml.vm 2009-01-06 13:24:00 UTC (rev 959)
@@ -4,6 +4,7 @@
#* @vtlvariable name="table" type="org.equanda.domain.xml.transform.RootTable" *#
#* @vtlvariable name="group" type="org.equanda.domain.xml.Group" *#
#if( !$group.isHidden() )
+<t:if test="equanda-readable:group.${table.Name}.${group.Name}">
#if( "x$!group.RendererName" != "x" )
#render( "edit.renderer.$group.RendererName" "" "" "" )
#else
@@ -20,4 +21,5 @@
</fieldset>
#end##own renderer
+</t:if>
#end##!group.isHidden
Modified: trunk/equanda-generate/src/main/velocity/t5gui/pages/Edit.tml.vm
===================================================================
--- trunk/equanda-generate/src/main/velocity/t5gui/pages/Edit.tml.vm 2009-01-05 20:37:57 UTC (rev 958)
+++ trunk/equanda-generate/src/main/velocity/t5gui/pages/Edit.tml.vm 2009-01-06 13:24:00 UTC (rev 959)
@@ -10,12 +10,15 @@
<input class="defaultSubmit" t:type="submit" value="equanda-message:button.Save" t:id="save"/>
<input t:type="submit" value="equanda-message:button.Reset" t:id="reset"/>
<input t:type="submit" value="equanda-message:button.Cancel" t:id="cancel"/>
+ <t:if test="equanda-deletable:table.${table.Name}">
<t:if test="isExistingObject()">
<input t:type="submit" value="equanda-message:button.Delete" t:id="delete"/>
</t:if>
+ </t:if>
</t:parameter>
#if( !$table.LinkedSelects.isEmpty() && !$table.MoreLinkedSelects.isEmpty() )
<t:parameter name="reverseLinks">
+<!-- @todo make this work...
#if( !$table.LinkedSelects.isEmpty() )
<ul>
#foreach( $select in $table.LinkedSelects )
@@ -32,6 +35,7 @@
</ul>
<hr/>
#end
+-->
</t:parameter>
#end
@@ -39,7 +43,9 @@
<t:parameter name="actions">
<ul>
#foreach( $action in $table.Actions )
+ <t:if test="equanda-readable:action.${table.Name}.${action.Name}">
<li><t:equanda.formactionlink t:id="Action${table.Name}${action.Name}" context="object.id">${dollar}{equanda-message:action.${table.Name}.${action.Name}}</t:equanda.formactionlink></li>
+ </t:if>
#end
</ul>
</t:parameter>
Modified: trunk/equanda-generate/src/main/velocity/t5gui/pages/Select.tml.vm
===================================================================
--- trunk/equanda-generate/src/main/velocity/t5gui/pages/Select.tml.vm 2009-01-05 20:37:57 UTC (rev 958)
+++ trunk/equanda-generate/src/main/velocity/t5gui/pages/Select.tml.vm 2009-01-06 13:24:00 UTC (rev 959)
@@ -19,7 +19,9 @@
<ul>
#foreach( $sel in ${table.SelectsNotHidden} )
#if( $sel.Name != $select.Name )
+ <t:if test="equanda-readable:select.${table.Name}.${select.Name}">
<li><a t:type="actionlink" t:id="select${sel.Name}">${dollar}{equanda-message:select.${table.Name}.${sel.Name}}</a></li>
+ </t:if>
#end
#end
</ul>
Modified: trunk/equanda-generate/src/main/velocity/t5gui/pages/TableAuthConfig.java.vm
===================================================================
--- trunk/equanda-generate/src/main/velocity/t5gui/pages/TableAuthConfig.java.vm 2009-01-05 20:37:57 UTC (rev 958)
+++ trunk/equanda-generate/src/main/velocity/t5gui/pages/TableAuthConfig.java.vm 2009-01-06 13:24:00 UTC (rev 959)
@@ -267,12 +267,12 @@
#foreach( $select in $table.SelectsNotHidden)
#set ($selectBox="${select.Name}_selectCheck")
- setAuths( "select.${table.Name}." + "${select.Name}", $selectBox, false, false, false, false );
+ setAuths( "select.${table.Name}.${select.Name}", $selectBox, false, false, false, false );
#end
#foreach( $action in $table.Actions)
#set ($actionBox="${action.Name}_actionCheck")
- setAuths( "action.${table.Name}." + "${action.Name}", $actionBox, false, false, false, false );
+ setAuths( "action.${table.Name}.${action.Name}", $actionBox, false, false, false, false );
#end
commitAuths();
nextPage = returnPage;
Modified: trunk/equanda-server/src/main/java/org/equanda/auth/AuthAndConfigCombined.java
===================================================================
--- trunk/equanda-server/src/main/java/org/equanda/auth/AuthAndConfigCombined.java 2009-01-05 20:37:57 UTC (rev 958)
+++ trunk/equanda-server/src/main/java/org/equanda/auth/AuthAndConfigCombined.java 2009-01-06 13:24:00 UTC (rev 959)
@@ -81,16 +81,16 @@
return !hasKey && ( defaults.isWritable( key ) || !defaults.hasKey( key ) );
}
- public boolean isDelete( String key )
+ public boolean isDeletable( String key )
{
- if ( user.hasKey( key ) && !user.isDelete( key ) ) return false;
+ if ( user.hasKey( key ) && !user.isDeletable( key ) ) return false;
boolean hasKey = false;
for ( AuthAndConfigProvider acp : roles )
{
- if ( acp.isDelete( key ) ) return true;
+ if ( acp.isDeletable( key ) ) return true;
if ( acp.hasKey( key ) ) hasKey = true;
}
- return !hasKey && ( defaults.isDelete( key ) || !defaults.hasKey( key ) );
+ return !hasKey && ( defaults.isDeletable( key ) || !defaults.hasKey( key ) );
}
public boolean isDisplaySummary( String key )
Modified: trunk/equanda-server/src/main/java/org/equanda/auth/AuthAndConfigProviderAdapter.java
===================================================================
--- trunk/equanda-server/src/main/java/org/equanda/auth/AuthAndConfigProviderAdapter.java 2009-01-05 20:37:57 UTC (rev 958)
+++ trunk/equanda-server/src/main/java/org/equanda/auth/AuthAndConfigProviderAdapter.java 2009-01-06 13:24:00 UTC (rev 959)
@@ -72,7 +72,7 @@
/**
* @inheritDoc
*/
- public boolean isDelete( String key )
+ public boolean isDeletable( String key )
{
AuthAndConfig ac = getFor( key );
return ac != null && ac.isDelete();
Modified: trunk/equanda-server/src/test/java/org/equanda/auth/AuthAndConfigCombinedTest.java
===================================================================
--- trunk/equanda-server/src/test/java/org/equanda/auth/AuthAndConfigCombinedTest.java 2009-01-05 20:37:57 UTC (rev 958)
+++ trunk/equanda-server/src/test/java/org/equanda/auth/AuthAndConfigCombinedTest.java 2009-01-06 13:24:00 UTC (rev 959)
@@ -38,7 +38,7 @@
private static AuthAndConfigProvider user = new ParsedAuthAndConfigProvider( "hide=H\n" +
"user=RWSLP\n" );
private static AuthAndConfigProvider role1 = new ParsedAuthAndConfigProvider( "hide=RWP\n" +
- "onerole=RS\n" +
+ "onerole=RSD\n" +
"rhide=H" );
private static AuthAndConfigProvider role2 = new ParsedAuthAndConfigProvider( "\n" );
private static AuthAndConfigProvider defaults = new ParsedAuthAndConfigProvider( "nouser=RWLP\n" +
@@ -54,41 +54,48 @@
assertFalse( test.isDisplaySummary( "hide" ) );
assertFalse( test.isDisplayList( "hide" ) );
assertFalse( test.isDisplayPrint( "hide" ) );
+ assertFalse( test.isDeletable( "hide" ) );
assertTrue( test.isReadable( "nouser" ) );
assertTrue( test.isWritable( "nouser" ) );
assertFalse( test.isDisplaySummary( "nouser" ) );
assertTrue( test.isDisplayList( "nouser" ) );
assertTrue( test.isDisplayPrint( "nouser" ) );
+ assertFalse( test.isDeletable( "nouser" ) );
assertTrue( test.isReadable( "user" ) );
assertTrue( test.isWritable( "user" ) );
assertTrue( test.isDisplaySummary( "user" ) );
assertTrue( test.isDisplayList( "user" ) );
assertTrue( test.isDisplayPrint( "user" ) );
+ assertFalse( test.isDeletable( "user" ) );
assertTrue( test.isReadable( "onerole" ) );
assertFalse( test.isWritable( "onerole" ) );
assertTrue( test.isDisplaySummary( "onerole" ) );
assertFalse( test.isDisplayList( "onerole" ) );
assertFalse( test.isDisplayPrint( "onerole" ) );
+ assertTrue( test.isDeletable( "onerole" ) );
assertTrue( test.isReadable( "nothing" ) );
assertTrue( test.isWritable( "nothing" ) );
assertFalse( test.isDisplaySummary( "nothing" ) );
assertFalse( test.isDisplayList( "nothing" ) );
assertFalse( test.isDisplayPrint( "nothing" ) );
+ assertFalse( test.isDeletable( "nothing" ) );
assertTrue( test.isReadable( "defaults" ) );
assertFalse( test.isWritable( "defaults" ) );
assertTrue( test.isDisplaySummary( "defaults" ) );
assertFalse( test.isDisplayList( "defaults" ) );
assertFalse( test.isDisplayPrint( "defaults" ) );
+ assertFalse( test.isDeletable( "defaults" ) );
assertFalse( test.isReadable( "rhide" ) );
assertFalse( test.isWritable( "rhide" ) );
assertFalse( test.isDisplaySummary( "rhide" ) );
assertFalse( test.isDisplayList( "rhide" ) );
assertFalse( test.isDisplayPrint( "rhide" ) );
+ assertFalse( test.isDeletable( "rhide" ) );
}
}
Copied: trunk/equanda-t5gui/src/main/java/org/equanda/t5gui/bindings/AuthDeletableFactory.java (from rev 945, trunk/equanda-t5gui/src/main/java/org/equanda/t5gui/bindings/AuthDeleteFactory.java)
===================================================================
--- trunk/equanda-t5gui/src/main/java/org/equanda/t5gui/bindings/AuthDeletableFactory.java (rev 0)
+++ trunk/equanda-t5gui/src/main/java/org/equanda/t5gui/bindings/AuthDeletableFactory.java 2009-01-06 13:24:00 UTC (rev 959)
@@ -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 AuthDeletableFactory
+ implements BindingFactory
+{
+ private LoginInfoService loginInfo;
+
+ public AuthDeletableFactory( 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.isDeletable( expression );
+ }
+ };
+ }
+}
Deleted: trunk/equanda-t5gui/src/main/java/org/equanda/t5gui/bindings/AuthDeleteFactory.java
===================================================================
--- trunk/equanda-t5gui/src/main/java/org/equanda/t5gui/bindings/AuthDeleteFactory.java 2009-01-05 20:37:57 UTC (rev 958)
+++ trunk/equanda-t5gui/src/main/java/org/equanda/t5gui/bindings/AuthDeleteFactory.java 2009-01-06 13:24:00 UTC (rev 959)
@@ -1,70 +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.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
-{
- private 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 2009-01-05 20:37:57 UTC (rev 958)
+++ trunk/equanda-t5gui/src/main/java/org/equanda/t5gui/services/T5guiModule.java 2009-01-06 13:24:00 UTC (rev 959)
@@ -270,7 +270,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-deletable", new AuthDeletableFactory( loginInfo ) );
configuration.add( "equanda-summary", new DisplaySummaryFactory( loginInfo ) );
configuration.add( "equanda-list", new DisplayListFactory( loginInfo ) );
configuration.add( "equanda-print", new DisplayPrintFactory( loginInfo ) );
Modified: trunk/src/site/wiki/t5gui.wiki
===================================================================
--- trunk/src/site/wiki/t5gui.wiki 2009-01-05 20:37:57 UTC (rev 958)
+++ trunk/src/site/wiki/t5gui.wiki 2009-01-06 13:24:00 UTC (rev 959)
@@ -3,24 +3,45 @@
These are classes which are used to build and equanda generated tapestry5 (crud) user interface for the domain model.
Contrary to the tapestry5 component, this is equanda specific and not intended to be used without dependencies on the rest of equanda.
-h2. Components
-
h2. Services
+- LoginInfoService
+- EquandaSetterCache
+
+The request filter is also extended to assure the SelectorsState settings are preserved inside the web session.
+
+h2. Bindings
+
+- equanda-message
+- has-equanda-message
+- equanda-readable : check for a key whether the this is set to readable by AuthAndConfig.
+- equanda-writable : check for a key whether the this is set to writable by AuthAndConfig.
+- equanda-deletable : check for a key whether the this is set to deletable by AuthAndConfig.
+- equanda-summary : check for a key whether the this should be included in summary display according to AuthAndConfig.
+- equanda-list : check for a key whether the this should be included in list display according to AuthAndConfig.
+- equanda-print : check for a key whether the this should be included in print according to AuthAndConfig.
+
+
h2. Coercions
- java.util.Date <-> java.sql.Date : to allow using java.sql.Date objects with the (core) components
- java.util.Date <-> java.sql.Timestamp : to allow using java.sql.Timestamp objects with the (core) components
- String <-> UOID
+
h2. Translators
- UoidTranslator
+
h2 Translation support
The t5gui module defines a binding which can be used to use the translations as defined in the equanda specific translations files.
This can be accessed using the "equanda-message" binding prefix (and the key as value).
For details see [this page|translation.html].
-h2. Utility classes
\ No newline at end of file
+
+h2. Utility classes
+
+- EquandaGridDataSource
+- SelectedSetter
\ No newline at end of file
Modified: trunk/src/site/wiki/templates/t5guiAuthorization.wiki
===================================================================
--- trunk/src/site/wiki/templates/t5guiAuthorization.wiki 2009-01-05 20:37:57 UTC (rev 958)
+++ trunk/src/site/wiki/templates/t5guiAuthorization.wiki 2009-01-06 13:24:00 UTC (rev 959)
@@ -106,7 +106,7 @@
The page used for managing the roles is named _AuthAndConfigRoles_. To use this page, the user must be a member of a role which has GUI Administrator rights. The list of available roles are provided in a drop-down box, if no roles are selected, the current users rights will be selected for editing.
-.The page used for managing tables is named _AuthAndConfigTables_. If the user has admin rights, they are allowed to select what tables are Readable, Writable, and have Delete enabled for each role. Otherwise, the user can set individual tables visible or not.
+The page used for managing tables is named _AuthAndConfigTables_. If the user has admin rights, they are allowed to select what tables are Readable, Writable, and have Delete enabled for each role. Otherwise, the user can set individual tables visible or not.
The user can also choose to Configure the rights for individual tables, with the _Configure_ link.
The page used for managing a table is available by clicking the *Configure* link in the _AuthAndConfigTables_ page. This link will only be available if the user has read rights on the table to be edited.
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <tri...@us...> - 2009-01-05 20:38:02
|
Revision: 958
http://equanda.svn.sourceforge.net/equanda/?rev=958&view=rev
Author: triathlon98
Date: 2009-01-05 20:37:57 +0000 (Mon, 05 Jan 2009)
Log Message:
-----------
allow showMetadata to be tested
Modified Paths:
--------------
trunk/equanda-generate/src/main/velocity/t5gui/components/Edit.java.vm
Modified: trunk/equanda-generate/src/main/velocity/t5gui/components/Edit.java.vm
===================================================================
--- trunk/equanda-generate/src/main/velocity/t5gui/components/Edit.java.vm 2009-01-05 20:04:23 UTC (rev 957)
+++ trunk/equanda-generate/src/main/velocity/t5gui/components/Edit.java.vm 2009-01-05 20:37:57 UTC (rev 958)
@@ -179,6 +179,8 @@
return showMetadata ? null : new Integer( -1 );
}
+ public boolean isShowMetadata() { return showMetadata; }
+
void beginRender()
{
clientId = renderSupport.allocateClientId( resources );
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <tri...@us...> - 2009-01-05 20:04:31
|
Revision: 957
http://equanda.svn.sourceforge.net/equanda/?rev=957&view=rev
Author: triathlon98
Date: 2009-01-05 20:04:23 +0000 (Mon, 05 Jan 2009)
Log Message:
-----------
EQ-115 AAC fix role handling in LoginInfo, order output rights
Modified Paths:
--------------
trunk/equanda-client/src/main/java/org/equanda/client/LoginInfo.java
trunk/equanda-generate/src/main/velocity/login/LoginCache.java.vm
trunk/equanda-generate/src/main/velocity/login/bean/LoginBean.java.vm
trunk/equanda-server/src/main/java/org/equanda/auth/ParsedAuthAndConfigProvider.java
trunk/equanda-server/src/test/java/org/equanda/auth/AuthAndConfigCombinedTest.java
trunk/equanda-server/src/test/java/org/equanda/auth/ParsedAuthAndConfigProviderTest.java
trunk/equanda-t5gui/src/main/java/org/equanda/t5gui/bindings/AuthReadableFactory.java
Modified: trunk/equanda-client/src/main/java/org/equanda/client/LoginInfo.java
===================================================================
--- trunk/equanda-client/src/main/java/org/equanda/client/LoginInfo.java 2009-01-05 14:52:55 UTC (rev 956)
+++ trunk/equanda-client/src/main/java/org/equanda/client/LoginInfo.java 2009-01-05 20:04:23 UTC (rev 957)
@@ -47,6 +47,7 @@
private boolean guiAdministrator;
private boolean guiAccessProhibited;
private List<String> roles;
+ private List<String> aacRoles;
public LoginInfo() {}
@@ -120,16 +121,46 @@
this.authAndConfig = authAndConfig;
}
+ /**
+ * Get the appserver role names.
+ *
+ * @return list of appserver roles for user
+ */
public List<String> getRoles()
{
return roles;
}
+ /**
+ * Set the appserver role names.
+ *
+ * @param roles list of appserver role names.
+ */
public void setRoles( List<String> roles )
{
this.roles = roles;
}
+ /**
+ * Get the auth and config role names.
+ *
+ * @return list of appserver roles for user
+ */
+ public List<String> getAuthAndConfigRoles()
+ {
+ return aacRoles;
+ }
+
+ /**
+ * Set the auth and config role names.
+ *
+ * @param aacRoles list of appserver role names.
+ */
+ public void setAuthAndConfigRoles( List<String> aacRoles )
+ {
+ this.aacRoles = aacRoles;
+ }
+
public boolean isGuiAdministrator()
{
return guiAdministrator;
Modified: trunk/equanda-generate/src/main/velocity/login/LoginCache.java.vm
===================================================================
--- trunk/equanda-generate/src/main/velocity/login/LoginCache.java.vm 2009-01-05 14:52:55 UTC (rev 956)
+++ trunk/equanda-generate/src/main/velocity/login/LoginCache.java.vm 2009-01-05 20:04:23 UTC (rev 957)
@@ -161,7 +161,7 @@
AuthAndConfigProvider acpUser = getUserFromCache( user );
AuthAndConfigProvider acpDefault = new ParsedAuthAndConfigProvider( "" );
int roleCount = 0;
- List<String> roles = info.getRoles();
+ List<String> roles = info.getAuthAndConfigRoles();
if ( null != roles )
{
roleCount = roles.size();
Modified: trunk/equanda-generate/src/main/velocity/login/bean/LoginBean.java.vm
===================================================================
--- trunk/equanda-generate/src/main/velocity/login/bean/LoginBean.java.vm 2009-01-05 14:52:55 UTC (rev 956)
+++ trunk/equanda-generate/src/main/velocity/login/bean/LoginBean.java.vm 2009-01-05 20:04:23 UTC (rev 957)
@@ -83,9 +83,11 @@
boolean isNotGui = false;
int isNotGuiCount = 0;
List<String> roles = new ArrayList<String>();
+ List<String> aacRoles = new ArrayList<String>();
for ( DMEquandaRoleBean role : dmUser.getRoles() )
{
+ aacRoles.add( role.getRoleName() );
isAdmin |= role.getGuiAdministrator();
if ( role.getGuiAccessProhibited() ) isNotGuiCount++;
if ( role.getAppserverRole() != null && !roles.contains( role.getAppserverRole() ) )
@@ -109,6 +111,7 @@
info.setGuiAdministrator( isAdmin );
info.setGuiAccessProhibited( isNotGui );
info.setRoles( roles );
+ info.setAuthAndConfigRoles( aacRoles );
return info;
}
else
Modified: trunk/equanda-server/src/main/java/org/equanda/auth/ParsedAuthAndConfigProvider.java
===================================================================
--- trunk/equanda-server/src/main/java/org/equanda/auth/ParsedAuthAndConfigProvider.java 2009-01-05 14:52:55 UTC (rev 956)
+++ trunk/equanda-server/src/main/java/org/equanda/auth/ParsedAuthAndConfigProvider.java 2009-01-05 20:04:23 UTC (rev 957)
@@ -27,6 +27,10 @@
import javolution.lang.TextBuilder;
import org.equanda.util.StringSplitter;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
+
/**
* ...
*
@@ -74,7 +78,7 @@
/**
* Given a full rights string (e.g "Table.table=RW") return the Table.table part
*
- * @param authString The auth string
+ * @param data The auth string
* @return The key part
*/
public String getAuthKey( String data )
@@ -93,7 +97,7 @@
/**
* Given a full rights string (e.g "Table.table=RW") return the "RW" part
*
- * @param authString The auth string
+ * @param data The auth string
* @return The value part
*/
public String getAuthValue( String data )
@@ -129,7 +133,8 @@
}
/**
- * This method returns the current full list of rights. Each right is separated by a newline
+ * This method returns the current full list of rights. Each right is separated by a newline.
+ * The keys are sorted to assure consistent output and make it easier to search in long lists.
*
* @return A string containing the list of rights.
*/
@@ -137,9 +142,16 @@
{
TextBuilder tb = new TextBuilder();
- for ( String key : getKeys() )
+ List<String> sortedKeys = new ArrayList<String>();
+ sortedKeys.addAll( getKeys() );
+ Collections.sort( sortedKeys );
+
+ for ( String key : sortedKeys )
{
- tb.append( key + "=" + getFor( key ).toString() + "\n" );
+ tb.append( key );
+ tb.append( "=" );
+ tb.append( getFor( key ).toString() );
+ tb.append( "\n" );
}
return tb.toString();
Modified: trunk/equanda-server/src/test/java/org/equanda/auth/AuthAndConfigCombinedTest.java
===================================================================
--- trunk/equanda-server/src/test/java/org/equanda/auth/AuthAndConfigCombinedTest.java 2009-01-05 14:52:55 UTC (rev 956)
+++ trunk/equanda-server/src/test/java/org/equanda/auth/AuthAndConfigCombinedTest.java 2009-01-05 20:04:23 UTC (rev 957)
@@ -24,8 +24,8 @@
package org.equanda.auth;
+import junit.framework.TestCase;
import org.equanda.client.AuthAndConfigProvider;
-import junit.framework.TestCase;
/**
* Test for proper combination of authorization and configuration settings for a user, his/her roles and the defaults.
@@ -38,7 +38,8 @@
private static AuthAndConfigProvider user = new ParsedAuthAndConfigProvider( "hide=H\n" +
"user=RWSLP\n" );
private static AuthAndConfigProvider role1 = new ParsedAuthAndConfigProvider( "hide=RWP\n" +
- "onerole=RS\n" );
+ "onerole=RS\n" +
+ "rhide=H" );
private static AuthAndConfigProvider role2 = new ParsedAuthAndConfigProvider( "\n" );
private static AuthAndConfigProvider defaults = new ParsedAuthAndConfigProvider( "nouser=RWLP\n" +
"defaults=S\n" );
@@ -83,5 +84,11 @@
assertTrue( test.isDisplaySummary( "defaults" ) );
assertFalse( test.isDisplayList( "defaults" ) );
assertFalse( test.isDisplayPrint( "defaults" ) );
+
+ assertFalse( test.isReadable( "rhide" ) );
+ assertFalse( test.isWritable( "rhide" ) );
+ assertFalse( test.isDisplaySummary( "rhide" ) );
+ assertFalse( test.isDisplayList( "rhide" ) );
+ assertFalse( test.isDisplayPrint( "rhide" ) );
}
}
Modified: trunk/equanda-server/src/test/java/org/equanda/auth/ParsedAuthAndConfigProviderTest.java
===================================================================
--- trunk/equanda-server/src/test/java/org/equanda/auth/ParsedAuthAndConfigProviderTest.java 2009-01-05 14:52:55 UTC (rev 956)
+++ trunk/equanda-server/src/test/java/org/equanda/auth/ParsedAuthAndConfigProviderTest.java 2009-01-05 20:04:23 UTC (rev 957)
@@ -24,8 +24,8 @@
package org.equanda.auth;
+import junit.framework.TestCase;
import org.equanda.client.AuthAndConfigProvider;
-import junit.framework.TestCase;
/**
* Test for ParsedAuthAndConfigProvider
@@ -39,13 +39,13 @@
throws Exception
{
AuthAndConfigProvider test = new ParsedAuthAndConfigProvider( "user.x=H\n" +
- "hide=RH\n" +
- "write=W\n" +
- "user.y=SLP\n" +
- "user.z=RWL\n" +
- "noval\n" +
- "#comment\n" +
- ";comment" );
+ "hide=RH\n" +
+ "write=W\n" +
+ "user.y=SLP\n" +
+ "user.z=RWL\n" +
+ "noval\n" +
+ "#comment\n" +
+ ";comment" );
assertFalse( test.isReadable( "user.x" ) );
assertFalse( test.isWritable( "user.x" ) );
@@ -77,4 +77,24 @@
AuthAndConfigProvider test = new ParsedAuthAndConfigProvider( null );
assertFalse( test.isReadable( "x" ) );
}
+
+ public void testGetAuthAndConfigString()
+ {
+ String test = "user.x=H\n" +
+ "hide=RH\n" +
+ "write=W\n" +
+ "user.y=SLP\n" +
+ "user.z=RWL\n" +
+ "noval\n" +
+ "#comment\n" +
+ ";comment";
+ String verify = "hide=H\n" +
+ "noval=H\n" +
+ "user.x=H\n" +
+ "user.y=RLPS\n" +
+ "user.z=RWL\n" +
+ "write=RW\n";
+ assertEquals( verify, new ParsedAuthAndConfigProvider( verify ).getAuthAndConfigString() );
+ assertEquals( verify, new ParsedAuthAndConfigProvider( test ).getAuthAndConfigString() );
+ }
}
Modified: trunk/equanda-t5gui/src/main/java/org/equanda/t5gui/bindings/AuthReadableFactory.java
===================================================================
--- trunk/equanda-t5gui/src/main/java/org/equanda/t5gui/bindings/AuthReadableFactory.java 2009-01-05 14:52:55 UTC (rev 956)
+++ trunk/equanda-t5gui/src/main/java/org/equanda/t5gui/bindings/AuthReadableFactory.java 2009-01-05 20:04:23 UTC (rev 957)
@@ -63,6 +63,7 @@
{
public boolean get( AuthAndConfigProvider aac, String expression )
{
+ System.out.println( "AAC readable "+expression+" "+aac.isReadable( expression ) );
return aac.isReadable( expression );
}
};
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <tri...@us...> - 2009-01-05 14:53:07
|
Revision: 956
http://equanda.svn.sourceforge.net/equanda/?rev=956&view=rev
Author: triathlon98
Date: 2009-01-05 14:52:55 +0000 (Mon, 05 Jan 2009)
Log Message:
-----------
EQ-306 better display view
Modified Paths:
--------------
trunk/equanda-generate/src/main/velocity/t5gui/base/OneObjectComponentBase.java.vm
trunk/equanda-generate/src/main/velocity/t5gui/components/Edit.java.vm
trunk/equanda-generate/src/main/velocity/t5gui/components/InlineLinkList.tml.vm
trunk/equanda-generate/src/main/velocity/t5gui/components/InlinePrimitiveList.tml.vm
trunk/equanda-generate/src/main/velocity/t5gui/components/LinkList.tml.vm
trunk/equanda-generate/src/main/velocity/t5gui/edit-tml/page.tml.vm
trunk/equanda-generate/src/main/velocity/t5gui/view-tml/linklist.tml.vm
trunk/equanda-generate/src/main/velocity/t5gui/view-tml/type.tml.vm
Modified: trunk/equanda-generate/src/main/velocity/t5gui/base/OneObjectComponentBase.java.vm
===================================================================
--- trunk/equanda-generate/src/main/velocity/t5gui/base/OneObjectComponentBase.java.vm 2009-01-04 15:39:42 UTC (rev 955)
+++ trunk/equanda-generate/src/main/velocity/t5gui/base/OneObjectComponentBase.java.vm 2009-01-05 14:52:55 UTC (rev 956)
@@ -65,6 +65,10 @@
private static final TimestampTranslator TIMESTAMP_TRANSLATOR = new TimestampTranslator();
private static final StringTranslator STRING_TRANSLATOR = new StringTranslator();
+ private Object currentMultipleRow;
+
+ private int currentMultipleIndex;
+
@Inject
private EquandaMessages messages;
@@ -175,4 +179,29 @@
}
#end
#end
+
+ public Object getCurrentMultipleRow()
+ {
+ return currentMultipleRow;
+ }
+
+ public void setCurrentMultipleRow( Object currentMultipleRow )
+ {
+ this.currentMultipleRow = currentMultipleRow;
+ }
+
+ public int getCurrentMultipleIndex()
+ {
+ return currentMultipleIndex;
+ }
+
+ public void setCurrentMultipleIndex( int currentMultipleIndex )
+ {
+ this.currentMultipleIndex = currentMultipleIndex;
+ }
+
+ public boolean isRenderCurrentMultipleIndex()
+ {
+ return currentMultipleIndex > 0;
+ }
}
Modified: trunk/equanda-generate/src/main/velocity/t5gui/components/Edit.java.vm
===================================================================
--- trunk/equanda-generate/src/main/velocity/t5gui/components/Edit.java.vm 2009-01-04 15:39:42 UTC (rev 955)
+++ trunk/equanda-generate/src/main/velocity/t5gui/components/Edit.java.vm 2009-01-05 14:52:55 UTC (rev 956)
@@ -105,10 +105,6 @@
@Inject
private EquandaMessages messages;
- private Object currentMultipleRow;
-
- private int currentMultipleIndex;
-
private String clientId;
@Parameter( value = "prop:false", defaultPrefix = BindingConstants.PROP )
@@ -183,31 +179,6 @@
return showMetadata ? null : new Integer( -1 );
}
- public Object getCurrentMultipleRow()
- {
- return currentMultipleRow;
- }
-
- public void setCurrentMultipleRow( Object currentMultipleRow )
- {
- this.currentMultipleRow = currentMultipleRow;
- }
-
- public int getCurrentMultipleIndex()
- {
- return currentMultipleIndex;
- }
-
- public void setCurrentMultipleIndex( int currentMultipleIndex )
- {
- this.currentMultipleIndex = currentMultipleIndex;
- }
-
- public boolean isRenderCurrentMultipleIndex()
- {
- return currentMultipleIndex > 0;
- }
-
void beginRender()
{
clientId = renderSupport.allocateClientId( resources );
Modified: trunk/equanda-generate/src/main/velocity/t5gui/components/InlineLinkList.tml.vm
===================================================================
--- trunk/equanda-generate/src/main/velocity/t5gui/components/InlineLinkList.tml.vm 2009-01-04 15:39:42 UTC (rev 955)
+++ trunk/equanda-generate/src/main/velocity/t5gui/components/InlineLinkList.tml.vm 2009-01-05 14:52:55 UTC (rev 956)
@@ -6,7 +6,7 @@
<div class="eqInl" xmlns:t="http://tapestry.apache.org/schema/tapestry_5_0_0.xsd">
<input t:type="TextField" t:id="hiddenDeletedRows" class="nodisplay" />
- <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">
+ <div class="eqInlR" t:id="pagedLoop" t:type="equanda/JSPagedLoop" source="value" value="current" volatile="true" index="index" rowsPerPage="7" additionalRowCount="prop:additionalRowCount" addRowLinkTitle="${dollar}{equanda-message:Add}" objectCreatorDelegate="prop:this">
<t:parameter name="empty"></t:parameter>
<t:parameter name="bottomBlock">
<t:equanda.formactionlink t:id="Add">${dollar}{equanda-message:Add}</t:equanda.formactionlink>
Modified: trunk/equanda-generate/src/main/velocity/t5gui/components/InlinePrimitiveList.tml.vm
===================================================================
--- trunk/equanda-generate/src/main/velocity/t5gui/components/InlinePrimitiveList.tml.vm 2009-01-04 15:39:42 UTC (rev 955)
+++ trunk/equanda-generate/src/main/velocity/t5gui/components/InlinePrimitiveList.tml.vm 2009-01-05 14:52:55 UTC (rev 956)
@@ -6,7 +6,7 @@
<div class="eqInlP" xmlns:t="http://tapestry.apache.org/schema/tapestry_5_0_0.xsd">
<input t:type="TextField" t:id="hiddenDeletedRows" class="nodisplay" />
- <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">
+ <div class="eqInlPR" t:id="pagedLoop" t:type="equanda/JSPagedLoop" source="value" value="current" volatile="true" index="index" rowsPerPage="7" additionalRowCount="prop:additionalRowCount" addRowLinkTitle="${dollar}{equanda-message:Add}" objectCreatorDelegate="prop:this">
<t:parameter name="empty"></t:parameter>
<t:parameter name="bottomBlock">
<t:equanda.formactionlink t:id="Add">${dollar}{equanda-message:Add}</t:equanda.formactionlink>
Modified: trunk/equanda-generate/src/main/velocity/t5gui/components/LinkList.tml.vm
===================================================================
--- trunk/equanda-generate/src/main/velocity/t5gui/components/LinkList.tml.vm 2009-01-04 15:39:42 UTC (rev 955)
+++ trunk/equanda-generate/src/main/velocity/t5gui/components/LinkList.tml.vm 2009-01-05 14:52:55 UTC (rev 956)
@@ -5,7 +5,7 @@
#* @vtlvariable name="field" type="org.equanda.domain.xml.Field" *#
<div class="eqLL" xmlns:t="http://tapestry.apache.org/schema/tapestry_5_0_0.xsd">
- <div class="eqLLR" t:type="equanda/JSPagedLoop" source="value" value="current" index="index" rowsPerPage="5" volatile="true">
+ <div class="eqLLR" t:type="equanda/JSPagedLoop" source="value" value="current" index="index" rowsPerPage="7" volatile="true">
<t:parameter name="empty"></t:parameter>
<div class="eqLLRE"><t:equanda.formactionlink t:id="Delete" context="index" class="eqOp"><img src="${dollar}{asset:classpath:org/equanda/t5gui/delete.png}" /></t:equanda.formactionlink></div>
<div class="eqLLRD"><t:${table.VarName}.SummaryEditLink object="current"/></div>
Modified: trunk/equanda-generate/src/main/velocity/t5gui/edit-tml/page.tml.vm
===================================================================
--- trunk/equanda-generate/src/main/velocity/t5gui/edit-tml/page.tml.vm 2009-01-04 15:39:42 UTC (rev 955)
+++ trunk/equanda-generate/src/main/velocity/t5gui/edit-tml/page.tml.vm 2009-01-05 14:52:55 UTC (rev 956)
@@ -16,7 +16,16 @@
#macro( pageContent )
#if( "ALL" == "$!page.Name" )
+#if( !$readOnlyContext )
+<t:if test="equanda-writable:field.${table.Name}.EquandaType">
+<t:parameter name="else">
+#end##readonlycontext
+#render( "view.field.${table.Name}.EquandaType" "view.field.EquandaType" "" "" )
+#if( !$readOnlyContext )
+</t:parameter>
#render( "edit.field.${table.Name}.EquandaType" "edit.field.EquandaType" "" "" )
+</t:if>
+#end##readonlycontext
#end
#foreach( $field in $page.Fields)
Modified: trunk/equanda-generate/src/main/velocity/t5gui/view-tml/linklist.tml.vm
===================================================================
--- trunk/equanda-generate/src/main/velocity/t5gui/view-tml/linklist.tml.vm 2009-01-04 15:39:42 UTC (rev 955)
+++ trunk/equanda-generate/src/main/velocity/t5gui/view-tml/linklist.tml.vm 2009-01-05 14:52:55 UTC (rev 956)
@@ -4,5 +4,11 @@
#* @vtlvariable name="table" type="org.equanda.domain.xml.transform.RootTable" *#
#* @vtlvariable name="field" type="org.equanda.domain.xml.Field" *#
<input t:type="TextField" t:value="literal:?" length="1" disabled="true" style="display:none"/>
-## @todo needs to be properly handled
-list of $table.Name objects
+<div class="eqLL">
+
+ <div class="eqLLR" t:type="equanda/JSPagedLoop" source="value.${field.VarName}" value="currentMultipleRow" index="currentMultipleIndex" rowsPerPage="7" volatile="true">
+ <t:parameter name="empty"></t:parameter>
+ <div class="eqLLRD"><t:${field.LinkTable.VarName}.SummaryEditLink object="currentMultipleRow"/></div>
+ </div>
+
+</div>
\ No newline at end of file
Modified: trunk/equanda-generate/src/main/velocity/t5gui/view-tml/type.tml.vm
===================================================================
--- trunk/equanda-generate/src/main/velocity/t5gui/view-tml/type.tml.vm 2009-01-04 15:39:42 UTC (rev 955)
+++ trunk/equanda-generate/src/main/velocity/t5gui/view-tml/type.tml.vm 2009-01-05 14:52:55 UTC (rev 956)
@@ -3,5 +3,13 @@
#* @vtlvariable name="readOnlyContext" type="boolean" *#
#* @vtlvariable name="table" type="org.equanda.domain.xml.transform.RootTable" *#
#* @vtlvariable name="field" type="org.equanda.domain.xml.Field" *#
-<input t:type="TextField" t:value="literal:?" length="1" disabled="true" style="display:none"/>
-${dollar}{value.EquandaType}
+#if( $table.Types.size() > 1 )
+<div class="eqFld ${table.Name}-t ${table.Name}-t-">
+ <label>${dollar}{equanda-message:field.EquandaType}</label>
+ <input t:type="TextField" t:label="equanda-message:field.EquandaType" t:value="literal:?" length="1" disabled="true" style="display:none"/>
+ ${dollar}{value.EquandaType}
+ <t:if test="has-equanda-message:field.${table.Name}.${field.Name}.caption">
+ <div class="eqFldC">${dollar}{equanda-message:field.${table.Name}.EquandaType.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...> - 2009-01-04 15:39:46
|
Revision: 955
http://equanda.svn.sourceforge.net/equanda/?rev=955&view=rev
Author: triathlon98
Date: 2009-01-04 15:39:42 +0000 (Sun, 04 Jan 2009)
Log Message:
-----------
EQ-306 show/edit translations
Modified Paths:
--------------
trunk/equanda-client/src/main/resources/org/equanda/translations/translations-common.txt
trunk/equanda-generate/src/main/velocity/t5gui/edit-tml/page.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-12-31 16:37:50 UTC (rev 954)
+++ trunk/equanda-client/src/main/resources/org/equanda/translations/translations-common.txt 2009-01-04 15:39:42 UTC (rev 955)
@@ -987,3 +987,11 @@
.label.en _
.label.nl _
.label.fr _
+.key toEdit/equanda-fixed
+.label.en edit
+.label.nl wijzigen
+.label.fr editer
+.key toDisplay/equanda-fixed
+.label.en display
+.label.nl bekijken
+.label.fr visualizer
Modified: trunk/equanda-generate/src/main/velocity/t5gui/edit-tml/page.tml.vm
===================================================================
--- trunk/equanda-generate/src/main/velocity/t5gui/edit-tml/page.tml.vm 2008-12-31 16:37:50 UTC (rev 954)
+++ trunk/equanda-generate/src/main/velocity/t5gui/edit-tml/page.tml.vm 2009-01-04 15:39:42 UTC (rev 955)
@@ -30,8 +30,8 @@
#end##end macro
<t:if test="isCanSwitch()">
-<a class="eqSwL" href="#" id="${dollar}{clientId}te${page.Name}" style="${showStyle}">to-edit</a>
-<a class="eqSwL" href="#" id="${dollar}{clientId}ts${page.Name}" style="${editStyle}">to-display</a>
+<a class="eqSwL" href="#" id="${dollar}{clientId}te${page.Name}" style="${showStyle}">${dollar}{equanda-message:toEdit}</a>
+<a class="eqSwL" href="#" id="${dollar}{clientId}ts${page.Name}" style="${editStyle}">${dollar}{equanda-message:toDisplay}</a>
</t:if>
<t:if test="isIncludeShow()">
<div id="${dollar}{clientId}show${page.Name}" style="${showStyle}">
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <tri...@us...> - 2008-12-31 16:37:54
|
Revision: 954
http://equanda.svn.sourceforge.net/equanda/?rev=954&view=rev
Author: triathlon98
Date: 2008-12-31 16:37:50 +0000 (Wed, 31 Dec 2008)
Log Message:
-----------
EQ-309 fix group names
Modified Paths:
--------------
trunk/equanda-tool/src/main/java/org/equanda/tool/translationsEditor/TranslationsEditor.java
Modified: trunk/equanda-tool/src/main/java/org/equanda/tool/translationsEditor/TranslationsEditor.java
===================================================================
--- trunk/equanda-tool/src/main/java/org/equanda/tool/translationsEditor/TranslationsEditor.java 2008-12-31 16:32:23 UTC (rev 953)
+++ trunk/equanda-tool/src/main/java/org/equanda/tool/translationsEditor/TranslationsEditor.java 2008-12-31 16:37:50 UTC (rev 954)
@@ -522,8 +522,7 @@
addToModel );
for ( Group group : page.getGroups() )
{
- importGroupKeys( config, "group." + table.getName() + "." + group.getName(), group, dbItems,
- addToModel );
+ importGroupKeys( config, "group." + table.getName() + ".", group, dbItems, addToModel );
}
}
for ( Select select : table.getSelects() )
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <tri...@us...> - 2008-12-31 16:32:33
|
Revision: 953
http://equanda.svn.sourceforge.net/equanda/?rev=953&view=rev
Author: triathlon98
Date: 2008-12-31 16:32:23 +0000 (Wed, 31 Dec 2008)
Log Message:
-----------
EQ-306 allow client side switching between view and edit mode
Modified Paths:
--------------
trunk/equanda-generate/src/main/velocity/t5gui/edit-tml/page.tml.vm
Modified: trunk/equanda-generate/src/main/velocity/t5gui/edit-tml/page.tml.vm
===================================================================
--- trunk/equanda-generate/src/main/velocity/t5gui/edit-tml/page.tml.vm 2008-12-31 16:01:17 UTC (rev 952)
+++ trunk/equanda-generate/src/main/velocity/t5gui/edit-tml/page.tml.vm 2008-12-31 16:32:23 UTC (rev 953)
@@ -30,8 +30,8 @@
#end##end macro
<t:if test="isCanSwitch()">
-<a href="#" id="${dollar}{clientId}te${page.Name}" style="${showStyle}">to-edit</a>
-<a href="#" id="${dollar}{clientId}ts${page.Name}" style="${editStyle}">to-display</a>
+<a class="eqSwL" href="#" id="${dollar}{clientId}te${page.Name}" style="${showStyle}">to-edit</a>
+<a class="eqSwL" href="#" id="${dollar}{clientId}ts${page.Name}" style="${editStyle}">to-display</a>
</t:if>
<t:if test="isIncludeShow()">
<div id="${dollar}{clientId}show${page.Name}" style="${showStyle}">
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <tri...@us...> - 2008-12-31 16:01:22
|
Revision: 952
http://equanda.svn.sourceforge.net/equanda/?rev=952&view=rev
Author: triathlon98
Date: 2008-12-31 16:01:17 +0000 (Wed, 31 Dec 2008)
Log Message:
-----------
EQ-306 allow client side switching between view and edit mode
Modified Paths:
--------------
trunk/equanda-generate/src/main/velocity/t5gui/edit-tml/page.tml.vm
trunk/equanda-generate/src/main/velocity/t5gui/view-tml/linkone.tml.vm
Modified: trunk/equanda-generate/src/main/velocity/t5gui/edit-tml/page.tml.vm
===================================================================
--- trunk/equanda-generate/src/main/velocity/t5gui/edit-tml/page.tml.vm 2008-12-31 14:16:07 UTC (rev 951)
+++ trunk/equanda-generate/src/main/velocity/t5gui/edit-tml/page.tml.vm 2008-12-31 16:01:17 UTC (rev 952)
@@ -6,7 +6,6 @@
#* @vtlvariable name="field" type="org.equanda.domain.xml.Field" *#
#* @vtlvariable name="page" type="org.equanda.domain.xml.Page" *#
#if( !$page.isHidden() )
-##<t:if test="equanda-readable:page.${table.Name}.${page.Name}">
#if( "ALL" == "$!page.Name" )
<t:parameter name="contentAll">
#else
@@ -48,5 +47,4 @@
</t:if>
</t:parameter>
-##</t:if>
#end##isHidden
Modified: trunk/equanda-generate/src/main/velocity/t5gui/view-tml/linkone.tml.vm
===================================================================
--- trunk/equanda-generate/src/main/velocity/t5gui/view-tml/linkone.tml.vm 2008-12-31 14:16:07 UTC (rev 951)
+++ trunk/equanda-generate/src/main/velocity/t5gui/view-tml/linkone.tml.vm 2008-12-31 16:01:17 UTC (rev 952)
@@ -3,4 +3,4 @@
#* @vtlvariable name="readOnlyContext" type="boolean" *#
#* @vtlvariable name="table" type="org.equanda.domain.xml.transform.RootTable" *#
#* @vtlvariable name="field" type="org.equanda.domain.xml.Field" *#
-<span t:type="${field.LinkTable.VarName}/Summary" t:id="${field.VarName}" t:value="value.${field.VarName}"/>
+<span t:type="${field.LinkTable.VarName}/Summary" t:value="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-12-31 14:16:12
|
Revision: 951
http://equanda.svn.sourceforge.net/equanda/?rev=951&view=rev
Author: triathlon98
Date: 2008-12-31 14:16:07 +0000 (Wed, 31 Dec 2008)
Log Message:
-----------
EQ-306 allow client side switching between view and edit mode, config start and whether switch is possible, include in Edit page (including EQ-308)
Modified Paths:
--------------
trunk/equanda-client/src/main/resources/org/equanda/translations/translations-common.txt
trunk/equanda-generate/src/main/velocity/t5gui/components/Edit.java.vm
trunk/equanda-generate/src/main/velocity/t5gui/components/Select.tml.vm
trunk/equanda-generate/src/main/velocity/t5gui/edit-tml/page.tml.vm
trunk/equanda-generate/src/main/velocity/t5gui/pages/Edit.java.vm
trunk/equanda-generate/src/main/velocity/t5gui/pages/Edit.tml.vm
trunk/src/site/wiki/templates/t5gui.wiki
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-12-31 11:28:43 UTC (rev 950)
+++ trunk/equanda-client/src/main/resources/org/equanda/translations/translations-common.txt 2008-12-31 14:16:07 UTC (rev 951)
@@ -975,7 +975,7 @@
.label.en Record status
.label.nl Record status
.label.fr Status des infos
-.key SelectEditHeader/equanda-fixed
+.key SelectViewHeader/equanda-fixed
.label.en _
.label.nl _
.label.fr _
Modified: trunk/equanda-generate/src/main/velocity/t5gui/components/Edit.java.vm
===================================================================
--- trunk/equanda-generate/src/main/velocity/t5gui/components/Edit.java.vm 2008-12-31 11:28:43 UTC (rev 950)
+++ trunk/equanda-generate/src/main/velocity/t5gui/components/Edit.java.vm 2008-12-31 14:16:07 UTC (rev 951)
@@ -114,8 +114,7 @@
@Parameter( value = "prop:false", defaultPrefix = BindingConstants.PROP )
private boolean editMode;
- @Parameter( value = "prop:false", defaultPrefix = BindingConstants.PROP )
- @Property
+ @Parameter( value = "prop:true", defaultPrefix = BindingConstants.PROP )
private boolean canSwitch;
public boolean isCanSwitch()
@@ -148,6 +147,9 @@
return editMode ? "display:block" : "display:none";
}
+ public boolean isIncludeShow() { return canSwitch || !editMode; }
+ public boolean isIncludeEdit() { return canSwitch || editMode; }
+
public String getClientId() { return clientId; }
public Integer getEditIndex()
@@ -223,8 +225,11 @@
renderSupport.addScript( eqSt + "Event.observe( '${table.Name}_et', 'change', function() { " + eqSt + " } );" );
#end
#foreach( $page in $table.Pages )
- renderSupport.addScript( "$('%ste${page.Name}').observe(\"click\", function() { eqFFedit('%s','${page.Name}'); });", clientId, clientId );
- renderSupport.addScript( "$('%sts${page.Name}').observe(\"click\", function() { eqFFshow('%s','${page.Name}'); });", clientId, clientId );
+ if ( isCanSwitch() )
+ {
+ renderSupport.addScript( "$('%ste${page.Name}').observe(\"click\", function() { eqFFedit('%s','${page.Name}'); });", clientId, clientId );
+ renderSupport.addScript( "$('%sts${page.Name}').observe(\"click\", function() { eqFFshow('%s','${page.Name}'); });", clientId, clientId );
+ }
#end
}
Modified: trunk/equanda-generate/src/main/velocity/t5gui/components/Select.tml.vm
===================================================================
--- trunk/equanda-generate/src/main/velocity/t5gui/components/Select.tml.vm 2008-12-31 11:28:43 UTC (rev 950)
+++ trunk/equanda-generate/src/main/velocity/t5gui/components/Select.tml.vm 2008-12-31 14:16:07 UTC (rev 951)
@@ -16,9 +16,9 @@
<t:equanda.formactionlink t:id="SelectList" context="currentRow.id">${dollar}{equanda-message:Add}</t:equanda.formactionlink>
<t:checkbox t:value="selectedRow" style="margin-left: 5px;" onclick="eqAxSelR('${dollar}{linkUrl}',this,'${dollar}{currentRow.id}')"/>
</t:parameter>
- <t:parameter name="eqSEHeader">${dollar}{equanda-message:SelectEditHeader}</t:parameter>
+ <t:parameter name="eqSEHeader">${dollar}{equanda-message:SelectViewHeader}</t:parameter>
<t:parameter name="eqSECell">
- <t:equanda.formactionlink t:id="Edit" context="currentRow.id">${dollar}{equanda-message:Edit}</t:equanda.formactionlink>
+ <t:equanda.formactionlink t:id="Edit" context="currentRow.id">${dollar}{equanda-message:View}</t:equanda.formactionlink>
</t:parameter>
#parse( "t5gui/render.vm" )
Modified: trunk/equanda-generate/src/main/velocity/t5gui/edit-tml/page.tml.vm
===================================================================
--- trunk/equanda-generate/src/main/velocity/t5gui/edit-tml/page.tml.vm 2008-12-31 11:28:43 UTC (rev 950)
+++ trunk/equanda-generate/src/main/velocity/t5gui/edit-tml/page.tml.vm 2008-12-31 14:16:07 UTC (rev 951)
@@ -6,6 +6,7 @@
#* @vtlvariable name="field" type="org.equanda.domain.xml.Field" *#
#* @vtlvariable name="page" type="org.equanda.domain.xml.Page" *#
#if( !$page.isHidden() )
+##<t:if test="equanda-readable:page.${table.Name}.${page.Name}">
#if( "ALL" == "$!page.Name" )
<t:parameter name="contentAll">
#else
@@ -29,16 +30,23 @@
#end##end macro
+<t:if test="isCanSwitch()">
<a href="#" id="${dollar}{clientId}te${page.Name}" style="${showStyle}">to-edit</a>
<a href="#" id="${dollar}{clientId}ts${page.Name}" style="${editStyle}">to-display</a>
+</t:if>
+<t:if test="isIncludeShow()">
<div id="${dollar}{clientId}show${page.Name}" style="${showStyle}">
#set( $readOnlyContext = true )
#pageContent()
</div>
+</t:if>
+<t:if test="isIncludeEdit()">
<div id="${dollar}{clientId}edit${page.Name}" t:type="equanda/FormFragment" visible="isEditMode()">
#set( $readOnlyContext = false )
#pageContent()
</div>
+</t:if>
</t:parameter>
+##</t:if>
#end##isHidden
Modified: trunk/equanda-generate/src/main/velocity/t5gui/pages/Edit.java.vm
===================================================================
--- trunk/equanda-generate/src/main/velocity/t5gui/pages/Edit.java.vm 2008-12-31 11:28:43 UTC (rev 950)
+++ trunk/equanda-generate/src/main/velocity/t5gui/pages/Edit.java.vm 2008-12-31 14:16:07 UTC (rev 951)
@@ -62,6 +62,10 @@
public Class getAllPage() { return ${table.Name}EquandaAll.class; }
+ public boolean isEditMode() { return getObject().getId() == null; }
+
+ public boolean isExistingRecord() { return getObject().getId() != null; }
+
#foreach( $action in $table.Actions )
Object onActionFromAction${table.Name}${action.Name}( Uoid object )
{
Modified: trunk/equanda-generate/src/main/velocity/t5gui/pages/Edit.tml.vm
===================================================================
--- trunk/equanda-generate/src/main/velocity/t5gui/pages/Edit.tml.vm 2008-12-31 11:28:43 UTC (rev 950)
+++ trunk/equanda-generate/src/main/velocity/t5gui/pages/Edit.tml.vm 2008-12-31 14:16:07 UTC (rev 951)
@@ -46,7 +46,7 @@
#end
<t:if test="equanda-readable:table.${table.Name}">
- <input t:type="${table.VarName}/Edit" t:value="object"/>
+ <input t:type="${table.VarName}/Edit" t:value="object" editmode="isEditMode()" canSwitch="isExistingRecord()" showmetadata="isExistingRecord()"/>
</t:if>
</t:editlayout>
Modified: trunk/src/site/wiki/templates/t5gui.wiki
===================================================================
--- trunk/src/site/wiki/templates/t5gui.wiki 2008-12-31 11:28:43 UTC (rev 950)
+++ trunk/src/site/wiki/templates/t5gui.wiki 2008-12-31 14:16:07 UTC (rev 951)
@@ -8,14 +8,14 @@
- setting links using suggest values (*)
- [powerful user management with customization of rights|t5guiAuthorization.html]
- [possible choice of visible fields per user|t5guiAuthorization.html]
-- possible printout (pdf doc) of the result of selectors, with user configurable fields (screen and pdf), and column width (pdf) (*)
-- inclusion of reporting in the user interface (*)
+{private}
+- possible printout (pdf doc) of the result of selectors, with user configurable fields (screen and pdf), and column width (pdf)
+- inclusion of reporting in the user interface
+{private}
- generated components can be used to build custom pages
-- highly customizeably, layout components define how things are combined on screen
+- highly customizable, layout components define how things are combined on screen
- possible to change the components used for a specific type or field or on a case by case basis
-(*) ^Items marked like this were available in the old tapestry4 version and will be available again for the tapestry5 version.^
-
h2. Usage
To make sure the generated site works properly, you need to include the following dependencies.
@@ -33,7 +33,7 @@
<dependency>
<groupId>org.apache.tapestry</groupId>
<artifactId>t5c-commons</artifactId>
- <version>0.5.10</version>
+ <version>0.5.18</version>
</dependency>
{code}
and following repositories
@@ -56,15 +56,14 @@
h2. Generated components
For each (root) table the following components are generated.
-- Edit : allows editing of an entire record, considering the configured authorization for the user.
-- Display : similar in layout as the edit components, except that all fields which are allowed to be viewed are displayed read only.
+- Edit : allows editing and or showing an entire record, considering the configured authorization for the user. Two important parameters are "editMode" and "canSwitch". They both accept boolean values and indicate whether the component starts in edit or display mode and whether the user can switch between the two.
- InlineLinkList : allows inline editing of the multiple records.
- InlineLinkOne : allows inline editing of the one record.
- LinkList : ...
- LinkOne : ...
- Select : allows to select one or more records to be assigned to edited record.
- Summary : Short summary of a record. Displays the fields which have been configured for summary display.
-- SummaryEditLink : A summary on which you can click to edit the record.
+- SummaryEditLink : A summary on which you can click to edit/view the record.
Also one universal component are generated.
- InlinePrimitiveList : allows inline editing of the multiple string, date and timestamp fields.
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <tri...@us...> - 2008-12-31 11:28:53
|
Revision: 950
http://equanda.svn.sourceforge.net/equanda/?rev=950&view=rev
Author: triathlon98
Date: 2008-12-31 11:28:43 +0000 (Wed, 31 Dec 2008)
Log Message:
-----------
EQ-306 allow client side switching between view and edit mode
Modified Paths:
--------------
trunk/equanda-generate/src/main/velocity/t5gui/components/Edit.java.vm
trunk/equanda-tapestry5/src/main/resources/org/equanda/tapestry5/resources/equanda.js
Modified: trunk/equanda-generate/src/main/velocity/t5gui/components/Edit.java.vm
===================================================================
--- trunk/equanda-generate/src/main/velocity/t5gui/components/Edit.java.vm 2008-12-31 09:35:04 UTC (rev 949)
+++ trunk/equanda-generate/src/main/velocity/t5gui/components/Edit.java.vm 2008-12-31 11:28:43 UTC (rev 950)
@@ -114,6 +114,20 @@
@Parameter( value = "prop:false", defaultPrefix = BindingConstants.PROP )
private boolean editMode;
+ @Parameter( value = "prop:false", defaultPrefix = BindingConstants.PROP )
+ @Property
+ private boolean canSwitch;
+
+ public boolean isCanSwitch()
+ {
+ return canSwitch;
+ }
+
+ public void setCanSwitch( boolean canSwitch )
+ {
+ this.canSwitch = canSwitch;
+ }
+
public boolean isEditMode()
{
return editMode;
@@ -209,8 +223,8 @@
renderSupport.addScript( eqSt + "Event.observe( '${table.Name}_et', 'change', function() { " + eqSt + " } );" );
#end
#foreach( $page in $table.Pages )
- renderSupport.addScript( "$('%ste${page.Name}').observe(\"click\", function() { eqFFedit('%s','${page.Name}'); });\n", clientId, clientId );
- renderSupport.addScript( "$('%sts${page.Name}').observe(\"click\", function() { eqFFshow('%s','${page.Name}'); });\n", clientId, clientId );
+ renderSupport.addScript( "$('%ste${page.Name}').observe(\"click\", function() { eqFFedit('%s','${page.Name}'); });", clientId, clientId );
+ renderSupport.addScript( "$('%sts${page.Name}').observe(\"click\", function() { eqFFshow('%s','${page.Name}'); });", clientId, clientId );
#end
}
Modified: trunk/equanda-tapestry5/src/main/resources/org/equanda/tapestry5/resources/equanda.js
===================================================================
--- trunk/equanda-tapestry5/src/main/resources/org/equanda/tapestry5/resources/equanda.js 2008-12-31 09:35:04 UTC (rev 949)
+++ trunk/equanda-tapestry5/src/main/resources/org/equanda/tapestry5/resources/equanda.js 2008-12-31 11:28:43 UTC (rev 950)
@@ -163,7 +163,9 @@
$( clientId + 'te' + page ).style.display = 'none';
$( clientId + 'ts' + page ).style.display = 'block';
Effect.SlideUp( $( clientId + 'show' + page ) );
- $( clientId + 'edit' + page )._tapestry.formFragment.setVisible( true );
+ var ffname = clientId + 'edit' + page;
+ if ( !$T( ffname ).formFragment ) new Tapestry.FormFragment( ffname );
+ $T( ffname ).formFragment.setVisible( true );
}
/**
@@ -175,7 +177,9 @@
{
$( clientId + 'te' + page ).style.display = 'block';
$( clientId + 'ts' + page ).style.display = 'none';
- $( clientId + 'edit' + page )._tapestry.formFragment.setVisible( false );
+ var ffname = clientId + 'edit' + page;
+ if ( !$T( ffname ).formFragment ) new Tapestry.FormFragment( ffname );
+ $T( ffname ).formFragment.setVisible( false );
Effect.SlideDown( $( clientId + 'show' + page ) );
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <tri...@us...> - 2008-12-31 09:35:10
|
Revision: 949
http://equanda.svn.sourceforge.net/equanda/?rev=949&view=rev
Author: triathlon98
Date: 2008-12-31 09:35:04 +0000 (Wed, 31 Dec 2008)
Log Message:
-----------
EQ-306 allow client side switching between view and edit mode
Modified Paths:
--------------
trunk/equanda-generate/src/main/velocity/t5gui/components/Edit.java.vm
trunk/equanda-tapestry5/src/main/resources/org/equanda/tapestry5/resources/equanda.js
Removed Paths:
-------------
trunk/equanda-generate/src/main/velocity/t5gui/components/Display.java.vm
trunk/equanda-generate/src/main/velocity/t5gui/components/Display.tml.vm
Deleted: trunk/equanda-generate/src/main/velocity/t5gui/components/Display.java.vm
===================================================================
--- trunk/equanda-generate/src/main/velocity/t5gui/components/Display.java.vm 2008-12-31 08:25:59 UTC (rev 948)
+++ trunk/equanda-generate/src/main/velocity/t5gui/components/Display.java.vm 2008-12-31 09:35:04 UTC (rev 949)
@@ -1,140 +0,0 @@
-#** @vtlvariable name="dollar" type="java.lang.String" *#
-#** @vtlvariable name="package" type="java.lang.String" *#
-#** @vtlvariable name="packageDir" type="java.lang.String" *#
-#** @vtlvariable name="generationdate" type="java.lang.String" *#
-#** @vtlvariable name="readOnlyContext" type="boolean" *#
-#** @vtlvariable name="table" type="org.equanda.domain.xml.transform.RootTable" *#
-#** @vtlvariable name="field" type="org.equanda.domain.xml.Field" *#
-#** @vtlvariable name="engine" type="org.equanda.generate.Generator" *#
-#**
- * 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.
- *
- * Contributor(s):
- * @author <a href="mailto:jo...@pr...">Joachim Van der Auwera</a>
- *#/**
- * This file is generated by equanda on $generationdate, do not modify
- */
-
-package ${package}.components.${table.VarName};
-
-#set( $ejbPackage=${engine.getConfig("ejb-package")} )
-import ${ejbPackage}.client.${table.Name};
-import ${package}.pages.${table.Name}Edit;
-import org.apache.tapestry5.*;
-import org.apache.tapestry5.annotations.Environmental;
-import org.apache.tapestry5.annotations.IncludeJavaScriptLibrary;
-import org.apache.tapestry5.annotations.InjectPage;
-import org.apache.tapestry5.annotations.Parameter;
-import org.apache.tapestry5.ioc.annotations.Inject;
-import org.equanda.persistence.Uoid;
-import org.equanda.t5gui.translators.UoidTranslator;
-import org.equanda.t5gui.services.EquandaMessages;
-import org.equanda.tapestry5.base.EquandaOptionModel;
-import org.equanda.tapestry5.base.EquandaSelectModel;
-import org.equanda.tapestry5.translators.TimestampTranslator;
-
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Iterator;
-import java.util.List;
-
-/**
- * Object display component, view only
- */
-#if( $table.Types.size() > 1 )
-@IncludeJavaScriptLibrary( "classpath:/${packageDir}/typechanger.js" )
-#end
-public class Display
- extends ${package}.base.${table.VarName}.OneObjectComponentBase
-{
- @Environmental
- private RenderSupport renderSupport;
-
- @Parameter( required = true )
- private ${ejbPackage}.client.${table.Name} value;
-
- @Parameter( value = "prop:true" )
- private boolean showMetadata;
-
- @Inject
- private EquandaMessages messages;
-
- public ${ejbPackage}.client.${table.Name} getValue()
- {
- return value;
- }
-
- public void setValue( ${ejbPackage}.client.${table.Name} value )
- {
- this.value = value;
- }
-
- public boolean hasValue() { return value != null; }
-
- public boolean isTypeKnown() { return value.getId() != null; }
-
- public Integer getTabsExcludeIndex()
- {
- return showMetadata ? null : new Integer( -1 );
- }
-
-#if( $table.Types.size() > 1 )
- void beginRender()
- {
- String eqSt = "eqSt${table.Name}( ${dollar}('${table.Name}_et') );";
- renderSupport.addScript( eqSt + "Event.observe( '${table.Name}_et', 'change', function() { " + eqSt + " } );" );
- }
-#end
-
- public ValueEncoder getTypeEncoder()
- {
- return new ValueEncoder<String>()
- {
- public String toClient( String o )
- {
- return o;
- }
-
- public String toValue( String s )
- {
- return s;
- }
- };
- }
-
- public SelectModel getTypeModel()
- {
- List<OptionModel> list = new ArrayList<OptionModel>();
- ${ejbPackage}.client.type.${table.Name}Type type = new ${ejbPackage}.client.type.${table.Name}Type();
- Collection<String> values = type.getAllowedStringValues();
- Iterator<String> names = type.getAllowedStringNames().iterator();
- for ( String value : values )
- {
- String name = names.next();
- list.add( new EquandaOptionModel( messages.get( "type.${table.Name}." + name ), value ) );
- }
- return new EquandaSelectModel( null, list );
- }
-}
Deleted: trunk/equanda-generate/src/main/velocity/t5gui/components/Display.tml.vm
===================================================================
--- trunk/equanda-generate/src/main/velocity/t5gui/components/Display.tml.vm 2008-12-31 08:25:59 UTC (rev 948)
+++ trunk/equanda-generate/src/main/velocity/t5gui/components/Display.tml.vm 2008-12-31 09:35:04 UTC (rev 949)
@@ -1,16 +0,0 @@
-#* @vtlmacrolibrary path="../render.vm" *#
-#* @vtlvariable name="dollar" type="java.lang.String" *#
-#* @vtlvariable name="readOnlyContext" type="boolean" *#
-#* @vtlvariable name="table" type="org.equanda.domain.xml.transform.RootTable" *#
-<div class="${table.Name}-edit" xmlns:t="http://tapestry.apache.org/schema/tapestry_5_0_0.xsd">
-<t:if test="equanda-readable:table.${table.Name}">
-
-#parse( "t5gui/render.vm" )
-#set( $readOnlyContext = true )
-
-## render all the pages in the form
-#render( "pages" "" "" "" )
-
-#set( $readOnlyContext = false )
-</t:if>
-</div>
Modified: trunk/equanda-generate/src/main/velocity/t5gui/components/Edit.java.vm
===================================================================
--- trunk/equanda-generate/src/main/velocity/t5gui/components/Edit.java.vm 2008-12-31 08:25:59 UTC (rev 948)
+++ trunk/equanda-generate/src/main/velocity/t5gui/components/Edit.java.vm 2008-12-31 09:35:04 UTC (rev 949)
@@ -67,9 +67,11 @@
/**
* Object edit component
*/
+@IncludeJavaScriptLibrary( { "classpath:/org/equanda/tapestry5/resources/equanda.js"
#if( $table.Types.size() > 1 )
-@IncludeJavaScriptLibrary( "classpath:/${packageDir}/typechanger.js" )
+ ,"classpath:/${packageDir}/typechanger.js"
#end
+ } )
public class Edit
extends ${package}.base.${table.VarName}.OneObjectComponentBase
{
@@ -207,20 +209,8 @@
renderSupport.addScript( eqSt + "Event.observe( '${table.Name}_et', 'change', function() { " + eqSt + " } );" );
#end
#foreach( $page in $table.Pages )
- renderSupport.addScript( "$('%ste${page.Name}').observe(\"click\", function()\n"
- + "{\n"
- + " $('%ste${page.Name}').style.display='none';\n"
- + " $('%sts${page.Name}').style.display='block';\n"
- + " Effect.SlideUp($('%sshow${page.Name}'));\n"
- + " $('%sedit${page.Name}')._tapestry.formFragment.setVisible(true);\n"
- + "});", clientId, clientId, clientId, clientId, clientId );
- renderSupport.addScript( "$('%sts${page.Name}').observe(\"click\", function()\n"
- + "{\n"
- + " $('%ste${page.Name}').style.display='block';\n"
- + " $('%sts${page.Name}').style.display='none';\n"
- + " $('%sedit${page.Name}')._tapestry.formFragment.setVisible(false);\n"
- + " Effect.SlideDown($('%sshow${page.Name}'));\n"
- + "});", clientId, clientId, clientId, clientId, clientId );
+ renderSupport.addScript( "$('%ste${page.Name}').observe(\"click\", function() { eqFFedit('%s','${page.Name}'); });\n", clientId, clientId );
+ renderSupport.addScript( "$('%sts${page.Name}').observe(\"click\", function() { eqFFshow('%s','${page.Name}'); });\n", clientId, clientId );
#end
}
Modified: trunk/equanda-tapestry5/src/main/resources/org/equanda/tapestry5/resources/equanda.js
===================================================================
--- trunk/equanda-tapestry5/src/main/resources/org/equanda/tapestry5/resources/equanda.js 2008-12-31 08:25:59 UTC (rev 948)
+++ trunk/equanda-tapestry5/src/main/resources/org/equanda/tapestry5/resources/equanda.js 2008-12-31 09:35:04 UTC (rev 949)
@@ -152,3 +152,30 @@
if ( '' == val ) val = ' ';
zoneObject.updateFromURL( urlStart + eqUrlEnc( val ) + urlEnd );
}
+
+/**
+ * Switch to edit mode in the edit component
+ * @param clientId
+ * @param page
+ */
+function eqFFedit( clientId, page )
+{
+ $( clientId + 'te' + page ).style.display = 'none';
+ $( clientId + 'ts' + page ).style.display = 'block';
+ Effect.SlideUp( $( clientId + 'show' + page ) );
+ $( clientId + 'edit' + page )._tapestry.formFragment.setVisible( true );
+}
+
+/**
+ * Switch to show/display mode in the edit component
+ * @param clientId
+ * @param page
+ */
+function eqFFshow( clientId, page )
+{
+ $( clientId + 'te' + page ).style.display = 'block';
+ $( clientId + 'ts' + page ).style.display = 'none';
+ $( clientId + 'edit' + page )._tapestry.formFragment.setVisible( false );
+ Effect.SlideDown( $( clientId + 'show' + page ) );
+
+}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <tri...@us...> - 2008-12-31 08:26:09
|
Revision: 948
http://equanda.svn.sourceforge.net/equanda/?rev=948&view=rev
Author: triathlon98
Date: 2008-12-31 08:25:59 +0000 (Wed, 31 Dec 2008)
Log Message:
-----------
EQ-306 allow client side switching between view and edit mode
Modified Paths:
--------------
trunk/equanda-generate/src/main/velocity/t5gui/components/Edit.java.vm
trunk/equanda-generate/src/main/velocity/t5gui/edit-tml/page.tml.vm
trunk/equanda-generate/src/main/velocity/t5gui.ini
Added Paths:
-----------
trunk/equanda-tapestry5/src/main/java/org/equanda/tapestry5/components/FormFragment.java
Modified: trunk/equanda-generate/src/main/velocity/t5gui/components/Edit.java.vm
===================================================================
--- trunk/equanda-generate/src/main/velocity/t5gui/components/Edit.java.vm 2008-12-30 17:35:45 UTC (rev 947)
+++ trunk/equanda-generate/src/main/velocity/t5gui/components/Edit.java.vm 2008-12-31 08:25:59 UTC (rev 948)
@@ -107,6 +107,33 @@
private int currentMultipleIndex;
+ private String clientId;
+
+ @Parameter( value = "prop:false", defaultPrefix = BindingConstants.PROP )
+ private boolean editMode;
+
+ public boolean isEditMode()
+ {
+ return editMode;
+ }
+
+ public void setEditMode( boolean value )
+ {
+ editMode = value;
+ }
+
+ public String getShowStyle()
+ {
+ return editMode ? "display:none" : "display:block";
+ }
+
+ public String getEditStyle()
+ {
+ return editMode ? "display:block" : "display:none";
+ }
+
+ public String getClientId() { return clientId; }
+
public Integer getEditIndex()
{
return editIndex;
@@ -165,6 +192,7 @@
void beginRender()
{
+ clientId = renderSupport.allocateClientId( resources );
#foreach( $field in $table.LinkFields )
#if( !$field.isMultiple() )
cache.put( new IdIndexKey( "${table.Name}.${field.Name}", editIndex ),
@@ -177,7 +205,23 @@
#if( $table.Types.size() > 1 )
String eqSt = "eqSt${table.Name}( ${dollar}('${table.Name}_et') );";
renderSupport.addScript( eqSt + "Event.observe( '${table.Name}_et', 'change', function() { " + eqSt + " } );" );
-#end
+#end
+#foreach( $page in $table.Pages )
+ renderSupport.addScript( "$('%ste${page.Name}').observe(\"click\", function()\n"
+ + "{\n"
+ + " $('%ste${page.Name}').style.display='none';\n"
+ + " $('%sts${page.Name}').style.display='block';\n"
+ + " Effect.SlideUp($('%sshow${page.Name}'));\n"
+ + " $('%sedit${page.Name}')._tapestry.formFragment.setVisible(true);\n"
+ + "});", clientId, clientId, clientId, clientId, clientId );
+ renderSupport.addScript( "$('%sts${page.Name}').observe(\"click\", function()\n"
+ + "{\n"
+ + " $('%ste${page.Name}').style.display='block';\n"
+ + " $('%sts${page.Name}').style.display='none';\n"
+ + " $('%sedit${page.Name}')._tapestry.formFragment.setVisible(false);\n"
+ + " Effect.SlideDown($('%sshow${page.Name}'));\n"
+ + "});", clientId, clientId, clientId, clientId, clientId );
+#end
}
public ValueEncoder getTypeEncoder()
Modified: trunk/equanda-generate/src/main/velocity/t5gui/edit-tml/page.tml.vm
===================================================================
--- trunk/equanda-generate/src/main/velocity/t5gui/edit-tml/page.tml.vm 2008-12-30 17:35:45 UTC (rev 947)
+++ trunk/equanda-generate/src/main/velocity/t5gui/edit-tml/page.tml.vm 2008-12-31 08:25:59 UTC (rev 948)
@@ -8,12 +8,17 @@
#if( !$page.isHidden() )
#if( "ALL" == "$!page.Name" )
<t:parameter name="contentAll">
-#render( "edit.field.${table.Name}.EquandaType" "edit.field.EquandaType" "" "" )
#else
<t:parameter name="content$pageindex">
#set( $pageindex = $pageindex + 1 )
#end
+#macro( pageContent )
+
+#if( "ALL" == "$!page.Name" )
+#render( "edit.field.${table.Name}.EquandaType" "edit.field.EquandaType" "" "" )
+#end
+
#foreach( $field in $page.Fields)
#render( "field" "" "" "" )
#end
@@ -22,5 +27,18 @@
#render( "group.${table.Name}.${group.Name}" "group" "" "" )
#end
+#end##end macro
+
+<a href="#" id="${dollar}{clientId}te${page.Name}" style="${showStyle}">to-edit</a>
+<a href="#" id="${dollar}{clientId}ts${page.Name}" style="${editStyle}">to-display</a>
+<div id="${dollar}{clientId}show${page.Name}" style="${showStyle}">
+#set( $readOnlyContext = true )
+#pageContent()
+</div>
+<div id="${dollar}{clientId}edit${page.Name}" t:type="equanda/FormFragment" visible="isEditMode()">
+#set( $readOnlyContext = false )
+#pageContent()
+</div>
+
</t:parameter>
#end##isHidden
Modified: trunk/equanda-generate/src/main/velocity/t5gui.ini
===================================================================
--- trunk/equanda-generate/src/main/velocity/t5gui.ini 2008-12-30 17:35:45 UTC (rev 947)
+++ trunk/equanda-generate/src/main/velocity/t5gui.ini 2008-12-31 08:25:59 UTC (rev 948)
@@ -73,25 +73,20 @@
output16=${outputDir}${packageDir}components/${_table}/InlineLinkList.tml
template16=components/InlineLinkList.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
-
// edit page
-output19=${outputDir}${packageDir}pages/${table}Edit.java
-template19=pages/Edit.java.vm
-output20=${outputDir}${packageDir}pages/${table}Edit.tml
-template20=pages/Edit.tml.vm
+output17=${outputDir}${packageDir}pages/${table}Edit.java
+template17=pages/Edit.java.vm
+output18=${outputDir}${packageDir}pages/${table}Edit.tml
+template18=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
+output19=${outputDir}${packageDir}pages/${_table}/AuthAndConfig.java
+template19=pages/TableAuthConfig.java.vm
+output20=${outputDir}${packageDir}pages/${_table}/AuthAndConfig.tml
+template20=pages/TableAuthConfig.tml.vm
-output23=${outputDir}${packageDir}base/${_table}/OneObjectComponentBase.java
-template23=base/OneObjectComponentBase.java.vm
+output21=${outputDir}${packageDir}base/${_table}/OneObjectComponentBase.java
+template21=base/OneObjectComponentBase.java.vm
[action-not-hidden]
Added: trunk/equanda-tapestry5/src/main/java/org/equanda/tapestry5/components/FormFragment.java
===================================================================
--- trunk/equanda-tapestry5/src/main/java/org/equanda/tapestry5/components/FormFragment.java (rev 0)
+++ trunk/equanda-tapestry5/src/main/java/org/equanda/tapestry5/components/FormFragment.java 2008-12-31 08:25:59 UTC (rev 948)
@@ -0,0 +1,204 @@
+/**
+ * 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.tapestry5.components;
+
+import org.apache.tapestry5.*;
+import org.apache.tapestry5.annotations.Environmental;
+import org.apache.tapestry5.annotations.Parameter;
+import org.apache.tapestry5.annotations.SupportsInformalParameters;
+import org.apache.tapestry5.corelib.components.Form;
+import org.apache.tapestry5.corelib.internal.ComponentActionSink;
+import org.apache.tapestry5.corelib.internal.FormSupportAdapter;
+import org.apache.tapestry5.corelib.internal.HiddenFieldPositioner;
+import org.apache.tapestry5.dom.Element;
+import org.apache.tapestry5.internal.services.ClientBehaviorSupport;
+import org.apache.tapestry5.ioc.annotations.Inject;
+import org.apache.tapestry5.services.*;
+import org.apache.tapestry5.services.FormSupport;
+import org.slf4j.Logger;
+
+/**
+ * Variation of tapestry's builtin FormFragment component which allows you to force the id.
+ *
+ * @author <a href="mailto:jo...@pr...">Joachim Van der Auwera</a>
+ */
+@SupportsInformalParameters
+public class FormFragment
+ implements ClientElement
+{
+ /**
+ * Determines if the fragment is intially visible or initially invisible (the default). This is only used when
+ * rendering; when the form is submitted, the hidden field value is used to determine whether the elements within
+ * the fragment should be processed (or ignored if still invisible).
+ */
+ @Parameter
+ private boolean visible;
+
+ /**
+ * Name of a function on the client-side Tapestry.ElementEffect object that is invoked to make the fragment visible.
+ * If not specified, then the default "slidedown" function is used.
+ */
+ @Parameter( defaultPrefix = BindingConstants.LITERAL )
+ private String show;
+
+ /**
+ * Name of a function on the client-side Tapestry.ElementEffect object that is invoked when the fragment is to be
+ * hidden. If not specified, the default "slideup" function is used.
+ */
+ @Parameter( defaultPrefix = BindingConstants.LITERAL )
+ private String hide;
+
+ /**
+ * The element to render for each iteration of the loop. The default comes from the template, or "div" if the
+ * template did not specific an element.
+ */
+ @Parameter( defaultPrefix = BindingConstants.LITERAL )
+ private String element;
+
+ /** Possibly forced id. */
+ @Parameter( defaultPrefix = BindingConstants.LITERAL )
+ private String id;
+
+ @Inject
+ private Environment environment;
+
+ @Environmental
+ private RenderSupport renderSupport;
+
+ @Inject
+ private ComponentSource componentSource;
+
+ @Inject
+ private ComponentResources resources;
+
+ @Environmental
+ private ClientBehaviorSupport clientBehaviorSupport;
+
+ private String clientId;
+
+ private ComponentActionSink componentActions;
+
+ @Inject
+ private Request request;
+
+ @Inject
+ private Logger logger;
+
+ @Inject
+ private HiddenFieldLocationRules rules;
+
+ private HiddenFieldPositioner hiddenFieldPositioner;
+
+ String defaultElement()
+ {
+ return resources.getElementName( "div" );
+ }
+
+ /**
+ * Renders a <div> tag and provides an override of the {@link org.apache.tapestry5.services.FormSupport}
+ * environmental.
+ */
+ void beginRender( MarkupWriter writer )
+ {
+ org.apache.tapestry5.services.FormSupport formSupport = environment.peekRequired( FormSupport.class );
+
+ if ( resources.isBound( "id" ) )
+ {
+ clientId = id;
+ }
+ else
+ {
+ resources.getId();
+ clientId = renderSupport.allocateClientId( id );
+ }
+ hiddenFieldPositioner = new HiddenFieldPositioner( writer, rules );
+
+ Element element = writer.element( this.element, "id", clientId );
+
+ resources.renderInformalParameters( writer );
+
+ if ( !visible )
+ {
+ element.addClassName( CSSClassConstants.INVISIBLE );
+ }
+
+ clientBehaviorSupport.addFormFragment( clientId, show, hide );
+
+ componentActions = new ComponentActionSink( logger );
+
+ // Here's the magic of environmentals ... we can create a wrapper around
+ // the normal FormSupport environmental that intercepts some of the behavior.
+ // Here we're setting aside all the actions inside the FormFragment so that we
+ // can control whether those actions occur when the form is submitted.
+
+ FormSupport override = new FormSupportAdapter( formSupport )
+ {
+ @Override
+ public void store( Object component, ComponentAction action )
+ {
+ componentActions.store( component, action );
+ }
+
+ @Override
+ public void storeAndExecute( Object component, ComponentAction action )
+ {
+ componentActions.store( component, action );
+
+ action.execute( component );
+ }
+ };
+
+ // Tada! Now all the enclosed components will use our override of FormSupport,
+ // until we pop it off.
+
+ environment.push( FormSupport.class, override );
+
+ }
+
+ /**
+ * Closes the <div> tag and pops off the {@link org.apache.tapestry5.services.FormSupport} environmental
+ * override.
+ *
+ * @param writer
+ */
+ void afterRender( MarkupWriter writer )
+ {
+ hiddenFieldPositioner.getElement().attributes(
+ "type", "hidden",
+ "name", Form.FORM_DATA,
+ "id", clientId + ":hidden",
+ "value", componentActions.toBase64()
+ );
+
+ writer.end(); // div
+
+ environment.pop( FormSupport.class );
+ }
+
+ public String getClientId()
+ {
+ return clientId;
+ }
+}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <tri...@us...> - 2008-12-30 17:35:56
|
Revision: 947
http://equanda.svn.sourceforge.net/equanda/?rev=947&view=rev
Author: triathlon98
Date: 2008-12-30 17:35:45 +0000 (Tue, 30 Dec 2008)
Log Message:
-----------
EQ-305 assure checkstyle stuff does not prohibit building individual modules
Modified Paths:
--------------
trunk/pom.xml
Added Paths:
-----------
trunk/equanda-checkstyle/
trunk/equanda-checkstyle/pom.xml
trunk/equanda-checkstyle/src/
trunk/equanda-checkstyle/src/main/
trunk/equanda-checkstyle/src/main/resources/
trunk/equanda-checkstyle/src/main/resources/config/
trunk/equanda-checkstyle/src/main/resources/config/equanda-checkstyle.xml
Removed Paths:
-------------
trunk/config/
trunk/equanda-checkstyle/src/main/resources/config/checkstyle.xml
Added: trunk/equanda-checkstyle/pom.xml
===================================================================
--- trunk/equanda-checkstyle/pom.xml (rev 0)
+++ trunk/equanda-checkstyle/pom.xml 2008-12-30 17:35:45 UTC (rev 947)
@@ -0,0 +1,17 @@
+<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">
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>org.equanda</groupId>
+ <artifactId>equanda-checkstyle</artifactId>
+ <packaging>jar</packaging>
+ <version>1.0.0</version>
+ <name>equanda-checkstyle</name>
+ <description>checkstyle configuration for equanda</description>
+
+ <distributionManagement>
+ <repository>
+ <id>progs-repo</id>
+ <name>PROGS maven repository</name>
+ <url>dav:http://maven.progs.be/m2repo</url>
+ </repository>
+ </distributionManagement>
+</project>
Deleted: trunk/equanda-checkstyle/src/main/resources/config/checkstyle.xml
===================================================================
--- trunk/config/checkstyle.xml 2008-12-30 11:18:02 UTC (rev 945)
+++ trunk/equanda-checkstyle/src/main/resources/config/checkstyle.xml 2008-12-30 17:35:45 UTC (rev 947)
@@ -1,265 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE module PUBLIC
- "-//Puppy Crawl//DTD Check Configuration 1.1//EN"
- "http://www.puppycrawl.com/dtds/configuration_1_1.dtd">
-
-<!--
- Checkstyle is very configurable. Be sure to read the documentation at
- http://checkstyle.sf.net (or in your downloaded distribution).
--->
-
-<module name="Checker">
-
- <!-- Checks that a package.html file exists for each package. -->
- <!-- See http://checkstyle.sf.net/config_javadoc.html#PackageHtml -->
- <!--<module name="PackageHtml"/>-->
-
- <!-- Checks whether files end with a new line. -->
- <!-- See http://checkstyle.sf.net/config_misc.html#NewlineAtEndOfFile -->
- <module name="NewlineAtEndOfFile">
- <property name="severity" value="info"/>
- </module>
-
- <!-- Checks that property files contain the same keys. -->
- <!-- See http://checkstyle.sf.net/config_misc.html#Translation -->
- <!--<module name="Translation"/>-->
-
- <!-- duplicate code, see http://checkstyle.sourceforge.net/config_duplicates.html -->
- <!--<module name="StrictDuplicateCode"/>-->
-
- <module name="TreeWalker">
-
- <property name="cacheFile" value="${checkstyle.cache.file}"/>
- <property name="tabWidth" value="4"/>
- <property name="charset" value="UTF-8"/>
-
- <!-- Block checks, see http://checkstyle.sourceforge.net/config_blocks.html -->
-
- <!-- disabled because we allow all on one line if it fits
- <module name="LeftCurly">
- <property name="severity" value="info"/>
- <property name="option" value="nl"/>
- </module>
- <module name="RightCurly">
- <property name="severity" value="info"/>
- <property name="option" value="alone"/>
- </module>
- -->
- <!--<module name="EmptyBlock"/>-->
- <module name="AvoidNestedBlocks"/>
- <!--<module name="NeedBraces"/> no braces is allowed when on same line -->
-
- <!-- Javadoc comments checks, see http://checkstyle.sourceforge.net/config_javadoc.html -->
-
- <module name="JavadocMethod">
- <property name="excludeScope" value="private"/>
- </module>
- <!--<module name="JavadocType"/>-->
- <!--<module name="JavadocVariable"/>-->
- <!--<module name="JavadocStyle"/>-->
-
- <!-- Naming conventions, see http://checkstyle.sourceforge.net/config_naming.html -->
-
- <!--<module name="AbstractClassName"/>-->
- <!--<module name="LocalFinalVariableName"/>-->
- <module name="ConstantName">
- <property name="format" value="^(([A-Z][A-Z0-9]*(_[A-Z0-9]+)*)|log)$"/>
- </module>
- <module name="LocalFinalVariableName"/>
- <module name="LocalVariableName"/>
- <module name="MemberName"/>
- <module name="MethodName"/>
- <module name="PackageName"/>
- <module name="ParameterName"/>
- <module name="StaticVariableName">
- <property name="format" value="^([A-Z][A-Z0-9]*(_[A-Z0-9]+)*)$"/>
- </module>
- <module name="TypeName"/>
-
- <!-- header, see http://checkstyle.sourceforge.net/config_header.html -->
-
- <module name="Header">
- <!-- The follow property value demonstrates the ability -->
- <!-- to have access to ANT properties. In this case it uses -->
- <!-- the ${basedir} property to allow Checkstyle to be run -->
- <!-- from any directory within a project. -->
- <property name="headerFile" value="config/equanda-header.txt"/>
- </module>
-
- <!-- imports, see http://checkstyle.sourceforge.net/config_imports.html -->
-
- <!--<module name="AvoidStarImport"/>-->
- <module name="IllegalImport"/>
- <module name="RedundantImport"/>
- <module name="UnusedImports">
- <property name="severity" value="info"/>
- </module>
- <module name="ImportOrder">
- <property name="groups" value="be,org"/>
- <property name="severity" value="info"/>
- </module>
- <!--<module name="ImportControl"/>-->
-
- <!-- size violations, see http://checkstyle.sourceforge.net/config_sizes.html -->
-
- <module name="LineLength">
- <property name="severity" value="info"/>
- <property name="max" value="120"/>
- </module>
- <!--
- <module name="FileLength">
- <property name="severity" value="info"/>
- </module>
- <module name="MethodLength">
- <property name="severity" value="info"/>
- </module>
- -->
- <module name="ParameterNumber">
- <property name="severity" value="info"/>
- </module>
-
- <!-- whitespace, see http://checkstyle.sourceforge.net/config_whitespace.html -->
-
- <module name="EmptyForInitializerPad">
- <property name="option" value="space"/>
- </module>
- <module name="EmptyForIteratorPad">
- <property name="option" value="space"/>
- </module>
- <module name="MethodParamPad"/>
- <module name="NoWhitespaceAfter">
- <property name="severity" value="info"/>
- <!-- Default tokens and additional GENERIC_START -->
- <property name="tokens" value="BNOT, DEC, DOT, INC, LNOT, UNARY_MINUS, UNARY_PLUS, GENERIC_START"/>
- </module>
- <module name="NoWhitespaceBefore">
- <property name="severity" value="info"/>
- <!-- Default tokens and additional GENERIC_START and GENERIC_END -->
- <property name="tokens" value="POST_DEC, POST_INC, GENERIC_START, GENERIC_END"/>
- </module>
- <!--<module name="OperatorWrap"/>-->
- <module name="ParenPad">
- <property name="option" value="space"/>
- </module>
- <module name="TypecastParenPad"/>
- <module name="TabCharacter"/>
- <module name="WhitespaceAfter">
- <property name="severity" value="info"/>
- <!-- Default tokens and additional GENERIC_END -->
- <property name="tokens" value="COMMA, SEMI, TYPECAST, GENERIC_END"/>
- </module>
- <module name="WhitespaceAround">
- <property name="severity" value="info"/>
- <!-- Default tokens without GENERIC_START and GENERIC_END -->
- <property name="tokens"
- value="ASSIGN, BAND, BAND_ASSIGN, BOR, BOR_ASSIGN, BSR, BSR_ASSIGN, BXOR, BXOR_ASSIGN, COLON, DIV, DIV_ASSIGN, EQUAL, GE, GT, LAND, LCURLY, LE, LITERAL_ASSERT, LITERAL_CATCH, LITERAL_DO, LITERAL_ELSE, LITERAL_FINALLY, LITERAL_FOR, LITERAL_IF, LITERAL_RETURN, LITERAL_SYNCHRONIZED, LITERAL_TRY, LITERAL_WHILE, LOR, LT, MINUS, MINUS_ASSIGN, MOD, MOD_ASSIGN, NOT_EQUAL, PLUS, PLUS_ASSIGN, QUESTION, RCURLY, SL, SLIST, SL_ASSIGN, SR, SR_ASSIGN, STAR, STAR_ASSIGN, TYPE_EXTENSION_AND, WILDCARD_TYPE"/>
- <property name="allowEmptyConstructors" value="true"/>
- <property name="allowEmptyMethods" value="true"/>
- </module>
- <module name="TabCharacter">
- <property name="severity" value="info"/>
- </module>
-
- <!-- modifiers, see http://checkstyle.sourceforge.net/config_modifier.html -->
-
- <!--<module name="ModifierOrder"/>-->
- <module name="RedundantModifier">
- <property name="severity" value="info"/>
- </module>
-
- <!-- coding , see http://checkstyle.sourceforge.net/config_coding.html -->
-
- <module name="ArrayTrailingComma">
- <property name="severity" value="info"/>
- </module>
- <!--<module name="AvoidInlineConditionals"/>-->
- <module name="CovariantEquals"/>
- <module name="DoubleCheckedLocking"/>
- <module name="EmptyStatement">
- <property name="severity" value="info"/>
- </module>
- <module name="EqualsHashCode"/>
- <!--<module name="FinalLocalVariable"/>-->
- <module name="HiddenField">
- <property name="severity" value="info"/>
- <property name="ignoreConstructorParameter" value="true"/>
- <property name="ignoreSetter" value="true"/>
- </module>
- <module name="IllegalInstantiation">
- <property name="classes" value="java.lang.Boolean"/>
- </module>
- <module name="IllegalToken">
- <property name="tokens" value="LITERAL_NATIVE"/>
- </module>
- <module name="IllegalTokenText"/>
- <module name="InnerAssignment">
- <property name="severity" value="warning"/>
- </module>
- <!--<module name="MagicNumber"/>-->
- <module name="MissingSwitchDefault">
- <property name="severity" value="info"/>
- </module>
- <module name="ModifiedControlVariable"/>
- <!--<module name="RedundantThrows"/>-->
- <module name="SimplifyBooleanExpression"/>
- <module name="SimplifyBooleanReturn"/>
- <module name="StringLiteralEquality"/>
- <!--<module name="NestedIfDepth"/>-->
- <!--<module name="NestedTryDepth"/>-->
- <!--<module name="SuperClone"/>-->
- <module name="SuperFinalize"/>
- <!--<module name="IllegalCatch"/>-->
- <!--<module name="IllegalThrows"/>-->
- <module name="PackageDeclaration"/>
- <module name="JUnitTestCase"/>
- <!--<module name="ReturnCount"/>-->
- <!--<module name="IllegalType"/>-->
- <!--<module name="DeclarationOrder"/>-->
- <module name="ParameterAssignment">
- <property name="severity" value="info"/>
- </module>
- <module name="ExplicitInitialization">
- <property name="severity" value="info"/>
- </module>
- <module name="DefaultComesLast"/>
- <!--<module name="MissingCtor"/>-->
- <module name="FallThrough"/>
- <!--<module name="MultipleStringLiterals"/>-->
- <!--<module name="MultipleVariableDeclarations"/>-->
- <!--<module name="RequireThis"/>-->
- <!--<module name="UnnecessaryParentheses"/>-->
-
- <!-- class design, see http://checkstyle.sourceforge.net/config_design.html -->
-
- <module name="VisibilityModifier">
- <property name="severity" value="info"/>
- <property name="protectedAllowed" value="true"/>
- </module>
- <module name="FinalClass"/>
- <!--<module name="InterfaceIsType"/>-->
- <module name="HideUtilityClassConstructor"/>
- <!--<module name="DesignForExtension"/>-->
- <!--<module name="MutableException"/>-->
- <!--<module name="ThrowsCount"/>-->
-
- <!-- misc, see http://checkstyle.sourceforge.net/config_misc.html -->
-
- <module name="GenericIllegalRegexp">
- <property name="severity" value="info"/>
- <property name="format" value="\s+$"/>
- <property name="message" value="Line has trailing spaces."/>
- </module>
- <!--<module name="TodoComment"/>-->
- <!--<module name="UncommentedMain"/>-->
- <module name="UpperEll"/>
- <module name="ArrayTypeStyle"/>
- <!--<module name="FinalParameters"/>-->
- <!--<module name="DescendantToken"/>-->
- <!--<module name="Indentation"/>-->
- <!--<module name="TrailingComment"/>-->
- <!--<module name="RequiredRegexp"/>-->
- <!--<module name="Regexp"/>-->
-
- </module>
-
-</module>
Copied: trunk/equanda-checkstyle/src/main/resources/config/equanda-checkstyle.xml (from rev 945, trunk/config/checkstyle.xml)
===================================================================
--- trunk/equanda-checkstyle/src/main/resources/config/equanda-checkstyle.xml (rev 0)
+++ trunk/equanda-checkstyle/src/main/resources/config/equanda-checkstyle.xml 2008-12-30 17:35:45 UTC (rev 947)
@@ -0,0 +1,266 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE module PUBLIC
+ "-//Puppy Crawl//DTD Check Configuration 1.1//EN"
+ "http://www.puppycrawl.com/dtds/configuration_1_1.dtd">
+
+<!--
+ Checkstyle is very configurable. Be sure to read the documentation at
+ http://checkstyle.sf.net (or in your downloaded distribution).
+-->
+
+<module name="Checker">
+
+ <!-- Checks that a package.html file exists for each package. -->
+ <!-- See http://checkstyle.sf.net/config_javadoc.html#PackageHtml -->
+ <!--<module name="PackageHtml"/>-->
+
+ <!-- Checks whether files end with a new line. -->
+ <!-- See http://checkstyle.sf.net/config_misc.html#NewlineAtEndOfFile -->
+ <module name="NewlineAtEndOfFile">
+ <property name="severity" value="info"/>
+ </module>
+
+ <!-- Checks that property files contain the same keys. -->
+ <!-- See http://checkstyle.sf.net/config_misc.html#Translation -->
+ <!--<module name="Translation"/>-->
+
+ <!-- duplicate code, see http://checkstyle.sourceforge.net/config_duplicates.html -->
+ <!--<module name="StrictDuplicateCode"/>-->
+
+ <module name="TreeWalker">
+
+ <property name="cacheFile" value="${checkstyle.cache.file}"/>
+ <property name="tabWidth" value="4"/>
+ <property name="charset" value="UTF-8"/>
+
+ <!-- Block checks, see http://checkstyle.sourceforge.net/config_blocks.html -->
+
+ <!-- disabled because we allow all on one line if it fits
+ <module name="LeftCurly">
+ <property name="severity" value="info"/>
+ <property name="option" value="nl"/>
+ </module>
+ <module name="RightCurly">
+ <property name="severity" value="info"/>
+ <property name="option" value="alone"/>
+ </module>
+ -->
+ <!--<module name="EmptyBlock"/>-->
+ <module name="AvoidNestedBlocks"/>
+ <!--<module name="NeedBraces"/> no braces is allowed when on same line -->
+
+ <!-- Javadoc comments checks, see http://checkstyle.sourceforge.net/config_javadoc.html -->
+
+ <module name="JavadocMethod">
+ <property name="excludeScope" value="private"/>
+ </module>
+ <!--<module name="JavadocType"/>-->
+ <!--<module name="JavadocVariable"/>-->
+ <!--<module name="JavadocStyle"/>-->
+
+ <!-- Naming conventions, see http://checkstyle.sourceforge.net/config_naming.html -->
+
+ <!--<module name="AbstractClassName"/>-->
+ <!--<module name="LocalFinalVariableName"/>-->
+ <module name="ConstantName">
+ <property name="format" value="^(([A-Z][A-Z0-9]*(_[A-Z0-9]+)*)|log)$"/>
+ </module>
+ <module name="LocalFinalVariableName"/>
+ <module name="LocalVariableName"/>
+ <module name="MemberName"/>
+ <module name="MethodName"/>
+ <module name="PackageName"/>
+ <module name="ParameterName"/>
+ <module name="StaticVariableName">
+ <property name="format" value="^([A-Z][A-Z0-9]*(_[A-Z0-9]+)*)$"/>
+ </module>
+ <module name="TypeName"/>
+
+ <!-- header, see http://checkstyle.sourceforge.net/config_header.html -->
+
+ <module name="Header">
+ <!-- The follow property value demonstrates the ability -->
+ <!-- to have access to ANT properties. In this case it uses -->
+ <!-- the ${basedir} property to allow Checkstyle to be run -->
+ <!-- from any directory within a project. -->
+ <!--<property name="headerFile" value="config/equanda-header.txt"/>-->
+ <property name="header" value="/**\n * This file is part of the equanda project.\n *\n * The contents of this file are subject to the Mozilla Public License Version 1.1 (the "License");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at http://www.mozilla.org/MPL/\n *\n * Software distributed under the License is distributed on an "AS IS" basis, WITHOUT WARRANTY OF\n * ANY KIND, either express or implied. See the License for the specific language governing rights and\n * limitations under the License.\n *\n * Alternatively, the contents of this file may be used under the terms of\n * either the GNU General Public License Version 2 or later (the "GPL"), or\n * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),\n * in which case the provisions of the GPL or the LGPL are applicable instead\n * of those above. If you wish to allow use of your version of this file only\n * under the terms of either the GPL or the LGPL, and not to allow others to\n * use your version of this file under the terms of the MPL, indicate your\n * decision by deleting the provisions above and replace them with the notice\n * and other provisions required by the GPL or the LGPL. If you do not delete\n * the provisions above, a recipient may use your version of this file under\n * the terms of any one of the MPL, the GPL or the LGPL.\n */"/>
+ </module>
+
+ <!-- imports, see http://checkstyle.sourceforge.net/config_imports.html -->
+
+ <!--<module name="AvoidStarImport"/>-->
+ <module name="IllegalImport"/>
+ <module name="RedundantImport"/>
+ <module name="UnusedImports">
+ <property name="severity" value="info"/>
+ </module>
+ <module name="ImportOrder">
+ <property name="groups" value="be,org"/>
+ <property name="severity" value="info"/>
+ </module>
+ <!--<module name="ImportControl"/>-->
+
+ <!-- size violations, see http://checkstyle.sourceforge.net/config_sizes.html -->
+
+ <module name="LineLength">
+ <property name="severity" value="info"/>
+ <property name="max" value="120"/>
+ </module>
+ <!--
+ <module name="FileLength">
+ <property name="severity" value="info"/>
+ </module>
+ <module name="MethodLength">
+ <property name="severity" value="info"/>
+ </module>
+ -->
+ <module name="ParameterNumber">
+ <property name="severity" value="info"/>
+ </module>
+
+ <!-- whitespace, see http://checkstyle.sourceforge.net/config_whitespace.html -->
+
+ <module name="EmptyForInitializerPad">
+ <property name="option" value="space"/>
+ </module>
+ <module name="EmptyForIteratorPad">
+ <property name="option" value="space"/>
+ </module>
+ <module name="MethodParamPad"/>
+ <module name="NoWhitespaceAfter">
+ <property name="severity" value="info"/>
+ <!-- Default tokens and additional GENERIC_START -->
+ <property name="tokens" value="BNOT, DEC, DOT, INC, LNOT, UNARY_MINUS, UNARY_PLUS, GENERIC_START"/>
+ </module>
+ <module name="NoWhitespaceBefore">
+ <property name="severity" value="info"/>
+ <!-- Default tokens and additional GENERIC_START and GENERIC_END -->
+ <property name="tokens" value="POST_DEC, POST_INC, GENERIC_START, GENERIC_END"/>
+ </module>
+ <!--<module name="OperatorWrap"/>-->
+ <module name="ParenPad">
+ <property name="option" value="space"/>
+ </module>
+ <module name="TypecastParenPad"/>
+ <module name="TabCharacter"/>
+ <module name="WhitespaceAfter">
+ <property name="severity" value="info"/>
+ <!-- Default tokens and additional GENERIC_END -->
+ <property name="tokens" value="COMMA, SEMI, TYPECAST, GENERIC_END"/>
+ </module>
+ <module name="WhitespaceAround">
+ <property name="severity" value="info"/>
+ <!-- Default tokens without GENERIC_START and GENERIC_END -->
+ <property name="tokens"
+ value="ASSIGN, BAND, BAND_ASSIGN, BOR, BOR_ASSIGN, BSR, BSR_ASSIGN, BXOR, BXOR_ASSIGN, COLON, DIV, DIV_ASSIGN, EQUAL, GE, GT, LAND, LCURLY, LE, LITERAL_ASSERT, LITERAL_CATCH, LITERAL_DO, LITERAL_ELSE, LITERAL_FINALLY, LITERAL_FOR, LITERAL_IF, LITERAL_RETURN, LITERAL_SYNCHRONIZED, LITERAL_TRY, LITERAL_WHILE, LOR, LT, MINUS, MINUS_ASSIGN, MOD, MOD_ASSIGN, NOT_EQUAL, PLUS, PLUS_ASSIGN, QUESTION, RCURLY, SL, SLIST, SL_ASSIGN, SR, SR_ASSIGN, STAR, STAR_ASSIGN, TYPE_EXTENSION_AND, WILDCARD_TYPE"/>
+ <property name="allowEmptyConstructors" value="true"/>
+ <property name="allowEmptyMethods" value="true"/>
+ </module>
+ <module name="TabCharacter">
+ <property name="severity" value="info"/>
+ </module>
+
+ <!-- modifiers, see http://checkstyle.sourceforge.net/config_modifier.html -->
+
+ <!--<module name="ModifierOrder"/>-->
+ <module name="RedundantModifier">
+ <property name="severity" value="info"/>
+ </module>
+
+ <!-- coding , see http://checkstyle.sourceforge.net/config_coding.html -->
+
+ <module name="ArrayTrailingComma">
+ <property name="severity" value="info"/>
+ </module>
+ <!--<module name="AvoidInlineConditionals"/>-->
+ <module name="CovariantEquals"/>
+ <module name="DoubleCheckedLocking"/>
+ <module name="EmptyStatement">
+ <property name="severity" value="info"/>
+ </module>
+ <module name="EqualsHashCode"/>
+ <!--<module name="FinalLocalVariable"/>-->
+ <module name="HiddenField">
+ <property name="severity" value="info"/>
+ <property name="ignoreConstructorParameter" value="true"/>
+ <property name="ignoreSetter" value="true"/>
+ </module>
+ <module name="IllegalInstantiation">
+ <property name="classes" value="java.lang.Boolean"/>
+ </module>
+ <module name="IllegalToken">
+ <property name="tokens" value="LITERAL_NATIVE"/>
+ </module>
+ <module name="IllegalTokenText"/>
+ <module name="InnerAssignment">
+ <property name="severity" value="warning"/>
+ </module>
+ <!--<module name="MagicNumber"/>-->
+ <module name="MissingSwitchDefault">
+ <property name="severity" value="info"/>
+ </module>
+ <module name="ModifiedControlVariable"/>
+ <!--<module name="RedundantThrows"/>-->
+ <module name="SimplifyBooleanExpression"/>
+ <module name="SimplifyBooleanReturn"/>
+ <module name="StringLiteralEquality"/>
+ <!--<module name="NestedIfDepth"/>-->
+ <!--<module name="NestedTryDepth"/>-->
+ <!--<module name="SuperClone"/>-->
+ <module name="SuperFinalize"/>
+ <!--<module name="IllegalCatch"/>-->
+ <!--<module name="IllegalThrows"/>-->
+ <module name="PackageDeclaration"/>
+ <module name="JUnitTestCase"/>
+ <!--<module name="ReturnCount"/>-->
+ <!--<module name="IllegalType"/>-->
+ <!--<module name="DeclarationOrder"/>-->
+ <module name="ParameterAssignment">
+ <property name="severity" value="info"/>
+ </module>
+ <module name="ExplicitInitialization">
+ <property name="severity" value="info"/>
+ </module>
+ <module name="DefaultComesLast"/>
+ <!--<module name="MissingCtor"/>-->
+ <module name="FallThrough"/>
+ <!--<module name="MultipleStringLiterals"/>-->
+ <!--<module name="MultipleVariableDeclarations"/>-->
+ <!--<module name="RequireThis"/>-->
+ <!--<module name="UnnecessaryParentheses"/>-->
+
+ <!-- class design, see http://checkstyle.sourceforge.net/config_design.html -->
+
+ <module name="VisibilityModifier">
+ <property name="severity" value="info"/>
+ <property name="protectedAllowed" value="true"/>
+ </module>
+ <module name="FinalClass"/>
+ <!--<module name="InterfaceIsType"/>-->
+ <module name="HideUtilityClassConstructor"/>
+ <!--<module name="DesignForExtension"/>-->
+ <!--<module name="MutableException"/>-->
+ <!--<module name="ThrowsCount"/>-->
+
+ <!-- misc, see http://checkstyle.sourceforge.net/config_misc.html -->
+
+ <module name="GenericIllegalRegexp">
+ <property name="severity" value="info"/>
+ <property name="format" value="\s+$"/>
+ <property name="message" value="Line has trailing spaces."/>
+ </module>
+ <!--<module name="TodoComment"/>-->
+ <!--<module name="UncommentedMain"/>-->
+ <module name="UpperEll"/>
+ <module name="ArrayTypeStyle"/>
+ <!--<module name="FinalParameters"/>-->
+ <!--<module name="DescendantToken"/>-->
+ <!--<module name="Indentation"/>-->
+ <!--<module name="TrailingComment"/>-->
+ <!--<module name="RequiredRegexp"/>-->
+ <!--<module name="Regexp"/>-->
+
+ </module>
+
+</module>
Modified: trunk/pom.xml
===================================================================
--- trunk/pom.xml 2008-12-30 12:26:32 UTC (rev 946)
+++ trunk/pom.xml 2008-12-30 17:35:45 UTC (rev 947)
@@ -119,6 +119,11 @@
<artifactId>wagon-webdav</artifactId>
<version>1.0-beta-2</version>
</extension>
+ <extension>
+ <groupId>org.equanda</groupId>
+ <artifactId>equanda-checkstyle</artifactId>
+ <version>1.0.0</version>
+ </extension>
</extensions>
<plugins>
<plugin>
@@ -146,7 +151,7 @@
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-checkstyle-plugin</artifactId>
<configuration>
- <configLocation>config/checkstyle.xml</configLocation>
+ <configLocation>config/equanda-checkstyle.xml</configLocation>
</configuration>
<executions>
<execution>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <tri...@us...> - 2008-12-30 12:26:40
|
Revision: 946
http://equanda.svn.sourceforge.net/equanda/?rev=946&view=rev
Author: triathlon98
Date: 2008-12-30 12:26:32 +0000 (Tue, 30 Dec 2008)
Log Message:
-----------
remove warnings from templates, some translations (EQ-126)
Modified Paths:
--------------
trunk/equanda-client/src/main/resources/org/equanda/translations/translations-common.txt
trunk/equanda-generate/src/main/velocity/t5gui/components/InlinePrimitiveList.tml.vm
trunk/equanda-generate/src/main/velocity/t5gui/components/LinkList.tml.vm
trunk/equanda-generate/src/main/velocity/t5gui/edit-tml/boolean.tml.vm
trunk/equanda-generate/src/main/velocity/t5gui/edit-tml/choice.tml.vm
trunk/equanda-generate/src/main/velocity/t5gui/edit-tml/date.tml.vm
trunk/equanda-generate/src/main/velocity/t5gui/edit-tml/double.tml.vm
trunk/equanda-generate/src/main/velocity/t5gui/edit-tml/inlinelinklist.tml.vm
trunk/equanda-generate/src/main/velocity/t5gui/edit-tml/inlinelinkone.tml.vm
trunk/equanda-generate/src/main/velocity/t5gui/edit-tml/int.tml.vm
trunk/equanda-generate/src/main/velocity/t5gui/edit-tml/linklist.tml.vm
trunk/equanda-generate/src/main/velocity/t5gui/edit-tml/linkone.tml.vm
trunk/equanda-generate/src/main/velocity/t5gui/edit-tml/page.tml.vm
trunk/equanda-generate/src/main/velocity/t5gui/edit-tml/password.tml.vm
trunk/equanda-generate/src/main/velocity/t5gui/edit-tml/string.tml.vm
trunk/equanda-generate/src/main/velocity/t5gui/edit-tml/text.tml.vm
trunk/equanda-generate/src/main/velocity/t5gui/edit-tml/timestamp.tml.vm
trunk/equanda-generate/src/main/velocity/t5gui/list-tml/boolean.tml.vm
trunk/equanda-generate/src/main/velocity/t5gui/list-tml/choice.tml.vm
trunk/equanda-generate/src/main/velocity/t5gui/list-tml/date.tml.vm
trunk/equanda-generate/src/main/velocity/t5gui/list-tml/linklist.tml.vm
trunk/equanda-generate/src/main/velocity/t5gui/list-tml/linkone.tml.vm
trunk/equanda-generate/src/main/velocity/t5gui/list-tml/password.tml.vm
trunk/equanda-generate/src/main/velocity/t5gui/list-tml/text.tml.vm
trunk/equanda-generate/src/main/velocity/t5gui/list-tml/timestamp.tml.vm
trunk/equanda-generate/src/main/velocity/t5gui/list-tml/tostring.tml.vm
trunk/equanda-generate/src/main/velocity/t5gui/list-tml/type.tml.vm
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/SelectAuthConfig.tml.vm
trunk/equanda-generate/src/main/velocity/t5gui/summary-tml/linklist.tml.vm
trunk/equanda-generate/src/main/velocity/t5gui/summary-tml/linkone.tml.vm
trunk/equanda-generate/src/main/velocity/t5gui/view-tml/boolean.tml.vm
trunk/equanda-generate/src/main/velocity/t5gui/view-tml/choice.tml.vm
trunk/equanda-generate/src/main/velocity/t5gui/view-tml/date.tml.vm
trunk/equanda-generate/src/main/velocity/t5gui/view-tml/linklist.tml.vm
trunk/equanda-generate/src/main/velocity/t5gui/view-tml/linkone.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
trunk/equanda-generate/src/main/velocity/t5gui/view-tml/text.tml.vm
trunk/equanda-generate/src/main/velocity/t5gui/view-tml/timestamp.tml.vm
trunk/equanda-generate/src/main/velocity/t5gui/view-tml/tostring.tml.vm
trunk/equanda-generate/src/main/velocity/t5gui/view-tml/type.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-12-30 11:18:02 UTC (rev 945)
+++ trunk/equanda-client/src/main/resources/org/equanda/translations/translations-common.txt 2008-12-30 12:26:32 UTC (rev 946)
@@ -515,6 +515,10 @@
.label.en Configure
.key authAndConfig.label.Enable/equanda-fixed
.label.en Enable
+.key authAndConfig.select.Role/equanda-fixed
+.label.en Choose the role you wish to edit, or leave blank to edit the current user.
+.key authAndConfig.select.Prohibited/equanda-fixed
+.label.en This user is prohibited from accessing this page.
.key button.Save/equanda-fixed
.label.en Save
.label.nl Opslaan
Modified: trunk/equanda-generate/src/main/velocity/t5gui/components/InlinePrimitiveList.tml.vm
===================================================================
--- trunk/equanda-generate/src/main/velocity/t5gui/components/InlinePrimitiveList.tml.vm 2008-12-30 11:18:02 UTC (rev 945)
+++ trunk/equanda-generate/src/main/velocity/t5gui/components/InlinePrimitiveList.tml.vm 2008-12-30 12:26:32 UTC (rev 946)
@@ -13,7 +13,7 @@
</t:parameter>
<div class="eqInlPRL">
<a href="javascript:;" id="ed-${dollar}{clientId}-${dollar}{index}" onclick="eqMarkDel( this, '${dollar}{deletedHiddenId}', ${dollar}{index}, 'er-${dollar}{clientId}-${dollar}{index}', 'ea-${dollar}{clientId}-${dollar}{index}' )" title="Delete"><img src="${dollar}{asset:classpath:org/equanda/t5gui/delete.png}" alt="${dollar}{equanda-message:Delete}" /></a>
- <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>
+ <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;"><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">
Modified: trunk/equanda-generate/src/main/velocity/t5gui/components/LinkList.tml.vm
===================================================================
--- trunk/equanda-generate/src/main/velocity/t5gui/components/LinkList.tml.vm 2008-12-30 11:18:02 UTC (rev 945)
+++ trunk/equanda-generate/src/main/velocity/t5gui/components/LinkList.tml.vm 2008-12-30 12:26:32 UTC (rev 946)
@@ -1,3 +1,8 @@
+#* @vtlmacrolibrary path="../render.vm" *#
+#* @vtlvariable name="dollar" type="java.lang.String" *#
+#* @vtlvariable name="readOnlyContext" type="boolean" *#
+#* @vtlvariable name="table" type="org.equanda.domain.xml.transform.RootTable" *#
+#* @vtlvariable name="field" type="org.equanda.domain.xml.Field" *#
<div class="eqLL" xmlns:t="http://tapestry.apache.org/schema/tapestry_5_0_0.xsd">
<div class="eqLLR" t:type="equanda/JSPagedLoop" source="value" value="current" index="index" rowsPerPage="5" volatile="true">
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-12-30 11:18:02 UTC (rev 945)
+++ trunk/equanda-generate/src/main/velocity/t5gui/edit-tml/boolean.tml.vm 2008-12-30 12:26:32 UTC (rev 946)
@@ -1,5 +1,7 @@
-#if( $field.isMultiple() )
-##<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
+#* @vtlmacrolibrary path="../render.vm" *#
+#* @vtlvariable name="dollar" type="java.lang.String" *#
+#* @vtlvariable name="readOnlyContext" type="boolean" *#
+#* @vtlvariable name="table" type="org.equanda.domain.xml.transform.RootTable" *#
+#* @vtlvariable name="field" type="org.equanda.domain.xml.Field" *#
+## multiple makes no sense
<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/choice.tml.vm
===================================================================
--- trunk/equanda-generate/src/main/velocity/t5gui/edit-tml/choice.tml.vm 2008-12-30 11:18:02 UTC (rev 945)
+++ trunk/equanda-generate/src/main/velocity/t5gui/edit-tml/choice.tml.vm 2008-12-30 12:26:32 UTC (rev 946)
@@ -1,8 +1,13 @@
+#* @vtlmacrolibrary path="../render.vm" *#
+#* @vtlvariable name="dollar" type="java.lang.String" *#
+#* @vtlvariable name="readOnlyContext" type="boolean" *#
+#* @vtlvariable name="table" type="org.equanda.domain.xml.transform.RootTable" *#
+#* @vtlvariable name="field" type="org.equanda.domain.xml.Field" *#
#if( $field.isMultiple() )
#if( $field.isString() )
-<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/> <!-- @todo temp hack -->
+<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/> ## @todo temp hack
#else
-@todo
+@todo ## @todo
#end
#else
<select t:type="Select" t:model="${field.Name}ChoiceModel" t:value="value.${field.Name}" #if( $field.isRequired() )t:validate="required"#else t:blankOption="ALWAYS"#end/>
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-12-30 11:18:02 UTC (rev 945)
+++ trunk/equanda-generate/src/main/velocity/t5gui/edit-tml/date.tml.vm 2008-12-30 12:26:32 UTC (rev 946)
@@ -1,3 +1,8 @@
+#* @vtlmacrolibrary path="../render.vm" *#
+#* @vtlvariable name="dollar" type="java.lang.String" *#
+#* @vtlvariable name="readOnlyContext" type="boolean" *#
+#* @vtlvariable name="table" type="org.equanda.domain.xml.transform.RootTable" *#
+#* @vtlvariable name="field" type="org.equanda.domain.xml.Field" *#
#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
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-12-30 11:18:02 UTC (rev 945)
+++ trunk/equanda-generate/src/main/velocity/t5gui/edit-tml/double.tml.vm 2008-12-30 12:26:32 UTC (rev 946)
@@ -1 +1,6 @@
+#* @vtlmacrolibrary path="../render.vm" *#
+#* @vtlvariable name="dollar" type="java.lang.String" *#
+#* @vtlvariable name="readOnlyContext" type="boolean" *#
+#* @vtlvariable name="table" type="org.equanda.domain.xml.transform.RootTable" *#
+#* @vtlvariable name="field" type="org.equanda.domain.xml.Field" *#
<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/inlinelinklist.tml.vm
===================================================================
--- trunk/equanda-generate/src/main/velocity/t5gui/edit-tml/inlinelinklist.tml.vm 2008-12-30 11:18:02 UTC (rev 945)
+++ trunk/equanda-generate/src/main/velocity/t5gui/edit-tml/inlinelinklist.tml.vm 2008-12-30 12:26:32 UTC (rev 946)
@@ -1 +1,6 @@
+#* @vtlmacrolibrary path="../render.vm" *#
+#* @vtlvariable name="dollar" type="java.lang.String" *#
+#* @vtlvariable name="readOnlyContext" type="boolean" *#
+#* @vtlvariable name="table" type="org.equanda.domain.xml.transform.RootTable" *#
+#* @vtlvariable name="field" type="org.equanda.domain.xml.Field" *#
<input t:type="${field.LinkTable.VarName}/InlineLinkList" t:value="value.${field.VarName}" embedded="${field.isEmbedded()}" editIndex="editIndex" selectComponentId="${table.Name}.${field.Name}"/>
Modified: trunk/equanda-generate/src/main/velocity/t5gui/edit-tml/inlinelinkone.tml.vm
===================================================================
--- trunk/equanda-generate/src/main/velocity/t5gui/edit-tml/inlinelinkone.tml.vm 2008-12-30 11:18:02 UTC (rev 945)
+++ trunk/equanda-generate/src/main/velocity/t5gui/edit-tml/inlinelinkone.tml.vm 2008-12-30 12:26:32 UTC (rev 946)
@@ -1 +1,6 @@
+#* @vtlmacrolibrary path="../render.vm" *#
+#* @vtlvariable name="dollar" type="java.lang.String" *#
+#* @vtlvariable name="readOnlyContext" type="boolean" *#
+#* @vtlvariable name="table" type="org.equanda.domain.xml.transform.RootTable" *#
+#* @vtlvariable name="field" type="org.equanda.domain.xml.Field" *#
<input t:type="${field.LinkTable.VarName}/InlineLinkOne" t:value="value.${field.VarName}" t:setter="${field.Name}Setter" editIndex="editIndex" selectComponentId="${table.Name}.${field.Name}"/>
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-12-30 11:18:02 UTC (rev 945)
+++ trunk/equanda-generate/src/main/velocity/t5gui/edit-tml/int.tml.vm 2008-12-30 12:26:32 UTC (rev 946)
@@ -1 +1,6 @@
+#* @vtlmacrolibrary path="../render.vm" *#
+#* @vtlvariable name="dollar" type="java.lang.String" *#
+#* @vtlvariable name="readOnlyContext" type="boolean" *#
+#* @vtlvariable name="table" type="org.equanda.domain.xml.transform.RootTable" *#
+#* @vtlvariable name="field" type="org.equanda.domain.xml.Field" *#
<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/linklist.tml.vm
===================================================================
--- trunk/equanda-generate/src/main/velocity/t5gui/edit-tml/linklist.tml.vm 2008-12-30 11:18:02 UTC (rev 945)
+++ trunk/equanda-generate/src/main/velocity/t5gui/edit-tml/linklist.tml.vm 2008-12-30 12:26:32 UTC (rev 946)
@@ -1 +1,6 @@
+#* @vtlmacrolibrary path="../render.vm" *#
+#* @vtlvariable name="dollar" type="java.lang.String" *#
+#* @vtlvariable name="readOnlyContext" type="boolean" *#
+#* @vtlvariable name="table" type="org.equanda.domain.xml.transform.RootTable" *#
+#* @vtlvariable name="field" type="org.equanda.domain.xml.Field" *#
<input t:type="${field.LinkTable.VarName}/LinkList" t:value="value.${field.VarName}" editIndex="editIndex" selectComponentId="${table.Name}.${field.Name}" #if( $field.hasLinkTypeCompare() )filter="${field.Name}Filter"#end />
Modified: trunk/equanda-generate/src/main/velocity/t5gui/edit-tml/linkone.tml.vm
===================================================================
--- trunk/equanda-generate/src/main/velocity/t5gui/edit-tml/linkone.tml.vm 2008-12-30 11:18:02 UTC (rev 945)
+++ trunk/equanda-generate/src/main/velocity/t5gui/edit-tml/linkone.tml.vm 2008-12-30 12:26:32 UTC (rev 946)
@@ -1 +1,6 @@
+#* @vtlmacrolibrary path="../render.vm" *#
+#* @vtlvariable name="dollar" type="java.lang.String" *#
+#* @vtlvariable name="readOnlyContext" type="boolean" *#
+#* @vtlvariable name="table" type="org.equanda.domain.xml.transform.RootTable" *#
+#* @vtlvariable name="field" type="org.equanda.domain.xml.Field" *#
<input t:type="${field.LinkTable.VarName}/LinkOne" t:value="value.${field.VarName}" t:setter="${field.Name}Setter" editIndex="editIndex" selectComponentId="${table.Name}.${field.Name}" #if( $field.hasLinkTypeCompare() )filter="${field.Name}Filter"#end />
Modified: trunk/equanda-generate/src/main/velocity/t5gui/edit-tml/page.tml.vm
===================================================================
--- trunk/equanda-generate/src/main/velocity/t5gui/edit-tml/page.tml.vm 2008-12-30 11:18:02 UTC (rev 945)
+++ trunk/equanda-generate/src/main/velocity/t5gui/edit-tml/page.tml.vm 2008-12-30 12:26:32 UTC (rev 946)
@@ -1,3 +1,10 @@
+#* @vtlmacrolibrary path="../render.vm" *#
+#* @vtlvariable name="dollar" type="java.lang.String" *#
+#* @vtlvariable name="pageindex" type="java.lang.Integer" *#
+#* @vtlvariable name="readOnlyContext" type="boolean" *#
+#* @vtlvariable name="table" type="org.equanda.domain.xml.transform.RootTable" *#
+#* @vtlvariable name="field" type="org.equanda.domain.xml.Field" *#
+#* @vtlvariable name="page" type="org.equanda.domain.xml.Page" *#
#if( !$page.isHidden() )
#if( "ALL" == "$!page.Name" )
<t:parameter name="contentAll">
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-12-30 11:18:02 UTC (rev 945)
+++ trunk/equanda-generate/src/main/velocity/t5gui/edit-tml/password.tml.vm 2008-12-30 12:26:32 UTC (rev 946)
@@ -1,3 +1,8 @@
+#* @vtlmacrolibrary path="../render.vm" *#
+#* @vtlvariable name="dollar" type="java.lang.String" *#
+#* @vtlvariable name="readOnlyContext" type="boolean" *#
+#* @vtlvariable name="table" type="org.equanda.domain.xml.transform.RootTable" *#
+#* @vtlvariable name="field" type="org.equanda.domain.xml.Field" *#
#if( $field.isMultiple() )
<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
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-12-30 11:18:02 UTC (rev 945)
+++ trunk/equanda-generate/src/main/velocity/t5gui/edit-tml/string.tml.vm 2008-12-30 12:26:32 UTC (rev 946)
@@ -1,3 +1,8 @@
+#* @vtlmacrolibrary path="../render.vm" *#
+#* @vtlvariable name="dollar" type="java.lang.String" *#
+#* @vtlvariable name="readOnlyContext" type="boolean" *#
+#* @vtlvariable name="table" type="org.equanda.domain.xml.transform.RootTable" *#
+#* @vtlvariable name="field" type="org.equanda.domain.xml.Field" *#
#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
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-12-30 11:18:02 UTC (rev 945)
+++ trunk/equanda-generate/src/main/velocity/t5gui/edit-tml/text.tml.vm 2008-12-30 12:26:32 UTC (rev 946)
@@ -1,3 +1,8 @@
+#* @vtlmacrolibrary path="../render.vm" *#
+#* @vtlvariable name="dollar" type="java.lang.String" *#
+#* @vtlvariable name="readOnlyContext" type="boolean" *#
+#* @vtlvariable name="table" type="org.equanda.domain.xml.transform.RootTable" *#
+#* @vtlvariable name="field" type="org.equanda.domain.xml.Field" *#
#if( $field.isMultiple() )
##<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
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-12-30 11:18:02 UTC (rev 945)
+++ trunk/equanda-generate/src/main/velocity/t5gui/edit-tml/timestamp.tml.vm 2008-12-30 12:26:32 UTC (rev 946)
@@ -1,3 +1,8 @@
+#* @vtlmacrolibrary path="../render.vm" *#
+#* @vtlvariable name="dollar" type="java.lang.String" *#
+#* @vtlvariable name="readOnlyContext" type="boolean" *#
+#* @vtlvariable name="table" type="org.equanda.domain.xml.transform.RootTable" *#
+#* @vtlvariable name="field" type="org.equanda.domain.xml.Field" *#
#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
Modified: trunk/equanda-generate/src/main/velocity/t5gui/list-tml/boolean.tml.vm
===================================================================
--- trunk/equanda-generate/src/main/velocity/t5gui/list-tml/boolean.tml.vm 2008-12-30 11:18:02 UTC (rev 945)
+++ trunk/equanda-generate/src/main/velocity/t5gui/list-tml/boolean.tml.vm 2008-12-30 12:26:32 UTC (rev 946)
@@ -1,7 +1,7 @@
-#if( $field.isMultiple() )
-<div t:type="Loop" t:source="value.${field.VarName}" t:value="currentMultipleRow" t:index="currentMultipleIndex">
-${dollar}{currentMultipleRow}
-</div>
-#else
+#* @vtlmacrolibrary path="../render.vm" *#
+#* @vtlvariable name="dollar" type="java.lang.String" *#
+#* @vtlvariable name="readOnlyContext" type="boolean" *#
+#* @vtlvariable name="table" type="org.equanda.domain.xml.transform.RootTable" *#
+#* @vtlvariable name="field" type="org.equanda.domain.xml.Field" *#
+## multiple makes no sense
${dollar}{value.${field.Name}}
-#end
Modified: trunk/equanda-generate/src/main/velocity/t5gui/list-tml/choice.tml.vm
===================================================================
--- trunk/equanda-generate/src/main/velocity/t5gui/list-tml/choice.tml.vm 2008-12-30 11:18:02 UTC (rev 945)
+++ trunk/equanda-generate/src/main/velocity/t5gui/list-tml/choice.tml.vm 2008-12-30 12:26:32 UTC (rev 946)
@@ -1,5 +1,10 @@
+#* @vtlmacrolibrary path="../render.vm" *#
+#* @vtlvariable name="dollar" type="java.lang.String" *#
+#* @vtlvariable name="readOnlyContext" type="boolean" *#
+#* @vtlvariable name="table" type="org.equanda.domain.xml.transform.RootTable" *#
+#* @vtlvariable name="field" type="org.equanda.domain.xml.Field" *#
#if( $field.isMultiple() )
-<!-- @ todo -->
+## @ todo
<div t:type="Loop" t:source="value.${field.VarName}" t:value="currentMultipleRow" t:index="currentMultipleIndex">
${dollar}{currentMultipleRow}
</div>
Modified: trunk/equanda-generate/src/main/velocity/t5gui/list-tml/date.tml.vm
===================================================================
--- trunk/equanda-generate/src/main/velocity/t5gui/list-tml/date.tml.vm 2008-12-30 11:18:02 UTC (rev 945)
+++ trunk/equanda-generate/src/main/velocity/t5gui/list-tml/date.tml.vm 2008-12-30 12:26:32 UTC (rev 946)
@@ -1,3 +1,8 @@
+#* @vtlmacrolibrary path="../render.vm" *#
+#* @vtlvariable name="dollar" type="java.lang.String" *#
+#* @vtlvariable name="readOnlyContext" type="boolean" *#
+#* @vtlvariable name="table" type="org.equanda.domain.xml.transform.RootTable" *#
+#* @vtlvariable name="field" type="org.equanda.domain.xml.Field" *#
#if( $field.isMultiple() )
<div t:type="Loop" t:source="value.${field.VarName}" t:value="currentMultipleRow" t:index="currentMultipleIndex">
<span t:type="t5components/DateFormat" t:value="currentMultipleRow"/>
Modified: trunk/equanda-generate/src/main/velocity/t5gui/list-tml/linklist.tml.vm
===================================================================
--- trunk/equanda-generate/src/main/velocity/t5gui/list-tml/linklist.tml.vm 2008-12-30 11:18:02 UTC (rev 945)
+++ trunk/equanda-generate/src/main/velocity/t5gui/list-tml/linklist.tml.vm 2008-12-30 12:26:32 UTC (rev 946)
@@ -1 +1,7 @@
+#* @vtlmacrolibrary path="../render.vm" *#
+#* @vtlvariable name="dollar" type="java.lang.String" *#
+#* @vtlvariable name="readOnlyContext" type="boolean" *#
+#* @vtlvariable name="table" type="org.equanda.domain.xml.transform.RootTable" *#
+#* @vtlvariable name="field" type="org.equanda.domain.xml.Field" *#
+## @todo needs to be properly handled
list of $table.Name objects
Modified: trunk/equanda-generate/src/main/velocity/t5gui/list-tml/linkone.tml.vm
===================================================================
--- trunk/equanda-generate/src/main/velocity/t5gui/list-tml/linkone.tml.vm 2008-12-30 11:18:02 UTC (rev 945)
+++ trunk/equanda-generate/src/main/velocity/t5gui/list-tml/linkone.tml.vm 2008-12-30 12:26:32 UTC (rev 946)
@@ -1 +1,6 @@
+#* @vtlmacrolibrary path="../render.vm" *#
+#* @vtlvariable name="dollar" type="java.lang.String" *#
+#* @vtlvariable name="readOnlyContext" type="boolean" *#
+#* @vtlvariable name="table" type="org.equanda.domain.xml.transform.RootTable" *#
+#* @vtlvariable name="field" type="org.equanda.domain.xml.Field" *#
<span t:type="${field.LinkTable.VarName}/Summary" t:value="value.${field.VarName}"/>
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-12-30 11:18:02 UTC (rev 945)
+++ trunk/equanda-generate/src/main/velocity/t5gui/list-tml/password.tml.vm 2008-12-30 12:26:32 UTC (rev 946)
@@ -1,5 +1,6 @@
-#if( $field.isMultiple() )
-***
-#else
-***
-#end
\ No newline at end of file
+#* @vtlmacrolibrary path="../render.vm" *#
+#* @vtlvariable name="dollar" type="java.lang.String" *#
+#* @vtlvariable name="readOnlyContext" type="boolean" *#
+#* @vtlvariable name="table" type="org.equanda.domain.xml.transform.RootTable" *#
+#* @vtlvariable name="field" type="org.equanda.domain.xml.Field" *#
+***
\ No newline at end of file
Modified: trunk/equanda-generate/src/main/velocity/t5gui/list-tml/text.tml.vm
===================================================================
--- trunk/equanda-generate/src/main/velocity/t5gui/list-tml/text.tml.vm 2008-12-30 11:18:02 UTC (rev 945)
+++ trunk/equanda-generate/src/main/velocity/t5gui/list-tml/text.tml.vm 2008-12-30 12:26:32 UTC (rev 946)
@@ -1,6 +1,11 @@
+#* @vtlmacrolibrary path="../render.vm" *#
+#* @vtlvariable name="dollar" type="java.lang.String" *#
+#* @vtlvariable name="readOnlyContext" type="boolean" *#
+#* @vtlvariable name="table" type="org.equanda.domain.xml.transform.RootTable" *#
+#* @vtlvariable name="field" type="org.equanda.domain.xml.Field" *#
#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"/>
+<span t:type="equanda/Truncate" t:text="prop:currentMultipleRow"/>
</div>
#else
<span t:type="equanda/Truncate" t:text="value.${field.VarName}"/>
Modified: trunk/equanda-generate/src/main/velocity/t5gui/list-tml/timestamp.tml.vm
===================================================================
--- trunk/equanda-generate/src/main/velocity/t5gui/list-tml/timestamp.tml.vm 2008-12-30 11:18:02 UTC (rev 945)
+++ trunk/equanda-generate/src/main/velocity/t5gui/list-tml/timestamp.tml.vm 2008-12-30 12:26:32 UTC (rev 946)
@@ -1,3 +1,8 @@
+#* @vtlmacrolibrary path="../render.vm" *#
+#* @vtlvariable name="dollar" type="java.lang.String" *#
+#* @vtlvariable name="readOnlyContext" type="boolean" *#
+#* @vtlvariable name="table" type="org.equanda.domain.xml.transform.RootTable" *#
+#* @vtlvariable name="field" type="org.equanda.domain.xml.Field" *#
#if( $field.isMultiple() )
<div t:type="Loop" t:source="value.${field.VarName}" t:value="currentMultipleRow" t:index="currentMultipleIndex">
<span t:type="t5components/DateFormat" t:value="currentMultipleRow" t:pattern="yyyy-MM-dd HH:mm:ss"/>
Modified: trunk/equanda-generate/src/main/velocity/t5gui/list-tml/tostring.tml.vm
===================================================================
--- trunk/equanda-generate/src/main/velocity/t5gui/list-tml/tostring.tml.vm 2008-12-30 11:18:02 UTC (rev 945)
+++ trunk/equanda-generate/src/main/velocity/t5gui/list-tml/tostring.tml.vm 2008-12-30 12:26:32 UTC (rev 946)
@@ -1,3 +1,8 @@
+#* @vtlmacrolibrary path="../render.vm" *#
+#* @vtlvariable name="dollar" type="java.lang.String" *#
+#* @vtlvariable name="readOnlyContext" type="boolean" *#
+#* @vtlvariable name="table" type="org.equanda.domain.xml.transform.RootTable" *#
+#* @vtlvariable name="field" type="org.equanda.domain.xml.Field" *#
#if( $field.isMultiple() )
<div t:type="Loop" t:source="value.${field.VarName}" t:value="currentMultipleRow" t:index="currentMultipleIndex">
${dollar}{currentMultipleRow}
Modified: trunk/equanda-generate/src/main/velocity/t5gui/list-tml/type.tml.vm
===================================================================
--- trunk/equanda-generate/src/main/velocity/t5gui/list-tml/type.tml.vm 2008-12-30 11:18:02 UTC (rev 945)
+++ trunk/equanda-generate/src/main/velocity/t5gui/list-tml/type.tml.vm 2008-12-30 12:26:32 UTC (rev 946)
@@ -1 +1,6 @@
+#* @vtlmacrolibrary path="../render.vm" *#
+#* @vtlvariable name="dollar" type="java.lang.String" *#
+#* @vtlvariable name="readOnlyContext" type="boolean" *#
+#* @vtlvariable name="table" type="org.equanda.domain.xml.transform.RootTable" *#
+#* @vtlvariable name="field" type="org.equanda.domain.xml.Field" *#
${dollar}{value.EquandaType}
Modified: trunk/equanda-generate/src/main/velocity/t5gui/pages/AuthAndConfigField.tml.vm
===================================================================
--- trunk/equanda-generate/src/main/velocity/t5gui/pages/AuthAndConfigField.tml.vm 2008-12-30 11:18:02 UTC (rev 945)
+++ trunk/equanda-generate/src/main/velocity/t5gui/pages/AuthAndConfigField.tml.vm 2008-12-30 12:26:32 UTC (rev 946)
@@ -1,3 +1,8 @@
+#* @vtlmacrolibrary path="../render.vm" *#
+#* @vtlvariable name="dollar" type="java.lang.String" *#
+#* @vtlvariable name="readOnlyContext" type="boolean" *#
+#* @vtlvariable name="table" type="org.equanda.domain.xml.transform.RootTable" *#
+#* @vtlvariable name="page" type="org.equanda.domain.xml.Page" *#
<t:if test="equanda-readable:page.${table.Name}.${page.Name}">
<fieldSet id="$!{page.Name}">
@@ -17,7 +22,7 @@
<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:label for="${readBox}"> ${dollar}{equanda-message:authAndConfig.label.Visible} | </t:label>
</t:parameter>
</t:if>
@@ -50,7 +55,7 @@
</t:parameter>
</t:if>
<t:if test="writeAllowed">
- <div class="writeCol">${dollar}{equanda-message:authAndConfig.label.Write}</div>
+ <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>
Modified: trunk/equanda-generate/src/main/velocity/t5gui/pages/AuthAndConfigGroup.tml.vm
===================================================================
--- trunk/equanda-generate/src/main/velocity/t5gui/pages/AuthAndConfigGroup.tml.vm 2008-12-30 11:18:02 UTC (rev 945)
+++ trunk/equanda-generate/src/main/velocity/t5gui/pages/AuthAndConfigGroup.tml.vm 2008-12-30 12:26:32 UTC (rev 946)
@@ -78,7 +78,7 @@
<t:if test="equanda-readable:field.${table.Name}.${field.Name}">
<div>
-
+
<div class="nameCol">
<label>${dollar}{equanda-message:field.${table.Name}.${field.Name}}</label><br/>
</div>
@@ -92,7 +92,7 @@
<t:if test="writeAllowed">
<div class="writeCol">
<input t:id="${writeBox}" name="${writeBox}" value="${writeBox}"
- onclick="eqHandleFieldBox( ${page.Name}_groupWriteCheck, ${readBox}, this, '$!{group.Name}', '_writeCheck' )"
+ onclick="eqHandleFieldBox( ${group.Name}_groupWriteCheck, ${readBox}, this, '$!{group.Name}', '_writeCheck' )"
t:type="CheckBox"/>
</div>
</t:if>
Modified: trunk/equanda-generate/src/main/velocity/t5gui/pages/SelectAuthConfig.tml.vm
===================================================================
--- trunk/equanda-generate/src/main/velocity/t5gui/pages/SelectAuthConfig.tml.vm 2008-12-30 11:18:02 UTC (rev 945)
+++ trunk/equanda-generate/src/main/velocity/t5gui/pages/SelectAuthConfig.tml.vm 2008-12-30 12:26:32 UTC (rev 946)
@@ -6,12 +6,12 @@
<t:parameter name="title">${dollar}{equanda-message:authAndConfig.title.Roles}</t:parameter>
<t:if test="isGuiAdmin">
- <p>Choose the role you wish to edit, or leave blank to edit the current user</p>
+ <p>${dollar}{equanda-message:authAndConfig.select.Role}</p>
<br/>
<select t:type="Select" t:model="RolesChoiceModel" t:value="roleName" t:blankOption="ALWAYS"/>
<t:parameter name="else">
- <b><font color="red">This user is prohibited from accessing this page.</font></b>
+ <p class="aacError">${dollar}{equanda-message:authAndConfig.select.Prohibited}</p>
</t:parameter>
</t:if>
Modified: trunk/equanda-generate/src/main/velocity/t5gui/summary-tml/linklist.tml.vm
===================================================================
--- trunk/equanda-generate/src/main/velocity/t5gui/summary-tml/linklist.tml.vm 2008-12-30 11:18:02 UTC (rev 945)
+++ trunk/equanda-generate/src/main/velocity/t5gui/summary-tml/linklist.tml.vm 2008-12-30 12:26:32 UTC (rev 946)
@@ -1 +1,7 @@
+#* @vtlmacrolibrary path="../render.vm" *#
+#* @vtlvariable name="dollar" type="java.lang.String" *#
+#* @vtlvariable name="readOnlyContext" type="boolean" *#
+#* @vtlvariable name="table" type="org.equanda.domain.xml.transform.RootTable" *#
+#* @vtlvariable name="field" type="org.equanda.domain.xml.Field" *#
+## @todo needs to be properly handled
list of $table.Name objects
Modified: trunk/equanda-generate/src/main/velocity/t5gui/summary-tml/linkone.tml.vm
===================================================================
--- trunk/equanda-generate/src/main/velocity/t5gui/summary-tml/linkone.tml.vm 2008-12-30 11:18:02 UTC (rev 945)
+++ trunk/equanda-generate/src/main/velocity/t5gui/summary-tml/linkone.tml.vm 2008-12-30 12:26:32 UTC (rev 946)
@@ -1 +1,6 @@
+#* @vtlmacrolibrary path="../render.vm" *#
+#* @vtlvariable name="dollar" type="java.lang.String" *#
+#* @vtlvariable name="readOnlyContext" type="boolean" *#
+#* @vtlvariable name="table" type="org.equanda.domain.xml.transform.RootTable" *#
+#* @vtlvariable name="field" type="org.equanda.domain.xml.Field" *#
<span t:type="${field.LinkTable.VarName}/Summary" t:value="value.${field.VarName}"/>
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-12-30 11:18:02 UTC (rev 945)
+++ trunk/equanda-generate/src/main/velocity/t5gui/view-tml/boolean.tml.vm 2008-12-30 12:26:32 UTC (rev 946)
@@ -1,7 +1,7 @@
-#if( $field.isMultiple() )
-<span t:type="Loop" t:source="value.${field.VarName}" t:value="currentMultipleRow" t:index="currentMultipleIndex">
-<t:if test="isRenderCurrentMultipleIndex()">, </t:if>${dollar}{currentMultipleRow}
-</span>
-#else
+#* @vtlmacrolibrary path="../render.vm" *#
+#* @vtlvariable name="dollar" type="java.lang.String" *#
+#* @vtlvariable name="readOnlyContext" type="boolean" *#
+#* @vtlvariable name="table" type="org.equanda.domain.xml.transform.RootTable" *#
+#* @vtlvariable name="field" type="org.equanda.domain.xml.Field" *#
+## multiple makes no sense
${dollar}{value.${field.Name}}
-#end
Modified: trunk/equanda-generate/src/main/velocity/t5gui/view-tml/choice.tml.vm
===================================================================
--- trunk/equanda-generate/src/main/velocity/t5gui/view-tml/choice.tml.vm 2008-12-30 11:18:02 UTC (rev 945)
+++ trunk/equanda-generate/src/main/velocity/t5gui/view-tml/choice.tml.vm 2008-12-30 12:26:32 UTC (rev 946)
@@ -1,3 +1,8 @@
+#* @vtlmacrolibrary path="../render.vm" *#
+#* @vtlvariable name="dollar" type="java.lang.String" *#
+#* @vtlvariable name="readOnlyContext" type="boolean" *#
+#* @vtlvariable name="table" type="org.equanda.domain.xml.transform.RootTable" *#
+#* @vtlvariable name="field" type="org.equanda.domain.xml.Field" *#
<input t:type="TextField" t:value="literal:?" length="1" disabled="true" style="display:none"/>
#if( $field.isMultiple() )
<!-- @ todo -->
Modified: trunk/equanda-generate/src/main/velocity/t5gui/view-tml/date.tml.vm
===================================================================
--- trunk/equanda-generate/src/main/velocity/t5gui/view-tml/date.tml.vm 2008-12-30 11:18:02 UTC (rev 945)
+++ trunk/equanda-generate/src/main/velocity/t5gui/view-tml/date.tml.vm 2008-12-30 12:26:32 UTC (rev 946)
@@ -1,3 +1,8 @@
+#* @vtlmacrolibrary path="../render.vm" *#
+#* @vtlvariable name="dollar" type="java.lang.String" *#
+#* @vtlvariable name="readOnlyContext" type="boolean" *#
+#* @vtlvariable name="table" type="org.equanda.domain.xml.transform.RootTable" *#
+#* @vtlvariable name="field" type="org.equanda.domain.xml.Field" *#
#if( $field.isMultiple() )
<div t:type="Loop" t:source="value.${field.VarName}" t:value="currentMultipleRow" t:index="currentMultipleIndex">
<span t:type="t5components/DateFormat" t:value="currentMultipleRow"/>
Modified: trunk/equanda-generate/src/main/velocity/t5gui/view-tml/linklist.tml.vm
===================================================================
--- trunk/equanda-generate/src/main/velocity/t5gui/view-tml/linklist.tml.vm 2008-12-30 11:18:02 UTC (rev 945)
+++ trunk/equanda-generate/src/main/velocity/t5gui/view-tml/linklist.tml.vm 2008-12-30 12:26:32 UTC (rev 946)
@@ -1,2 +1,8 @@
+#* @vtlmacrolibrary path="../render.vm" *#
+#* @vtlvariable name="dollar" type="java.lang.String" *#
+#* @vtlvariable name="readOnlyContext" type="boolean" *#
+#* @vtlvariable name="table" type="org.equanda.domain.xml.transform.RootTable" *#
+#* @vtlvariable name="field" type="org.equanda.domain.xml.Field" *#
<input t:type="TextField" t:value="literal:?" length="1" disabled="true" style="display:none"/>
+## @todo needs to be properly handled
list of $table.Name objects
Modified: trunk/equanda-generate/src/main/velocity/t5gui/view-tml/linkone.tml.vm
===================================================================
--- trunk/equanda-generate/src/main/velocity/t5gui/view-tml/linkone.tml.vm 2008-12-30 11:18:02 UTC (rev 945)
+++ trunk/equanda-generate/src/main/velocity/t5gui/view-tml/linkone.tml.vm 2008-12-30 12:26:32 UTC (rev 946)
@@ -1 +1,6 @@
+#* @vtlmacrolibrary path="../render.vm" *#
+#* @vtlvariable name="dollar" type="java.lang.String" *#
+#* @vtlvariable name="readOnlyContext" type="boolean" *#
+#* @vtlvariable name="table" type="org.equanda.domain.xml.transform.RootTable" *#
+#* @vtlvariable name="field" type="org.equanda.domain.xml.Field" *#
<span t:type="${field.LinkTable.VarName}/Summary" t:id="${field.VarName}" t:value="value.${field.VarName}"/>
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-12-30 11:18:02 UTC (rev 945)
+++ trunk/equanda-generate/src/main/velocity/t5gui/view-tml/password.tml.vm 2008-12-30 12:26:32 UTC (rev 946)
@@ -1,5 +1,6 @@
-#if( $field.isMultiple() )
+#* @vtlmacrolibrary path="../render.vm" *#
+#* @vtlvariable name="dollar" type="java.lang.String" *#
+#* @vtlvariable name="readOnlyContext" type="boolean" *#
+#* @vtlvariable name="table" type="org.equanda.domain.xml.transform.RootTable" *#
+#* @vtlvariable name="field" type="org.equanda.domain.xml.Field" *#
***
-#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-12-30 11:18:02 UTC (rev 945)
+++ trunk/equanda-generate/src/main/velocity/t5gui/view-tml/string.tml.vm 2008-12-30 12:26:32 UTC (rev 946)
@@ -1,3 +1,8 @@
+#* @vtlmacrolibrary path="../render.vm" *#
+#* @vtlvariable name="dollar" type="java.lang.String" *#
+#* @vtlvariable name="readOnlyContext" type="boolean" *#
+#* @vtlvariable name="table" type="org.equanda.domain.xml.transform.RootTable" *#
+#* @vtlvariable name="field" type="org.equanda.domain.xml.Field" *#
#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"/>
Modified: trunk/equanda-generate/src/main/velocity/t5gui/view-tml/text.tml.vm
===================================================================
--- trunk/equanda-generate/src/main/velocity/t5gui/view-tml/text.tml.vm 2008-12-30 11:18:02 UTC (rev 945)
+++ trunk/equanda-generate/src/main/velocity/t5gui/view-tml/text.tml.vm 2008-12-30 12:26:32 UTC (rev 946)
@@ -1,3 +1,8 @@
+#* @vtlmacrolibrary path="../render.vm" *#
+#* @vtlvariable name="dollar" type="java.lang.String" *#
+#* @vtlvariable name="readOnlyContext" type="boolean" *#
+#* @vtlvariable name="table" type="org.equanda.domain.xml.transform.RootTable" *#
+#* @vtlvariable name="field" type="org.equanda.domain.xml.Field" *#
#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}"/>
Modified: trunk/equanda-generate/src/main/velocity/t5gui/view-tml/timestamp.tml.vm
===================================================================
--- trunk/equanda-generate/src/main/velocity/t5gui/view-tml/timestamp.tml.vm 2008-12-30 11:18:02 UTC (rev 945)
+++ trunk/equanda-generate/src/main/velocity/t5gui/view-tml/timestamp.tml.vm 2008-12-30 12:26:32 UTC (rev 946)
@@ -1,3 +1,8 @@
+#* @vtlmacrolibrary path="../render.vm" *#
+#* @vtlvariable name="dollar" type="java.lang.String" *#
+#* @vtlvariable name="readOnlyContext" type="boolean" *#
+#* @vtlvariable name="table" type="org.equanda.domain.xml.transform.RootTable" *#
+#* @vtlvariable name="field" type="org.equanda.domain.xml.Field" *#
#if( $field.isMultiple() )
<div t:type="Loop" t:source="value.${field.VarName}" t:value="currentMultipleRow" t:index="currentMultipleIndex">
<span t:type="t5components/DateFormat" t:value="currentMultipleRow" t:pattern="yyyy-MM-dd HH:mm:ss"/>
Modified: trunk/equanda-generate/src/main/velocity/t5gui/view-tml/tostring.tml.vm
===================================================================
--- trunk/equanda-generate/src/main/velocity/t5gui/view-tml/tostring.tml.vm 2008-12-30 11:18:02 UTC (rev 945)
+++ trunk/equanda-generate/src/main/velocity/t5gui/view-tml/tostring.tml.vm 2008-12-30 12:26:32 UTC (rev 946)
@@ -1,3 +1,8 @@
+#* @vtlmacrolibrary path="../render.vm" *#
+#* @vtlvariable name="dollar" type="java.lang.String" *#
+#* @vtlvariable name="readOnlyContext" type="boolean" *#
+#* @vtlvariable name="table" type="org.equanda.domain.xml.transform.RootTable" *#
+#* @vtlvariable name="field" type="org.equanda.domain.xml.Field" *#
<input t:type="TextField" t:value="literal:?" length="1" disabled="true" style="display:none"/>
#if( $field.isMultiple() )
<div t:type="Loop" t:source="value.${field.VarName}" t:value="currentMultipleRow" t:index="currentMultipleIndex">
Modified: trunk/equanda-generate/src/main/velocity/t5gui/view-tml/type.tml.vm
===================================================================
--- trunk/equanda-generate/src/main/velocity/t5gui/view-tml/type.tml.vm 2008-12-30 11:18:02 UTC (rev 945)
+++ trunk/equanda-generate/src/main/velocity/t5gui/view-tml/type.tml.vm 2008-12-30 12:26:32 UTC (rev 946)
@@ -1,2 +1,7 @@
+#* @vtlmacrolibrary path="../render.vm" *#
+#* @vtlvariable name="dollar" type="java.lang.String" *#
+#* @vtlvariable name="readOnlyContext" type="boolean" *#
+#* @vtlvariable name="table" type="org.equanda.domain.xml.transform.RootTable" *#
+#* @vtlvariable name="field" type="org.equanda.domain.xml.Field" *#
<input t:type="TextField" t:value="literal:?" length="1" disabled="true" style="display:none"/>
${dollar}{value.EquandaType}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <tri...@us...> - 2008-12-30 11:18:06
|
Revision: 945
http://equanda.svn.sourceforge.net/equanda/?rev=945&view=rev
Author: triathlon98
Date: 2008-12-30 11:18:02 +0000 (Tue, 30 Dec 2008)
Log Message:
-----------
EQ-302 use ajax search for reference, less js in page, assure empty textfield works
Modified Paths:
--------------
trunk/equanda-tapestry5/src/main/java/org/equanda/tapestry5/components/TextField.java
trunk/equanda-tapestry5/src/main/resources/org/equanda/tapestry5/resources/equanda.js
trunk/equanda-tapestry5/src/site/wiki/textfield.wiki
Modified: trunk/equanda-tapestry5/src/main/java/org/equanda/tapestry5/components/TextField.java
===================================================================
--- trunk/equanda-tapestry5/src/main/java/org/equanda/tapestry5/components/TextField.java 2008-12-30 10:32:10 UTC (rev 944)
+++ trunk/equanda-tapestry5/src/main/java/org/equanda/tapestry5/components/TextField.java 2008-12-30 11:18:02 UTC (rev 945)
@@ -92,17 +92,8 @@
renderSupport.addScript( "element = $('%s');\n" +
// Update the element with the id of zone div. This may be changed dynamically on the client side.
"$T(element).zoneId = '%s';\n" +
- "\n" +
- "element.observe(\"change\", function(event)\n" +
- "{\n" +
- " var element = event.element();\n" +
- " Event.stop(event);\n" +
- " var zoneObject = Tapestry.findZoneManager(element);\n" +
- " if (!zoneObject) return;\n" +
- " var val = element.value;\n" +
- " if (''==val) val=' ';\n" +
- " zoneObject.updateFromURL('%s/'+eqUrlEnc(val)+'%s');\n" +
- "});\n", getClientId(), zone, urlStart, urlEnd );
+ "element.observe(\"change\", function(event) { eqTfzu( event, '%s/', '%s' ); });\n",
+ getClientId(), zone, urlStart, urlEnd );
}
}
}
Modified: trunk/equanda-tapestry5/src/main/resources/org/equanda/tapestry5/resources/equanda.js
===================================================================
--- trunk/equanda-tapestry5/src/main/resources/org/equanda/tapestry5/resources/equanda.js 2008-12-30 10:32:10 UTC (rev 944)
+++ trunk/equanda-tapestry5/src/main/resources/org/equanda/tapestry5/resources/equanda.js 2008-12-30 11:18:02 UTC (rev 945)
@@ -134,4 +134,21 @@
function eqInRange( code, range )
{
return code >= range.charCodeAt( 0 ) && code <= range.charCodeAt( 1 );
-}
\ No newline at end of file
+}
+
+/**
+ * Zone update for text field
+ * @param event
+ * @param urlStart
+ * @param urlEnd
+ */
+function eqTfzu( event, urlStart, urlEnd )
+{
+ Event.stop( event );
+ var element = event.element();
+ var zoneObject = Tapestry.findZoneManager(element);
+ if ( !zoneObject ) return;
+ var val = element.value;
+ if ( '' == val ) val = ' ';
+ zoneObject.updateFromURL( urlStart + eqUrlEnc( val ) + urlEnd );
+}
Modified: trunk/equanda-tapestry5/src/site/wiki/textfield.wiki
===================================================================
--- trunk/equanda-tapestry5/src/site/wiki/textfield.wiki 2008-12-30 10:32:10 UTC (rev 944)
+++ trunk/equanda-tapestry5/src/site/wiki/textfield.wiki 2008-12-30 11:18:02 UTC (rev 945)
@@ -6,6 +6,8 @@
A simple example is included below. This will do some transformation on the text (on the server side) which is displayed in an ajax call.
+Note that the reference which is called is automatically changed into a single space when empty. Otherwise a second onChangeFromTextField2 method would be needed to handle this case.
+
{code}
<t:block t:id="tf2Block">${tf2Value}</t:block>
<span t:type="equanda/TextField" t:id="TextField2" value="tf2Value" zone="tf2zone" context="literal: --- "/>
@@ -22,8 +24,9 @@
Block onChangeFromTextfield2( String infix, String str )
{
+ if ( " ".equals( str ) ) { /* special handling when textbox was empty */ }
tf2Value = infix;
- if ( null != str ) tf2Value = str.toLowerCase() + infix + str.toUpperCase();
+ tf2Value = str.toLowerCase() + infix + str.toUpperCase();
return tf2Block;
}
{code}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <tri...@us...> - 2008-12-30 10:32:20
|
Revision: 944
http://equanda.svn.sourceforge.net/equanda/?rev=944&view=rev
Author: triathlon98
Date: 2008-12-30 10:32:10 +0000 (Tue, 30 Dec 2008)
Log Message:
-----------
EQ-302 use ajax search for reference when possible...
Modified Paths:
--------------
trunk/equanda-generate/src/main/velocity/t5gui/components/LinkOne.java.vm
trunk/equanda-generate/src/main/velocity/t5gui/components/LinkOne.tml.vm
trunk/equanda-tapestry5/src/main/java/org/equanda/tapestry5/components/TextField.java
Modified: trunk/equanda-generate/src/main/velocity/t5gui/components/LinkOne.java.vm
===================================================================
--- trunk/equanda-generate/src/main/velocity/t5gui/components/LinkOne.java.vm 2008-12-30 02:01:08 UTC (rev 943)
+++ trunk/equanda-generate/src/main/velocity/t5gui/components/LinkOne.java.vm 2008-12-30 10:32:10 UTC (rev 944)
@@ -219,7 +219,7 @@
List<${table.Name}> list = ${table.Name}.selectEquandaReferenceStart( ref );
${table.Name} val = null;
if ( list.size() > 0 ) val = list.get( 0 );
- if ( val != null )
+ if ( val != null || " ".equals( ref ) )
{
value = val;
setter.setSelected( val );
Modified: trunk/equanda-generate/src/main/velocity/t5gui/components/LinkOne.tml.vm
===================================================================
--- trunk/equanda-generate/src/main/velocity/t5gui/components/LinkOne.tml.vm 2008-12-30 02:01:08 UTC (rev 943)
+++ trunk/equanda-generate/src/main/velocity/t5gui/components/LinkOne.tml.vm 2008-12-30 10:32:10 UTC (rev 944)
@@ -5,15 +5,17 @@
<div class="eqLL" xmlns:t="http://tapestry.apache.org/schema/tapestry_5_0_0.xsd">
<div class="eqLLR">
- <t:if test="hasValue()">
- <t:equanda.formactionlink t:id="Delete" context="prop:selectParameters" class="eqOp"><img src="${dollar}{asset:classpath:org/equanda/t5gui/delete.png}"/></t:equanda.formactionlink>
- </t:if>
<t:equanda.formactionlink t:id="Select" context="prop:selectParameters">${dollar}{equanda-message:Select}</t:equanda.formactionlink>
#if( $table.FieldReference )
<div class="autocomplete"><input t:type="equanda/TextField" t:mixins="autocomplete" t:id="selectedValue" t:zone="prop:zoneId"/></div>
<t:block t:id="val">
#end
- <t:if test="hasValue()"><span class="eqLLRdv"><t:${table.VarName}.SummaryEditLink object="value"/></span></t:if>
+ <t:if test="hasValue()">
+ <span class="eqLLRdv">
+ <t:equanda.formactionlink t:id="Delete" context="prop:selectParameters" class="eqOp"><img src="${dollar}{asset:classpath:org/equanda/t5gui/delete.png}"/></t:equanda.formactionlink>
+ <t:${table.VarName}.SummaryEditLink object="value"/>
+ </span>
+ </t:if>
#if( $table.FieldReference )
</t:block>
<t:equanda.zone t:id="zv"><t:delegate to="val"/></t:equanda.zone>
Modified: trunk/equanda-tapestry5/src/main/java/org/equanda/tapestry5/components/TextField.java
===================================================================
--- trunk/equanda-tapestry5/src/main/java/org/equanda/tapestry5/components/TextField.java 2008-12-30 02:01:08 UTC (rev 943)
+++ trunk/equanda-tapestry5/src/main/java/org/equanda/tapestry5/components/TextField.java 2008-12-30 10:32:10 UTC (rev 944)
@@ -99,7 +99,9 @@
" Event.stop(event);\n" +
" var zoneObject = Tapestry.findZoneManager(element);\n" +
" if (!zoneObject) return;\n" +
- " zoneObject.updateFromURL('%s/'+eqUrlEnc(element.value)+'%s');\n" +
+ " var val = element.value;\n" +
+ " if (''==val) val=' ';\n" +
+ " zoneObject.updateFromURL('%s/'+eqUrlEnc(val)+'%s');\n" +
"});\n", getClientId(), zone, urlStart, urlEnd );
}
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <tri...@us...> - 2008-12-30 02:01:11
|
Revision: 943
http://equanda.svn.sourceforge.net/equanda/?rev=943&view=rev
Author: triathlon98
Date: 2008-12-30 02:01:08 +0000 (Tue, 30 Dec 2008)
Log Message:
-----------
EQ-302 use ajax search for reference when possible...
Modified Paths:
--------------
trunk/equanda-generate/src/main/velocity/t5gui/components/LinkOne.java.vm
trunk/equanda-generate/src/main/velocity/t5gui/components/LinkOne.tml.vm
trunk/equanda-tapestry5/src/main/java/org/equanda/tapestry5/components/TextField.java
Added Paths:
-----------
trunk/equanda-tapestry5/src/main/java/org/equanda/tapestry5/components/Zone.java
Modified: trunk/equanda-generate/src/main/velocity/t5gui/components/LinkOne.java.vm
===================================================================
--- trunk/equanda-generate/src/main/velocity/t5gui/components/LinkOne.java.vm 2008-12-29 16:56:24 UTC (rev 942)
+++ trunk/equanda-generate/src/main/velocity/t5gui/components/LinkOne.java.vm 2008-12-30 02:01:08 UTC (rev 943)
@@ -41,6 +41,7 @@
import org.equanda.client.EquandaException;
import org.equanda.t5gui.*;
import org.equanda.t5gui.services.*;
+import org.equanda.tapestry5.components.Zone;
import ${package}.pages.${table.Name}EquandaAll;
import org.apache.tapestry5.*;
import org.apache.tapestry5.annotations.*;
@@ -102,7 +103,8 @@
this.selectComponentId = selectComponentId;
}
- public String getFilter() {
+ public String getFilter()
+ {
return filter;
}
@@ -111,7 +113,6 @@
filter = value;
}
-
public ${ejbPackage}.client.${table.Name} getValue()
{
return value;
@@ -176,38 +177,64 @@
}
#if( $table.FieldReference )
- private String selectedValue;
- public String getSelectedValue()
- {
+ public String getSelectedValue()
+ {
try
{
- if ( null != selectedValue ) return value.get${table.FieldReference.Name}();
- }
- catch ( EquandaException ee )
- { log.error( ee, ee ); }
- return selectedValue;
+ if ( null != value ) return value.getReference();
+ } catch ( EquandaException ee ) { log.error( ee ); }
+ return "";
}
public void setSelectedValue( String selectedValue )
{
- this.selectedValue = selectedValue;
+ // nothing to do
}
- public List<String> onProvideCompletionsFromSelectedValue(String partial) {
+ public List<String> onProvideCompletionsFromSelectedValue( String partial )
+ {
List<String> matches = new ArrayList<String>();
-
try
{
- List<${table.Name}> list = ${table.Name}.selectEquandaReferenceStart(partial);
+ List<${table.Name}> list = ${table.Name}.selectEquandaReferenceStart( partial );
for( ${table.Name} ref : list )
{
if( ref.getReference() != null || ref.getReference().length() != 0 )
- matches.add( ref.getReference() );
+ matches.add( ref.get${table.FieldReference.Name}() );
}
}
catch ( EquandaException ee )
{ log.error( ee, ee ); }
return matches;
}
+
+ @Inject
+ @Property
+ private Block val;
+
+ Block onChangeFromSelectedValue( String ref )
+ {
+ try
+ {
+ List<${table.Name}> list = ${table.Name}.selectEquandaReferenceStart( ref );
+ ${table.Name} val = null;
+ if ( list.size() > 0 ) val = list.get( 0 );
+ if ( val != null )
+ {
+ value = val;
+ setter.setSelected( val );
+ }
+ }
+ catch ( EquandaException e )
+ {
+ log.error( e,e );
+ }
+ return this.val;
+ }
+
+ @Component
+ private Zone zv;
+ public String getZoneId() { return zv.getClientId(); }
+
#end
}
Modified: trunk/equanda-generate/src/main/velocity/t5gui/components/LinkOne.tml.vm
===================================================================
--- trunk/equanda-generate/src/main/velocity/t5gui/components/LinkOne.tml.vm 2008-12-29 16:56:24 UTC (rev 942)
+++ trunk/equanda-generate/src/main/velocity/t5gui/components/LinkOne.tml.vm 2008-12-30 02:01:08 UTC (rev 943)
@@ -10,9 +10,14 @@
</t:if>
<t:equanda.formactionlink t:id="Select" context="prop:selectParameters">${dollar}{equanda-message:Select}</t:equanda.formactionlink>
#if( $table.FieldReference )
- <div class="autocomplete"><input t:type="TextField" t:mixins="autocomplete" t:id="selectedValue"/></div>
+ <div class="autocomplete"><input t:type="equanda/TextField" t:mixins="autocomplete" t:id="selectedValue" t:zone="prop:zoneId"/></div>
+ <t:block t:id="val">
#end
- <t:if test="hasValue()"><span style="padding-left: 10px;"><t:${table.VarName}.SummaryEditLink object="value"/></span></t:if>
+ <t:if test="hasValue()"><span class="eqLLRdv"><t:${table.VarName}.SummaryEditLink object="value"/></span></t:if>
+#if( $table.FieldReference )
+ </t:block>
+ <t:equanda.zone t:id="zv"><t:delegate to="val"/></t:equanda.zone>
+#end
</div>
</div>
Modified: trunk/equanda-tapestry5/src/main/java/org/equanda/tapestry5/components/TextField.java
===================================================================
--- trunk/equanda-tapestry5/src/main/java/org/equanda/tapestry5/components/TextField.java 2008-12-29 16:56:24 UTC (rev 942)
+++ trunk/equanda-tapestry5/src/main/java/org/equanda/tapestry5/components/TextField.java 2008-12-30 02:01:08 UTC (rev 943)
@@ -95,11 +95,11 @@
"\n" +
"element.observe(\"change\", function(event)\n" +
"{\n" +
- " var element = event.element();" +
+ " var element = event.element();\n" +
" Event.stop(event);\n" +
" var zoneObject = Tapestry.findZoneManager(element);\n" +
" if (!zoneObject) return;\n" +
- " zoneObject.updateFromURL('%s/'+eqUrlEnc(element.value)+'%s');\n" +
+ " zoneObject.updateFromURL('%s/'+eqUrlEnc(element.value)+'%s');\n" +
"});\n", getClientId(), zone, urlStart, urlEnd );
}
}
Added: trunk/equanda-tapestry5/src/main/java/org/equanda/tapestry5/components/Zone.java
===================================================================
--- trunk/equanda-tapestry5/src/main/java/org/equanda/tapestry5/components/Zone.java (rev 0)
+++ trunk/equanda-tapestry5/src/main/java/org/equanda/tapestry5/components/Zone.java 2008-12-30 02:01:08 UTC (rev 943)
@@ -0,0 +1,134 @@
+/**
+ * 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.tapestry5.components;
+
+import org.apache.tapestry5.*;
+import org.apache.tapestry5.annotations.Environmental;
+import org.apache.tapestry5.annotations.Parameter;
+import org.apache.tapestry5.annotations.SupportsInformalParameters;
+import org.apache.tapestry5.dom.Element;
+import org.apache.tapestry5.internal.services.ClientBehaviorSupport;
+import org.apache.tapestry5.ioc.annotations.Inject;
+import org.apache.tapestry5.json.JSONObject;
+
+/**
+ * ...
+ *
+ * @author <a href="mailto:jo...@pr...">Joachim Van der Auwera</a>
+ */
+@SupportsInformalParameters
+public class Zone
+ implements ClientElement
+{
+ /**
+ * Name of a function on the client-side Tapestry.ElementEffect object that is invoked to make the Zone's
+ * <div> visible before being updated. If not specified, then the basic "show" method is used.
+ */
+ @Parameter( defaultPrefix = BindingConstants.LITERAL )
+ private String show;
+
+ /**
+ * Name of a function on the client-side Tapestry.ElementEffect object that is invoked after the Zone's content has
+ * been updated. If not specified, then the basic "highlight" method is used, which performs a classic "yellow fade"
+ * to indicate to the user that and update has taken place.
+ */
+ @Parameter( defaultPrefix = BindingConstants.LITERAL )
+ private String update;
+
+ /**
+ * If bound, then the id attribute of the rendered element will be this exact value. If not bound, then a unique id
+ * is generated for the element.
+ */
+ @Parameter( name = "id", defaultPrefix = BindingConstants.LITERAL )
+ private String clientId;
+ private boolean clientIdInitialized;
+
+ @Environmental
+ private RenderSupport renderSupport;
+
+ @Environmental
+ private ClientBehaviorSupport clientBehaviorSupport;
+
+ /**
+ * If true (the default) then the zone will render normally. If false, then the "t-invisible" CSS class is added,
+ * which will make the zone initially invisible.
+ */
+ @Parameter
+ private boolean visible = true;
+
+ @Inject
+ private ComponentResources resources;
+
+ void beginRender( MarkupWriter writer )
+ {
+ Element e = writer.element( "div", "id", getClientId() );
+
+ resources.renderInformalParameters( writer );
+
+ e.addClassName( "t-zone" );
+
+ if ( !visible ) e.addClassName( "t-invisible" );
+
+ // And continue on to render the body
+
+ JSONObject spec = new JSONObject();
+ spec.put( "div", getClientId() );
+
+ clientBehaviorSupport.addZone( getClientId(), show, update );
+ }
+
+ void afterRender( MarkupWriter writer )
+ {
+ writer.end(); // div
+ }
+
+ public String getClientId()
+ {
+ if ( !clientIdInitialized || null == clientId || clientId.length() == 0 )
+ {
+ if ( !resources.isBound( "id" ) )
+ {
+ clientId = renderSupport.allocateClientId( resources );
+ }
+ else
+ {
+ clientId = renderSupport.allocateClientId( clientId );
+ }
+ clientIdInitialized = true;
+ }
+ return clientId;
+ }
+
+ /**
+ * Returns the zone's body (the content enclosed by its start and end tags). This is often used as part of an Ajax
+ * partial page render to update the client with a fresh render of the content inside the zone.
+ *
+ * @return the zone's body as a Block
+ */
+ public Block getBody()
+ {
+ return resources.getBody();
+ }
+}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <tri...@us...> - 2008-12-29 16:56:27
|
Revision: 942
http://equanda.svn.sourceforge.net/equanda/?rev=942&view=rev
Author: triathlon98
Date: 2008-12-29 16:56:24 +0000 (Mon, 29 Dec 2008)
Log Message:
-----------
EQ-303 change event name
Modified Paths:
--------------
trunk/equanda-tapestry5/src/main/java/org/equanda/tapestry5/components/TextField.java
trunk/equanda-tapestry5/src/site/wiki/textfield.wiki
Modified: trunk/equanda-tapestry5/src/main/java/org/equanda/tapestry5/components/TextField.java
===================================================================
--- trunk/equanda-tapestry5/src/main/java/org/equanda/tapestry5/components/TextField.java 2008-12-29 16:55:07 UTC (rev 941)
+++ trunk/equanda-tapestry5/src/main/java/org/equanda/tapestry5/components/TextField.java 2008-12-29 16:56:24 UTC (rev 942)
@@ -62,7 +62,7 @@
protected Link createLink( Object[] contextArray )
{
- return resources.createEventLink( EventConstants.ACTION, contextArray );
+ return resources.createEventLink( "change", contextArray );
}
@Override
Modified: trunk/equanda-tapestry5/src/site/wiki/textfield.wiki
===================================================================
--- trunk/equanda-tapestry5/src/site/wiki/textfield.wiki 2008-12-29 16:55:07 UTC (rev 941)
+++ trunk/equanda-tapestry5/src/site/wiki/textfield.wiki 2008-12-29 16:56:24 UTC (rev 942)
@@ -20,7 +20,7 @@
@Property
private String tf2Value;
- Block onActionFromTextfield2( String infix, String str )
+ Block onChangeFromTextfield2( String infix, String str )
{
tf2Value = infix;
if ( null != str ) tf2Value = str.toLowerCase() + infix + str.toUpperCase();
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <tri...@us...> - 2008-12-29 16:55:12
|
Revision: 941
http://equanda.svn.sourceforge.net/equanda/?rev=941&view=rev
Author: triathlon98
Date: 2008-12-29 16:55:07 +0000 (Mon, 29 Dec 2008)
Log Message:
-----------
EQ-303 fix even name
Modified Paths:
--------------
t5-equanda-example/src/main/java/org/equanda/example/t5/pages/Start.java
Modified: t5-equanda-example/src/main/java/org/equanda/example/t5/pages/Start.java
===================================================================
--- t5-equanda-example/src/main/java/org/equanda/example/t5/pages/Start.java 2008-12-29 16:37:22 UTC (rev 940)
+++ t5-equanda-example/src/main/java/org/equanda/example/t5/pages/Start.java 2008-12-29 16:55:07 UTC (rev 941)
@@ -141,7 +141,7 @@
@Property
private String tf1Value;
- Block onActionFromTextfield1( String str )
+ Block onChangeFromTextfield1( String str )
{
tf1Value = str;
return tf1Block;
@@ -154,7 +154,7 @@
@Property
private String tf2Value;
- Block onActionFromTextfield2( String infix, String str )
+ Block onChangeFromTextfield2( String infix, String str )
{
tf2Value = infix;
if ( null != str ) tf2Value = str.toLowerCase() + infix +str.toUpperCase();
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <tri...@us...> - 2008-12-29 16:37:28
|
Revision: 940
http://equanda.svn.sourceforge.net/equanda/?rev=940&view=rev
Author: triathlon98
Date: 2008-12-29 16:37:22 +0000 (Mon, 29 Dec 2008)
Log Message:
-----------
fix spelling
Modified Paths:
--------------
trunk/equanda-dm/src/main/java/org/equanda/domain/xml/Parser.java
trunk/equanda-dm/src/main/resources/equanda.dtd
trunk/equanda-maven-plugin/src/main/resources/archetype-resources/gui/src/main/java/services/AppModule.java
trunk/equanda-test/test-t5-gui/src/main/java/org/equanda/test/gui/services/AppModule.java
trunk/equanda-util/src/main/java/org/equanda/util/StringUtil.java
trunk/equanda-util/src/main/java/org/equanda/util/script/StringExtension.java
trunk/equanda-util/src/site/wiki/UtilScriptString.wiki
trunk/equanda-util/src/test/java/org/equanda/util/StringUtilTest.java
trunk/src/site/wiki/dm.wiki
trunk/src/site/wiki/index.wiki
trunk/src/site/wiki/tool/import.wiki
Modified: trunk/equanda-dm/src/main/java/org/equanda/domain/xml/Parser.java
===================================================================
--- trunk/equanda-dm/src/main/java/org/equanda/domain/xml/Parser.java 2008-12-29 16:28:59 UTC (rev 939)
+++ trunk/equanda-dm/src/main/java/org/equanda/domain/xml/Parser.java 2008-12-29 16:37:22 UTC (rev 940)
@@ -109,7 +109,7 @@
}
// transform document and parse the templates in the data definition
- // this has to be done in a seperate step as the entire definition has to be read first !
+ // this has to be done in a separate step as the entire definition has to be read first !
dm.handleIncludes( this );
for ( Table table : dm.getTables() )
Modified: trunk/equanda-dm/src/main/resources/equanda.dtd
===================================================================
--- trunk/equanda-dm/src/main/resources/equanda.dtd 2008-12-29 16:28:59 UTC (rev 939)
+++ trunk/equanda-dm/src/main/resources/equanda.dtd 2008-12-29 16:37:22 UTC (rev 940)
@@ -121,7 +121,7 @@
<!--
- Comma seperated list of roles which can access the function removeEntity.
+ Comma separated list of roles which can access the function removeEntity.
If missing, this method will not be generated.
-->
<!ELEMENT security-role-remove (#PCDATA)>
@@ -372,7 +372,7 @@
<!--
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
+ space or comma separated list of roles
-->
<!ELEMENT ws-role (#PCDATA)>
Modified: trunk/equanda-maven-plugin/src/main/resources/archetype-resources/gui/src/main/java/services/AppModule.java
===================================================================
--- trunk/equanda-maven-plugin/src/main/resources/archetype-resources/gui/src/main/java/services/AppModule.java 2008-12-29 16:28:59 UTC (rev 939)
+++ trunk/equanda-maven-plugin/src/main/resources/archetype-resources/gui/src/main/java/services/AppModule.java 2008-12-29 16:37:22 UTC (rev 940)
@@ -89,7 +89,7 @@
// Contributions to ApplicationDefaults will override any contributions to
// FactoryDefaults (with the same key). Here we're restricting the supported
// locales to just "en" (English). As you add localised message catalogs and other assets,
- // you can extend this list of locales (it's a comma seperated series of locale names;
+ // you can extend this list of locales (it's a comma separated series of locale names;
// the first locale name is the default when there's no reasonable match).
configuration.add( "tapestry.supported-locales", "en,nl" );
Modified: trunk/equanda-test/test-t5-gui/src/main/java/org/equanda/test/gui/services/AppModule.java
===================================================================
--- trunk/equanda-test/test-t5-gui/src/main/java/org/equanda/test/gui/services/AppModule.java 2008-12-29 16:28:59 UTC (rev 939)
+++ trunk/equanda-test/test-t5-gui/src/main/java/org/equanda/test/gui/services/AppModule.java 2008-12-29 16:37:22 UTC (rev 940)
@@ -75,7 +75,7 @@
// Contributions to ApplicationDefaults will override any contributions to
// FactoryDefaults (with the same key). Here we're restricting the supported
// locales to just "en" (English). As you add localised message catalogs and other assets,
- // you can extend this list of locales (it's a comma seperated series of locale names;
+ // you can extend this list of locales (it's a comma separated series of locale names;
// the first locale name is the default when there's no reasonable match).
configuration.add( "tapestry.supported-locales", "en,nl" );
Modified: trunk/equanda-util/src/main/java/org/equanda/util/StringUtil.java
===================================================================
--- trunk/equanda-util/src/main/java/org/equanda/util/StringUtil.java 2008-12-29 16:28:59 UTC (rev 939)
+++ trunk/equanda-util/src/main/java/org/equanda/util/StringUtil.java 2008-12-29 16:37:22 UTC (rev 940)
@@ -197,7 +197,7 @@
}
/**
- * Extract line with given number from the string, lines are seperated by newlines. 0 is the first line.
+ * Extract line with given number from the string, lines are separated by newlines. 0 is the first line.
*
* @param str input string
* @param pos position
Modified: trunk/equanda-util/src/main/java/org/equanda/util/script/StringExtension.java
===================================================================
--- trunk/equanda-util/src/main/java/org/equanda/util/script/StringExtension.java 2008-12-29 16:28:59 UTC (rev 939)
+++ trunk/equanda-util/src/main/java/org/equanda/util/script/StringExtension.java 2008-12-29 16:37:22 UTC (rev 940)
@@ -567,7 +567,7 @@
ext.addFunctionExtension( "line", new FSFunctionExtension()
{
/**
- * Extract a specific line (seperated with '\n') from a string.
+ * Extract a specific line (separated with '\n') from a string.
*/
public Object callFunction( String name, ArrayList params )
throws FSException
Modified: trunk/equanda-util/src/site/wiki/UtilScriptString.wiki
===================================================================
--- trunk/equanda-util/src/site/wiki/UtilScriptString.wiki 2008-12-29 16:28:59 UTC (rev 939)
+++ trunk/equanda-util/src/site/wiki/UtilScriptString.wiki 2008-12-29 16:37:22 UTC (rev 940)
@@ -19,7 +19,7 @@
- StringContains(str, search) : returns TRUE when the first string contains the second.
- quote(str) : return the given string quoted using double quotes, doubling the contained double quotes if any.
- squote(str) : return the given string quoted using single quotes, doubling the contained single quotes if any.
-- line(str, line) : return the requested line from the given string, or an empty string if the line does not exist. Lines are seperated with newlines.
+- line(str, line) : return the requested line from the given string, or an empty string if the line does not exist. Lines are separated with newlines.
- replace(string, what, with) : replace sequences of "what" in te given string with the value indicated by "with".
- wordwrap(str, line, len) : return the requested line from the given string, using wordwrap with len characters on a line, or an empty string if the line does not exist.
- increment(str) : tries to increment the number at the end of the string and returns that with the same prefix. If there is no number at the end, then the string itself is returned.
Modified: trunk/equanda-util/src/test/java/org/equanda/util/StringUtilTest.java
===================================================================
--- trunk/equanda-util/src/test/java/org/equanda/util/StringUtilTest.java 2008-12-29 16:28:59 UTC (rev 939)
+++ trunk/equanda-util/src/test/java/org/equanda/util/StringUtilTest.java 2008-12-29 16:37:22 UTC (rev 940)
@@ -52,7 +52,7 @@
// When a simple string is given as template, then that string is prepended if necessary
assertEquals( "VERK-blabla", StringUtil.addPrefix( "VERK-", "blabla" ) );
assertEquals( "VERK-blabla", StringUtil.addPrefix( "VERK-", "VERK-blabla" ) );
- // Pieces can be seperated with vertical bars, these indicate blocks which are matched
+ // Pieces can be separated with vertical bars, these indicate blocks which are matched
assertEquals( "VERK-2004blabla", StringUtil.addPrefix( "VERK-|2004", "blabla" ) );
assertEquals( "VERK-2004blabla", StringUtil.addPrefix( "VERK-|2004", "2004blabla" ) );
assertEquals( "VERK-2004blabla", StringUtil.addPrefix( "VERK-|2004", "VERK-blabla" ) );
Modified: trunk/src/site/wiki/dm.wiki
===================================================================
--- trunk/src/site/wiki/dm.wiki 2008-12-29 16:28:59 UTC (rev 939)
+++ trunk/src/site/wiki/dm.wiki 2008-12-29 16:37:22 UTC (rev 940)
@@ -37,7 +37,7 @@
- *type* : this is a code of up to four characters which is used to discriminate tables which are part of the same hierarchy (as specified using the "template" tags). This is typically not specified on the root table, but only on the children (this is merely a convention, it is not enforced). The value needs to be unique within the inheritance tree.
- *expected-amount* : an indication of the number of records which are expected to be in this table. Allowed values are "small", "medium" and "large" ("large" is the default). This can be used by the templates as a hint to make the user interface more intuitive. For example when expected-amount is "small". links could be rendered as a combo box. When it is "large" then displaying a list of all items may be unpractical.
- *category* : category key which is used for gicing a categorisation of tables. The value specified on the root tables can for example be used for grouping the tables in a menu structure.
-- *proxy-interface* : extra interfaces (comma seperated) which should be applied to the proxy. This allows you to have dependencies on the proxies' accessors.
+- *proxy-interface* : extra interfaces (comma separated) which should be applied to the proxy. This allows you to have dependencies on the proxies' accessors.
- *internal* : when a table is marked internal (by passing a value which is different from "false"), then it cannot be instantiated. The table is only provided to have a common parent in the inheritance tree.
Each table can be given a _description_ and semantic annotations using _subectory_.
@@ -53,7 +53,7 @@
When you create objects without specifying the actual subtype, they are normally created as instances of the root table (when this is not marked as "internal"). However, you can use the _default-instance_ tag to either indicate that this type should be the default (when there is no "class-name" attribute), or specify a class which determines the default type (using the "class-name" attribute, should implement org.equanda.validation.DefaultInstance). The "forced" attribute allows you to determine whether this is the only type which can be instantiated, or whether is is just a normal default which can be overridden.
-As enterprise java beans are created, you can specify the roles which are allowed to access the data (all getters/setters and defaults for the select/action/build) and which roles are allowed to remove objects. The can be specified as comma seperated lists to the _security-role_ and _security-role-remove_ tags. The defaults (when not specified on the table) come from the configuration file.
+As enterprise java beans are created, you can specify the roles which are allowed to access the data (all getters/setters and defaults for the select/action/build) and which roles are allowed to remove objects. The can be specified as comma separated lists to the _security-role_ and _security-role-remove_ tags. The defaults (when not specified on the table) come from the configuration file.
On a table you can define the _cascade-keep_ status. When a table is marked as cascade-keep, then all records which have a link to (a record from) this table cannot be deleted.
@@ -148,7 +148,7 @@
- *name* : name of the field. This is expected to start with a capital to adhere to the Java naming convention.
- *type* : type of the selector, possible values are "single" and "multiple". Defaults to "multiple".
- *operator* : operator which determines how to combine child _subselect_ objects, which act like brackets in your query. It defaults to "AND", other allowed values are "OR", "TRY" and "ADD". "AND" and "OR" are directly applied in the query. When "TRY" is used it attempts each of the _selector_ children in turn. First one which has a result is returned. When the operator is add then the results of all child _selector_ queries are combined.
-- *order* : order for sorting the results. You can list the fieldnames, seperated by comma. Sort order for a specific field can be reverted by prepending "-". You can also use the meta fieldname "EQUANDA_CREATION", "EQUANDA_MODIFIED" for the creation and last modification timestamps respectively.
+- *order* : order for sorting the results. You can list the fieldnames, separated by comma. Sort order for a specific field can be reverted by prepending "-". You can also use the meta fieldname "EQUANDA_CREATION", "EQUANDA_MODIFIED" for the creation and last modification timestamps respectively.
- *limit* : when set to "yes" an extra parameter is added in the select which allows you to specify the maximum number of records to return.
Each select can be given a _description_.
@@ -167,7 +167,7 @@
You can also specify the EJBQL query directly using the _query_ tag.
-The _security-role_ which is allowed to call this _select_ can also be specified. This defaults to the _security-role_ for the table, but you can replace this by a different set of comma seperated roles.
+The _security-role_ which is allowed to call this _select_ can also be specified. This defaults to the _security-role_ for the table, but you can replace this by a different set of comma separated roles.
When _hide_ is set, the select will not be included in the list of selects in the user interface.
@@ -188,7 +188,7 @@
You can also specify a specific set of default values which should be used for this build (possibly making it unnecessary to provide code). This can be sone using _set_ tags. The value is used as default value which is assigned to the given *field* (attribute).
-The _security-role_ which is allowed to call this _build_ can also be specified. This defaults to the _security-role_ for the table, but you can replace this by a different set of comma seperated roles.
+The _security-role_ which is allowed to call this _build_ can also be specified. This defaults to the _security-role_ for the table, but you can replace this by a different set of comma separated roles.
h2. action
@@ -205,7 +205,7 @@
- _type_ : parameter type. You should use the fully qualified class name when this is not a simple java type.
- _name_ : name which should be given to the parameter.
-The _security-role_ which is allowed to call this _action_ can also be specified. This defaults to the _security-role_ for the table, but you can replace this by a different set of comma seperated roles.
+The _security-role_ which is allowed to call this _action_ can also be specified. This defaults to the _security-role_ for the table, but you can replace this by a different set of comma separated roles.
When _hide_ is set, the action will not be included in the list of actions in the user interface.
Modified: trunk/src/site/wiki/index.wiki
===================================================================
--- trunk/src/site/wiki/index.wiki 2008-12-29 16:28:59 UTC (rev 939)
+++ trunk/src/site/wiki/index.wiki 2008-12-29 16:37:22 UTC (rev 940)
@@ -39,7 +39,7 @@
The application can run in a client server environment and can be deployed on several tiers.
Specifically, you could deploy the web server, the business tier and the database on different machines. Moreover, while the business tier needs to have access to the database tier, the (web) client tier only needs access to the business tier. This way it is possible to secure that all access to the database is forced through the business tier and to ensure that all the constraints which are enforced by the business tier cannot be evaded.
-Internationalization is built into the system. All the information in the system can be translated, both the messages on the user interface and the error messages. There is specific support and tools to manage the translations. This to allow seperate people (non-programmers) to manage the translations without the properties hell (where you have translation in tens or hundreds of properties files).
+Internationalization is built into the system. All the information in the system can be translated, both the messages on the user interface and the error messages. There is specific support and tools to manage the translations. This to allow separate people (non-programmers) to manage the translations without the properties hell (where you have translation in tens or hundreds of properties files).
The generation has some extra support for useability. There are efforts to make the templates as readable as possible, but to aid you the generated (java) files can be source formatted, the generated xml files can be formatted and/or validated. However, in both cases this can be disabled as well (to make generation faster).
Modified: trunk/src/site/wiki/tool/import.wiki
===================================================================
--- trunk/src/site/wiki/tool/import.wiki 2008-12-29 16:28:59 UTC (rev 939)
+++ trunk/src/site/wiki/tool/import.wiki 2008-12-29 16:37:22 UTC (rev 940)
@@ -125,7 +125,7 @@
func build()
# this functions is called to builds the import file
# You have the following commands for this
- # table(selectorName, commaSeperatedFields)
+ # table(selectorName, commaSeparatedFields)
# field(data) : add a field value
# line([string]) : next line or add line with given text
# quote(string) : quote a string using single quotes, doubles the single quotes in the string
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <tri...@us...> - 2008-12-29 16:29:04
|
Revision: 939
http://equanda.svn.sourceforge.net/equanda/?rev=939&view=rev
Author: triathlon98
Date: 2008-12-29 16:28:59 +0000 (Mon, 29 Dec 2008)
Log Message:
-----------
fix spelling
Modified Paths:
--------------
t5-equanda-example/src/main/java/org/equanda/example/t5/services/AppModule.java
t5-equanda-example/src/main/resources/org/equanda/example/t5/pages/Start.tml
Modified: t5-equanda-example/src/main/java/org/equanda/example/t5/services/AppModule.java
===================================================================
--- t5-equanda-example/src/main/java/org/equanda/example/t5/services/AppModule.java 2008-12-29 15:06:38 UTC (rev 938)
+++ t5-equanda-example/src/main/java/org/equanda/example/t5/services/AppModule.java 2008-12-29 16:28:59 UTC (rev 939)
@@ -59,7 +59,7 @@
// Contributions to ApplicationDefaults will override any contributions to
// FactoryDefaults (with the same key). Here we're restricting the supported
// locales to just "en" (English). As you add localised message catalogs and other assets,
- // you can extend this list of locales (it's a comma seperated series of locale names;
+ // you can extend this list of locales (it's a comma separated series of locale names;
// the first locale name is the default when there's no reasonable match).
configuration.add( "tapestry.supported-locales", "en,nl" );
Modified: t5-equanda-example/src/main/resources/org/equanda/example/t5/pages/Start.tml
===================================================================
--- t5-equanda-example/src/main/resources/org/equanda/example/t5/pages/Start.tml 2008-12-29 15:06:38 UTC (rev 938)
+++ t5-equanda-example/src/main/resources/org/equanda/example/t5/pages/Start.tml 2008-12-29 16:28:59 UTC (rev 939)
@@ -86,7 +86,7 @@
<t:parameter name="content4">
<p>This illustrates the TreeTable component. It is still under construction and some features are missing. The depth of the tree
is limited and each node of the tree can only display one label. The idea is to add a feature so that we can display N labels for
- each node. Each of those labels is to be displayed in a seperate column of the html table. We'd also like to introduce blocks,
+ each node. Each of those labels is to be displayed in a separate column of the html table. We'd also like to introduce blocks,
so that the user has more impact on the layout.</p>
<br/>
@@ -117,7 +117,7 @@
<p>The TextField component is a variant of the tapestry builtin textfield with support of zones.
When the value changes, a zone may be updated based on the changed value.</p>
<p>Any contents typed in the first field is displayed again behind it.</p>
- <p>The second field displays the lower and upper case contents seperated by an infix.</p>
+ <p>The second field displays the lower and upper case contents separated by an infix.</p>
<br/>
<t:block t:id="tf1Block">${tf1Value}</t:block>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <tri...@us...> - 2008-12-29 15:06:44
|
Revision: 938
http://equanda.svn.sourceforge.net/equanda/?rev=938&view=rev
Author: triathlon98
Date: 2008-12-29 15:06:38 +0000 (Mon, 29 Dec 2008)
Log Message:
-----------
EQ-303 ajax enabled TextField component
Modified Paths:
--------------
trunk/equanda-tapestry5/src/main/resources/org/equanda/tapestry5/resources/equanda.js
trunk/equanda-tapestry5/src/site/site.xml
trunk/equanda-tapestry5/src/site/wiki/index.wiki
Added Paths:
-----------
trunk/equanda-tapestry5/src/main/java/org/equanda/tapestry5/components/TextField.java
trunk/equanda-tapestry5/src/site/wiki/textfield.wiki
Added: trunk/equanda-tapestry5/src/main/java/org/equanda/tapestry5/components/TextField.java
===================================================================
--- trunk/equanda-tapestry5/src/main/java/org/equanda/tapestry5/components/TextField.java (rev 0)
+++ trunk/equanda-tapestry5/src/main/java/org/equanda/tapestry5/components/TextField.java 2008-12-29 15:06:38 UTC (rev 938)
@@ -0,0 +1,106 @@
+/**
+ * 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.tapestry5.components;
+
+import org.apache.tapestry5.*;
+import org.apache.tapestry5.annotations.Environmental;
+import org.apache.tapestry5.annotations.IncludeJavaScriptLibrary;
+import org.apache.tapestry5.annotations.Parameter;
+import org.apache.tapestry5.corelib.base.AbstractTextField;
+import org.apache.tapestry5.ioc.annotations.Inject;
+
+/**
+ * A variation on the tapestry builtin TextField component. The main difference being that this one can also contain
+ * zone and context parameters. The zone is updated when a value is defined in the text field.
+ * Note that due to limitations in tapestry, the zone contents should not contain form elements.
+ *
+ * @author <a href="mailto:jo...@pr...">Joachim Van der Auwera</a>
+ */
+@IncludeJavaScriptLibrary( "classpath:/org/equanda/tapestry5/resources/equanda.js" )
+public class TextField
+ extends AbstractTextField
+{
+ @Inject
+ private ComponentResources resources;
+
+ @Environmental
+ private RenderSupport renderSupport;
+
+ /**
+ * The context for the link (optional parameter). This list of values will be converted into strings and included in
+ * the URI. The strings will be coerced back to whatever their values are and made available to event handler
+ * methods.
+ */
+ @Parameter
+ private Object[] context;
+
+ /** Binding the zone parameter turns the link into a an Ajax control that causes the related zone to be updated. */
+ @Parameter( defaultPrefix = BindingConstants.LITERAL )
+ private String zone;
+
+ protected Link createLink( Object[] contextArray )
+ {
+ return resources.createEventLink( EventConstants.ACTION, contextArray );
+ }
+
+ @Override
+ protected void writeFieldTag( MarkupWriter writer, String value )
+ {
+ writer.element( "input",
+ "type", "text",
+ "name", getControlName(),
+ "id", getClientId(),
+ "value", value,
+ "size", getWidth() );
+ }
+
+ final void afterRender( MarkupWriter writer )
+ {
+ writer.end(); // input
+ if ( null != zone )
+ {
+ String urlStart = createLink( context ).toAbsoluteURI();
+ String urlEnd = "";
+ int pos = urlStart.indexOf( ';' );
+ if ( pos > 0 )
+ {
+ urlEnd = urlStart.substring( pos );
+ urlStart = urlStart.substring( 0, pos );
+ }
+ renderSupport.addScript( "element = $('%s');\n" +
+ // Update the element with the id of zone div. This may be changed dynamically on the client side.
+ "$T(element).zoneId = '%s';\n" +
+ "\n" +
+ "element.observe(\"change\", function(event)\n" +
+ "{\n" +
+ " var element = event.element();" +
+ " Event.stop(event);\n" +
+ " var zoneObject = Tapestry.findZoneManager(element);\n" +
+ " if (!zoneObject) return;\n" +
+ " zoneObject.updateFromURL('%s/'+eqUrlEnc(element.value)+'%s');\n" +
+ "});\n", getClientId(), zone, urlStart, urlEnd );
+ }
+ }
+}
Modified: trunk/equanda-tapestry5/src/main/resources/org/equanda/tapestry5/resources/equanda.js
===================================================================
--- trunk/equanda-tapestry5/src/main/resources/org/equanda/tapestry5/resources/equanda.js 2008-12-29 14:50:55 UTC (rev 937)
+++ trunk/equanda-tapestry5/src/main/resources/org/equanda/tapestry5/resources/equanda.js 2008-12-29 15:06:38 UTC (rev 938)
@@ -101,3 +101,37 @@
}.bind( this )
} );
}
+
+/**
+ * Url encode a string to ensure it can be passed to tapestry5
+ * @param string
+ */
+function eqUrlEnc( string )
+{
+ string = string.replace(/\r\n/g,"\n");
+ var res = "";
+ for (var n = 0; n < string.length; n++)
+ {
+ var c = string.charCodeAt( n );
+ if ( '$' == string.charAt( n ) )
+ {
+ res += '$$';
+ }
+ else if ( eqInRange( c, "AZ" ) || eqInRange( c, "az" ) || eqInRange( c, "09" ) || eqInRange( c, ".." ) )
+ {
+ res += string.charAt( n )
+ }
+ else
+ {
+ var tmp = c.toString(16);
+ while ( tmp.length < 4 ) tmp = "0" + tmp;
+ res += '$' + tmp;
+ }
+ }
+ return res;
+}
+
+function eqInRange( code, range )
+{
+ return code >= range.charCodeAt( 0 ) && code <= range.charCodeAt( 1 );
+}
\ No newline at end of file
Modified: trunk/equanda-tapestry5/src/site/site.xml
===================================================================
--- trunk/equanda-tapestry5/src/site/site.xml 2008-12-29 14:50:55 UTC (rev 937)
+++ trunk/equanda-tapestry5/src/site/site.xml 2008-12-29 15:06:38 UTC (rev 938)
@@ -10,11 +10,12 @@
<item name="Introduction" href="index.html"/>
<item name="Components" collapse="false">
<item name="Accordion" href="accordion.html"/>
- <item name="Tabs / MemTabs" href="tabs.html"/>
- <item name="Truncate" href="truncate.html"/>
<item name="FormActionLink" href="formactionlink.html"/>
<item name="FormSupport" href="formsupport.html"/>
<item name="JSPagedLoop" href="jspagedloop.html"/>
+ <item name="Tabs / MemTabs" href="tabs.html"/>
+ <item name="TextField" href="textfield.html"/>
+ <item name="Truncate" href="truncate.html"/>
<item name="ValidationTrackerDelegate" href="validationtrackerdelegate.html"/>
</item>
</menu>
Modified: trunk/equanda-tapestry5/src/site/wiki/index.wiki
===================================================================
--- trunk/equanda-tapestry5/src/site/wiki/index.wiki 2008-12-29 14:50:55 UTC (rev 937)
+++ trunk/equanda-tapestry5/src/site/wiki/index.wiki 2008-12-29 15:06:38 UTC (rev 938)
@@ -13,6 +13,7 @@
- [Truncate|truncate.html]
- [FormActionLink|formactionlink.html]
- [JSPagedLoop|jspagedloop.html]
+- [TextField|textfield.html]
Useful services, translators and other
- DoubleTranslator : assures both dot or comma can be used as decimal seperator.
Added: trunk/equanda-tapestry5/src/site/wiki/textfield.wiki
===================================================================
--- trunk/equanda-tapestry5/src/site/wiki/textfield.wiki (rev 0)
+++ trunk/equanda-tapestry5/src/site/wiki/textfield.wiki 2008-12-29 15:06:38 UTC (rev 938)
@@ -0,0 +1,29 @@
+h1. TextField
+
+This is a variant from the [TextField component|http://tapestry.apache.org/tapestry5/tapestry-core/ref/org/apache/tapestry5/corelib/components/TextField.html] which is built into tapestry. It is fully equivalent, apart from two parameters which have been added to provide ajax capabilities.
+
+Similar to the functioning of [ActionLink|http://tapestry.apache.org/tapestry5/tapestry-core/ref/org/apache/tapestry5/corelib/components/ActionLink.html] you can add "zone" and "context" parameters. When the value in the text field changes, the zone will be updated using an ajax call to the server.
+
+A simple example is included below. This will do some transformation on the text (on the server side) which is displayed in an ajax call.
+
+{code}
+ <t:block t:id="tf2Block">${tf2Value}</t:block>
+ <span t:type="equanda/TextField" t:id="TextField2" value="tf2Value" zone="tf2zone" context="literal: --- "/>
+ <t:zone t:id="tf2zone"/>
+{code}
+
+{code}
+ @Inject
+ @Property
+ private Block tf2Block;
+
+ @Property
+ private String tf2Value;
+
+ Block onActionFromTextfield2( String infix, String str )
+ {
+ tf2Value = infix;
+ if ( null != str ) tf2Value = str.toLowerCase() + infix + str.toUpperCase();
+ return tf2Block;
+ }
+{code}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <tri...@us...> - 2008-12-29 14:51:06
|
Revision: 937
http://equanda.svn.sourceforge.net/equanda/?rev=937&view=rev
Author: triathlon98
Date: 2008-12-29 14:50:55 +0000 (Mon, 29 Dec 2008)
Log Message:
-----------
EQ-303 showcase new ajax enabled TextField
Modified Paths:
--------------
t5-equanda-example/src/main/resources/org/equanda/example/t5/components/Layout.tml
t5-equanda-example/src/main/webapp/css/style.css
Modified: t5-equanda-example/src/main/resources/org/equanda/example/t5/components/Layout.tml
===================================================================
--- t5-equanda-example/src/main/resources/org/equanda/example/t5/components/Layout.tml 2008-12-29 12:32:07 UTC (rev 936)
+++ t5-equanda-example/src/main/resources/org/equanda/example/t5/components/Layout.tml 2008-12-29 14:50:55 UTC (rev 937)
@@ -47,10 +47,9 @@
</t:parameter>
</span>
</div>
-<div id="layout-right">
- <div id="layout-context"><t:delegate to="context"/></div>
+<div id="layout-context"><t:delegate to="context"/></div>
- <div id="layout-info">
+<div id="layout-info">
<script type="text/javascript"><!--
google_ad_client = "pub-3075143938601956";
google_ad_slot = "9592078419";
@@ -60,13 +59,10 @@
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
- <div>
- <div id="layout-main">
- <t:body/>
- </div>
- </div>
- </div>
</div>
+<div id="layout-main">
+ <t:body/>
+</div>
<script src="http://www.google-analytics.com/urchin.js" type="text/javascript">
</script>
<script type="text/javascript">
Modified: t5-equanda-example/src/main/webapp/css/style.css
===================================================================
--- t5-equanda-example/src/main/webapp/css/style.css 2008-12-29 12:32:07 UTC (rev 936)
+++ t5-equanda-example/src/main/webapp/css/style.css 2008-12-29 14:50:55 UTC (rev 937)
@@ -71,11 +71,11 @@
font-size: 13px;
}
-#layout-left { float:left; width:200px; height:100%; }
-#layout-right { position:static; width:100%; height:100%; left:200px; right:auto; top:0; bottom: 0; }
-#layout-context { position:static; width:100%; height:auto; background-color: lightgray; text-align:center; }
-#layout-info { position:static; width:100%; height:220px; } /* height should be corrected by script */
-#layout-main { position:static; overflow:auto; overflow-y:scroll; background-color:white; padding: 5px; }
+#layout-left { position: absolute; top: 0; left: 0; width: 200px; bottom:0; }
+#layout-right { position: absolute; left: 200px; right: 0; top: 0; bottom: 0; }
+#layout-context { position: absolute; left: 200px; right: 0; top: 0; bottom: 16px; background-color: lightgray; text-align:center; }
+#layout-info { position: absolute; left: 200px; right: 0; top: 16px; height: 90px; background-color: white; }
+#layout-main { position: absolute; left: 200px; right: 0; top: 106px; bottom: 0; overflow: auto; overflow-y: scroll; background-color: white; padding: 5px; }
iframe { display:block; clear:none; overflow:hidden; }
.submit {
@@ -138,3 +138,18 @@
.eqTravFw, .eqTravBw {
display: none;
}
+
+/* fix for "fixed" positioning in IE 6+ */
+
+@media screen
+{
+ * html
+ {
+ overflow-y: hidden;
+ }
+ * html body
+ {
+ height: 100%;
+ overflow: auto;
+ }
+}
\ No newline at end of file
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <tri...@us...> - 2008-12-29 12:32:41
|
Revision: 936
http://equanda.svn.sourceforge.net/equanda/?rev=936&view=rev
Author: triathlon98
Date: 2008-12-29 12:32:07 +0000 (Mon, 29 Dec 2008)
Log Message:
-----------
various script fixes
Modified Paths:
--------------
trunk/equanda-tapestry5/src/main/resources/org/equanda/tapestry5/resources/authandconfig.js
trunk/equanda-tapestry5/src/main/resources/org/equanda/tapestry5/resources/equanda.js
trunk/equanda-tapestry5/src/main/resources/org/equanda/tapestry5/resources/formtraversal.js
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-12-29 12:30:56 UTC (rev 935)
+++ trunk/equanda-tapestry5/src/main/resources/org/equanda/tapestry5/resources/authandconfig.js 2008-12-29 12:32:07 UTC (rev 936)
@@ -5,26 +5,26 @@
*/
function eqEnableBoxes( readCheck, check1, check2 )
{
- if( readCheck.checked == false && check1.checked == true )
+ if( !readCheck.checked && check1.checked )
readCheck.click();
- if( check2.checked == true && check1.checked == false )
+ if( check2.checked && !check1.checked )
{
- if( readCheck.checked == false )
+ if( !readCheck.checked )
{
readCheck.click();
}
check1.click();
- if( check2.checked == false )
+ if( !check2.checked )
{
// may be reset by on of the clickers
check2.click();
}
}
- if( readCheck.checked == false && check1.checked == false && check2.checked == true)
+ if( !readCheck.checked && !check1.checked && check2.checked )
{
readCheck.click();
check1.click();
@@ -36,7 +36,7 @@
*/
function eqDisableBoxes( readCheck, writeCheck, listCheck, summaryCheck, printCheck )
{
- if( readCheck.checked == false )
+ if( !readCheck.checked )
{
writeCheck.checked = false;
listCheck.checked = false;
@@ -49,19 +49,19 @@
/**
* 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.
+ * @param readBox The read checkbox object (this)
+ * @param writeBoxName The name of the write box to be disabled
+ * @param deleteBoxName The name of the delete box to be disabled
+ * @param 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 )
+ if( !readBox.checked )
{
var writeInput = $$( "input#" + writeBoxName );
if( writeInput.length != 0 )
{
- if( writeInput[ 0 ].checked == true )
+ if( writeInput[ 0 ].checked )
{
writeInput[ 0 ].click();
}
@@ -70,7 +70,7 @@
var deleteInput = $$( "input#" + deleteBoxName );
if( deleteInput.length != 0 )
{
- if( deleteInput[ 0 ].checked == true )
+ if( deleteInput[ 0 ].checked )
{
deleteInput[ 0 ].click();
}
@@ -81,7 +81,7 @@
{
var allLinks = $$( 'tr#' + trName + ' a' );
- if( readBox.checked == true )
+ if( readBox.checked )
allLinks[ 0 ].show();
else
allLinks[ 0 ].hide();
@@ -93,9 +93,9 @@
*/
function eqHandlePageBox( pageReadBox, fieldSetId, inputId, pageWriteCheckStr, pageListCheck, pageSummaryCheck, pagePrintCheck )
{
- if( pageReadBox.checked == false )
+ if( !pageReadBox.checked )
{
- if( anyFieldsChecked( fieldSetId, inputId ) && allFieldsChecked( fieldSetId, inputId ) == false )
+ if( anyFieldsChecked( fieldSetId, inputId ) && !allFieldsChecked( fieldSetId, inputId ) )
{
// if pageCheck=true and is clicked again (thus firing this event),
// it enables all field boxes, and stay enabled.
@@ -119,9 +119,9 @@
pageSummaryCheck.checked = false;
pagePrintCheck.checked = false;
}
- else if( pageReadBox.checked == true )
+ else if( pageReadBox.checked )
{
- if( anyFieldsChecked( fieldSetId, inputId ) == false )
+ if( !anyFieldsChecked( fieldSetId, inputId ) )
{
// no boxes checked at all - switch them all on
setFieldChecks( true, fieldSetId, inputId );
@@ -134,11 +134,11 @@
*/
function eqHandleFieldReadBox( pageReadCheck, fieldSetId, inputId, fieldReadCheck, fieldWriteCheckStr, fieldListCheck, fieldSummaryCheck, fieldPrintCheck )
{
- if( pageReadCheck.checked == false && fieldReadCheck.checked == true)
+ if( !pageReadCheck.checked && fieldReadCheck.checked )
{
pageReadCheck.click();
}
- else if( fieldReadCheck.checked == false )
+ else if( !fieldReadCheck.checked )
{
var fieldWriteCheck = $$( 'fieldSet#' + fieldSetId + " input#" + fieldWriteCheckStr );
if( fieldWriteCheck.length != 0 )
@@ -150,10 +150,10 @@
fieldSummaryCheck.checked = false;
fieldPrintCheck.checked = false;
- if( anyFieldsChecked( fieldSetId, inputId ) == false )
+ if( !anyFieldsChecked( fieldSetId, inputId ) )
{
// all fields are off
- if( pageReadCheck.checked == true )
+ if( pageReadCheck.checked )
{
pageReadCheck.click();
}
@@ -167,21 +167,21 @@
function eqHandleFieldBox( pageCheck, fieldReadCheck, fieldCheck, fieldSetId, inputId )
{
// list implies read
- if( fieldReadCheck.checked == false && fieldCheck.checked == true )
+ if( !fieldReadCheck.checked && fieldCheck.checked )
{
fieldReadCheck.click();
}
// if any fields are checked, the page needs to be checked
- if( fieldCheck.checked == true && pageCheck.checked == false )
+ if( fieldCheck.checked && !pageCheck.checked )
{
pageCheck.click();
}
// if all field checks are unchecked, then the page check should be off too.
- if( fieldCheck.checked == false )
+ if( !fieldCheck.checked )
{
- if( anyFieldsChecked( fieldSetId, inputId ) == false && pageCheck.checked == true)
+ if( !anyFieldsChecked( fieldSetId, inputId ) && pageCheck.checked )
{
pageCheck.click();
}
@@ -191,19 +191,19 @@
/**
* 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
+ * @param readBox The read checkbox object
+ * @param writeBox The read checkbox object (this)
+ * @param deleteBox The read checkbox object
*/
function eqHandleWriteBox( readBox, writeBox, deleteBox )
{
- if( writeBox.checked == true )
+ if( writeBox.checked )
{
- if( readBox.checked == false )
+ if( !readBox.checked )
readBox.click();
}
- if( writeBox.checked == false )
+ if( !writeBox.checked )
{
deleteBox.checked = false ;
}
@@ -211,12 +211,16 @@
/**
* Ensure other components are enabled/disabled when delete is checked or unchecked
+ *
+ * @param readBox The read checkbox object
+ * @param writeBox The read checkbox object (this)
+ * @param deleteBox The read checkbox object
*/
function eqHandleDeleteBox( readBox, writeBox, deleteBox )
{
- if( deleteBox.checked == true )
+ if( deleteBox.checked )
{
- if( writeBox.checked == false )
+ if( !writeBox.checked )
writeBox.click();
}
}
@@ -224,8 +228,8 @@
/**
* 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
+ * @param fieldSetId The id attribute of the field set
+ * @param inputId The name of the checkboxes that are to be inspected
* @return True if there are unchecked boxes
* False if all boxes are checked
*/
@@ -246,8 +250,8 @@
/**
* 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
+ * @param fieldSetId The id attribute of the field set
+ * @param inputId The name of the checkboxes that are to be inspected
* @return boolean True if there all boxes are checked
*/
@@ -258,7 +262,7 @@
{
if( allInputs[ j ].name.match( inputId ) )
{
- if( allInputs[ j ].checked == false)
+ if( !allInputs[ j ].checked )
return false;
}
}
@@ -268,9 +272,9 @@
/**
* 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.
+ * @param value The value to set the boxes to
+ * @param fieldSetId The id attribute of the field set
+ * @param inputId The name of the checkboxes that need to be enabled.
*/
function setFieldChecks( value, fieldSetId, inputId )
{
Modified: trunk/equanda-tapestry5/src/main/resources/org/equanda/tapestry5/resources/equanda.js
===================================================================
--- trunk/equanda-tapestry5/src/main/resources/org/equanda/tapestry5/resources/equanda.js 2008-12-29 12:30:56 UTC (rev 935)
+++ trunk/equanda-tapestry5/src/main/resources/org/equanda/tapestry5/resources/equanda.js 2008-12-29 12:32:07 UTC (rev 936)
@@ -6,7 +6,7 @@
String.prototype.trim = function()
{
return this.replace( /^\s+|\s+$/g, "" );
-}
+};
/**
* get window height (browser independent)
@@ -68,7 +68,7 @@
function eqCC( element, caseConversion )
{
if( element.value.length == 0 )
- return;
+ return "";
var start = element.selectionStart;
var end = element.selectionEnd;
if( caseConversion == 2 )
Modified: trunk/equanda-tapestry5/src/main/resources/org/equanda/tapestry5/resources/formtraversal.js
===================================================================
--- trunk/equanda-tapestry5/src/main/resources/org/equanda/tapestry5/resources/formtraversal.js 2008-12-29 12:30:56 UTC (rev 935)
+++ trunk/equanda-tapestry5/src/main/resources/org/equanda/tapestry5/resources/formtraversal.js 2008-12-29 12:32:07 UTC (rev 936)
@@ -89,8 +89,8 @@
{
input = eqFtTraverse( input, direction );
if ( input.hasClassName( EQUANDA_FT_SKIP ) ) continue;
- if ( direction > 0 && input.hasClassName( EQUANDA_FT_INVOKELINK_FORWARD ) ) equandaFtClick( input );
- if ( direction < 0 && input.hasClassName( EQUANDA_FT_INVOKELINK_BACKWARD ) ) equandaFtClick( input );
+ if ( direction > 0 && input.hasClassName( EQUANDA_FT_INVOKELINK_FORWARD ) ) eqFtClick( input );
+ if ( direction < 0 && input.hasClassName( EQUANDA_FT_INVOKELINK_BACKWARD ) ) eqFtClick( input );
if ( input.hasClassName( EQUANDA_FT_MOVELINK ) )
{
var attr = input.getAttribute( 'href' );
@@ -118,8 +118,8 @@
var depth = EQUANDA_FT_VISCHECK;
while ( depth > 0 && element != null && element.tagName != "BODY" )
{
- if ( element.getStyle('display')=='none' || element.hasClassName( 'nodisplay' ) ) return false;
- element = element.up();
+ if ( element.getStyle('display')=='none' || element.hasClassName( 'nodisplay' ) ) return false;
+ element = element.up();
}
return true;
}
@@ -154,7 +154,7 @@
next = element.previous();
if ( next ) next = eqFtLastChild( next );
if ( !next ) next = element.up();
- if ( next.tagName == "BODY" ) next = eqFtLastChild( next );
+ if ( next.tagName == "BODY" ) next = eqFtLastChild( next );
}
return next;
}
@@ -189,4 +189,4 @@
}
}
}
-}
\ No newline at end of file
+}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <tri...@us...> - 2008-12-29 12:31:20
|
Revision: 935
http://equanda.svn.sourceforge.net/equanda/?rev=935&view=rev
Author: triathlon98
Date: 2008-12-29 12:30:56 +0000 (Mon, 29 Dec 2008)
Log Message:
-----------
EQ-303 showcase new ajax enabled TextField
Modified Paths:
--------------
t5-equanda-example/src/main/java/org/equanda/example/t5/pages/Start.java
t5-equanda-example/src/main/resources/org/equanda/example/t5/pages/Start.tml
Modified: t5-equanda-example/src/main/java/org/equanda/example/t5/pages/Start.java
===================================================================
--- t5-equanda-example/src/main/java/org/equanda/example/t5/pages/Start.java 2008-12-28 12:40:00 UTC (rev 934)
+++ t5-equanda-example/src/main/java/org/equanda/example/t5/pages/Start.java 2008-12-29 12:30:56 UTC (rev 935)
@@ -25,7 +25,9 @@
package org.equanda.example.t5.pages;
import org.apache.tapestry5.Asset;
+import org.apache.tapestry5.Block;
import org.apache.tapestry5.annotations.Path;
+import org.apache.tapestry5.annotations.Property;
import org.apache.tapestry5.ioc.annotations.Inject;
import org.equanda.example.t5.data.DemoTree;
import org.equanda.tapestry5.data.Tree;
@@ -131,4 +133,31 @@
{
this.current = current;
}
+
+ @Inject
+ @Property
+ private Block tf1Block;
+
+ @Property
+ private String tf1Value;
+
+ Block onActionFromTextfield1( String str )
+ {
+ tf1Value = str;
+ return tf1Block;
+ }
+
+ @Inject
+ @Property
+ private Block tf2Block;
+
+ @Property
+ private String tf2Value;
+
+ Block onActionFromTextfield2( String infix, String str )
+ {
+ tf2Value = infix;
+ if ( null != str ) tf2Value = str.toLowerCase() + infix +str.toUpperCase();
+ return tf2Block;
+ }
}
\ No newline at end of file
Modified: t5-equanda-example/src/main/resources/org/equanda/example/t5/pages/Start.tml
===================================================================
--- t5-equanda-example/src/main/resources/org/equanda/example/t5/pages/Start.tml 2008-12-28 12:40:00 UTC (rev 934)
+++ t5-equanda-example/src/main/resources/org/equanda/example/t5/pages/Start.tml 2008-12-29 12:30:56 UTC (rev 935)
@@ -15,6 +15,8 @@
</p>
<p>This project can be found in SVN at <a href="https://equanda.svn.sourceforge.net/svnroot/equanda/t5-equanda-example">https://equanda.svn.sourceforge.net/svnroot/equanda/t5-equanda-example</a></p>
+ <t:form autofocus="false">
+
<span t:type="equanda/Tabs" t:id="maintabs">
<t:parameter name="title1">Accordion</t:parameter>
<t:parameter name="content1">
@@ -104,13 +106,30 @@
fully handled client side.</p>
<br/>
- <t:form autofocus="false">
<ul>
<div t:type="equanda/JSPagedLoop" source="list" value="current" addRowLinkTitle="Add" >
<li>${current}</li>
</div>
</ul>
- </t:form>
</t:parameter>
+ <t:parameter name="title6">TextField</t:parameter>
+ <t:parameter name="content6">
+ <p>The TextField component is a variant of the tapestry builtin textfield with support of zones.
+ When the value changes, a zone may be updated based on the changed value.</p>
+ <p>Any contents typed in the first field is displayed again behind it.</p>
+ <p>The second field displays the lower and upper case contents seperated by an infix.</p>
+
+ <br/>
+ <t:block t:id="tf1Block">${tf1Value}</t:block>
+ <span t:type="equanda/TextField" t:id="TextField1" value="tf1Value" zone="tf1zone"/>
+ <t:zone t:id="tf1zone"/>
+ <br/>
+ <t:block t:id="tf2Block">${tf2Value}</t:block>
+ <span t:type="equanda/TextField" t:id="TextField2" value="tf2Value" zone="tf2zone" context="literal: --- "/>
+ <t:zone t:id="tf2zone"/>
+ </t:parameter>
</span>
+
+ </t:form>
+
</t:layout>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|