incubator-isis-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rmatth...@apache.org
Subject svn commit: r1358136 - /incubator/isis/trunk/framework/viewer/scimpi/scimpi-dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/action/ActionAction.java
Date Fri, 06 Jul 2012 11:41:18 GMT
Author: rmatthews
Date: Fri Jul  6 11:41:18 2012
New Revision: 1358136

URL: http://svn.apache.org/viewvc?rev=1358136&view=rev
Log:
ISIS-162 Improved the concurrency message. 

Modified:
    incubator/isis/trunk/framework/viewer/scimpi/scimpi-dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/action/ActionAction.java

Modified: incubator/isis/trunk/framework/viewer/scimpi/scimpi-dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/action/ActionAction.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/viewer/scimpi/scimpi-dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/action/ActionAction.java?rev=1358136&r1=1358135&r2=1358136&view=diff
==============================================================================
--- incubator/isis/trunk/framework/viewer/scimpi/scimpi-dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/action/ActionAction.java
(original)
+++ incubator/isis/trunk/framework/viewer/scimpi/scimpi-dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/action/ActionAction.java
Fri Jul  6 11:41:18 2012
@@ -152,8 +152,12 @@ public class ActionAction implements Act
             }
 
         } catch (final ConcurrencyException e) {
-
-            IsisContext.getMessageBroker().addMessage(e.getMessage());
+            ObjectAdapter object = IsisContext.getPersistenceSession().getAdapterManager().getAdapterFor(e.getSource());

+            String exceptionMessage = e.getMessage();
+            String user = exceptionMessage.substring(0, exceptionMessage.indexOf(" "));
+            String errorMessage = "The data for '" + object.titleString() + "' was changed
by " + user
+                    + ". Please repeat the action based on those changes.";
+            IsisContext.getMessageBroker().addMessage(errorMessage);
 
             entryState.setForm(formId);
             context.addVariable(ENTRY_FIELDS, entryState, Scope.REQUEST);



Mime
View raw message