You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@isis.apache.org by da...@apache.org on 2012/10/07 18:13:51 UTC

svn commit: r1395335 - in /incubator/isis/trunk: examples/claims/dom/ examples/quickstart/dom/ framework/runtimes/dflt/objectstores/jdo/ framework/runtimes/dflt/objectstores/jdo/jdo-applib/ framework/tck/tck-dom/ framework/viewer/wicket/ framework/view...

Author: danhaywood
Date: Sun Oct  7 16:13:50 2012
New Revision: 1395335

URL: http://svn.apache.org/viewvc?rev=1395335&view=rev
Log:
ISIS-14, ISIS-232: upgrade DataNucleus and Wicket versions

* upgrade DataNucleus to 3.1.1 (hopefully fix Jenkins build problem)
* upgrade Wicket to 6.1.0
* reinstate use of RenderStrategy.REDIRECT_TO_PAGE (for optimistic locking support)
* only bookmark pages for actions if the action is safe (ie is query-only)

Modified:
    incubator/isis/trunk/examples/claims/dom/pom.xml
    incubator/isis/trunk/examples/quickstart/dom/pom.xml
    incubator/isis/trunk/framework/runtimes/dflt/objectstores/jdo/jdo-applib/pom.xml
    incubator/isis/trunk/framework/runtimes/dflt/objectstores/jdo/pom.xml
    incubator/isis/trunk/framework/tck/tck-dom/pom.xml
    incubator/isis/trunk/framework/viewer/wicket/pom.xml
    incubator/isis/trunk/framework/viewer/wicket/wicket-model/src/main/java/org/apache/isis/viewer/wicket/model/models/ActionModel.java
    incubator/isis/trunk/framework/viewer/wicket/wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/actions/ActionPanel.java
    incubator/isis/trunk/framework/viewer/wicket/wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/pages/action/ActionPage.java
    incubator/isis/trunk/framework/viewer/wicket/wicket-viewer/src/main/java/org/apache/isis/viewer/wicket/viewer/IsisWicketApplication.java

Modified: incubator/isis/trunk/examples/claims/dom/pom.xml
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/examples/claims/dom/pom.xml?rev=1395335&r1=1395334&r2=1395335&view=diff
==============================================================================
--- incubator/isis/trunk/examples/claims/dom/pom.xml (original)
+++ incubator/isis/trunk/examples/claims/dom/pom.xml Sun Oct  7 16:13:50 2012
@@ -34,7 +34,7 @@
             <plugin>
                 <groupId>org.datanucleus</groupId>
                 <artifactId>maven-datanucleus-plugin</artifactId>
-                <version>3.1.0-release</version>
+                <version>3.1.1</version>
                 <configuration>
                 	<fork>false</fork>
                     <log4jConfiguration>${basedir}/log4j.properties</log4jConfiguration>

Modified: incubator/isis/trunk/examples/quickstart/dom/pom.xml
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/examples/quickstart/dom/pom.xml?rev=1395335&r1=1395334&r2=1395335&view=diff
==============================================================================
--- incubator/isis/trunk/examples/quickstart/dom/pom.xml (original)
+++ incubator/isis/trunk/examples/quickstart/dom/pom.xml Sun Oct  7 16:13:50 2012
@@ -34,7 +34,7 @@
             <plugin>
                 <groupId>org.datanucleus</groupId>
                 <artifactId>maven-datanucleus-plugin</artifactId>
-                <version>3.1.0-release</version>
+                <version>3.1.1</version>
                 <configuration>
                 	<fork>false</fork>
                     <log4jConfiguration>${basedir}/log4j.properties</log4jConfiguration>

Modified: incubator/isis/trunk/framework/runtimes/dflt/objectstores/jdo/jdo-applib/pom.xml
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/runtimes/dflt/objectstores/jdo/jdo-applib/pom.xml?rev=1395335&r1=1395334&r2=1395335&view=diff
==============================================================================
--- incubator/isis/trunk/framework/runtimes/dflt/objectstores/jdo/jdo-applib/pom.xml (original)
+++ incubator/isis/trunk/framework/runtimes/dflt/objectstores/jdo/jdo-applib/pom.xml Sun Oct  7 16:13:50 2012
@@ -43,7 +43,7 @@
             <plugin>
                 <groupId>org.datanucleus</groupId>
                 <artifactId>maven-datanucleus-plugin</artifactId>
