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 2016/07/05 06:54:57 UTC

[4/8] isis git commit: ISIS-1461: alternative fix for concurrency exception when click on link.

ISIS-1461: alternative fix for concurrency exception when click on link.

The solution is more localized; just disable concurrency checking when rendering a link.


Project: http://git-wip-us.apache.org/repos/asf/isis/repo
Commit: http://git-wip-us.apache.org/repos/asf/isis/commit/2f67917b
Tree: http://git-wip-us.apache.org/repos/asf/isis/tree/2f67917b
Diff: http://git-wip-us.apache.org/repos/asf/isis/diff/2f67917b

Branch: refs/heads/master
Commit: 2f67917b59eff89c2fc4d790bb8468ae97af9517
Parents: 07d2fd2
Author: Dan Haywood <da...@haywood-associates.co.uk>
Authored: Tue Jul 5 07:36:31 2016 +0100
Committer: Dan Haywood <da...@haywood-associates.co.uk>
Committed: Tue Jul 5 07:36:31 2016 +0100

----------------------------------------------------------------------
 .../widgets/entitysimplelink/EntityLinkSimplePanel.java  | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/isis/blob/2f67917b/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/widgets/entitysimplelink/EntityLinkSimplePanel.java
----------------------------------------------------------------------
diff --git a/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/widgets/entitysimplelink/EntityLinkSimplePanel.java b/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/widgets/entitysimplelink/EntityLinkSimplePanel.java
index cf04df6..ed810b1 100644
--- a/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/widgets/entitysimplelink/EntityLinkSimplePanel.java
+++ b/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/widgets/entitysimplelink/EntityLinkSimplePanel.java
@@ -24,6 +24,7 @@ import org.apache.wicket.markup.html.basic.Label;
 import org.apache.wicket.markup.html.form.FormComponentPanel;
 
 import org.apache.isis.core.metamodel.adapter.ObjectAdapter;
+import org.apache.isis.core.metamodel.adapter.mgr.AdapterManager;
 import org.apache.isis.viewer.wicket.model.models.EntityModel;
 import org.apache.isis.viewer.wicket.ui.ComponentFactory;
 import org.apache.isis.viewer.wicket.ui.ComponentType;
@@ -44,7 +45,15 @@ public class EntityLinkSimplePanel extends FormComponentPanelAbstract<ObjectAdap
     public EntityLinkSimplePanel(final String id, final EntityModel entityModel) {
         super(id, entityModel);
         setType(ObjectAdapter.class);
-        buildGui();
+
+        // this is a bit of a hack, but getting a concurrency exception when click on a tab
+        // which simply holds a newly modified reference.
+        AdapterManager.ConcurrencyChecking.executeWithConcurrencyCheckingDisabled(new Runnable() {
+            @Override
+            public void run() {
+                buildGui();
+            }
+        });
     }
 
     public EntityModel getEntityModel() {