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/01/26 13:26:50 UTC

[3/7] isis git commit: ISIS-993: ScopedSessionAttribute now using Component rather than HasPath. That means that the state of the page (selected tabs, selected collection view) is being persisted and honoured in the session correctly.

ISIS-993: ScopedSessionAttribute now using Component rather than HasPath.  That means that the state of the page (selected tabs, selected collection view) is being persisted and honoured in the session correctly.

Also added in new implementations of UiHintPathSignificant, however this bit is incomplete... hacked the fullHintPathFor(...) to ignore the fact as to whether a component is "UI Hint path significant" or not.  Intention in next commit is to simplify and get rid of this interface, just use all the components in the page as being significant.


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

Branch: refs/heads/ISIS-993
Commit: 0cefc70732995d60e3be242eacb1597a3e2ebf1e
Parents: bdbd503
Author: Dan Haywood <da...@haywood-associates.co.uk>
Authored: Mon Jan 25 18:32:15 2016 +0000
Committer: Dan Haywood <da...@haywood-associates.co.uk>
Committed: Mon Jan 25 18:32:15 2016 +0000

----------------------------------------------------------------------
 .../viewer/wicket/model/hints/HintUtil.java     | 26 +++++++++++
 .../wicket/model/models/ModelAbstract.java      | 25 ++--------
 .../model/util/ScopedSessionAttribute.java      | 49 +++++++++++++++-----
 .../ListViewUiHintPathSignificant.java          | 31 +++++++++++++
 .../RepeatingViewUiHintPathSignificant.java     | 29 ++++++++++++
 .../collection/EntityCollectionPanel.java       |  7 ++-
 .../collections/EntityCollectionsPanel.java     |  3 +-
 .../components/entity/column/EntityColumn.java  |  3 +-
 .../propsandcolls/EntityPropsAndCollsForm.java  |  4 +-
 .../entity/tabgroup/TabGroupPanel.java          |  7 ++-
 .../entity/tabgrouplist/TabGroupListPanel.java  |  3 +-
 11 files changed, 146 insertions(+), 41 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/isis/blob/0cefc707/core/viewer-wicket-model/src/main/java/org/apache/isis/viewer/wicket/model/hints/HintUtil.java