-                <version>3.1.0-release</version>
+                <version>3.1.1</version>
                 <configuration>
                 	<fork>false</fork>
                     <verbose>true</verbose>

Modified: incubator/isis/trunk/framework/runtimes/dflt/objectstores/jdo/pom.xml
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/runtimes/dflt/objectstores/jdo/pom.xml?rev=1395335&r1=1395334&r2=1395335&view=diff
==============================================================================
--- incubator/isis/trunk/framework/runtimes/dflt/objectstores/jdo/pom.xml (original)
+++ incubator/isis/trunk/framework/runtimes/dflt/objectstores/jdo/pom.xml Sun Oct  7 16:13:50 2012
@@ -164,7 +164,7 @@
 	        <dependency>
 	            <groupId>org.datanucleus</groupId>
 	            <artifactId>datanucleus-enhancer</artifactId>
-	            <version>3.1.0-release</version>
+	            <version>3.1.1</version>
 	        </dependency>
 	        <dependency>
 	            <groupId>org.datanucleus</groupId>

Modified: incubator/isis/trunk/framework/tck/tck-dom/pom.xml
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/tck/tck-dom/pom.xml?rev=1395335&r1=1395334&r2=1395335&view=diff
==============================================================================
--- incubator/isis/trunk/framework/tck/tck-dom/pom.xml (original)
+++ incubator/isis/trunk/framework/tck/tck-dom/pom.xml Sun Oct  7 16:13:50 2012
@@ -34,7 +34,7 @@
             <plugin>
                 <groupId>org.datanucleus</groupId>
                 <artifactId>maven-datanucleus-plugin</artifactId>
-                <version>3.1.0-release</version>
+                <version>3.1.1</version>
                 <configuration>
                 	<fork>false</fork>
                     <verbose>true</verbose>

Modified: incubator/isis/trunk/framework/viewer/wicket/pom.xml
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/viewer/wicket/pom.xml?rev=1395335&r1=1395334&r2=1395335&view=diff
==============================================================================
--- incubator/isis/trunk/framework/viewer/wicket/pom.xml (original)
+++ incubator/isis/trunk/framework/viewer/wicket/pom.xml Sun Oct  7 16:13:50 2012
@@ -38,7 +38,7 @@
         <siteBaseDir>../..</siteBaseDir>
 		<relativeUrl>viewer/wicket/</relativeUrl>
 
-		<wicket.version>6.0.0</wicket.version>
+		<wicket.version>6.1.0</wicket.version>
 		<wicketstuff.version>6.0.0</wicketstuff.version>
 		<wicket-select2.version>2.0</wicket-select2.version>
 

Modified: incubator/isis/trunk/framework/viewer/wicket/wicket-model/src/main/java/org/apache/isis/viewer/wicket/model/models/ActionModel.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/viewer/wicket/wicket-model/src/main/java/org/apache/isis/viewer/wicket/model/models/ActionModel.java?rev=1395335&r1=1395334&r2=1395335&view=diff
==============================================================================
--- incubator/isis/trunk/framework/viewer/wicket/wicket-model/src/main/java/org/apache/isis/viewer/wicket/model/models/ActionModel.java (original)
+++ incubator/isis/trunk/framework/viewer/wicket/wicket-model/src/main/java/org/apache/isis/viewer/wicket/model/models/ActionModel.java Sun Oct  7 16:13:50 2012
@@ -51,6 +51,7 @@ import org.apache.isis.viewer.wicket.mod
 import org.apache.isis.viewer.wicket.model.mementos.ObjectAdapterMemento;
 import org.apache.isis.viewer.wicket.model.mementos.PageParameterNames;
 import org.apache.isis.viewer.wicket.model.util.ObjectActionParameters;
