You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tapestry.apache.org by hl...@apache.org on 2013/09/11 03:43:15 UTC

[1/3] git commit: Ensure that the Hibernate tab of the T5Dashboard is after the Services tab

Updated Branches:
  refs/heads/master 5e6d1b041 -> e8761d09d


Ensure that the Hibernate tab of the T5Dashboard is after the Services tab


Project: http://git-wip-us.apache.org/repos/asf/tapestry-5/repo
Commit: http://git-wip-us.apache.org/repos/asf/tapestry-5/commit/4e9367cd
Tree: http://git-wip-us.apache.org/repos/asf/tapestry-5/tree/4e9367cd
Diff: http://git-wip-us.apache.org/repos/asf/tapestry-5/diff/4e9367cd

Branch: refs/heads/master
Commit: 4e9367cdbcfb22406386862208333b1ec99e7c3f
Parents: 5e6d1b0
Author: Howard M. Lewis Ship <hl...@apache.org>
Authored: Tue Sep 10 18:30:53 2013 -0700
Committer: Howard M. Lewis Ship <hl...@apache.org>
Committed: Tue Sep 10 18:30:53 2013 -0700

----------------------------------------------------------------------
 .../org/apache/tapestry5/hibernate/modules/HibernateModule.java    | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/4e9367cd/tapestry-hibernate/src/main/java/org/apache/tapestry5/hibernate/modules/HibernateModule.java
----------------------------------------------------------------------
diff --git a/tapestry-hibernate/src/main/java/org/apache/tapestry5/hibernate/modules/HibernateModule.java b/tapestry-hibernate/src/main/java/org/apache/tapestry5/hibernate/modules/HibernateModule.java
index a9fb486..4df4c39 100644
--- a/tapestry-hibernate/src/main/java/org/apache/tapestry5/hibernate/modules/HibernateModule.java
+++ b/tapestry-hibernate/src/main/java/org/apache/tapestry5/hibernate/modules/HibernateModule.java
@@ -190,6 +190,6 @@ public class HibernateModule
     @Contribute(DashboardManager.class)
     public static void provideHibernateDashboardTab(OrderedConfiguration<DashboardTab> configuration)
     {
-        configuration.add("HibernateStatistics", new DashboardTab("Hibernate", "core/HibernateStatistics"));
+        configuration.add("HibernateStatistics", new DashboardTab("Hibernate", "core/HibernateStatistics"), "after:Services");
     }
 }


[3/3] git commit: Add some notes about new features

Posted by hl...@apache.org.
Add some notes about new features


Project: http://git-wip-us.apache.org/repos/asf/tapestry-5/repo
Commit: http://git-wip-us.apache.org/repos/asf/tapestry-5/commit/e8761d09
Tree: http://git-wip-us.apache.org/repos/asf/tapestry-5/tree/e8761d09
Diff: http://git-wip-us.apache.org/repos/asf/tapestry-5/diff/e8761d09

Branch: refs/heads/master
Commit: e8761d09ddb8c3a0d3f3ff2ae54640e1cb3ea139
Parents: dd693ca
Author: Howard M. Lewis Ship <hl...@apache.org>
Authored: Tue Sep 10 18:43:09 2013 -0700
Committer: Howard M. Lewis Ship <hl...@apache.org>
Committed: Tue Sep 10 18:43:09 2013 -0700

----------------------------------------------------------------------
 54_RELEASE_NOTES.txt | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/e8761d09/54_RELEASE_NOTES.txt
----------------------------------------------------------------------
diff --git a/54_RELEASE_NOTES.txt b/54_RELEASE_NOTES.txt
index 6ed7c3c..b2c60a8 100644
--- a/54_RELEASE_NOTES.txt
+++ b/54_RELEASE_NOTES.txt
@@ -70,6 +70,23 @@ inside a Twitter Bootstrap form.
 
 This new component renders a `<span>` tag for a Bootstrap 3 Glyphicon.
 