----------------------------------------------------------------------
diff --git a/core/viewer-wicket-model/src/main/java/org/apache/isis/viewer/wicket/model/hints/HintUtil.java b/core/viewer-wicket-model/src/main/java/org/apache/isis/viewer/wicket/model/hints/HintUtil.java
new file mode 100644
index 0000000..1b4b553
--- /dev/null
+++ b/core/viewer-wicket-model/src/main/java/org/apache/isis/viewer/wicket/model/hints/HintUtil.java
@@ -0,0 +1,26 @@
+package org.apache.isis.viewer.wicket.model.hints;
+
+import org.apache.wicket.Component;
+import org.apache.wicket.util.string.PrependingStringBuffer;
+import org.apache.wicket.util.string.Strings;
+
+public class HintUtil {
+    private HintUtil() {
+    }
+
+    public static String hintPathFor(Component component) {
+        return Strings.afterFirstPathComponent(fullHintPathFor(component), Component.PATH_SEPARATOR);
+    }
+
+    private static String fullHintPathFor(Component component) {
+        final PrependingStringBuffer buffer = new PrependingStringBuffer(32);
+        for (Component c = component; c != null; c = c.getParent()) {
+            if (buffer.length() > 0) {
+                buffer.prepend(Component.PATH_SEPARATOR);
+            }
+            buffer.prepend(c.getId());
+        }
+        return buffer.toString();
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/isis/blob/0cefc707/core/viewer-wicket-model/src/main/java/org/apache/isis/viewer/wicket/model/models/ModelAbstract.java
----------------------------------------------------------------------
diff --git a/core/viewer-wicket-model/src/main/java/org/apache/isis/viewer/wicket/model/models/ModelAbstract.java b/core/viewer-wicket-model/src/main/java/org/apache/isis/viewer/wicket/model/models/ModelAbstract.java
index 6fddcc7..6598d2c 100644
--- a/core/viewer-wicket-model/src/main/java/org/apache/isis/viewer/wicket/model/models/ModelAbstract.java
+++ b/core/viewer-wicket-model/src/main/java/org/apache/isis/viewer/wicket/model/models/ModelAbstract.java
@@ -20,17 +20,18 @@
 package org.apache.isis.viewer.wicket.model.models;
 
 import java.util.Map;
+
 import com.google.common.collect.Maps;
+
 import org.apache.wicket.Component;
 import org.apache.wicket.model.LoadableDetachableModel;
-import org.apache.wicket.util.string.PrependingStringBuffer;
-import org.apache.wicket.util.string.Strings;
+
 import org.apache.isis.core.commons.authentication.AuthenticationSession;
 import org.apache.isis.core.metamodel.adapter.mgr.AdapterManager;
 import org.apache.isis.core.runtime.system.context.IsisContext;
 import org.apache.isis.core.runtime.system.persistence.PersistenceSession;
+import org.apache.isis.viewer.wicket.model.hints.HintUtil;
 import org.apache.isis.viewer.wicket.model.hints.UiHintContainer;
-import org.apache.isis.viewer.wicket.model.hints.UiHintPathSignificant;
 import org.apache.isis.viewer.wicket.model.util.ScopedSessionAttribute;
 
 /**
@@ -100,23 +101,7 @@ public abstract class ModelAbstract<T> extends LoadableDetachableModel<T> implem
 
     private static String hintPathFor(Component component)
     {
-        return Strings.afterFirstPathComponent(fullHintPathFor(component), Component.PATH_SEPARATOR);
-    }
-
-    private static String fullHintPathFor(Component component)
-    {
-        final PrependingStringBuffer buffer = new PrependingStringBuffer(32);
-        for (Component c = component; c != null; c = c.getParent())
-        {
-            if(c instanceof UiHintPathSignificant) {
-                if (buffer.length() > 0)
-                {
-                    buffer.prepend(Component.PATH_SEPARATOR);
-                }
-                buffer.prepend(c.getId());
-            }
-        }
-        return buffer.toString();
+        return HintUtil.hintPathFor(component);
     }
 
     protected Map<String, String> getHints() {

http://git-wip-us.apache.org/repos/asf/isis/blob/0cefc707/core/viewer-wicket-model/src/main/java/org/apache/isis/viewer/wicket/model/util/ScopedSessionAttribute.java
----------------------------------------------------------------------
diff --git a/core/viewer-wicket-model/src/main/java/org/apache/isis/viewer/wicket/model/util/ScopedSessionAttribute.java b/core/viewer-wicket-model/src/main/java/org/apache/isis/viewer/wicket/model/util/ScopedSessionAttribute.java
index 933c201..73d1f8c 100644
--- a/core/viewer-wicket-model/src/main/java/org/apache/isis/viewer/wicket/model/util/ScopedSessionAttribute.java
+++ b/core/viewer-wicket-model/src/main/java/org/apache/isis/viewer/wicket/model/util/ScopedSessionAttribute.java
@@ -20,12 +20,14 @@ package org.apache.isis.viewer.wicket.model.util;
 
 import java.io.Serializable;
 
+import org.apache.wicket.Component;
 import org.apache.wicket.Session;
 
 import org.apache.isis.applib.layout.v1_0.HasPath;
 import org.apache.isis.core.metamodel.adapter.mgr.AdapterManager;
 import org.apache.isis.core.metamodel.adapter.oid.RootOid;
 import org.apache.isis.core.runtime.system.context.IsisContext;
+import org.apache.isis.viewer.wicket.model.hints.HintUtil;
 import org.apache.isis.viewer.wicket.model.mementos.ObjectAdapterMemento;
 import org.apache.isis.viewer.wicket.model.models.EntityModel;
 
@@ -39,21 +41,21 @@ public class ScopedSessionAttribute<T extends Serializable> implements Serializa
 
     public static <T extends Serializable> ScopedSessionAttribute<T> create(
             final EntityModel entityModel,
-            final HasPath hasPath,
+            final Component component,
             final String attributeName) {
         final ObjectAdapterMemento objectAdapterMemento = entityModel.getObjectAdapterMemento();
-        return create(objectAdapterMemento, hasPath, attributeName);
+        return create(objectAdapterMemento, component, attributeName);
     }
 
     public static <T extends Serializable> ScopedSessionAttribute<T> create(
             final ObjectAdapterMemento objectAdapterMemento,
-            final HasPath hasPath,
+            final Component scopeComponent,
             final String attributeName) {
-        if (hasPath == null) {
+        if (scopeComponent == null) {
             return noop();
         }
-        final String path = hasPath.getPath();
-        return create(objectAdapterMemento, path, attributeName);
+        final String oidStr = asStr(objectAdapterMemento);
+        return new ScopedSessionAttribute<T>(oidStr, null, scopeComponent, attributeName);
     }
 
     public static <T extends Serializable> ScopedSessionAttribute<T> create(
@@ -72,8 +74,7 @@ public class ScopedSessionAttribute<T extends Serializable> implements Serializa
             return noop();
         }
         final String oidStr = asStr(objectAdapterMemento);
-        final String key = oidStr + ":" + scopeKey + "-" + attributeName;
-        return new ScopedSessionAttribute<T>(key, attributeName);
+        return new ScopedSessionAttribute<T>(oidStr, scopeKey, null, attributeName);
     }
 
     private static String asStr(final ObjectAdapterMemento objectAdapterMemento) {
@@ -82,20 +83,42 @@ public class ScopedSessionAttribute<T extends Serializable> implements Serializa
         return IsisContext.getOidMarshaller().marshalNoVersion(oid);
     }
 
-    private final String key;
+    private final String oidStr;
+    private final String scopeKey;
+    private final Component component;
     private final String attributeName;
 
-    private ScopedSessionAttribute(final String key, final String attributeName) {
-        this.key = key;
+    private ScopedSessionAttribute(
+            final String oidStr,
+            final String scopeKey,
+            final Component component,
+            final String attributeName) {
+        this.oidStr = oidStr;
+        this.scopeKey = scopeKey;
+        this.component = component;
         this.attributeName = attributeName;
     }
 
+    String getKey() {
+        return oidStr + ":" + getScopeKey() + "-" + attributeName;
+    }
+
+    private String getScopeKey() {
+        if (scopeKey != null) {
+            return scopeKey;
+        }
+        else {
+            return HintUtil.hintPathFor(component);
+        }
+    }
+
     public String getAttributeName() {
         return attributeName;
     }
 
     public void set(T t) {
         if(t != null) {
+            final String key = getKey();
             Session.get().setAttribute(key, t);
         } else {
             remove();
@@ -103,15 +126,17 @@ public class ScopedSessionAttribute<T extends Serializable> implements Serializa
     }
 
     public T get() {
+        final String key = getKey();
         return (T) Session.get().getAttribute(key);
     }
 
     public void remove() {
+        final String key = getKey();
         Session.get().removeAttribute(key);
     }
 
     public static <T extends Serializable> ScopedSessionAttribute<T> noop() {
-        return new ScopedSessionAttribute<T>(null, null) {
+        return new ScopedSessionAttribute<T>(null, null, null, null) {
             @Override public void set(final T serializable) {
             }
 

http://git-wip-us.apache.org/repos/asf/isis/blob/0cefc707/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/ListViewUiHintPathSignificant.java
----------------------------------------------------------------------
diff --git a/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/ListViewUiHintPathSignificant.java b/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/ListViewUiHintPathSignificant.java
new file mode 100644
index 0000000..9bd03a4
--- /dev/null
+++ b/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/ListViewUiHintPathSignificant.java
@@ -0,0 +1,31 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing,
+ *  software distributed under the License is distributed on an
+ *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *  KIND, either express or implied.  See the License for the
+ *  specific language governing permissions and limitations
+ *  under the License.
+ */
+package org.apache.isis.viewer.wicket.ui.components;
+
+import java.util.List;
+
+import org.apache.wicket.markup.html.list.ListView;
+
+import org.apache.isis.viewer.wicket.model.hints.UiHintPathSignificant;
+
+public abstract class ListViewUiHintPathSignificant<T> extends ListView<T> implements UiHintPathSignificant {
+    public ListViewUiHintPathSignificant(final String id, final List<? extends T> list) {
+        super(id, list);
+    }
+}

http://git-wip-us.apache.org/repos/asf/isis/blob/0cefc707/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/RepeatingViewUiHintPathSignificant.java
----------------------------------------------------------------------
diff --git a/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/RepeatingViewUiHintPathSignificant.java b/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/RepeatingViewUiHintPathSignificant.java
new file mode 100644
index 0000000..83c42ec
--- /dev/null
+++ b/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/RepeatingViewUiHintPathSignificant.java
@@ -0,0 +1,29 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing,
+ *  software distributed under the License is distributed on an
+ *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *  KIND, either express or implied.  See the License for the
+ *  specific language governing permissions and limitations
+ *  under the License.
+ */
+package org.apache.isis.viewer.wicket.ui.components;
+
+import org.apache.wicket.markup.repeater.RepeatingView;
+
+import org.apache.isis.viewer.wicket.model.hints.UiHintPathSignificant;
+
+public class RepeatingViewUiHintPathSignificant extends RepeatingView implements UiHintPathSignificant {
+    public RepeatingViewUiHintPathSignificant(final String id) {
+        super(id);
+    }
+}

http://git-wip-us.apache.org/repos/asf/isis/blob/0cefc707/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/collection/EntityCollectionPanel.java
----------------------------------------------------------------------
diff --git a/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/collection/EntityCollectionPanel.java b/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/collection/EntityCollectionPanel.java
index 99b91e7..e286770 100644
--- a/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/collection/EntityCollectionPanel.java
+++ b/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/collection/EntityCollectionPanel.java
@@ -26,11 +26,11 @@ import org.apache.wicket.markup.html.WebMarkupContainer;
 import org.apache.wicket.markup.html.basic.Label;
 import org.apache.wicket.model.Model;
 
-import org.apache.isis.applib.layout.v1_0.CollectionLayoutMetadata;
 import org.apache.isis.core.metamodel.adapter.ObjectAdapter;
 import org.apache.isis.core.metamodel.facets.all.named.NamedFacet;
 import org.apache.isis.core.metamodel.facets.members.cssclass.CssClassFacet;
 import org.apache.isis.core.metamodel.spec.feature.OneToManyAssociation;
+import org.apache.isis.viewer.wicket.model.hints.UiHintPathSignificant;
 import org.apache.isis.viewer.wicket.model.links.LinkAndLabel;
 import org.apache.isis.viewer.wicket.model.models.EntityCollectionModel;
 import org.apache.isis.viewer.wicket.model.models.EntityModel;
@@ -47,7 +47,7 @@ import org.apache.isis.viewer.wicket.ui.util.CssClassAppender;
  * {@link PanelAbstract Panel} representing the properties of an entity, as per
  * the provided {@link EntityModel}.
  */
-public class EntityCollectionPanel extends PanelAbstract<EntityModel>  {
+public class EntityCollectionPanel extends PanelAbstract<EntityModel> implements UiHintPathSignificant {
 
     private static final long serialVersionUID = 1L;
 
@@ -63,9 +63,8 @@ public class EntityCollectionPanel extends PanelAbstract<EntityModel>  {
     public EntityCollectionPanel(final String id, final EntityModel entityModel) {
         super(id, entityModel);
 
-        final CollectionLayoutMetadata collectionLayoutMetadata = entityModel.getCollectionLayoutMetadata();
         selectedItemSessionAttribute = ScopedSessionAttribute.create(
-                entityModel, collectionLayoutMetadata, EntityCollectionModel.SESSION_ATTRIBUTE_SELECTED_ITEM);
+                entityModel, this, EntityCollectionModel.SESSION_ATTRIBUTE_SELECTED_ITEM);
 
         buildGui();
     }

http://git-wip-us.apache.org/repos/asf/isis/blob/0cefc707/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/collections/EntityCollectionsPanel.java
----------------------------------------------------------------------
diff --git a/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/collections/EntityCollectionsPanel.java b/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/collections/EntityCollectionsPanel.java
index 8ea5a52..808950a 100644
--- a/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/collections/EntityCollectionsPanel.java
+++ b/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/collections/EntityCollectionsPanel.java
@@ -40,6 +40,7 @@ import org.apache.isis.core.metamodel.spec.feature.Contributed;
 import org.apache.isis.core.metamodel.spec.feature.ObjectAssociation;
 import org.apache.isis.core.runtime.services.DeweyOrderComparator;
 import org.apache.isis.viewer.wicket.model.models.EntityModel;
+import org.apache.isis.viewer.wicket.ui.components.RepeatingViewUiHintPathSignificant;
 import org.apache.isis.viewer.wicket.ui.components.entity.collection.EntityCollectionPanel;
 import org.apache.isis.viewer.wicket.ui.components.widgets.containers.UiHintPathSignificantWebMarkupContainer;
 import org.apache.isis.viewer.wicket.ui.panels.PanelAbstract;
@@ -115,7 +116,7 @@ public class EntityCollectionsPanel extends PanelAbstract<EntityModel> {
             }
         });
 
-        final RepeatingView collectionRv = new RepeatingView(ID_COLLECTIONS);
+        final RepeatingView collectionRv = new RepeatingViewUiHintPathSignificant(ID_COLLECTIONS);
         add(collectionRv);
 
         for (final ObjectAssociation association : associations) {

http://git-wip-us.apache.org/repos/asf/isis/blob/0cefc707/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/column/EntityColumn.java
----------------------------------------------------------------------
diff --git a/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/column/EntityColumn.java b/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/column/EntityColumn.java
index 79abdb8..983b4b9 100644
--- a/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/column/EntityColumn.java
+++ b/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/column/EntityColumn.java
@@ -44,6 +44,7 @@ import org.apache.isis.core.runtime.system.context.IsisContext;
 import org.apache.isis.viewer.wicket.model.hints.UiHintPathSignificant;
 import org.apache.isis.viewer.wicket.model.models.EntityModel;
 import org.apache.isis.viewer.wicket.ui.ComponentType;
+import org.apache.isis.viewer.wicket.ui.components.RepeatingViewUiHintPathSignificant;
 import org.apache.isis.viewer.wicket.ui.components.entity.PropUtil;
 import org.apache.isis.viewer.wicket.ui.components.entity.propgroup.PropertyGroup;
 import org.apache.isis.viewer.wicket.ui.panels.PanelAbstract;
@@ -103,7 +104,7 @@ public class EntityColumn extends PanelAbstract<EntityModel> implements UiHintPa
 
         final Map<String, List<ObjectAssociation>> associationsByGroup = PropUtil.propertiesByMemberOrder(adapter);
 
-        final RepeatingView memberGroupRv = new RepeatingView(ID_PROPERTY_GROUP);
+        final RepeatingView memberGroupRv = new RepeatingViewUiHintPathSignificant(ID_PROPERTY_GROUP);
         markupContainer.add(memberGroupRv);
 
         final ImmutableMap<String, PropertyGroupMetadata> propertyGroupMetadataByNameIfAny =

http://git-wip-us.apache.org/repos/asf/isis/blob/0cefc707/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/propsandcolls/EntityPropsAndCollsForm.java
----------------------------------------------------------------------
diff --git a/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/propsandcolls/EntityPropsAndCollsForm.java b/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/propsandcolls/EntityPropsAndCollsForm.java
index c414a22..ea800a7 100644
--- a/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/propsandcolls/EntityPropsAndCollsForm.java
+++ b/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/propsandcolls/EntityPropsAndCollsForm.java
@@ -62,6 +62,7 @@ import org.apache.isis.core.metamodel.spec.feature.ObjectAssociation;
 import org.apache.isis.core.runtime.memento.Memento;
 import org.apache.isis.core.runtime.system.context.IsisContext;
 import org.apache.isis.core.runtime.system.transaction.IsisTransactionManager;
+import org.apache.isis.viewer.wicket.model.hints.UiHintPathSignificant;
 import org.apache.isis.viewer.wicket.model.models.ActionPrompt;
 import org.apache.isis.viewer.wicket.model.models.ActionPromptProvider;
 import org.apache.isis.viewer.wicket.model.models.EntityModel;
@@ -79,7 +80,8 @@ import org.apache.isis.viewer.wicket.ui.util.CssClassAppender;
 import de.agilecoders.wicket.core.markup.html.bootstrap.common.NotificationPanel;
 import de.agilecoders.wicket.core.util.Attributes;
 
-public class EntityPropsAndCollsForm extends FormAbstract<ObjectAdapter> implements ActionPromptProvider {
+public class EntityPropsAndCollsForm extends FormAbstract<ObjectAdapter> implements ActionPromptProvider,
+        UiHintPathSignificant {
 
     private static final long serialVersionUID = 1L;
 

http://git-wip-us.apache.org/repos/asf/isis/blob/0cefc707/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/tabgroup/TabGroupPanel.java
----------------------------------------------------------------------
diff --git a/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/tabgroup/TabGroupPanel.java b/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/tabgroup/TabGroupPanel.java
index e7522d4..4f9d55a 100644
--- a/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/tabgroup/TabGroupPanel.java
+++ b/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/tabgroup/TabGroupPanel.java
@@ -75,9 +75,14 @@ public class TabGroupPanel extends AjaxBootstrapTabbedPanel implements UiHintPat
 
         this.entityModel = entityModel;
         this.tabGroup = entityModel.getTabGroupMetadata();
-        this.selectedTabInSession = ScopedSessionAttribute.create(entityModel, tabGroup, SESSION_ATTR_SELECTED_TAB);
+        this.selectedTabInSession = ScopedSessionAttribute.create(entityModel, this, SESSION_ATTR_SELECTED_TAB);
 
+    }
+
+    @Override
+    protected void onInitialize() {
         setSelectedTabFromSessionIfAny(this);
+        super.onInitialize();
     }
 
     @Override

http://git-wip-us.apache.org/repos/asf/isis/blob/0cefc707/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/tabgrouplist/TabGroupListPanel.java
----------------------------------------------------------------------
diff --git a/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/tabgrouplist/TabGroupListPanel.java b/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/tabgrouplist/TabGroupListPanel.java
index 6054778..6de8b1c 100644
--- a/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/tabgrouplist/TabGroupListPanel.java
+++ b/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/tabgrouplist/TabGroupListPanel.java
@@ -27,6 +27,7 @@ import org.apache.wicket.markup.html.list.ListView;
 import org.apache.isis.applib.layout.v1_0.TabGroupMetadata;
 import org.apache.isis.viewer.wicket.model.hints.UiHintPathSignificant;
 import org.apache.isis.viewer.wicket.model.models.EntityModel;
+import org.apache.isis.viewer.wicket.ui.components.ListViewUiHintPathSignificant;
 import org.apache.isis.viewer.wicket.ui.components.entity.tabgroup.TabGroupPanel;
 import org.apache.isis.viewer.wicket.ui.panels.PanelAbstract;
 
@@ -50,7 +51,7 @@ public class TabGroupListPanel extends PanelAbstract<EntityModel> implements UiH
     private void buildGui() {
         final EntityModel model = getModel();
 
-        final ListView<TabGroupMetadata> tabGroupsList = new ListView<TabGroupMetadata>(ID_TAB_GROUPS, this.tabGroups) {
+        final ListView<TabGroupMetadata> tabGroupsList = new ListViewUiHintPathSignificant<TabGroupMetadata>(ID_TAB_GROUPS, this.tabGroups) {
 
             @Override
             protected void populateItem(final ListItem<TabGroupMetadata> item) {