+import org.apache.isis.applib.annotation.ActionSemantics;
 
 /**
  * Models an action invocation, either the gathering of arguments for the
@@ -519,6 +520,9 @@ public class ActionModel extends Bookmar
         return IsisContext.getOidMarshaller();
     }
 
+    public boolean hasSafeActionSemantics() {
+        return getActionMemento().getAction().getSemantics() == ActionSemantics.Of.SAFE;
+    }
 
 
 }

Modified: incubator/isis/trunk/framework/viewer/wicket/wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/actions/ActionPanel.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/viewer/wicket/wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/actions/ActionPanel.java?rev=1395335&r1=1395334&r2=1395335&view=diff
==============================================================================
--- incubator/isis/trunk/framework/viewer/wicket/wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/actions/ActionPanel.java (original)
+++ incubator/isis/trunk/framework/viewer/wicket/wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/actions/ActionPanel.java Sun Oct  7 16:13:50 2012
@@ -25,6 +25,7 @@ import java.util.List;
 import org.apache.wicket.markup.html.basic.Label;
 import org.apache.wicket.model.Model;
 
+import org.apache.isis.applib.annotation.ActionSemantics;
 import org.apache.isis.core.metamodel.adapter.ObjectAdapter;
 import org.apache.isis.core.metamodel.adapter.version.ConcurrencyException;
 import org.apache.isis.core.metamodel.facets.object.value.ValueFacet;
@@ -130,7 +131,9 @@ public class ActionPanel extends PanelAb
             final ResultType resultType = ResultType.determineFor(resultAdapter);
             resultType.addResults(this, resultAdapter);
             
-            bookmarkPage(actionModel);
+            if(actionModel.hasSafeActionSemantics()) {
+                bookmarkPage(actionModel);
+            }
 
         } catch(ConcurrencyException ex) {
             

Modified: incubator/isis/trunk/framework/viewer/wicket/wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/pages/action/ActionPage.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/viewer/wicket/wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/pages/action/ActionPage.java?rev=1395335&r1=1395334&r2=1395335&view=diff
==============================================================================
--- incubator/isis/trunk/framework/viewer/wicket/wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/pages/action/ActionPage.java (original)
+++ incubator/isis/trunk/framework/viewer/wicket/wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/pages/action/ActionPage.java Sun Oct  7 16:13:50 2012
@@ -23,6 +23,7 @@ import org.apache.wicket.Component;
 import org.apache.wicket.authroles.authorization.strategies.role.annotations.AuthorizeInstantiation;
 import org.apache.wicket.request.mapper.parameter.PageParameters;
 
+import org.apache.isis.applib.annotation.ActionSemantics;
 import org.apache.isis.viewer.wicket.model.models.ActionModel;
 import org.apache.isis.viewer.wicket.model.models.ActionModel.Mode;
 import org.apache.isis.viewer.wicket.ui.ComponentType;
@@ -43,7 +44,9 @@ public class ActionPage extends PageAbst
         super(new PageParameters(), ComponentType.ACTION);
         addChildComponents(model);
 
-        bookmarkPage(model);
+        if(model.hasSafeActionSemantics()) {
+            bookmarkPage(model);
+        }
         addBreadcrumbs();
     }
 

Modified: incubator/isis/trunk/framework/viewer/wicket/wicket-viewer/src/main/java/org/apache/isis/viewer/wicket/viewer/IsisWicketApplication.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/viewer/wicket/wicket-viewer/src/main/java/org/apache/isis/viewer/wicket/viewer/IsisWicketApplication.java?rev=1395335&r1=1395334&r2=1395335&view=diff
==============================================================================
--- incubator/isis/trunk/framework/viewer/wicket/wicket-viewer/src/main/java/org/apache/isis/viewer/wicket/viewer/IsisWicketApplication.java (original)
+++ incubator/isis/trunk/framework/viewer/wicket/wicket-viewer/src/main/java/org/apache/isis/viewer/wicket/viewer/IsisWicketApplication.java Sun Oct  7 16:13:50 2012
@@ -174,14 +174,7 @@ public class IsisWicketApplication exten
     protected void init() {
         super.init();
         
-        // 6.0.0 rather than overriding getRequestCycleSettings
-        //
-        // TODO: to reinstate for our optimistic locking strategy; 
-        // need to use REDIRECT_TO_BUFFER temporarily in order to get FeedbackMessage's to render
-        // see enquiry raised on wicket-user@a.o
-        
-        //final RenderStrategy renderStrategy = RenderStrategy.REDIRECT_TO_RENDER;
-        final RenderStrategy renderStrategy = RenderStrategy.REDIRECT_TO_BUFFER;
+        final RenderStrategy renderStrategy = RenderStrategy.REDIRECT_TO_RENDER;
         
         getRequestCycleSettings().setRenderStrategy(renderStrategy);