+## DevTool Component
+
+A component that can be added to your application-specific Layout to provide some useful support when in development
+mode (but disabled in production mode):
+- Identifies the current page's class name and logical name
+- Re-render the current page
+- Re-render the current page with component rendering comments
+- Reset the current page's persistent state
+- Kill (invalidate) any HttpSession
+- Open the T5 Dashboard in a new window
+- Reload component classes
+
+## T5Dashboard Page
+
+The T5 Dashboard is a new page the consolidates Tapestry 5.4's PageCatalog and ServiceStatus pages.
+The page is itself extensible, allowing libraries or applications to add their own tabs.
+
 ## tapestry-test deprecated
 
 The tapestry-test module contains base classes used when writing TestNG, Selenium, and EasyMock tests.


[2/3] git commit: Add a development-mode-only option to reload component classes

Posted by hl...@apache.org.
Add a development-mode-only option to reload component classes


Project: http://git-wip-us.apache.org/repos/asf/tapestry-5/repo
Commit: http://git-wip-us.apache.org/repos/asf/tapestry-5/commit/dd693ca7
Tree: http://git-wip-us.apache.org/repos/asf/tapestry-5/tree/dd693ca7
Diff: http://git-wip-us.apache.org/repos/asf/tapestry-5/diff/dd693ca7

Branch: refs/heads/master
Commit: dd693ca786343f390c28fa1c4e72e2205d026fc5
Parents: 4e9367c
Author: Howard M. Lewis Ship <hl...@apache.org>
Authored: Tue Sep 10 18:39:01 2013 -0700
Committer: Howard M. Lewis Ship <hl...@apache.org>
Committed: Tue Sep 10 18:39:01 2013 -0700

----------------------------------------------------------------------
 .../tapestry5/corelib/components/DevTool.java   | 21 ++++++++++++++++++++
 .../tapestry5/corelib/components/DevTool.tml    |  5 +++++
 2 files changed, 26 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/dd693ca7/tapestry-core/src/main/java/org/apache/tapestry5/corelib/components/DevTool.java
----------------------------------------------------------------------
diff --git a/tapestry-core/src/main/java/org/apache/tapestry5/corelib/components/DevTool.java b/tapestry-core/src/main/java/org/apache/tapestry5/corelib/components/DevTool.java
index 0094f97..470a826 100644
--- a/tapestry-core/src/main/java/org/apache/tapestry5/corelib/components/DevTool.java
+++ b/tapestry-core/src/main/java/org/apache/tapestry5/corelib/components/DevTool.java
@@ -21,6 +21,8 @@ import org.apache.tapestry5.alerts.AlertManager;
 import org.apache.tapestry5.annotations.Component;
 import org.apache.tapestry5.annotations.Environmental;
 import org.apache.tapestry5.annotations.Parameter;
+import org.apache.tapestry5.annotations.Property;
+import org.apache.tapestry5.internal.services.ComponentInstantiatorSource;
 import org.apache.tapestry5.ioc.annotations.Inject;
 import org.apache.tapestry5.ioc.annotations.Symbol;
 import org.apache.tapestry5.services.Request;
@@ -58,6 +60,7 @@ public class DevTool
     private String className;
 
 
+    @Property
     @Inject
     @Symbol(SymbolConstants.PRODUCTION_MODE)
     private boolean productionMode;
@@ -81,6 +84,9 @@ public class DevTool
     @Inject
     private ComponentResources resources;
 
+    @Inject
+    private ComponentInstantiatorSource componentInstantiatorSource;
+
     public String getZoneElement()
     {
         return navbar ? "li" : "div";
@@ -144,4 +150,19 @@ public class DevTool
 
         return devmodezone.getBody();
     }
+
+    Object onActionFromReload()
+    {
+        if (productionMode)
+        {
+            alertManager.error("Forcing a class reload is only allowed when executing in development mode.");
+            return null;
+        }
+
+        componentInstantiatorSource.forceComponentInvalidation();
+
+        alertManager.info("Forced a component class reload.");
+
+        return devmodezone.getBody();
+    }
 }

http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/dd693ca7/tapestry-core/src/main/resources/org/apache/tapestry5/corelib/components/DevTool.tml
----------------------------------------------------------------------
diff --git a/tapestry-core/src/main/resources/org/apache/tapestry5/corelib/components/DevTool.tml b/tapestry-core/src/main/resources/org/apache/tapestry5/corelib/components/DevTool.tml
index 0fcbbb5..6142748 100644
--- a/tapestry-core/src/main/resources/org/apache/tapestry5/corelib/components/DevTool.tml
+++ b/tapestry-core/src/main/resources/org/apache/tapestry5/corelib/components/DevTool.tml
@@ -26,6 +26,11 @@
             </t:pagelink>
         </li>
         <li class="divider"/>
+        <t:if test="!productionMode">
+            <li>
+                <t:actionlink zone="^" t:id="reload">Reload Component Classes</t:actionlink>
+            </li>
+        </t:if>
         <li>
             <t:pagelink target="_new" page="t5dashboard">Go to T5 Dashboard
                 <t:glyphicon name="new-window"/>


[3/3] git commit: Add some notes about new features

Posted by hl...@apache.org.
Add some notes about new features


Project: http://git-wip-us.apache.org/repos/asf/tapestry-5/repo
Commit: http://git-wip-us.apache.org/repos/asf/tapestry-5/commit/e8761d09
Tree: http://git-wip-us.apache.org/repos/asf/tapestry-5/tree/e8761d09
Diff: http://git-wip-us.apache.org/repos/asf/tapestry-5/diff/e8761d09

Branch: refs/heads/master
Commit: e8761d09ddb8c3a0d3f3ff2ae54640e1cb3ea139
Parents: dd693ca
Author: Howard M. Lewis Ship <hl...@apache.org>
Authored: Tue Sep 10 18:43:09 2013 -0700
Committer: Howard M. Lewis Ship <hl...@apache.org>
Committed: Tue Sep 10 18:43:09 2013 -0700

----------------------------------------------------------------------
 54_RELEASE_NOTES.txt | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/e8761d09/54_RELEASE_NOTES.txt
----------------------------------------------------------------------
diff --git a/54_RELEASE_NOTES.txt b/54_RELEASE_NOTES.txt
index 6ed7c3c..b2c60a8 100644
--- a/54_RELEASE_NOTES.txt
+++ b/54_RELEASE_NOTES.txt
@@ -70,6 +70,23 @@ inside a Twitter Bootstrap form.
 
 This new component renders a `<span>` tag for a Bootstrap 3 Glyphicon.
 
+## DevTool Component
+
+A component that can be added to your application-specific Layout to provide some useful support when in development
+mode (but disabled in production mode):
+- Identifies the current page's class name and logical name
+- Re-render the current page
+- Re-render the current page with component rendering comments
+- Reset the current page's persistent state
+- Kill (invalidate) any HttpSession
+- Open the T5 Dashboard in a new window
+- Reload component classes
+
+## T5Dashboard Page
+
+The T5 Dashboard is a new page the consolidates Tapestry 5.4's PageCatalog and ServiceStatus pages.
+The page is itself extensible, allowing libraries or applications to add their own tabs.
+
 ## tapestry-test deprecated
 
 The tapestry-test module contains base classes used when writing TestNG, Selenium, and EasyMock tests.


[2/3] git commit: Add a development-mode-only option to reload component classes

Posted by hl...@apache.org.
Add a development-mode-only option to reload component classes


Project: http://git-wip-us.apache.org/repos/asf/tapestry-5/repo
Commit: http://git-wip-us.apache.org/repos/asf/tapestry-5/commit/dd693ca7
Tree: http://git-wip-us.apache.org/repos/asf/tapestry-5/tree/dd693ca7
Diff: http://git-wip-us.apache.org/repos/asf/tapestry-5/diff/dd693ca7

Branch: refs/heads/master
Commit: dd693ca786343f390c28fa1c4e72e2205d026fc5
Parents: 4e9367c
Author: Howard M. Lewis Ship <hl...@apache.org>
Authored: Tue Sep 10 18:39:01 2013 -0700
Committer: Howard M. Lewis Ship <hl...@apache.org>
Committed: Tue Sep 10 18:39:01 2013 -0700

----------------------------------------------------------------------
 .../tapestry5/corelib/components/DevTool.java   | 21 ++++++++++++++++++++
 .../tapestry5/corelib/components/DevTool.tml    |  5 +++++
 2 files changed, 26 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/dd693ca7/tapestry-core/src/main/java/org/apache/tapestry5/corelib/components/DevTool.java
----------------------------------------------------------------------
diff --git a/tapestry-core/src/main/java/org/apache/tapestry5/corelib/components/DevTool.java b/tapestry-core/src/main/java/org/apache/tapestry5/corelib/components/DevTool.java
index 0094f97..470a826 100644
--- a/tapestry-core/src/main/java/org/apache/tapestry5/corelib/components/DevTool.java
+++ b/tapestry-core/src/main/java/org/apache/tapestry5/corelib/components/DevTool.java
@@ -21,6 +21,8 @@ import org.apache.tapestry5.alerts.AlertManager;
 import org.apache.tapestry5.annotations.Component;
 import org.apache.tapestry5.annotations.Environmental;
 import org.apache.tapestry5.annotations.Parameter;
+import org.apache.tapestry5.annotations.Property;
+import org.apache.tapestry5.internal.services.ComponentInstantiatorSource;
 import org.apache.tapestry5.ioc.annotations.Inject;
 import org.apache.tapestry5.ioc.annotations.Symbol;
 import org.apache.tapestry5.services.Request;
@@ -58,6 +60,7 @@ public class DevTool
     private String className;
 
 
+    @Property
     @Inject
     @Symbol(SymbolConstants.PRODUCTION_MODE)
     private boolean productionMode;
@@ -81,6 +84,9 @@ public class DevTool
     @Inject
     private ComponentResources resources;
 
+    @Inject
+    private ComponentInstantiatorSource componentInstantiatorSource;
+
     public String getZoneElement()
     {
         return navbar ? "li" : "div";
@@ -144,4 +150,19 @@ public class DevTool
 
         return devmodezone.getBody();
     }
+
+    Object onActionFromReload()
+    {
+        if (productionMode)
+        {
+            alertManager.error("Forcing a class reload is only allowed when executing in development mode.");
+            return null;
+        }
+
+        componentInstantiatorSource.forceComponentInvalidation();
+
+        alertManager.info("Forced a component class reload.");
+
+        return devmodezone.getBody();
+    }
 }

http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/dd693ca7/tapestry-core/src/main/resources/org/apache/tapestry5/corelib/components/DevTool.tml
----------------------------------------------------------------------
diff --git a/tapestry-core/src/main/resources/org/apache/tapestry5/corelib/components/DevTool.tml b/tapestry-core/src/main/resources/org/apache/tapestry5/corelib/components/DevTool.tml
index 0fcbbb5..6142748 100644
--- a/tapestry-core/src/main/resources/org/apache/tapestry5/corelib/components/DevTool.tml
+++ b/tapestry-core/src/main/resources/org/apache/tapestry5/corelib/components/DevTool.tml
@@ -26,6 +26,11 @@
             </t:pagelink>
         </li>
         <li class="divider"/>
+        <t:if test="!productionMode">
+            <li>
+                <t:actionlink zone="^" t:id="reload">Reload Component Classes</t:actionlink>
+            </li>
+        </t:if>
         <li>
             <t:pagelink target="_new" page="t5dashboard">Go to T5 Dashboard
                 <t:glyphicon name="new-window"/>