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-02-07 16:57:45
|
Revision: 1009
http://equanda.svn.sourceforge.net/equanda/?rev=1009&view=rev
Author: triathlon98
Date: 2009-02-07 16:57:35 +0000 (Sat, 07 Feb 2009)
Log Message:
-----------
EQ-297 base demo of navigation support
Modified Paths:
--------------
t5-equanda-example/src/main/java/org/equanda/example/t5/pages/PageA.java
t5-equanda-example/src/main/java/org/equanda/example/t5/pages/PageB.java
t5-equanda-example/src/main/java/org/equanda/example/t5/pages/PageC.java
t5-equanda-example/src/main/resources/org/equanda/example/t5/components/Layout.tml
t5-equanda-example/src/main/resources/org/equanda/example/t5/pages/PageA.tml
t5-equanda-example/src/main/resources/org/equanda/example/t5/pages/PageB.tml
t5-equanda-example/src/main/resources/org/equanda/example/t5/pages/PageC.tml
Added Paths:
-----------
t5-equanda-example/src/main/java/org/equanda/example/t5/components/Breadcrumbs.java
t5-equanda-example/src/main/java/org/equanda/example/t5/data/MsgGenerator.java
t5-equanda-example/src/main/resources/org/equanda/example/t5/components/Breadcrumbs.tml
Added: t5-equanda-example/src/main/java/org/equanda/example/t5/components/Breadcrumbs.java
===================================================================
--- t5-equanda-example/src/main/java/org/equanda/example/t5/components/Breadcrumbs.java (rev 0)
+++ t5-equanda-example/src/main/java/org/equanda/example/t5/components/Breadcrumbs.java 2009-02-07 16:57:35 UTC (rev 1009)
@@ -0,0 +1,66 @@
+/**
+ * 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.example.t5.components;
+
+import org.equanda.t5nav.services.NavigationTarget;
+import org.equanda.t5nav.services.NavigationContext;
+import org.apache.tapestry5.ioc.annotations.Inject;
+import org.apache.tapestry5.services.ApplicationStateManager;
+import org.apache.tapestry5.annotations.Property;
+
+/**
+ * Component which displays the breadcrumbs
+ *
+ * @author <a href="mailto:jo...@pr...">Joachim Van der Auwera</a>
+ */
+public class Breadcrumbs
+{
+ @Inject
+ private ApplicationStateManager asoManager;
+
+ @Property
+ private NavigationTarget current;
+
+ @Property
+ private int index;
+
+ public NavigationTarget[] getBreadcrumbs()
+ {
+ System.out.println( "getBreadcrumbs" );
+ if ( !asoManager.exists( NavigationContext.class ) ) return null;
+ NavigationContext currNav = asoManager.get( NavigationContext.class );
+ System.out.println( "getBreadcrumbs " + currNav.getRecentReturnTargets() );
+ return currNav.getRecentReturnTargets();
+ }
+
+ public Object onActionFromBreadcrumb( int index )
+ {
+ NavigationContext currNav = asoManager.get( NavigationContext.class );
+ System.out.println( "onActionFromBreadcrumb "+index+" "+currNav );
+ if ( null == currNav ) return null;
+ return currNav.getRecentReturnTargets()[index].getLink();
+ }
+
+}
Added: t5-equanda-example/src/main/java/org/equanda/example/t5/data/MsgGenerator.java
===================================================================
--- t5-equanda-example/src/main/java/org/equanda/example/t5/data/MsgGenerator.java (rev 0)
+++ t5-equanda-example/src/main/java/org/equanda/example/t5/data/MsgGenerator.java 2009-02-07 16:57:35 UTC (rev 1009)
@@ -0,0 +1,53 @@
+/**
+ * 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.example.t5.data;
+
+import org.equanda.t5nav.services.NavigationContext;
+import org.equanda.t5nav.internal.NavigationContextImpl;
+
+import java.text.SimpleDateFormat;
+import java.util.Date;
+
+/**
+ * Generator of simple messages to "prove" navigation stuff.
+ *
+ * @author <a href="mailto:jo...@pr...">Joachim Van der Auwera</a>
+ */
+public class MsgGenerator
+{
+ private static long COUNTER = 1;
+ private static SimpleDateFormat TIME_FORMAT = new SimpleDateFormat( "mm.ss : " );
+
+ public static String get()
+ {
+ return TIME_FORMAT.format( new Date())+getNextValue();
+ }
+
+ private static synchronized String getNextValue()
+ {
+ // just for testing
+ return Long.toString( COUNTER++ );
+ }
+}
Modified: t5-equanda-example/src/main/java/org/equanda/example/t5/pages/PageA.java
===================================================================
--- t5-equanda-example/src/main/java/org/equanda/example/t5/pages/PageA.java 2009-02-07 16:56:00 UTC (rev 1008)
+++ t5-equanda-example/src/main/java/org/equanda/example/t5/pages/PageA.java 2009-02-07 16:57:35 UTC (rev 1009)
@@ -27,14 +27,10 @@
import org.apache.tapestry5.ComponentResources;
import org.apache.tapestry5.annotations.InjectPage;
import org.apache.tapestry5.annotations.Persist;
-import org.apache.tapestry5.annotations.Environmental;
-import org.apache.tapestry5.annotations.Property;
import org.apache.tapestry5.ioc.annotations.Inject;
+import org.equanda.example.t5.data.MsgGenerator;
import org.equanda.t5nav.services.NavigationManager;
-import org.equanda.t5nav.services.NavigationContext;
-import java.util.Date;
-
/**
* Navigations demonstration page
*
@@ -42,11 +38,6 @@
*/
public class PageA
{
- @Persist
- private Object returnPage;
-
- private Object nextPage; // page to move to after submit
-
@Inject
private ComponentResources resources;
@@ -56,20 +47,12 @@
@Inject
private NavigationManager navigationManager;
- @Environmental
- private NavigationContext navigation;
-
@InjectPage
private PageB pageB;
@InjectPage
private PageC pageC;
- public void setReturnPage( Object returnPage )
- {
- this.returnPage = returnPage;
- }
-
public String getPersistedValue()
{
return persistedValue;
@@ -80,47 +63,26 @@
this.persistedValue = persistedValue;
}
- final public void onSelectedFromCancel()
+ Object onActionFromPageBNavigation()
{
- nextPage = returnPage;
- if ( null == returnPage ) nextPage = "Start";
- }
-
- final public Object onSubmit()
- {
- if ( null != nextPage ) resources.discardPersistentFieldChanges();
- return nextPage;
- }
-
- Object onActionFromPageBNormal()
- {
- pageB.setReturnPage( resources.createPageLink( resources.getPageName(), false ) );
- pageB.setPersistedValue( "from A, " + new Date().toString() );
+ String msg = "A, " + MsgGenerator.get();
+ navigationManager.beginNavigation( resources.createPageLink( resources.getPageName(), false ),
+ msg + " persisted=" + getPersistedValue() );
+ pageB.setPersistedValue( "from " + msg );
return pageB;
}
- Object onActionFromPageBNavigation()
+ Object onActionFromPageCNavigation()
{
- navigationManager.beginNavigation();
- return onActionFromPageBNormal();
- }
-
- Object onActionFromPageCNormal()
- {
- pageC.setReturnPage( resources.createPageLink( resources.getPageName(), false ) );
- pageC.setPersistedValue( "from A, " + new Date().toString() );
+ String msg = "A, " + MsgGenerator.get();
+ navigationManager.beginNavigation( resources.createPageLink( resources.getPageName(), false ),
+ msg + " persisted=" + getPersistedValue() );
+ pageC.setPersistedValue( "from " + msg );
return pageC;
}
- Object onActionFromPageCNavigation()
- {
- navigationManager.beginNavigation();
- return onActionFromPageCNormal();
- }
-
Object onActionFromReturn()
{
- navigationManager.endNavigation( null );
- return returnPage;
+ return navigationManager.endNavigation( null );
}
}
Modified: t5-equanda-example/src/main/java/org/equanda/example/t5/pages/PageB.java
===================================================================
--- t5-equanda-example/src/main/java/org/equanda/example/t5/pages/PageB.java 2009-02-07 16:56:00 UTC (rev 1008)
+++ t5-equanda-example/src/main/java/org/equanda/example/t5/pages/PageB.java 2009-02-07 16:57:35 UTC (rev 1009)
@@ -31,6 +31,7 @@
import org.apache.tapestry5.ComponentResources;
import org.equanda.t5nav.services.NavigationContext;
import org.equanda.t5nav.services.NavigationManager;
+import org.equanda.example.t5.data.MsgGenerator;
import java.util.Date;
@@ -41,11 +42,6 @@
*/
public class PageB
{
- @Persist
- private Object returnPage;
-
- private Object nextPage; // page to move to after submit
-
@Inject
private ComponentResources resources;
@@ -64,11 +60,6 @@
@InjectPage
private PageC pageC;
- public void setReturnPage( Object returnPage )
- {
- this.returnPage = returnPage;
- }
-
public String getPersistedValue()
{
return persistedValue;
@@ -79,47 +70,26 @@
this.persistedValue = persistedValue;
}
- final public void onSelectedFromCancel()
+ Object onActionFromPageANavigation()
{
- nextPage = returnPage;
- if ( null == returnPage ) nextPage = "Start";
- }
-
- final public Object onSubmit()
- {
- if ( null != nextPage ) resources.discardPersistentFieldChanges();
- return nextPage;
- }
-
- Object onActionFromPageANormal()
- {
- pageA.setReturnPage( resources.createPageLink( resources.getPageName(), false ) );
- pageA.setPersistedValue( "from B, " + new Date().toString() );
+ String msg ="B, " + MsgGenerator.get();
+ navigationManager.beginNavigation( resources.createPageLink( resources.getPageName(), false ),
+ msg + " persisted=" + getPersistedValue() );
+ pageA.setPersistedValue( "from "+msg );
return pageA;
}
- Object onActionFromPageANavigation()
+ Object onActionFromPageCNavigation()
{
- navigationManager.beginNavigation();
- return onActionFromPageANormal();
- }
-
- Object onActionFromPageCNormal()
- {
- pageC.setReturnPage( resources.createPageLink( resources.getPageName(), false ) );
- pageC.setPersistedValue( "from B, " + new Date().toString() );
+ String msg ="B, " + MsgGenerator.get();
+ navigationManager.beginNavigation( resources.createPageLink( resources.getPageName(), false ),
+ msg + " persisted=" + getPersistedValue() );
+ pageC.setPersistedValue( "from "+msg );
return pageC;
}
- Object onActionFromPageCNavigation()
- {
- navigationManager.beginNavigation();
- return onActionFromPageCNormal();
- }
-
Object onActionFromReturn()
{
- navigationManager.endNavigation( null );
- return returnPage;
+ return navigationManager.endNavigation( null );
}
}
Modified: t5-equanda-example/src/main/java/org/equanda/example/t5/pages/PageC.java
===================================================================
--- t5-equanda-example/src/main/java/org/equanda/example/t5/pages/PageC.java 2009-02-07 16:56:00 UTC (rev 1008)
+++ t5-equanda-example/src/main/java/org/equanda/example/t5/pages/PageC.java 2009-02-07 16:57:35 UTC (rev 1009)
@@ -31,6 +31,7 @@
import org.apache.tapestry5.ComponentResources;
import org.equanda.t5nav.services.NavigationContext;
import org.equanda.t5nav.services.NavigationManager;
+import org.equanda.example.t5.data.MsgGenerator;
import java.util.Date;
@@ -41,11 +42,6 @@
*/
public class PageC
{
- @Persist
- private Object returnPage;
-
- private Object nextPage; // page to move to after submit
-
@Inject
private ComponentResources resources;
@@ -64,11 +60,6 @@
@InjectPage
private PageB pageB;
- public void setReturnPage( Object returnPage )
- {
- this.returnPage = returnPage;
- }
-
public String getPersistedValue()
{
return persistedValue;
@@ -79,47 +70,26 @@
this.persistedValue = persistedValue;
}
- final public void onSelectedFromCancel()
+ Object onActionFromPageANavigation()
{
- nextPage = returnPage;
- if ( null == returnPage ) nextPage = "Start";
- }
-
- final public Object onSubmit()
- {
- if ( null != nextPage ) resources.discardPersistentFieldChanges();
- return nextPage;
- }
-
- Object onActionFromPageANormal()
- {
- pageA.setReturnPage( resources.createPageLink( resources.getPageName(), false ) );
- pageA.setPersistedValue( "from C, " + new Date().toString() );
+ String msg ="C, " + MsgGenerator.get();
+ navigationManager.beginNavigation( resources.createPageLink( resources.getPageName(), false ),
+ msg + " persisted=" + getPersistedValue() );
+ pageA.setPersistedValue( "from "+msg );
return pageA;
}
- Object onActionFromPageANavigation()
+ Object onActionFromPageBNavigation()
{
- navigationManager.beginNavigation();
- return onActionFromPageANormal();
- }
-
- Object onActionFromPageBNormal()
- {
- pageB.setReturnPage( resources.createPageLink( resources.getPageName(), false ) );
- pageB.setPersistedValue( "from C, " + new Date().toString() );
+ String msg ="C, " + MsgGenerator.get();
+ navigationManager.beginNavigation( resources.createPageLink( resources.getPageName(), false ),
+ msg + " persisted=" + getPersistedValue() );
+ pageB.setPersistedValue( "from "+msg );
return pageB;
}
- Object onActionFromPageBNavigation()
- {
- navigationManager.beginNavigation();
- return onActionFromPageBNormal();
- }
-
Object onActionFromReturn()
{
- navigationManager.endNavigation( null );
- return returnPage;
+ return navigationManager.endNavigation( null );
}
}
Added: t5-equanda-example/src/main/resources/org/equanda/example/t5/components/Breadcrumbs.tml
===================================================================
--- t5-equanda-example/src/main/resources/org/equanda/example/t5/components/Breadcrumbs.tml (rev 0)
+++ t5-equanda-example/src/main/resources/org/equanda/example/t5/components/Breadcrumbs.tml 2009-02-07 16:57:35 UTC (rev 1009)
@@ -0,0 +1,10 @@
+<div xmlns:t="http://tapestry.apache.org/schema/tapestry_5_0_0.xsd">
+ <fieldset>
+ <legend>breadcrumbs</legend>
+ <ul>
+ <t:loop source="breadcrumbs" value="current" index="index">
+ <li><t:actionlink t:id="breadcrumb" context="index">${current.title}</t:actionlink></li>
+ </t:loop>
+ </ul>
+ </fieldset>
+</div>
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 2009-02-07 16:56:00 UTC (rev 1008)
+++ t5-equanda-example/src/main/resources/org/equanda/example/t5/components/Layout.tml 2009-02-07 16:57:35 UTC (rev 1009)
@@ -13,14 +13,13 @@
<span t:type="equanda/FormTraversal"/>
<div id="layout-left">
<span t:type="equanda/Accordion" t:id="accordion">
- <t:parameter name="title1">Menu First Part</t:parameter>
+ <t:parameter name="title1">Example</t:parameter>
<t:parameter name="content1">
- <p>Sample menu, the links don't do anything though...</p>
+ <p>equanda tapestry5 components</p>
<div>
<ul>
- <li><a href="#nowhere">Do something</a></li>
- <li><a href="#nowhere">Something else</a></li>
- <li><a href="#nowhere">And even more</a></li>
+ <li><t:pagelink page="start">Components demo</t:pagelink></li>
+ <li><t:pagelink page="pagea">navigation demo</t:pagelink></li>
</ul>
</div>
</t:parameter>
@@ -42,7 +41,8 @@
<t:parameter name="title5">Help</t:parameter>
<t:parameter name="content5">
<div>
- <p>This is the <a href="http://equanda.org">equanda</a> <a href="http://equanda.org/equanda-tapesty5/">tapestry5 component</a> example.
+ <p>This is the <a href="http://equanda.org">equanda</a>
+ <a href="http://equanda.org/equanda-tapesty5/">tapestry5 component</a> example.
This part on the left demonstrates how the Accordion component can be used to create a full height accrdion with various information.</p>
<p>On the right part, there is a Tabs component in action. One tab contains another Accordion component, one another tags compoennt. This is done to demonstrate that you can put multiple objects on one page.</p>
</div>
Modified: t5-equanda-example/src/main/resources/org/equanda/example/t5/pages/PageA.tml
===================================================================
--- t5-equanda-example/src/main/resources/org/equanda/example/t5/pages/PageA.tml 2009-02-07 16:56:00 UTC (rev 1008)
+++ t5-equanda-example/src/main/resources/org/equanda/example/t5/pages/PageA.tml 2009-02-07 16:57:35 UTC (rev 1009)
@@ -1,26 +1,21 @@
-<html xmlns:t="http://tapestry.apache.org/schema/tapestry_5_0_0.xsd">
-<head>
- <meta http-equiv="Content-Language" content="en"/>
- <title>conversatons test</title>
-</head>
+<t:layout xmlns:t="http://tapestry.apache.org/schema/tapestry_5_0_0.xsd">
-<body>
-
<h1>Page A</h1>
<p>Persisted value is : <b>${persistedValue}</b></p>
+ <t:breadcrumbs/>
+
<ul>
- <li><t:actionlink t:id="PageBNormal">to Page B (normal)</t:actionlink></li>
- <li><t:actionlink t:id="PageBConversation">to Page B (conversation)</t:actionlink></li>
+ <li><t:pagelink t:page="PageB">to Page B (normal)</t:pagelink></li>
+ <li><t:actionlink t:id="PageBNavigation">to Page B (conversation)</t:actionlink></li>
<li></li>
- <li><t:actionlink t:id="PageCNormal">to Page C (normal)</t:actionlink></li>
- <li><t:actionlink t:id="PageCConversation">to Page C (conversation)</t:actionlink></li>
+ <li><t:pagelink t:page="PageC">to Page C (normal)</t:pagelink></li>
+ <li><t:actionlink t:id="PageCNavigation">to Page C (conversation)</t:actionlink></li>
<li></li>
<li><t:actionlink t:id="return">return to previous</t:actionlink></li>
<li></li>
</ul>
-</body>
-</html>
+</t:layout>
Modified: t5-equanda-example/src/main/resources/org/equanda/example/t5/pages/PageB.tml
===================================================================
--- t5-equanda-example/src/main/resources/org/equanda/example/t5/pages/PageB.tml 2009-02-07 16:56:00 UTC (rev 1008)
+++ t5-equanda-example/src/main/resources/org/equanda/example/t5/pages/PageB.tml 2009-02-07 16:57:35 UTC (rev 1009)
@@ -1,26 +1,21 @@
-<html xmlns:t="http://tapestry.apache.org/schema/tapestry_5_0_0.xsd">
-<head>
- <meta http-equiv="Content-Language" content="en"/>
- <title>conversatons test</title>
-</head>
+<t:layout xmlns:t="http://tapestry.apache.org/schema/tapestry_5_0_0.xsd">
-<body>
-
<h1>Page B</h1>
<p>Persisted value is : <b>${persistedValue}</b></p>
+ <t:breadcrumbs/>
+
<ul>
- <li><t:actionlink t:id="PageANormal">to Page A (normal)</t:actionlink></li>
- <li><t:actionlink t:id="PageAConversation">to Page A (conversation)</t:actionlink></li>
+ <li><t:pagelink t:page="PageA">to Page A (normal)</t:pagelink></li>
+ <li><t:actionlink t:id="PageANavigation">to Page A (conversation)</t:actionlink></li>
<li></li>
- <li><t:actionlink t:id="PageCNormal">to Page C (normal)</t:actionlink></li>
- <li><t:actionlink t:id="PageCConversation">to Page C (conversation)</t:actionlink></li>
+ <li><t:pagelink t:page="PageC">to Page C (normal)</t:pagelink></li>
+ <li><t:actionlink t:id="PageCNavigation">to Page C (conversation)</t:actionlink></li>
<li></li>
<li><t:actionlink t:id="return">return to previous</t:actionlink></li>
<li></li>
</ul>
-</body>
-</html>
+</t:layout>
Modified: t5-equanda-example/src/main/resources/org/equanda/example/t5/pages/PageC.tml
===================================================================
--- t5-equanda-example/src/main/resources/org/equanda/example/t5/pages/PageC.tml 2009-02-07 16:56:00 UTC (rev 1008)
+++ t5-equanda-example/src/main/resources/org/equanda/example/t5/pages/PageC.tml 2009-02-07 16:57:35 UTC (rev 1009)
@@ -1,26 +1,21 @@
-<html xmlns:t="http://tapestry.apache.org/schema/tapestry_5_0_0.xsd">
-<head>
- <meta http-equiv="Content-Language" content="en"/>
- <title>conversatons test</title>
-</head>
+<t:layout xmlns:t="http://tapestry.apache.org/schema/tapestry_5_0_0.xsd">
-<body>
-
<h1>Page C</h1>
<p>Persisted value is : <b>${persistedValue}</b></p>
+ <t:breadcrumbs/>
+
<ul>
- <li><t:actionlink t:id="PageANormal">to Page A (normal)</t:actionlink></li>
- <li><t:actionlink t:id="PageAConversation">to Page A (conversation)</t:actionlink></li>
+ <li><t:pagelink t:page="PageA">to Page A (normal)</t:pagelink></li>
+ <li><t:actionlink t:id="PageANavigation">to Page A (conversation)</t:actionlink></li>
<li></li>
- <li><t:actionlink t:id="PageBNormal">to Page B (normal)</t:actionlink></li>
- <li><t:actionlink t:id="PageBConversation">to Page B (conversation)</t:actionlink></li>
+ <li><t:pagelink t:page="PageB">to Page B (normal)</t:pagelink></li>
+ <li><t:actionlink t:id="PageBNavigation">to Page B (conversation)</t:actionlink></li>
<li></li>
<li><t:actionlink t:id="return">return to previous</t:actionlink></li>
<li></li>
</ul>
-</body>
-</html>
+</t:layout>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <tri...@us...> - 2009-02-07 16:56:03
|
Revision: 1008
http://equanda.svn.sourceforge.net/equanda/?rev=1008&view=rev
Author: triathlon98
Date: 2009-02-07 16:56:00 +0000 (Sat, 07 Feb 2009)
Log Message:
-----------
EQ-297 navigation module, providing mini-conversations and breadcrumbs support
Modified Paths:
--------------
trunk/equanda-t5navigation/src/main/java/org/equanda/t5nav/internal/NavigationContextImpl.java
trunk/equanda-t5navigation/src/main/java/org/equanda/t5nav/internal/NavigationDispatcher.java
trunk/equanda-t5navigation/src/main/java/org/equanda/t5nav/internal/NavigationFactoryImpl.java
trunk/equanda-t5navigation/src/main/java/org/equanda/t5nav/internal/NavigationManagerImpl.java
trunk/equanda-t5navigation/src/main/java/org/equanda/t5nav/services/NavigationConstants.java
trunk/equanda-t5navigation/src/main/java/org/equanda/t5nav/services/NavigationContext.java
trunk/equanda-t5navigation/src/main/java/org/equanda/t5nav/services/NavigationFactory.java
trunk/equanda-t5navigation/src/main/java/org/equanda/t5nav/services/NavigationManager.java
trunk/equanda-t5navigation/src/main/java/org/equanda/t5nav/services/NavigationModule.java
Modified: trunk/equanda-t5navigation/src/main/java/org/equanda/t5nav/internal/NavigationContextImpl.java
===================================================================
--- trunk/equanda-t5navigation/src/main/java/org/equanda/t5nav/internal/NavigationContextImpl.java 2009-02-07 10:44:55 UTC (rev 1007)
+++ trunk/equanda-t5navigation/src/main/java/org/equanda/t5nav/internal/NavigationContextImpl.java 2009-02-07 16:56:00 UTC (rev 1008)
@@ -34,11 +34,11 @@
* Navigation context implementation
*
* @author Kristian Marinkovic
+ * @author <a href="mailto:jo...@pr...">Joachim Van der Auwera</a>
*/
public class NavigationContextImpl
implements NavigationContext
{
- public static final int RETURN_CACHE_MAX_SIZE = 5;
private static final long serialVersionUID = 4630759126161967285L;
private final String id;
@@ -55,15 +55,13 @@
public NavigationContextImpl( String id )
{
- System.out.println( "creating navigation context, no previous" );
this.id = id;
this.creationDate = new Date();
previousId = null;
}
- public NavigationContextImpl( String id, NavigationContext previous )
+ public NavigationContextImpl( String id, NavigationContext previous, int maxCacheSize )
{
- System.out.println( "creating navigation context, previous=" + previous );
this.id = id;
this.creationDate = new Date();
NavigationTarget[] prevCache = null;
@@ -72,14 +70,12 @@
this.previousId = previous.getId();
prevCache = previous.getRecentReturnTargets();
}
- System.out.println( "create new NavigationContext " + prevCache );
if ( null != prevCache )
{
- int count = Math.min( RETURN_CACHE_MAX_SIZE, prevCache.length + 1 );
+ int count = Math.min( maxCacheSize, prevCache.length + 1 );
returnCache = new NavigationTarget[count];
System.arraycopy( prevCache, 0, returnCache, 1, count - 1 );
}
- System.out.println( "returnCache is " + returnCache );
}
public String getId()
@@ -153,7 +149,6 @@
public void setReturnTarget( NavigationTarget target )
{
- System.out.println( "setting returnTarget " + target + " | " + returnCache );
if ( null == returnCache || returnCache.length == 0 ) returnCache = new NavigationTarget[1];
returnCache[ 0 ] = target;
}
Modified: trunk/equanda-t5navigation/src/main/java/org/equanda/t5nav/internal/NavigationDispatcher.java
===================================================================
--- trunk/equanda-t5navigation/src/main/java/org/equanda/t5nav/internal/NavigationDispatcher.java 2009-02-07 10:44:55 UTC (rev 1007)
+++ trunk/equanda-t5navigation/src/main/java/org/equanda/t5nav/internal/NavigationDispatcher.java 2009-02-07 16:56:00 UTC (rev 1008)
@@ -36,22 +36,20 @@
* Checks whether the request contains a "navid" parameter
* and reads the current NavigationContext from the NavigationTracker
* that resides in the session (ASO). The current NavigationContext is then
- * explicitly set in the session and during PageRenderInitialize in the Environment.
- * All subsequent services should only use the NavigationContext from the session
- * or from the Environment.
+ * explicitly set in the aso.
+ * All subsequent services should only use the NavigationContext from the session.
*
* @author Kristian Marinkovic
+ * @author <a href="mailto:jo...@pr...">Joachim Van der Auwera</a>
*/
public class NavigationDispatcher
implements Dispatcher, MarkupRendererFilter
{
private final ApplicationStateManager asoManager;
- private final Environment environment;
- public NavigationDispatcher( ApplicationStateManager asoManager, Environment environment )
+ public NavigationDispatcher( ApplicationStateManager asoManager )
{
this.asoManager = asoManager;
- this.environment = environment;
}
public boolean dispatch( Request request, Response response )
@@ -59,68 +57,41 @@
{
NavigationContext context = getCurrentContextFromTracker(
request.getParameter( NavigationConstants.NAVIGATION_ID_PARAMETER ) );
+ context = checkInvalid( context );
- while ( null != context && !context.isValid() )
- {
- String previous = context.getPreviousId();
- System.out.println( "dispatcher 'isValid' handling, previous is " + previous );
- getTracker().remove( context.getId() );
- if ( null != previous )
- {
- context = getTracker().get( previous );
- asoManager.set( NavigationContext.class, context );
- }
- else
- {
- context = null;
- }
- }
-
if ( context != null )
{
asoManager.set( NavigationContext.class, context );
- System.out.println( "navigation id = " + context.getId() );
}
return false;
}
- /** sets/removes the ConversionContext in/from the Environment */
- public void renderMarkup( MarkupWriter writer, MarkupRenderer renderer )
+ private NavigationContext checkInvalid( NavigationContext context )
{
- NavigationContext currentContext = getCurrentContextFromASO();
- System.out.println( "renderMarkup, nvxtx=" + currentContext );
-
- while ( null != currentContext && !currentContext.isValid() )
+ while ( null != context && !context.isValid() )
{
- String previous = currentContext.getPreviousId();
- System.out.println( "renderMarkup 'invalid' handling, to " + previous );
- getTracker().remove( currentContext.getId() );
+ String previous = context.getPreviousId();
+ getTracker().remove( context.getId() );
if ( null != previous )
{
- currentContext = getTracker().get( previous );
- asoManager.set( NavigationContext.class, currentContext );
+ context = getTracker().get( previous );
+ asoManager.set( NavigationContext.class, context );
}
else
{
- currentContext = null;
+ context = null;
}
}
+ return context;
+ }
- if ( null != currentContext && currentContext.isValid() )
- {
- System.out.println( "pushing the navigationContext on the environment" );
- environment.push( NavigationContext.class, currentContext );
- System.out.println( "navigation id = " + currentContext.getId() );
- }
+ /** sets/removes the NavigationContext in/from the Environment */
+ public void renderMarkup( MarkupWriter writer, MarkupRenderer renderer )
+ {
+ NavigationContext context = getCurrentContextFromASO();
+ context = checkInvalid( context );
renderer.renderMarkup( writer );
-
- currentContext = environment.peek( NavigationContext.class );
-
- if ( currentContext != null )
- {
- environment.pop( NavigationContext.class );
- }
}
/**
Modified: trunk/equanda-t5navigation/src/main/java/org/equanda/t5nav/internal/NavigationFactoryImpl.java
===================================================================
--- trunk/equanda-t5navigation/src/main/java/org/equanda/t5nav/internal/NavigationFactoryImpl.java 2009-02-07 10:44:55 UTC (rev 1007)
+++ trunk/equanda-t5navigation/src/main/java/org/equanda/t5nav/internal/NavigationFactoryImpl.java 2009-02-07 16:56:00 UTC (rev 1008)
@@ -24,6 +24,8 @@
package org.equanda.t5nav.internal;
+import org.apache.tapestry5.ioc.annotations.Symbol;
+import org.equanda.t5nav.services.NavigationConstants;
import org.equanda.t5nav.services.NavigationContext;
import org.equanda.t5nav.services.NavigationFactory;
@@ -36,7 +38,13 @@
implements NavigationFactory
{
private static long COUNTER = 1;
+ private final int maxReturnCacheSize;
+ public NavigationFactoryImpl( @Symbol( NavigationConstants.NAVIGATION_RETURN_CACHE_SIZE ) int maxReturnCacheSize )
+ {
+ this.maxReturnCacheSize = maxReturnCacheSize;
+ }
+
public NavigationContext create()
{
return new NavigationContextImpl( getNextValue() );
@@ -44,7 +52,7 @@
public NavigationContext create( NavigationContext previous )
{
- return new NavigationContextImpl( getNextValue(), previous );
+ return new NavigationContextImpl( getNextValue(), previous, maxReturnCacheSize );
}
private synchronized String getNextValue()
Modified: trunk/equanda-t5navigation/src/main/java/org/equanda/t5nav/internal/NavigationManagerImpl.java
===================================================================
--- trunk/equanda-t5navigation/src/main/java/org/equanda/t5nav/internal/NavigationManagerImpl.java 2009-02-07 10:44:55 UTC (rev 1007)
+++ trunk/equanda-t5navigation/src/main/java/org/equanda/t5nav/internal/NavigationManagerImpl.java 2009-02-07 16:56:00 UTC (rev 1008)
@@ -31,6 +31,7 @@
* Navigation manager
*
* @author Kristian Marinkovic
+ * @author <a href="mailto:jo...@pr...">Joachim Van der Auwera</a>
*/
public class NavigationManagerImpl
implements NavigationManager
@@ -38,9 +39,8 @@
private final ApplicationStateManager asoManager;
private final NavigationFactory navigationFactory;
- public NavigationManagerImpl(
- NavigationFactory navigationFactory,
- ApplicationStateManager asoManager )
+ public NavigationManagerImpl( NavigationFactory navigationFactory,
+ ApplicationStateManager asoManager )
{
this.asoManager = asoManager;
this.navigationFactory = navigationFactory;
@@ -55,7 +55,6 @@
{
NavigationContext context = null;
if ( chain ) context = asoManager.getIfExists( NavigationContext.class );
- System.out.println( "begin a new navigation, chain=" + chain + ", previous=" + context );
context = navigationFactory.create( context );
getTracker().add( context );
asoManager.set( NavigationContext.class, context );
@@ -99,20 +98,17 @@
*/
public Object endNavigation( NavigationContext navigation )
{
- System.out.println( "endNavigation" );
if ( null == navigation ) navigation = asoManager.getIfExists( NavigationContext.class );
if ( null == navigation ) return null;
- System.out.println( "was inside navigation" + navigation.getId() );
String previous = navigation.getPreviousId();
navigation.invalidate();
if ( null != previous )
{
- System.out.println( "will need to go back to " + previous );
NavigationContext context = getTracker().get( previous );
asoManager.set( NavigationContext.class, context );
- NavigationTarget returnTarget = context.getReturnTarget();
- if ( null != returnTarget ) return returnTarget.getLink();
}
+ NavigationTarget returnTarget = navigation.getReturnTarget();
+ if ( null != returnTarget ) return returnTarget.getLink();
return null;
}
}
Modified: trunk/equanda-t5navigation/src/main/java/org/equanda/t5nav/services/NavigationConstants.java
===================================================================
--- trunk/equanda-t5navigation/src/main/java/org/equanda/t5nav/services/NavigationConstants.java 2009-02-07 10:44:55 UTC (rev 1007)
+++ trunk/equanda-t5navigation/src/main/java/org/equanda/t5nav/services/NavigationConstants.java 2009-02-07 16:56:00 UTC (rev 1008)
@@ -34,4 +34,6 @@
{
static final String PERSISTENT_STRATEGY_NAME = "navogation";
static final String NAVIGATION_ID_PARAMETER = "navid";
+ static final String NAVIGATION_RETURN_CACHE_SIZE = "equanda.t5navigation.return.cache.size";
+
}
Modified: trunk/equanda-t5navigation/src/main/java/org/equanda/t5nav/services/NavigationContext.java
===================================================================
--- trunk/equanda-t5navigation/src/main/java/org/equanda/t5nav/services/NavigationContext.java 2009-02-07 10:44:55 UTC (rev 1007)
+++ trunk/equanda-t5navigation/src/main/java/org/equanda/t5nav/services/NavigationContext.java 2009-02-07 16:56:00 UTC (rev 1008)
@@ -33,6 +33,7 @@
* Represents a navigation context
*
* @author Kristian Marinkovic
+ * @author <a href="mailto:jo...@pr...">Joachim Van der Auwera</a>
*/
public interface NavigationContext
extends Serializable
Modified: trunk/equanda-t5navigation/src/main/java/org/equanda/t5nav/services/NavigationFactory.java
===================================================================
--- trunk/equanda-t5navigation/src/main/java/org/equanda/t5nav/services/NavigationFactory.java 2009-02-07 10:44:55 UTC (rev 1007)
+++ trunk/equanda-t5navigation/src/main/java/org/equanda/t5nav/services/NavigationFactory.java 2009-02-07 16:56:00 UTC (rev 1008)
@@ -28,6 +28,7 @@
* Service which creates new navigation context
*
* @author Kristian Marinkovic
+ * @author <a href="mailto:jo...@pr...">Joachim Van der Auwera</a>
*/
public interface NavigationFactory
{
Modified: trunk/equanda-t5navigation/src/main/java/org/equanda/t5nav/services/NavigationManager.java
===================================================================
--- trunk/equanda-t5navigation/src/main/java/org/equanda/t5nav/services/NavigationManager.java 2009-02-07 10:44:55 UTC (rev 1007)
+++ trunk/equanda-t5navigation/src/main/java/org/equanda/t5nav/services/NavigationManager.java 2009-02-07 16:56:00 UTC (rev 1008)
@@ -28,6 +28,7 @@
* The navigation manager is used to start and end navigation contexts (like conversations)
*
* @author Kristian Marinkovic
+ * @author <a href="mailto:jo...@pr...">Joachim Van der Auwera</a>
*/
public interface NavigationManager
{
Modified: trunk/equanda-t5navigation/src/main/java/org/equanda/t5nav/services/NavigationModule.java
===================================================================
--- trunk/equanda-t5navigation/src/main/java/org/equanda/t5nav/services/NavigationModule.java 2009-02-07 10:44:55 UTC (rev 1007)
+++ trunk/equanda-t5navigation/src/main/java/org/equanda/t5nav/services/NavigationModule.java 2009-02-07 16:56:00 UTC (rev 1008)
@@ -52,6 +52,11 @@
binder.bind( LinkFactoryListener.class, NavigationContextLinkListener.class ).eagerLoad();
}
+ public static void contributeFactoryDefaults( MappedConfiguration<String, String> configuration )
+ {
+ configuration.add( NavigationConstants.NAVIGATION_RETURN_CACHE_SIZE, "5" );
+ }
+
public void contributeMarkupRenderer( OrderedConfiguration<MarkupRendererFilter> configuration,
NavigationDispatcher navigationDispatcher )
{
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <tri...@us...> - 2009-02-07 10:45:23
|
Revision: 1007
http://equanda.svn.sourceforge.net/equanda/?rev=1007&view=rev
Author: triathlon98
Date: 2009-02-07 10:44:55 +0000 (Sat, 07 Feb 2009)
Log Message:
-----------
EQ-297 base provisions for breadcrumbs support
Modified Paths:
--------------
trunk/equanda-t5navigation/src/main/java/org/equanda/t5nav/internal/NavigationContextImpl.java
trunk/equanda-t5navigation/src/main/java/org/equanda/t5nav/internal/NavigationContextLinkListener.java
trunk/equanda-t5navigation/src/main/java/org/equanda/t5nav/internal/NavigationDispatcher.java
trunk/equanda-t5navigation/src/main/java/org/equanda/t5nav/internal/NavigationFactoryImpl.java
trunk/equanda-t5navigation/src/main/java/org/equanda/t5nav/internal/NavigationManagerImpl.java
trunk/equanda-t5navigation/src/main/java/org/equanda/t5nav/internal/NavigationPersistentFieldStrategy.java
trunk/equanda-t5navigation/src/main/java/org/equanda/t5nav/internal/PersistentFieldManagerDecorator.java
trunk/equanda-t5navigation/src/main/java/org/equanda/t5nav/services/NavigationContext.java
trunk/equanda-t5navigation/src/main/java/org/equanda/t5nav/services/NavigationFactory.java
trunk/equanda-t5navigation/src/main/java/org/equanda/t5nav/services/NavigationManager.java
trunk/equanda-t5navigation/src/main/java/org/equanda/t5nav/services/NavigationModule.java
trunk/equanda-t5navigation/src/main/java/org/equanda/t5nav/services/NavigationTracker.java
Added Paths:
-----------
trunk/equanda-t5navigation/src/main/java/org/equanda/t5nav/internal/NavigationTargetImpl.java
trunk/equanda-t5navigation/src/main/java/org/equanda/t5nav/services/NavigationTarget.java
Modified: trunk/equanda-t5navigation/src/main/java/org/equanda/t5nav/internal/NavigationContextImpl.java
===================================================================
--- trunk/equanda-t5navigation/src/main/java/org/equanda/t5nav/internal/NavigationContextImpl.java 2009-02-04 10:11:50 UTC (rev 1006)
+++ trunk/equanda-t5navigation/src/main/java/org/equanda/t5nav/internal/NavigationContextImpl.java 2009-02-07 10:44:55 UTC (rev 1007)
@@ -26,6 +26,7 @@
import org.apache.tapestry5.services.PersistentFieldChange;
import org.equanda.t5nav.services.NavigationContext;
+import org.equanda.t5nav.services.NavigationTarget;
import java.util.*;
@@ -37,11 +38,12 @@
public class NavigationContextImpl
implements NavigationContext
{
+ public static final int RETURN_CACHE_MAX_SIZE = 5;
private static final long serialVersionUID = 4630759126161967285L;
- private final long id;
- private long previousId;
- private Object returnPage;
+ private final String id;
+ private String previousId;
+ private NavigationTarget[] returnCache;
private final Date creationDate;
@@ -51,23 +53,36 @@
private Map<String, Set<PersistentFieldChange>> pageFieldChanges =
new HashMap<String, Set<PersistentFieldChange>>();
- public NavigationContextImpl( long id )
+ public NavigationContextImpl( String id )
{
- System.out.println( "creating conversation context, no previous" );
+ System.out.println( "creating navigation context, no previous" );
this.id = id;
this.creationDate = new Date();
- previousId = 0;
+ previousId = null;
}
- public NavigationContextImpl( long id, long previous )
+ public NavigationContextImpl( String id, NavigationContext previous )
{
- System.out.println( "creating conversation context, previous=" + previous );
+ System.out.println( "creating navigation context, previous=" + previous );
this.id = id;
this.creationDate = new Date();
- this.previousId = previous;
+ NavigationTarget[] prevCache = null;
+ if ( null != previous )
+ {
+ this.previousId = previous.getId();
+ prevCache = previous.getRecentReturnTargets();
+ }
+ System.out.println( "create new NavigationContext " + prevCache );
+ if ( null != prevCache )
+ {
+ int count = Math.min( RETURN_CACHE_MAX_SIZE, prevCache.length + 1 );
+ returnCache = new NavigationTarget[count];
+ System.arraycopy( prevCache, 0, returnCache, 1, count - 1 );
+ }
+ System.out.println( "returnCache is " + returnCache );
}
- public long getId()
+ public String getId()
{
return id;
}
@@ -77,7 +92,7 @@
return valid;
}
- public long invalidate()
+ public String invalidate()
{
valid = false;
pageFieldChanges.clear();
@@ -89,26 +104,16 @@
return creationDate;
}
- public long getPreviousId()
+ public String getPreviousId()
{
return previousId;
}
- public void setPreviousId( long previousId )
+ public void setPreviousId( String previousId )
{
this.previousId = previousId;
}
- public Object getReturnPage()
- {
- return returnPage;
- }
-
- public void setReturnPage( Object returnPage )
- {
- this.returnPage = returnPage;
- }
-
public void addPersistentField( String pageName, PersistentFieldChange persistentField )
{
Set<PersistentFieldChange> fieldChangeList = pageFieldChanges.get( pageName );
@@ -135,8 +140,26 @@
pageFieldChanges.remove( pageName );
}
- public Collection<PersistentFieldChange> getPeristentFields( String pageName )
+ public Collection<PersistentFieldChange> getPersistentFields( String pageName )
{
return pageFieldChanges.get( pageName );
}
+
+ public NavigationTarget getReturnTarget()
+ {
+ if ( null == returnCache || returnCache.length == 0 ) return null;
+ return returnCache[ 0 ];
+ }
+
+ public void setReturnTarget( NavigationTarget target )
+ {
+ System.out.println( "setting returnTarget " + target + " | " + returnCache );
+ if ( null == returnCache || returnCache.length == 0 ) returnCache = new NavigationTarget[1];
+ returnCache[ 0 ] = target;
+ }
+
+ public NavigationTarget[] getRecentReturnTargets()
+ {
+ return returnCache;
+ }
}
Modified: trunk/equanda-t5navigation/src/main/java/org/equanda/t5nav/internal/NavigationContextLinkListener.java
===================================================================
--- trunk/equanda-t5navigation/src/main/java/org/equanda/t5nav/internal/NavigationContextLinkListener.java 2009-02-04 10:11:50 UTC (rev 1006)
+++ trunk/equanda-t5navigation/src/main/java/org/equanda/t5nav/internal/NavigationContextLinkListener.java 2009-02-07 10:44:55 UTC (rev 1007)
@@ -28,8 +28,8 @@
import org.apache.tapestry5.internal.services.LinkFactory;
import org.apache.tapestry5.internal.services.LinkFactoryListener;
import org.apache.tapestry5.services.ApplicationStateManager;
+import org.equanda.t5nav.services.NavigationConstants;
import org.equanda.t5nav.services.NavigationContext;
-import org.equanda.t5nav.services.NavigationConstants;
/**
* Navigation context link listener, assure links contain the navigation context as parameter
@@ -74,6 +74,6 @@
return;
}
- link.addParameter( NavigationConstants.NAVIGATION_ID_PARAMETER, Long.toString( context.getId() ) );
+ link.addParameter( NavigationConstants.NAVIGATION_ID_PARAMETER, context.getId() );
}
}
Modified: trunk/equanda-t5navigation/src/main/java/org/equanda/t5nav/internal/NavigationDispatcher.java
===================================================================
--- trunk/equanda-t5navigation/src/main/java/org/equanda/t5nav/internal/NavigationDispatcher.java 2009-02-04 10:11:50 UTC (rev 1006)
+++ trunk/equanda-t5navigation/src/main/java/org/equanda/t5nav/internal/NavigationDispatcher.java 2009-02-07 10:44:55 UTC (rev 1007)
@@ -26,18 +26,18 @@
import org.apache.tapestry5.MarkupWriter;
import org.apache.tapestry5.services.*;
+import org.equanda.t5nav.services.NavigationConstants;
import org.equanda.t5nav.services.NavigationContext;
import org.equanda.t5nav.services.NavigationTracker;
-import org.equanda.t5nav.services.NavigationConstants;
import java.io.IOException;
/**
- * Checks whether the request contains a "conversationID" parameter
- * and reads the current ConversationContext from the ConversationTracker
- * that resides in the session (ASO). The current ConversationContext is then
+ * Checks whether the request contains a "navid" parameter
+ * and reads the current NavigationContext from the NavigationTracker
+ * that resides in the session (ASO). The current NavigationContext is then
* explicitly set in the session and during PageRenderInitialize in the Environment.
- * All subsequent services should only use the ConversationContext from the session
+ * All subsequent services should only use the NavigationContext from the session
* or from the Environment.
*
* @author Kristian Marinkovic
@@ -62,10 +62,10 @@
while ( null != context && !context.isValid() )
{
- long previous = context.getPreviousId();
+ String previous = context.getPreviousId();
System.out.println( "dispatcher 'isValid' handling, previous is " + previous );
getTracker().remove( context.getId() );
- if ( previous > 0 )
+ if ( null != previous )
{
context = getTracker().get( previous );
asoManager.set( NavigationContext.class, context );
@@ -79,7 +79,7 @@
if ( context != null )
{
asoManager.set( NavigationContext.class, context );
- System.out.println( "conversation id = " + context.getId() );
+ System.out.println( "navigation id = " + context.getId() );
}
return false;
@@ -89,13 +89,14 @@
public void renderMarkup( MarkupWriter writer, MarkupRenderer renderer )
{
NavigationContext currentContext = getCurrentContextFromASO();
+ System.out.println( "renderMarkup, nvxtx=" + currentContext );
while ( null != currentContext && !currentContext.isValid() )
{
- long previous = currentContext.getPreviousId();
+ String previous = currentContext.getPreviousId();
System.out.println( "renderMarkup 'invalid' handling, to " + previous );
getTracker().remove( currentContext.getId() );
- if ( previous > 0 )
+ if ( null != previous )
{
currentContext = getTracker().get( previous );
asoManager.set( NavigationContext.class, currentContext );
@@ -106,10 +107,11 @@
}
}
- if ( currentContext != null && currentContext.isValid() )
+ if ( null != currentContext && currentContext.isValid() )
{
+ System.out.println( "pushing the navigationContext on the environment" );
environment.push( NavigationContext.class, currentContext );
- System.out.println( "conversation id = " + currentContext.getId() );
+ System.out.println( "navigation id = " + currentContext.getId() );
}
renderer.renderMarkup( writer );
@@ -122,11 +124,11 @@
}
/**
- * creates a ConversationTracker if it does not already exist within
+ * creates a NavigationTracker if it does not already exist within
* the session. The ApplicationStateManager is used to persist the
- * ConversationTracker
+ * NavigationTracker
*
- * @return conversationTracker
+ * @return navigationTracker
*/
private NavigationTracker getTracker()
{
@@ -164,7 +166,7 @@
return null;
}
- return tracker.get( Long.valueOf( id ) );
+ return tracker.get( id );
}
private NavigationContext getCurrentContextFromASO()
Modified: trunk/equanda-t5navigation/src/main/java/org/equanda/t5nav/internal/NavigationFactoryImpl.java
===================================================================
--- trunk/equanda-t5navigation/src/main/java/org/equanda/t5nav/internal/NavigationFactoryImpl.java 2009-02-04 10:11:50 UTC (rev 1006)
+++ trunk/equanda-t5navigation/src/main/java/org/equanda/t5nav/internal/NavigationFactoryImpl.java 2009-02-07 10:44:55 UTC (rev 1007)
@@ -24,11 +24,11 @@
package org.equanda.t5nav.internal;
+import org.equanda.t5nav.services.NavigationContext;
import org.equanda.t5nav.services.NavigationFactory;
-import org.equanda.t5nav.services.NavigationContext;
/**
- * Factory which creates navigation contaxts
+ * Factory which creates navigation contexts
*
* @author Kristian Marinkovic
*/
@@ -42,14 +42,14 @@
return new NavigationContextImpl( getNextValue() );
}
- public NavigationContext create( long previous )
+ public NavigationContext create( NavigationContext previous )
{
return new NavigationContextImpl( getNextValue(), previous );
}
- private synchronized long getNextValue()
+ private synchronized String getNextValue()
{
// just for testing
- return COUNTER++;
+ return Long.toString( COUNTER++ );
}
}
\ No newline at end of file
Modified: trunk/equanda-t5navigation/src/main/java/org/equanda/t5nav/internal/NavigationManagerImpl.java
===================================================================
--- trunk/equanda-t5navigation/src/main/java/org/equanda/t5nav/internal/NavigationManagerImpl.java 2009-02-04 10:11:50 UTC (rev 1006)
+++ trunk/equanda-t5navigation/src/main/java/org/equanda/t5nav/internal/NavigationManagerImpl.java 2009-02-07 10:44:55 UTC (rev 1007)
@@ -25,10 +25,7 @@
package org.equanda.t5nav.internal;
import org.apache.tapestry5.services.ApplicationStateManager;
-import org.equanda.t5nav.services.NavigationContext;
-import org.equanda.t5nav.services.NavigationFactory;
-import org.equanda.t5nav.services.NavigationManager;
-import org.equanda.t5nav.services.NavigationTracker;
+import org.equanda.t5nav.services.*;
/**
* Navigation manager
@@ -49,38 +46,35 @@
this.navigationFactory = navigationFactory;
}
- public void beginNavigation()
+ public NavigationContext beginNavigation()
{
- beginNavigation( true );
+ return beginNavigation( true );
}
- public void beginNavigation( boolean chain )
+ public NavigationContext beginNavigation( boolean chain )
{
- long previous = 0;
- if ( chain )
- {
- NavigationContext context = asoManager.getIfExists( NavigationContext.class );
- if ( null != context )
- {
- previous = context.getId();
- }
- else
- {
- System.out.println( "there is no current conversation" );
- }
- }
- System.out.println( "begin a new conversation, chain=" + chain + ", previous=" + previous );
- NavigationContext context = navigationFactory.create( previous );
+ NavigationContext context = null;
+ if ( chain ) context = asoManager.getIfExists( NavigationContext.class );
+ System.out.println( "begin a new navigation, chain=" + chain + ", previous=" + context );
+ context = navigationFactory.create( context );
getTracker().add( context );
asoManager.set( NavigationContext.class, context );
+ return context;
}
+ public NavigationContext beginNavigation( Object link, String title )
+ {
+ NavigationContext context = beginNavigation( true );
+ context.setReturnTarget( new NavigationTargetImpl( link, title ) );
+ return context;
+ }
+
/**
- * creates a ConversationTracker if it does not already exist within
+ * creates a NavigationTracker if it does not already exist within
* the session. The ApplicationStateManager is used to persist the
- * ConversationTracker
+ * NavigationTracker
*
- * @return conversationTracker
+ * @return navigationTracker
*/
private NavigationTracker getTracker()
{
@@ -100,24 +94,24 @@
}
/**
- * Removes the ConversationContext from the ConversationTracker and
+ * Removes the NavigationContext from the NavigationTracker and
* invalidates it.
*/
- public NavigationContext endNavigation( NavigationContext navigation )
+ public Object endNavigation( NavigationContext navigation )
{
System.out.println( "endNavigation" );
if ( null == navigation ) navigation = asoManager.getIfExists( NavigationContext.class );
if ( null == navigation ) return null;
System.out.println( "was inside navigation" + navigation.getId() );
- long previous = navigation.getPreviousId();
+ String previous = navigation.getPreviousId();
navigation.invalidate();
- //getTracker().remove(navigation.getId());
- if ( previous > 0 )
+ if ( null != previous )
{
System.out.println( "will need to go back to " + previous );
NavigationContext context = getTracker().get( previous );
asoManager.set( NavigationContext.class, context );
- return context;
+ NavigationTarget returnTarget = context.getReturnTarget();
+ if ( null != returnTarget ) return returnTarget.getLink();
}
return null;
}
Modified: trunk/equanda-t5navigation/src/main/java/org/equanda/t5nav/internal/NavigationPersistentFieldStrategy.java
===================================================================
--- trunk/equanda-t5navigation/src/main/java/org/equanda/t5nav/internal/NavigationPersistentFieldStrategy.java 2009-02-04 10:11:50 UTC (rev 1006)
+++ trunk/equanda-t5navigation/src/main/java/org/equanda/t5nav/internal/NavigationPersistentFieldStrategy.java 2009-02-07 10:44:55 UTC (rev 1007)
@@ -56,7 +56,7 @@
return Collections.emptyList();
}
- Collection<PersistentFieldChange> changes = context.getPeristentFields( pageName );
+ Collection<PersistentFieldChange> changes = context.getPersistentFields( pageName );
if ( changes == null )
{
Added: trunk/equanda-t5navigation/src/main/java/org/equanda/t5nav/internal/NavigationTargetImpl.java
===================================================================
--- trunk/equanda-t5navigation/src/main/java/org/equanda/t5nav/internal/NavigationTargetImpl.java (rev 0)
+++ trunk/equanda-t5navigation/src/main/java/org/equanda/t5nav/internal/NavigationTargetImpl.java 2009-02-07 10:44:55 UTC (rev 1007)
@@ -0,0 +1,56 @@
+/**
+ * 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.t5nav.internal;
+
+import org.equanda.t5nav.services.NavigationTarget;
+
+/**
+ * Combination of link location and link title. These are used for going back to previous locations in the navigation
+ * context.
+ *
+ * @author <a href="mailto:jo...@pr...">Joachim Van der Auwera</a>
+ */
+public class NavigationTargetImpl
+ implements NavigationTarget
+{
+ private Object link;
+ private String title;
+
+ public NavigationTargetImpl( Object link, String title )
+ {
+ this.link = link;
+ this.title = title;
+ }
+
+ public String getTitle()
+ {
+ return title;
+ }
+
+ public Object getLink()
+ {
+ return link;
+ }
+}
Modified: trunk/equanda-t5navigation/src/main/java/org/equanda/t5nav/internal/PersistentFieldManagerDecorator.java
===================================================================
--- trunk/equanda-t5navigation/src/main/java/org/equanda/t5nav/internal/PersistentFieldManagerDecorator.java 2009-02-04 10:11:50 UTC (rev 1006)
+++ trunk/equanda-t5navigation/src/main/java/org/equanda/t5nav/internal/PersistentFieldManagerDecorator.java 2009-02-07 10:44:55 UTC (rev 1007)
@@ -42,15 +42,15 @@
{
private final PersistentFieldManager delegate;
private final ApplicationStateManager asoManager;
- private final PersistentFieldStrategy conversationStrategy;
+ private final PersistentFieldStrategy navigationStrategy;
public PersistentFieldManagerDecorator( PersistentFieldManager delegate,
ApplicationStateManager asoManager,
- PersistentFieldStrategy conversationStrategy )
+ PersistentFieldStrategy navigationStrategy )
{
this.delegate = delegate;
this.asoManager = asoManager;
- this.conversationStrategy = conversationStrategy;
+ this.navigationStrategy = navigationStrategy;
}
public PersistentFieldBundle gatherChanges( String pageName )
@@ -61,9 +61,9 @@
public void postChange( String pageName, ComponentResources resources,
String fieldName, Object newValue )
{
- if ( isInConversation() )
+ if ( isInNavigation() )
{
- conversationStrategy.postChange( pageName, resources.getNestedId(), fieldName, newValue );
+ navigationStrategy.postChange( pageName, resources.getNestedId(), fieldName, newValue );
}
else
{
@@ -71,16 +71,16 @@
}
}
- private boolean isInConversation()
+ private boolean isInNavigation()
{
return ( asoManager.exists( NavigationContext.class ) );
}
public void discardChanges( String pageName )
{
- if ( isInConversation() )
+ if ( isInNavigation() )
{
- conversationStrategy.discardChanges( pageName );
+ navigationStrategy.discardChanges( pageName );
}
else
{
Modified: trunk/equanda-t5navigation/src/main/java/org/equanda/t5nav/services/NavigationContext.java
===================================================================
--- trunk/equanda-t5navigation/src/main/java/org/equanda/t5nav/services/NavigationContext.java 2009-02-04 10:11:50 UTC (rev 1006)
+++ trunk/equanda-t5navigation/src/main/java/org/equanda/t5nav/services/NavigationContext.java 2009-02-07 10:44:55 UTC (rev 1007)
@@ -37,20 +37,20 @@
public interface NavigationContext
extends Serializable
{
- public long getId();
+ public String getId();
public boolean isValid();
/**
- * invalidates the current ConversationContext
- * The previously active context (or 0) is returned.
+ * invalidates the current NavigationContext
+ * The return target is returned.
*
- * @return previously active conversation context
+ * @return redirect target to return to
*/
- public long invalidate();
+ public Object invalidate();
/**
- * Adds a persistentField from a page to the ConversationContext
+ * Adds a persistentField from a page to the NavigationContext
*
* @param pageName page name
* @param persistentField persistence info
@@ -70,26 +70,34 @@
* @param pageName page name
* @return persistence info
*/
- public Collection<PersistentFieldChange> getPeristentFields( String pageName );
+ public Collection<PersistentFieldChange> getPersistentFields( String pageName );
/**
- * Get the id of the conversation which was active when this one was created
+ * Get the id of the navigation which was active when this one was created
*
- * @return previously active conversation id
+ * @return previously active navigation id
*/
- public long getPreviousId();
+ public String getPreviousId();
/**
- * Get the return page which the user should return to when this navigation mini-conversation ends.
+ * Get the redirect target user should return to when this navigation mini-conversation ends.
*
- * @return redirect target (allowed for Tapestry)
+ * @return redirect target
*/
- Object getReturnPage();
+ NavigationTarget getReturnTarget();
/**
* Set the redirect target that should be returned to when this navigation mini-conversation ends.
*
- * @param returnPage redirect target as allowed by Tapestry
+ * @param returnTarget redirect target as allowed by Tapestry
*/
- void setReturnPage( Object returnPage );
+ void setReturnTarget( NavigationTarget returnTarget );
+
+ /**
+ * Get the last few return targets, usable for some kind of breadcrumbs display.
+ *
+ * @return array with the last few return targets
+ */
+ NavigationTarget[] getRecentReturnTargets();
+
}
Modified: trunk/equanda-t5navigation/src/main/java/org/equanda/t5nav/services/NavigationFactory.java
===================================================================
--- trunk/equanda-t5navigation/src/main/java/org/equanda/t5nav/services/NavigationFactory.java 2009-02-04 10:11:50 UTC (rev 1006)
+++ trunk/equanda-t5navigation/src/main/java/org/equanda/t5nav/services/NavigationFactory.java 2009-02-07 10:44:55 UTC (rev 1007)
@@ -31,7 +31,18 @@
*/
public interface NavigationFactory
{
+ /**
+ * Create a new navigation context (starting a new chain).
+ *
+ * @return new navigation context
+ */
public NavigationContext create();
- public NavigationContext create( long previousId );
+ /**
+ * Create a new navigation context, chaining from the given context.
+ *
+ * @param previous previous navigation context in chain
+ * @return new navigation context
+ */
+ public NavigationContext create( NavigationContext previous );
}
Modified: trunk/equanda-t5navigation/src/main/java/org/equanda/t5nav/services/NavigationManager.java
===================================================================
--- trunk/equanda-t5navigation/src/main/java/org/equanda/t5nav/services/NavigationManager.java 2009-02-04 10:11:50 UTC (rev 1006)
+++ trunk/equanda-t5navigation/src/main/java/org/equanda/t5nav/services/NavigationManager.java 2009-02-07 10:44:55 UTC (rev 1007)
@@ -31,21 +31,36 @@
*/
public interface NavigationManager
{
- /** creates a new conversation, assuring you can get back to the current on invalidation */
- public void beginNavigation();
+ /**
+ * creates a new navigation, assuring you can get back to the current on invalidation
+ *
+ * @return newly created navigation context
+ */
+ public NavigationContext beginNavigation();
/**
- * creates a new conversation. You can choose whether conversations are "chained", that is whether you can et back to the previous conversation when this one ends.
+ * creates a new navigation. You can choose whether navigations are "chained", that is whether you can get back
+ * to the previous navigation when this one ends.
*
- * @param chain should the current conversation be restored when the new one is invalidated
+ * @param chain should the current mini-conversation be restored when the new one is invalidated
+ * @return newly created navigation context
*/
- public void beginNavigation( boolean chain );
+ public NavigationContext beginNavigation( boolean chain );
/**
- * ends a conversation
+ * Creates a new "chained" navigation, specifying the link and title of the return page.
*
+ * @param link redirect link to return to the current page
+ * @param title title for the link page, to display in breadcrumbs components
+ * @return newly created navigation context
+ */
+ public NavigationContext beginNavigation( Object link, String title );
+
+ /**
+ * ends a mini-conversation
+ *
* @param navigation to invalidate
- * @return conversation which was active before this one
+ * @return redirect target if there was one
*/
- public NavigationContext endNavigation( NavigationContext navigation );
+ public Object endNavigation( NavigationContext navigation );
}
\ No newline at end of file
Modified: trunk/equanda-t5navigation/src/main/java/org/equanda/t5nav/services/NavigationModule.java
===================================================================
--- trunk/equanda-t5navigation/src/main/java/org/equanda/t5nav/services/NavigationModule.java 2009-02-04 10:11:50 UTC (rev 1006)
+++ trunk/equanda-t5navigation/src/main/java/org/equanda/t5nav/services/NavigationModule.java 2009-02-07 10:44:55 UTC (rev 1007)
@@ -48,15 +48,14 @@
binder.bind( NavigationDispatcher.class );
binder.bind( NavigationFactory.class, NavigationFactoryImpl.class );
binder.bind( NavigationManager.class, NavigationManagerImpl.class );
- binder.bind( PersistentFieldStrategy.class, NavigationPersistentFieldStrategy.class );
+ binder.bind( NavigationPersistentFieldStrategy.class );
binder.bind( LinkFactoryListener.class, NavigationContextLinkListener.class ).eagerLoad();
}
- public void contributePageRenderInitializer(
- OrderedConfiguration<MarkupRendererFilter> configuration,
- NavigationDispatcher navigationDispatcher )
+ public void contributeMarkupRenderer( OrderedConfiguration<MarkupRendererFilter> configuration,
+ NavigationDispatcher navigationDispatcher )
{
- configuration.add( "conversationFilter", navigationDispatcher, "before:PageRenderSupport" );
+ configuration.add( "navigationFilter", navigationDispatcher, "before:PageRenderSupport" );
}
public void contributeMasterDispatcher( OrderedConfiguration<Dispatcher> configuration,
@@ -67,18 +66,18 @@
public void contributePersistentFieldManager(
MappedConfiguration<String, PersistentFieldStrategy> configuration,
- PersistentFieldStrategy conversationStrategy )
+ NavigationPersistentFieldStrategy navigationFieldStrategy )
{
- configuration.add( NavigationConstants.PERSISTENT_STRATEGY_NAME, conversationStrategy );
+ configuration.add( NavigationConstants.PERSISTENT_STRATEGY_NAME, navigationFieldStrategy );
}
public PersistentFieldManager decoratePersistentFieldManager( Object delegate,
- PersistentFieldStrategy conversationFieldStrategy,
+ NavigationPersistentFieldStrategy fieldStrategy,
ApplicationStateManager asoManager )
{
return new PersistentFieldManagerDecorator(
(PersistentFieldManager) delegate, // to be decorated service
- asoManager, // asoManager needed to check whether in conversation
- conversationFieldStrategy ); // conversation strategy
+ asoManager, // asoManager needed to check whether in conversation
+ fieldStrategy ); // navigation strategy
}
}
Added: trunk/equanda-t5navigation/src/main/java/org/equanda/t5nav/services/NavigationTarget.java
===================================================================
--- trunk/equanda-t5navigation/src/main/java/org/equanda/t5nav/services/NavigationTarget.java (rev 0)
+++ trunk/equanda-t5navigation/src/main/java/org/equanda/t5nav/services/NavigationTarget.java 2009-02-07 10:44:55 UTC (rev 1007)
@@ -0,0 +1,48 @@
+/**
+ * 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.t5nav.services;
+
+/**
+ * Combination of link location and link title. These are used for going back to previous locations in the navigation
+ * context.
+ *
+ * @author <a href="mailto:jo...@pr...">Joachim Van der Auwera</a>
+ */
+public interface NavigationTarget
+{
+ /**
+ * Get the title for the return target.
+ *
+ * @return page title
+ */
+ String getTitle();
+
+ /**
+ * Get the redirect object, as usable by tapestry.
+ *
+ * @return redirect object
+ */
+ Object getLink();
+}
Modified: trunk/equanda-t5navigation/src/main/java/org/equanda/t5nav/services/NavigationTracker.java
===================================================================
--- trunk/equanda-t5navigation/src/main/java/org/equanda/t5nav/services/NavigationTracker.java 2009-02-04 10:11:50 UTC (rev 1006)
+++ trunk/equanda-t5navigation/src/main/java/org/equanda/t5nav/services/NavigationTracker.java 2009-02-07 10:44:55 UTC (rev 1007)
@@ -38,24 +38,24 @@
{
private static final long serialVersionUID = 7827015484027648524L;
- private Map<Long, NavigationContext> contextMap = new HashMap<Long, NavigationContext>();
+ private Map<String, NavigationContext> contextMap = new HashMap<String, NavigationContext>();
public void add( NavigationContext context )
{
contextMap.put( context.getId(), context );
}
- public boolean exists( Long contextId )
+ public boolean exists( String contextId )
{
return contextMap.containsKey( contextId );
}
- public NavigationContext remove( Long contextId )
+ public NavigationContext remove( String contextId )
{
return contextMap.remove( contextId );
}
- public NavigationContext get( Long contextId )
+ public NavigationContext get( String contextId )
{
return contextMap.get( contextId );
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <tri...@us...> - 2009-02-04 10:11:55
|
Revision: 1006
http://equanda.svn.sourceforge.net/equanda/?rev=1006&view=rev
Author: triathlon98
Date: 2009-02-04 10:11:50 +0000 (Wed, 04 Feb 2009)
Log Message:
-----------
fix in docs
Modified Paths:
--------------
trunk/equanda-tapestry5/src/site/wiki/index.wiki
trunk/equanda-tapestry5/src/site/wiki/textfield.wiki
trunk/pom.xml
Modified: trunk/equanda-tapestry5/src/site/wiki/index.wiki
===================================================================
--- trunk/equanda-tapestry5/src/site/wiki/index.wiki 2009-02-01 11:25:34 UTC (rev 1005)
+++ trunk/equanda-tapestry5/src/site/wiki/index.wiki 2009-02-04 10:11:50 UTC (rev 1006)
@@ -14,6 +14,7 @@
- [FormActionLink|formactionlink.html]
- [JSPagedLoop|jspagedloop.html]
- [TextField|textfield.html]
+- [TreeTable|treetable.html]
Useful services, translators and other
- DoubleTranslator : assures both dot or comma can be used as decimal seperator.
Modified: trunk/equanda-tapestry5/src/site/wiki/textfield.wiki
===================================================================
--- trunk/equanda-tapestry5/src/site/wiki/textfield.wiki 2009-02-01 11:25:34 UTC (rev 1005)
+++ trunk/equanda-tapestry5/src/site/wiki/textfield.wiki 2009-02-04 10:11:50 UTC (rev 1006)
@@ -2,7 +2,7 @@
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.
+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 looses focus, 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.
Modified: trunk/pom.xml
===================================================================
--- trunk/pom.xml 2009-02-01 11:25:34 UTC (rev 1005)
+++ trunk/pom.xml 2009-02-04 10:11:50 UTC (rev 1006)
@@ -259,14 +259,8 @@
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jxr-plugin</artifactId>
</plugin>
+ <!--
<plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-checkstyle-plugin</artifactId>
- <configuration>
- <configLocation>config/checkstyle.xml</configLocation>
- </configuration>
- </plugin>
- <plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>cobertura-maven-plugin</artifactId>
<version>2.2</version>
@@ -274,6 +268,7 @@
<instrumentation />
</configuration>
</plugin>
+ -->
</plugins>
</reporting>
<dependencyManagement>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <tri...@us...> - 2009-02-01 11:25:37
|
Revision: 1005
http://equanda.svn.sourceforge.net/equanda/?rev=1005&view=rev
Author: triathlon98
Date: 2009-02-01 11:25:34 +0000 (Sun, 01 Feb 2009)
Log Message:
-----------
small impr
Modified Paths:
--------------
trunk/equanda-t5navigation/src/main/java/org/equanda/t5nav/internal/NavigationContextImpl.java
trunk/equanda-t5navigation/src/main/java/org/equanda/t5nav/services/NavigationContext.java
Modified: trunk/equanda-t5navigation/src/main/java/org/equanda/t5nav/internal/NavigationContextImpl.java
===================================================================
--- trunk/equanda-t5navigation/src/main/java/org/equanda/t5nav/internal/NavigationContextImpl.java 2009-01-31 15:39:48 UTC (rev 1004)
+++ trunk/equanda-t5navigation/src/main/java/org/equanda/t5nav/internal/NavigationContextImpl.java 2009-02-01 11:25:34 UTC (rev 1005)
@@ -40,7 +40,8 @@
private static final long serialVersionUID = 4630759126161967285L;
private final long id;
- private final long previousId;
+ private long previousId;
+ private Object returnPage;
private final Date creationDate;
@@ -93,6 +94,21 @@
return previousId;
}
+ public void setPreviousId( long previousId )
+ {
+ this.previousId = previousId;
+ }
+
+ public Object getReturnPage()
+ {
+ return returnPage;
+ }
+
+ public void setReturnPage( Object returnPage )
+ {
+ this.returnPage = returnPage;
+ }
+
public void addPersistentField( String pageName, PersistentFieldChange persistentField )
{
Set<PersistentFieldChange> fieldChangeList = pageFieldChanges.get( pageName );
Modified: trunk/equanda-t5navigation/src/main/java/org/equanda/t5nav/services/NavigationContext.java
===================================================================
--- trunk/equanda-t5navigation/src/main/java/org/equanda/t5nav/services/NavigationContext.java 2009-01-31 15:39:48 UTC (rev 1004)
+++ trunk/equanda-t5navigation/src/main/java/org/equanda/t5nav/services/NavigationContext.java 2009-02-01 11:25:34 UTC (rev 1005)
@@ -78,4 +78,18 @@
* @return previously active conversation id
*/
public long getPreviousId();
+
+ /**
+ * Get the return page which the user should return to when this navigation mini-conversation ends.
+ *
+ * @return redirect target (allowed for Tapestry)
+ */
+ Object getReturnPage();
+
+ /**
+ * Set the redirect target that should be returned to when this navigation mini-conversation ends.
+ *
+ * @param returnPage redirect target as allowed by Tapestry
+ */
+ void setReturnPage( Object returnPage );
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <tri...@us...> - 2009-01-31 15:39:53
|
Revision: 1004
http://equanda.svn.sourceforge.net/equanda/?rev=1004&view=rev
Author: triathlon98
Date: 2009-01-31 15:39:48 +0000 (Sat, 31 Jan 2009)
Log Message:
-----------
fix refactor
Modified Paths:
--------------
trunk/equanda-t5navigation/src/main/java/org/equanda/t5nav/internal/NavigationManagerImpl.java
Modified: trunk/equanda-t5navigation/src/main/java/org/equanda/t5nav/internal/NavigationManagerImpl.java
===================================================================
--- trunk/equanda-t5navigation/src/main/java/org/equanda/t5nav/internal/NavigationManagerImpl.java 2009-01-30 10:06:18 UTC (rev 1003)
+++ trunk/equanda-t5navigation/src/main/java/org/equanda/t5nav/internal/NavigationManagerImpl.java 2009-01-31 15:39:48 UTC (rev 1004)
@@ -25,10 +25,10 @@
package org.equanda.t5nav.internal;
import org.apache.tapestry5.services.ApplicationStateManager;
+import org.equanda.t5nav.services.NavigationContext;
import org.equanda.t5nav.services.NavigationFactory;
-import org.equanda.t5nav.services.NavigationContext;
+import org.equanda.t5nav.services.NavigationManager;
import org.equanda.t5nav.services.NavigationTracker;
-import org.equanda.t5nav.services.NavigationManager;
/**
* Navigation manager
@@ -49,7 +49,7 @@
this.navigationFactory = navigationFactory;
}
- public void beginConversation()
+ public void beginNavigation()
{
beginNavigation( true );
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <tri...@us...> - 2009-01-30 10:06:22
|
Revision: 1003
http://equanda.svn.sourceforge.net/equanda/?rev=1003&view=rev
Author: triathlon98
Date: 2009-01-30 10:06:18 +0000 (Fri, 30 Jan 2009)
Log Message:
-----------
EQ-297 demo for initial navigation support
Modified Paths:
--------------
t5-equanda-example/pom.xml
Added Paths:
-----------
t5-equanda-example/src/main/java/org/equanda/example/t5/pages/PageA.java
t5-equanda-example/src/main/java/org/equanda/example/t5/pages/PageB.java
t5-equanda-example/src/main/java/org/equanda/example/t5/pages/PageC.java
t5-equanda-example/src/main/resources/org/equanda/example/t5/pages/PageA.tml
t5-equanda-example/src/main/resources/org/equanda/example/t5/pages/PageB.tml
t5-equanda-example/src/main/resources/org/equanda/example/t5/pages/PageC.tml
Modified: t5-equanda-example/pom.xml
===================================================================
--- t5-equanda-example/pom.xml 2009-01-30 09:57:32 UTC (rev 1002)
+++ t5-equanda-example/pom.xml 2009-01-30 10:06:18 UTC (rev 1003)
@@ -31,6 +31,11 @@
<version>${equanda-release-version}</version>
</dependency>
<dependency>
+ <groupId>org.equanda</groupId>
+ <artifactId>equanda-t5navigation</artifactId>
+ <version>${equanda-release-version}</version>
+ </dependency>
+ <dependency>
<groupId>org.chenillekit</groupId>
<artifactId>chenillekit-tapestry</artifactId>
<version>${chenillekit-version}</version>
@@ -75,10 +80,12 @@
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<configuration>
- <archiveClasses>true</archiveClasses>
+ <!--<archiveClasses>true</archiveClasses>-->
+ <!-- needs to be uncommented when using the JBossClassLoader
<warSourceExcludes>
- WEB-INF/lib/javassist*.jar,WEB-INF/lib/log4j*.jar,WEB-INF/lib/commons-*.jar
+ WEB-INF/lib/javassist*.jar,WEB-INF/lib/log4j*.jar,WEB-INF/lib/commons-codec*.jar,WEB-INF/lib/commons-collections*.jar,WEB-INF/lib/commons-httpclient*.jar,WEB-INF/lib/commons-logging*.jar
</warSourceExcludes>
+ -->
</configuration>
</plugin>
<plugin>
Added: t5-equanda-example/src/main/java/org/equanda/example/t5/pages/PageA.java
===================================================================
--- t5-equanda-example/src/main/java/org/equanda/example/t5/pages/PageA.java (rev 0)
+++ t5-equanda-example/src/main/java/org/equanda/example/t5/pages/PageA.java 2009-01-30 10:06:18 UTC (rev 1003)
@@ -0,0 +1,126 @@
+/**
+ * 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 org 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.example.t5.pages;
+
+import org.apache.tapestry5.ComponentResources;
+import org.apache.tapestry5.annotations.InjectPage;
+import org.apache.tapestry5.annotations.Persist;
+import org.apache.tapestry5.annotations.Environmental;
+import org.apache.tapestry5.annotations.Property;
+import org.apache.tapestry5.ioc.annotations.Inject;
+import org.equanda.t5nav.services.NavigationManager;
+import org.equanda.t5nav.services.NavigationContext;
+
+import java.util.Date;
+
+/**
+ * Navigations demonstration page
+ *
+ * @author <a href="mailto:jo...@pr...">Joachim Van der Auwera</a>
+ */
+public class PageA
+{
+ @Persist
+ private Object returnPage;
+
+ private Object nextPage; // page to move to after submit
+
+ @Inject
+ private ComponentResources resources;
+
+ @Persist
+ private String persistedValue;
+
+ @Inject
+ private NavigationManager navigationManager;
+
+ @Environmental
+ private NavigationContext navigation;
+
+ @InjectPage
+ private PageB pageB;
+
+ @InjectPage
+ private PageC pageC;
+
+ public void setReturnPage( Object returnPage )
+ {
+ this.returnPage = returnPage;
+ }
+
+ public String getPersistedValue()
+ {
+ return persistedValue;
+ }
+
+ public void setPersistedValue( String persistedValue )
+ {
+ this.persistedValue = persistedValue;
+ }
+
+ final public void onSelectedFromCancel()
+ {
+ nextPage = returnPage;
+ if ( null == returnPage ) nextPage = "Start";
+ }
+
+ final public Object onSubmit()
+ {
+ if ( null != nextPage ) resources.discardPersistentFieldChanges();
+ return nextPage;
+ }
+
+ Object onActionFromPageBNormal()
+ {
+ pageB.setReturnPage( resources.createPageLink( resources.getPageName(), false ) );
+ pageB.setPersistedValue( "from A, " + new Date().toString() );
+ return pageB;
+ }
+
+ Object onActionFromPageBNavigation()
+ {
+ navigationManager.beginNavigation();
+ return onActionFromPageBNormal();
+ }
+
+ Object onActionFromPageCNormal()
+ {
+ pageC.setReturnPage( resources.createPageLink( resources.getPageName(), false ) );
+ pageC.setPersistedValue( "from A, " + new Date().toString() );
+ return pageC;
+ }
+
+ Object onActionFromPageCNavigation()
+ {
+ navigationManager.beginNavigation();
+ return onActionFromPageCNormal();
+ }
+
+ Object onActionFromReturn()
+ {
+ navigationManager.endNavigation( null );
+ return returnPage;
+ }
+}
Added: t5-equanda-example/src/main/java/org/equanda/example/t5/pages/PageB.java
===================================================================
--- t5-equanda-example/src/main/java/org/equanda/example/t5/pages/PageB.java (rev 0)
+++ t5-equanda-example/src/main/java/org/equanda/example/t5/pages/PageB.java 2009-01-30 10:06:18 UTC (rev 1003)
@@ -0,0 +1,125 @@
+/**
+ * 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 org 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.example.t5.pages;
+
+import org.apache.tapestry5.annotations.Persist;
+import org.apache.tapestry5.annotations.InjectPage;
+import org.apache.tapestry5.annotations.Environmental;
+import org.apache.tapestry5.ioc.annotations.Inject;
+import org.apache.tapestry5.ComponentResources;
+import org.equanda.t5nav.services.NavigationContext;
+import org.equanda.t5nav.services.NavigationManager;
+
+import java.util.Date;
+
+/**
+ * Navigations demonstration page
+ *
+ * @author <a href="mailto:jo...@pr...">Joachim Van der Auwera</a>
+ */
+public class PageB
+{
+ @Persist
+ private Object returnPage;
+
+ private Object nextPage; // page to move to after submit
+
+ @Inject
+ private ComponentResources resources;
+
+ @Persist
+ private String persistedValue;
+
+ @Inject
+ private NavigationManager navigationManager;
+
+ @Environmental
+ private NavigationContext navigation;
+
+ @InjectPage
+ private PageA pageA;
+
+ @InjectPage
+ private PageC pageC;
+
+ public void setReturnPage( Object returnPage )
+ {
+ this.returnPage = returnPage;
+ }
+
+ public String getPersistedValue()
+ {
+ return persistedValue;
+ }
+
+ public void setPersistedValue( String persistedValue )
+ {
+ this.persistedValue = persistedValue;
+ }
+
+ final public void onSelectedFromCancel()
+ {
+ nextPage = returnPage;
+ if ( null == returnPage ) nextPage = "Start";
+ }
+
+ final public Object onSubmit()
+ {
+ if ( null != nextPage ) resources.discardPersistentFieldChanges();
+ return nextPage;
+ }
+
+ Object onActionFromPageANormal()
+ {
+ pageA.setReturnPage( resources.createPageLink( resources.getPageName(), false ) );
+ pageA.setPersistedValue( "from B, " + new Date().toString() );
+ return pageA;
+ }
+
+ Object onActionFromPageANavigation()
+ {
+ navigationManager.beginNavigation();
+ return onActionFromPageANormal();
+ }
+
+ Object onActionFromPageCNormal()
+ {
+ pageC.setReturnPage( resources.createPageLink( resources.getPageName(), false ) );
+ pageC.setPersistedValue( "from B, " + new Date().toString() );
+ return pageC;
+ }
+
+ Object onActionFromPageCNavigation()
+ {
+ navigationManager.beginNavigation();
+ return onActionFromPageCNormal();
+ }
+
+ Object onActionFromReturn()
+ {
+ navigationManager.endNavigation( null );
+ return returnPage;
+ }
+}
Added: t5-equanda-example/src/main/java/org/equanda/example/t5/pages/PageC.java
===================================================================
--- t5-equanda-example/src/main/java/org/equanda/example/t5/pages/PageC.java (rev 0)
+++ t5-equanda-example/src/main/java/org/equanda/example/t5/pages/PageC.java 2009-01-30 10:06:18 UTC (rev 1003)
@@ -0,0 +1,125 @@
+/**
+ * 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 org 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.example.t5.pages;
+
+import org.apache.tapestry5.annotations.Persist;
+import org.apache.tapestry5.annotations.InjectPage;
+import org.apache.tapestry5.annotations.Environmental;
+import org.apache.tapestry5.ioc.annotations.Inject;
+import org.apache.tapestry5.ComponentResources;
+import org.equanda.t5nav.services.NavigationContext;
+import org.equanda.t5nav.services.NavigationManager;
+
+import java.util.Date;
+
+/**
+ * Navigations demonstration page
+ *
+ * @author <a href="mailto:jo...@pr...">Joachim Van der Auwera</a>
+ */
+public class PageC
+{
+ @Persist
+ private Object returnPage;
+
+ private Object nextPage; // page to move to after submit
+
+ @Inject
+ private ComponentResources resources;
+
+ @Persist
+ private String persistedValue;
+
+ @Inject
+ private NavigationManager navigationManager;
+
+ @Environmental
+ private NavigationContext navigation;
+
+ @InjectPage
+ private PageA pageA;
+
+ @InjectPage
+ private PageB pageB;
+
+ public void setReturnPage( Object returnPage )
+ {
+ this.returnPage = returnPage;
+ }
+
+ public String getPersistedValue()
+ {
+ return persistedValue;
+ }
+
+ public void setPersistedValue( String persistedValue )
+ {
+ this.persistedValue = persistedValue;
+ }
+
+ final public void onSelectedFromCancel()
+ {
+ nextPage = returnPage;
+ if ( null == returnPage ) nextPage = "Start";
+ }
+
+ final public Object onSubmit()
+ {
+ if ( null != nextPage ) resources.discardPersistentFieldChanges();
+ return nextPage;
+ }
+
+ Object onActionFromPageANormal()
+ {
+ pageA.setReturnPage( resources.createPageLink( resources.getPageName(), false ) );
+ pageA.setPersistedValue( "from C, " + new Date().toString() );
+ return pageA;
+ }
+
+ Object onActionFromPageANavigation()
+ {
+ navigationManager.beginNavigation();
+ return onActionFromPageANormal();
+ }
+
+ Object onActionFromPageBNormal()
+ {
+ pageB.setReturnPage( resources.createPageLink( resources.getPageName(), false ) );
+ pageB.setPersistedValue( "from C, " + new Date().toString() );
+ return pageB;
+ }
+
+ Object onActionFromPageBNavigation()
+ {
+ navigationManager.beginNavigation();
+ return onActionFromPageBNormal();
+ }
+
+ Object onActionFromReturn()
+ {
+ navigationManager.endNavigation( null );
+ return returnPage;
+ }
+}
Added: t5-equanda-example/src/main/resources/org/equanda/example/t5/pages/PageA.tml
===================================================================
--- t5-equanda-example/src/main/resources/org/equanda/example/t5/pages/PageA.tml (rev 0)
+++ t5-equanda-example/src/main/resources/org/equanda/example/t5/pages/PageA.tml 2009-01-30 10:06:18 UTC (rev 1003)
@@ -0,0 +1,26 @@
+<html xmlns:t="http://tapestry.apache.org/schema/tapestry_5_0_0.xsd">
+<head>
+ <meta http-equiv="Content-Language" content="en"/>
+ <title>conversatons test</title>
+</head>
+
+<body>
+
+ <h1>Page A</h1>
+
+ <p>Persisted value is : <b>${persistedValue}</b></p>
+
+ <ul>
+ <li><t:actionlink t:id="PageBNormal">to Page B (normal)</t:actionlink></li>
+ <li><t:actionlink t:id="PageBConversation">to Page B (conversation)</t:actionlink></li>
+ <li></li>
+ <li><t:actionlink t:id="PageCNormal">to Page C (normal)</t:actionlink></li>
+ <li><t:actionlink t:id="PageCConversation">to Page C (conversation)</t:actionlink></li>
+ <li></li>
+ <li><t:actionlink t:id="return">return to previous</t:actionlink></li>
+ <li></li>
+ </ul>
+
+</body>
+</html>
+
Added: t5-equanda-example/src/main/resources/org/equanda/example/t5/pages/PageB.tml
===================================================================
--- t5-equanda-example/src/main/resources/org/equanda/example/t5/pages/PageB.tml (rev 0)
+++ t5-equanda-example/src/main/resources/org/equanda/example/t5/pages/PageB.tml 2009-01-30 10:06:18 UTC (rev 1003)
@@ -0,0 +1,26 @@
+<html xmlns:t="http://tapestry.apache.org/schema/tapestry_5_0_0.xsd">
+<head>
+ <meta http-equiv="Content-Language" content="en"/>
+ <title>conversatons test</title>
+</head>
+
+<body>
+
+ <h1>Page B</h1>
+
+ <p>Persisted value is : <b>${persistedValue}</b></p>
+
+ <ul>
+ <li><t:actionlink t:id="PageANormal">to Page A (normal)</t:actionlink></li>
+ <li><t:actionlink t:id="PageAConversation">to Page A (conversation)</t:actionlink></li>
+ <li></li>
+ <li><t:actionlink t:id="PageCNormal">to Page C (normal)</t:actionlink></li>
+ <li><t:actionlink t:id="PageCConversation">to Page C (conversation)</t:actionlink></li>
+ <li></li>
+ <li><t:actionlink t:id="return">return to previous</t:actionlink></li>
+ <li></li>
+ </ul>
+
+</body>
+</html>
+
Added: t5-equanda-example/src/main/resources/org/equanda/example/t5/pages/PageC.tml
===================================================================
--- t5-equanda-example/src/main/resources/org/equanda/example/t5/pages/PageC.tml (rev 0)
+++ t5-equanda-example/src/main/resources/org/equanda/example/t5/pages/PageC.tml 2009-01-30 10:06:18 UTC (rev 1003)
@@ -0,0 +1,26 @@
+<html xmlns:t="http://tapestry.apache.org/schema/tapestry_5_0_0.xsd">
+<head>
+ <meta http-equiv="Content-Language" content="en"/>
+ <title>conversatons test</title>
+</head>
+
+<body>
+
+ <h1>Page C</h1>
+
+ <p>Persisted value is : <b>${persistedValue}</b></p>
+
+ <ul>
+ <li><t:actionlink t:id="PageANormal">to Page A (normal)</t:actionlink></li>
+ <li><t:actionlink t:id="PageAConversation">to Page A (conversation)</t:actionlink></li>
+ <li></li>
+ <li><t:actionlink t:id="PageBNormal">to Page B (normal)</t:actionlink></li>
+ <li><t:actionlink t:id="PageBConversation">to Page B (conversation)</t:actionlink></li>
+ <li></li>
+ <li><t:actionlink t:id="return">return to previous</t:actionlink></li>
+ <li></li>
+ </ul>
+
+</body>
+</html>
+
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <tri...@us...> - 2009-01-30 09:57:40
|
Revision: 1002
http://equanda.svn.sourceforge.net/equanda/?rev=1002&view=rev
Author: triathlon98
Date: 2009-01-30 09:57:32 +0000 (Fri, 30 Jan 2009)
Log Message:
-----------
EQ-297 mini-conversations as basis of advanced navigation support
Modified Paths:
--------------
trunk/pom.xml
Added Paths:
-----------
trunk/equanda-t5navigation/
trunk/equanda-t5navigation/pom.xml
trunk/equanda-t5navigation/src/
trunk/equanda-t5navigation/src/main/
trunk/equanda-t5navigation/src/main/java/
trunk/equanda-t5navigation/src/main/java/org/
trunk/equanda-t5navigation/src/main/java/org/equanda/
trunk/equanda-t5navigation/src/main/java/org/equanda/t5nav/
trunk/equanda-t5navigation/src/main/java/org/equanda/t5nav/internal/
trunk/equanda-t5navigation/src/main/java/org/equanda/t5nav/internal/NavigationContextImpl.java
trunk/equanda-t5navigation/src/main/java/org/equanda/t5nav/internal/NavigationContextLinkListener.java
trunk/equanda-t5navigation/src/main/java/org/equanda/t5nav/internal/NavigationDispatcher.java
trunk/equanda-t5navigation/src/main/java/org/equanda/t5nav/internal/NavigationFactoryImpl.java
trunk/equanda-t5navigation/src/main/java/org/equanda/t5nav/internal/NavigationManagerImpl.java
trunk/equanda-t5navigation/src/main/java/org/equanda/t5nav/internal/NavigationPersistentFieldChange.java
trunk/equanda-t5navigation/src/main/java/org/equanda/t5nav/internal/NavigationPersistentFieldStrategy.java
trunk/equanda-t5navigation/src/main/java/org/equanda/t5nav/internal/PersistentFieldManagerDecorator.java
trunk/equanda-t5navigation/src/main/java/org/equanda/t5nav/services/
trunk/equanda-t5navigation/src/main/java/org/equanda/t5nav/services/NavigationConstants.java
trunk/equanda-t5navigation/src/main/java/org/equanda/t5nav/services/NavigationContext.java
trunk/equanda-t5navigation/src/main/java/org/equanda/t5nav/services/NavigationFactory.java
trunk/equanda-t5navigation/src/main/java/org/equanda/t5nav/services/NavigationManager.java
trunk/equanda-t5navigation/src/main/java/org/equanda/t5nav/services/NavigationModule.java
trunk/equanda-t5navigation/src/main/java/org/equanda/t5nav/services/NavigationTracker.java
trunk/equanda-t5navigation/src/main/site/
trunk/equanda-t5navigation/src/main/site/site.xml
trunk/equanda-t5navigation/src/main/site/wiki/
Added: trunk/equanda-t5navigation/pom.xml
===================================================================
--- trunk/equanda-t5navigation/pom.xml (rev 0)
+++ trunk/equanda-t5navigation/pom.xml 2009-01-30 09:57:32 UTC (rev 1002)
@@ -0,0 +1,45 @@
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+ <parent>
+ <groupId>org.equanda</groupId>
+ <artifactId>equanda</artifactId>
+ <version>0.9.3-SNAPSHOT</version>
+ </parent>
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>org.equanda</groupId>
+ <artifactId>equanda-t5navigation</artifactId>
+ <packaging>jar</packaging>
+ <version>0.9.3-SNAPSHOT</version>
+ <name>equanda-t5navigation</name>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-jar-plugin</artifactId>
+ <configuration>
+ <archive>
+ <manifestEntries>
+ <Tapestry-Module-Classes>org.equanda.t5nav.services.NavigationModule</Tapestry-Module-Classes>
+ </manifestEntries>
+ </archive>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+ <dependencies>
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.tapestry</groupId>
+ <artifactId>tapestry-core</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>javax.servlet</groupId>
+ <artifactId>servlet-api</artifactId>
+ <scope>provided</scope>
+ </dependency>
+ </dependencies>
+</project>
Added: trunk/equanda-t5navigation/src/main/java/org/equanda/t5nav/internal/NavigationContextImpl.java
===================================================================
--- trunk/equanda-t5navigation/src/main/java/org/equanda/t5nav/internal/NavigationContextImpl.java (rev 0)
+++ trunk/equanda-t5navigation/src/main/java/org/equanda/t5nav/internal/NavigationContextImpl.java 2009-01-30 09:57:32 UTC (rev 1002)
@@ -0,0 +1,126 @@
+/**
+ * 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.t5nav.internal;
+
+import org.apache.tapestry5.services.PersistentFieldChange;
+import org.equanda.t5nav.services.NavigationContext;
+
+import java.util.*;
+
+/**
+ * Navigation context implementation
+ *
+ * @author Kristian Marinkovic
+ */
+public class NavigationContextImpl
+ implements NavigationContext
+{
+ private static final long serialVersionUID = 4630759126161967285L;
+
+ private final long id;
+ private final long previousId;
+
+ private final Date creationDate;
+
+ private boolean valid = true;
+
+ /** contains all PeristentFieldChange objects per page */
+ private Map<String, Set<PersistentFieldChange>> pageFieldChanges =
+ new HashMap<String, Set<PersistentFieldChange>>();
+
+ public NavigationContextImpl( long id )
+ {
+ System.out.println( "creating conversation context, no previous" );
+ this.id = id;
+ this.creationDate = new Date();
+ previousId = 0;
+ }
+
+ public NavigationContextImpl( long id, long previous )
+ {
+ System.out.println( "creating conversation context, previous=" + previous );
+ this.id = id;
+ this.creationDate = new Date();
+ this.previousId = previous;
+ }
+
+ public long getId()
+ {
+ return id;
+ }
+
+ public boolean isValid()
+ {
+ return valid;
+ }
+
+ public long invalidate()
+ {
+ valid = false;
+ pageFieldChanges.clear();
+ return previousId;
+ }
+
+ public Date getCreationDate()
+ {
+ return creationDate;
+ }
+
+ public long getPreviousId()
+ {
+ return previousId;
+ }
+
+ public void addPersistentField( String pageName, PersistentFieldChange persistentField )
+ {
+ Set<PersistentFieldChange> fieldChangeList = pageFieldChanges.get( pageName );
+
+ if ( fieldChangeList == null )
+ {
+ pageFieldChanges.put( pageName, fieldChangeList = new HashSet<PersistentFieldChange>() );
+ }
+
+ // The identy of a ConversionPersistentFieldChange instance is determined by componentId and
+ // fieldId therefore we have to check whether an instance already exist and replace it with
+ // the new one, because the value is different (future optimization if necessary: reduce
+ // ConversionPersistentFieldChange instantiation)
+ if ( fieldChangeList.contains( persistentField ) )
+ {
+ fieldChangeList.remove( persistentField );
+ }
+
+ fieldChangeList.add( persistentField );
+ }
+
+ public void removeAllFields( String pageName )
+ {
+ pageFieldChanges.remove( pageName );
+ }
+
+ public Collection<PersistentFieldChange> getPeristentFields( String pageName )
+ {
+ return pageFieldChanges.get( pageName );
+ }
+}
Added: trunk/equanda-t5navigation/src/main/java/org/equanda/t5nav/internal/NavigationContextLinkListener.java
===================================================================
--- trunk/equanda-t5navigation/src/main/java/org/equanda/t5nav/internal/NavigationContextLinkListener.java (rev 0)
+++ trunk/equanda-t5navigation/src/main/java/org/equanda/t5nav/internal/NavigationContextLinkListener.java 2009-01-30 09:57:32 UTC (rev 1002)
@@ -0,0 +1,79 @@
+/**
+ * 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.t5nav.internal;
+
+import org.apache.tapestry5.Link;
+import org.apache.tapestry5.internal.services.LinkFactory;
+import org.apache.tapestry5.internal.services.LinkFactoryListener;
+import org.apache.tapestry5.services.ApplicationStateManager;
+import org.equanda.t5nav.services.NavigationContext;
+import org.equanda.t5nav.services.NavigationConstants;
+
+/**
+ * Navigation context link listener, assure links contain the navigation context as parameter
+ *
+ * @author Kristian Marinkovic
+ */
+public class NavigationContextLinkListener
+ implements LinkFactoryListener
+{
+
+ private final ApplicationStateManager asoManager;
+
+ public NavigationContextLinkListener( ApplicationStateManager asoManager, LinkFactory linkFactory )
+ {
+ this.asoManager = asoManager;
+
+ // will be created and set because service has EagerLoad set.
+ linkFactory.addListener( this );
+ }
+
+ public void createdPageRenderLink( Link link )
+ {
+ addContextParameter( link );
+ }
+
+ public void createdComponentEventLink( Link link )
+ {
+ addContextParameter( link );
+ }
+
+ private void addContextParameter( Link link )
+ {
+ if ( !asoManager.exists( NavigationContext.class ) )
+ {
+ return;
+ }
+
+ NavigationContext context = asoManager.get( NavigationContext.class );
+
+ if ( !context.isValid() )
+ {
+ return;
+ }
+
+ link.addParameter( NavigationConstants.NAVIGATION_ID_PARAMETER, Long.toString( context.getId() ) );
+ }
+}
Added: trunk/equanda-t5navigation/src/main/java/org/equanda/t5nav/internal/NavigationDispatcher.java
===================================================================
--- trunk/equanda-t5navigation/src/main/java/org/equanda/t5nav/internal/NavigationDispatcher.java (rev 0)
+++ trunk/equanda-t5navigation/src/main/java/org/equanda/t5nav/internal/NavigationDispatcher.java 2009-01-30 09:57:32 UTC (rev 1002)
@@ -0,0 +1,179 @@
+/**
+ * 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.t5nav.internal;
+
+import org.apache.tapestry5.MarkupWriter;
+import org.apache.tapestry5.services.*;
+import org.equanda.t5nav.services.NavigationContext;
+import org.equanda.t5nav.services.NavigationTracker;
+import org.equanda.t5nav.services.NavigationConstants;
+
+import java.io.IOException;
+
+/**
+ * Checks whether the request contains a "conversationID" parameter
+ * and reads the current ConversationContext from the ConversationTracker
+ * that resides in the session (ASO). The current ConversationContext is then
+ * explicitly set in the session and during PageRenderInitialize in the Environment.
+ * All subsequent services should only use the ConversationContext from the session
+ * or from the Environment.
+ *
+ * @author Kristian Marinkovic
+ */
+public class NavigationDispatcher
+ implements Dispatcher, MarkupRendererFilter
+{
+ private final ApplicationStateManager asoManager;
+ private final Environment environment;
+
+ public NavigationDispatcher( ApplicationStateManager asoManager, Environment environment )
+ {
+ this.asoManager = asoManager;
+ this.environment = environment;
+ }
+
+ public boolean dispatch( Request request, Response response )
+ throws IOException
+ {
+ NavigationContext context = getCurrentContextFromTracker(
+ request.getParameter( NavigationConstants.NAVIGATION_ID_PARAMETER ) );
+
+ while ( null != context && !context.isValid() )
+ {
+ long previous = context.getPreviousId();
+ System.out.println( "dispatcher 'isValid' handling, previous is " + previous );
+ getTracker().remove( context.getId() );
+ if ( previous > 0 )
+ {
+ context = getTracker().get( previous );
+ asoManager.set( NavigationContext.class, context );
+ }
+ else
+ {
+ context = null;
+ }
+ }
+
+ if ( context != null )
+ {
+ asoManager.set( NavigationContext.class, context );
+ System.out.println( "conversation id = " + context.getId() );
+ }
+
+ return false;
+ }
+
+ /** sets/removes the ConversionContext in/from the Environment */
+ public void renderMarkup( MarkupWriter writer, MarkupRenderer renderer )
+ {
+ NavigationContext currentContext = getCurrentContextFromASO();
+
+ while ( null != currentContext && !currentContext.isValid() )
+ {
+ long previous = currentContext.getPreviousId();
+ System.out.println( "renderMarkup 'invalid' handling, to " + previous );
+ getTracker().remove( currentContext.getId() );
+ if ( previous > 0 )
+ {
+ currentContext = getTracker().get( previous );
+ asoManager.set( NavigationContext.class, currentContext );
+ }
+ else
+ {
+ currentContext = null;
+ }
+ }
+
+ if ( currentContext != null && currentContext.isValid() )
+ {
+ environment.push( NavigationContext.class, currentContext );
+ System.out.println( "conversation id = " + currentContext.getId() );
+ }
+ renderer.renderMarkup( writer );
+
+ currentContext = environment.peek( NavigationContext.class );
+
+ if ( currentContext != null )
+ {
+ environment.pop( NavigationContext.class );
+ }
+ }
+
+ /**
+ * creates a ConversationTracker if it does not already exist within
+ * the session. The ApplicationStateManager is used to persist the
+ * ConversationTracker
+ *
+ * @return conversationTracker
+ */
+ private NavigationTracker getTracker()
+ {
+ NavigationTracker tracker;
+
+ if ( asoManager.exists( NavigationTracker.class ) )
+ {
+ tracker = asoManager.get( NavigationTracker.class );
+ }
+ else
+ {
+ tracker = new NavigationTracker();
+ asoManager.set( NavigationTracker.class, tracker );
+ }
+
+ return tracker;
+ }
+
+ private NavigationContext getCurrentContextFromTracker( String id )
+ {
+ if ( id == null )
+ {
+ return null;
+ }
+
+ if ( !asoManager.exists( NavigationTracker.class ) )
+ {
+ return null;
+ }
+
+ NavigationTracker tracker = asoManager.get( NavigationTracker.class );
+
+ if ( tracker == null )
+ {
+ return null;
+ }
+
+ return tracker.get( Long.valueOf( id ) );
+ }
+
+ private NavigationContext getCurrentContextFromASO()
+ {
+ if ( !asoManager.exists( NavigationContext.class ) )
+ {
+ return null;
+ }
+
+ return asoManager.get( NavigationContext.class );
+ }
+}
Added: trunk/equanda-t5navigation/src/main/java/org/equanda/t5nav/internal/NavigationFactoryImpl.java
===================================================================
--- trunk/equanda-t5navigation/src/main/java/org/equanda/t5nav/internal/NavigationFactoryImpl.java (rev 0)
+++ trunk/equanda-t5navigation/src/main/java/org/equanda/t5nav/internal/NavigationFactoryImpl.java 2009-01-30 09:57:32 UTC (rev 1002)
@@ -0,0 +1,55 @@
+/**
+ * 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.t5nav.internal;
+
+import org.equanda.t5nav.services.NavigationFactory;
+import org.equanda.t5nav.services.NavigationContext;
+
+/**
+ * Factory which creates navigation contaxts
+ *
+ * @author Kristian Marinkovic
+ */
+public class NavigationFactoryImpl
+ implements NavigationFactory
+{
+ private static long COUNTER = 1;
+
+ public NavigationContext create()
+ {
+ return new NavigationContextImpl( getNextValue() );
+ }
+
+ public NavigationContext create( long previous )
+ {
+ return new NavigationContextImpl( getNextValue(), previous );
+ }
+
+ private synchronized long getNextValue()
+ {
+ // just for testing
+ return COUNTER++;
+ }
+}
\ No newline at end of file
Added: trunk/equanda-t5navigation/src/main/java/org/equanda/t5nav/internal/NavigationManagerImpl.java
===================================================================
--- trunk/equanda-t5navigation/src/main/java/org/equanda/t5nav/internal/NavigationManagerImpl.java (rev 0)
+++ trunk/equanda-t5navigation/src/main/java/org/equanda/t5nav/internal/NavigationManagerImpl.java 2009-01-30 09:57:32 UTC (rev 1002)
@@ -0,0 +1,124 @@
+/**
+ * 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.t5nav.internal;
+
+import org.apache.tapestry5.services.ApplicationStateManager;
+import org.equanda.t5nav.services.NavigationFactory;
+import org.equanda.t5nav.services.NavigationContext;
+import org.equanda.t5nav.services.NavigationTracker;
+import org.equanda.t5nav.services.NavigationManager;
+
+/**
+ * Navigation manager
+ *
+ * @author Kristian Marinkovic
+ */
+public class NavigationManagerImpl
+ implements NavigationManager
+{
+ private final ApplicationStateManager asoManager;
+ private final NavigationFactory navigationFactory;
+
+ public NavigationManagerImpl(
+ NavigationFactory navigationFactory,
+ ApplicationStateManager asoManager )
+ {
+ this.asoManager = asoManager;
+ this.navigationFactory = navigationFactory;
+ }
+
+ public void beginConversation()
+ {
+ beginNavigation( true );
+ }
+
+ public void beginNavigation( boolean chain )
+ {
+ long previous = 0;
+ if ( chain )
+ {
+ NavigationContext context = asoManager.getIfExists( NavigationContext.class );
+ if ( null != context )
+ {
+ previous = context.getId();
+ }
+ else
+ {
+ System.out.println( "there is no current conversation" );
+ }
+ }
+ System.out.println( "begin a new conversation, chain=" + chain + ", previous=" + previous );
+ NavigationContext context = navigationFactory.create( previous );
+ getTracker().add( context );
+ asoManager.set( NavigationContext.class, context );
+ }
+
+ /**
+ * creates a ConversationTracker if it does not already exist within
+ * the session. The ApplicationStateManager is used to persist the
+ * ConversationTracker
+ *
+ * @return conversationTracker
+ */
+ private NavigationTracker getTracker()
+ {
+ NavigationTracker tracker;
+
+ if ( asoManager.exists( NavigationTracker.class ) )
+ {
+ tracker = asoManager.get( NavigationTracker.class );
+ }
+ else
+ {
+ tracker = new NavigationTracker();
+ asoManager.set( NavigationTracker.class, tracker );
+ }
+
+ return tracker;
+ }
+
+ /**
+ * Removes the ConversationContext from the ConversationTracker and
+ * invalidates it.
+ */
+ public NavigationContext endNavigation( NavigationContext navigation )
+ {
+ System.out.println( "endNavigation" );
+ if ( null == navigation ) navigation = asoManager.getIfExists( NavigationContext.class );
+ if ( null == navigation ) return null;
+ System.out.println( "was inside navigation" + navigation.getId() );
+ long previous = navigation.getPreviousId();
+ navigation.invalidate();
+ //getTracker().remove(navigation.getId());
+ if ( previous > 0 )
+ {
+ System.out.println( "will need to go back to " + previous );
+ NavigationContext context = getTracker().get( previous );
+ asoManager.set( NavigationContext.class, context );
+ return context;
+ }
+ return null;
+ }
+}
Added: trunk/equanda-t5navigation/src/main/java/org/equanda/t5nav/internal/NavigationPersistentFieldChange.java
===================================================================
--- trunk/equanda-t5navigation/src/main/java/org/equanda/t5nav/internal/NavigationPersistentFieldChange.java (rev 0)
+++ trunk/equanda-t5navigation/src/main/java/org/equanda/t5nav/internal/NavigationPersistentFieldChange.java 2009-01-30 09:57:32 UTC (rev 1002)
@@ -0,0 +1,122 @@
+/**
+ * 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.t5nav.internal;
+
+import org.apache.tapestry5.services.PersistentFieldChange;
+
+/**
+ * Object to store the data for a persistent field
+ *
+ * @author Kristian Marinkovic
+ */
+public class NavigationPersistentFieldChange
+ implements PersistentFieldChange
+{
+ private final String componentId;
+ private final String fieldName;
+ private final Object value;
+
+ public NavigationPersistentFieldChange( String componentId, String fieldName, Object value )
+ {
+ this.componentId = componentId;
+ this.fieldName = fieldName;
+ this.value = value;
+ }
+
+ public String getComponentId()
+ {
+ return componentId;
+ }
+
+ public String getFieldName()
+ {
+ return fieldName;
+ }
+
+ public Object getValue()
+ {
+ return value;
+ }
+
+ @Override
+ public int hashCode()
+ {
+ final int prime = 31;
+ int result = 1;
+ result = prime * result
+ + ( ( componentId == null ) ? 0 : componentId.hashCode() );
+ result = prime * result
+ + ( ( fieldName == null ) ? 0 : fieldName.hashCode() );
+ return result;
+ }
+
+ @Override
+ public boolean equals( Object obj )
+ {
+ if ( this == obj )
+ {
+ return true;
+ }
+ if ( obj == null )
+ {
+ return false;
+ }
+ if ( getClass() != obj.getClass() )
+ {
+ return false;
+ }
+ final PersistentFieldChange other = (PersistentFieldChange) obj;
+ if ( componentId == null )
+ {
+ if ( other.getComponentId() != null )
+ {
+ return false;
+ }
+ }
+ else if ( !componentId.equals( other.getComponentId() ) )
+ {
+ return false;
+ }
+ if ( fieldName == null )
+ {
+ if ( other.getFieldName() != null )
+ {
+ return false;
+ }
+ }
+ else if ( !fieldName.equals( other.getFieldName() ) )
+ {
+ return false;
+ }
+ return true;
+ }
+
+ @Override
+ public String toString()
+ {
+ return "NavigationPersistentFieldChange component=" + componentId + ", field=" + fieldName + ", value="
+ + value;
+ }
+}
Added: trunk/equanda-t5navigation/src/main/java/org/equanda/t5nav/internal/NavigationPersistentFieldStrategy.java
===================================================================
--- trunk/equanda-t5navigation/src/main/java/org/equanda/t5nav/internal/NavigationPersistentFieldStrategy.java (rev 0)
+++ trunk/equanda-t5navigation/src/main/java/org/equanda/t5nav/internal/NavigationPersistentFieldStrategy.java 2009-01-30 09:57:32 UTC (rev 1002)
@@ -0,0 +1,98 @@
+/**
+ * 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.t5nav.internal;
+
+import org.apache.tapestry5.services.ApplicationStateManager;
+import org.apache.tapestry5.services.PersistentFieldChange;
+import org.apache.tapestry5.services.PersistentFieldStrategy;
+import org.equanda.t5nav.services.NavigationContext;
+
+import java.util.Collection;
+import java.util.Collections;
+
+/**
+ * Persistent field strategy which stores the data in the navigation context.
+ *
+ * @author Kristian Marinkovic
+ */
+public class NavigationPersistentFieldStrategy
+ implements PersistentFieldStrategy
+{
+ private final ApplicationStateManager asoManager;
+
+ public NavigationPersistentFieldStrategy( ApplicationStateManager asoManager )
+ {
+ this.asoManager = asoManager;
+ }
+
+ public Collection<PersistentFieldChange> gatherFieldChanges( String pageName )
+ {
+ NavigationContext context = getContextFromASO();
+
+ if ( context == null )
+ {
+ return Collections.emptyList();
+ }
+
+ Collection<PersistentFieldChange> changes = context.getPeristentFields( pageName );
+
+ if ( changes == null )
+ {
+ return Collections.emptyList();
+ }
+ else
+ {
+ return changes;
+ }
+ }
+
+ public void postChange( String pageName, String componentId, String fieldName, Object newValue )
+ {
+ NavigationContext context = getContextFromASO();
+
+ if ( context == null )
+ {
+ throw new RuntimeException( "Could not find any navigation context" );
+ }
+
+ context.addPersistentField( pageName,
+ new NavigationPersistentFieldChange( componentId, fieldName, newValue ) );
+ }
+
+ private NavigationContext getContextFromASO()
+ {
+ if ( !asoManager.exists( NavigationContext.class ) )
+ {
+ return null;
+ }
+
+ return asoManager.get( NavigationContext.class );
+ }
+
+ public void discardChanges( String pageName )
+ {
+ getContextFromASO().removeAllFields( pageName );
+ }
+}
Added: trunk/equanda-t5navigation/src/main/java/org/equanda/t5nav/internal/PersistentFieldManagerDecorator.java
===================================================================
--- trunk/equanda-t5navigation/src/main/java/org/equanda/t5nav/internal/PersistentFieldManagerDecorator.java (rev 0)
+++ trunk/equanda-t5navigation/src/main/java/org/equanda/t5nav/internal/PersistentFieldManagerDecorator.java 2009-01-30 09:57:32 UTC (rev 1002)
@@ -0,0 +1,90 @@
+/**
+ * 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.t5nav.internal;
+
+import org.apache.tapestry5.ComponentResources;
+import org.apache.tapestry5.internal.services.PersistentFieldManager;
+import org.apache.tapestry5.services.ApplicationStateManager;
+import org.apache.tapestry5.services.PersistentFieldBundle;
+import org.apache.tapestry5.services.PersistentFieldStrategy;
+import org.equanda.t5nav.services.NavigationContext;
+
+/**
+ * Decorator for persistent fields, when a navigation context exists,
+ * the NavigationPersistentFieldStrategy is be applied.
+ *
+ * @author Kristian Marinkovic
+ */
+public class PersistentFieldManagerDecorator
+ implements PersistentFieldManager
+{
+ private final PersistentFieldManager delegate;
+ private final ApplicationStateManager asoManager;
+ private final PersistentFieldStrategy conversationStrategy;
+
+ public PersistentFieldManagerDecorator( PersistentFieldManager delegate,
+ ApplicationStateManager asoManager,
+ PersistentFieldStrategy conversationStrategy )
+ {
+ this.delegate = delegate;
+ this.asoManager = asoManager;
+ this.conversationStrategy = conversationStrategy;
+ }
+
+ public PersistentFieldBundle gatherChanges( String pageName )
+ {
+ return delegate.gatherChanges( pageName );
+ }
+
+ public void postChange( String pageName, ComponentResources resources,
+ String fieldName, Object newValue )
+ {
+ if ( isInConversation() )
+ {
+ conversationStrategy.postChange( pageName, resources.getNestedId(), fieldName, newValue );
+ }
+ else
+ {
+ delegate.postChange( pageName, resources, fieldName, newValue );
+ }
+ }
+
+ private boolean isInConversation()
+ {
+ return ( asoManager.exists( NavigationContext.class ) );
+ }
+
+ public void discardChanges( String pageName )
+ {
+ if ( isInConversation() )
+ {
+ conversationStrategy.discardChanges( pageName );
+ }
+ else
+ {
+ delegate.discardChanges( pageName );
+ }
+ }
+}
Added: trunk/equanda-t5navigation/src/main/java/org/equanda/t5nav/services/NavigationConstants.java
===================================================================
--- trunk/equanda-t5navigation/src/main/java/org/equanda/t5nav/services/NavigationConstants.java (rev 0)
+++ trunk/equanda-t5navigation/src/main/java/org/equanda/t5nav/services/NavigationConstants.java 2009-01-30 09:57:32 UTC (rev 1002)
@@ -0,0 +1,37 @@
+/**
+ * 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.t5nav.services;
+
+/**
+ * Persistent field strategy which stores the data in the navigation context.
+ *
+ * @author Kristian Marinkovic
+ * @author <a href="mailto:jo...@pr...">Joachim Van der Auwera</a>
+ */
+public interface NavigationConstants
+{
+ static final String PERSISTENT_STRATEGY_NAME = "navogation";
+ static final String NAVIGATION_ID_PARAMETER = "navid";
+}
Added: trunk/equanda-t5navigation/src/main/java/org/equanda/t5nav/services/NavigationContext.java
===================================================================
--- trunk/equanda-t5navigation/src/main/java/org/equanda/t5nav/services/NavigationContext.java (rev 0)
+++ trunk/equanda-t5navigation/src/main/java/org/equanda/t5nav/services/NavigationContext.java 2009-01-30 09:57:32 UTC (rev 1002)
@@ -0,0 +1,81 @@
+/**
+ * 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.t5nav.services;
+
+import org.apache.tapestry5.services.PersistentFieldChange;
+
+import java.io.Serializable;
+import java.util.Collection;
+
+/**
+ * Represents a navigation context
+ *
+ * @author Kristian Marinkovic
+ */
+public interface NavigationContext
+ extends Serializable
+{
+ public long getId();
+
+ public boolean isValid();
+
+ /**
+ * invalidates the current ConversationContext
+ * The previously active context (or 0) is returned.
+ *
+ * @return previously active conversation context
+ */
+ public long invalidate();
+
+ /**
+ * Adds a persistentField from a page to the ConversationContext
+ *
+ * @param pageName page name
+ * @param persistentField persistence info
+ */
+ public void addPersistentField( String pageName, PersistentFieldChange persistentField );
+
+ /**
+ * Remove all fields for a page.
+ *
+ * @param pageName the name of the page
+ */
+ public void removeAllFields( String pageName );
+
+ /**
+ * Return a Collection containing all persistent fields of a page
+ *
+ * @param pageName page name
+ * @return persistence info
+ */
+ public Collection<PersistentFieldChange> getPeristentFields( String pageName );
+
+ /**
+ * Get the id of the conversation which was active when this one was created
+ *
+ * @return previously active conversation id
+ */
+ public long getPreviousId();
+}
Added: trunk/equanda-t5navigation/src/main/java/org/equanda/t5nav/services/NavigationFactory.java
===================================================================
--- trunk/equanda-t5navigation/src/main/java/org/equanda/t5nav/services/NavigationFactory.java (rev 0)
+++ trunk/equanda-t5navigation/src/main/java/org/equanda/t5nav/services/NavigationFactory.java 2009-01-30 09:57:32 UTC (rev 1002)
@@ -0,0 +1,37 @@
+/**
+ * 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.t5nav.services;
+
+/**
+ * Service which creates new navigation context
+ *
+ * @author Kristian Marinkovic
+ */
+public interface NavigationFactory
+{
+ public NavigationContext create();
+
+ public NavigationContext create( long previousId );
+}
Added: trunk/equanda-t5navigation/src/main/java/org/equanda/t5nav/services/NavigationManager.java
===================================================================
--- trunk/equanda-t5navigation/src/main/java/org/equanda/t5nav/services/NavigationManager.java (rev 0)
+++ trunk/equanda-t5navigation/src/main/java/org/equanda/t5nav/services/NavigationManager.java 2009-01-30 09:57:32 UTC (rev 1002)
@@ -0,0 +1,51 @@
+/**
+ * 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.t5nav.services;
+
+/**
+ * The navigation manager is used to start and end navigation contexts (like conversations)
+ *
+ * @author Kristian Marinkovic
+ */
+public interface NavigationManager
+{
+ /** creates a new conversation, assuring you can get back to the current on invalidation */
+ public void beginNavigation();
+
+ /**
+ * creates a new conversation. You can choose whether conversations are "chained", that is whether you can et back to the previous conversation when this one ends.
+ *
+ * @param chain should the current conversation be restored when the new one is invalidated
+ */
+ public void beginNavigation( boolean chain );
+
+ /**
+ * ends a conversation
+ *
+ * @param navigation to invalidate
+ * @return conversation which was active before this one
+ */
+ public NavigationContext endNavigation( NavigationContext navigation );
+}
\ No newline at end of file
Added: trunk/equanda-t5navigation/src/main/java/org/equanda/t5nav/services/NavigationModule.java
===================================================================
--- trunk/equanda-t5navigation/src/main/java/org/equanda/t5nav/services/NavigationModule.java (rev 0)
+++ trunk/equanda-t5navigation/src/main/java/org/equanda/t5nav/services/NavigationModule.java 2009-01-30 09:57:32 UTC (rev 1002)
@@ -0,0 +1,84 @@
+/**
+ * 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.t5nav.services;
+
+import org.apache.tapestry5.internal.services.LinkFactoryListener;
+import org.apache.tapestry5.internal.services.PersistentFieldManager;
+import org.apache.tapestry5.ioc.MappedConfiguration;
+import org.apache.tapestry5.ioc.OrderedConfiguration;
+import org.apache.tapestry5.ioc.ServiceBinder;
+import org.apache.tapestry5.services.ApplicationStateManager;
+import org.apache.tapestry5.services.Dispatcher;
+import org.apache.tapestry5.services.MarkupRendererFilter;
+import org.apache.tapestry5.services.PersistentFieldStrategy;
+import org.equanda.t5nav.internal.*;
+
+/**
+ * Container for a (string) message
+ *
+ * @author Kristian Marinkovic
+ * @author <a href="mailto:jo...@pr...">Joachim Van der Auwera</a>
+ */
+public class NavigationModule
+{
+ public static void bind( ServiceBinder binder )
+ {
+ binder.bind( NavigationDispatcher.class );
+ binder.bind( NavigationFactory.class, NavigationFactoryImpl.class );
+ binder.bind( NavigationManager.class, NavigationManagerImpl.class );
+ binder.bind( PersistentFieldStrategy.class, NavigationPersistentFieldStrategy.class );
+ binder.bind( LinkFactoryListener.class, NavigationContextLinkListener.class ).eagerLoad();
+ }
+
+ public void contributePageRenderInitializer(
+ OrderedConfiguration<MarkupRendererFilter> configuration,
+ NavigationDispatcher navigationDispatcher )
+ {
+ configuration.add( "conversationFilter", navigationDispatcher, "before:PageRenderSupport" );
+ }
+
+ public void contributeMasterDispatcher( OrderedConfiguration<Dispatcher> configuration,
+ NavigationDispatcher navigationDispatcher )
+ {
+ configuration.add( "navigationDispatcher", navigationDispatcher, "before:PageRender" );
+ }
+
+ public void contributePersistentFieldManager(
+ MappedConfiguration<String, PersistentFieldStrategy> configuration,
+ PersistentFieldStrategy conversationStrategy )
+ {
+ configuration.add( NavigationConstants.PERSISTENT_STRATEGY_NAME, conversationStrategy );
+ }
+
+ public PersistentFieldManager decoratePersistentFieldManager( Object delegate,
+ PersistentFieldStrategy conversationFieldStrategy,
+ ApplicationStateManager asoManager )
+ {
+ return new PersistentFieldManagerDecorator(
+ (PersistentFieldManager) delegate, // to be decorated service
+ asoManager, // asoManager needed to check whether in conversation
+ conversationFieldStrategy ); // conversation strategy
+ }
+}
Added: trunk/equanda-t5navigation/src/main/java/org/equanda/t5nav/services/NavigationTracker.java
===================================================================
--- trunk/equanda-t5navigation/src/main/java/org/equanda/t5nav/services/NavigationTracker.java (rev 0)
+++ trunk/equanda-t5navigation/src/main/java/org/equanda/t5nav/services/NavigationTracker.java 2009-01-30 09:57:32 UTC (rev 1002)
@@ -0,0 +1,62 @@
+/**
+ * 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.t5nav.services;
+
+import java.io.Serializable;
+import java.util.HashMap;
+import java.util.Map;
+
+/**
+ * Tracks the navigation contexts within the same session.
+ *
+ * @author Kristian Marinkovic
+ */
+public class NavigationTracker
+ implements Serializable
+{
+ private static final long serialVersionUID = 7827015484027648524L;
+
+ private Map<Long, NavigationContext> contextMap = new HashMap<Long, NavigationContext>();
+
+ public void add( NavigationContext context )
+ {
+ contextMap.put( context.getId(), context );
+ }
+
+ public boolean exists( Long contextId )
+ {
+ return contextMap.containsKey( contextId );
+ }
+
+ public NavigationContext remove( Long contextId )
+ {
+ return contextMap.remove( contextId );
+ }
+
+ public NavigationContext get( Long contextId )
+ {
+ return contextMap.get( contextId );
+ }
+}
Modified: trunk/pom.xml
===================================================================
--- trunk/pom.xml 2009-01-29 16:22:34 UTC (rev 1001)
+++ trunk/pom.xml 2009-01-30 09:57:32 UTC (rev 1002)
@@ -104,6 +104,7 @@
<module>equanda-util</module>
<module>equanda-tool</module>
<module>equanda-tapestry5</module>
+ <module>equanda-t5navigation</module>
<module>equanda-t5gui</module>
<module>equanda-client</module>
<module>equanda-server</module>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <tri...@us...> - 2009-01-29 16:22:38
|
Revision: 1001
http://equanda.svn.sourceforge.net/equanda/?rev=1001&view=rev
Author: triathlon98
Date: 2009-01-29 16:22:34 +0000 (Thu, 29 Jan 2009)
Log Message:
-----------
include hibernate-validator
Modified Paths:
--------------
trunk/equanda-server/pom.xml
Modified: trunk/equanda-server/pom.xml
===================================================================
--- trunk/equanda-server/pom.xml 2009-01-29 16:12:57 UTC (rev 1000)
+++ trunk/equanda-server/pom.xml 2009-01-29 16:22:34 UTC (rev 1001)
@@ -51,6 +51,11 @@
<scope>provided</scope>
</dependency>
<dependency>
+ <groupId>org.hibernate</groupId>
+ <artifactId>hibernate-validator</artifactId>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
<groupId>jboss</groupId>
<artifactId>jboss-serialization</artifactId>
<scope>provided</scope>
@@ -86,4 +91,4 @@
<scope>provided</scope>
</dependency>
</dependencies>
-</project>
\ No newline at end of file
+</project>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <tri...@us...> - 2009-01-29 16:13:06
|
Revision: 1000
http://equanda.svn.sourceforge.net/equanda/?rev=1000&view=rev
Author: triathlon98
Date: 2009-01-29 16:12:57 +0000 (Thu, 29 Jan 2009)
Log Message:
-----------
EQ-319 BinaryStreamResponse
Added Paths:
-----------
trunk/equanda-tapestry5/src/main/java/org/equanda/tapestry5/data/BinaryStreamResponse.java
Added: trunk/equanda-tapestry5/src/main/java/org/equanda/tapestry5/data/BinaryStreamResponse.java
===================================================================
--- trunk/equanda-tapestry5/src/main/java/org/equanda/tapestry5/data/BinaryStreamResponse.java (rev 0)
+++ trunk/equanda-tapestry5/src/main/java/org/equanda/tapestry5/data/BinaryStreamResponse.java 2009-01-29 16:12:57 UTC (rev 1000)
@@ -0,0 +1,78 @@
+/**
+ * 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.data;
+
+import org.apache.tapestry5.StreamResponse;
+import org.apache.tapestry5.services.Response;
+
+import java.io.ByteArrayInputStream;
+import java.io.IOException;
+import java.io.InputStream;
+
+/**
+ * Container for a (string) message
+ *
+ * @author <a href="mailto:jo...@pr...">Joachim Van der Auwera</a>
+ */
+public class BinaryStreamResponse
+ implements StreamResponse
+{
+ private String mimeType;
+ private String fileName;
+ private byte[] data;
+
+ public BinaryStreamResponse( byte[] data, String mime )
+ {
+ this.data = data;
+ this.mimeType = mime;
+ }
+
+ public BinaryStreamResponse( byte[] data, String mime, String fileName )
+ {
+ this.data = data;
+ this.mimeType = mime;
+ this.fileName = fileName;
+ }
+
+ public String getContentType()
+ {
+ return mimeType;
+ }
+
+ public InputStream getStream()
+ throws IOException
+ {
+ return new ByteArrayInputStream( data );
+ }
+
+ public void prepareResponse( Response response )
+ {
+ if ( null != fileName ) response.setHeader( "Content-Disposition", "attachment; filename=" + fileName );
+ if ( null != mimeType ) response.setHeader( "Content-Type", mimeType );
+ response.setHeader( "Expires", "0" );
+ response.setHeader( "Cache-Control", "must-revalidate, post-check=0, pre-check=0" );
+ response.setHeader( "Pragma", "public" );
+ }
+}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <tri...@us...> - 2009-01-26 23:42:18
|
Revision: 999
http://equanda.svn.sourceforge.net/equanda/?rev=999&view=rev
Author: triathlon98
Date: 2009-01-26 23:42:13 +0000 (Mon, 26 Jan 2009)
Log Message:
-----------
update to 0.9.3
Modified Paths:
--------------
t5-equanda-example/pom.xml
Modified: t5-equanda-example/pom.xml
===================================================================
--- t5-equanda-example/pom.xml 2009-01-26 17:39:03 UTC (rev 998)
+++ t5-equanda-example/pom.xml 2009-01-26 23:42:13 UTC (rev 999)
@@ -151,7 +151,7 @@
</pluginRepositories>
<properties>
- <equanda-release-version>0.9.2-SNAPSHOT</equanda-release-version>
+ <equanda-release-version>0.9.3-SNAPSHOT</equanda-release-version>
<tapestry-release-version>5.0.18</tapestry-release-version>
<chenillekit-version>1.0.0</chenillekit-version>
</properties>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <tri...@us...> - 2009-01-26 17:39:07
|
Revision: 998
http://equanda.svn.sourceforge.net/equanda/?rev=998&view=rev
Author: triathlon98
Date: 2009-01-26 17:39:03 +0000 (Mon, 26 Jan 2009)
Log Message:
-----------
prepare for work on 0.9.3-SNAPSHOT
Modified Paths:
--------------
trunk/equanda-client/pom.xml
trunk/equanda-dm/pom.xml
trunk/equanda-generate/pom.xml
trunk/equanda-maven-plugin/pom.xml
trunk/equanda-server/pom.xml
trunk/equanda-t5gui/pom.xml
trunk/equanda-tapestry5/pom.xml
trunk/equanda-test/pom.xml
trunk/equanda-test/test-core/pom.xml
trunk/equanda-test/test-ddltool/pom.xml
trunk/equanda-test/test-gui-t5-test/pom.xml
trunk/equanda-test/test-t5-ear/pom.xml
trunk/equanda-test/test-t5-gui/pom.xml
trunk/equanda-test/test-test/pom.xml
trunk/equanda-tool/pom.xml
trunk/equanda-util/pom.xml
trunk/pom.xml
Modified: trunk/equanda-client/pom.xml
===================================================================
--- trunk/equanda-client/pom.xml 2009-01-26 17:33:25 UTC (rev 997)
+++ trunk/equanda-client/pom.xml 2009-01-26 17:39:03 UTC (rev 998)
@@ -2,13 +2,13 @@
<parent>
<groupId>org.equanda</groupId>
<artifactId>equanda</artifactId>
- <version>0.9.2</version>
+ <version>0.9.3-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>org.equanda</groupId>
<artifactId>equanda-client</artifactId>
<packaging>jar</packaging>
- <version>0.9.2</version>
+ <version>0.9.3-SNAPSHOT</version>
<name>equanda-client</name>
<dependencies>
<dependency>
Modified: trunk/equanda-dm/pom.xml
===================================================================
--- trunk/equanda-dm/pom.xml 2009-01-26 17:33:25 UTC (rev 997)
+++ trunk/equanda-dm/pom.xml 2009-01-26 17:39:03 UTC (rev 998)
@@ -2,13 +2,13 @@
<parent>
<groupId>org.equanda</groupId>
<artifactId>equanda</artifactId>
- <version>0.9.2</version>
+ <version>0.9.3-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>org.equanda</groupId>
<artifactId>equanda-dm</artifactId>
<packaging>jar</packaging>
- <version>0.9.2</version>
+ <version>0.9.3-SNAPSHOT</version>
<name>equanda-dm</name>
<dependencies>
<dependency>
Modified: trunk/equanda-generate/pom.xml
===================================================================
--- trunk/equanda-generate/pom.xml 2009-01-26 17:33:25 UTC (rev 997)
+++ trunk/equanda-generate/pom.xml 2009-01-26 17:39:03 UTC (rev 998)
@@ -2,13 +2,13 @@
<parent>
<groupId>org.equanda</groupId>
<artifactId>equanda</artifactId>
- <version>0.9.2</version>
+ <version>0.9.3-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>org.equanda</groupId>
<artifactId>equanda-generate</artifactId>
<packaging>jar</packaging>
- <version>0.9.2</version>
+ <version>0.9.3-SNAPSHOT</version>
<name>equanda-generate</name>
<build>
<resources>
Modified: trunk/equanda-maven-plugin/pom.xml
===================================================================
--- trunk/equanda-maven-plugin/pom.xml 2009-01-26 17:33:25 UTC (rev 997)
+++ trunk/equanda-maven-plugin/pom.xml 2009-01-26 17:39:03 UTC (rev 998)
@@ -2,13 +2,13 @@
<parent>
<artifactId>equanda</artifactId>
<groupId>org.equanda</groupId>
- <version>0.9.2</version>
+ <version>0.9.3-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>org.equanda</groupId>
<artifactId>equanda-maven-plugin</artifactId>
<packaging>maven-plugin</packaging>
- <version>0.9.2</version>
+ <version>0.9.3-SNAPSHOT</version>
<name>equanda-maven-plugin</name>
<description>
Provide the maven plugins for equanda users.
Modified: trunk/equanda-server/pom.xml
===================================================================
--- trunk/equanda-server/pom.xml 2009-01-26 17:33:25 UTC (rev 997)
+++ trunk/equanda-server/pom.xml 2009-01-26 17:39:03 UTC (rev 998)
@@ -2,13 +2,13 @@
<parent>
<groupId>org.equanda</groupId>
<artifactId>equanda</artifactId>
- <version>0.9.2</version>
+ <version>0.9.3-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>org.equanda</groupId>
<artifactId>equanda-server</artifactId>
<packaging>jar</packaging>
- <version>0.9.2</version>
+ <version>0.9.3-SNAPSHOT</version>
<name>equanda-server</name>
<dependencies>
<dependency>
Modified: trunk/equanda-t5gui/pom.xml
===================================================================
--- trunk/equanda-t5gui/pom.xml 2009-01-26 17:33:25 UTC (rev 997)
+++ trunk/equanda-t5gui/pom.xml 2009-01-26 17:39:03 UTC (rev 998)
@@ -2,13 +2,13 @@
<parent>
<groupId>org.equanda</groupId>
<artifactId>equanda</artifactId>
- <version>0.9.2</version>
+ <version>0.9.3-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>org.equanda</groupId>
<artifactId>equanda-t5gui</artifactId>
<packaging>jar</packaging>
- <version>0.9.2</version>
+ <version>0.9.3-SNAPSHOT</version>
<name>equanda-t5gui</name>
<build>
Modified: trunk/equanda-tapestry5/pom.xml
===================================================================
--- trunk/equanda-tapestry5/pom.xml 2009-01-26 17:33:25 UTC (rev 997)
+++ trunk/equanda-tapestry5/pom.xml 2009-01-26 17:39:03 UTC (rev 998)
@@ -2,13 +2,13 @@
<parent>
<groupId>org.equanda</groupId>
<artifactId>equanda</artifactId>
- <version>0.9.2</version>
+ <version>0.9.3-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>org.equanda</groupId>
<artifactId>equanda-tapestry5</artifactId>
<packaging>jar</packaging>
- <version>0.9.2</version>
+ <version>0.9.3-SNAPSHOT</version>
<name>equanda-tapestry5</name>
<build>
Modified: trunk/equanda-test/pom.xml
===================================================================
--- trunk/equanda-test/pom.xml 2009-01-26 17:33:25 UTC (rev 997)
+++ trunk/equanda-test/pom.xml 2009-01-26 17:39:03 UTC (rev 998)
@@ -2,14 +2,14 @@
<parent>
<groupId>org.equanda</groupId>
<artifactId>equanda</artifactId>
- <version>0.9.2</version>
+ <version>0.9.3-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>org.equanda</groupId>
<artifactId>equanda-test</artifactId>
<packaging>pom</packaging>
- <version>0.9.2</version>
+ <version>0.9.3-SNAPSHOT</version>
<name>equanda-test</name>
<description>tests for equanda</description>
Modified: trunk/equanda-test/test-core/pom.xml
===================================================================
--- trunk/equanda-test/test-core/pom.xml 2009-01-26 17:33:25 UTC (rev 997)
+++ trunk/equanda-test/test-core/pom.xml 2009-01-26 17:39:03 UTC (rev 998)
@@ -2,13 +2,13 @@
<parent>
<groupId>org.equanda</groupId>
<artifactId>equanda-test</artifactId>
- <version>0.9.2</version>
+ <version>0.9.3-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>org.equanda.test</groupId>
<artifactId>test-core</artifactId>
<packaging>jar</packaging>
- <version>0.9.2</version>
+ <version>0.9.3-SNAPSHOT</version>
<name>test-core</name>
<description>test core</description>
<build>
Modified: trunk/equanda-test/test-ddltool/pom.xml
===================================================================
--- trunk/equanda-test/test-ddltool/pom.xml 2009-01-26 17:33:25 UTC (rev 997)
+++ trunk/equanda-test/test-ddltool/pom.xml 2009-01-26 17:39:03 UTC (rev 998)
@@ -2,13 +2,13 @@
<parent>
<groupId>org.equanda</groupId>
<artifactId>equanda-test</artifactId>
- <version>0.9.2</version>
+ <version>0.9.3-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>org.equanda.test</groupId>
<artifactId>test-ddltool</artifactId>
<packaging>jar</packaging>
- <version>0.9.2</version>
+ <version>0.9.3-SNAPSHOT</version>
<name>test-ddltool</name>
<description>test ddltool</description>
Modified: trunk/equanda-test/test-gui-t5-test/pom.xml
===================================================================
--- trunk/equanda-test/test-gui-t5-test/pom.xml 2009-01-26 17:33:25 UTC (rev 997)
+++ trunk/equanda-test/test-gui-t5-test/pom.xml 2009-01-26 17:39:03 UTC (rev 998)
@@ -2,13 +2,13 @@
<parent>
<groupId>org.equanda</groupId>
<artifactId>equanda-test</artifactId>
- <version>0.9.2</version>
+ <version>0.9.3-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>org.equanda.test</groupId>
<artifactId>test-gui-t5-test</artifactId>
<packaging>jar</packaging>
- <version>0.9.2</version>
+ <version>0.9.3-SNAPSHOT</version>
<name>test-gui-t5-test</name>
<description>test test</description>
Modified: trunk/equanda-test/test-t5-ear/pom.xml
===================================================================
--- trunk/equanda-test/test-t5-ear/pom.xml 2009-01-26 17:33:25 UTC (rev 997)
+++ trunk/equanda-test/test-t5-ear/pom.xml 2009-01-26 17:39:03 UTC (rev 998)
@@ -2,13 +2,13 @@
<parent>
<groupId>org.equanda</groupId>
<artifactId>equanda-test</artifactId>
- <version>0.9.2</version>
+ <version>0.9.3-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>org.equanda.test</groupId>
<artifactId>test-t5-ear</artifactId>
<packaging>ear</packaging>
- <version>0.9.2</version>
+ <version>0.9.3-SNAPSHOT</version>
<name>test-t5-ear</name>
<description>test ear</description>
<build>
Modified: trunk/equanda-test/test-t5-gui/pom.xml
===================================================================
--- trunk/equanda-test/test-t5-gui/pom.xml 2009-01-26 17:33:25 UTC (rev 997)
+++ trunk/equanda-test/test-t5-gui/pom.xml 2009-01-26 17:39:03 UTC (rev 998)
@@ -2,13 +2,13 @@
<parent>
<groupId>org.equanda</groupId>
<artifactId>equanda-test</artifactId>
- <version>0.9.2</version>
+ <version>0.9.3-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>org.equanda.test</groupId>
<artifactId>test-t5-gui</artifactId>
<packaging>war</packaging>
- <version>0.9.2</version>
+ <version>0.9.3-SNAPSHOT</version>
<name>test-t5-gui</name>
<description>test gui</description>
<build>
Modified: trunk/equanda-test/test-test/pom.xml
===================================================================
--- trunk/equanda-test/test-test/pom.xml 2009-01-26 17:33:25 UTC (rev 997)
+++ trunk/equanda-test/test-test/pom.xml 2009-01-26 17:39:03 UTC (rev 998)
@@ -2,13 +2,13 @@
<parent>
<groupId>org.equanda</groupId>
<artifactId>equanda-test</artifactId>
- <version>0.9.2</version>
+ <version>0.9.3-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>org.equanda.test</groupId>
<artifactId>test-test</artifactId>
<packaging>jar</packaging>
- <version>0.9.2</version>
+ <version>0.9.3-SNAPSHOT</version>
<name>test-test</name>
<description>test test</description>
Modified: trunk/equanda-tool/pom.xml
===================================================================
--- trunk/equanda-tool/pom.xml 2009-01-26 17:33:25 UTC (rev 997)
+++ trunk/equanda-tool/pom.xml 2009-01-26 17:39:03 UTC (rev 998)
@@ -2,13 +2,13 @@
<parent>
<groupId>org.equanda</groupId>
<artifactId>equanda</artifactId>
- <version>0.9.2</version>
+ <version>0.9.3-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>org.equanda</groupId>
<artifactId>equanda-tool</artifactId>
<packaging>jar</packaging>
- <version>0.9.2</version>
+ <version>0.9.3-SNAPSHOT</version>
<name>equanda-tool</name>
<dependencies>
<dependency>
Modified: trunk/equanda-util/pom.xml
===================================================================
--- trunk/equanda-util/pom.xml 2009-01-26 17:33:25 UTC (rev 997)
+++ trunk/equanda-util/pom.xml 2009-01-26 17:39:03 UTC (rev 998)
@@ -2,13 +2,13 @@
<parent>
<groupId>org.equanda</groupId>
<artifactId>equanda</artifactId>
- <version>0.9.2</version>
+ <version>0.9.3-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>org.equanda</groupId>
<artifactId>equanda-util</artifactId>
<packaging>jar</packaging>
- <version>0.9.2</version>
+ <version>0.9.3-SNAPSHOT</version>
<name>equanda-util</name>
<dependencies>
<dependency>
Modified: trunk/pom.xml
===================================================================
--- trunk/pom.xml 2009-01-26 17:33:25 UTC (rev 997)
+++ trunk/pom.xml 2009-01-26 17:39:03 UTC (rev 998)
@@ -4,7 +4,7 @@
<artifactId>equanda</artifactId>
<packaging>pom</packaging>
- <version>0.9.2</version>
+ <version>0.9.3-SNAPSHOT</version>
<name>equanda</name>
<description>
@@ -41,9 +41,9 @@
<url>http://jira.equanda.org/</url>
</issueManagement>
<scm>
- <connection>scm:svn:https://equanda.svn.sourceforge.net/svnroot/equanda/tags/equanda-0.9.2</connection>
- <developerConnection>scm:svn:https://equanda.svn.sourceforge.net/svnroot/equanda/tags/equanda-0.9.2</developerConnection>
- <url>http://equanda.svn.sourceforge.net/viewvc/equanda/tags/equanda-0.9.2</url>
+ <connection>scm:svn:https://equanda.svn.sourceforge.net/svnroot/equanda/trunk</connection>
+ <developerConnection>scm:svn:https://equanda.svn.sourceforge.net/svnroot/equanda/trunk</developerConnection>
+ <url>http://equanda.svn.sourceforge.net/viewvc/equanda/</url>
</scm>
<ciManagement>
<system>hudson</system>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <tri...@us...> - 2009-01-26 17:33:28
|
Revision: 997
http://equanda.svn.sourceforge.net/equanda/?rev=997&view=rev
Author: triathlon98
Date: 2009-01-26 17:33:25 +0000 (Mon, 26 Jan 2009)
Log Message:
-----------
release 0.9.2
Added Paths:
-----------
tags/equanda-0.9.2/
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <tri...@us...> - 2009-01-26 17:30:27
|
Revision: 996
http://equanda.svn.sourceforge.net/equanda/?rev=996&view=rev
Author: triathlon98
Date: 2009-01-26 17:30:21 +0000 (Mon, 26 Jan 2009)
Log Message:
-----------
release 0.9.2
Modified Paths:
--------------
trunk/equanda-client/pom.xml
trunk/equanda-dm/pom.xml
trunk/equanda-generate/pom.xml
trunk/equanda-maven-plugin/pom.xml
trunk/equanda-server/pom.xml
trunk/equanda-t5gui/pom.xml
trunk/equanda-tapestry5/pom.xml
trunk/equanda-test/pom.xml
trunk/equanda-test/test-core/pom.xml
trunk/equanda-test/test-ddltool/pom.xml
trunk/equanda-test/test-gui-t5-test/pom.xml
trunk/equanda-test/test-t5-ear/pom.xml
trunk/equanda-test/test-t5-gui/pom.xml
trunk/equanda-test/test-test/pom.xml
trunk/equanda-tool/pom.xml
trunk/equanda-util/pom.xml
trunk/pom.xml
Modified: trunk/equanda-client/pom.xml
===================================================================
--- trunk/equanda-client/pom.xml 2009-01-26 16:35:41 UTC (rev 995)
+++ trunk/equanda-client/pom.xml 2009-01-26 17:30:21 UTC (rev 996)
@@ -2,13 +2,13 @@
<parent>
<groupId>org.equanda</groupId>
<artifactId>equanda</artifactId>
- <version>0.9.2-SNAPSHOT</version>
+ <version>0.9.2</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>org.equanda</groupId>
<artifactId>equanda-client</artifactId>
<packaging>jar</packaging>
- <version>0.9.2-SNAPSHOT</version>
+ <version>0.9.2</version>
<name>equanda-client</name>
<dependencies>
<dependency>
Modified: trunk/equanda-dm/pom.xml
===================================================================
--- trunk/equanda-dm/pom.xml 2009-01-26 16:35:41 UTC (rev 995)
+++ trunk/equanda-dm/pom.xml 2009-01-26 17:30:21 UTC (rev 996)
@@ -2,13 +2,13 @@
<parent>
<groupId>org.equanda</groupId>
<artifactId>equanda</artifactId>
- <version>0.9.2-SNAPSHOT</version>
+ <version>0.9.2</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>org.equanda</groupId>
<artifactId>equanda-dm</artifactId>
<packaging>jar</packaging>
- <version>0.9.2-SNAPSHOT</version>
+ <version>0.9.2</version>
<name>equanda-dm</name>
<dependencies>
<dependency>
Modified: trunk/equanda-generate/pom.xml
===================================================================
--- trunk/equanda-generate/pom.xml 2009-01-26 16:35:41 UTC (rev 995)
+++ trunk/equanda-generate/pom.xml 2009-01-26 17:30:21 UTC (rev 996)
@@ -2,13 +2,13 @@
<parent>
<groupId>org.equanda</groupId>
<artifactId>equanda</artifactId>
- <version>0.9.2-SNAPSHOT</version>
+ <version>0.9.2</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>org.equanda</groupId>
<artifactId>equanda-generate</artifactId>
<packaging>jar</packaging>
- <version>0.9.2-SNAPSHOT</version>
+ <version>0.9.2</version>
<name>equanda-generate</name>
<build>
<resources>
Modified: trunk/equanda-maven-plugin/pom.xml
===================================================================
--- trunk/equanda-maven-plugin/pom.xml 2009-01-26 16:35:41 UTC (rev 995)
+++ trunk/equanda-maven-plugin/pom.xml 2009-01-26 17:30:21 UTC (rev 996)
@@ -2,13 +2,13 @@
<parent>
<artifactId>equanda</artifactId>
<groupId>org.equanda</groupId>
- <version>0.9.2-SNAPSHOT</version>
+ <version>0.9.2</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>org.equanda</groupId>
<artifactId>equanda-maven-plugin</artifactId>
<packaging>maven-plugin</packaging>
- <version>0.9.2-SNAPSHOT</version>
+ <version>0.9.2</version>
<name>equanda-maven-plugin</name>
<description>
Provide the maven plugins for equanda users.
Modified: trunk/equanda-server/pom.xml
===================================================================
--- trunk/equanda-server/pom.xml 2009-01-26 16:35:41 UTC (rev 995)
+++ trunk/equanda-server/pom.xml 2009-01-26 17:30:21 UTC (rev 996)
@@ -2,13 +2,13 @@
<parent>
<groupId>org.equanda</groupId>
<artifactId>equanda</artifactId>
- <version>0.9.2-SNAPSHOT</version>
+ <version>0.9.2</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>org.equanda</groupId>
<artifactId>equanda-server</artifactId>
<packaging>jar</packaging>
- <version>0.9.2-SNAPSHOT</version>
+ <version>0.9.2</version>
<name>equanda-server</name>
<dependencies>
<dependency>
Modified: trunk/equanda-t5gui/pom.xml
===================================================================
--- trunk/equanda-t5gui/pom.xml 2009-01-26 16:35:41 UTC (rev 995)
+++ trunk/equanda-t5gui/pom.xml 2009-01-26 17:30:21 UTC (rev 996)
@@ -2,13 +2,13 @@
<parent>
<groupId>org.equanda</groupId>
<artifactId>equanda</artifactId>
- <version>0.9.2-SNAPSHOT</version>
+ <version>0.9.2</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>org.equanda</groupId>
<artifactId>equanda-t5gui</artifactId>
<packaging>jar</packaging>
- <version>0.9.2-SNAPSHOT</version>
+ <version>0.9.2</version>
<name>equanda-t5gui</name>
<build>
Modified: trunk/equanda-tapestry5/pom.xml
===================================================================
--- trunk/equanda-tapestry5/pom.xml 2009-01-26 16:35:41 UTC (rev 995)
+++ trunk/equanda-tapestry5/pom.xml 2009-01-26 17:30:21 UTC (rev 996)
@@ -2,13 +2,13 @@
<parent>
<groupId>org.equanda</groupId>
<artifactId>equanda</artifactId>
- <version>0.9.2-SNAPSHOT</version>
+ <version>0.9.2</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>org.equanda</groupId>
<artifactId>equanda-tapestry5</artifactId>
<packaging>jar</packaging>
- <version>0.9.2-SNAPSHOT</version>
+ <version>0.9.2</version>
<name>equanda-tapestry5</name>
<build>
Modified: trunk/equanda-test/pom.xml
===================================================================
--- trunk/equanda-test/pom.xml 2009-01-26 16:35:41 UTC (rev 995)
+++ trunk/equanda-test/pom.xml 2009-01-26 17:30:21 UTC (rev 996)
@@ -2,14 +2,14 @@
<parent>
<groupId>org.equanda</groupId>
<artifactId>equanda</artifactId>
- <version>0.9.2-SNAPSHOT</version>
+ <version>0.9.2</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>org.equanda</groupId>
<artifactId>equanda-test</artifactId>
<packaging>pom</packaging>
- <version>0.9.2-SNAPSHOT</version>
+ <version>0.9.2</version>
<name>equanda-test</name>
<description>tests for equanda</description>
Modified: trunk/equanda-test/test-core/pom.xml
===================================================================
--- trunk/equanda-test/test-core/pom.xml 2009-01-26 16:35:41 UTC (rev 995)
+++ trunk/equanda-test/test-core/pom.xml 2009-01-26 17:30:21 UTC (rev 996)
@@ -2,13 +2,13 @@
<parent>
<groupId>org.equanda</groupId>
<artifactId>equanda-test</artifactId>
- <version>0.9.2-SNAPSHOT</version>
+ <version>0.9.2</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>org.equanda.test</groupId>
<artifactId>test-core</artifactId>
<packaging>jar</packaging>
- <version>0.9.2-SNAPSHOT</version>
+ <version>0.9.2</version>
<name>test-core</name>
<description>test core</description>
<build>
Modified: trunk/equanda-test/test-ddltool/pom.xml
===================================================================
--- trunk/equanda-test/test-ddltool/pom.xml 2009-01-26 16:35:41 UTC (rev 995)
+++ trunk/equanda-test/test-ddltool/pom.xml 2009-01-26 17:30:21 UTC (rev 996)
@@ -2,13 +2,13 @@
<parent>
<groupId>org.equanda</groupId>
<artifactId>equanda-test</artifactId>
- <version>0.9.2-SNAPSHOT</version>
+ <version>0.9.2</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>org.equanda.test</groupId>
<artifactId>test-ddltool</artifactId>
<packaging>jar</packaging>
- <version>0.9.2-SNAPSHOT</version>
+ <version>0.9.2</version>
<name>test-ddltool</name>
<description>test ddltool</description>
Modified: trunk/equanda-test/test-gui-t5-test/pom.xml
===================================================================
--- trunk/equanda-test/test-gui-t5-test/pom.xml 2009-01-26 16:35:41 UTC (rev 995)
+++ trunk/equanda-test/test-gui-t5-test/pom.xml 2009-01-26 17:30:21 UTC (rev 996)
@@ -2,13 +2,13 @@
<parent>
<groupId>org.equanda</groupId>
<artifactId>equanda-test</artifactId>
- <version>0.9.2-SNAPSHOT</version>
+ <version>0.9.2</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>org.equanda.test</groupId>
<artifactId>test-gui-t5-test</artifactId>
<packaging>jar</packaging>
- <version>0.9.2-SNAPSHOT</version>
+ <version>0.9.2</version>
<name>test-gui-t5-test</name>
<description>test test</description>
Modified: trunk/equanda-test/test-t5-ear/pom.xml
===================================================================
--- trunk/equanda-test/test-t5-ear/pom.xml 2009-01-26 16:35:41 UTC (rev 995)
+++ trunk/equanda-test/test-t5-ear/pom.xml 2009-01-26 17:30:21 UTC (rev 996)
@@ -2,13 +2,13 @@
<parent>
<groupId>org.equanda</groupId>
<artifactId>equanda-test</artifactId>
- <version>0.9.2-SNAPSHOT</version>
+ <version>0.9.2</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>org.equanda.test</groupId>
<artifactId>test-t5-ear</artifactId>
<packaging>ear</packaging>
- <version>0.9.2-SNAPSHOT</version>
+ <version>0.9.2</version>
<name>test-t5-ear</name>
<description>test ear</description>
<build>
Modified: trunk/equanda-test/test-t5-gui/pom.xml
===================================================================
--- trunk/equanda-test/test-t5-gui/pom.xml 2009-01-26 16:35:41 UTC (rev 995)
+++ trunk/equanda-test/test-t5-gui/pom.xml 2009-01-26 17:30:21 UTC (rev 996)
@@ -2,13 +2,13 @@
<parent>
<groupId>org.equanda</groupId>
<artifactId>equanda-test</artifactId>
- <version>0.9.2-SNAPSHOT</version>
+ <version>0.9.2</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>org.equanda.test</groupId>
<artifactId>test-t5-gui</artifactId>
<packaging>war</packaging>
- <version>0.9.2-SNAPSHOT</version>
+ <version>0.9.2</version>
<name>test-t5-gui</name>
<description>test gui</description>
<build>
Modified: trunk/equanda-test/test-test/pom.xml
===================================================================
--- trunk/equanda-test/test-test/pom.xml 2009-01-26 16:35:41 UTC (rev 995)
+++ trunk/equanda-test/test-test/pom.xml 2009-01-26 17:30:21 UTC (rev 996)
@@ -2,13 +2,13 @@
<parent>
<groupId>org.equanda</groupId>
<artifactId>equanda-test</artifactId>
- <version>0.9.2-SNAPSHOT</version>
+ <version>0.9.2</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>org.equanda.test</groupId>
<artifactId>test-test</artifactId>
<packaging>jar</packaging>
- <version>0.9.2-SNAPSHOT</version>
+ <version>0.9.2</version>
<name>test-test</name>
<description>test test</description>
Modified: trunk/equanda-tool/pom.xml
===================================================================
--- trunk/equanda-tool/pom.xml 2009-01-26 16:35:41 UTC (rev 995)
+++ trunk/equanda-tool/pom.xml 2009-01-26 17:30:21 UTC (rev 996)
@@ -2,13 +2,13 @@
<parent>
<groupId>org.equanda</groupId>
<artifactId>equanda</artifactId>
- <version>0.9.2-SNAPSHOT</version>
+ <version>0.9.2</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>org.equanda</groupId>
<artifactId>equanda-tool</artifactId>
<packaging>jar</packaging>
- <version>0.9.2-SNAPSHOT</version>
+ <version>0.9.2</version>
<name>equanda-tool</name>
<dependencies>
<dependency>
Modified: trunk/equanda-util/pom.xml
===================================================================
--- trunk/equanda-util/pom.xml 2009-01-26 16:35:41 UTC (rev 995)
+++ trunk/equanda-util/pom.xml 2009-01-26 17:30:21 UTC (rev 996)
@@ -2,13 +2,13 @@
<parent>
<groupId>org.equanda</groupId>
<artifactId>equanda</artifactId>
- <version>0.9.2-SNAPSHOT</version>
+ <version>0.9.2</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>org.equanda</groupId>
<artifactId>equanda-util</artifactId>
<packaging>jar</packaging>
- <version>0.9.2-SNAPSHOT</version>
+ <version>0.9.2</version>
<name>equanda-util</name>
<dependencies>
<dependency>
Modified: trunk/pom.xml
===================================================================
--- trunk/pom.xml 2009-01-26 16:35:41 UTC (rev 995)
+++ trunk/pom.xml 2009-01-26 17:30:21 UTC (rev 996)
@@ -4,7 +4,7 @@
<artifactId>equanda</artifactId>
<packaging>pom</packaging>
- <version>0.9.2-SNAPSHOT</version>
+ <version>0.9.2</version>
<name>equanda</name>
<description>
@@ -41,9 +41,9 @@
<url>http://jira.equanda.org/</url>
</issueManagement>
<scm>
- <connection>scm:svn:https://equanda.svn.sourceforge.net/svnroot/equanda/trunk</connection>
- <developerConnection>scm:svn:https://equanda.svn.sourceforge.net/svnroot/equanda/trunk</developerConnection>
- <url>http://equanda.svn.sourceforge.net/viewvc/equanda/</url>
+ <connection>scm:svn:https://equanda.svn.sourceforge.net/svnroot/equanda/tags/equanda-0.9.2</connection>
+ <developerConnection>scm:svn:https://equanda.svn.sourceforge.net/svnroot/equanda/tags/equanda-0.9.2</developerConnection>
+ <url>http://equanda.svn.sourceforge.net/viewvc/equanda/tags/equanda-0.9.2</url>
</scm>
<ciManagement>
<system>hudson</system>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <tri...@us...> - 2009-01-26 16:35:43
|
Revision: 995
http://equanda.svn.sourceforge.net/equanda/?rev=995&view=rev
Author: triathlon98
Date: 2009-01-26 16:35:41 +0000 (Mon, 26 Jan 2009)
Log Message:
-----------
prepare for release of 0.9.2
Modified Paths:
--------------
trunk/equanda-maven-plugin/src/main/resources/archetype-resources/gui/pom.xml
trunk/equanda-test/test-t5-gui/pom.xml
Modified: trunk/equanda-maven-plugin/src/main/resources/archetype-resources/gui/pom.xml
===================================================================
--- trunk/equanda-maven-plugin/src/main/resources/archetype-resources/gui/pom.xml 2009-01-26 15:29:44 UTC (rev 994)
+++ trunk/equanda-maven-plugin/src/main/resources/archetype-resources/gui/pom.xml 2009-01-26 16:35:41 UTC (rev 995)
@@ -49,7 +49,7 @@
<!--<archiveClasses>true</archiveClasses>-->
<dependentWarExcludes>WEB-INF/web.xml,index.*</dependentWarExcludes>
<warSourceExcludes>
- WEB-INF/lib/javassist*.jar,WEB-INF/lib/log4j*.jar,WEB-INF/lib/commons-*.jar
+ WEB-INF/lib/javassist*.jar,WEB-INF/lib/log4j*.jar,WEB-INF/lib/commons-codec*.jar,WEB-INF/lib/commons-collections*.jar,WEB-INF/lib/commons-httpclient*.jar,WEB-INF/lib/commons-logging*.jar
</warSourceExcludes>
<archive>
<manifest>
Modified: trunk/equanda-test/test-t5-gui/pom.xml
===================================================================
--- trunk/equanda-test/test-t5-gui/pom.xml 2009-01-26 15:29:44 UTC (rev 994)
+++ trunk/equanda-test/test-t5-gui/pom.xml 2009-01-26 16:35:41 UTC (rev 995)
@@ -45,7 +45,7 @@
<!--<archiveClasses>true</archiveClasses>-->
<dependentWarExcludes>WEB-INF/web.xml,index.*</dependentWarExcludes>
<warSourceExcludes>
- WEB-INF/lib/javassist*.jar,WEB-INF/lib/log4j*.jar,WEB-INF/lib/commons-*.jar
+ WEB-INF/lib/javassist*.jar,WEB-INF/lib/log4j*.jar,WEB-INF/lib/commons-codec*.jar,WEB-INF/lib/commons-collections*.jar,WEB-INF/lib/commons-httpclient*.jar,WEB-INF/lib/commons-logging*.jar
</warSourceExcludes>
<archive>
<manifest>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <tri...@us...> - 2009-01-26 15:29:49
|
Revision: 994
http://equanda.svn.sourceforge.net/equanda/?rev=994&view=rev
Author: triathlon98
Date: 2009-01-26 15:29:44 +0000 (Mon, 26 Jan 2009)
Log Message:
-----------
prepare for release of 0.9.2
Modified Paths:
--------------
trunk/equanda-test/pom.xml
Modified: trunk/equanda-test/pom.xml
===================================================================
--- trunk/equanda-test/pom.xml 2009-01-26 15:09:36 UTC (rev 993)
+++ trunk/equanda-test/pom.xml 2009-01-26 15:29:44 UTC (rev 994)
@@ -176,7 +176,7 @@
</dependencyManagement>
<properties>
- <tapestry-version>5.0.15</tapestry-version>
+ <tapestry-version>5.0.18</tapestry-version>
</properties>
</project>
\ 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...> - 2009-01-26 15:09:49
|
Revision: 993
http://equanda.svn.sourceforge.net/equanda/?rev=993&view=rev
Author: triathlon98
Date: 2009-01-26 15:09:36 +0000 (Mon, 26 Jan 2009)
Log Message:
-----------
prepare for release of 0.9.2
Modified Paths:
--------------
trunk/equanda-maven-plugin/src/main/resources/archetype-resources/config/header.txt
trunk/equanda-maven-plugin/src/main/resources/archetype-resources/core/src/main/java/UserMediator.java
trunk/equanda-maven-plugin/src/main/resources/archetype-resources/gui/src/main/java/components/EditLayout.java
trunk/equanda-maven-plugin/src/main/resources/archetype-resources/gui/src/main/java/components/Layout.java
trunk/equanda-maven-plugin/src/main/resources/archetype-resources/gui/src/main/java/components/SelectLayout.java
trunk/equanda-maven-plugin/src/main/resources/archetype-resources/gui/src/main/java/pages/Start.java
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/pom.xml
trunk/equanda-tapestry5/src/site/wiki/index.wiki
trunk/src/site/wiki/gettingstarted.wiki
trunk/src/site/wiki/plugin/archetype.wiki
trunk/src/site/wiki/roadmap.wiki
Modified: trunk/equanda-maven-plugin/src/main/resources/archetype-resources/config/header.txt
===================================================================
--- trunk/equanda-maven-plugin/src/main/resources/archetype-resources/config/header.txt 2009-01-26 14:00:07 UTC (rev 992)
+++ trunk/equanda-maven-plugin/src/main/resources/archetype-resources/config/header.txt 2009-01-26 15:09:36 UTC (rev 993)
@@ -1,3 +1,3 @@
/**
- * This file is part of the ${artifactId} project.
+ * This file is part of ${artifactId}
*/
Modified: trunk/equanda-maven-plugin/src/main/resources/archetype-resources/core/src/main/java/UserMediator.java
===================================================================
--- trunk/equanda-maven-plugin/src/main/resources/archetype-resources/core/src/main/java/UserMediator.java 2009-01-26 14:00:07 UTC (rev 992)
+++ trunk/equanda-maven-plugin/src/main/resources/archetype-resources/core/src/main/java/UserMediator.java 2009-01-26 15:09:36 UTC (rev 993)
@@ -1,6 +1,5 @@
/**
* This file is part of ${artifactId}
- *
*/
package ${srcPackage};
Modified: trunk/equanda-maven-plugin/src/main/resources/archetype-resources/gui/src/main/java/components/EditLayout.java
===================================================================
--- trunk/equanda-maven-plugin/src/main/resources/archetype-resources/gui/src/main/java/components/EditLayout.java 2009-01-26 14:00:07 UTC (rev 992)
+++ trunk/equanda-maven-plugin/src/main/resources/archetype-resources/gui/src/main/java/components/EditLayout.java 2009-01-26 15:09:36 UTC (rev 993)
@@ -1,25 +1,5 @@
/**
- * 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.
+ * This file is part of ${artifactId}
*/
package ${srcPackage};
Modified: trunk/equanda-maven-plugin/src/main/resources/archetype-resources/gui/src/main/java/components/Layout.java
===================================================================
--- trunk/equanda-maven-plugin/src/main/resources/archetype-resources/gui/src/main/java/components/Layout.java 2009-01-26 14:00:07 UTC (rev 992)
+++ trunk/equanda-maven-plugin/src/main/resources/archetype-resources/gui/src/main/java/components/Layout.java 2009-01-26 15:09:36 UTC (rev 993)
@@ -1,25 +1,5 @@
/**
- * 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.
+ * This file is part of ${artifactId}
*/
package ${srcPackage};
@@ -28,6 +8,7 @@
import org.apache.tapestry5.ioc.annotations.Inject;
import org.apache.tapestry5.annotations.Component;
import org.apache.tapestry5.annotations.Environmental;
+import org.apache.tapestry5.annotations.IncludeJavaScriptLibrary;
import org.apache.tapestry5.annotations.Path;
import org.apache.tapestry5.annotations.Parameter;
import org.apache.tapestry5.Asset;
@@ -47,18 +28,17 @@
@IncludeJavaScriptLibrary( { "classpath:/org/equanda/tapestry5/resources/equanda.js",
"context:script/app.js",
"classpath:/org/chenillekit/tapestry/core/Chenillekit.js" } )
-
public class Layout
{
@Environmental
private RenderSupport renderSupport;
@Inject
- @Path("context:css/style.css")
+ @Path( "context:css/style.css" )
private Asset style;
@Inject
- @Path("context:images/logo.png")
+ @Path( "context:images/logo.png" )
private Asset logo;
@Parameter
Modified: trunk/equanda-maven-plugin/src/main/resources/archetype-resources/gui/src/main/java/components/SelectLayout.java
===================================================================
--- trunk/equanda-maven-plugin/src/main/resources/archetype-resources/gui/src/main/java/components/SelectLayout.java 2009-01-26 14:00:07 UTC (rev 992)
+++ trunk/equanda-maven-plugin/src/main/resources/archetype-resources/gui/src/main/java/components/SelectLayout.java 2009-01-26 15:09:36 UTC (rev 993)
@@ -1,25 +1,5 @@
/**
- * 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.
+ * This file is part of ${artifactId}
*/
package ${srcPackage};
Modified: trunk/equanda-maven-plugin/src/main/resources/archetype-resources/gui/src/main/java/pages/Start.java
===================================================================
--- trunk/equanda-maven-plugin/src/main/resources/archetype-resources/gui/src/main/java/pages/Start.java 2009-01-26 14:00:07 UTC (rev 992)
+++ trunk/equanda-maven-plugin/src/main/resources/archetype-resources/gui/src/main/java/pages/Start.java 2009-01-26 15:09:36 UTC (rev 993)
@@ -1,3 +1,7 @@
+/**
+ * This file is part of ${artifactId}
+ */
+
package ${srcPackage};
import java.util.Date;
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 2009-01-26 14:00:07 UTC (rev 992)
+++ trunk/equanda-maven-plugin/src/main/resources/archetype-resources/gui/src/main/java/services/AppModule.java 2009-01-26 15:09:36 UTC (rev 993)
@@ -1,25 +1,5 @@
/**
- * 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.
+ * This file is part of ${artifactId}
*/
package ${srcPackage};
@@ -49,8 +29,6 @@
import java.security.Principal;
-import java.io.IOException;
-
/**
* This module is automatically included as part of the Tapestry IoC Registry, it's a good place to configure and extend
* Tapestry, or to place your own service definitions.
Modified: trunk/equanda-maven-plugin/src/main/resources/archetype-resources/pom.xml
===================================================================
--- trunk/equanda-maven-plugin/src/main/resources/archetype-resources/pom.xml 2009-01-26 14:00:07 UTC (rev 992)
+++ trunk/equanda-maven-plugin/src/main/resources/archetype-resources/pom.xml 2009-01-26 15:09:36 UTC (rev 993)
@@ -472,7 +472,7 @@
</profiles>
<properties>
- <equanda-version>0.9.1</equanda-version>
+ <equanda-version>0.9.2</equanda-version>
<staticwiki-version>0.9</staticwiki-version>
<tapestry-version>5.0.18</tapestry-version>
<chenillekit-version>1.0.0</chenillekit-version>
Modified: trunk/equanda-tapestry5/src/site/wiki/index.wiki
===================================================================
--- trunk/equanda-tapestry5/src/site/wiki/index.wiki 2009-01-26 14:00:07 UTC (rev 992)
+++ trunk/equanda-tapestry5/src/site/wiki/index.wiki 2009-01-26 15:09:36 UTC (rev 993)
@@ -32,7 +32,7 @@
<dependency>
<groupId>org.equanda</groupId>
<artifactId>equanda-tapestry5</artifactId>
- <version>0.9</version>
+ <version>0.9.2</version>
</dependency>
{code}
For this to work, you need to also include the [PROGS|http://www.progs.be/] maven repository.
Modified: trunk/src/site/wiki/gettingstarted.wiki
===================================================================
--- trunk/src/site/wiki/gettingstarted.wiki 2009-01-26 14:00:07 UTC (rev 992)
+++ trunk/src/site/wiki/gettingstarted.wiki 2009-01-26 15:09:36 UTC (rev 993)
@@ -5,7 +5,7 @@
{code}
mvn equanda:archetype
-DgroupId=org.equanda.example -DartifactId=example
- -DarchetypeVersion=0.9 -DarchetypeGroupId=org.equanda -DarchetypeArtifactId=equanda-maven-plugin -DremoteRepositories=http://maven.progs.be/m2repo
+ -DarchetypeVersion=0.9.2 -DarchetypeGroupId=org.equanda -DarchetypeArtifactId=equanda-maven-plugin -DremoteRepositories=http://maven.progs.be/m2repo
{code}
This will create a mostly empty example project in the "example" subdirectory. The base package for the classes is "org.equanda.example".
Modified: trunk/src/site/wiki/plugin/archetype.wiki
===================================================================
--- trunk/src/site/wiki/plugin/archetype.wiki 2009-01-26 14:00:07 UTC (rev 992)
+++ trunk/src/site/wiki/plugin/archetype.wiki 2009-01-26 15:09:36 UTC (rev 993)
@@ -9,7 +9,7 @@
{code}
mvn equanda:archetype
-DgroupId=com.mycompany -DartifactId=example
- -DarchetypeVersion=0.9 -DarchetypeGroupId=org.equanda -DarchetypeArtifactId=equanda-maven-plugin
+ -DarchetypeVersion=0.9.2 -DarchetypeGroupId=org.equanda -DarchetypeArtifactId=equanda-maven-plugin
{code}
All the parameters on the last line are used internally by maven.
Modified: trunk/src/site/wiki/roadmap.wiki
===================================================================
--- trunk/src/site/wiki/roadmap.wiki 2009-01-26 14:00:07 UTC (rev 992)
+++ trunk/src/site/wiki/roadmap.wiki 2009-01-26 15:09:36 UTC (rev 993)
@@ -3,19 +3,19 @@
equanda version 0.9 is the first version which includes a user interface which is built using tapestry 5 and has a reasonable amount of documentation.
With 0.9.1 a lot of improvements were made to make it more feature complete and more reliable.
+Most important improvements for 0.9.2 include fine grained access control configurations, a lot of user interface improvements, new unique-for constraint, new TreeTable component, ajax enabled textfield component.
For changes see the release notes
- changes in [0.9|http://jira.equanda.org/secure/ReleaseNote.jspa?version=10001&styleName=Html&projectId=10000&Create=Create]
- changes in [0.9.1|http://jira.equanda.org/secure/ReleaseNote.jspa?version=10020&styleName=Html&projectId=10000&Create=Create]
+- changes in [0.9.2|http://jira.equanda.org/secure/ReleaseNote.jspa?version=10024&styleName=Html&projectId=10000&Create=Create]
This version is very useable and reliable, however we still have a lot of stuff we want to implement before we can call it version 1.0.
- assure the user can choose which automatically generated key is used. This currently uses a custom UOID, but using a more standard UUID should also be possible
- improve the tapestry5 user interface
-- improve support for the render attribute
--- provide screens for configuring the user interface
-- support for more of the declarative constraints in the user interface
-- assure changes in user information are immediately reflected in the login cache
- assure ddltool can also be used on other databases than firebird
- improve the documentation
- various improvements as mentioned in JIRA
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <tri...@us...> - 2009-01-26 14:00:29
|
Revision: 992
http://equanda.svn.sourceforge.net/equanda/?rev=992&view=rev
Author: triathlon98
Date: 2009-01-26 14:00:07 +0000 (Mon, 26 Jan 2009)
Log Message:
-----------
add author comments
Modified Paths:
--------------
trunk/equanda-tapestry5/src/main/java/org/equanda/tapestry5/base/ObjectCreatorDelegate.java
Modified: trunk/equanda-tapestry5/src/main/java/org/equanda/tapestry5/base/ObjectCreatorDelegate.java
===================================================================
--- trunk/equanda-tapestry5/src/main/java/org/equanda/tapestry5/base/ObjectCreatorDelegate.java 2009-01-26 11:22:45 UTC (rev 991)
+++ trunk/equanda-tapestry5/src/main/java/org/equanda/tapestry5/base/ObjectCreatorDelegate.java 2009-01-26 14:00:07 UTC (rev 992)
@@ -24,6 +24,11 @@
package org.equanda.tapestry5.base;
+/**
+ * How to create new objects for use in JSPagedLoop
+ *
+ * @author <a href="mailto:vla...@gm...">Vladimir Tkachenko</a>
+ */
public interface ObjectCreatorDelegate<T>
{
public abstract T createObject();
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <tri...@us...> - 2009-01-26 11:22:49
|
Revision: 991
http://equanda.svn.sourceforge.net/equanda/?rev=991&view=rev
Author: triathlon98
Date: 2009-01-26 11:22:45 +0000 (Mon, 26 Jan 2009)
Log Message:
-----------
fix javascript occur which iccors since chenillekit use
Modified Paths:
--------------
trunk/equanda-maven-plugin/src/main/resources/archetype-resources/gui/src/main/java/components/Layout.java
Modified: trunk/equanda-maven-plugin/src/main/resources/archetype-resources/gui/src/main/java/components/Layout.java
===================================================================
--- trunk/equanda-maven-plugin/src/main/resources/archetype-resources/gui/src/main/java/components/Layout.java 2009-01-22 00:32:21 UTC (rev 990)
+++ trunk/equanda-maven-plugin/src/main/resources/archetype-resources/gui/src/main/java/components/Layout.java 2009-01-26 11:22:45 UTC (rev 991)
@@ -44,7 +44,10 @@
*
* @author <a href="mailto:jo...@pr...">Joachim Van der Auwera</a>
*/
-@IncludeJavaScriptLibrary( { "classpath:/org/equanda/tapestry5/resources/equanda.js", "context:script/app.js" } )
+@IncludeJavaScriptLibrary( { "classpath:/org/equanda/tapestry5/resources/equanda.js",
+ "context:script/app.js",
+ "classpath:/org/chenillekit/tapestry/core/Chenillekit.js" } )
+
public class Layout
{
@Environmental
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <tri...@us...> - 2009-01-22 00:32:26
|
Revision: 990
http://equanda.svn.sourceforge.net/equanda/?rev=990&view=rev
Author: triathlon98
Date: 2009-01-22 00:32:21 +0000 (Thu, 22 Jan 2009)
Log Message:
-----------
EQ-194 TreeTable component should allow multiple columns and limit on number of unfolded levels
Modified Paths:
--------------
trunk/equanda-tapestry5/src/main/java/org/equanda/tapestry5/data/Tree.java
Modified: trunk/equanda-tapestry5/src/main/java/org/equanda/tapestry5/data/Tree.java
===================================================================
--- trunk/equanda-tapestry5/src/main/java/org/equanda/tapestry5/data/Tree.java 2009-01-21 23:16:18 UTC (rev 989)
+++ trunk/equanda-tapestry5/src/main/java/org/equanda/tapestry5/data/Tree.java 2009-01-22 00:32:21 UTC (rev 990)
@@ -27,8 +27,8 @@
import java.util.List;
/**
- * This interface must be implemented by an object that must be rendered
- * in a tapestry page using the TreeTable component.
+ * This interface must be implemented for each node in the tree to be displayed using the TreeTable component.
+ * You need to add the fields you want to display.
*
* @author Geert Mergan
*/
@@ -39,6 +39,4 @@
void setChildren( List<NODE> children );
boolean isLeaf();
-
- String getLabel();
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <tri...@us...> - 2009-01-21 23:16:24
|
Revision: 989
http://equanda.svn.sourceforge.net/equanda/?rev=989&view=rev
Author: triathlon98
Date: 2009-01-21 23:16:18 +0000 (Wed, 21 Jan 2009)
Log Message:
-----------
EQ-194 TreeTable component should allow multiple columns and limit on number of unfolded levels
Modified Paths:
--------------
trunk/equanda-tapestry5/src/main/java/org/equanda/tapestry5/components/TreeTable.java
trunk/equanda-tapestry5/src/main/java/org/equanda/tapestry5/data/Tree.java
trunk/equanda-tapestry5/src/main/resources/org/equanda/tapestry5/components/TreeTable.tml
trunk/equanda-tapestry5/src/main/resources/org/equanda/tapestry5/resources/treetable.css
trunk/equanda-tapestry5/src/main/resources/org/equanda/tapestry5/resources/treetable.js
trunk/equanda-tapestry5/src/site/site.xml
Added Paths:
-----------
trunk/equanda-tapestry5/src/site/wiki/treetable.wiki
Modified: trunk/equanda-tapestry5/src/main/java/org/equanda/tapestry5/components/TreeTable.java
===================================================================
--- trunk/equanda-tapestry5/src/main/java/org/equanda/tapestry5/components/TreeTable.java 2009-01-21 23:05:15 UTC (rev 988)
+++ trunk/equanda-tapestry5/src/main/java/org/equanda/tapestry5/components/TreeTable.java 2009-01-21 23:16:18 UTC (rev 989)
@@ -24,11 +24,11 @@
package org.equanda.tapestry5.components;
-import org.apache.tapestry5.Block;
import org.apache.tapestry5.annotations.IncludeJavaScriptLibrary;
import org.apache.tapestry5.annotations.IncludeStylesheet;
import org.apache.tapestry5.annotations.Parameter;
import org.apache.tapestry5.annotations.SupportsInformalParameters;
+import org.equanda.tapestry5.base.TitleContent;
import org.equanda.tapestry5.data.FlattenedTree;
import org.equanda.tapestry5.data.Tree;
@@ -45,6 +45,7 @@
@IncludeStylesheet( "classpath:/org/equanda/tapestry5/resources/treetable.css" )
@IncludeJavaScriptLibrary( "classpath:/org/equanda/tapestry5/resources/treetable.js" )
public class TreeTable
+ extends TitleContent
{
/** Defines the source Tree to walk over. */
@Parameter( required = true )
@@ -53,25 +54,19 @@
@Parameter( required = true )
private Tree value;
- @Parameter( required = true )
- private Block content;
+ @Parameter()
+ private int unfoldLevel;
private List<FlattenedTree> flattenedTreeList;
/** Current node of the tree. */
private FlattenedTree flatValue;
- public Block getContent()
+ public boolean isUsingCookies()
{
- return content;
+ return false; // no persistence
}
-
- public void setContent( Block content )
- {
- this.content = content;
- }
-
public FlattenedTree getFlatValue()
{
return flatValue;
@@ -124,4 +119,16 @@
}
}
}
+
+ public String getRowStyle()
+ {
+ if ( flatValue != null && flatValue.getDepth() > unfoldLevel ) return "display: none;";
+ return "";
+ }
+
+ public String getFolderStyle()
+ {
+ if ( flatValue != null && flatValue.getDepth() > unfoldLevel ) return "folderclose";
+ return "folderopen";
+ }
}
Modified: trunk/equanda-tapestry5/src/main/java/org/equanda/tapestry5/data/Tree.java
===================================================================
--- trunk/equanda-tapestry5/src/main/java/org/equanda/tapestry5/data/Tree.java 2009-01-21 23:05:15 UTC (rev 988)
+++ trunk/equanda-tapestry5/src/main/java/org/equanda/tapestry5/data/Tree.java 2009-01-21 23:16:18 UTC (rev 989)
@@ -32,11 +32,11 @@
*
* @author Geert Mergan
*/
-public interface Tree
+public interface Tree<NODE extends Tree>
{
- List<Tree> getChildren();
+ List<NODE> getChildren();
- void setChildren( List<Tree> children );
+ void setChildren( List<NODE> children );
boolean isLeaf();
Modified: trunk/equanda-tapestry5/src/main/resources/org/equanda/tapestry5/components/TreeTable.tml
===================================================================
--- trunk/equanda-tapestry5/src/main/resources/org/equanda/tapestry5/components/TreeTable.tml 2009-01-21 23:05:15 UTC (rev 988)
+++ trunk/equanda-tapestry5/src/main/resources/org/equanda/tapestry5/components/TreeTable.tml 2009-01-21 23:16:18 UTC (rev 989)
@@ -1,9 +1,25 @@
<table xmlns:t="http://tapestry.apache.org/schema/tapestry_5_0_0.xsd">
+ <tr>
+ <th></th>
+ <t:loop source="Panels" value="Panel" index="Index" volatile="true">
+ <th><t:delegate to="panel.title"/></th>
+ </t:loop>
+ </tr>
<t:loop source="list" value="flatValue" volatile="true">
<t:if test="flatValue.isLeaf()">
- <tr id="${flatValue.dotId}"><td><div class="tier${flatValue.depth}"><a class="doc" href="#"></a></div></td><t:delegate to="content"/></tr>
+ <tr id="${flatValue.dotId}" style="${rowStyle}">
+ <td><div class="tier${flatValue.depth}"><a class="doc" href="#"></a></div></td>
+ <t:loop source="Panels" value="Panel" index="Index" volatile="true">
+ <td><t:delegate to="panel.content"/></td>
+ </t:loop>
+ </tr>
<t:parameter name="else">
- <tr id="${flatValue.dotId}"><td><div class="tier${flatValue.depth}" onclick="toggleRowsDiv(this)"><a class="folderopen" href="#"></a></div></td><t:delegate to="content"/></tr>
+ <tr id="${flatValue.dotId}" style="${rowStyle}">
+ <td><div class="tier${flatValue.depth}" onclick="eqTTtoggle(this)"><a class="${folderStyle}" href="#"></a></div></td>
+ <t:loop source="Panels" value="Panel" index="Index" volatile="true">
+ <td><t:delegate to="panel.content"/></td>
+ </t:loop>
+ </tr>
</t:parameter>
</t:if>
</t:loop>
Modified: trunk/equanda-tapestry5/src/main/resources/org/equanda/tapestry5/resources/treetable.css
===================================================================
--- trunk/equanda-tapestry5/src/main/resources/org/equanda/tapestry5/resources/treetable.css 2009-01-21 23:05:15 UTC (rev 988)
+++ trunk/equanda-tapestry5/src/main/resources/org/equanda/tapestry5/resources/treetable.css 2009-01-21 23:16:18 UTC (rev 989)
@@ -1,6 +1,5 @@
.folderclose {
- background: transparent url(folder-closed.gif)
- no-repeat scroll 0%;
+ background: transparent url(folder-closed.gif) no-repeat scroll 0;
float: left;
height: 14px;
padding-right: 3px;
@@ -8,8 +7,7 @@
}
.folderopen {
- background: transparent url(folder-open.gif)
- no-repeat scroll 0%;
+ background: transparent url(folder-open.gif) no-repeat scroll 0;
float: left;
height: 14px;
padding-right: 3px;
@@ -17,8 +15,7 @@
}
.doc {
- background: transparent url(file.gif) no-repeat
- scroll 0%;
+ background: transparent url(file.gif) no-repeat scroll 0;
float: left;
height: 14px;
margin-left: 20px;
@@ -27,41 +24,41 @@
}
.tier0 {
- margin-left: 0pt;
+ margin-left: 0;
}
-
.tier1 {
margin-left: 1.5em;
}
-
.tier2 {
margin-left: 3em;
}
-
.tier3 {
margin-left: 4.5em;
}
-
.tier4 {
margin-left: 6em;
}
-
.tier5 {
margin-left: 7.5em;
}
-
.tier6 {
margin-left: 9em;
}
-
.tier7 {
margin-left: 10.5em;
}
-
.tier8 {
margin-left: 12em;
}
-
.tier9 {
margin-left: 13.5em;
-}
\ No newline at end of file
+}
+.tier10 {
+ margin-left: 15em;
+}
+.tier11 {
+ margin-left: 16.5em;
+}
+.tier12 {
+ margin-left: 18em;
+}
Modified: trunk/equanda-tapestry5/src/main/resources/org/equanda/tapestry5/resources/treetable.js
===================================================================
--- trunk/equanda-tapestry5/src/main/resources/org/equanda/tapestry5/resources/treetable.js 2009-01-21 23:05:15 UTC (rev 988)
+++ trunk/equanda-tapestry5/src/main/resources/org/equanda/tapestry5/resources/treetable.js 2009-01-21 23:16:18 UTC (rev 989)
@@ -1,57 +1,56 @@
-function toggleRows(elm) {
- var rows = document.getElementsByTagName("TR");
- elm.className = "folderclose";
- var newDisplay = "none";
- var thisID = elm.parentNode.parentNode.parentNode.id + "-";
- // Are we expanding or contracting? If the first child is hidden, we expand
- for (var i = 0; i < rows.length; i++) {
- var r = rows[i];
- if (matchStart(r.id, thisID, true)) {
- if (r.style.display == "none") {
- if (document.all) newDisplay = "block"; //IE4+ specific code
- else newDisplay = "table-row"; //Netscape and Mozilla
- elm.className = "folderopen";
+function eqTTtoggleRows( elm )
+{
+ var rows = document.getElementsByTagName("TR");
+ elm.className = "folderclose";
+ var newDisplay = "none";
+ var thisID = elm.parentNode.parentNode.parentNode.id + "-";
+ // Are we expanding or contracting? If the first child is hidden, we expand
+ for ( var i = 0 ; i < rows.length ; i++ )
+ {
+ var r = rows[i];
+ if ( eqTTmatchStart(r.id, thisID, true) )
+ {
+ if ( r.style.display == "none" )
+ {
+ if ( document.all ) newDisplay = "block"; //IE4+ specific code
+ else newDisplay = "table-row"; //Netscape and Mozilla
+ elm.className = "folderopen";
+ }
+ break;
+ }
}
- break;
- }
- }
-
- // When expanding, only expand one level. Collapse all desendants.
- var matchDirectChildrenOnly = (newDisplay != "none");
- for (var j = 0; j < rows.length; j++) {
- var s = rows[j];
- if (matchStart(s.id, thisID, matchDirectChildrenOnly)) {
- s.style.display = newDisplay;
- var cell = s.getElementsByTagName("TD")[0];
- var tier = cell.getElementsByTagName("DIV")[0];
- var folder = tier.getElementsByTagName("A")[0];
- if (folder.getAttribute("onclick") != null) {
- folder.className = "folderclose";
- }
- }
- }
-}
+ // When expanding, only expand one level. Collapse all descendants.
+ var matchDirectChildrenOnly = (newDisplay != "none");
-function toggleRowsDiv(elm) {
- var folder = elm.getElementsByTagName("A")[0];
- toggleRows(folder);
+ for ( var j = 0 ; j < rows.length ; j++ )
+ {
+ var s = rows[j];
+ if ( eqTTmatchStart(s.id, thisID, matchDirectChildrenOnly) )
+ {
+ s.style.display = newDisplay;
+ var cell = s.getElementsByTagName("TD")[0];
+ var tier = cell.getElementsByTagName("DIV")[0];
+ var folder = tier.getElementsByTagName("A")[0];
+ if ( folder.getAttribute("onclick") != null )
+ {
+ folder.className = "folderclose";
+ }
+ }
+ }
}
-function matchStart(target, pattern, matchDirectChildrenOnly) {
- var pos = target.indexOf(pattern);
- if (pos != 0) return false;
- if (!matchDirectChildrenOnly) return true;
- if (target.slice(pos + pattern.length, target.length).indexOf("-") >= 0) return false;
- return true;
+function eqTTtoggle( elm )
+{
+ var folder = elm.getElementsByTagName("A")[0];
+ eqTTtoggleRows(folder);
}
-function collapseAllRows() {
- var rows = document.getElementsByTagName("TR");
- for (var j = 0; j < rows.length; j++) {
- var r = rows[j];
- if (r.id.indexOf("-") >= 0) {
- r.style.display = "none";
- }
- }
+function eqTTmatchStart( target, pattern, matchDirectChildrenOnly )
+{
+ var pos = target.indexOf(pattern);
+ if ( pos != 0 ) return false;
+ if ( !matchDirectChildrenOnly ) return true;
+ if ( target.slice(pos + pattern.length, target.length).indexOf("-") >= 0 ) return false;
+ return true;
}
Modified: trunk/equanda-tapestry5/src/site/site.xml
===================================================================
--- trunk/equanda-tapestry5/src/site/site.xml 2009-01-21 23:05:15 UTC (rev 988)
+++ trunk/equanda-tapestry5/src/site/site.xml 2009-01-21 23:16:18 UTC (rev 989)
@@ -15,6 +15,7 @@
<item name="JSPagedLoop" href="jspagedloop.html"/>
<item name="Tabs / MemTabs" href="tabs.html"/>
<item name="TextField" href="textfield.html"/>
+ <item name="TreeTable" href="treetable.html"/>
<item name="Truncate" href="truncate.html"/>
<item name="ValidationTrackerDelegate" href="validationtrackerdelegate.html"/>
</item>
Added: trunk/equanda-tapestry5/src/site/wiki/treetable.wiki
===================================================================
--- trunk/equanda-tapestry5/src/site/wiki/treetable.wiki (rev 0)
+++ trunk/equanda-tapestry5/src/site/wiki/treetable.wiki 2009-01-21 23:16:18 UTC (rev 989)
@@ -0,0 +1,19 @@
+h1. TreeTable
+
+A tree displayed in a table. Clicking on the tree structre allows hide/display of tree levels.
+
+After building the tree structure in code (which each node an instance of "org.equanda.tapestry5.data.Tree") this table is rendered as a HTML table with the structure deisplayed in the first column.
+You can choose the number of levels of the tree which are unfolded on page load (0 is root only, 1 is one level unfolded, ...).
+
+You have to pass the title and content panes for each of the columns in the table. There is currently a limitation of fifty columns. Only panels which have both a title and content parameter block are displayed, however the indexes do not need to be sequential (hence the need for a limit).
+
+{code}
+<table t:type="equanda/TreeTable" t:tree="tree" t:value="node" unfoldLevel="2">
+ <t:parameter name="title1">Region</t:parameter>
+ <t:parameter name="content1">${node.label}</t:parameter>
+ <t:parameter name="title2">Capital</t:parameter>
+ <t:parameter name="content2">${node.capital}</t:parameter>
+ <t:parameter name="title3">Inhabitants</t:parameter>
+ <t:parameter name="content3">${node.inhabitants}</t:parameter>
+</table>
+{code}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <tri...@us...> - 2009-01-21 23:05:28
|
Revision: 988
http://equanda.svn.sourceforge.net/equanda/?rev=988&view=rev
Author: triathlon98
Date: 2009-01-21 23:05:15 +0000 (Wed, 21 Jan 2009)
Log Message:
-----------
EQ-194 example for TreeTable
Modified Paths:
--------------
t5-equanda-example/src/main/java/org/equanda/example/t5/data/DemoTree.java
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/data/DemoTree.java
===================================================================
--- t5-equanda-example/src/main/java/org/equanda/example/t5/data/DemoTree.java 2009-01-21 14:55:42 UTC (rev 987)
+++ t5-equanda-example/src/main/java/org/equanda/example/t5/data/DemoTree.java 2009-01-21 23:05:15 UTC (rev 988)
@@ -36,36 +36,53 @@
* @author Geert Mergan
*/
public class DemoTree
- implements Tree
+ implements Tree<DemoTree>
{
- private List<Tree> children;
+ private List<DemoTree> children;
private String label;
+ private String capital;
+ private String inhabitants;
public DemoTree( String label )
{
this.label = label;
}
- public List<Tree> getChildren()
+ public DemoTree( String label, String capital, String inhabitants )
{
+ this.label = label;
+ this.capital = capital;
+ this.inhabitants = inhabitants;
+ }
+
+ public List<DemoTree> getChildren()
+ {
return children;
}
- public void setChildren( List<Tree> children )
+ public void setChildren( List<DemoTree> children )
{
this.children = children;
}
+ public boolean isLeaf()
+ {
+ return children == null;
+ }
+
public String getLabel()
{
- return label == null ? "" : label;
+ return label;
}
+ public String getCapital()
+ {
+ return capital;
+ }
- public boolean isLeaf()
+ public String getInhabitants()
{
- return children == null;
+ return inhabitants;
}
-
}
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 2009-01-21 14:55:42 UTC (rev 987)
+++ t5-equanda-example/src/main/java/org/equanda/example/t5/pages/Start.java 2009-01-21 23:05:15 UTC (rev 988)
@@ -49,18 +49,18 @@
private Asset smiley;
/** Current node of the tree. */
- private Tree node;
+ private DemoTree node;
@Persist
private List<String> list;
private String current;
- public Tree getNode()
+ public DemoTree getNode()
{
return node;
}
- public void setNode( Tree node )
+ public void setNode( DemoTree node )
{
this.node = node;
}
@@ -75,22 +75,41 @@
this.smiley = smiley;
}
- public Tree getTree()
+ public DemoTree getTree()
{
- DemoTree n1 = new DemoTree( "first child" );
- DemoTree n2 = new DemoTree( "second child" );
- DemoTree n3 = new DemoTree( "third child" );
- DemoTree n4 = new DemoTree( "fourth child" );
+ DemoTree europe = new DemoTree( "Europe" );
+ DemoTree benelux = new DemoTree( "Benelux" );
+ DemoTree belgium = new DemoTree( "Belgium", "Brussels", "10.6m" );
+ DemoTree netherlands = new DemoTree( "Netherlands", "Amsterdam", "16.4m" );
+ DemoTree luxemburg = new DemoTree( "Luxemburg", "Luxemburg", ".4m" );
+ DemoTree france = new DemoTree( "France", "Paris", "60.9m" );
+ DemoTree northAmerica = new DemoTree( "North America" );
+ DemoTree unitedStates = new DemoTree( "United States", "Washington DC", "303.8m" );
+ DemoTree canada = new DemoTree( "Canada", "Vancouver", "33.2m" );
+ DemoTree asia = new DemoTree( "Asia" );
+ DemoTree china = new DemoTree( "China", "Bejing", "1330m" );
- List<Tree> nodeList2 = new LinkedList<Tree>();
- nodeList2.add( new DemoTree( "subtree child to illustrate nesting" ) );
- n4.setChildren( nodeList2 );
+ List<DemoTree> nlBenelux = new LinkedList<DemoTree>();
+ nlBenelux.add( belgium );
+ nlBenelux.add( netherlands );
+ nlBenelux.add( luxemburg );
+ benelux.setChildren( nlBenelux );
+ List<DemoTree> nlEurope = new LinkedList<DemoTree>();
+ nlEurope.add( benelux );
+ nlEurope.add( france );
+ europe.setChildren( nlEurope );
+ List<DemoTree> nlNorthAmerica = new LinkedList<DemoTree>();
+ nlNorthAmerica.add( unitedStates );
+ nlNorthAmerica.add( canada );
+ northAmerica.setChildren( nlNorthAmerica );
+ List<DemoTree> nlAsia = new LinkedList<DemoTree>();
+ nlAsia.add( china );
+ asia.setChildren( nlAsia );
- LinkedList<Tree> nodeList = new LinkedList<Tree>();
- nodeList.add( n1 );
- nodeList.add( n2 );
- nodeList.add( n3 );
- nodeList.add( n4 );
+ LinkedList<DemoTree> nodeList = new LinkedList<DemoTree>();
+ nodeList.add( europe );
+ nodeList.add( northAmerica );
+ nodeList.add( asia );
DemoTree n = new DemoTree( "root" );
n.setChildren( nodeList );
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 2009-01-21 14:55:42 UTC (rev 987)
+++ t5-equanda-example/src/main/resources/org/equanda/example/t5/pages/Start.tml 2009-01-21 23:05:15 UTC (rev 988)
@@ -84,17 +84,18 @@
</t:parameter>
<t:parameter name="title4">TreeTable</t:parameter>
<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 separate column of the html table. We'd also like to introduce blocks,
- so that the user has more impact on the layout.</p>
-
+ <p>This illustrates the TreeTable component. It displays a static (no AJAX) table.</p>
+ <p>For each node, several blocks can be displayed, each position in a different column.</p>
+ <p>It is possible to determine the number of levels of the tree which are unfolded.</p>
<br/>
<p>
- <table t:type="equanda/TreeTable" t:tree="tree" t:value="node">
- <t:parameter name="content">
- <td>${node.label}</td>
- </t:parameter>
+ <table t:type="equanda/TreeTable" t:tree="tree" t:value="node" unfoldLevel="2">
+ <t:parameter name="title1">Region</t:parameter>
+ <t:parameter name="content1">${node.label}</t:parameter>
+ <t:parameter name="title2">Capital</t:parameter>
+ <t:parameter name="content2">${node.capital}</t:parameter>
+ <t:parameter name="title3">Inhabitants</t:parameter>
+ <t:parameter name="content3">${node.inhabitants}</t:parameter>
</table>
</p>
</t:parameter>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <tri...@us...> - 2009-01-21 14:55:46
|
Revision: 987
http://equanda.svn.sourceforge.net/equanda/?rev=987&view=rev
Author: triathlon98
Date: 2009-01-21 14:55:42 +0000 (Wed, 21 Jan 2009)
Log Message:
-----------
tests for persistence strategy etc
Added Paths:
-----------
t5-equanda-example/src/main/resources/org/equanda/example/t5/pages/Test.tml
Added: t5-equanda-example/src/main/resources/org/equanda/example/t5/pages/Test.tml
===================================================================
--- t5-equanda-example/src/main/resources/org/equanda/example/t5/pages/Test.tml (rev 0)
+++ t5-equanda-example/src/main/resources/org/equanda/example/t5/pages/Test.tml 2009-01-21 14:55:42 UTC (rev 987)
@@ -0,0 +1,30 @@
+<html xmlns:t="http://tapestry.apache.org/schema/tapestry_5_0_0.xsd">
+<head>
+ <meta http-equiv="Content-Language" content="en"/>
+ <title>equanda tapestry5 components test</title>
+</head>
+
+<body>
+
+ <h1>Submit test page</h1>
+ <p>Test page for the commit of strings inside a loop which are stored in embedded objects.</p>
+
+ <t:form autofocus="false">
+
+ <input class="defaultSubmit" t:type="submit" value="Save" t:id="save"/>
+ <br />
+
+ <!--<t:loop source="list" value="current" volatile="true">-->
+ <t:equanda.JSPagedLoop source="list" value="current" volatile="true">
+ <div t:type="FormFragment" visible="true">
+ <input t:type="TextField" maxlength="50" size="50" value="current.content" />
+ <br />
+ </div>
+ </t:equanda.JSPagedLoop>
+ <!--</t:loop>-->
+
+ </t:form>
+
+</body>
+</html>
+
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <tri...@us...> - 2009-01-21 14:53:45
|
Revision: 986
http://equanda.svn.sourceforge.net/equanda/?rev=986&view=rev
Author: triathlon98
Date: 2009-01-21 14:53:40 +0000 (Wed, 21 Jan 2009)
Log Message:
-----------
tests for persistence strategy etc
Modified Paths:
--------------
t5-equanda-example/pom.xml
t5-equanda-example/src/main/java/org/equanda/example/t5/pages/Start.java
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
Added Paths:
-----------
t5-equanda-example/src/main/java/org/equanda/example/t5/data/PersistentFieldChangeImpl.java
t5-equanda-example/src/main/java/org/equanda/example/t5/data/StringContainer.java
t5-equanda-example/src/main/java/org/equanda/example/t5/pages/Test.java
t5-equanda-example/src/main/java/org/equanda/example/t5/services/MyPersistentFieldStrategy.java
Modified: t5-equanda-example/pom.xml
===================================================================
--- t5-equanda-example/pom.xml 2009-01-19 17:07:20 UTC (rev 985)
+++ t5-equanda-example/pom.xml 2009-01-21 14:53:40 UTC (rev 986)
@@ -129,6 +129,13 @@
<name>OpenQA Maven Repository</name>
<url>http://maven.openqa.org/</url>
</repository>
+ <!-- For access to the tapestry snapshots -->
+ <!--
+ <repository>
+ <id>tapestry-snapshots</id>
+ <url>http://tapestry.formos.com/maven-snapshot-repository/</url>
+ </repository>
+ -->
</repositories>
<pluginRepositories>
Added: t5-equanda-example/src/main/java/org/equanda/example/t5/data/PersistentFieldChangeImpl.java
===================================================================
--- t5-equanda-example/src/main/java/org/equanda/example/t5/data/PersistentFieldChangeImpl.java (rev 0)
+++ t5-equanda-example/src/main/java/org/equanda/example/t5/data/PersistentFieldChangeImpl.java 2009-01-21 14:53:40 UTC (rev 986)
@@ -0,0 +1,63 @@
+/**
+ * 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.example.t5.data;
+
+/**
+ * ...
+ *
+ * @author <a href="mailto:jo...@pr...">Joachim Van der Auwera</a>
+ */
+
+import org.apache.tapestry5.services.PersistentFieldChange;
+
+public class PersistentFieldChangeImpl
+ implements PersistentFieldChange
+{
+ private final String componentId;
+ private final String fieldName;
+ private final Object value;
+
+ public PersistentFieldChangeImpl( final String componentId, final String fieldName, final Object value )
+ {
+ this.componentId = componentId;
+ this.fieldName = fieldName;
+ this.value = value;
+ }
+
+ public String getComponentId()
+ {
+ return componentId;
+ }
+
+ public String getFieldName()
+ {
+ return fieldName;
+ }
+
+ public Object getValue()
+ {
+ return value;
+ }
+}
\ No newline at end of file
Added: t5-equanda-example/src/main/java/org/equanda/example/t5/data/StringContainer.java
===================================================================
--- t5-equanda-example/src/main/java/org/equanda/example/t5/data/StringContainer.java (rev 0)
+++ t5-equanda-example/src/main/java/org/equanda/example/t5/data/StringContainer.java 2009-01-21 14:53:40 UTC (rev 986)
@@ -0,0 +1,59 @@
+/**
+ * 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.example.t5.data;
+
+import java.io.Serializable;
+
+/**
+ * ...
+ *
+ * @author <a href="mailto:jo...@pr...">Joachim Van der Auwera</a>
+ */
+public class StringContainer
+ implements Serializable
+{
+ private String content;
+
+ public StringContainer() {}
+ public StringContainer( String value ) { content = value; }
+
+ public String getContent()
+ {
+ System.out.println( "Getting content " + content );
+ return content;
+ }
+
+ public void setContent( String content )
+ {
+ System.out.println( "Context set to " + content + "(was "+this.content+")");
+ this.content = content;
+ }
+
+ @Override
+ public String toString()
+ {
+ return content;
+ }
+}
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 2009-01-19 17:07:20 UTC (rev 985)
+++ t5-equanda-example/src/main/java/org/equanda/example/t5/pages/Start.java 2009-01-21 14:53:40 UTC (rev 986)
@@ -28,7 +28,6 @@
import org.apache.tapestry5.Block;
import org.apache.tapestry5.annotations.Path;
import org.apache.tapestry5.annotations.Persist;
-import org.apache.tapestry5.annotations.SetupRender;
import org.apache.tapestry5.annotations.Property;
import org.apache.tapestry5.ioc.annotations.Inject;
import org.equanda.example.t5.data.DemoTree;
@@ -56,28 +55,6 @@
private List<String> list;
private String current;
- @SetupRender
- void setupRender()
- {
- if ( null == list )
- {
- list = new ArrayList<String>();
- list.add( "We" );
- list.add( "need" );
- list.add( "a" );
- list.add( "long" );
- list.add( "list" );
- list.add( "of" );
- list.add( "items" );
- list.add( "to" );
- list.add( "show" );
- list.add( "the" );
- list.add( "paging" );
- list.add( "in" );
- list.add( "action." );
- }
- }
-
public Tree getNode()
{
return node;
Added: t5-equanda-example/src/main/java/org/equanda/example/t5/pages/Test.java
===================================================================
--- t5-equanda-example/src/main/java/org/equanda/example/t5/pages/Test.java (rev 0)
+++ t5-equanda-example/src/main/java/org/equanda/example/t5/pages/Test.java 2009-01-21 14:53:40 UTC (rev 986)
@@ -0,0 +1,71 @@
+/**
+ * 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.example.t5.pages;
+
+import org.apache.tapestry5.annotations.Persist;
+import org.apache.tapestry5.annotations.Property;
+import org.apache.tapestry5.annotations.Meta;
+import org.equanda.example.t5.data.StringContainer;
+
+import java.sql.Date;
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * ...
+ *
+ * @author <a href="mailto:jo...@pr...">Joachim Van der Auwera</a>
+ */
+//@Meta( "tapestry.persistence-strategy=my" )
+public class Test
+{
+ @Property
+ @Persist
+ private List<StringContainer> list;
+
+ @Property
+ private StringContainer current;
+
+ void onActivate()
+ {
+ if ( null == list )
+ {
+ System.out.println( "initialise list" );
+ list = new ArrayList<StringContainer>();
+ list.add( new StringContainer( "Tapestry" ) );
+ list.add( new StringContainer( "GWT" ) );
+ list.add( new StringContainer( "Seam" ) );
+ list.add( new StringContainer( "Wicket" ) );
+ list.add( new StringContainer( "TIBCO GI" ) );
+ list.add( new StringContainer( "JSF" ) );
+ }
+ }
+
+ void onSubmit()
+ {
+ System.out.println( "onSubmit called, list="+list );
+ list.add( new StringContainer( Integer.toString( (int)System.currentTimeMillis() % 1000 ) ) );
+ }
+}
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 2009-01-19 17:07:20 UTC (rev 985)
+++ t5-equanda-example/src/main/java/org/equanda/example/t5/services/AppModule.java 2009-01-21 14:53:40 UTC (rev 986)
@@ -28,10 +28,7 @@
import org.apache.tapestry5.ioc.OrderedConfiguration;
import org.apache.tapestry5.ioc.ServiceBinder;
import org.apache.tapestry5.ioc.annotations.InjectService;
-import org.apache.tapestry5.services.Request;
-import org.apache.tapestry5.services.RequestFilter;
-import org.apache.tapestry5.services.RequestHandler;
-import org.apache.tapestry5.services.Response;
+import org.apache.tapestry5.services.*;
import org.slf4j.Logger;
import java.io.IOException;
@@ -45,6 +42,7 @@
public static void bind( ServiceBinder binder )
{
// binder.bind(MyServiceInterface.class, MyServiceImpl.class);
+ //binder.bind( PersistentFieldStrategy.class, MyPersistentFieldStrategy.class );
// Make bind() calls on the binder object to define most IoC services.
// Use service builder methods (example below) when the implementation
@@ -52,7 +50,13 @@
// invoking the constructor.
}
+ public void contributePersistentFieldManager( MappedConfiguration<String, PersistentFieldStrategy> configuration,
+ Request request)
+ {
+ configuration.add( MyPersistentFieldStrategy.KEY, new MyPersistentFieldStrategy( request ) );
+ }
+
public static void contributeApplicationDefaults(
MappedConfiguration<String, String> configuration )
{
Added: t5-equanda-example/src/main/java/org/equanda/example/t5/services/MyPersistentFieldStrategy.java
===================================================================
--- t5-equanda-example/src/main/java/org/equanda/example/t5/services/MyPersistentFieldStrategy.java (rev 0)
+++ t5-equanda-example/src/main/java/org/equanda/example/t5/services/MyPersistentFieldStrategy.java 2009-01-21 14:53:40 UTC (rev 986)
@@ -0,0 +1,121 @@
+/**
+ * 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.example.t5.services;
+
+import org.apache.tapestry5.services.PersistentFieldChange;
+import org.apache.tapestry5.services.PersistentFieldStrategy;
+import org.apache.tapestry5.services.Request;
+import org.apache.tapestry5.services.Session;
+import org.equanda.example.t5.data.PersistentFieldChangeImpl;
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.List;
+
+/**
+ * Base class for strategies that store their values as keys in the session. Implements a uniform format for the keys,
+ * based on a prefix to identify the particular strategy.
+ *
+ * @author <a href="mailto:jo...@pr...">Joachim Van der Auwera</a>
+ */
+public class MyPersistentFieldStrategy
+ implements PersistentFieldStrategy
+{
+ public static final String KEY = "my";
+ /** Prefix used to identify keys stored in the session that are being used t */
+ private static final String PREFIX = "my:";
+
+ private final Request request;
+
+ public MyPersistentFieldStrategy( Request request )
+ {
+ System.out.println( "using MyPersistentFieldStrategy" );
+ this.request = request;
+ }
+
+ public final Collection<PersistentFieldChange> gatherFieldChanges( String pageName )
+ {
+ System.out.println( "Persist gatherChanges for page " + pageName );
+ Session session = request.getSession( false );
+
+ if ( session == null ) return Collections.emptyList();
+
+ List<PersistentFieldChange> result = new ArrayList<PersistentFieldChange>();
+ String fullPrefix = PREFIX + pageName + ":";
+ for ( String name : session.getAttributeNames( fullPrefix ) )
+ {
+ Object persistedValue = session.getAttribute( name );
+ result.add( buildChange( name, persistedValue ) );
+ }
+ return result;
+ }
+
+ public void discardChanges( String pageName )
+ {
+ Session session = request.getSession( false );
+ if ( session == null ) return;
+
+ String fullPrefix = PREFIX + pageName + ":";
+ for ( String name : session.getAttributeNames( fullPrefix ) )
+ {
+ session.setAttribute( name, null );
+ }
+ }
+
+ private PersistentFieldChange buildChange( String name, Object newValue )
+ {
+ String[] chunks = name.split( ":" );
+
+ // Will be empty string for the root component
+ String componentId = chunks[ 2 ];
+ String fieldName = chunks[ 3 ];
+ System.out.println( "buildChange "+componentId+":"+fieldName+"="+newValue );
+ return new PersistentFieldChangeImpl( componentId, fieldName, newValue );
+ }
+
+ public final void postChange( String pageName, String componentId, String fieldName, Object persistedValue )
+ {
+ System.out.println( "Persist " + pageName + ":" + componentId + ":" + fieldName + "=" + persistedValue );
+ StringBuilder builder = new StringBuilder( PREFIX );
+ builder.append( pageName );
+ builder.append( ':' );
+
+ if ( componentId != null ) builder.append( componentId );
+
+ builder.append( ':' );
+ builder.append( fieldName );
+
+ Session session = request.getSession( persistedValue != null );
+
+ // TAPESTRY-2308: The session will be false when newValue is null and the session
+ // does not already exist.
+
+ if ( session != null )
+ {
+ session.setAttribute( builder.toString(), persistedValue );
+ }
+ }
+}
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 2009-01-19 17:07:20 UTC (rev 985)
+++ t5-equanda-example/src/main/resources/org/equanda/example/t5/pages/Start.tml 2009-01-21 14:53:40 UTC (rev 986)
@@ -106,13 +106,11 @@
fully handled client side.</p>
<br/>
- <t:form>
- <ul>
- <div t:id="pagedLoop" t:type="equanda/JSPagedLoop" t:source="prop:list" t:value="prop:current" t:rowsPerPage="5" t:additionalRowCount="0">
- <li>${current}</li>
- </div>
- </ul>
- </t:form>
+ <ul>
+ <div t:id="pagedLoop" t:type="equanda/JSPagedLoop" t:source="prop:list" t:value="prop:current" t:rowsPerPage="5" t:additionalRowCount="0">
+ <li>${current}</li>
+ </div>
+ </ul>
</t:parameter>
<t:parameter name="title6">TextField</t:parameter>
<t:parameter name="content6">
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <tri...@us...> - 2009-01-19 17:07:27
|
Revision: 985
http://equanda.svn.sourceforge.net/equanda/?rev=985&view=rev
Author: triathlon98
Date: 2009-01-19 17:07:20 +0000 (Mon, 19 Jan 2009)
Log Message:
-----------
actions need to save their side-effects
Modified Paths:
--------------
trunk/equanda-generate/src/main/velocity/t5gui/pages/Edit.java.vm
Modified: trunk/equanda-generate/src/main/velocity/t5gui/pages/Edit.java.vm
===================================================================
--- trunk/equanda-generate/src/main/velocity/t5gui/pages/Edit.java.vm 2009-01-19 16:22:25 UTC (rev 984)
+++ trunk/equanda-generate/src/main/velocity/t5gui/pages/Edit.java.vm 2009-01-19 17:07:20 UTC (rev 985)
@@ -76,7 +76,9 @@
{
${ejbPackage}.client.${table.Name} obj = getObject();
obj.equandaUpdate( true );
- return obj.linkDogTagger();
+ Object res = obj.${action.Name}();
+ obj.equandaUpdate( true );
+ return res;
}
catch ( EquandaException epe )
{
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|