From: <tri...@us...> - 2009-09-09 16:38:31
|
Revision: 1147 http://equanda.svn.sourceforge.net/equanda/?rev=1147&view=rev Author: triathlon98 Date: 2009-09-09 16:38:22 +0000 (Wed, 09 Sep 2009) Log Message: ----------- update to latest tapestry, reuse more code/template Modified Paths: -------------- trunk/equanda-generate/src/main/velocity/t5gui/base/EditPageBase.java.vm trunk/equanda-generate/src/main/velocity/t5gui/components/InlineLinkList.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/equanda-generate/src/main/velocity/t5gui/summary-tml/linklist.tml.vm trunk/equanda-generate/src/main/velocity/t5gui/view-tml/linklist.tml.vm trunk/pom.xml Modified: trunk/equanda-generate/src/main/velocity/t5gui/base/EditPageBase.java.vm =================================================================== --- trunk/equanda-generate/src/main/velocity/t5gui/base/EditPageBase.java.vm 2009-08-17 20:12:54 UTC (rev 1146) +++ trunk/equanda-generate/src/main/velocity/t5gui/base/EditPageBase.java.vm 2009-09-09 16:38:22 UTC (rev 1147) @@ -275,9 +275,12 @@ */ public boolean isExistingObject() { - return ( getObject() != null && getObject().getId() != null ); + return ( null != getObject() && null != getObject().getId() ); } + public boolean isEditMode() { return null == getObject || null == getObject().getId(); } + + void beginRender() { if ( null == keepException) Modified: trunk/equanda-generate/src/main/velocity/t5gui/components/InlineLinkList.tml.vm =================================================================== --- trunk/equanda-generate/src/main/velocity/t5gui/components/InlineLinkList.tml.vm 2009-08-17 20:12:54 UTC (rev 1146) +++ trunk/equanda-generate/src/main/velocity/t5gui/components/InlineLinkList.tml.vm 2009-09-09 16:38:22 UTC (rev 1147) @@ -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" volatile="true" source="value" value="current" index="index" rowsPerPage="7" additionalRowCount="prop:additionalRowCount" addRowLinkTitle="${dollar}{equanda-message:Add}" objectCreatorDelegate="prop:this"> + <div class="eqInlR" t:id="inlPagedLoop" t:type="equanda/JSPagedLoop" source="value" value="current" 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:if test="isCanAdd()"> Modified: trunk/equanda-generate/src/main/velocity/t5gui/pages/Edit.java.vm =================================================================== --- trunk/equanda-generate/src/main/velocity/t5gui/pages/Edit.java.vm 2009-08-17 20:12:54 UTC (rev 1146) +++ trunk/equanda-generate/src/main/velocity/t5gui/pages/Edit.java.vm 2009-09-09 16:38:22 UTC (rev 1147) @@ -72,10 +72,6 @@ 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 2009-08-17 20:12:54 UTC (rev 1146) +++ trunk/equanda-generate/src/main/velocity/t5gui/pages/Edit.tml.vm 2009-09-09 16:38:22 UTC (rev 1147) @@ -54,7 +54,7 @@ #end <t:if test="equanda-readable:table.${table.Name}"> - <input t:type="${table.VarName}/Edit" t:value="object" editmode="isEditMode()" canSwitch="isExistingRecord()" showmetadata="isExistingRecord()"/> + <input t:type="${table.VarName}/Edit" t:value="object" editmode="isEditMode()" canSwitch="isExistingObject()" showmetadata="isExistingObject()"/> </t:if> </t:editlayout> 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 2009-08-17 20:12:54 UTC (rev 1146) +++ trunk/equanda-generate/src/main/velocity/t5gui/summary-tml/linklist.tml.vm 2009-09-09 16:38:22 UTC (rev 1147) @@ -6,7 +6,7 @@ <input t:type="TextField" t:value="literal:?" length="1" disabled="true" style="display:none"/> <div class="eqLL"> - <div class="eqLLR" t:type="equanda/JSPagedLoop" volatile="true" source="value.${field.VarName}" value="currentMultipleRow" index="currentMultipleIndex" rowsPerPage="7"> + <div class="eqLLR" t:type="equanda/JSPagedLoop" source="value.${field.VarName}" value="currentMultipleRow" index="currentMultipleIndex" rowsPerPage="7"> <t:parameter name="empty"></t:parameter> <div class="eqLLRD"><t:${field.LinkTable.VarName}.SummaryEditLink object="currentMultipleRow"/></div> </div> 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-08-17 20:12:54 UTC (rev 1146) +++ trunk/equanda-generate/src/main/velocity/t5gui/view-tml/linklist.tml.vm 2009-09-09 16:38:22 UTC (rev 1147) @@ -6,7 +6,7 @@ <input t:type="TextField" t:value="literal:?" length="1" disabled="true" style="display:none"/> <div class="eqLL"> - <div class="eqLLR" t:type="equanda/JSPagedLoop" volatile="true" source="value.${field.VarName}" value="currentMultipleRow" index="currentMultipleIndex" rowsPerPage="7"> + <div class="eqLLR" t:type="equanda/JSPagedLoop" source="value.${field.VarName}" value="currentMultipleRow" index="currentMultipleIndex" rowsPerPage="7"> <t:parameter name="empty"></t:parameter> <div class="eqLLRD"><t:${field.LinkTable.VarName}.SummaryEditLink object="currentMultipleRow"/></div> </div> Modified: trunk/pom.xml =================================================================== --- trunk/pom.xml 2009-08-17 20:12:54 UTC (rev 1146) +++ trunk/pom.xml 2009-09-09 16:38:22 UTC (rev 1147) @@ -616,7 +616,7 @@ </profiles> <properties> - <tapestry-release-version>5.1.0.3</tapestry-release-version> + <tapestry-release-version>5.1.0.5</tapestry-release-version> <chenillekit-version>1.0.0</chenillekit-version> <staticwiki-release-version>0.9.1-SNAPSHOT</staticwiki-release-version> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |