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/02/24 00:40:04 UTC

[01/13] isis git commit: ISIS-993: minor tidy-up and removal of some duplication of code between Action prompt and property edit prompts.

Repository: isis
Updated Branches:
  refs/heads/ISIS-993 de3e385f0 -> 4ccb9caa1


ISIS-993: minor tidy-up and removal of some duplication of code between Action prompt and property edit prompts.


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

Branch: refs/heads/ISIS-993
Commit: 7488f5120c07b44af5e16115e84dad82093e171b
Parents: de3e385
Author: Dan Haywood <da...@haywood-associates.co.uk>
Authored: Wed Feb 17 12:01:41 2016 +0000
Committer: Dan Haywood <da...@haywood-associates.co.uk>
Committed: Wed Feb 17 12:01:41 2016 +0000

----------------------------------------------------------------------
 .../wicket/model/models/ActionExecutor.java     | 35 ----------------
 .../viewer/wicket/model/models/ActionModel.java | 29 +++++++++-----
 .../wicket/model/models/ExecutingPanel.java     | 42 ++++++++++++++++++++
 .../model/models/PropertyEditExecutor.java      | 35 ----------------
 .../viewer/wicket/model/models/ScalarModel.java | 26 ++++++++----
 .../ui/components/actions/ActionPanel.java      | 15 ++++---
 .../actions/ActionParametersFormPanel.java      | 11 +++--
 .../property/PropertyEditFormPanel.java         | 10 ++---
 .../components/property/PropertyEditPanel.java  | 21 +++-------
 .../components/scalars/ScalarPanelAbstract.java |  1 -
 10 files changed, 101 insertions(+), 124 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/isis/blob/7488f512/core/viewer-wicket-model/src/main/java/org/apache/isis/viewer/wicket/model/models/ActionExecutor.java
----------------------------------------------------------------------
diff --git a/core/viewer-wicket-model/src/main/java/org/apache/isis/viewer/wicket/model/models/ActionExecutor.java b/core/viewer-wicket-model/src/main/java/org/apache/isis/viewer/wicket/model/models/ActionExecutor.java
deleted file mode 100644
index d634262..0000000
--- a/core/viewer-wicket-model/src/main/java/org/apache/isis/viewer/wicket/model/models/ActionExecutor.java
+++ /dev/null
@@ -1,35 +0,0 @@
-/*
- *  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.model.models;
-
-import java.io.Serializable;
-
-import org.apache.wicket.ajax.AjaxRequestTarget;
-import org.apache.wicket.markup.html.form.Form;
-
-/**
- * Decouples the {@link ActionModel}, which needs to delegate the actual
- * execution of an action, from its implementor.
- */
-public interface ActionExecutor extends Serializable {
-
-    boolean executeActionAndProcessResults(AjaxRequestTarget target, Form<?> feedbackForm);
-
-}

http://git-wip-us.apache.org/repos/asf/isis/blob/7488f512/core/viewer-wicket-model/src/main/java/org/apache/isis/viewer/wicket/model/models/ActionModel.java
----------------------------------------------------------------------
diff --git a/core/viewer-wicket-model/src/main/java/org/apache/isis/viewer/wicket/model/models/ActionModel.java b/core/viewer-wicket-model/src/main/java/org/apache/isis/viewer/wicket/model/models/ActionModel.java
index 1dffbe8..a74cb2c 100644
--- a/core/viewer-wicket-model/src/main/java/org/apache/isis/viewer/wicket/model/models/ActionModel.java
+++ b/core/viewer-wicket-model/src/main/java/org/apache/isis/viewer/wicket/model/models/ActionModel.java
@@ -264,7 +264,6 @@ public class ActionModel extends BookmarkableModel<ObjectAdapter> {
      * Lazily populated in {@link #getArgumentModel(ActionParameterMemento)}
      */
     private final Map<Integer, ScalarModel> arguments = Maps.newHashMap();
-    private ActionExecutor executor;
 
 
     private ActionModel(final PageParameters pageParameters) {
@@ -327,7 +326,7 @@ public class ActionModel extends BookmarkableModel<ObjectAdapter> {
             setArgument(argumentModel.getKey(), argumentModel.getValue().getObject());
         }
 
-        this.executor = actionModel.executor;
+        this.executingPanel = actionModel.executingPanel;
     }
 
     private void setArgumentsIfPossible(final PageParameters pageParameters) {
@@ -510,14 +509,6 @@ public class ActionModel extends BookmarkableModel<ObjectAdapter> {
         }
         return arguments;
     }
-    
-    public ActionExecutor getExecutor() {
-        return executor;
-    }
-
-    public void setExecutor(final ActionExecutor executor) {
-        this.executor = executor;
-    }
 
     public void reset() {
         this.actionMode = determineMode(actionMemento.getAction());
@@ -666,6 +657,24 @@ public class ActionModel extends BookmarkableModel<ObjectAdapter> {
     }
 
     //////////////////////////////////////////////////
+
+    private ExecutingPanel executingPanel;
+
+    /**
+     * A hint passed from one Wicket UI component to another.
+     *
+     * Mot actually used by the model itself.
+     */
+    public ExecutingPanel getExecutingPanel() {
+        return executingPanel;
+    }
+
+    public void setExecutingPanel(final ExecutingPanel executingPanel) {
+        this.executingPanel = executingPanel;
+    }
+
+
+    //////////////////////////////////////////////////
     // Dependencies (from context)
     //////////////////////////////////////////////////
     

http://git-wip-us.apache.org/repos/asf/isis/blob/7488f512/core/viewer-wicket-model/src/main/java/org/apache/isis/viewer/wicket/model/models/ExecutingPanel.java
----------------------------------------------------------------------
diff --git a/core/viewer-wicket-model/src/main/java/org/apache/isis/viewer/wicket/model/models/ExecutingPanel.java b/core/viewer-wicket-model/src/main/java/org/apache/isis/viewer/wicket/model/models/ExecutingPanel.java
new file mode 100644
index 0000000..bc6c06e
--- /dev/null
+++ b/core/viewer-wicket-model/src/main/java/org/apache/isis/viewer/wicket/model/models/ExecutingPanel.java
@@ -0,0 +1,42 @@
+/*
+ *  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.model.models;
+
+import java.io.Serializable;
+
+import org.apache.wicket.ajax.AjaxRequestTarget;
+import org.apache.wicket.markup.html.form.Form;
+
+/**
+ * Passed through the {@link ActionModel} or {@link ScalarModel}, allowing
+ * two different Wicket UI components (eg owning <code>ActionPanel</code> and
+ * <code>ActionParametersFormPanel</code> to interact.
+ *
+ * <p>
+ *     REVIEW: this is a rather clunky design.  The executing panel
+ *     isn't used by the model, and one panel is parent/creates of the other;
+ *     is it necessary to decouple them to this degree?
+ * </p>
+ */
+public interface ExecutingPanel extends Serializable {
+
+    boolean executeAndProcessResults(AjaxRequestTarget target, Form<?> feedbackForm);
+
+}

http://git-wip-us.apache.org/repos/asf/isis/blob/7488f512/core/viewer-wicket-model/src/main/java/org/apache/isis/viewer/wicket/model/models/PropertyEditExecutor.java
----------------------------------------------------------------------
diff --git a/core/viewer-wicket-model/src/main/java/org/apache/isis/viewer/wicket/model/models/PropertyEditExecutor.java b/core/viewer-wicket-model/src/main/java/org/apache/isis/viewer/wicket/model/models/PropertyEditExecutor.java
deleted file mode 100644
index ca99e4f..0000000
--- a/core/viewer-wicket-model/src/main/java/org/apache/isis/viewer/wicket/model/models/PropertyEditExecutor.java
+++ /dev/null
@@ -1,35 +0,0 @@
-/*
- *  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.model.models;
-
-import java.io.Serializable;
-
-import org.apache.wicket.ajax.AjaxRequestTarget;
-import org.apache.wicket.markup.html.form.Form;
-
-/**
- * Decouples the {@link ScalarModel}, which needs to delegate the actual
- * editing of an property, from its implementor.
- */
-public interface PropertyEditExecutor extends Serializable {
-
-    boolean editAndProcessResults(AjaxRequestTarget target, Form<?> feedbackForm);
-
-}

http://git-wip-us.apache.org/repos/asf/isis/blob/7488f512/core/viewer-wicket-model/src/main/java/org/apache/isis/viewer/wicket/model/models/ScalarModel.java
----------------------------------------------------------------------
diff --git a/core/viewer-wicket-model/src/main/java/org/apache/isis/viewer/wicket/model/models/ScalarModel.java b/core/viewer-wicket-model/src/main/java/org/apache/isis/viewer/wicket/model/models/ScalarModel.java
index b465456..09d8f39 100644
--- a/core/viewer-wicket-model/src/main/java/org/apache/isis/viewer/wicket/model/models/ScalarModel.java
+++ b/core/viewer-wicket-model/src/main/java/org/apache/isis/viewer/wicket/model/models/ScalarModel.java
@@ -768,14 +768,6 @@ public class ScalarModel extends EntityModel implements LinksProvider {
     }
 
 
-    private PropertyEditExecutor executor;
-    public PropertyEditExecutor getExecutor() {
-        return executor;
-    }
-    public void setExecutor(final PropertyEditExecutor executor) {
-        this.executor = executor;
-    }
-
     @Override
     public String getReasonInvalidIfAny() {
         final OneToOneAssociation property = getPropertyMemento().getProperty();
@@ -826,6 +818,24 @@ public class ScalarModel extends EntityModel implements LinksProvider {
 
     // //////////////////////////////////////
 
+
+    private ExecutingPanel executingPanel;
+
+    /**
+     * A hint passed from one Wicket UI component to another.
+     *
+     * Mot actually used by the model itself.
+     */
+    public ExecutingPanel getExecutingPanel() {
+        return executingPanel;
+    }
+    public void setExecutingPanel(final ExecutingPanel executingPanel) {
+        this.executingPanel = executingPanel;
+    }
+
+
+    // //////////////////////////////////////
+
     /**
      * transient because only temporary hint.
      */

http://git-wip-us.apache.org/repos/asf/isis/blob/7488f512/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/actions/ActionPanel.java
----------------------------------------------------------------------
diff --git a/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/actions/ActionPanel.java b/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/actions/ActionPanel.java
index fa2492f..8014142 100644
--- a/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/actions/ActionPanel.java
+++ b/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/actions/ActionPanel.java
@@ -39,7 +39,7 @@ import org.apache.isis.core.metamodel.adapter.ObjectAdapter;
 import org.apache.isis.core.metamodel.adapter.version.ConcurrencyException;
 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.models.ActionExecutor;
+import org.apache.isis.viewer.wicket.model.models.ExecutingPanel;
 import org.apache.isis.viewer.wicket.model.models.ActionModel;
 import org.apache.isis.viewer.wicket.model.models.ActionPrompt;
 import org.apache.isis.viewer.wicket.model.models.BookmarkableModel;
@@ -63,7 +63,7 @@ import org.apache.isis.viewer.wicket.ui.panels.PanelAbstract;
  * <p>
  * TODO: on results panel, have a button to resubmit?
  */
-public class ActionPanel extends PanelAbstract<ActionModel> implements ActionExecutor {
+public class ActionPanel extends PanelAbstract<ActionModel> implements ExecutingPanel {
 
     private static final long serialVersionUID = 1L;
 
@@ -80,7 +80,7 @@ public class ActionPanel extends PanelAbstract<ActionModel> implements ActionExe
 
     public ActionPanel(final String id, final ActionModel actionModel) {
         super(id, actionModel);
-        actionModel.setExecutor(this);
+        actionModel.setExecutingPanel(this);
         buildGui(getActionModel());
     }
 
@@ -160,7 +160,7 @@ public class ActionPanel extends PanelAbstract<ActionModel> implements ActionExe
 
     private void buildGuiForNoParameters(final ActionModel actionModel) {
 
-        boolean succeeded = executeActionAndProcessResults(null, null);
+        boolean succeeded = executeAndProcessResults(null, null);
         if(succeeded) {
             // nothing to do
         } else {
@@ -193,7 +193,7 @@ public class ActionPanel extends PanelAbstract<ActionModel> implements ActionExe
      * @return 
      */
     @Override
-    public boolean executeActionAndProcessResults(AjaxRequestTarget target, Form<?> feedbackForm) {
+    public boolean executeAndProcessResults(AjaxRequestTarget target, Form<?> feedbackForm) {
 
         permanentlyHide(ComponentType.ENTITY_ICON_AND_TITLE);
 
@@ -202,7 +202,7 @@ public class ActionPanel extends PanelAbstract<ActionModel> implements ActionExe
             targetAdapter = getModel().getTargetAdapter();
 
             // no concurrency exception, so continue...
-            return executeActionOnTargetAndProcessResults(targetAdapter, target, feedbackForm);
+            return executeActionOnTargetAndProcessResults(target, feedbackForm);
 
         } catch (ConcurrencyException ex) {
 
@@ -226,8 +226,7 @@ public class ActionPanel extends PanelAbstract<ActionModel> implements ActionExe
      * @return whether to clear args or not (they aren't if there was a validation exception)
      */
     private boolean executeActionOnTargetAndProcessResults(
-            final ObjectAdapter targetAdapter, 
-            final AjaxRequestTarget target, 
+            final AjaxRequestTarget target,
             final Form<?> feedbackForm) {
         
         final ActionModel actionModel = getActionModel();

http://git-wip-us.apache.org/repos/asf/isis/blob/7488f512/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/actions/ActionParametersFormPanel.java
----------------------------------------------------------------------
diff --git a/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/actions/ActionParametersFormPanel.java b/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/actions/ActionParametersFormPanel.java
index 0c31a65..931d10f 100644
--- a/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/actions/ActionParametersFormPanel.java
+++ b/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/actions/ActionParametersFormPanel.java
@@ -40,7 +40,7 @@ import org.apache.isis.core.metamodel.spec.feature.ObjectAction;
 import org.apache.isis.core.runtime.system.context.IsisContext;
 import org.apache.isis.viewer.wicket.model.hints.IsisActionCompletedEvent;
 import org.apache.isis.viewer.wicket.model.mementos.ActionParameterMemento;
-import org.apache.isis.viewer.wicket.model.models.ActionExecutor;
+import org.apache.isis.viewer.wicket.model.models.ExecutingPanel;
 import org.apache.isis.viewer.wicket.model.models.ActionModel;
 import org.apache.isis.viewer.wicket.model.models.ActionPrompt;
 import org.apache.isis.viewer.wicket.model.models.ActionPromptProvider;
@@ -73,15 +73,14 @@ public class ActionParametersFormPanel extends PanelAbstract<ActionModel> {
     private static final String ID_CANCEL_BUTTON = "cancelButton";
     private static final String ID_ACTION_PARAMETERS = "parameters";
 
-    private final ActionExecutor actionExecutor;
+    private final ExecutingPanel executingPanel;
 
     public ActionParametersFormPanel(final String id, final ActionModel model) {
         super(id, model);
 
-        Ensure.ensureThatArg(model.getExecutor(), is(not(nullValue())));
+        Ensure.ensureThatArg(model.getExecutingPanel(), is(not(nullValue())));
 
-        this.actionExecutor = model.getExecutor();
-        //this.actionPromptIfAny = model.getActionPrompt();
+        this.executingPanel = model.getExecutingPanel();
         buildGui();
     }
 
@@ -148,7 +147,7 @@ public class ActionParametersFormPanel extends PanelAbstract<ActionModel> {
 
                 @Override
                 public void onSubmit(AjaxRequestTarget target, Form<?> form) {
-                    boolean succeeded = actionExecutor.executeActionAndProcessResults(target, form);
+                    boolean succeeded = executingPanel.executeAndProcessResults(target, form);
                     if(succeeded) {
                         // the Wicket ajax callbacks will have just started to hide the veil
                         // we now show it once more, so that a veil continues to be shown until the

http://git-wip-us.apache.org/repos/asf/isis/blob/7488f512/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/property/PropertyEditFormPanel.java
----------------------------------------------------------------------
diff --git a/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/property/PropertyEditFormPanel.java b/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/property/PropertyEditFormPanel.java
index b51bb19..2ca51ca 100644
--- a/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/property/PropertyEditFormPanel.java
+++ b/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/property/PropertyEditFormPanel.java
@@ -33,7 +33,7 @@ import org.apache.isis.core.runtime.system.context.IsisContext;
 import org.apache.isis.viewer.wicket.model.hints.IsisPropertyEditCompletedEvent;
 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.PropertyEditExecutor;
+import org.apache.isis.viewer.wicket.model.models.ExecutingPanel;
 import org.apache.isis.viewer.wicket.model.models.ScalarModel;
 import org.apache.isis.viewer.wicket.ui.ComponentType;
 import org.apache.isis.viewer.wicket.ui.components.scalars.ScalarModelSubscriber;
@@ -61,14 +61,14 @@ public class PropertyEditFormPanel extends PanelAbstract<ScalarModel> {
 
     private static final String ID_PROPERTY = "property";
 
-    private final PropertyEditExecutor propertyEditExecutor;
+    private final ExecutingPanel executingPanel;
 
     public PropertyEditFormPanel(final String id, final ScalarModel model) {
         super(id, model);
 
-        Ensure.ensureThatArg(model.getExecutor(), is(not(nullValue())));
+        Ensure.ensureThatArg(model.getExecutingPanel(), is(not(nullValue())));
 
-        this.propertyEditExecutor = model.getExecutor();
+        this.executingPanel = model.getExecutingPanel();
 
         buildGui();
     }
@@ -125,7 +125,7 @@ public class PropertyEditFormPanel extends PanelAbstract<ScalarModel> {
 
                 @Override
                 public void onSubmit(AjaxRequestTarget target, Form<?> form) {
-                    boolean succeeded = propertyEditExecutor.editAndProcessResults(target, form);
+                    boolean succeeded = executingPanel.executeAndProcessResults(target, form);
                     if(succeeded) {
                         // the Wicket ajax callbacks will have just started to hide the veil
                         // we now show it once more, so that a veil continues to be shown until the

http://git-wip-us.apache.org/repos/asf/isis/blob/7488f512/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/property/PropertyEditPanel.java
----------------------------------------------------------------------
diff --git a/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/property/PropertyEditPanel.java b/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/property/PropertyEditPanel.java
index 76e48b2..54043fc 100644
--- a/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/property/PropertyEditPanel.java
+++ b/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/property/PropertyEditPanel.java
@@ -41,7 +41,7 @@ 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.models.ActionPrompt;
 import org.apache.isis.viewer.wicket.model.models.EntityModel;
-import org.apache.isis.viewer.wicket.model.models.PropertyEditExecutor;
+import org.apache.isis.viewer.wicket.model.models.ExecutingPanel;
 import org.apache.isis.viewer.wicket.model.models.ScalarModel;
 import org.apache.isis.viewer.wicket.ui.ComponentType;
 import org.apache.isis.viewer.wicket.ui.actionresponse.ActionResultResponseHandlingStrategy;
@@ -49,16 +49,13 @@ import org.apache.isis.viewer.wicket.ui.pages.entity.EntityPage;
 import org.apache.isis.viewer.wicket.ui.panels.PanelAbstract;
 
 public class PropertyEditPanel extends PanelAbstract<ScalarModel>
-        implements PropertyEditExecutor {
+        implements ExecutingPanel {
 
     private static final long serialVersionUID = 1L;
 
     private static final String ID_HEADER = "header";
 
     private static final String ID_PROPERTY_NAME = "propertyName";
-    private static final String ID_PROPERTY = "property";
-
-    private ActionPrompt actionPrompt;
 
     /**
      * Gives a chance to hide the header part of this action panel, e.g. when shown in an action prompt
@@ -67,17 +64,10 @@ public class PropertyEditPanel extends PanelAbstract<ScalarModel>
 
     public PropertyEditPanel(final String id, final ScalarModel scalarModel) {
         super(id, new ScalarModel(scalarModel.getParentObjectAdapterMemento(), scalarModel.getPropertyMemento()));
-        getScalarModel().setExecutor(this);
+        getScalarModel().setExecutingPanel(this);
         buildGui(getScalarModel());
     }
 
-    /**
-     * Sets the owning action prompt (modal window), if any.
-     */
-    public void setActionPrompt(ActionPrompt actionPrompt) {
-        this.actionPrompt = actionPrompt;
-    }
-
     @Override
     protected void onConfigure() {
         super.onConfigure();
@@ -150,7 +140,7 @@ public class PropertyEditPanel extends PanelAbstract<ScalarModel>
      * @return
      */
     @Override
-    public boolean editAndProcessResults(AjaxRequestTarget target, Form<?> feedbackForm) {
+    public boolean executeAndProcessResults(AjaxRequestTarget target, Form<?> feedbackForm) {
 
         permanentlyHide(ComponentType.ENTITY_ICON_AND_TITLE);
 
@@ -160,7 +150,7 @@ public class PropertyEditPanel extends PanelAbstract<ScalarModel>
                     AdapterManager.ConcurrencyChecking.CHECK);
 
             // no concurrency exception, so continue...
-            return editTargetAndProcessResults(targetAdapter, target, feedbackForm);
+            return editTargetAndProcessResults(target, feedbackForm);
 
         } catch (ConcurrencyException ex) {
 
@@ -183,7 +173,6 @@ public class PropertyEditPanel extends PanelAbstract<ScalarModel>
 
 
     private boolean editTargetAndProcessResults(
-            final ObjectAdapter targetAdapter,
             final AjaxRequestTarget target,
             final Form<?> feedbackForm) {
 

http://git-wip-us.apache.org/repos/asf/isis/blob/7488f512/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/scalars/ScalarPanelAbstract.java
----------------------------------------------------------------------
diff --git a/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/scalars/ScalarPanelAbstract.java b/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/scalars/ScalarPanelAbstract.java
index b3b59b1..0a29108 100644
--- a/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/scalars/ScalarPanelAbstract.java
+++ b/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/scalars/ScalarPanelAbstract.java
@@ -329,7 +329,6 @@ public abstract class ScalarPanelAbstract extends PanelAbstract<ScalarModel> imp
 
                     prompt.setTitle(titlePanel, target);
                     prompt.setPanel(propertyEditPanel, target);
-                    propertyEditPanel.setActionPrompt(prompt);
                     prompt.showPrompt(target);
 
                 }


[10/13] isis git commit: ISIS-993: further fixes to honour namedEscaped for property edit prompt.

Posted by da...@apache.org.
ISIS-993: further fixes to honour namedEscaped for property edit prompt.


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

Branch: refs/heads/ISIS-993
Commit: ce2ea3c5da907f886768e5a8a8554548322ebd3d
Parents: 0f09648
Author: Dan Haywood <da...@haywood-associates.co.uk>
Authored: Tue Feb 23 21:06:45 2016 +0000
Committer: Dan Haywood <da...@haywood-associates.co.uk>
Committed: Tue Feb 23 21:06:45 2016 +0000

----------------------------------------------------------------------
 .../property/PropertyEditPromptHeaderPanel.java      | 15 ++++++++++++---
 1 file changed, 12 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/isis/blob/ce2ea3c5/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/property/PropertyEditPromptHeaderPanel.java
----------------------------------------------------------------------
diff --git a/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/property/PropertyEditPromptHeaderPanel.java b/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/property/PropertyEditPromptHeaderPanel.java
index f62f986..49c91bd 100644
--- a/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/property/PropertyEditPromptHeaderPanel.java
+++ b/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/property/PropertyEditPromptHeaderPanel.java
@@ -23,6 +23,8 @@ import org.apache.wicket.model.AbstractReadOnlyModel;
 
 import org.apache.isis.core.metamodel.adapter.ObjectAdapter;
 import org.apache.isis.core.metamodel.adapter.mgr.AdapterManager;
+import org.apache.isis.core.metamodel.facets.all.named.NamedFacet;
+import org.apache.isis.core.metamodel.spec.feature.OneToOneAssociation;
 import org.apache.isis.viewer.wicket.model.models.EntityModel;
 import org.apache.isis.viewer.wicket.model.models.ScalarModel;
 import org.apache.isis.viewer.wicket.ui.ComponentType;
@@ -43,12 +45,19 @@ public class PropertyEditPromptHeaderPanel extends PanelAbstract<ScalarModel> {
 
         getComponentFactoryRegistry().addOrReplaceComponent(this, ComponentType.ENTITY_ICON_AND_TITLE, new EntityModel(targetAdapter));
 
-        add(new Label(ID_PROPERTY_NAME, new AbstractReadOnlyModel<String>() {
+        final Label label = new Label(ID_PROPERTY_NAME, new AbstractReadOnlyModel<String>() {
             @Override
             public String getObject() {
-                return model.getPropertyMemento().getProperty().getName();
+                final OneToOneAssociation property = model.getPropertyMemento().getProperty();
+                return property.getName();
             }
-        }));
+        });
+        final OneToOneAssociation property = model.getPropertyMemento().getProperty();
+        final NamedFacet namedFacet = property.getFacet(NamedFacet.class);
+        if(namedFacet != null) {
+            label.setEscapeModelStrings(namedFacet.escaped());
+        }
+        add(label);
     }
 
 }


[07/13] isis git commit: ISIS-993: responsibility for creating the default grid moved to GrdNormalizerService. Also Wicket viewer html layout fixes...

Posted by da...@apache.org.
ISIS-993: responsibility for creating the default grid moved to GrdNormalizerService.  Also Wicket viewer html layout fixes...

that is:
- tidying up of ScalarPanelAbstract html/layout, adding missing support for 'edit' button (and use fa-icon for that now, instead).
- removing spurious concurrency exception resulting from new implementation of edit functionality (from action whose button is rendered on panel).


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

Branch: refs/heads/ISIS-993
Commit: 5c2b07de4bb30a490f4d3f12bab694e6fba161f5
Parents: e95a46f
Author: Dan Haywood <da...@haywood-associates.co.uk>
Authored: Tue Feb 23 12:56:04 2016 +0000
Committer: Dan Haywood <da...@haywood-associates.co.uk>
Committed: Tue Feb 23 12:56:04 2016 +0000

----------------------------------------------------------------------
 .../services/layout/GridNormalizerService.java  |   3 +
 .../applib/services/layout/GridService.java     |   2 +
 .../facets/object/grid/GridFacetDefault.java    | 102 +-----------------
 .../grid/GridNormalizerServiceAbstract.java     |  19 ++--
 .../services/grid/GridServiceDefault.java       |  24 ++---
 .../bootstrap3/GridNormalizerServiceBS3.java    | 104 +++++++++++++++----
 .../spec/feature/ObjectAssociation.java         |  23 ++++
 .../specimpl/ObjectSpecificationAbstract.java   |   6 +-
 .../AdditionalLinksAsListInlinePanel.html       |   1 +
 .../serviceactions/ServiceActionsPanel.css      |   5 +
 .../entity/fieldset/PropertyGroup.html          |   4 +-
 .../components/scalars/ScalarPanelAbstract.html |  11 +-
 .../isisapplib/IsisBlobOrClobPanelAbstract.html |  29 ++++--
 .../scalars/primitive/BooleanPanel.html         |  17 ++-
 .../scalars/reference/ReferencePanel.html       |  27 ++---
 .../linkandlabel/ActionLinkFactoryAbstract.java |  14 ++-
 .../valuechoices/ValueChoicesSelect2Panel.html  |  16 ++-
 .../ui/pages/bootstrap-overrides-flatly.css     |   5 +
 .../wicket/ui/pages/bootstrap-overrides.css     |  35 +++++--
 .../wicket/ui/pages/entity/EntityPage.java      |  17 +--
 20 files changed, 272 insertions(+), 192 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/isis/blob/5c2b07de/core/applib/src/main/java/org/apache/isis/applib/services/layout/GridNormalizerService.java
----------------------------------------------------------------------
diff --git a/core/applib/src/main/java/org/apache/isis/applib/services/layout/GridNormalizerService.java b/core/applib/src/main/java/org/apache/isis/applib/services/layout/GridNormalizerService.java
index a967d95..6eb2383 100644
--- a/core/applib/src/main/java/org/apache/isis/applib/services/layout/GridNormalizerService.java
+++ b/core/applib/src/main/java/org/apache/isis/applib/services/layout/GridNormalizerService.java
@@ -45,4 +45,7 @@ public interface GridNormalizerService<G extends Grid> {
 
     @Programmatic
     void minimal(G grid, Class<?> domainClass);
+
+    @Programmatic
+    Grid defaultGrid(Class<?> domainClass);
 }

http://git-wip-us.apache.org/repos/asf/isis/blob/5c2b07de/core/applib/src/main/java/org/apache/isis/applib/services/layout/GridService.java
----------------------------------------------------------------------
diff --git a/core/applib/src/main/java/org/apache/isis/applib/services/layout/GridService.java b/core/applib/src/main/java/org/apache/isis/applib/services/layout/GridService.java
index 1606046..d8ce4b4 100644
--- a/core/applib/src/main/java/org/apache/isis/applib/services/layout/GridService.java
+++ b/core/applib/src/main/java/org/apache/isis/applib/services/layout/GridService.java
@@ -50,6 +50,8 @@ public interface GridService {
 
     Grid minimal(Grid grid);
 
+    Grid defaultGrid(Class<?> domainClass);
+
     enum Style {
 
         /**

http://git-wip-us.apache.org/repos/asf/isis/blob/5c2b07de/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/object/grid/GridFacetDefault.java
----------------------------------------------------------------------
diff --git a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/object/grid/GridFacetDefault.java b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/object/grid/GridFacetDefault.java
index e02efde..756938a 100644
--- a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/object/grid/GridFacetDefault.java
+++ b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/object/grid/GridFacetDefault.java
@@ -18,29 +18,16 @@
  */
 package org.apache.isis.core.metamodel.facets.object.grid;
 
-import java.util.Arrays;
-import java.util.List;
-
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-import org.apache.isis.applib.annotation.MemberGroupLayout;
-import org.apache.isis.applib.layout.component.CollectionLayoutData;
-import org.apache.isis.applib.layout.component.DomainObjectLayoutData;
-import org.apache.isis.applib.layout.component.FieldSet;
 import org.apache.isis.applib.layout.component.Grid;
-import org.apache.isis.applib.layout.grid.bootstrap3.BS3Col;
-import org.apache.isis.applib.layout.grid.bootstrap3.BS3Grid;
-import org.apache.isis.applib.layout.grid.bootstrap3.BS3Row;
 import org.apache.isis.applib.services.layout.GridService;
 import org.apache.isis.core.metamodel.deployment.DeploymentCategory;
 import org.apache.isis.core.metamodel.facetapi.Facet;
 import org.apache.isis.core.metamodel.facetapi.FacetAbstract;
 import org.apache.isis.core.metamodel.facetapi.FacetHolder;
-import org.apache.isis.core.metamodel.facets.object.membergroups.MemberGroupLayoutFacet;
 import org.apache.isis.core.metamodel.spec.ObjectSpecification;
-import org.apache.isis.core.metamodel.spec.feature.Contributed;
-import org.apache.isis.core.metamodel.spec.feature.OneToManyAssociation;
 
 public class GridFacetDefault
             extends FacetAbstract
@@ -82,97 +69,12 @@ public class GridFacetDefault
         final Class<?> domainClass = getSpecification().getCorrespondingClass();
         Grid grid = gridService.fromXml(domainClass);
         if(grid == null) {
-            grid = deriveGrid();
+            grid = gridService.defaultGrid(domainClass);
         }
-
-        this.grid = normalize(grid);
+        this.grid = gridService.normalize(grid);
         return this.grid;
     }
 
-    private Grid deriveGrid() {
-        final BS3Grid bs3Grid = new BS3Grid();
-        bs3Grid.setDomainClass(getSpecification().getCorrespondingClass());
-
-        final BS3Row headerRow = new BS3Row();
-        bs3Grid.getRows().add(headerRow);
-        final BS3Col headerRowCol = new BS3Col();
-        headerRowCol.setSpan(12);
-        headerRowCol.setUnreferencedActions(true);
-        headerRowCol.setDomainObject(new DomainObjectLayoutData());
-        headerRow.getCols().add(headerRowCol);
-
-        final BS3Row propsRow = new BS3Row();
-        bs3Grid.getRows().add(propsRow);
-
-        final MemberGroupLayoutFacet memberGroupLayoutFacet =
-                getSpecification().getFacet(MemberGroupLayoutFacet.class);
-        if(memberGroupLayoutFacet != null) {
-            // if have @MemberGroupLayout (or equally, a .layout.json file)
-            final MemberGroupLayout.ColumnSpans columnSpans = memberGroupLayoutFacet.getColumnSpans();
-            addFieldSetsToColumn(propsRow, columnSpans.getLeft(), memberGroupLayoutFacet.getLeft(), true);
-            addFieldSetsToColumn(propsRow, columnSpans.getMiddle(), memberGroupLayoutFacet.getMiddle(), false);
-            addFieldSetsToColumn(propsRow, columnSpans.getRight(), memberGroupLayoutFacet.getRight(), false);
-
-            final BS3Col col = new BS3Col();
-            final int collectionSpan = columnSpans.getCollections();
-            col.setUnreferencedCollections(true);
-            col.setSpan(collectionSpan > 0? collectionSpan: 12);
-            propsRow.getCols().add(col);
-
-            // will already be sorted per @MemberOrder
-            final List<OneToManyAssociation> collections = getSpecification().getCollections(Contributed.INCLUDED);
-            for (OneToManyAssociation collection : collections) {
-                col.getCollections().add(new CollectionLayoutData(collection.getId()));
-            }
-        } else {
-
-            // if no layout hints other than @MemberOrder
-            addFieldSetsToColumn(propsRow, 4, Arrays.asList("General"), true);
-
-            final BS3Col col = new BS3Col();
-            col.setUnreferencedCollections(true);
-            col.setSpan(12);
-            propsRow.getCols().add(col);
-        }
-        return bs3Grid;
-    }
-
-    void addFieldSetsToColumn(
-            final BS3Row propsRow,
-            final int span,
-            final List<String> memberGroupNames,
-            final boolean unreferencedProperties) {
-
-        if(span > 0 || unreferencedProperties) {
-            final BS3Col col = new BS3Col();
-            col.setSpan(span); // in case we are here because of 'unreferencedProperties' needs setting
-            propsRow.getCols().add(col);
-            final List<String> leftMemberGroups = memberGroupNames;
-            for (String memberGroup : leftMemberGroups) {
-                final FieldSet fieldSet = new FieldSet();
-                fieldSet.setName(memberGroup);
-                // fieldSet's id will be derived from the name later
-                // during normalization phase.
-                if(unreferencedProperties && col.getFieldSets().isEmpty()) {
-                    fieldSet.setUnreferencedProperties(true);
-                }
-                col.getFieldSets().add(fieldSet);
-            }
-        }
-    }
-
-
-
-    private Grid normalize(final Grid grid) {
-        if(grid == null) {
-            return null;
-        }
-        // unused... final Class<?> domainClass = getSpecification().getCorrespondingClass();
-
-        return gridService.normalize(grid);
-    }
-
-
     private ObjectSpecification getSpecification() {
         return (ObjectSpecification) getFacetHolder();
     }

http://git-wip-us.apache.org/repos/asf/isis/blob/5c2b07de/core/metamodel/src/main/java/org/apache/isis/core/metamodel/services/grid/GridNormalizerServiceAbstract.java
----------------------------------------------------------------------
diff --git a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/services/grid/GridNormalizerServiceAbstract.java b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/services/grid/GridNormalizerServiceAbstract.java
index dd7abc8..8d92c89 100644
--- a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/services/grid/GridNormalizerServiceAbstract.java
+++ b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/services/grid/GridNormalizerServiceAbstract.java
@@ -20,12 +20,13 @@ import java.util.Collection;
 import java.util.Comparator;
 import java.util.List;
 import java.util.Map;
+import java.util.concurrent.atomic.AtomicInteger;
+import java.util.concurrent.atomic.AtomicReference;
 
 import javax.inject.Inject;
 
 import com.google.common.base.Strings;
 import com.google.common.collect.Lists;
-import com.google.common.collect.Maps;
 
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -49,7 +50,6 @@ import org.apache.isis.applib.layout.component.HasCssClassFa;
 import org.apache.isis.applib.layout.component.HasDescribedAs;
 import org.apache.isis.applib.layout.component.HasHidden;
 import org.apache.isis.applib.layout.component.HasNamed;
-import org.apache.isis.applib.layout.component.MemberRegionOwner;
 import org.apache.isis.applib.layout.component.PropertyLayoutData;
 import org.apache.isis.applib.services.i18n.TranslationService;
 import org.apache.isis.applib.services.jaxb.JaxbService;
@@ -480,7 +480,7 @@ public abstract class GridNormalizerServiceAbstract<G extends Grid>
             final Map<String, OneToManyAssociation> oneToManyAssociationById,
             final Map<String, ObjectAction> objectActionById) {
 
-        final Map<String, int[]> propertySequenceByGroup = Maps.newHashMap();
+        final AtomicInteger propertySequence = new AtomicInteger(0);
         fcGrid.visit(new Grid.VisitorAdapter() {
             private int collectionSequence = 1;
 
@@ -569,9 +569,11 @@ public abstract class GridNormalizerServiceAbstract<G extends Grid>
                 FacetUtil.addOrReplaceFacet(TypicalLengthFacetForPropertyXml.create(propertyLayoutData, oneToOneAssociation));
 
                 // @MemberOrder#name based on owning property group, @MemberOrder#sequence monotonically increasing
+                // nb for any given field set the sequence won't reset to zero; however this is what we want so that
+                // table columns are shown correctly (by fieldset, then property order within that fieldset).
                 final FieldSet fieldSet = propertyLayoutData.getOwner();
                 final String groupName = fieldSet.getName();
-                final String sequence = nextInSequenceFor(groupName, propertySequenceByGroup);
+                final String sequence = "" + (propertySequence.incrementAndGet());
                 FacetUtil.addOrReplaceFacet(
                         new MemberOrderFacetXml(groupName, sequence, translationService, oneToOneAssociation));
             }
@@ -653,20 +655,19 @@ public abstract class GridNormalizerServiceAbstract<G extends Grid>
     }
 
 
-    SpecificationLoader specificationLookup;
+    protected SpecificationLoader specificationLookup;
 
     public void setSpecificationLoader(final SpecificationLoader specificationLookup) {
         this.specificationLookup = specificationLookup;
     }
 
     @Inject
-    TranslationService translationService;
+    protected TranslationService translationService;
 
     @Inject
-    JaxbService jaxbService;
+    protected JaxbService jaxbService;
 
     @Inject
-    DomainObjectContainer container;
-
+    protected DomainObjectContainer container;
 
 }

http://git-wip-us.apache.org/repos/asf/isis/blob/5c2b07de/core/metamodel/src/main/java/org/apache/isis/core/metamodel/services/grid/GridServiceDefault.java
----------------------------------------------------------------------
diff --git a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/services/grid/GridServiceDefault.java b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/services/grid/GridServiceDefault.java
index e9dc2b2..4ce3f02 100644
--- a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/services/grid/GridServiceDefault.java
+++ b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/services/grid/GridServiceDefault.java
@@ -152,12 +152,20 @@ public class GridServiceDefault
     }
 
     @Override
-    @Programmatic
-    public Grid normalize(final Grid grid) {
+    public Grid defaultGrid(Class<?> domainClass) {
 
-        if(grid == null) {
-            return null;
+        for (GridNormalizerService gridNormalizerService : gridNormalizerServices()) {
+            Grid grid = gridNormalizerService.defaultGrid(domainClass);
+            if(grid != null) {
+                return grid;
+            }
         }
+        throw new IllegalStateException("No GridNormalizerService available to create grid for '" + domainClass.getName() + "'");
+    }
+
+    @Override
+    @Programmatic
+    public Grid normalize(final Grid grid) {
 
         // if have .layout.json and then add a .layout.xml without restarting, then note that
         // the changes won't be picked up.  Normalizing would be required
@@ -181,10 +189,6 @@ public class GridServiceDefault
     @Programmatic
     public Grid complete(final Grid grid) {
 
-        if(grid == null) {
-            return null;
-        }
-
         final Class<?> domainClass = grid.getDomainClass();
         for (GridNormalizerService gridNormalizerService : gridNormalizerServices()) {
             gridNormalizerService.complete(grid, domainClass);
@@ -197,10 +201,6 @@ public class GridServiceDefault
     @Programmatic
     public Grid minimal(final Grid grid) {
 
-        if(grid == null) {
-            return null;
-        }
-
         final Class<?> domainClass = grid.getDomainClass();
         for (GridNormalizerService gridNormalizerService : gridNormalizerServices()) {
             gridNormalizerService.minimal(grid, domainClass);

http://git-wip-us.apache.org/repos/asf/isis/blob/5c2b07de/core/metamodel/src/main/java/org/apache/isis/core/metamodel/services/grid/bootstrap3/GridNormalizerServiceBS3.java
----------------------------------------------------------------------
diff --git a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/services/grid/bootstrap3/GridNormalizerServiceBS3.java b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/services/grid/bootstrap3/GridNormalizerServiceBS3.java
index 283bb49..9ad5161 100644
--- a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/services/grid/bootstrap3/GridNormalizerServiceBS3.java
+++ b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/services/grid/bootstrap3/GridNormalizerServiceBS3.java
@@ -16,7 +16,7 @@
  */
 package org.apache.isis.core.metamodel.services.grid.bootstrap3;
 
-import java.util.Comparator;
+import java.util.Arrays;
 import java.util.LinkedHashMap;
 import java.util.List;
 import java.util.Map;
@@ -37,9 +37,12 @@ import com.google.common.collect.Sets;
 
 import org.apache.isis.applib.annotation.ActionLayout;
 import org.apache.isis.applib.annotation.DomainService;
+import org.apache.isis.applib.annotation.MemberGroupLayout;
 import org.apache.isis.applib.annotation.NatureOfService;
+import org.apache.isis.applib.annotation.Programmatic;
 import org.apache.isis.applib.layout.component.ActionLayoutData;
 import org.apache.isis.applib.layout.component.CollectionLayoutData;
+import org.apache.isis.applib.layout.component.DomainObjectLayoutData;
 import org.apache.isis.applib.layout.component.FieldSet;
 import org.apache.isis.applib.layout.component.Grid;
 import org.apache.isis.applib.layout.component.PropertyLayoutData;
@@ -50,13 +53,14 @@ import org.apache.isis.applib.layout.grid.bootstrap3.BS3RowContent;
 import org.apache.isis.applib.layout.grid.bootstrap3.BS3Tab;
 import org.apache.isis.applib.layout.grid.bootstrap3.BS3TabGroup;
 import org.apache.isis.core.metamodel.facets.members.order.MemberOrderFacet;
+import org.apache.isis.core.metamodel.facets.object.membergroups.MemberGroupLayoutFacet;
 import org.apache.isis.core.metamodel.services.grid.GridNormalizerServiceAbstract;
 import org.apache.isis.core.metamodel.spec.ObjectSpecification;
+import org.apache.isis.core.metamodel.spec.feature.Contributed;
 import org.apache.isis.core.metamodel.spec.feature.ObjectAction;
 import org.apache.isis.core.metamodel.spec.feature.ObjectAssociation;
 import org.apache.isis.core.metamodel.spec.feature.OneToManyAssociation;
 import org.apache.isis.core.metamodel.spec.feature.OneToOneAssociation;
-import org.apache.isis.core.metamodel.util.DeweyOrderComparator;
 
 @DomainService(
         nature = NatureOfService.DOMAIN
@@ -71,6 +75,84 @@ public class GridNormalizerServiceBS3 extends GridNormalizerServiceAbstract<BS3G
     }
 
 
+    @Programmatic
+    @Override
+    public Grid defaultGrid(final Class<?> domainClass) {
+        final BS3Grid bs3Grid = new BS3Grid();
+
+        final ObjectSpecification objectSpec = specificationLookup.loadSpecification(domainClass);
+        bs3Grid.setDomainClass(domainClass);
+
+        final BS3Row headerRow = new BS3Row();
+        bs3Grid.getRows().add(headerRow);
+        final BS3Col headerRowCol = new BS3Col();
+        headerRowCol.setSpan(12);
+        headerRowCol.setUnreferencedActions(true);
+        headerRowCol.setDomainObject(new DomainObjectLayoutData());
+        headerRow.getCols().add(headerRowCol);
+
+        final BS3Row propsRow = new BS3Row();
+        bs3Grid.getRows().add(propsRow);
+
+        final MemberGroupLayoutFacet memberGroupLayoutFacet =
+                objectSpec.getFacet(MemberGroupLayoutFacet.class);
+        if(memberGroupLayoutFacet != null) {
+            // if have @MemberGroupLayout (or equally, a .layout.json file)
+            final MemberGroupLayout.ColumnSpans columnSpans = memberGroupLayoutFacet.getColumnSpans();
+            addFieldSetsToColumn(propsRow, columnSpans.getLeft(), memberGroupLayoutFacet.getLeft(), true);
+            addFieldSetsToColumn(propsRow, columnSpans.getMiddle(), memberGroupLayoutFacet.getMiddle(), false);
+            addFieldSetsToColumn(propsRow, columnSpans.getRight(), memberGroupLayoutFacet.getRight(), false);
+
+            final BS3Col col = new BS3Col();
+            final int collectionSpan = columnSpans.getCollections();
+            col.setUnreferencedCollections(true);
+            col.setSpan(collectionSpan > 0? collectionSpan: 12);
+            propsRow.getCols().add(col);
+
+            // will already be sorted per @MemberOrder
+            final List<OneToManyAssociation> collections = objectSpec.getCollections(Contributed.INCLUDED);
+            for (OneToManyAssociation collection : collections) {
+                col.getCollections().add(new CollectionLayoutData(collection.getId()));
+            }
+        } else {
+
+            // if no layout hints other than @MemberOrder
+            addFieldSetsToColumn(propsRow, 4, Arrays.asList("General"), true);
+
+            final BS3Col col = new BS3Col();
+            col.setUnreferencedCollections(true);
+            col.setSpan(12);
+            propsRow.getCols().add(col);
+        }
+        return bs3Grid;
+    }
+
+    void addFieldSetsToColumn(
+            final BS3Row propsRow,
+            final int span,
+            final List<String> memberGroupNames,
+            final boolean unreferencedProperties) {
+
+        if(span > 0 || unreferencedProperties) {
+            final BS3Col col = new BS3Col();
+            col.setSpan(span); // in case we are here because of 'unreferencedProperties' needs setting
+            propsRow.getCols().add(col);
+            final List<String> leftMemberGroups = memberGroupNames;
+            for (String memberGroup : leftMemberGroups) {
+                final FieldSet fieldSet = new FieldSet();
+                fieldSet.setName(memberGroup);
+                // fieldSet's id will be derived from the name later
+                // during normalization phase.
+                if(unreferencedProperties && col.getFieldSets().isEmpty()) {
+                    fieldSet.setUnreferencedProperties(true);
+                }
+                col.getFieldSets().add(fieldSet);
+            }
+        }
+    }
+
+
+
     @Override
     protected boolean validateAndDerive(
             final Grid grid,
@@ -304,7 +386,7 @@ public class GridNormalizerServiceBS3 extends GridNormalizerServiceAbstract<BS3G
                         .filter(Predicates.<OneToOneAssociation>notNull())
                 );
 
-                associations.sort(byMemberOrderSequence());
+                associations.sort(ObjectAssociation.Comparators.byMemberOrderSequence());
                 addPropertiesTo(fieldSet,
                         FluentIterable.from(associations)
                                       .transform(ObjectAssociation.Functions.toId())
@@ -337,7 +419,7 @@ public class GridNormalizerServiceBS3 extends GridNormalizerServiceAbstract<BS3G
                             return oneToManyAssociationById.get(collectionId);
                         }
                     })
-                    .toSortedList(byMemberOrderSequence())
+                    .toSortedList(ObjectAssociation.Comparators.byMemberOrderSequence())
 
             );
             final ImmutableList<String> sortedMissingCollectionIds = FluentIterable.from(sortedCollections)
@@ -424,20 +506,6 @@ public class GridNormalizerServiceBS3 extends GridNormalizerServiceAbstract<BS3G
         return Character.toLowerCase(c) + str.substring(1).replaceAll("\\s+", "");
     }
 
-    private static Comparator<ObjectAssociation> byMemberOrderSequence() {
-        return new Comparator<ObjectAssociation>() {
-            private final DeweyOrderComparator deweyOrderComparator = new DeweyOrderComparator();
-            @Override
-            public int compare(final ObjectAssociation o1, final ObjectAssociation o2) {
-                final MemberOrderFacet o1Facet = o1.getFacet(MemberOrderFacet.class);
-                final MemberOrderFacet o2Facet = o2.getFacet(MemberOrderFacet.class);
-                return o1Facet == null? +1:
-                        o2Facet == null? -1:
-                                deweyOrderComparator.compare(o1Facet.sequence(), o2Facet.sequence());
-            }
-        };
-    }
-
     protected void addPropertiesTo(
             final FieldSet fieldSet,
             final List<String> propertyIds) {

http://git-wip-us.apache.org/repos/asf/isis/blob/5c2b07de/core/metamodel/src/main/java/org/apache/isis/core/metamodel/spec/feature/ObjectAssociation.java
----------------------------------------------------------------------
diff --git a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/spec/feature/ObjectAssociation.java b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/spec/feature/ObjectAssociation.java
index 9c87476..50024dc 100644
--- a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/spec/feature/ObjectAssociation.java
+++ b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/spec/feature/ObjectAssociation.java
@@ -20,6 +20,7 @@
 package org.apache.isis.core.metamodel.spec.feature;
 
 import java.util.Collections;
+import java.util.Comparator;
 import java.util.List;
 import java.util.Map;
 
@@ -41,6 +42,7 @@ import org.apache.isis.core.metamodel.facets.object.membergroups.MemberGroupLayo
 import org.apache.isis.core.metamodel.facets.object.value.ValueFacet;
 import org.apache.isis.core.metamodel.layout.memberorderfacet.MemberOrderComparator;
 import org.apache.isis.core.metamodel.specloader.specimpl.ContributeeMember;
+import org.apache.isis.core.metamodel.util.DeweyOrderComparator;
 
 /**
  * Provides reflective access to a field on a domain object.
@@ -395,6 +397,27 @@ public interface ObjectAssociation extends ObjectMember, CurrentHolder {
     }
 
     // //////////////////////////////////////////////////////
+    // Comparators
+    // //////////////////////////////////////////////////////
+
+    public static class Comparators {
+        public static Comparator<ObjectAssociation> byMemberOrderSequence() {
+            return new Comparator<ObjectAssociation>() {
+                private final DeweyOrderComparator deweyOrderComparator = new DeweyOrderComparator();
+                @Override
+                public int compare(final ObjectAssociation o1, final ObjectAssociation o2) {
+                    final MemberOrderFacet o1Facet = o1.getFacet(MemberOrderFacet.class);
+                    final MemberOrderFacet o2Facet = o2.getFacet(MemberOrderFacet.class);
+                    return o1Facet == null? +1:
+                            o2Facet == null? -1:
+                                    deweyOrderComparator.compare(o1Facet.sequence(), o2Facet.sequence());
+                }
+            };
+        }
+
+    }
+
+    // //////////////////////////////////////////////////////
     // Util
     // //////////////////////////////////////////////////////
 

http://git-wip-us.apache.org/repos/asf/isis/blob/5c2b07de/core/metamodel/src/main/java/org/apache/isis/core/metamodel/specloader/specimpl/ObjectSpecificationAbstract.java
----------------------------------------------------------------------
diff --git a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/specloader/specimpl/ObjectSpecificationAbstract.java b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/specloader/specimpl/ObjectSpecificationAbstract.java
index 0a2561d..708e700 100644
--- a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/specloader/specimpl/ObjectSpecificationAbstract.java
+++ b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/specloader/specimpl/ObjectSpecificationAbstract.java
@@ -29,6 +29,7 @@ import java.util.Set;
 import com.google.common.base.Function;
 import com.google.common.base.Predicate;
 import com.google.common.collect.Collections2;
+import com.google.common.collect.FluentIterable;
 import com.google.common.collect.Iterables;
 import com.google.common.collect.Lists;
 import com.google.common.collect.Maps;
@@ -709,7 +710,10 @@ public abstract class ObjectSpecificationAbstract extends FacetHolderImpl implem
     public List<ObjectAssociation> getAssociations(Contributed contributed, final Filter<ObjectAssociation> filter) {
         final List<ObjectAssociation> allAssociations = getAssociations(contributed);
         return Lists.newArrayList(
-                Iterables.filter(allAssociations, Filters.asPredicate(filter)));
+                FluentIterable.from(allAssociations)
+                        .filter(Filters.asPredicate(filter))
+                        .toSortedList(ObjectAssociation.Comparators.byMemberOrderSequence())
+        );
     }
 
     @SuppressWarnings({ "rawtypes", "unchecked" })

http://git-wip-us.apache.org/repos/asf/isis/blob/5c2b07de/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/actionmenu/entityactions/AdditionalLinksAsListInlinePanel.html
----------------------------------------------------------------------
diff --git a/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/actionmenu/entityactions/AdditionalLinksAsListInlinePanel.html b/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/actionmenu/entityactions/AdditionalLinksAsListInlinePanel.html
index 7cc41f1..f7d8db6 100644
--- a/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/actionmenu/entityactions/AdditionalLinksAsListInlinePanel.html
+++ b/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/actionmenu/entityactions/AdditionalLinksAsListInlinePanel.html
@@ -31,6 +31,7 @@
                     </a>
                 </li>
             </ul>
+            <div class="clearfix"/>
         </wicket:panel>
     </body>
 </html>

http://git-wip-us.apache.org/repos/asf/isis/blob/5c2b07de/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/actionmenu/serviceactions/ServiceActionsPanel.css
----------------------------------------------------------------------
diff --git a/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/actionmenu/serviceactions/ServiceActionsPanel.css b/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/actionmenu/serviceactions/ServiceActionsPanel.css
index 59f31df..8b16ff9 100644
--- a/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/actionmenu/serviceactions/ServiceActionsPanel.css
+++ b/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/actionmenu/serviceactions/ServiceActionsPanel.css
@@ -237,6 +237,11 @@
     margin-right: 10px;
 }
 
+
+.pull-right .additionalLinkListDropDown {
+    margin-left: 0px;
+}
+
 .additionalLinkList li {
     float:left;
     margin-right:10px;

http://git-wip-us.apache.org/repos/asf/isis/blob/5c2b07de/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/fieldset/PropertyGroup.html
----------------------------------------------------------------------
diff --git a/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/fieldset/PropertyGroup.html b/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/fieldset/PropertyGroup.html
index 5b402cb..355ed29 100644
--- a/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/fieldset/PropertyGroup.html
+++ b/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/fieldset/PropertyGroup.html
@@ -25,8 +25,8 @@
                     <div class="panel-heading">
                         <span wicket:id="memberGroupName" class="panel-title">[group name]</span>
                         <div class="pull-right additionalLinks">
-                            <div wicket:id="associatedActionLinksPanel"></div>
-                            <div wicket:id="associatedActionLinksPanelDropDown"></div>
+                            <div class="pull-right" wicket:id="associatedActionLinksPanelDropDown"></div>
+                            <div class="pull-right" wicket:id="associatedActionLinksPanel"></div>
                         </div>
                     </div>
                     <div class="properties panel-body">

http://git-wip-us.apache.org/repos/asf/isis/blob/5c2b07de/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/scalars/ScalarPanelAbstract.html
----------------------------------------------------------------------
diff --git a/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/scalars/ScalarPanelAbstract.html b/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/scalars/ScalarPanelAbstract.html
index e7715cd..dcbd683 100644
--- a/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/scalars/ScalarPanelAbstract.html
+++ b/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/scalars/ScalarPanelAbstract.html
@@ -28,11 +28,18 @@
                 <div class="form-group" wicket:id="scalarIfRegular">
                     <label wicket:id="scalarName" class="scalarName control-label">[Label text]</label>
                     <span class="scalarValueWrapper">
-                        <span class="editing"><wicket:child/><a wicket:id="editProperty" href="#" class="btn btn-link btn-xs" style="float: right;">edit</a></span>
+                        <div class="scalarPlaceholder">
+                            <span class="scalarValueInput">
+                                <span class="editing">
+                                    <wicket:child/>
+                                    <a wicket:id="editProperty" href="#" class="edit fa fa-pencil-square-o"/>
+                                </span>
+                            </span>
+                        </div>
                         <span wicket:id="feedback" class="help-block"></span>
                         <span wicket:id="associatedActionLinksBelow"></span>
                     </span>
-                    <span wicket:id="associatedActionLinksRight"></span>
+                    <span wicket:id="associatedActionLinksRight" class="associatedActionLinksRight">[drop down]</span>
                     <div class="clearfix"/>
                 </div>
                 <wicket:container wicket:id="scalarIfCompact"></wicket:container>

http://git-wip-us.apache.org/repos/asf/isis/blob/5c2b07de/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/scalars/isisapplib/IsisBlobOrClobPanelAbstract.html
----------------------------------------------------------------------
diff --git a/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/scalars/isisapplib/IsisBlobOrClobPanelAbstract.html b/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/scalars/isisapplib/IsisBlobOrClobPanelAbstract.html
index d642f93..92b11a7 100644
--- a/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/scalars/isisapplib/IsisBlobOrClobPanelAbstract.html
+++ b/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/scalars/isisapplib/IsisBlobOrClobPanelAbstract.html
@@ -24,23 +24,30 @@
                 <div class="form-group" wicket:id="scalarIfRegular">
                     <label wicket:id="scalarName" class="scalarName control-label">[Label text]</label>
                     <span class="scalarValueWrapper">
-                        <img class="scalarImage text-center" width="200px" wicket:id="scalarImage"/>
-                        <span class="scalarValue text-right">
+                        <div class="scalarPlaceholder">
+                            <span class="scalarValueInput">
+                                <span class="editing">
+                                    <img class="scalarImage text-center" width="200px" wicket:id="scalarImage"/>
+                                    <span class="scalarValue text-right">
 
-                            <span class="uploadFile help-block">
-                                <input type="file" name="scalarValue" wicket:id="scalarValue" />
-                            </span>
-                            <a wicket:id="scalarIfRegularClear" class="btn btn-primary btn-sm"><span class="clearTitle">Clear</span></a>
+                                        <span class="uploadFile help-block">
+                                            <input type="file" name="scalarValue" wicket:id="scalarValue" />
+                                        </span>
+                                        <a wicket:id="scalarIfRegularClear" class="btn btn-primary btn-sm"><span class="clearTitle">Clear</span></a>
 
-                            <a class="download btn btn-sm btn-primary" wicket:id="scalarIfRegularDownload"><span class="downloadTitle">Download</span></a>
-                            <span class="fileName" wicket:id="fileName">[filename]</span><span>&nbsp;</span>
-                        </span>
+                                        <a class="download btn btn-sm btn-primary" wicket:id="scalarIfRegularDownload"><span class="downloadTitle">Download</span></a>
+                                        <span class="fileName" wicket:id="fileName">[filename]</span><span>&nbsp;</span>
+                                    </span>
+                                    <a wicket:id="editProperty" href="#" class="edit fa fa-pencil-square-o"/>
+                                </span>
+                            </span>
+                        </div>
                         <span wicket:id="feedback" class="help-block"></span>
                         <span wicket:id="associatedActionLinksBelow"></span>
                     </span>
-                    <span wicket:id="associatedActionLinksRight"></span>
+                    <span wicket:id="associatedActionLinksRight"  class="associatedActionLinksRight">[drop down]</span>
+                    <div class="clearfix"/>
                 </div>
-
                 <span wicket:id="scalarIfCompact">
                     <a wicket:id="scalarIfCompactDownload"><span class="fileName" wicket:id="fileNameIfCompact"></span></a>
                 </span>

http://git-wip-us.apache.org/repos/asf/isis/blob/5c2b07de/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/scalars/primitive/BooleanPanel.html
----------------------------------------------------------------------
diff --git a/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/scalars/primitive/BooleanPanel.html b/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/scalars/primitive/BooleanPanel.html
index 7809939..8fa08d9 100644
--- a/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/scalars/primitive/BooleanPanel.html
+++ b/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/scalars/primitive/BooleanPanel.html
@@ -27,15 +27,24 @@
             <div class="booleanPanel scalarNameAndValueComponentType">
                 <div class="form-group" wicket:id="scalarIfRegular">
                     <label wicket:id="scalarName" class="scalarName control-label">[Label text]</label>
-                    <div class="scalarValueWrapper">
-                        <input type="checkbox" name="scalarValue" class="scalarValue" wicket:id="scalarValue" />
+                    <span class="scalarValueWrapper">
+                        <div class="scalarPlaceholder">
+                            <span class="scalarValueInput">
+                                <span class="editing">
+                                    <input type="checkbox" name="scalarValue" class="scalarValue" wicket:id="scalarValue" />
+                                        <a wicket:id="editProperty" href="#" class="edit fa fa-pencil-square-o"/>
+                                </span>
+                            </span>
+                        </div>
                         <span wicket:id="feedback" class="help-block"></span>
                         <span wicket:id="associatedActionLinksBelow"></span>
-                    </div>
-                    <span wicket:id="associatedActionLinksRight"></span>
+                    </span>
+                    <span wicket:id="associatedActionLinksRight" class="associatedActionLinksRight"></span>
+                    <div class="clearfix"/>
                 </div>
                 <input type="checkbox" wicket:id="scalarIfCompact" />
             </div>
+            <div class="clearfix"/>
         </wicket:panel>
     </body>
 </html>

http://git-wip-us.apache.org/repos/asf/isis/blob/5c2b07de/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/scalars/reference/ReferencePanel.html
----------------------------------------------------------------------
diff --git a/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/scalars/reference/ReferencePanel.html b/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/scalars/reference/ReferencePanel.html
index 0b92105..cfc0ace 100644
--- a/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/scalars/reference/ReferencePanel.html
+++ b/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/scalars/reference/ReferencePanel.html
@@ -28,22 +28,25 @@
                 <div class="form-group" wicket:id="scalarIfRegular">
                     <label wicket:id="scalarName" class="scalarName control-label">[Label text]</label>
                     <span class="scalarValueWrapper">
-                        <span class="entityLink">
-                            <div class="entityLinkSelect2Panel entityLinkComponentType">
-                                <div class="wrapper">
-                                    <span class="autoCompletePlaceholder">
-                                        <span wicket:id="entityLink">link or drop down</span>
-                                        <span wicket:id="entityIconAndTitle">[icon and title]</span>
+                        <div class="scalarPlaceholder entityLinkSelect2Panel entityLinkComponentType">
+                            <span class="entityLink wrapper">
+                                <span class="scalarValueInput">
+                                    <span class="editing">
+                                        <span class="autoCompletePlaceholder">
+                                            <span wicket:id="entityLink">link or drop down</span>
+                                            <span wicket:id="entityIconAndTitle">[icon and title]</span>
+                                        </span>
+                                        <span wicket:id="entityTitleIfNull">(none)</span>
+                                        <a wicket:id="editProperty" href="#" class="edit fa fa-pencil-square-o"/>
                                     </span>
-                                    <span class="clearfix"></span>
-                                </div>
-                                <span wicket:id="entityTitleIfNull">(none)</span>
-                            </div>
-                        </span>
+                                </span>
+                            </span>
+                        </div>
                         <span wicket:id="feedback" class="help-block"></span>
                         <span wicket:id="associatedActionLinksBelow"></span>
                     </span>
-                    <span wicket:id="associatedActionLinksRight"></span>
+                    <span wicket:id="associatedActionLinksRight" class="associatedActionLinksRight"></span>
+                    <div class="clearfix"/>
                 </div>
                 <div wicket:id="scalarIfCompact" class="scalarIfCompact">
                     <div class="scalarValue">

http://git-wip-us.apache.org/repos/asf/isis/blob/5c2b07de/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/widgets/linkandlabel/ActionLinkFactoryAbstract.java
----------------------------------------------------------------------
diff --git a/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/widgets/linkandlabel/ActionLinkFactoryAbstract.java b/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/widgets/linkandlabel/ActionLinkFactoryAbstract.java
index 1ff6bfc..dd0c68d 100644
--- a/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/widgets/linkandlabel/ActionLinkFactoryAbstract.java
+++ b/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/widgets/linkandlabel/ActionLinkFactoryAbstract.java
@@ -17,6 +17,8 @@
 
 package org.apache.isis.viewer.wicket.ui.components.widgets.linkandlabel;
 
+import java.util.concurrent.Callable;
+
 import org.apache.wicket.Application;
 import org.apache.wicket.ajax.AjaxRequestTarget;
 import org.apache.wicket.ajax.attributes.AjaxRequestAttributes;
@@ -27,6 +29,7 @@ import org.apache.wicket.request.IRequestHandler;
 
 import org.apache.isis.core.metamodel.adapter.ObjectAdapter;
 import org.apache.isis.core.metamodel.spec.feature.ObjectAction;
+import org.apache.isis.core.runtime.system.persistence.PersistenceSession;
 import org.apache.isis.viewer.wicket.model.links.LinkAndLabel;
 import org.apache.isis.viewer.wicket.model.models.ActionModel;
 import org.apache.isis.viewer.wicket.model.models.ActionPrompt;
@@ -70,8 +73,15 @@ public abstract class ActionLinkFactoryAbstract implements ActionLinkFactory {
                 else {
                     final ActionPromptProvider promptProvider = ActionPromptProvider.Util.getFrom(getPage());
                     final ActionPrompt actionPrompt = promptProvider.getActionPrompt();
-                    ActionPromptHeaderPanel titlePanel = new ActionPromptHeaderPanel(actionPrompt.getTitleId(),
-                            actionModel);
+                    final ActionPromptHeaderPanel titlePanel =
+                            PersistenceSession.ConcurrencyChecking.executeWithConcurrencyCheckingDisabled(
+                            new Callable<ActionPromptHeaderPanel>() {
+                                @Override
+                                public ActionPromptHeaderPanel call() throws Exception {
+                                    final String titleId = actionPrompt.getTitleId();
+                                    return new ActionPromptHeaderPanel(titleId, actionModel);
+                                }
+                            });
                     final ActionPanel actionPanel =
                             (ActionPanel) getComponentFactoryRegistry().createComponent(
                                     ComponentType.ACTION_PROMPT, actionPrompt.getContentId(), actionModel);

http://git-wip-us.apache.org/repos/asf/isis/blob/5c2b07de/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/widgets/valuechoices/ValueChoicesSelect2Panel.html
----------------------------------------------------------------------
diff --git a/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/widgets/valuechoices/ValueChoicesSelect2Panel.html b/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/widgets/valuechoices/ValueChoicesSelect2Panel.html
index 3270ec5..7971e56 100644
--- a/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/widgets/valuechoices/ValueChoicesSelect2Panel.html
+++ b/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/widgets/valuechoices/ValueChoicesSelect2Panel.html
@@ -27,14 +27,20 @@
             <div class="valueChoicesSelect2Panel scalarNameAndValueComponentType">
                 <div class="form-group" wicket:id="scalarIfRegular">
                     <label wicket:id="scalarName" class="scalarName control-label">[Label text]</label>
-                    <div class="scalarValueWrapper">
-                        <div class="choicesPlaceholder">
-                            <input wicket:id="scalarValue" type="hidden" class="choices input-sm select2-remote" style="width: 99.8%; padding: 0"/>
+                    <span class="scalarValueWrapper">
+                        <div class="scalarPlaceholder">
+                            <span class="scalarValueInput">
+                                <span class="editing">
+                                    <input wicket:id="scalarValue" type="hidden" class="choices input-sm select2-remote" style="width: 99.8%; padding: 0"/>
+                                        <a wicket:id="editProperty" href="#" class="edit fa fa-pencil-square-o"/>
+                                </span>
+                            </span>
                         </div>
                         <span wicket:id="feedback" class="help-block"></span>
                         <span wicket:id="associatedActionLinksBelow"></span>
-                    </div>
-                    <span wicket:id="associatedActionLinksRight"></span>
+                    </span>
+                    <span wicket:id="associatedActionLinksRight" class="associatedActionLinksRight"></span>
+                    <div class="clearfix"/>
                 </div>
                 <span wicket:id="scalarIfCompact"></span>
             </div>

http://git-wip-us.apache.org/repos/asf/isis/blob/5c2b07de/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/pages/bootstrap-overrides-flatly.css
----------------------------------------------------------------------
diff --git a/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/pages/bootstrap-overrides-flatly.css b/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/pages/bootstrap-overrides-flatly.css
index 626f843..1830f26 100644
--- a/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/pages/bootstrap-overrides-flatly.css
+++ b/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/pages/bootstrap-overrides-flatly.css
@@ -26,3 +26,8 @@
 .select2-container.select2-container-disabled .select2-choices {
     background-color: #ecf0f1;
 }
+
+.list-inline > li {
+    padding-left: 0px;
+    padding-right: 0px;
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/isis/blob/5c2b07de/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/pages/bootstrap-overrides.css
----------------------------------------------------------------------
diff --git a/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/pages/bootstrap-overrides.css b/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/pages/bootstrap-overrides.css
index f7b9487..4d7458f 100644
--- a/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/pages/bootstrap-overrides.css
+++ b/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/pages/bootstrap-overrides.css
@@ -467,6 +467,7 @@ span .fa {
 
 ul.additionalLinkList,
 div.additionalLinkList {
+    margin-right: -10px;
     padding-bottom: 10px;
 }
 
@@ -539,8 +540,8 @@ div.label-left label.control-label {
 }
 
 div.label-top label.control-label {
-    padding-left: 10px;
-    padding-bottom: 4px;
+    /*padding-left: 10px;*/
+    /*padding-bottom: 4px;*/
 }
 
 div.label-none label.control-label {
@@ -564,10 +565,10 @@ div.label-left.actions-right .scalarValueWrapper {
 
 div.label-top .scalarValueWrapper,
 div.label-none .scalarValueWrapper {
-    width: 99.5%;
+    /*width: 99.5%;*/
     display: block;
-    padding-left: 8px;
-    padding-right: 20px;
+    /*padding-left: 8px;*/
+    /*padding-right: 20px;*/
 }
 
 .modal-body div.label-top .scalarValueWrapper,
@@ -680,12 +681,17 @@ div.referencePanel.scalarNameAndValueComponentType {
 }
 
 .additionalLinks.pull-right {
-    margin-right: 5px;
+    /*margin-right: 5px;*/
 }
 
 .additionalLinks.pull-right div {
     display: inline-block;
-    margin-left: 5px;
+    /*margin-left: 5px;*/
+}
+
+.additionalLinks.pull-right div .additionalLinkListDropDown {
+    margin-left: 10px;
+    margin-right: 0px;
 }
 
 
@@ -774,3 +780,18 @@ tr.headers th form input {
 .propertyEditForm .additionalLinkList {
     display: none;
 }
+
+.choicesScalarValue {
+    width: 95%;
+    display: inline-block;
+}
+
+.associatedActionLinksRight .additionalLinkListDropDown {
+    padding-right: 10px;
+}
+
+.editing .edit {
+    padding-top: 2px;
+    float: right;
+    margin-bottom: 10px;
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/isis/blob/5c2b07de/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/pages/entity/EntityPage.java
----------------------------------------------------------------------
diff --git a/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/pages/entity/EntityPage.java b/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/pages/entity/EntityPage.java
index 89c6a88..26ab321 100644
--- a/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/pages/entity/EntityPage.java
+++ b/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/pages/entity/EntityPage.java
@@ -142,13 +142,16 @@ public class EntityPage extends PageAbstract {
             // the facet should always exist, in fact
             // just enough to ask for the metadata.
             // This will cause the current ObjectSpec to be updated as a side effect.
-            final Grid grid = facet.getGrid();
-//
-//            // if none, then fallback to invalidating entire cache
-//            // (this is the original LayoutMetadataFromJson behaviour)
-//            if(grid == null && !getDeploymentType().isProduction()) {
-//                getSpecificationLoader().invalidateCacheFor(objectAdapter.getObject());
-//            }
+
+            // if none, then fallback to invalidating entire cache
+            // (this is the original LayoutMetadataFromJson behaviour)
+            if(!getDeploymentType().isProduction()) {
+                getSpecificationLoader().invalidateCacheFor(objectAdapter.getObject());
+            }
+
+            // as a side-effect, this will update facets
+            final Grid unused = facet.getGrid();
+
         }
 
 


[08/13] isis git commit: ISIS-993: honour namedEscaped for property edit prompt.

Posted by da...@apache.org.
ISIS-993: honour namedEscaped for property edit prompt.


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

Branch: refs/heads/ISIS-993
Commit: 1841a12bb02fa30e6223eb65202c8dd2c9e07571
Parents: 5c2b07d
Author: Dan Haywood <da...@haywood-associates.co.uk>
Authored: Tue Feb 23 20:02:51 2016 +0000
Committer: Dan Haywood <da...@haywood-associates.co.uk>
Committed: Tue Feb 23 20:02:51 2016 +0000

----------------------------------------------------------------------
 .../actionprompt/ActionPromptHeaderPanel.java     | 18 +++++++++++++++---
 .../ui/components/property/PropertyEditPanel.java | 15 ++++++++++++---
 2 files changed, 27 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/isis/blob/1841a12b/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/actionprompt/ActionPromptHeaderPanel.java
----------------------------------------------------------------------
diff --git a/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/actionprompt/ActionPromptHeaderPanel.java b/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/actionprompt/ActionPromptHeaderPanel.java
index a18f658..b5fbf72 100644
--- a/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/actionprompt/ActionPromptHeaderPanel.java
+++ b/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/actionprompt/ActionPromptHeaderPanel.java
@@ -21,6 +21,8 @@ package org.apache.isis.viewer.wicket.ui.components.actionprompt;
 import org.apache.wicket.markup.html.basic.Label;
 import org.apache.wicket.model.AbstractReadOnlyModel;
 import org.apache.isis.core.metamodel.adapter.ObjectAdapter;
+import org.apache.isis.core.metamodel.facets.all.named.NamedFacet;
+import org.apache.isis.core.metamodel.spec.feature.ObjectAction;
 import org.apache.isis.viewer.wicket.model.models.ActionModel;
 import org.apache.isis.viewer.wicket.model.models.EntityModel;
 import org.apache.isis.viewer.wicket.ui.ComponentType;
@@ -40,12 +42,22 @@ public class ActionPromptHeaderPanel extends PanelAbstract<ActionModel> {
 
         getComponentFactoryRegistry().addOrReplaceComponent(this, ComponentType.ENTITY_ICON_AND_TITLE, new EntityModel(targetAdapter));
 
-        add(new Label(ID_ACTION_NAME, new AbstractReadOnlyModel<String>() {
+
+        final Label label = new Label(ID_ACTION_NAME, new AbstractReadOnlyModel<String>() {
             @Override
             public String getObject() {
-                return model.getActionMemento().getAction().getName();
+                final ObjectAction action = model.getActionMemento().getAction();
+                return action.getName();
             }
-        }));
+        });
+
+        final ObjectAction action = model.getActionMemento().getAction();
+        NamedFacet namedFacet = action.getFacet(NamedFacet.class);
+        if (namedFacet != null) {
+            label.setEscapeModelStrings(namedFacet.escaped());
+        }
+
+        add(label);
     }
 
 }

http://git-wip-us.apache.org/repos/asf/isis/blob/1841a12b/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/property/PropertyEditPanel.java
----------------------------------------------------------------------
diff --git a/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/property/PropertyEditPanel.java b/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/property/PropertyEditPanel.java
index 54043fc..0617a9a 100644
--- a/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/property/PropertyEditPanel.java
+++ b/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/property/PropertyEditPanel.java
@@ -37,9 +37,10 @@ import org.apache.isis.core.commons.authentication.MessageBroker;
 import org.apache.isis.core.metamodel.adapter.ObjectAdapter;
 import org.apache.isis.core.metamodel.adapter.mgr.AdapterManager;
 import org.apache.isis.core.metamodel.adapter.version.ConcurrencyException;
+import org.apache.isis.core.metamodel.facets.all.named.NamedFacet;
+import org.apache.isis.core.metamodel.spec.feature.OneToOneAssociation;
 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.models.ActionPrompt;
 import org.apache.isis.viewer.wicket.model.models.EntityModel;
 import org.apache.isis.viewer.wicket.model.models.ExecutingPanel;
 import org.apache.isis.viewer.wicket.model.models.ScalarModel;
@@ -102,8 +103,16 @@ public class PropertyEditPanel extends PanelAbstract<ScalarModel>
             getComponentFactoryRegistry().addOrReplaceComponent(this, ComponentType.PROPERTY_EDIT_FORM, getScalarModel());
             getComponentFactoryRegistry().addOrReplaceComponent(header, ComponentType.ENTITY_ICON_AND_TITLE, new EntityModel(targetAdapter));
 
-            final String propertyName = getScalarModel().getPropertyMemento().getProperty().getName();
-            header.add(new Label(ID_PROPERTY_NAME, Model.of(propertyName)));
+            final OneToOneAssociation property = getScalarModel().getPropertyMemento().getProperty();
+            final String propertyName = property.getName();
+            final Label label = new Label(ID_PROPERTY_NAME, Model.of(propertyName));
+
+            NamedFacet namedFacet = property.getFacet(NamedFacet.class);
+            if (namedFacet != null) {
+                label.setEscapeModelStrings(namedFacet.escaped());
+            }
+
+            header.add(label);
 
         } catch (final ConcurrencyException ex) {
 


[11/13] isis git commit: ISIS-993: yet more sorting out of positioning of actions in right drop-down.

Posted by da...@apache.org.
ISIS-993: yet more sorting out of positioning of actions in right drop-down.


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

Branch: refs/heads/ISIS-993
Commit: e4637ca801ef72c7861f4d0be1b69ad0c4fc5d6e
Parents: ce2ea3c
Author: Dan Haywood <da...@haywood-associates.co.uk>
Authored: Tue Feb 23 21:07:20 2016 +0000
Committer: Dan Haywood <da...@haywood-associates.co.uk>
Committed: Tue Feb 23 21:07:20 2016 +0000

----------------------------------------------------------------------
 .../org/apache/isis/viewer/wicket/ui/pages/bootstrap-overrides.css  | 1 +
 1 file changed, 1 insertion(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/isis/blob/e4637ca8/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/pages/bootstrap-overrides.css
----------------------------------------------------------------------
diff --git a/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/pages/bootstrap-overrides.css b/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/pages/bootstrap-overrides.css
index 729917e..c23d4da 100644
--- a/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/pages/bootstrap-overrides.css
+++ b/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/pages/bootstrap-overrides.css
@@ -809,6 +809,7 @@ tr.headers th form input {
     margin-top: 0px;
 }
 
+.valueChoicesSelect2Panel .actions-right .additionalLinkListInline,
 .referencePanel .actions-right .additionalLinkListInline,
 .isisBlobPanel .actions-right .additionalLinkListInline {
     margin-top: 5px;


[13/13] isis git commit: ISIS-1311: sorted out issue with Persistable mixins (return Long, not Object, otherwise trips up).

Posted by da...@apache.org.
ISIS-1311: sorted out issue with Persistable mixins (return Long, not Object, otherwise trips up).

Also, fixed issue with tables that were incorrectly showing the datanucleusId and datanucleusVersion because of how check for HiddenFacets against mixin associations.  Now generalized/improved the lookup of facet (had a different facetType key in the ObjectAssociationMixin compared to the underlying ObjectActionDefault).


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

Branch: refs/heads/ISIS-993
Commit: 4ccb9caa1293e3d0e4e5feb6f90319050692f42f
Parents: 34771c2
Author: Dan Haywood <da...@haywood-associates.co.uk>
Authored: Tue Feb 23 23:21:04 2016 +0000
Committer: Dan Haywood <da...@haywood-associates.co.uk>
Committed: Tue Feb 23 23:21:04 2016 +0000

----------------------------------------------------------------------
 .../isis/core/metamodel/facetapi/FacetUtil.java |  5 ++
 .../jdosupport/Persistable_datanucleusId.java   | 71 ++++++++++++++++++++
 .../Persistable_datanucleusVersion.java         | 64 ++++++++++++++++++
 .../spec/feature/ObjectAssociation.java         | 17 +++--
 4 files changed, 153 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/isis/blob/4ccb9caa/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facetapi/FacetUtil.java
----------------------------------------------------------------------
diff --git a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facetapi/FacetUtil.java b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facetapi/FacetUtil.java
index 8d9eb73..0c8b6d3 100644
--- a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facetapi/FacetUtil.java
+++ b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facetapi/FacetUtil.java
@@ -165,6 +165,11 @@ public final class FacetUtil {
     }
 
     public static void copyFacets(final FacetHolder source, final FacetHolder target) {
+        final Class<? extends Facet>[] facetTypes = source.getFacetTypes();
+        for (Class<? extends Facet> facetType : facetTypes) {
+            final Facet facet = source.getFacet(facetType);
+
+        }
         List<Facet> facets = source.getFacets(org.apache.isis.applib.filter.Filters.<Facet>any());
         for (Facet facet : facets) {
             target.addFacet(facet);

http://git-wip-us.apache.org/repos/asf/isis/blob/4ccb9caa/core/metamodel/src/main/java/org/apache/isis/core/metamodel/services/jdosupport/Persistable_datanucleusId.java
----------------------------------------------------------------------
diff --git a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/services/jdosupport/Persistable_datanucleusId.java b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/services/jdosupport/Persistable_datanucleusId.java
new file mode 100644
index 0000000..15a7296
--- /dev/null
+++ b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/services/jdosupport/Persistable_datanucleusId.java
@@ -0,0 +1,71 @@
+/*
+ *  Copyright 2015-2016 Eurocommercial Properties NV
+ *
+ *  Licensed 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.core.metamodel.services.jdosupport;
+
+import javax.jdo.JDOHelper;
+
+import org.datanucleus.enhancement.Persistable;
+import org.datanucleus.identity.DatastoreId;
+
+import org.apache.isis.applib.annotation.Action;
+import org.apache.isis.applib.annotation.ActionLayout;
+import org.apache.isis.applib.annotation.Contributed;
+import org.apache.isis.applib.annotation.MemberOrder;
+import org.apache.isis.applib.annotation.Mixin;
+import org.apache.isis.applib.annotation.PropertyLayout;
+import org.apache.isis.applib.annotation.SemanticsOf;
+import org.apache.isis.applib.annotation.Where;
+
+@Mixin
+public class Persistable_datanucleusId {
+
+    private final Persistable persistable;
+
+    public Persistable_datanucleusId(final Persistable persistable) {
+        this.persistable = persistable;
+    }
+
+    public static class ActionDomainEvent extends org.apache.isis.applib.IsisApplibModule.ActionDomainEvent<Persistable_datanucleusId> {}
+
+    @Action(
+            domainEvent = ActionDomainEvent.class,
+            semantics = SemanticsOf.SAFE
+    )
+    @ActionLayout(
+            contributed = Contributed.AS_ASSOCIATION
+    )
+    @PropertyLayout(
+            named = "Id",
+            hidden = Where.ALL_TABLES
+    )
+    @MemberOrder(name = "Metadata", sequence = "800.1")
+    public Long datanucleusId() {
+        final Object objectId = JDOHelper.getObjectId(persistable);
+        if(objectId instanceof DatastoreId) {
+            final DatastoreId datastoreId = (DatastoreId) objectId;
+            final Object id = datastoreId.getKeyAsObject();
+            return id != null && id instanceof Long ? (Long) id : null;
+        }
+        return null;
+    }
+
+    public boolean hideDatanucleusId() {
+        return datanucleusId() == null;
+    }
+
+
+}

http://git-wip-us.apache.org/repos/asf/isis/blob/4ccb9caa/core/metamodel/src/main/java/org/apache/isis/core/metamodel/services/jdosupport/Persistable_datanucleusVersion.java
----------------------------------------------------------------------
diff --git a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/services/jdosupport/Persistable_datanucleusVersion.java b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/services/jdosupport/Persistable_datanucleusVersion.java
new file mode 100644
index 0000000..083ba86
--- /dev/null
+++ b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/services/jdosupport/Persistable_datanucleusVersion.java
@@ -0,0 +1,64 @@
+/*
+ *  Copyright 2015-2016 Eurocommercial Properties NV
+ *
+ *  Licensed 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.core.metamodel.services.jdosupport;
+
+import javax.jdo.JDOHelper;
+
+import org.datanucleus.enhancement.Persistable;
+
+import org.apache.isis.applib.annotation.Action;
+import org.apache.isis.applib.annotation.ActionLayout;
+import org.apache.isis.applib.annotation.Contributed;
+import org.apache.isis.applib.annotation.MemberOrder;
+import org.apache.isis.applib.annotation.Mixin;
+import org.apache.isis.applib.annotation.PropertyLayout;
+import org.apache.isis.applib.annotation.SemanticsOf;
+import org.apache.isis.applib.annotation.Where;
+
+@Mixin
+public class Persistable_datanucleusVersion {
+
+    private final Persistable persistable;
+
+    public Persistable_datanucleusVersion(final Persistable persistable) {
+        this.persistable = persistable;
+    }
+
+    public static class ActionDomainEvent extends org.apache.isis.applib.IsisApplibModule.ActionDomainEvent<Persistable_datanucleusVersion> {}
+
+    @Action(
+            domainEvent = ActionDomainEvent.class,
+            semantics = SemanticsOf.SAFE
+    )
+    @ActionLayout(
+            contributed = Contributed.AS_ASSOCIATION
+    )
+    @PropertyLayout(
+            named = "Version",
+            hidden = Where.ALL_TABLES
+    )
+    @MemberOrder(name = "Metadata", sequence = "800.2")
+    public Long datanucleusVersion() {
+        final Object version = JDOHelper.getVersion(persistable);
+        return version != null && version instanceof Long ? (Long) version : null;
+    }
+
+    public boolean hideDatanucleusVersion() {
+        return datanucleusVersion() == null;
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/isis/blob/4ccb9caa/core/metamodel/src/main/java/org/apache/isis/core/metamodel/spec/feature/ObjectAssociation.java
----------------------------------------------------------------------
diff --git a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/spec/feature/ObjectAssociation.java b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/spec/feature/ObjectAssociation.java
index 50024dc..ae31903 100644
--- a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/spec/feature/ObjectAssociation.java
+++ b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/spec/feature/ObjectAssociation.java
@@ -36,6 +36,8 @@ import org.apache.isis.applib.filter.Filter;
 import org.apache.isis.core.metamodel.adapter.ObjectAdapter;
 import org.apache.isis.core.metamodel.consent.Consent;
 import org.apache.isis.core.metamodel.consent.InteractionInitiatedBy;
+import org.apache.isis.core.metamodel.facetapi.Facet;
+import org.apache.isis.core.metamodel.facets.WhenAndWhereValueFacet;
 import org.apache.isis.core.metamodel.facets.all.hide.HiddenFacet;
 import org.apache.isis.core.metamodel.facets.members.order.MemberOrderFacet;
 import org.apache.isis.core.metamodel.facets.object.membergroups.MemberGroupLayoutFacet;
@@ -351,11 +353,18 @@ public interface ObjectAssociation extends ObjectMember, CurrentHolder {
             return new Filter<ObjectAssociation>() {
                 @Override
                 public boolean accept(final ObjectAssociation association) {
-                    final HiddenFacet facet = association.getFacet(HiddenFacet.class);
-                    if(facet == null) {
-                        return true;
+                    final List<Facet> facets = association.getFacets(new Filter<Facet>() {
+                        @Override public boolean accept(final Facet facet) {
+                            return facet instanceof WhenAndWhereValueFacet && facet instanceof HiddenFacet;
+                        }
+                    });
+                    for (Facet facet : facets) {
+                        final WhenAndWhereValueFacet wawF = (WhenAndWhereValueFacet) facet;
+                        if (wawF.where().includes(context) && wawF.when() == When.ALWAYS) {
+                            return false;
+                        }
                     }
-                    return !(facet.where().includes(context) && facet.when() == When.ALWAYS);
+                    return true;
                 }
             };
         }


[06/13] isis git commit: ISIS-993: removing the fallback components also.

Posted by da...@apache.org.
ISIS-993: removing the fallback components also.


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

Branch: refs/heads/ISIS-993
Commit: e95a46fcbb71d94de906b0a421ede677f96db964
Parents: 6f435a1
Author: Dan Haywood <da...@haywood-associates.co.uk>
Authored: Wed Feb 17 17:27:40 2016 +0000
Committer: Dan Haywood <da...@haywood-associates.co.uk>
Committed: Wed Feb 17 17:27:40 2016 +0000

----------------------------------------------------------------------
 .../ComponentFactoryRegistrarDefault.java       |  4 --
 .../isis/viewer/wicket/ui/ComponentType.java    |  8 ---
 .../components/layout/EntityPanelFactory.java   | 49 ----------------
 .../layout/fallback/EntityEditablePanel.html    | 29 ----------
 .../layout/fallback/EntityEditablePanel.java    | 60 --------------------
 .../wicket/ui/pages/entity/EntityPage.java      | 12 ++--
 6 files changed, 6 insertions(+), 156 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/isis/blob/e95a46fc/core/viewer-wicket-impl/src/main/java/org/apache/isis/viewer/wicket/viewer/registries/components/ComponentFactoryRegistrarDefault.java
----------------------------------------------------------------------
diff --git a/core/viewer-wicket-impl/src/main/java/org/apache/isis/viewer/wicket/viewer/registries/components/ComponentFactoryRegistrarDefault.java b/core/viewer-wicket-impl/src/main/java/org/apache/isis/viewer/wicket/viewer/registries/components/ComponentFactoryRegistrarDefault.java
index 408a914..4ff06cf 100644
--- a/core/viewer-wicket-impl/src/main/java/org/apache/isis/viewer/wicket/viewer/registries/components/ComponentFactoryRegistrarDefault.java
+++ b/core/viewer-wicket-impl/src/main/java/org/apache/isis/viewer/wicket/viewer/registries/components/ComponentFactoryRegistrarDefault.java
@@ -45,7 +45,6 @@ import org.apache.isis.viewer.wicket.ui.components.entity.icontitle.EntityIconTi
 import org.apache.isis.viewer.wicket.ui.components.entity.selector.links.EntityLinksSelectorPanelFactory;
 import org.apache.isis.viewer.wicket.ui.components.footer.FooterPanelFactory;
 import org.apache.isis.viewer.wicket.ui.components.header.HeaderPanelFactory;
-import org.apache.isis.viewer.wicket.ui.components.layout.EntityPanelFactory;
 import org.apache.isis.viewer.wicket.ui.components.property.PropertyEditFormPanelFactory;
 import org.apache.isis.viewer.wicket.ui.components.property.PropertyEditPanelFactory;
 import org.apache.isis.viewer.wicket.ui.components.scalars.isisapplib.IsisBlobPanelFactory;
@@ -166,9 +165,6 @@ public class ComponentFactoryRegistrarDefault implements ComponentFactoryRegistr
 
     protected void addComponentFactoriesForEntity(final ComponentFactoryList componentFactories) {
 
-        // top-level
-        componentFactories.add(new EntityPanelFactory());
-
         // lower-level
         componentFactories.add(new EntityIconAndTitlePanelFactory());
         componentFactories.add(new EntityIconTitleAndCopyLinkPanelFactory());

http://git-wip-us.apache.org/repos/asf/isis/blob/e95a46fc/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/ComponentType.java
----------------------------------------------------------------------
diff --git a/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/ComponentType.java b/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/ComponentType.java
index b55e74e..7040bd9 100644
--- a/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/ComponentType.java
+++ b/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/ComponentType.java
@@ -69,14 +69,6 @@ public enum ComponentType {
      */
     ENTITY_SUMMARY,
     /**
-     * The set of properties for a single entity.
-     */
-    ENTITY_PROPERTIES,
-    /**
-     * The set of collections of a single entity, designed to be standalone outside of a form.
-     */
-    ENTITY_COLLECTIONS,
-    /**
      * A single standalone value, as might be returned from an action.
      */
     VALUE,

http://git-wip-us.apache.org/repos/asf/isis/blob/e95a46fc/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/layout/EntityPanelFactory.java
----------------------------------------------------------------------
diff --git a/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/layout/EntityPanelFactory.java b/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/layout/EntityPanelFactory.java
deleted file mode 100644
index 19db8ee..0000000
--- a/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/layout/EntityPanelFactory.java
+++ /dev/null
@@ -1,49 +0,0 @@
-/*
- *  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.layout;
-
-import org.apache.wicket.Component;
-import org.apache.wicket.model.IModel;
-
-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;
-import org.apache.isis.viewer.wicket.ui.components.entity.EntityComponentFactoryAbstract;
-import org.apache.isis.viewer.wicket.ui.components.layout.fallback.EntityEditablePanel;
-
-/**
- * {@link ComponentFactory} for {@link EntityEditablePanel}.
- */
-public class EntityPanelFactory extends EntityComponentFactoryAbstract {
-
-    private static final long serialVersionUID = 1L;
-
-    private static final String NAME = "tabbed";
-
-    public EntityPanelFactory() {
-        super(ComponentType.ENTITY, NAME, EntityEditablePanel.class);
-    }
-
-    @Override
-    public Component createComponent(final String id, final IModel<?> model) {
-        final EntityModel entityModel = (EntityModel) model;
-        return new EntityEditablePanel(id, entityModel);
-    }
-}

http://git-wip-us.apache.org/repos/asf/isis/blob/e95a46fc/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/layout/fallback/EntityEditablePanel.html
----------------------------------------------------------------------
diff --git a/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/layout/fallback/EntityEditablePanel.html b/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/layout/fallback/EntityEditablePanel.html
deleted file mode 100644
index 540bb11..0000000
--- a/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/layout/fallback/EntityEditablePanel.html
+++ /dev/null
@@ -1,29 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-  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.
--->
-<html xmlns:wicket="http://wicket.apache.org">
-<body>
-<wicket:panel>
-	<div class="entityCombined">
-        <div wicket:id="entitySummary"></div>
-		<div wicket:id="entityPropertiesAndCollections"></div>
-	</div>
-</wicket:panel>
-</body>
-</html>

http://git-wip-us.apache.org/repos/asf/isis/blob/e95a46fc/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/layout/fallback/EntityEditablePanel.java
----------------------------------------------------------------------
diff --git a/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/layout/fallback/EntityEditablePanel.java b/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/layout/fallback/EntityEditablePanel.java
deleted file mode 100644
index 4e892b5..0000000
--- a/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/layout/fallback/EntityEditablePanel.java
+++ /dev/null
@@ -1,60 +0,0 @@
-/*
- *  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.layout.fallback;
-
-import org.apache.isis.core.metamodel.adapter.ObjectAdapter;
-import org.apache.isis.core.metamodel.facets.members.cssclass.CssClassFacet;
-import org.apache.isis.viewer.wicket.model.models.EntityModel;
-import org.apache.isis.viewer.wicket.ui.ComponentType;
-import org.apache.isis.viewer.wicket.ui.panels.PanelAbstract;
-import org.apache.isis.viewer.wicket.ui.util.CssClassAppender;
-
-/**
- * {@link PanelAbstract Panel} to represent an entity on a single page made up
- * of several &lt;div&gt; regions.
- */
-public class EntityEditablePanel extends PanelAbstract<EntityModel> {
-
-    private static final long serialVersionUID = 1L;
-
-    private static final String ID_ENTITY_PROPERTIES_AND_COLLECTIONS = "entityPropertiesAndCollections";
-
-    
-    public EntityEditablePanel(final String id, final EntityModel entityModel) {
-        super(id, entityModel);
-        buildGui();
-    }
-
-    private void buildGui() {
-        final EntityModel model = getModel();
-        final ObjectAdapter objectAdapter = model.getObject();
-        final CssClassFacet facet = objectAdapter.getSpecification().getFacet(CssClassFacet.class);
-        if(facet != null) {
-            final String cssClass = facet.cssClass(objectAdapter);
-            CssClassAppender.appendCssClassTo(this, cssClass);
-        }
-
-        addOrReplace(ComponentType.ENTITY_SUMMARY, model);
-        
-        getComponentFactoryRegistry().addOrReplaceComponent(this, ID_ENTITY_PROPERTIES_AND_COLLECTIONS, ComponentType.ENTITY_PROPERTIES, model);
-    }
-
-
-}

http://git-wip-us.apache.org/repos/asf/isis/blob/e95a46fc/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/pages/entity/EntityPage.java
----------------------------------------------------------------------
diff --git a/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/pages/entity/EntityPage.java b/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/pages/entity/EntityPage.java
index b29bf94..89c6a88 100644
--- a/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/pages/entity/EntityPage.java
+++ b/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/pages/entity/EntityPage.java
@@ -143,12 +143,12 @@ public class EntityPage extends PageAbstract {
             // just enough to ask for the metadata.
             // This will cause the current ObjectSpec to be updated as a side effect.
             final Grid grid = facet.getGrid();
-
-            // if none, then fallback to invalidating entire cache
-            // (this is the original LayoutMetadataFromJson behaviour)
-            if(grid == null && !getDeploymentType().isProduction()) {
-                getSpecificationLoader().invalidateCacheFor(objectAdapter.getObject());
-            }
+//
+//            // if none, then fallback to invalidating entire cache
+//            // (this is the original LayoutMetadataFromJson behaviour)
+//            if(grid == null && !getDeploymentType().isProduction()) {
+//                getSpecificationLoader().invalidateCacheFor(objectAdapter.getObject());
+//            }
         }
 
 


[02/13] isis git commit: isis-993: deleting the original layout grids (including the first-cut fixed column stuff that preceded the bootstrap3 grids).

Posted by da...@apache.org.
http://git-wip-us.apache.org/repos/asf/isis/blob/69ed9c5e/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/layout/fixedcols/propsandcolls/EntityPropsAndCollsForm.java
----------------------------------------------------------------------
diff --git a/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/layout/fixedcols/propsandcolls/EntityPropsAndCollsForm.java b/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/layout/fixedcols/propsandcolls/EntityPropsAndCollsForm.java
deleted file mode 100644
index f8ba43d..0000000
--- a/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/layout/fixedcols/propsandcolls/EntityPropsAndCollsForm.java
+++ /dev/null
@@ -1,710 +0,0 @@
-/*
- *  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.layout.fixedcols.propsandcolls;
-
-import java.util.List;
-
-import org.apache.wicket.Component;
-import org.apache.wicket.MarkupContainer;
-import org.apache.wicket.Session;
-import org.apache.wicket.ajax.AjaxRequestTarget;
-import org.apache.wicket.ajax.attributes.AjaxRequestAttributes;
-import org.apache.wicket.ajax.markup.html.form.AjaxButton;
-import org.apache.wicket.feedback.ComponentFeedbackMessageFilter;
-import org.apache.wicket.markup.ComponentTag;
-import org.apache.wicket.markup.html.WebMarkupContainer;
-import org.apache.wicket.markup.html.basic.Label;
-import org.apache.wicket.markup.html.form.Button;
-import org.apache.wicket.markup.html.form.Form;
-import org.apache.wicket.markup.html.form.FormComponent;
-import org.apache.wicket.model.IModel;
-import org.apache.wicket.model.ResourceModel;
-import org.apache.wicket.request.Response;
-import org.apache.wicket.util.string.Strings;
-import org.apache.wicket.util.visit.IVisit;
-import org.apache.wicket.util.visit.IVisitor;
-
-import org.apache.isis.applib.annotation.MemberGroupLayout.ColumnSpans;
-import org.apache.isis.applib.annotation.Where;
-import org.apache.isis.applib.filter.Filter;
-import org.apache.isis.applib.filter.Filters;
-import org.apache.isis.core.metamodel.services.grid.fixedcols.applib.FCColumn;
-import org.apache.isis.core.metamodel.services.grid.fixedcols.applib.Hint;
-import org.apache.isis.core.metamodel.services.grid.fixedcols.applib.FCTab;
-import org.apache.isis.applib.services.exceprecog.ExceptionRecognizer;
-import org.apache.isis.applib.services.exceprecog.ExceptionRecognizerComposite;
-import org.apache.isis.core.commons.authentication.MessageBroker;
-import org.apache.isis.core.metamodel.adapter.ObjectAdapter;
-import org.apache.isis.core.metamodel.adapter.mgr.AdapterManager.ConcurrencyChecking;
-import org.apache.isis.core.metamodel.adapter.version.ConcurrencyException;
-import org.apache.isis.core.metamodel.consent.InteractionInitiatedBy;
-import org.apache.isis.core.metamodel.facets.object.membergroups.MemberGroupLayoutFacet;
-import org.apache.isis.core.metamodel.runtimecontext.ServicesInjector;
-import org.apache.isis.core.metamodel.spec.ObjectSpecification;
-import org.apache.isis.core.metamodel.spec.feature.Contributed;
-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.models.ActionPrompt;
-import org.apache.isis.viewer.wicket.model.models.ActionPromptProvider;
-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.layout.fixedcols.PropUtil;
-import org.apache.isis.viewer.wicket.ui.components.layout.fixedcols.columns.EntityColumn;
-import org.apache.isis.viewer.wicket.ui.components.widgets.formcomponent.CancelHintRequired;
-import org.apache.isis.viewer.wicket.ui.errors.JGrowlBehaviour;
-import org.apache.isis.viewer.wicket.ui.pages.entity.EntityPage;
-import org.apache.isis.viewer.wicket.ui.panels.FormAbstract;
-import org.apache.isis.viewer.wicket.ui.panels.IFormSubmitterWithPreValidateHook;
-import org.apache.isis.viewer.wicket.ui.util.Components;
-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 {
-
-    private static final long serialVersionUID = 1L;
-
-    private static final String ID_LEFT_COLUMN = "leftColumn";
-    private static final String ID_MIDDLE_COLUMN = "middleColumn";
-    private static final String ID_RIGHT_COLUMN = "rightColumn";
-
-    private static final String ID_ENTITY_COLUMN = "entityColumn";
-    private static final String ID_ENTITY_COLLECTIONS = "entityCollections";
-    private static final String ID_ENTITY_COLLECTIONS_OVERFLOW = "entityCollectionsOverflow";
-
-    private static final String ID_EDIT_BUTTON = "edit";
-    private static final String ID_OK_BUTTON = "ok";
-    private static final String ID_CANCEL_BUTTON = "cancel";
-
-    private static final String ID_FEEDBACK = "feedback";
-
-    private final Component owningPanel;
-
-    private Button editButton;
-    private Button okButton;
-    private Button cancelButton;
-
-    private NotificationPanel feedback;
-    
-
-    public EntityPropsAndCollsForm(
-            final String id,
-            final EntityModel entityModel,
-            final Component owningPanel) {
-
-        super(id, entityModel);
-        this.owningPanel = owningPanel; // for repainting
-
-        buildGui();
-        
-        // add any concurrency exception that might have been propagated into the entity model 
-        // as a result of a previous action invocation
-        final String concurrencyExceptionIfAny = entityModel.getAndClearConcurrencyExceptionIfAny();
-        if(concurrencyExceptionIfAny != null) {
-            error(concurrencyExceptionIfAny);
-        }
-    }
-
-    private void buildGui() {
-
-        final EntityModel entityModel = (EntityModel) getModel();
-        final FCTab FCTabMetaDataIfAny = (FCTab) entityModel.getLayoutMetadata();
-
-        final ColumnSpans columnSpans;
-        if(FCTabMetaDataIfAny != null) {
-            final FCColumn middle = FCTabMetaDataIfAny.getMiddle();
-            final FCColumn right = FCTabMetaDataIfAny.getRight();
-            columnSpans = ColumnSpans.asSpans(
-                    FCTabMetaDataIfAny.getLeft().getSpan(),
-                    middle != null? middle.getSpan(): 0,
-                    right != null? right.getSpan(): 0);
-        } else {
-            final MemberGroupLayoutFacet memberGroupLayoutFacet =
-                    entityModel.getObject().getSpecification().getFacet(MemberGroupLayoutFacet.class);
-            columnSpans = memberGroupLayoutFacet.getColumnSpans();
-        }
-
-        // left column
-        // (unlike middle and right columns, the left column is always added to hold the edit buttons and feedback)
-        MarkupContainer leftColumn = new WebMarkupContainer(ID_LEFT_COLUMN);
-        add(leftColumn);
-
-        if(columnSpans.getLeft() > 0) {
-            addPropertiesAndCollections(leftColumn, entityModel, FCTabMetaDataIfAny, Hint.LEFT);
-        } else {
-            Components.permanentlyHide(this, ID_LEFT_COLUMN);
-        }
-
-        // middle column
-        MarkupContainer middleColumn;
-        if(columnSpans.getMiddle() > 0) {
-            middleColumn = new WebMarkupContainer(ID_MIDDLE_COLUMN);
-            add(middleColumn);
-            addPropertiesAndCollections(middleColumn, entityModel, FCTabMetaDataIfAny, Hint.MIDDLE);
-        } else {
-            middleColumn = null;
-            Components.permanentlyHide(this, ID_MIDDLE_COLUMN);
-        }
-
-        // right column
-        MarkupContainer rightColumn;
-        if(columnSpans.getRight() > 0) {
-            rightColumn = new WebMarkupContainer(ID_RIGHT_COLUMN);
-            add(rightColumn);
-            addPropertiesAndCollections(rightColumn, entityModel, FCTabMetaDataIfAny, Hint.RIGHT);
-        } else {
-            rightColumn = null;
-            Components.permanentlyHide(this, ID_RIGHT_COLUMN);
-        }
-
-        // column spans
-        if(columnSpans.getLeft() > 0) {
-            addClassForSpan(leftColumn, Hint.LEFT.from(columnSpans));
-        }
-        if(columnSpans.getMiddle() > 0) {
-            addClassForSpan(middleColumn, Hint.MIDDLE.from(columnSpans));
-        }
-        if(columnSpans.getRight() > 0) {
-            addClassForSpan(rightColumn, Hint.RIGHT.from(columnSpans));
-        }
-
-        // edit buttons and feedback (not supported on tabbed view)
-        final Hint leftHint = Hint.LEFT;
-        final FCColumn leftColumnMetaDataIfAny = leftHint.from(FCTabMetaDataIfAny);
-        final boolean hasProperties = leftColumnMetaDataIfAny == null && !PropUtil
-                .propertyGroupNames(entityModel, leftHint, leftColumnMetaDataIfAny).isEmpty();
-        if (hasProperties) {
-            addButtons(leftColumn);
-            addFeedbackGui(leftColumn);
-
-        } else {
-            Components.permanentlyHide(leftColumn,
-                    ID_EDIT_BUTTON, ID_OK_BUTTON, ID_CANCEL_BUTTON,
-                    ID_FEEDBACK);
-        }
-
-
-        // collections (only if not being added to a tab)
-        if(FCTabMetaDataIfAny == null && columnSpans.getCollections() > 0) {
-            final String idCollectionsToShow;
-            final String idCollectionsToHide;
-            int collectionSpan;
-            if (columnSpans.exceedsRow())  {
-                idCollectionsToShow = ID_ENTITY_COLLECTIONS_OVERFLOW;
-                idCollectionsToHide = ID_ENTITY_COLLECTIONS;
-                collectionSpan = 12;
-            } else {
-                idCollectionsToShow = ID_ENTITY_COLLECTIONS;
-                idCollectionsToHide = ID_ENTITY_COLLECTIONS_OVERFLOW;
-                collectionSpan = columnSpans.getCollections();
-            }
-
-            final Component collectionsColumn =
-                    getComponentFactoryRegistry().addOrReplaceComponent(
-                            this, idCollectionsToShow, ComponentType.ENTITY_COLLECTIONS, entityModel);
-            addClassForSpan(collectionsColumn, collectionSpan);
-
-            Components.permanentlyHide(this, idCollectionsToHide);
-        } else {
-            Components.permanentlyHide(this, ID_ENTITY_COLLECTIONS);
-            Components.permanentlyHide(this, ID_ENTITY_COLLECTIONS_OVERFLOW);
-        }
-    }
-
-    private void addPropertiesAndCollections(
-            final MarkupContainer markupContainer,
-            final EntityModel entityModel,
-            final FCTab fcTabMetaDataIfAny,
-            final Hint hint) {
-        final FCColumn columnMetaDataIfAny = hint.from(fcTabMetaDataIfAny);
-
-        final EntityModel entityModelWithHints = entityModel.cloneWithLayoutMetadata(columnMetaDataIfAny);
-
-        final EntityColumn columnMembers =
-                new EntityColumn(ID_ENTITY_COLUMN, entityModelWithHints, hint);
-        markupContainer.add(columnMembers);
-    }
-
-
-    @Override
-    protected void onComponentTag(ComponentTag tag) {
-        super.onComponentTag(tag);
-
-        Attributes.addClass(tag, "form-horizontal");
-    }
-
-    @Override
-    public ActionPrompt getActionPrompt() {
-        return ActionPromptProvider.Util.getFrom(this).getActionPrompt();
-    }
-
-    abstract class AjaxButtonWithOnError extends AjaxButton {
-
-        public AjaxButtonWithOnError(String id, IModel<String> model) {
-            super(id, model);
-        }
-
-        @Override
-        protected void onError(AjaxRequestTarget target, Form<?> form) {
-            super.onError(target, form);
-            toEditMode(target);
-        }
-
-        /**
-         * Render the 'type' attribute even for invisible buttons to avoid
-         * <a href="https://github.com/twbs/bootlint/wiki/W007">Bootlint W007</a>
-         *
-         * @param tag The component tag to render
-         * @param response The response to write to
-         */
-        // TODO mgrigorov Move this to Wicket Bootstrap project
-        @Override
-        protected void renderPlaceholderTag(ComponentTag tag, Response response) {
-            String ns = Strings.isEmpty(tag.getNamespace()) ? null : tag.getNamespace() + ':';
-
-            response.write("<");
-            if (ns != null)
-            {
-                response.write(ns);
-            }
-            response.write(tag.getName());
-            response.write(" id=\"");
-            response.write(getAjaxRegionMarkupId());
-
-            String type = tag.getAttribute("type");
-            if (!Strings.isEmpty(type)) {
-                response.write("\" type=\""+type);
-            }
-
-            response.write("\" style=\"display:none\"></");
-            if (ns != null)
-            {
-                response.write(ns);
-            }
-            response.write(tag.getName());
-            response.write(">");
-        }
-    }
-
-    public class AjaxButtonForValidate extends AjaxButtonWithOnError implements IFormSubmitterWithPreValidateHook {
-        private static final long serialVersionUID = 1L;
-        public AjaxButtonForValidate(String id, IModel<String> model) {
-            super(id, model);
-        }
-
-        @Override
-        public String preValidate() {
-            // attempt to load with concurrency checking, catching recognized exceptions
-            try {
-                getEntityModel().load(ConcurrencyChecking.CHECK); // could have also just called #getObject(), since CHECK is the default
-
-            } catch(ConcurrencyException ex){
-                String recognizedErrorMessage = recognizeException(ex);
-                if(recognizedErrorMessage == null) {
-                    throw ex;
-                }
-
-                // reload
-                getEntityModel().load(ConcurrencyChecking.NO_CHECK);
-
-                getForm().clearInput();
-                getEntityModel().resetPropertyModels();
-
-                toViewMode(null);
-                toEditMode(null);
-
-                return recognizedErrorMessage;
-            }
-
-            return null;
-        }
-
-        @Override
-        public void validate() {
-            // add in any error message that we might have recognized from above
-            EntityPropsAndCollsForm form = EntityPropsAndCollsForm.this;
-            String preValidationErrorIfAny = form.getPreValidationErrorIfAny();
-
-            if(preValidationErrorIfAny != null) {
-                feedbackOrNotifyAnyRecognizedError(preValidationErrorIfAny, form);
-                // skip validation, because would relate to old values
-
-                final EntityPage entityPage = new EntityPage(EntityPropsAndCollsForm.this.getModelObject(), null);
-                EntityPropsAndCollsForm.this.setResponsePage(entityPage);
-            } else {
-                // run Wicket's validation
-                super.validate();
-            }
-        }
-
-        @Override
-        protected void onSubmit(AjaxRequestTarget target, Form<?> form) {
-
-            if (getForm().hasError()) {
-                // stay in edit mode
-                return;
-            }
-
-            doPreApply();
-            if (applyFormChangesElse(target)) return;
-            final Object redirectIfAny = doPostApply();
-
-            if (flushChangesElse(target)) return;
-
-
-            getEntityModel().resetPropertyModels();
-
-            toViewMode(null);
-
-            // "redirect-after-post"
-            //
-            // RequestCycle.get().getActiveRequestHandler() indicates this is handled by the ListenerInterfaceRequestHandler
-            // which renders page at end.
-            //
-            // it's necessary to zap the page parameters (so mapping is to just wicket/page?nn)
-            // otherwise (what I think happens) is that the httpServletResponse.sendRedirect ends up being to the same URL,
-            // and this is rejected as invalid either by the browser or by the servlet container (perhaps only if running remotely).
-            //
-
-            final ObjectAdapter objectAdapter;
-            if(redirectIfAny != null) {
-                objectAdapter = getPersistenceSession().adapterFor(redirectIfAny);
-            } else {
-                // we obtain the adapter from the entity model because (if a view model) then the entity model may contain
-                // a different adapter (the cloned view model) to the one with which we started with.
-                objectAdapter = getEntityModel().getObjectAdapterMemento().getObjectAdapter(ConcurrencyChecking.NO_CHECK);
-            }
-
-            final EntityPage entityPage = new EntityPage(objectAdapter, null);
-            EntityPropsAndCollsForm.this.setResponsePage(entityPage);
-        }
-
-        /**
-         * Optional hook to override.
-         *
-         * <p>
-         * If a non-null value is returned, then transition to it (ie eg the finish() transition for a wizard).
-         * </p>
-         */
-        protected void doPreApply() {
-        }
-
-        /**
-         * Optional hook to override.
-         *
-         * <p>
-         * If a non-null value is returned, then transition to it (ie eg the finish() transition for a wizard).
-         * </p>
-         */
-        protected Object doPostApply() {
-            return null;
-        }
-
-    }
-
-    abstract class AjaxButtonForCancel extends AjaxButtonWithOnError {
-
-        public AjaxButtonForCancel(String id, IModel<String> model) {
-            super(id, model);
-            setDefaultFormProcessing(false);
-        }
-    }
-
-
-    private void addButtons(MarkupContainer markupContainer) {
-
-        // edit button
-        editButton = new AjaxButtonWithOnError(ID_EDIT_BUTTON, new ResourceModel("editLabel")) {
-            private static final long serialVersionUID = 1L;
-
-            @Override
-            public void validate() {
-
-                // same logic as in cancelButton; should this be factored out?
-                try {
-                    getEntityModel().load(ConcurrencyChecking.CHECK);
-                } catch(ConcurrencyException ex) {
-                    getMessageBroker().addMessage("Object changed by " + ex.getOid().getVersion().getUser() + ", automatically reloading");
-                    getEntityModel().load(ConcurrencyChecking.NO_CHECK);
-                }
-                
-                super.validate();
-            }
-            
-            @Override
-            public void onSubmit(final AjaxRequestTarget target, final Form<?> form) {
-                getEntityModel().resetPropertyModels();
-                toEditMode(target);
-            }
-
-            @Override
-            protected void updateAjaxAttributes(AjaxRequestAttributes attributes) {
-                super.updateAjaxAttributes(attributes);
-                attributes.getAjaxCallListeners().add(new org.apache.wicket.ajax.attributes.AjaxCallListener(){
-
-                    private static final long serialVersionUID = 1L;
-
-                    @Override
-                    public CharSequence getSuccessHandler(Component component) {
-                        // scroll to the top of the entity panel
-                        return "$('html, body').animate({"
-                               + "        scrollTop: $('.entityIconAndTitlePanel').offset().top"
-                               + "    }, 1000);";
-                    }
-                });
-            }
-        };
-        editButton.add(new Label("editLabel", editButton.getModel()));
-        markupContainer.add(editButton);
-
-
-        // ok button
-        okButton = new AjaxButtonForValidate(ID_OK_BUTTON, new ResourceModel("okLabel"));
-        markupContainer.add(okButton);
-
-
-        // cancel button
-        cancelButton = new AjaxButtonForCancel(ID_CANCEL_BUTTON, new ResourceModel("cancelLabel")) {
-            private static final long serialVersionUID = 1L;
-            
-            @Override
-            public void validate() {
-
-                // same logic as in editButton; should this be factored out?
-                try {
-                    getEntityModel().load(ConcurrencyChecking.CHECK);
-                } catch(ConcurrencyException ex) {
-                    getMessageBroker().addMessage("Object changed by " + ex.getOid().getVersion().getUser() + ", automatically reloading");
-                    getEntityModel().load(ConcurrencyChecking.NO_CHECK);
-                }
-                super.validate();
-            }
-            
-            @Override
-            protected void onSubmit(final AjaxRequestTarget target, final Form<?> form) {
-                Session.get().getFeedbackMessages().clear();
-                getForm().clearInput();
-                getForm().visitFormComponentsPostOrder(new IVisitor<FormComponent<?>, Void>() {
-
-                    @Override
-                    public void component(FormComponent<?> formComponent, IVisit<Void> visit) {
-                        if (formComponent instanceof CancelHintRequired) {
-                            final CancelHintRequired cancelHintRequired = (CancelHintRequired) formComponent;
-                            cancelHintRequired.onCancel();
-                        }
-                    }
-                });
-
-                try {
-                    getEntityModel().resetPropertyModels();
-                } catch(RuntimeException ex) {
-                    throw ex;
-                }
-                toViewMode(target);
-            }
-        };
-
-        markupContainer.add(cancelButton);
-
-        okButton.setOutputMarkupPlaceholderTag(true);
-        editButton.setOutputMarkupPlaceholderTag(true);
-        cancelButton.setOutputMarkupPlaceholderTag(true);
-        
-        // flush any JGrowl messages (typically concurrency exceptions) if they are added.
-        okButton.add(new JGrowlBehaviour());
-        editButton.add(new JGrowlBehaviour());
-        cancelButton.add(new JGrowlBehaviour());
-    }
-
-    // to perform object-level validation, we must apply the changes first
-    // contrast this with ActionPanel (for validating actionarguments) where
-    // we do the validation prior to the execution of the action
-    private boolean applyFormChangesElse(AjaxRequestTarget target) {
-        final ObjectAdapter adapter = getEntityModel().getObject();
-        final Memento snapshotToRollbackToIfInvalid = new Memento(adapter);
-
-        getEntityModel().apply();
-        final String invalidReasonIfAny = getEntityModel().getReasonInvalidIfAny();
-        if (invalidReasonIfAny != null) {
-            error(invalidReasonIfAny);
-            snapshotToRollbackToIfInvalid.recreateObject();
-            toEditMode(target);
-
-            // abort otherwise the object will have been dirtied and JDO will end up committing,
-            // possibly bumping the version and resulting in a subsequent concurrency exception.
-            IsisContext.getTransactionManager().abortTransaction();
-            return true;
-        }
-        return false;
-    }
-
-    private boolean flushChangesElse(AjaxRequestTarget target) {
-        try {
-            this.getTransactionManager().flushTransaction();
-        } catch(RuntimeException ex) {
-
-            // There's no need to abort the transaction here, as it will have already been done
-            // (in IsisTransactionManager#executeWithinTransaction(...)).
-
-            String message = recognizeExceptionAndNotify(ex, this);
-            if(message == null) {
-                throw ex;
-            }
-
-            toEditMode(target);
-            return true;
-        }
-        return false;
-    }
-
-
-    private String recognizeExceptionAndNotify(RuntimeException ex, Component feedbackComponentIfAny) {
-        
-        // see if the exception is recognized as being a non-serious error
-        
-        String recognizedErrorMessageIfAny = recognizeException(ex);
-        feedbackOrNotifyAnyRecognizedError(recognizedErrorMessageIfAny, feedbackComponentIfAny);
-
-        return recognizedErrorMessageIfAny;
-    }
-
-    private void feedbackOrNotifyAnyRecognizedError(String recognizedErrorMessageIfAny, Component feedbackComponentIfAny) {
-        if(recognizedErrorMessageIfAny == null) {
-            return;
-        }
-        
-        if(feedbackComponentIfAny != null) {
-            feedbackComponentIfAny.error(recognizedErrorMessageIfAny);
-        }
-        getMessageBroker().addWarning(recognizedErrorMessageIfAny);
-
-        // we clear the abort cause because we've handled rendering the exception
-        getTransactionManager().getTransaction().clearAbortCause();
-    }
-
-    private String recognizeException(RuntimeException ex) {
-        
-        // REVIEW: this code is similar to stuff in EntityPropertiesForm, perhaps move up to superclass?
-        // REVIEW: similar code also in WebRequestCycleForIsis; combine?
-        
-        final List<ExceptionRecognizer> exceptionRecognizers = getServicesInjector().lookupServices(ExceptionRecognizer.class);
-        final String message = new ExceptionRecognizerComposite(exceptionRecognizers).recognize(ex);
-        return message;
-    }
-
-    private void requestRepaintPanel(final AjaxRequestTarget target) {
-        if (target != null) {
-            target.add(owningPanel);
-            // TODO: is it necessary to add these too?
-            target.add(editButton, okButton, cancelButton, feedback);
-        }
-    }
-
-    private EntityModel getEntityModel() {
-        return (EntityModel) getModel();
-    }
-
-    void toViewMode(final AjaxRequestTarget target) {
-
-        getEntityModel().toViewMode();
-
-        setVisible(editButton, isAnythingEditable());
-        setVisible(okButton, false);
-        setVisible(cancelButton, false);
-
-        requestRepaintPanel(target);
-    }
-
-    private void setVisible(Button b, boolean editable) {
-        if(b != null) {
-            b.setVisible(editable);
-        }
-    }
-
-    private boolean isAnythingEditable() {
-        final EntityModel entityModel = (EntityModel) getModel();
-        final ObjectAdapter adapter = entityModel.getObject();
-
-        return !enabledAssociations(adapter, adapter.getSpecification()).isEmpty();
-    }
-    
-    private List<ObjectAssociation> enabledAssociations(final ObjectAdapter adapter, final ObjectSpecification objSpec) {
-        return objSpec.getAssociations(Contributed.EXCLUDED, enabledAssociationFilter(adapter));
-    }
-
-    @SuppressWarnings("unchecked")
-    private Filter<ObjectAssociation> enabledAssociationFilter(final ObjectAdapter adapter) {
-        return Filters.and(ObjectAssociation.Filters.PROPERTIES, ObjectAssociation.Filters.enabled(adapter,
-                InteractionInitiatedBy.USER, Where.OBJECT_FORMS
-        ));
-    }
-
-    private void toEditMode(final AjaxRequestTarget target) {
-        getEntityModel().toEditMode();
-
-        editButton.setVisible(false);
-        okButton.setVisible(true);
-        cancelButton.setVisible(true);
-
-        requestRepaintPanel(target);
-    }
-
-    private void addFeedbackGui(final MarkupContainer markupContainer) {
-        feedback = new NotificationPanel(ID_FEEDBACK, this, new ComponentFeedbackMessageFilter(this));
-        feedback.setOutputMarkupPlaceholderTag(true);
-        markupContainer.addOrReplace(feedback);
-
-        // to avoid potential XSS attacks, no longer escape model strings
-        // (risk is low but could just happen: error message being rendered might accidentally or deliberately contain rogue Javascript)
-        // feedback.setEscapeModelStrings(false);
-
-        final ObjectAdapter adapter = getEntityModel().getObject();
-        if (adapter == null) {
-            feedback.error("cannot locate object:" + getEntityModel().getObjectAdapterMemento().toString());
-        }
-    }
-
-    
-    static void addClassForSpan(final Component component, final int numGridCols) {
-        component.add(new CssClassAppender("col-xs-"+numGridCols));
-    }
-
-
-
-    ///////////////////////////////////////////////////////
-    // Dependencies (from context)
-    ///////////////////////////////////////////////////////
-    
-    protected IsisTransactionManager getTransactionManager() {
-        return IsisContext.getTransactionManager();
-    }
-
-    protected ServicesInjector getServicesInjector() {
-        return IsisContext.getPersistenceSession().getServicesInjector();
-    }
-
-    protected MessageBroker getMessageBroker() {
-        return getAuthenticationSession().getMessageBroker();
-    }
-
-
-}

http://git-wip-us.apache.org/repos/asf/isis/blob/69ed9c5e/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/layout/fixedcols/propsandcolls/EntityPropsAndCollsForm.properties
----------------------------------------------------------------------
diff --git a/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/layout/fixedcols/propsandcolls/EntityPropsAndCollsForm.properties b/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/layout/fixedcols/propsandcolls/EntityPropsAndCollsForm.properties
deleted file mode 100644
index 71edcd9..0000000
--- a/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/layout/fixedcols/propsandcolls/EntityPropsAndCollsForm.properties
+++ /dev/null
@@ -1,22 +0,0 @@
-#
-#  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.
-#
-
-okLabel=OK
-cancelLabel=Cancel
-editLabel=Edit

http://git-wip-us.apache.org/repos/asf/isis/blob/69ed9c5e/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/layout/fixedcols/propsandcolls/EntityPropsAndCollsPanel.html
----------------------------------------------------------------------
diff --git a/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/layout/fixedcols/propsandcolls/EntityPropsAndCollsPanel.html b/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/layout/fixedcols/propsandcolls/EntityPropsAndCollsPanel.html
deleted file mode 100644
index 449f18d..0000000
--- a/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/layout/fixedcols/propsandcolls/EntityPropsAndCollsPanel.html
+++ /dev/null
@@ -1,54 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-  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.
--->
-<html xmlns:wicket="http://wicket.apache.org">
-    <body>
-        <wicket:panel>
-            <div class="entityPropertiesPanel entityPropertiesComponentType">
-                <!-- EntityPropsAndCollsForm:start -->
-                <form wicket:id="entityForm" class="inputForm" role="form">
-                    <div class="row">
-                        <div wicket:id="leftColumn">
-                            <div wicket:id="entityColumn"/>
-                            <div class="feedbackPanel">
-                                <span wicket:id="feedback"></span>
-                            </div>
-                            <div class="buttons">
-                                <button type="submit" class="edit btn btn-primary btn-md" wicket:id="edit"><span class="fa fa-edit"></span> <wicket:container wicket:id="editLabel"></wicket:container></button>
-                                <input type="submit" class="ok btn btn-primary btn-md" wicket:id="ok"/>
-                                <input type="submit" class="cancel btn btn-default btn-md" wicket:id="cancel"/>
-                            </div>
-                        </div>
-                        <div wicket:id="middleColumn">
-                            <div wicket:id="entityColumn"/>
-                        </div>
-                        <div wicket:id="rightColumn">
-                            <div wicket:id="entityColumn"/>
-                        </div>
-                        <div wicket:id="entityCollections"></div>
-                    </div>
-                    <div class="row">
-                        <div wicket:id="entityCollectionsOverflow"></div>
-                    </div>
-                </form>
-                <!-- EntityPropsAndCollsForm:end -->
-            </div>
-        </wicket:panel>
-    </body>
-</html>

http://git-wip-us.apache.org/repos/asf/isis/blob/69ed9c5e/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/layout/fixedcols/propsandcolls/EntityPropsAndCollsPanel.java
----------------------------------------------------------------------
diff --git a/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/layout/fixedcols/propsandcolls/EntityPropsAndCollsPanel.java b/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/layout/fixedcols/propsandcolls/EntityPropsAndCollsPanel.java
deleted file mode 100644
index 82745c1..0000000
--- a/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/layout/fixedcols/propsandcolls/EntityPropsAndCollsPanel.java
+++ /dev/null
@@ -1,67 +0,0 @@
-/*
- *  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.layout.fixedcols.propsandcolls;
-
-import org.apache.isis.core.metamodel.adapter.ObjectAdapter;
-import org.apache.isis.viewer.wicket.model.models.EntityModel;
-import org.apache.isis.viewer.wicket.ui.components.layout.fallback.EntityEditablePanel;
-import org.apache.isis.viewer.wicket.ui.components.layout.fixedcols.FCGridPanel;
-import org.apache.isis.viewer.wicket.ui.panels.PanelAbstract;
-
-/**
- * {@link PanelAbstract Panel} representing the properties and collections of an entity, as per
- * the provided {@link EntityModel}.
- * 
- * <p>
- *     Used by both {@link FCGridPanel} and also {@link EntityEditablePanel}.  In the former
- *     case the collections are never shown, and edit buttons suppressed. In the latter case the
- *     collections are shown, possibly overflowing to region below.
- * </p>
- */
-public class EntityPropsAndCollsPanel extends PanelAbstract<EntityModel> {
-
-    private static final long serialVersionUID = 1L;
-
-    private static final String ID_ENTITY_FORM = "entityForm";
-
-    private EntityPropsAndCollsForm form;
-
-    public EntityPropsAndCollsPanel(final String id, final EntityModel entityModel) {
-        super(id, entityModel);
-        buildGui();
-        form.toViewMode(null);
-    }
-
-    private void buildGui() {
-        buildEntityPropertiesAndOrCollectionsGui();
-        setOutputMarkupId(true);
-    }
-
-    private void buildEntityPropertiesAndOrCollectionsGui() {
-        final EntityModel model = getModel();
-        final ObjectAdapter adapter = model.getObject();
-        if (adapter != null) {
-            form = new EntityPropsAndCollsForm(ID_ENTITY_FORM, model, this);
-            addOrReplace(form);
-        } else {
-            permanentlyHide(ID_ENTITY_FORM);
-        }
-    }
-}

http://git-wip-us.apache.org/repos/asf/isis/blob/69ed9c5e/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/layout/fixedcols/propsandcolls/EntityPropsAndCollsPanelFactory.java
----------------------------------------------------------------------
diff --git a/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/layout/fixedcols/propsandcolls/EntityPropsAndCollsPanelFactory.java b/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/layout/fixedcols/propsandcolls/EntityPropsAndCollsPanelFactory.java
deleted file mode 100644
index d8e7f11..0000000
--- a/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/layout/fixedcols/propsandcolls/EntityPropsAndCollsPanelFactory.java
+++ /dev/null
@@ -1,53 +0,0 @@
-/*
- *  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.layout.fixedcols.propsandcolls;
-
-import org.apache.wicket.Component;
-import org.apache.wicket.model.IModel;
-
-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;
-import org.apache.isis.viewer.wicket.ui.components.entity.EntityComponentFactoryAbstract;
-import org.apache.isis.viewer.wicket.ui.components.layout.fallback.EntityEditablePanel;
-import org.apache.isis.viewer.wicket.ui.components.layout.fixedcols.FCGridPanel;
-
-/**
- * {@link ComponentFactory} for {@link EntityPropsAndCollsPanel}.
- *
- *
- * <p>
- *     Used by both {@link EntityEditablePanel} and also {@link FCGridPanel}.
- * </p>
- */
-public class EntityPropsAndCollsPanelFactory extends EntityComponentFactoryAbstract {
-
-    private static final long serialVersionUID = 1L;
-
-    public EntityPropsAndCollsPanelFactory() {
-        super(ComponentType.ENTITY_PROPERTIES, EntityPropsAndCollsPanel.class);
-    }
-
-    @Override
-    public Component createComponent(final String id, final IModel<?> model) {
-        final EntityModel entityModel = (EntityModel) model;
-        return new EntityPropsAndCollsPanel(id, entityModel);
-    }
-}

http://git-wip-us.apache.org/repos/asf/isis/blob/69ed9c5e/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/layout/fixedcols/tabgrouplist/TabGroupListPanel.html
----------------------------------------------------------------------
diff --git a/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/layout/fixedcols/tabgrouplist/TabGroupListPanel.html b/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/layout/fixedcols/tabgrouplist/TabGroupListPanel.html
deleted file mode 100644
index 6699518..0000000
--- a/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/layout/fixedcols/tabgrouplist/TabGroupListPanel.html
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-  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.
--->
-<html xmlns:wicket="http://wicket.apache.org">
-<body>
-<wicket:panel>
-    <div wicket:id="tabGroups">
-        <div wicket:id="tabGroup">[tabbed panel will be here]</div>
-    </div>
-</wicket:panel>
-</body>
-</html>

http://git-wip-us.apache.org/repos/asf/isis/blob/69ed9c5e/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/layout/fixedcols/tabgrouplist/TabGroupListPanel.java
----------------------------------------------------------------------
diff --git a/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/layout/fixedcols/tabgrouplist/TabGroupListPanel.java b/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/layout/fixedcols/tabgrouplist/TabGroupListPanel.java
deleted file mode 100644
index f95d8db..0000000
--- a/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/layout/fixedcols/tabgrouplist/TabGroupListPanel.java
+++ /dev/null
@@ -1,67 +0,0 @@
-/*
- *  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.layout.fixedcols.tabgrouplist;
-
-import java.util.List;
-
-import org.apache.wicket.markup.html.list.ListItem;
-import org.apache.wicket.markup.html.list.ListView;
-
-import org.apache.isis.core.metamodel.services.grid.fixedcols.applib.FCTabGroup;
-import org.apache.isis.viewer.wicket.model.models.EntityModel;
-import org.apache.isis.viewer.wicket.ui.components.layout.fixedcols.tabs.TabGroupPanel;
-import org.apache.isis.viewer.wicket.ui.panels.PanelAbstract;
-
-public class TabGroupListPanel extends PanelAbstract<EntityModel> {
-
-    private static final long serialVersionUID = 1L;
-
-    private static final String ID_TAB_GROUPS = "tabGroups";
-
-    // the view metadata
-    private final List<FCTabGroup> tabGroups;
-
-    public TabGroupListPanel(final String id, final EntityModel entityModel) {
-        super(id, entityModel);
-
-        this.tabGroups = (List<FCTabGroup>) entityModel.getLayoutMetadata();
-
-        buildGui();
-    }
-
-    private void buildGui() {
-        final EntityModel model = getModel();
-
-        final ListView<FCTabGroup> tabGroupsList = new ListView<FCTabGroup>(ID_TAB_GROUPS, this.tabGroups) {
-
-            @Override
-            protected void populateItem(final ListItem<FCTabGroup> item) {
-
-                final FCTabGroup tabGroup = item.getModelObject();
-                final EntityModel entityModelWithHints = model.cloneWithLayoutMetadata(tabGroup);
-                final TabGroupPanel tabGroupPanel = new TabGroupPanel(entityModelWithHints);
-                item.add(tabGroupPanel);
-            }
-        };
-
-        add(tabGroupsList);
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/isis/blob/69ed9c5e/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/layout/fixedcols/tabs/TabGroupPanel.java
----------------------------------------------------------------------
diff --git a/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/layout/fixedcols/tabs/TabGroupPanel.java b/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/layout/fixedcols/tabs/TabGroupPanel.java
deleted file mode 100644
index 77c90c1..0000000
--- a/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/layout/fixedcols/tabs/TabGroupPanel.java
+++ /dev/null
@@ -1,105 +0,0 @@
-/*
- *  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.layout.fixedcols.tabs;
-
-import java.util.List;
-
-import com.google.common.collect.FluentIterable;
-import com.google.common.collect.Lists;
-
-import org.apache.wicket.extensions.markup.html.tabs.AbstractTab;
-import org.apache.wicket.extensions.markup.html.tabs.ITab;
-import org.apache.wicket.extensions.markup.html.tabs.TabbedPanel;
-import org.apache.wicket.markup.html.panel.Panel;
-import org.apache.wicket.model.Model;
-
-import org.apache.isis.core.metamodel.services.grid.fixedcols.applib.FCTab;
-import org.apache.isis.core.metamodel.services.grid.fixedcols.applib.FCTabGroup;
-import org.apache.isis.viewer.wicket.model.models.EntityModel;
-import org.apache.isis.viewer.wicket.model.util.ScopedSessionAttribute;
-
-import de.agilecoders.wicket.core.markup.html.bootstrap.tabs.AjaxBootstrapTabbedPanel;
-
-public class TabGroupPanel extends AjaxBootstrapTabbedPanel {
-
-    public static final String SESSION_ATTR_SELECTED_TAB = "selectedTab";
-
-    private final EntityModel entityModel;
-    // the view metadata
-    private final FCTabGroup tabGroup;
-
-    private final ScopedSessionAttribute<Integer> selectedTabInSession;
-
-    private static final String ID_TAB_GROUP = "tabGroup";
-
-    private static List<ITab> tabsFor(final EntityModel entityModel) {
-        final List<ITab> tabs = Lists.newArrayList();
-
-        final FCTabGroup tabGroup = (FCTabGroup) entityModel.getLayoutMetadata();
-        final List<FCTab> FCTabList = FluentIterable
-                .from(tabGroup.getTabs())
-                .filter(FCTab.Predicates.notEmpty())
-                .toList();
-
-        for (final FCTab fcTab : FCTabList) {
-            tabs.add(new AbstractTab(Model.of(fcTab.getName())) {
-                private static final long serialVersionUID = 1L;
-
-                @Override
-                public Panel getPanel(String panelId) {
-                    return new TabPanel(panelId, entityModel, fcTab);
-                }
-            });
-        }
-        return tabs;
-    }
-
-    public TabGroupPanel(final EntityModel entityModel) {
-        super(ID_TAB_GROUP, tabsFor(entityModel));
-
-        this.entityModel = entityModel;
-        this.tabGroup = (FCTabGroup) entityModel.getLayoutMetadata();
-        this.selectedTabInSession = ScopedSessionAttribute.create(entityModel, this, SESSION_ATTR_SELECTED_TAB);
-
-    }
-
-    @Override
-    protected void onInitialize() {
-        setSelectedTabFromSessionIfAny(this);
-        super.onInitialize();
-    }
-
-    @Override
-    public TabbedPanel setSelectedTab(final int index) {
-        selectedTabInSession.set(index);
-        return super.setSelectedTab(index);
-    }
-
-    private void setSelectedTabFromSessionIfAny(
-            final AjaxBootstrapTabbedPanel ajaxBootstrapTabbedPanel) {
-        final Integer tabIndex = selectedTabInSession.get();
-        if (tabIndex != null) {
-            final int numTabs = ajaxBootstrapTabbedPanel.getTabs().size();
-            if (tabIndex < numTabs) {
-                // to support dynamic reloading; the data in the session might not be compatible with current layout.
-                ajaxBootstrapTabbedPanel.setSelectedTab(tabIndex);
-            }
-        }
-    }
-}

http://git-wip-us.apache.org/repos/asf/isis/blob/69ed9c5e/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/layout/fixedcols/tabs/TabPanel.html
----------------------------------------------------------------------
diff --git a/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/layout/fixedcols/tabs/TabPanel.html b/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/layout/fixedcols/tabs/TabPanel.html
deleted file mode 100644
index 111fc68..0000000
--- a/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/layout/fixedcols/tabs/TabPanel.html
+++ /dev/null
@@ -1,31 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-  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.
--->
-<html xmlns:wicket="http://wicket.apache.org">
-<body>
-<wicket:panel>
-	<div class="tabPanel">
-		<form class="inputForm" role="form">
-			<div wicket:id="column">
-			</div>
-		</form>
-	</div>
-</wicket:panel>
-</body>
-</html>

http://git-wip-us.apache.org/repos/asf/isis/blob/69ed9c5e/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/layout/fixedcols/tabs/TabPanel.java
----------------------------------------------------------------------
diff --git a/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/layout/fixedcols/tabs/TabPanel.java b/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/layout/fixedcols/tabs/TabPanel.java
deleted file mode 100644
index d475fc8..0000000
--- a/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/layout/fixedcols/tabs/TabPanel.java
+++ /dev/null
@@ -1,24 +0,0 @@
-package org.apache.isis.viewer.wicket.ui.components.layout.fixedcols.tabs;
-
-import org.apache.isis.core.metamodel.services.grid.fixedcols.applib.FCTab;
-import org.apache.isis.viewer.wicket.model.models.EntityModel;
-import org.apache.isis.viewer.wicket.ui.ComponentType;
-import org.apache.isis.viewer.wicket.ui.panels.PanelAbstract;
-
-public class TabPanel extends PanelAbstract {
-
-    private static final long serialVersionUID = 1L;
-
-    private static final String ID_COLUMN = "column";
-
-    public TabPanel(String id, final EntityModel model, final FCTab fcTab) {
-        super(id);
-
-        final EntityModel modelWithTabHints = model.cloneWithLayoutMetadata(fcTab);
-
-        getComponentFactoryRegistry()
-                .addOrReplaceComponent(this,
-                        ID_COLUMN, ComponentType.ENTITY_PROPERTIES, modelWithTabHints);
-
-    }
-}


[09/13] isis git commit: ISIS-993: more sorting out of positioning of actions in right drop-down.

Posted by da...@apache.org.
ISIS-993: more sorting out of positioning of actions in right drop-down.


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

Branch: refs/heads/ISIS-993
Commit: 0f09648fa41b2af52af61d016842aa0102ab251c
Parents: 1841a12
Author: Dan Haywood <da...@haywood-associates.co.uk>
Authored: Tue Feb 23 20:35:39 2016 +0000
Committer: Dan Haywood <da...@haywood-associates.co.uk>
Committed: Tue Feb 23 20:35:39 2016 +0000

----------------------------------------------------------------------
 .../AdditionalLinksAsListInlinePanel.html       |  1 -
 .../components/scalars/ScalarPanelAbstract.html |  2 +-
 .../isisapplib/IsisBlobOrClobPanelAbstract.html |  2 +-
 .../scalars/primitive/BooleanPanel.html         |  2 +-
 .../scalars/reference/ReferencePanel.html       |  2 +-
 .../valuechoices/ValueChoicesSelect2Panel.html  |  2 +-
 .../wicket/ui/pages/bootstrap-overrides.css     | 25 +++++++++++++++++---
 7 files changed, 27 insertions(+), 9 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/isis/blob/0f09648f/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/actionmenu/entityactions/AdditionalLinksAsListInlinePanel.html
----------------------------------------------------------------------
diff --git a/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/actionmenu/entityactions/AdditionalLinksAsListInlinePanel.html b/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/actionmenu/entityactions/AdditionalLinksAsListInlinePanel.html
index f7d8db6..7cc41f1 100644
--- a/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/actionmenu/entityactions/AdditionalLinksAsListInlinePanel.html
+++ b/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/actionmenu/entityactions/AdditionalLinksAsListInlinePanel.html
@@ -31,7 +31,6 @@
                     </a>
                 </li>
             </ul>
-            <div class="clearfix"/>
         </wicket:panel>
     </body>
 </html>

http://git-wip-us.apache.org/repos/asf/isis/blob/0f09648f/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/scalars/ScalarPanelAbstract.html
----------------------------------------------------------------------
diff --git a/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/scalars/ScalarPanelAbstract.html b/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/scalars/ScalarPanelAbstract.html
index dcbd683..effea6d 100644
--- a/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/scalars/ScalarPanelAbstract.html
+++ b/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/scalars/ScalarPanelAbstract.html
@@ -35,11 +35,11 @@
                                     <a wicket:id="editProperty" href="#" class="edit fa fa-pencil-square-o"/>
                                 </span>
                             </span>
+                            <span wicket:id="associatedActionLinksRight" class="associatedActionLinksRight">[drop down]</span>
                         </div>
                         <span wicket:id="feedback" class="help-block"></span>
                         <span wicket:id="associatedActionLinksBelow"></span>
                     </span>
-                    <span wicket:id="associatedActionLinksRight" class="associatedActionLinksRight">[drop down]</span>
                     <div class="clearfix"/>
                 </div>
                 <wicket:container wicket:id="scalarIfCompact"></wicket:container>

http://git-wip-us.apache.org/repos/asf/isis/blob/0f09648f/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/scalars/isisapplib/IsisBlobOrClobPanelAbstract.html
----------------------------------------------------------------------
diff --git a/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/scalars/isisapplib/IsisBlobOrClobPanelAbstract.html b/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/scalars/isisapplib/IsisBlobOrClobPanelAbstract.html
index 92b11a7..cc19d87 100644
--- a/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/scalars/isisapplib/IsisBlobOrClobPanelAbstract.html
+++ b/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/scalars/isisapplib/IsisBlobOrClobPanelAbstract.html
@@ -41,11 +41,11 @@
                                     <a wicket:id="editProperty" href="#" class="edit fa fa-pencil-square-o"/>
                                 </span>
                             </span>
+                            <span wicket:id="associatedActionLinksRight"  class="associatedActionLinksRight">[drop down]</span>
                         </div>
                         <span wicket:id="feedback" class="help-block"></span>
                         <span wicket:id="associatedActionLinksBelow"></span>
                     </span>
-                    <span wicket:id="associatedActionLinksRight"  class="associatedActionLinksRight">[drop down]</span>
                     <div class="clearfix"/>
                 </div>
                 <span wicket:id="scalarIfCompact">

http://git-wip-us.apache.org/repos/asf/isis/blob/0f09648f/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/scalars/primitive/BooleanPanel.html
----------------------------------------------------------------------
diff --git a/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/scalars/primitive/BooleanPanel.html b/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/scalars/primitive/BooleanPanel.html
index 8fa08d9..2b4af5f 100644
--- a/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/scalars/primitive/BooleanPanel.html
+++ b/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/scalars/primitive/BooleanPanel.html
@@ -35,11 +35,11 @@
                                         <a wicket:id="editProperty" href="#" class="edit fa fa-pencil-square-o"/>
                                 </span>
                             </span>
+                            <span wicket:id="associatedActionLinksRight" class="associatedActionLinksRight"></span>
                         </div>
                         <span wicket:id="feedback" class="help-block"></span>
                         <span wicket:id="associatedActionLinksBelow"></span>
                     </span>
-                    <span wicket:id="associatedActionLinksRight" class="associatedActionLinksRight"></span>
                     <div class="clearfix"/>
                 </div>
                 <input type="checkbox" wicket:id="scalarIfCompact" />

http://git-wip-us.apache.org/repos/asf/isis/blob/0f09648f/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/scalars/reference/ReferencePanel.html
----------------------------------------------------------------------
diff --git a/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/scalars/reference/ReferencePanel.html b/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/scalars/reference/ReferencePanel.html
index cfc0ace..f85dbcb 100644
--- a/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/scalars/reference/ReferencePanel.html
+++ b/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/scalars/reference/ReferencePanel.html
@@ -41,11 +41,11 @@
                                     </span>
                                 </span>
                             </span>
+                            <span wicket:id="associatedActionLinksRight" class="associatedActionLinksRight"></span>
                         </div>
                         <span wicket:id="feedback" class="help-block"></span>
                         <span wicket:id="associatedActionLinksBelow"></span>
                     </span>
-                    <span wicket:id="associatedActionLinksRight" class="associatedActionLinksRight"></span>
                     <div class="clearfix"/>
                 </div>
                 <div wicket:id="scalarIfCompact" class="scalarIfCompact">

http://git-wip-us.apache.org/repos/asf/isis/blob/0f09648f/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/widgets/valuechoices/ValueChoicesSelect2Panel.html
----------------------------------------------------------------------
diff --git a/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/widgets/valuechoices/ValueChoicesSelect2Panel.html b/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/widgets/valuechoices/ValueChoicesSelect2Panel.html
index 7971e56..0874436 100644
--- a/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/widgets/valuechoices/ValueChoicesSelect2Panel.html
+++ b/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/widgets/valuechoices/ValueChoicesSelect2Panel.html
@@ -35,11 +35,11 @@
                                         <a wicket:id="editProperty" href="#" class="edit fa fa-pencil-square-o"/>
                                 </span>
                             </span>
+                            <span wicket:id="associatedActionLinksRight" class="associatedActionLinksRight"></span>
                         </div>
                         <span wicket:id="feedback" class="help-block"></span>
                         <span wicket:id="associatedActionLinksBelow"></span>
                     </span>
-                    <span wicket:id="associatedActionLinksRight" class="associatedActionLinksRight"></span>
                     <div class="clearfix"/>
                 </div>
                 <span wicket:id="scalarIfCompact"></span>

http://git-wip-us.apache.org/repos/asf/isis/blob/0f09648f/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/pages/bootstrap-overrides.css
----------------------------------------------------------------------
diff --git a/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/pages/bootstrap-overrides.css b/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/pages/bootstrap-overrides.css
index 4d7458f..729917e 100644
--- a/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/pages/bootstrap-overrides.css
+++ b/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/pages/bootstrap-overrides.css
@@ -554,7 +554,7 @@ div.label-left .scalarValueWrapper {
 }
 
 div.label-left.actions-right .scalarValueWrapper {
-    width: 62%;
+    /*width: 62%;*/
 }
 
 .actions-right .additionalLinkListDropDown {
@@ -787,11 +787,30 @@ tr.headers th form input {
 }
 
 .associatedActionLinksRight .additionalLinkListDropDown {
-    padding-right: 10px;
+    padding-right: 11px;
 }
 
 .editing .edit {
     padding-top: 2px;
     float: right;
     margin-bottom: 10px;
-}
\ No newline at end of file
+}
+
+.actions-right .scalarPlaceholder .scalarValueInput {
+    width: 90%;
+    float: left;
+}
+
+.actions-right .additionalLinkListInline {
+    margin-top: -22px;
+}
+
+.booleanPanel .actions-right .additionalLinkListInline {
+    margin-top: 0px;
+}
+
+.referencePanel .actions-right .additionalLinkListInline,
+.isisBlobPanel .actions-right .additionalLinkListInline {
+    margin-top: 5px;
+}
+


[05/13] isis git commit: ISIS-993: fixing bad import and javadoc.

Posted by da...@apache.org.
ISIS-993: fixing bad import and javadoc.


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

Branch: refs/heads/ISIS-993
Commit: 6f435a16558099c12de5bb01af27af1b8a011a5f
Parents: bf38920
Author: Dan Haywood <da...@haywood-associates.co.uk>
Authored: Wed Feb 17 16:57:19 2016 +0000
Committer: Dan Haywood <da...@haywood-associates.co.uk>
Committed: Wed Feb 17 16:57:19 2016 +0000

----------------------------------------------------------------------
 .../viewer/wicket/ui/components/layout/EntityPanelFactory.java    | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/isis/blob/6f435a16/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/layout/EntityPanelFactory.java
----------------------------------------------------------------------
diff --git a/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/layout/EntityPanelFactory.java b/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/layout/EntityPanelFactory.java
index 575292c..19db8ee 100644
--- a/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/layout/EntityPanelFactory.java
+++ b/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/layout/EntityPanelFactory.java
@@ -27,10 +27,9 @@ import org.apache.isis.viewer.wicket.ui.ComponentFactory;
 import org.apache.isis.viewer.wicket.ui.ComponentType;
 import org.apache.isis.viewer.wicket.ui.components.entity.EntityComponentFactoryAbstract;
 import org.apache.isis.viewer.wicket.ui.components.layout.fallback.EntityEditablePanel;
-import org.apache.isis.viewer.wicket.ui.components.layout.fixedcols.FCGridPanel;
 
 /**
- * {@link ComponentFactory} for {@link FCGridPanel}.
+ * {@link ComponentFactory} for {@link EntityEditablePanel}.
  */
 public class EntityPanelFactory extends EntityComponentFactoryAbstract {
 


[04/13] isis git commit: ISIS-993: removing support for "isis.viewer.wicket.disableModalDialogs".

Posted by da...@apache.org.
ISIS-993: removing support for "isis.viewer.wicket.disableModalDialogs".

Also:
- adding stub release and migration notes for 1.12.0.


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

Branch: refs/heads/ISIS-993
Commit: bf389208534eb8827892592a68659fd899f55437
Parents: 69ed9c5
Author: Dan Haywood <da...@haywood-associates.co.uk>
Authored: Wed Feb 17 16:49:01 2016 +0000
Committer: Dan Haywood <da...@haywood-associates.co.uk>
Committed: Wed Feb 17 16:49:01 2016 +0000

----------------------------------------------------------------------
 .../_migration-notes_1.11.0-to-1.12.0.adoc      | 20 ++++++++++++++++++++
 .../main/asciidoc/_release-notes_1.12.0.adoc    | 13 +++++++++++++
 .../guides/_ugvw_configuration-properties.adoc  |  4 +---
 .../src/main/asciidoc/migration-notes.adoc      |  1 +
 .../src/main/asciidoc/release-notes.adoc        |  9 +++++++++
 .../actionprompt/ActionPromptModalWindow.java   | 15 +--------------
 .../actions/ActionParametersFormPanel.java      |  8 ++------
 .../StandaloneCollectionPanel.java              |  2 +-
 .../viewer/wicket/ui/pages/PageAbstract.java    |  2 +-
 .../webapp/WEB-INF/viewer_wicket.properties     |  6 ------
 10 files changed, 49 insertions(+), 31 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/isis/blob/bf389208/adocs/documentation/src/main/asciidoc/_migration-notes_1.11.0-to-1.12.0.adoc
----------------------------------------------------------------------
diff --git a/adocs/documentation/src/main/asciidoc/_migration-notes_1.11.0-to-1.12.0.adoc b/adocs/documentation/src/main/asciidoc/_migration-notes_1.11.0-to-1.12.0.adoc
new file mode 100644
index 0000000..803b91f
--- /dev/null
+++ b/adocs/documentation/src/main/asciidoc/_migration-notes_1.11.0-to-1.12.0.adoc
@@ -0,0 +1,20 @@
+[[_migration-notes_1.11.0-to-1.12.0]]
+= From v1.11.0 to 1.12.0
+:Notice: 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.
+:_basedir: ../
+:_imagesdir: images/
+
+
+Apache Isis 1.12.0-SNAPSHOT is still in development.
+
+
+
+== `isis.viewer.wicket.disableModalDialogs` removed
+
+The Apache Isis Wicket viewer uses a modal dialog for action parameters.  Before this feature was implemented (prior
+to 1.4.0), action parameters were rendered on their own page.  This property was provided to re-enable the old
+behaviour.
+
+The property has now been removed and this feature removed; actions parameters are always now always shown in a
+ modal dialog.
+

http://git-wip-us.apache.org/repos/asf/isis/blob/bf389208/adocs/documentation/src/main/asciidoc/_release-notes_1.12.0.adoc
----------------------------------------------------------------------
diff --git a/adocs/documentation/src/main/asciidoc/_release-notes_1.12.0.adoc b/adocs/documentation/src/main/asciidoc/_release-notes_1.12.0.adoc
new file mode 100644
index 0000000..b535b72
--- /dev/null
+++ b/adocs/documentation/src/main/asciidoc/_release-notes_1.12.0.adoc
@@ -0,0 +1,13 @@
+[[r1.12.0]]
+= 1.12.0-SNAPSHOT
+:notice: 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.
+:_basedir: ./
+:_imagesdir: images/
+:toc: right
+
+
+Apache Isis 1.12.0-SNAPSHOT is still in development.
+
+
+
+

http://git-wip-us.apache.org/repos/asf/isis/blob/bf389208/adocs/documentation/src/main/asciidoc/guides/_ugvw_configuration-properties.adoc
----------------------------------------------------------------------
diff --git a/adocs/documentation/src/main/asciidoc/guides/_ugvw_configuration-properties.adoc b/adocs/documentation/src/main/asciidoc/guides/_ugvw_configuration-properties.adoc
index f4bb645..87b1c0d 100644
--- a/adocs/documentation/src/main/asciidoc/guides/_ugvw_configuration-properties.adoc
+++ b/adocs/documentation/src/main/asciidoc/guides/_ugvw_configuration-properties.adoc
@@ -50,9 +50,7 @@ If you prefer you can place all configuration properties into `WEB-INF/isis.prop
 |`isis.viewer.wicket.` +
 `disableModalDialogs`
 | `true`,`false` (`_false_`)
-| By default the Apache Isis Wicket viewer uses a modal dialog for action parameters.  Before this feature was implemented (prior to 1.4.0), Apache Isis rendered action parameters on its own page.  This property re-enables the old behaviour.
-
-Note that action pages are still used for bookmarked actions.
+|(`1.12.0-SNAPSHOT`), no longer supported.
 
 |`isis.viewer.wicket.` +
 `maxTitleLengthInParentedTables`

http://git-wip-us.apache.org/repos/asf/isis/blob/bf389208/adocs/documentation/src/main/asciidoc/migration-notes.adoc
----------------------------------------------------------------------
diff --git a/adocs/documentation/src/main/asciidoc/migration-notes.adoc b/adocs/documentation/src/main/asciidoc/migration-notes.adoc
index 0506693..1fcd2fd 100644
--- a/adocs/documentation/src/main/asciidoc/migration-notes.adoc
+++ b/adocs/documentation/src/main/asciidoc/migration-notes.adoc
@@ -7,6 +7,7 @@
 
 
 
+include::_migration-notes_1.11.0-to-1.12.0.adoc[leveloffset=+1]
 include::_migration-notes_1.10.0-to-1.11.0.adoc[leveloffset=+1]
 include::_migration-notes_1.9.0-to-1.10.0.adoc[leveloffset=+1]
 include::_migration-notes_1.8.0-to-1.9.0.adoc[leveloffset=+1]

http://git-wip-us.apache.org/repos/asf/isis/blob/bf389208/adocs/documentation/src/main/asciidoc/release-notes.adoc
----------------------------------------------------------------------
diff --git a/adocs/documentation/src/main/asciidoc/release-notes.adoc b/adocs/documentation/src/main/asciidoc/release-notes.adoc
index a279f2b..355550f 100644
--- a/adocs/documentation/src/main/asciidoc/release-notes.adoc
+++ b/adocs/documentation/src/main/asciidoc/release-notes.adoc
@@ -21,6 +21,14 @@ This table summarises all releases of Apache Isis to date.
 | Improves
 | Bugs
 
+| xref:r1.12.0[1.12.0]
+|
+|
+| `1.12.0-SNAPSHOT` is still in development
+|
+|
+|
+
 | xref:r1.11.1[1.11.1]
 | 17-jan-2016
 | * https://issues.apache.org/jira/secure/ReleaseNote.jspa?projectId=12311171&version=12334640[1.11.1]
@@ -218,6 +226,7 @@ This table summarises all releases of Apache Isis to date.
 
 
 
+include::_release-notes_1.12.0.adoc[leveloffset=+1]
 include::_release-notes_1.11.1.adoc[leveloffset=+1]
 include::_release-notes_1.11.0.adoc[leveloffset=+1]
 include::_release-notes_1.10.0.adoc[leveloffset=+1]

http://git-wip-us.apache.org/repos/asf/isis/blob/bf389208/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/actionprompt/ActionPromptModalWindow.java
----------------------------------------------------------------------
diff --git a/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/actionprompt/ActionPromptModalWindow.java b/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/actionprompt/ActionPromptModalWindow.java
index 8c0bc85..0a57ffe 100644
--- a/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/actionprompt/ActionPromptModalWindow.java
+++ b/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/actionprompt/ActionPromptModalWindow.java
@@ -18,26 +18,13 @@ package org.apache.isis.viewer.wicket.ui.components.actionprompt;
 
 import org.apache.wicket.markup.head.IHeaderResponse;
 import org.apache.wicket.markup.head.OnDomReadyHeaderItem;
-import org.apache.isis.core.commons.config.IsisConfiguration;
-import org.apache.isis.core.runtime.system.context.IsisContext;
+
 import org.apache.isis.viewer.wicket.ui.components.widgets.bootstrap.ModalDialog;
 
 public class ActionPromptModalWindow extends ModalDialog<Void> {
 
     private static final long serialVersionUID = 1L;
 
-    public static ActionPromptModalWindow getActionPromptModalWindowIfEnabled(ActionPromptModalWindow modalWindow) {
-        return !isActionPromptModalDialogDisabled() ? modalWindow : null;
-    }
-
-    public static boolean isActionPromptModalDialogDisabled() {
-        return getConfiguration().getBoolean("isis.viewer.wicket.disableModalDialogs", false);
-    }
-
-    private static IsisConfiguration getConfiguration() {
-        return IsisContext.getConfiguration();
-    }
-
     public static ActionPromptModalWindow newModalWindow(String id) {
         return new ActionPromptModalWindow(id);
     }

http://git-wip-us.apache.org/repos/asf/isis/blob/bf389208/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/actions/ActionParametersFormPanel.java
----------------------------------------------------------------------
diff --git a/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/actions/ActionParametersFormPanel.java b/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/actions/ActionParametersFormPanel.java
index 931d10f..b6820cc 100644
--- a/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/actions/ActionParametersFormPanel.java
+++ b/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/actions/ActionParametersFormPanel.java
@@ -40,13 +40,12 @@ import org.apache.isis.core.metamodel.spec.feature.ObjectAction;
 import org.apache.isis.core.runtime.system.context.IsisContext;
 import org.apache.isis.viewer.wicket.model.hints.IsisActionCompletedEvent;
 import org.apache.isis.viewer.wicket.model.mementos.ActionParameterMemento;
-import org.apache.isis.viewer.wicket.model.models.ExecutingPanel;
 import org.apache.isis.viewer.wicket.model.models.ActionModel;
 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.ExecutingPanel;
 import org.apache.isis.viewer.wicket.model.models.ScalarModel;
 import org.apache.isis.viewer.wicket.ui.ComponentType;
-import org.apache.isis.viewer.wicket.ui.components.actionprompt.ActionPromptModalWindow;
 import org.apache.isis.viewer.wicket.ui.components.scalars.ScalarModelSubscriber;
 import org.apache.isis.viewer.wicket.ui.components.scalars.ScalarPanelAbstract;
 import org.apache.isis.viewer.wicket.ui.components.scalars.TextFieldValueModel.ScalarModelProvider;
@@ -204,10 +203,7 @@ public class ActionParametersFormPanel extends PanelAbstract<ActionModel> {
             cancelButton.setDefaultFormProcessing(false);
             add(cancelButton);
             
-            // TODO: hide cancel button if dialogs disabled, as not yet implemented.
-            if(ActionPromptModalWindow.isActionPromptModalDialogDisabled()) {
-                cancelButton.setVisible(false);
-            }
+            cancelButton.setVisible(false);
         }
 
         /**

http://git-wip-us.apache.org/repos/asf/isis/blob/bf389208/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/standalonecollection/StandaloneCollectionPanel.java
----------------------------------------------------------------------
diff --git a/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/standalonecollection/StandaloneCollectionPanel.java b/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/standalonecollection/StandaloneCollectionPanel.java
index 196f061..58fb960 100644
--- a/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/standalonecollection/StandaloneCollectionPanel.java
+++ b/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/standalonecollection/StandaloneCollectionPanel.java
@@ -114,7 +114,7 @@ public class StandaloneCollectionPanel extends PanelAbstract<EntityCollectionMod
     //region > ActionPromptModalWindowProvider
 
     public ActionPromptModalWindow getActionPrompt() {
-        return ActionPromptModalWindow.getActionPromptModalWindowIfEnabled(actionPromptModalWindow);
+        return actionPromptModalWindow;
     }
 
     //endregion

http://git-wip-us.apache.org/repos/asf/isis/blob/bf389208/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/pages/PageAbstract.java
----------------------------------------------------------------------
diff --git a/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/pages/PageAbstract.java b/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/pages/PageAbstract.java
index c285004..30197af 100644
--- a/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/pages/PageAbstract.java
+++ b/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/pages/PageAbstract.java
@@ -385,7 +385,7 @@ public abstract class PageAbstract extends WebPage implements ActionPromptProvid
     private ActionPromptModalWindow actionPromptModalWindow;
 
     public ActionPrompt getActionPrompt() {
-        return ActionPromptModalWindow.getActionPromptModalWindowIfEnabled(actionPromptModalWindow);
+        return actionPromptModalWindow;
     }
 
     private void addActionPromptModalWindow(final MarkupContainer parent) {

http://git-wip-us.apache.org/repos/asf/isis/blob/bf389208/example/application/simpleapp/webapp/src/main/webapp/WEB-INF/viewer_wicket.properties
----------------------------------------------------------------------
diff --git a/example/application/simpleapp/webapp/src/main/webapp/WEB-INF/viewer_wicket.properties b/example/application/simpleapp/webapp/src/main/webapp/WEB-INF/viewer_wicket.properties
index ba9eaaf..6cbb981 100644
--- a/example/application/simpleapp/webapp/src/main/webapp/WEB-INF/viewer_wicket.properties
+++ b/example/application/simpleapp/webapp/src/main/webapp/WEB-INF/viewer_wicket.properties
@@ -61,12 +61,6 @@ isis.viewer.wicket.maxTitleLengthInParentedTables=0
 
 
 #
-# whether to show action dialogs on their own page rather than as a modal dialog (default is false)
-#
-#isis.viewer.wicket.disableModalDialogs=false
-
-
-#
 # the maximum number of pages to list in bookmark (default is 15)
 #
 #isis.viewer.wicket.bookmarkedPages.maxSize=15


[12/13] isis git commit: ISIS-993: incidental, fix for Lombok with boolean properties (didn't find the @Property annotation).

Posted by da...@apache.org.
ISIS-993: incidental, fix for Lombok with boolean properties (didn't find the @Property annotation).


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

Branch: refs/heads/ISIS-993
Commit: 34771c2416ba0f798a61595d18faa5dee7be9149
Parents: e4637ca
Author: Dan Haywood <da...@haywood-associates.co.uk>
Authored: Tue Feb 23 21:31:01 2016 +0000
Committer: Dan Haywood <da...@haywood-associates.co.uk>
Committed: Tue Feb 23 21:31:01 2016 +0000

----------------------------------------------------------------------
 .../apache/isis/core/metamodel/facets/Annotations.java  | 12 ++++++++++--
 1 file changed, 10 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/isis/blob/34771c24/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/Annotations.java
----------------------------------------------------------------------
diff --git a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/Annotations.java b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/Annotations.java
index 1e08d5d..23dac17 100644
--- a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/Annotations.java
+++ b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/Annotations.java
@@ -292,10 +292,18 @@ public final class Annotations  {
         if(methodName == null) {
             return Collections.emptyList();
         }
-        if(!methodName.startsWith("get")) {
+        int beginIndex;
+        if (methodName.startsWith("get")) {
+            beginIndex = 3;
+        } else if (methodName.startsWith("is")) {
+            beginIndex = 2;
+        } else {
+            beginIndex = -1;
+        }
+        if(beginIndex == -1) {
             return Collections.emptyList();
         }
-        final String suffix = methodName.substring(3);
+        final String suffix = methodName.substring(beginIndex);
         if(suffix.length() == 0) {
             return Collections.emptyList();
         }


[03/13] isis git commit: isis-993: deleting the original layout grids (including the first-cut fixed column stuff that preceded the bootstrap3 grids).

Posted by da...@apache.org.
isis-993: deleting the original layout grids (including the first-cut fixed column stuff that preceded the bootstrap3 grids).


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

Branch: refs/heads/ISIS-993
Commit: 69ed9c5e46ad4edad63c1c46498c03bdaa00192d
Parents: 7488f51
Author: Dan Haywood <da...@haywood-associates.co.uk>
Authored: Wed Feb 17 16:37:36 2016 +0000
Committer: Dan Haywood <da...@haywood-associates.co.uk>
Committed: Wed Feb 17 16:37:36 2016 +0000

----------------------------------------------------------------------
 .../grid/GridNormalizerServiceAbstract.java     |  24 +-
 .../grid/fixedcols/GridNormalizerServiceFC.java | 172 -----
 .../grid/fixedcols/applib/FCColumn.java         | 135 ----
 .../grid/fixedcols/applib/FCColumnOwner.java    |  25 -
 .../services/grid/fixedcols/applib/FCGrid.java  | 204 ------
 .../services/grid/fixedcols/applib/FCTab.java   | 159 -----
 .../grid/fixedcols/applib/FCTabGroup.java       |  94 ---
 .../grid/fixedcols/applib/FCTabGroupOwner.java  |  25 -
 .../services/grid/fixedcols/applib/Hint.java    |  12 -
 .../grid/fixedcols/applib/package-info.java     |  44 --
 .../metamodel/services/grid/FCGridTest.java     | 128 ----
 .../ComponentFactoryRegistrarDefault.java       |   4 -
 .../links/EntityLinksSelectorPanelFactory.java  |   5 -
 .../layout/fixedcols/FCGridPanel.html           |  34 -
 .../layout/fixedcols/FCGridPanel.java           | 114 ---
 .../components/layout/fixedcols/PropUtil.java   |  92 ---
 .../collections/EntityCollectionsPanel.html     |  32 -
 .../collections/EntityCollectionsPanel.java     | 151 ----
 .../EntityCollectionsPanelFactory.java          |  49 --
 .../layout/fixedcols/columns/EntityColumn.html  |  31 -
 .../layout/fixedcols/columns/EntityColumn.java  | 191 -----
 .../propsandcolls/EntityPropsAndCollsForm.java  | 710 -------------------
 .../EntityPropsAndCollsForm.properties          |  22 -
 .../propsandcolls/EntityPropsAndCollsPanel.html |  54 --
 .../propsandcolls/EntityPropsAndCollsPanel.java |  67 --
 .../EntityPropsAndCollsPanelFactory.java        |  53 --
 .../tabgrouplist/TabGroupListPanel.html         |  28 -
 .../tabgrouplist/TabGroupListPanel.java         |  67 --
 .../layout/fixedcols/tabs/TabGroupPanel.java    | 105 ---
 .../layout/fixedcols/tabs/TabPanel.html         |  31 -
 .../layout/fixedcols/tabs/TabPanel.java         |  24 -
 31 files changed, 3 insertions(+), 2883 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/isis/blob/69ed9c5e/core/metamodel/src/main/java/org/apache/isis/core/metamodel/services/grid/GridNormalizerServiceAbstract.java
----------------------------------------------------------------------
diff --git a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/services/grid/GridNormalizerServiceAbstract.java b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/services/grid/GridNormalizerServiceAbstract.java
index d8b1742..dd7abc8 100644
--- a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/services/grid/GridNormalizerServiceAbstract.java
+++ b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/services/grid/GridNormalizerServiceAbstract.java
@@ -96,10 +96,6 @@ import org.apache.isis.core.metamodel.facets.properties.propertylayout.MultiLine
 import org.apache.isis.core.metamodel.facets.properties.propertylayout.NamedFacetForPropertyXml;
 import org.apache.isis.core.metamodel.facets.properties.propertylayout.RenderedAdjustedFacetForPropertyXml;
 import org.apache.isis.core.metamodel.facets.properties.propertylayout.TypicalLengthFacetForPropertyXml;
-import org.apache.isis.core.metamodel.services.grid.fixedcols.applib.FCColumn;
-import org.apache.isis.core.metamodel.services.grid.fixedcols.applib.FCColumnOwner;
-import org.apache.isis.core.metamodel.services.grid.fixedcols.applib.FCGrid;
-import org.apache.isis.core.metamodel.services.grid.fixedcols.applib.FCTab;
 import org.apache.isis.core.metamodel.spec.ObjectSpecification;
 import org.apache.isis.core.metamodel.spec.SpecificationLoader;
 import org.apache.isis.core.metamodel.spec.SpecificationLoaderAware;
@@ -185,7 +181,7 @@ public abstract class GridNormalizerServiceAbstract<G extends Grid>
 
         final ObjectSpecification objectSpec = specificationLookup.loadSpecification(domainClass);
 
-        grid.visit(new FCGrid.VisitorAdapter() {
+        grid.visit(new Grid.VisitorAdapter() {
             @Override
             public void visit(final ActionLayoutData actionLayoutData) {
                 final ObjectAction objectAction = objectSpec.getObjectAction(actionLayoutData.getId());
@@ -438,7 +434,7 @@ public abstract class GridNormalizerServiceAbstract<G extends Grid>
     @Override
     public void minimal(final G grid, final Class<?> domainClass) {
         normalize(grid, domainClass);
-        grid.visit(new FCGrid.VisitorAdapter() {
+        grid.visit(new Grid.VisitorAdapter() {
             @Override
             public void visit(final ActionLayoutData actionLayoutData) {
                 actionLayoutData.getOwner().getActions().remove(actionLayoutData);
@@ -485,7 +481,7 @@ public abstract class GridNormalizerServiceAbstract<G extends Grid>
             final Map<String, ObjectAction> objectActionById) {
 
         final Map<String, int[]> propertySequenceByGroup = Maps.newHashMap();
-        fcGrid.visit(new FCGrid.VisitorAdapter() {
+        fcGrid.visit(new Grid.VisitorAdapter() {
             private int collectionSequence = 1;
 
             private int actionDomainObjectSequence = 1;
@@ -602,20 +598,6 @@ public abstract class GridNormalizerServiceAbstract<G extends Grid>
                 final String sequence = "" + collectionSequence++;
                 FacetUtil.addOrReplaceFacet(
                         new MemberOrderFacetXml(groupName, sequence, translationService, oneToManyAssociation));
-
-                // if there is only a single column and no other contents, then copy the collection Id onto the tab'
-                final MemberRegionOwner memberRegionOwner = collectionLayoutData.getOwner();
-                if(memberRegionOwner instanceof FCColumn) {
-                    final FCColumn FCColumn = (FCColumn) memberRegionOwner;
-                    final FCColumnOwner holder = FCColumn.getOwner();
-                    if(holder instanceof FCTab) {
-                        final FCTab FCTab = (FCTab) holder;
-                        if(FCTab.getContents().size() == 1 && Strings.isNullOrEmpty(FCTab.getName()) ) {
-                            final String collectionName = oneToManyAssociation.getName();
-                            FCTab.setName(collectionName);
-                        }
-                    }
-                }
             }
         });
     }

http://git-wip-us.apache.org/repos/asf/isis/blob/69ed9c5e/core/metamodel/src/main/java/org/apache/isis/core/metamodel/services/grid/fixedcols/GridNormalizerServiceFC.java
----------------------------------------------------------------------
diff --git a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/services/grid/fixedcols/GridNormalizerServiceFC.java b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/services/grid/fixedcols/GridNormalizerServiceFC.java
deleted file mode 100644
index bf3b5a2..0000000
--- a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/services/grid/fixedcols/GridNormalizerServiceFC.java
+++ /dev/null
@@ -1,172 +0,0 @@
-/**
- *  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.core.metamodel.services.grid.fixedcols;
-
-import java.util.LinkedHashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.concurrent.atomic.AtomicReference;
-
-import com.google.common.collect.Lists;
-
-import org.apache.isis.applib.annotation.DomainService;
-import org.apache.isis.applib.annotation.NatureOfService;
-import org.apache.isis.applib.layout.component.ActionLayoutData;
-import org.apache.isis.applib.layout.component.CollectionLayoutData;
-import org.apache.isis.applib.layout.component.FieldSet;
-import org.apache.isis.applib.layout.component.Grid;
-import org.apache.isis.applib.layout.component.PropertyLayoutData;
-import org.apache.isis.core.metamodel.services.grid.fixedcols.applib.FCColumn;
-import org.apache.isis.core.metamodel.services.grid.fixedcols.applib.FCGrid;
-import org.apache.isis.core.metamodel.services.grid.fixedcols.applib.FCTab;
-import org.apache.isis.core.metamodel.services.grid.fixedcols.applib.FCTabGroup;
-import org.apache.isis.core.metamodel.facets.object.membergroups.MemberGroupLayoutFacet;
-import org.apache.isis.core.metamodel.services.grid.GridNormalizerServiceAbstract;
-import org.apache.isis.core.metamodel.spec.ObjectSpecification;
-
-@DomainService(
-        nature = NatureOfService.DOMAIN
-)
-public class GridNormalizerServiceFC extends GridNormalizerServiceAbstract {
-
-    public static final String TNS = "http://isis.apache.org/schema/applib/layout/fixedcols";
-    public static final String SCHEMA_LOCATION = "http://isis.apache.org/schema/applib/layout/fixedcols/fixedcols.xsd";
-
-    public GridNormalizerServiceFC() {
-        super(FCGrid.class, TNS, SCHEMA_LOCATION);
-    }
-
-
-    /**
-     * Ensures that all object members (properties, collections and actions) are in the metadata.
-     *
-     * <p>
-     *     If they are missing then they will be added to default tabs (created on the fly if need be).
-     * </p>
-     */
-    @Override
-    protected boolean validateAndDerive(
-            final Grid grid,
-            final Map oneToOneAssociationById,
-            final Map oneToManyAssociationById,
-            final Map objectActionById, final ObjectSpecification objectSpec) {
-
-        final FCGrid fcGrid = (FCGrid) grid;
-
-        final LinkedHashMap<String, PropertyLayoutData> propertyIds = fcGrid.getAllPropertiesById();
-        final LinkedHashMap<String, CollectionLayoutData> collectionIds = fcGrid.getAllCollectionsById();
-        final LinkedHashMap<String, ActionLayoutData> actionIds = fcGrid.getAllActionsById();
-
-        final AtomicReference<FieldSet> defaultFieldSetRef = new AtomicReference<>();
-        final AtomicReference<FCColumn> firstColumnRef = new AtomicReference<>();
-        final AtomicReference<FCTabGroup> lastTabGroupRef = new AtomicReference<>();
-
-        // capture the first column, and also
-        // capture the first property group (if any) with the default name ('General')
-        fcGrid.visit(new FCGrid.VisitorAdapter() {
-            @Override
-            public void visit(final FCColumn fcColumn) {
-                firstColumnRef.compareAndSet(null, fcColumn);
-            }
-            @Override
-            public void visit(final FieldSet fieldSet) {
-                if(MemberGroupLayoutFacet.DEFAULT_GROUP.equals(fieldSet.getName())) {
-                    defaultFieldSetRef.compareAndSet(null, fieldSet);
-                }
-            }
-            @Override
-            public void visit(final FCTabGroup fcTabGroup) {
-                lastTabGroupRef.set(fcTabGroup);
-            }
-        });
-
-        // any missing properties will be added to the (first) 'General' property group found
-        // if there is no default ('General') property group
-        // then one will be added to the first Column of the first Tab.
-        final Tuple<List<String>> propertyIdTuple = surplusAndMissing(propertyIds.keySet(), oneToOneAssociationById.keySet());
-        final List<String> surplusPropertyIds = propertyIdTuple.first;
-        final List<String> missingPropertyIds = propertyIdTuple.second;
-
-        for (String surplusPropertyId : surplusPropertyIds) {
-            propertyIds.get(surplusPropertyId).setMetadataError("No such property");
-        }
-
-        if(!missingPropertyIds.isEmpty()) {
-            // ensure that there is a property group to use
-            boolean wasSet = defaultFieldSetRef.compareAndSet(null, new FieldSet(MemberGroupLayoutFacet.DEFAULT_GROUP));
-            final FieldSet defaultFieldSet = defaultFieldSetRef.get();
-            if(wasSet) {
-                firstColumnRef.get().getFieldSets().add(defaultFieldSet);
-            }
-            for (final String propertyId : missingPropertyIds) {
-                defaultFieldSet.getProperties().add(new PropertyLayoutData(propertyId));
-            }
-        }
-
-
-        // any missing collections will be added as tabs to the last TabGroup.
-        // If there is only a single tab group then a new TabGroup will be added first
-        final Tuple<List<String>> collectionIdTuple = surplusAndMissing(collectionIds.keySet(), oneToManyAssociationById.keySet());
-        final List<String> surplusCollectionIds = collectionIdTuple.first;
-        final List<String> missingCollectionIds = collectionIdTuple.second;
-
-        for (String surplusCollectionId : surplusCollectionIds) {
-            collectionIds.get(surplusCollectionId).setMetadataError("No such collection");
-        }
-
-        if(!missingCollectionIds.isEmpty()) {
-            while(fcGrid.getTabGroups().size() < 2) {
-                final FCTabGroup tabGroup = new FCTabGroup();
-                fcGrid.getTabGroups().add(tabGroup);
-                lastTabGroupRef.set(tabGroup);
-            }
-            final FCTabGroup lastTabGroup = lastTabGroupRef.get();
-            for (final String collectionId : missingCollectionIds) {
-                final FCTab FCTab = new FCTab();
-                lastTabGroup.getTabs().add(FCTab);
-                FCColumn left = new FCColumn(12);
-                FCTab.setLeft(left);
-                final CollectionLayoutData layoutMetadata = new CollectionLayoutData(collectionId);
-                layoutMetadata.setDefaultView("table");
-                left.getCollections().add(layoutMetadata);
-            }
-        }
-
-        // any missing actions will be added as domain object actions (in the header)
-        final Tuple<List<String>> actionIdTuple = surplusAndMissing(actionIds.keySet(), objectActionById.keySet());
-        final List<String> surplusActionIds = actionIdTuple.first;
-        final List<String> missingActionIds = actionIdTuple.second;
-
-        for (String surplusActionId : surplusActionIds) {
-            actionIds.get(surplusActionId).setMetadataError("No such action");
-        }
-
-        if(!missingActionIds.isEmpty()) {
-            for (String actionId : missingActionIds) {
-                List<ActionLayoutData> actions = fcGrid.getActions();
-                if(actions == null) {
-                    actions = Lists.newArrayList();
-                    fcGrid.setActions(actions);
-                }
-                actions.add(new ActionLayoutData(actionId));
-            }
-        }
-        return true;
-    }
-
-
-}

http://git-wip-us.apache.org/repos/asf/isis/blob/69ed9c5e/core/metamodel/src/main/java/org/apache/isis/core/metamodel/services/grid/fixedcols/applib/FCColumn.java
----------------------------------------------------------------------
diff --git a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/services/grid/fixedcols/applib/FCColumn.java b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/services/grid/fixedcols/applib/FCColumn.java
deleted file mode 100644
index b2cab4b..0000000
--- a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/services/grid/fixedcols/applib/FCColumn.java
+++ /dev/null
@@ -1,135 +0,0 @@
-/*
- *  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.core.metamodel.services.grid.fixedcols.applib;
-
-import java.io.Serializable;
-import java.util.List;
-
-import javax.xml.bind.annotation.XmlAttribute;
-import javax.xml.bind.annotation.XmlElementRef;
-import javax.xml.bind.annotation.XmlTransient;
-import javax.xml.bind.annotation.XmlType;
-
-import com.google.common.collect.Lists;
-
-import org.apache.isis.applib.layout.component.CollectionLayoutData;
-import org.apache.isis.applib.layout.component.CollectionLayoutDataOwner;
-import org.apache.isis.applib.layout.component.FieldSet;
-import org.apache.isis.applib.layout.component.FieldSetOwner;
-import org.apache.isis.applib.layout.component.Owned;
-import org.apache.isis.applib.layout.component.PropertyLayoutData;
-
-/**
- * The column contains a mixture of {@link FieldSet}s (of {@link PropertyLayoutData properties}) and also
- * {@link CollectionLayoutData collection}s.
- *
- * <p>
- * A column generally is used within a {@link FCTab}; there can be up to three such (left, middle and right).  It is
- * also possible for their to be a column far-left on the top-level {@link FCGrid page}, and another far-right.
- * </p>
- *
- */
-@XmlType(
-        propOrder = {
-                "fieldSets"
-                , "collections"
-        }
-)
-public class FCColumn implements Serializable, FieldSetOwner, CollectionLayoutDataOwner, Owned<FCColumnOwner> {
-
-    private static final long serialVersionUID = 1L;
-
-    public FCColumn() {
-    }
-
-    public FCColumn(final int span) {
-        setSpan(span);
-    }
-
-    private int span = 4;
-
-    @XmlAttribute(required = true)
-    public int getSpan() {
-        return span;
-    }
-
-    public void setSpan(final int span) {
-        this.span = span;
-    }
-
-
-
-    private List<FieldSet> fieldSets = Lists.newArrayList();
-
-    // no wrapper
-    @XmlElementRef(type = FieldSet.class, name = "fieldSet", required = false)
-    public List<FieldSet> getFieldSets() {
-        return fieldSets;
-    }
-
-    public void setFieldSets(final List<FieldSet> fieldSets) {
-        this.fieldSets = fieldSets;
-    }
-
-
-    private List<CollectionLayoutData> collections = Lists.newArrayList();
-
-    // no wrapper
-    @XmlElementRef(type = CollectionLayoutData.class, name = "collection", required = false)
-    public List<CollectionLayoutData> getCollections() {
-        return collections;
-    }
-
-    public void setCollections(final List<CollectionLayoutData> collections) {
-        this.collections = collections;
-    }
-
-
-    private FCColumnOwner owner;
-    /**
-     * Owner.
-     *
-     * <p>
-     *     Set programmatically by framework after reading in from XML.
-     * </p>
-     */
-    @XmlTransient
-    public FCColumnOwner getOwner() {
-        return owner;
-    }
-
-    public void setOwner(final FCColumnOwner owner) {
-        this.owner = owner;
-    }
-
-
-
-
-    private Hint hint;
-
-    @XmlTransient
-    public Hint getHint() {
-        return hint;
-    }
-
-    public void setHint(final Hint hint) {
-        this.hint = hint;
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/isis/blob/69ed9c5e/core/metamodel/src/main/java/org/apache/isis/core/metamodel/services/grid/fixedcols/applib/FCColumnOwner.java
----------------------------------------------------------------------
diff --git a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/services/grid/fixedcols/applib/FCColumnOwner.java b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/services/grid/fixedcols/applib/FCColumnOwner.java
deleted file mode 100644
index e35621c..0000000
--- a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/services/grid/fixedcols/applib/FCColumnOwner.java
+++ /dev/null
@@ -1,25 +0,0 @@
-/*
- *  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.core.metamodel.services.grid.fixedcols.applib;
-
-import org.apache.isis.applib.layout.component.Owner;
-
-public interface FCColumnOwner extends Owner {
-
-}

http://git-wip-us.apache.org/repos/asf/isis/blob/69ed9c5e/core/metamodel/src/main/java/org/apache/isis/core/metamodel/services/grid/fixedcols/applib/FCGrid.java
----------------------------------------------------------------------
diff --git a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/services/grid/fixedcols/applib/FCGrid.java b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/services/grid/fixedcols/applib/FCGrid.java
deleted file mode 100644
index b544fc2..0000000
--- a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/services/grid/fixedcols/applib/FCGrid.java
+++ /dev/null
@@ -1,204 +0,0 @@
-/*
- *  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.core.metamodel.services.grid.fixedcols.applib;
-
-import java.io.Serializable;
-import java.util.List;
-
-import javax.xml.bind.annotation.XmlElement;
-import javax.xml.bind.annotation.XmlElementRef;
-import javax.xml.bind.annotation.XmlRootElement;
-import javax.xml.bind.annotation.XmlType;
-
-import org.apache.isis.applib.layout.component.ActionLayoutData;
-import org.apache.isis.applib.layout.component.ActionLayoutDataOwner;
-import org.apache.isis.applib.layout.component.CollectionLayoutData;
-import org.apache.isis.applib.layout.component.DomainObjectLayoutData;
-import org.apache.isis.applib.layout.component.FieldSet;
-import org.apache.isis.applib.layout.component.Grid;
-import org.apache.isis.applib.layout.component.GridAbstract;
-import org.apache.isis.applib.layout.component.PropertyLayoutData;
-import org.apache.isis.applib.services.dto.Dto;
-
-/**
- * Top-level page, consisting of an optional {@link FCColumn column} on the far left and another (also optional) on the
- * far right, with the middle consisting of a number of {@link FCTabGroup tabgroup}s, stacked vertically.
- */
-@XmlRootElement(
-        name = "grid"
-)
-@XmlType(
-        name = "grid"
-        , propOrder = {
-                "actions"
-                , "left"
-                , "tabGroups"
-                , "right"
-        }
-)
-public class FCGrid extends GridAbstract implements Dto, ActionLayoutDataOwner, Serializable, FCColumnOwner, FCTabGroupOwner {
-
-    private static final long serialVersionUID = 1L;
-
-    private List<ActionLayoutData> actions;
-
-    // no wrapper
-    @XmlElementRef(type = ActionLayoutData.class, name="action", required = false)
-    public List<ActionLayoutData> getActions() {
-        return actions;
-    }
-
-    public void setActions(List<ActionLayoutData> actionLayoutDatas) {
-        this.actions = actionLayoutDatas;
-    }
-
-
-
-    private FCColumn left;
-
-    @XmlElement(required = false)
-    public FCColumn getLeft() {
-        return left;
-    }
-
-    public void setLeft(final FCColumn left) {
-        this.left = left;
-        left.setHint(Hint.LEFT);
-    }
-
-
-
-    private List<FCTabGroup> tabGroups;
-
-    // no wrapper
-    @XmlElement(name = "tabGroup", required = true)
-    public List<FCTabGroup> getTabGroups() {
-        return tabGroups;
-    }
-
-    public void setTabGroups(List<FCTabGroup> tabGroups) {
-        this.tabGroups = tabGroups;
-    }
-
-
-
-    private FCColumn right;
-
-    @XmlElement(required = false)
-    public FCColumn getRight() {
-        return right;
-    }
-
-    public void setRight(final FCColumn right) {
-        this.right = right;
-        right.setHint(Hint.RIGHT);
-    }
-
-
-
-    interface Visitor extends Grid.Visitor {
-        void visit(final FCGrid fcPage);
-        void visit(final FCTabGroup fcTabGroup);
-        void visit(final FCTab fcTab);
-        void visit(final FCColumn fcColumn);
-    }
-
-    public static class VisitorAdapter extends Grid.VisitorAdapter implements Visitor {
-        @Override
-        public void visit(final FCGrid fcPage) { }
-        @Override
-        public void visit(final FCTabGroup fcTabGroup) { }
-        @Override
-        public void visit(final FCTab fcTab) { }
-        @Override
-        public void visit(final FCColumn fcColumn) { }
-        @Override
-        public void visit(final PropertyLayoutData propertyLayoutData) {}
-        @Override
-        public void visit(final CollectionLayoutData collectionLayoutData) {}
-        @Override
-        public void visit(final ActionLayoutData actionLayoutData) { }
-    }
-
-
-    /**
-     * Visits all elements of the graph.  The {@link Visitor} implementation
-     * can assume that all "owner" references are populated.
-     */
-    public void visit(final Grid.Visitor visitor) {
-        FCGrid.Visitor fcVisitor = asFcVisitor(visitor);
-        fcVisitor.visit(this);
-        traverseActions(this, visitor);
-        traverseColumn(getLeft(), this, visitor);
-        final List<FCTabGroup> tabGroups = getTabGroups();
-        for (final FCTabGroup fcTabGroup : tabGroups) {
-            fcTabGroup.setOwner(this);
-            fcVisitor.visit(fcTabGroup);
-            final List<FCTab> tabs = fcTabGroup.getTabs();
-            for (final FCTab fcTab : tabs) {
-                fcTab.setOwner(fcTabGroup);
-                fcVisitor.visit(fcTab);
-                traverseColumn(fcTab.getLeft(), fcTab, visitor);
-                traverseColumn(fcTab.getMiddle(), fcTab, visitor);
-                traverseColumn(fcTab.getRight(), fcTab, visitor);
-            }
-        }
-        traverseColumn(getRight(), this, visitor);
-    }
-
-    private void traverseColumn(
-            final FCColumn fcColumn,
-            final FCColumnOwner fcColumnOwner,
-            final Grid.Visitor visitor) {
-        if(fcColumn == null) {
-            return;
-        }
-        FCGrid.Visitor fcVisitor = asFcVisitor(visitor);
-        fcColumn.setOwner(fcColumnOwner);
-        fcVisitor.visit(fcColumn);
-        traverseFieldSets(fcColumn, visitor);
-        traverseCollections(fcColumn, visitor);
-    }
-
-    private static Visitor asFcVisitor(final Grid.Visitor visitor) {
-        return visitor instanceof Visitor? (Visitor) visitor : new VisitorAdapter() {
-            @Override public void visit(final DomainObjectLayoutData domainObjectLayoutData) {
-                visitor.visit(domainObjectLayoutData);
-            }
-
-            @Override public void visit(final ActionLayoutData actionLayoutData) {
-                visitor.visit(actionLayoutData);
-            }
-
-            @Override public void visit(final PropertyLayoutData propertyLayoutData) {
-                visitor.visit(propertyLayoutData);
-            }
-
-            @Override public void visit(final CollectionLayoutData collectionLayoutData) {
-                visitor.visit(collectionLayoutData);
-            }
-
-            @Override public void visit(final FieldSet fieldSet) {
-                visitor.visit(fieldSet);
-            }
-        };
-    }
-
-
-}

http://git-wip-us.apache.org/repos/asf/isis/blob/69ed9c5e/core/metamodel/src/main/java/org/apache/isis/core/metamodel/services/grid/fixedcols/applib/FCTab.java
----------------------------------------------------------------------
diff --git a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/services/grid/fixedcols/applib/FCTab.java b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/services/grid/fixedcols/applib/FCTab.java
deleted file mode 100644
index 49e4489..0000000
--- a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/services/grid/fixedcols/applib/FCTab.java
+++ /dev/null
@@ -1,159 +0,0 @@
-/*
- *  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.core.metamodel.services.grid.fixedcols.applib;
-
-import java.io.Serializable;
-import java.util.List;
-
-import javax.xml.bind.annotation.XmlAttribute;
-import javax.xml.bind.annotation.XmlElement;
-import javax.xml.bind.annotation.XmlTransient;
-import javax.xml.bind.annotation.XmlType;
-
-import com.google.common.base.Predicate;
-import com.google.common.collect.Lists;
-
-import org.apache.isis.applib.annotation.Programmatic;
-import org.apache.isis.applib.layout.component.CollectionLayoutData;
-import org.apache.isis.applib.layout.component.MemberRegion;
-import org.apache.isis.applib.layout.component.Owned;
-import org.apache.isis.applib.layout.component.FieldSet;
-
-@XmlType(
-        name="tab"
-        , propOrder = {
-                "name"
-                , "left"
-                , "middle"
-                , "right"
-        }
-)
-public class FCTab implements FCColumnOwner, Serializable, Owned<FCTabGroup> {
-
-    private static final long serialVersionUID = 1L;
-
-    private String name;
-
-    @XmlAttribute(required = true)
-    public String getName() {
-        return name;
-    }
-
-    public void setName(String name) {
-        this.name = name;
-    }
-
-
-
-    private FCColumn left = new FCColumn();
-
-    @XmlElement(required = true)
-    public FCColumn getLeft() {
-        return left;
-    }
-
-    public void setLeft(final FCColumn left) {
-        this.left = left;
-        left.setHint(Hint.LEFT);
-    }
-
-
-    private FCColumn middle;
-
-    @XmlElement(required = false)
-    public FCColumn getMiddle() {
-        return middle;
-    }
-
-    public void setMiddle(final FCColumn middle) {
-        this.middle = middle;
-        middle.setHint(Hint.MIDDLE);
-    }
-
-
-    private FCColumn right;
-
-    @XmlElement(required = false)
-    public FCColumn getRight() {
-        return right;
-    }
-
-    public void setRight(final FCColumn right) {
-        this.right = right;
-        right.setHint(Hint.RIGHT);
-    }
-
-
-
-    private FCTabGroup owner;
-    /**
-     * Owner.
-     *
-     * <p>
-     *     Set programmatically by framework after reading in from XML.
-     * </p>
-     */
-    @XmlTransient
-    public FCTabGroup getOwner() {
-        return owner;
-    }
-
-    public void setOwner(final FCTabGroup owner) {
-        this.owner = owner;
-    }
-
-    /**
-     * Aggregates the contents of all collections on this tab.
-     */
-    @Programmatic
-    public List<MemberRegion> getContents() {
-        final List<MemberRegion> contents = Lists.newArrayList();
-        appendContent(contents, getLeft());
-        appendContent(contents, getMiddle());
-        appendContent(contents, getRight());
-        return contents;
-    }
-
-
-
-    private static void appendContent(final List<MemberRegion> contents, final FCColumn FCColumn) {
-        if(FCColumn == null) {
-            return;
-        }
-        final List<FieldSet> fieldSets = FCColumn.getFieldSets();
-        if(fieldSets != null) {
-            contents.addAll(fieldSets);
-        }
-        final List<CollectionLayoutData> collectionLayoutDatas = FCColumn.getCollections();
-        if(collectionLayoutDatas != null) {
-            contents.addAll(collectionLayoutDatas);
-        }
-    }
-
-    public static class Predicates {
-        public static Predicate<FCTab> notEmpty() {
-            return new Predicate<FCTab>() {
-                @Override
-                public boolean apply(final FCTab FCTab) {
-                    return !FCTab.getContents().isEmpty();
-                }
-            };
-        }
-    }
-}

http://git-wip-us.apache.org/repos/asf/isis/blob/69ed9c5e/core/metamodel/src/main/java/org/apache/isis/core/metamodel/services/grid/fixedcols/applib/FCTabGroup.java
----------------------------------------------------------------------
diff --git a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/services/grid/fixedcols/applib/FCTabGroup.java b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/services/grid/fixedcols/applib/FCTabGroup.java
deleted file mode 100644
index 771db47..0000000
--- a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/services/grid/fixedcols/applib/FCTabGroup.java
+++ /dev/null
@@ -1,94 +0,0 @@
-/*
- *  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.core.metamodel.services.grid.fixedcols.applib;
-
-import java.io.Serializable;
-import java.util.List;
-
-import javax.xml.bind.annotation.XmlElement;
-import javax.xml.bind.annotation.XmlTransient;
-import javax.xml.bind.annotation.XmlType;
-
-import com.google.common.base.Predicate;
-import com.google.common.collect.FluentIterable;
-import com.google.common.collect.Lists;
-
-import org.apache.isis.applib.layout.component.Owned;
-
-@XmlType(
-        propOrder = {
-                "tabs"
-        }
-
-)
-public class FCTabGroup implements FCColumnOwner, Serializable, Owned<FCTabGroupOwner> {
-
-    private static final long serialVersionUID = 1L;
-
-    private List<FCTab> tabs = Lists.newArrayList();
-
-    // no wrapper
-    @XmlElement(name = "tab", required = false)
-    public List<FCTab> getTabs() {
-        return tabs;
-    }
-
-    public void setTabs(List<FCTab> tabs) {
-        this.tabs = tabs;
-    }
-
-
-
-    private FCTabGroupOwner owner;
-
-    /**
-     * Owner.
-     *
-     * <p>
-     *     Set programmatically by framework after reading in from XML.
-     * </p>
-     */
-    @XmlTransient
-    public FCTabGroupOwner getOwner() {
-        return owner;
-    }
-
-    public void setOwner(final FCTabGroupOwner owner) {
-        this.owner = owner;
-    }
-
-
-
-
-
-
-    public static class Predicates {
-        public static Predicate<FCTabGroup> notEmpty() {
-            return new Predicate<FCTabGroup>() {
-                @Override
-                public boolean apply(final FCTabGroup tabGroup) {
-                    return FluentIterable
-                            .from(tabGroup.getTabs())
-                            .anyMatch(FCTab.Predicates.notEmpty());
-                }
-            };
-        }
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/isis/blob/69ed9c5e/core/metamodel/src/main/java/org/apache/isis/core/metamodel/services/grid/fixedcols/applib/FCTabGroupOwner.java
----------------------------------------------------------------------
diff --git a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/services/grid/fixedcols/applib/FCTabGroupOwner.java b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/services/grid/fixedcols/applib/FCTabGroupOwner.java
deleted file mode 100644
index 165a32b..0000000
--- a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/services/grid/fixedcols/applib/FCTabGroupOwner.java
+++ /dev/null
@@ -1,25 +0,0 @@
-/*
- *  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.core.metamodel.services.grid.fixedcols.applib;
-
-import org.apache.isis.applib.layout.component.Owner;
-
-public interface FCTabGroupOwner extends Owner {
-
-}

http://git-wip-us.apache.org/repos/asf/isis/blob/69ed9c5e/core/metamodel/src/main/java/org/apache/isis/core/metamodel/services/grid/fixedcols/applib/Hint.java
----------------------------------------------------------------------
diff --git a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/services/grid/fixedcols/applib/Hint.java b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/services/grid/fixedcols/applib/Hint.java
index a4b0555..8ac2c32 100644
--- a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/services/grid/fixedcols/applib/Hint.java
+++ b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/services/grid/fixedcols/applib/Hint.java
@@ -35,17 +35,5 @@ public enum Hint {
         throw new IllegalStateException();
     }
 
-    public FCColumn from(final FCTab fcTab) {
-        if (fcTab == null) {
-            return null;
-        }
-        if (this == LEFT)
-            return fcTab.getLeft();
-        if (this == MIDDLE)
-            return fcTab.getMiddle();
-        if (this == RIGHT)
-            return fcTab.getRight();
-        throw new IllegalStateException();
-    }
 
 }

http://git-wip-us.apache.org/repos/asf/isis/blob/69ed9c5e/core/metamodel/src/main/java/org/apache/isis/core/metamodel/services/grid/fixedcols/applib/package-info.java
----------------------------------------------------------------------
diff --git a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/services/grid/fixedcols/applib/package-info.java b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/services/grid/fixedcols/applib/package-info.java
deleted file mode 100644
index 3cdd1f1..0000000
--- a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/services/grid/fixedcols/applib/package-info.java
+++ /dev/null
@@ -1,44 +0,0 @@
-/*
- *  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.
- */
-
-/**
- * THIS STUFF ALL WORKS, BUT REMOVED FROM PUBLIC APPLIB BECAUSE IT LOOKS
- * LIKE THE BOOTSTRAP3 GRID WILL BE SUFFICIENT.
- *
- * The benefit of keeping this stuff around is that it reinforces where
- * separation of responsibilities are for grid components (tab etc)
- * vs common components (fieldset, action, property, collection, domainobject).
- *
- * --------------------
- *
- * The classes in this package define how to layout the properties, collections and actions of a domain object - the
- * building blocks - as defined in the <code>members.v1</code> package.
- *
- * <p>
- *     The layout is reasonably flexible, being a half-way house between the annotation/JSON style layouts (pre 1.12.0)
- *     vs the fully flexible layouts provided by the <code>bootstrap3</code> layouts.  In particular, they allow
- *     property fieldsets and collections to be grouped into tabs, with collections being laid out in any column.
- *     However, tab groups only appear in the central area of the page, and may only have a maximum of three columns.
- * </p>
- */
-@javax.xml.bind.annotation.XmlSchema(
-        namespace = "http://isis.apache.org/schema/applib/layout/fixedcols",
-        elementFormDefault = javax.xml.bind.annotation.XmlNsForm.QUALIFIED
-)
-package org.apache.isis.core.metamodel.services.grid.fixedcols.applib;
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/isis/blob/69ed9c5e/core/metamodel/src/test/java/org/apache/isis/core/metamodel/services/grid/FCGridTest.java
----------------------------------------------------------------------
diff --git a/core/metamodel/src/test/java/org/apache/isis/core/metamodel/services/grid/FCGridTest.java b/core/metamodel/src/test/java/org/apache/isis/core/metamodel/services/grid/FCGridTest.java
deleted file mode 100644
index 6b67072..0000000
--- a/core/metamodel/src/test/java/org/apache/isis/core/metamodel/services/grid/FCGridTest.java
+++ /dev/null
@@ -1,128 +0,0 @@
-/*
- *  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.core.metamodel.services.grid;
-
-import java.util.Arrays;
-import java.util.Map;
-
-import javax.xml.bind.Marshaller;
-
-import com.google.common.collect.ImmutableMap;
-import com.google.common.collect.Lists;
-
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Test;
-
-import org.apache.isis.applib.services.layout.GridNormalizerService;
-import org.apache.isis.applib.layout.component.ActionLayoutData;
-import org.apache.isis.applib.layout.component.CollectionLayoutData;
-import org.apache.isis.applib.layout.component.FieldSet;
-import org.apache.isis.applib.layout.component.PropertyLayoutData;
-import org.apache.isis.core.metamodel.services.grid.fixedcols.applib.FCColumn;
-import org.apache.isis.core.metamodel.services.grid.fixedcols.applib.FCGrid;
-import org.apache.isis.core.metamodel.services.grid.fixedcols.applib.FCTab;
-import org.apache.isis.core.metamodel.services.grid.fixedcols.applib.FCTabGroup;
-import org.apache.isis.applib.services.jaxb.JaxbService;
-import org.apache.isis.core.metamodel.services.grid.fixedcols.GridNormalizerServiceFC;
-
-import static org.hamcrest.CoreMatchers.equalTo;
-import static org.hamcrest.CoreMatchers.is;
-import static org.junit.Assert.assertThat;
-
-public class FCGridTest {
-
-    private JaxbService jaxbService;
-    private GridServiceDefault gridServiceDefault;
-    private GridNormalizerServiceFC gridNormalizerServiceFC;
-
-    @Before
-    public void setUp() throws Exception {
-        jaxbService = new JaxbService.Simple();
-        gridServiceDefault = new GridServiceDefault();
-        gridNormalizerServiceFC = new GridNormalizerServiceFC();
-        gridServiceDefault.gridNormalizerServices = Arrays.<GridNormalizerService>asList(gridNormalizerServiceFC);
-    }
-
-    @After
-    public void tearDown() throws Exception {
-
-    }
-
-    @Test
-    public void xxx() throws Exception {
-
-        final FCGrid fcPage = new FCGrid();
-
-        fcPage.setTabGroups(Lists.<FCTabGroup>newArrayList());
-        fcPage.getTabGroups().add(new FCTabGroup());
-        FCTabGroup tabGroup = fcPage.getTabGroups().get(0);
-        FCTab fcTab = new FCTab();
-        tabGroup.getTabs().add(fcTab);
-        fcTab.setName("Common");
-        FCColumn left = fcTab.getLeft();
-
-        FieldSet leftPropGroup = new FieldSet();
-        left.setFieldSets(Lists.<FieldSet>newArrayList());
-        left.getFieldSets().add(leftPropGroup);
-        leftPropGroup.setName("General");
-
-        CollectionLayoutData similarToColl = new CollectionLayoutData();
-        left.setCollections(Lists.<CollectionLayoutData>newArrayList());
-        left.getCollections().add(similarToColl);
-        similarToColl.setId("similarTo");
-
-        left.getFieldSets().add(new FieldSet("General"));
-        PropertyLayoutData namePropertyLayoutData = new PropertyLayoutData("name");
-        left.getFieldSets().get(0).getProperties().add(namePropertyLayoutData);
-
-        ActionLayoutData updateNameActionLayoutData = new ActionLayoutData();
-        updateNameActionLayoutData.setId("updateName");
-        namePropertyLayoutData.setActions(Lists.<ActionLayoutData>newArrayList());
-        namePropertyLayoutData.getActions().add(updateNameActionLayoutData);
-
-        ActionLayoutData deleteActionLayoutData = new ActionLayoutData();
-        deleteActionLayoutData.setId("delete");
-        fcPage.setActions(Lists.<ActionLayoutData>newArrayList());
-        fcPage.getActions().add(deleteActionLayoutData);
-
-        final String schemaLocations = gridServiceDefault.tnsAndSchemaLocation(fcPage);
-        String xml = jaxbService.toXml(fcPage,
-                ImmutableMap.<String,Object>of(Marshaller.JAXB_SCHEMA_LOCATION, schemaLocations));
-        System.out.println(xml);
-
-        FCGrid fcPageRoundtripped = jaxbService.fromXml(FCGrid.class, xml);
-        String xmlRoundtripped = jaxbService.toXml(fcPageRoundtripped,
-                ImmutableMap.<String,Object>of(Marshaller.JAXB_SCHEMA_LOCATION, schemaLocations));
-        assertThat(xml, is(equalTo(xmlRoundtripped)));
-
-
-        System.out.println("==========");
-
-        dumpXsd(fcPage);
-    }
-
-    protected void dumpXsd(final FCGrid fcPage) {
-        Map<String, String> schemas = jaxbService.toXsd(fcPage, JaxbService.IsisSchemas.INCLUDE);
-        for (Map.Entry<String, String> entry : schemas.entrySet()) {
-            System.out.println(entry.getKey() + ":");
-            System.out.println(entry.getValue());
-        }
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/isis/blob/69ed9c5e/core/viewer-wicket-impl/src/main/java/org/apache/isis/viewer/wicket/viewer/registries/components/ComponentFactoryRegistrarDefault.java
----------------------------------------------------------------------
diff --git a/core/viewer-wicket-impl/src/main/java/org/apache/isis/viewer/wicket/viewer/registries/components/ComponentFactoryRegistrarDefault.java b/core/viewer-wicket-impl/src/main/java/org/apache/isis/viewer/wicket/viewer/registries/components/ComponentFactoryRegistrarDefault.java
index 7120113..408a914 100644
--- a/core/viewer-wicket-impl/src/main/java/org/apache/isis/viewer/wicket/viewer/registries/components/ComponentFactoryRegistrarDefault.java
+++ b/core/viewer-wicket-impl/src/main/java/org/apache/isis/viewer/wicket/viewer/registries/components/ComponentFactoryRegistrarDefault.java
@@ -46,8 +46,6 @@ import org.apache.isis.viewer.wicket.ui.components.entity.selector.links.EntityL
 import org.apache.isis.viewer.wicket.ui.components.footer.FooterPanelFactory;
 import org.apache.isis.viewer.wicket.ui.components.header.HeaderPanelFactory;
 import org.apache.isis.viewer.wicket.ui.components.layout.EntityPanelFactory;
-import org.apache.isis.viewer.wicket.ui.components.layout.fixedcols.collections.EntityCollectionsPanelFactory;
-import org.apache.isis.viewer.wicket.ui.components.layout.fixedcols.propsandcolls.EntityPropsAndCollsPanelFactory;
 import org.apache.isis.viewer.wicket.ui.components.property.PropertyEditFormPanelFactory;
 import org.apache.isis.viewer.wicket.ui.components.property.PropertyEditPanelFactory;
 import org.apache.isis.viewer.wicket.ui.components.scalars.isisapplib.IsisBlobPanelFactory;
@@ -175,8 +173,6 @@ public class ComponentFactoryRegistrarDefault implements ComponentFactoryRegistr
         componentFactories.add(new EntityIconAndTitlePanelFactory());
         componentFactories.add(new EntityIconTitleAndCopyLinkPanelFactory());
         componentFactories.add(new EntityHeaderPanelFactory());
-        componentFactories.add(new EntityPropsAndCollsPanelFactory());
-        componentFactories.add(new EntityCollectionsPanelFactory());
     }
 
     protected void addComponentFactoriesForEntityCollectionContents(final ComponentFactoryList componentFactories) {

http://git-wip-us.apache.org/repos/asf/isis/blob/69ed9c5e/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/selector/links/EntityLinksSelectorPanelFactory.java
----------------------------------------------------------------------
diff --git a/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/selector/links/EntityLinksSelectorPanelFactory.java b/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/selector/links/EntityLinksSelectorPanelFactory.java
index d83915c..0057a30 100644
--- a/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/selector/links/EntityLinksSelectorPanelFactory.java
+++ b/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/selector/links/EntityLinksSelectorPanelFactory.java
@@ -24,7 +24,6 @@ import org.apache.wicket.model.IModel;
 
 import org.apache.isis.applib.layout.grid.bootstrap3.BS3Grid;
 import org.apache.isis.applib.layout.component.Grid;
-import org.apache.isis.core.metamodel.services.grid.fixedcols.applib.FCGrid;
 import org.apache.isis.core.metamodel.facets.object.grid.GridFacet;
 import org.apache.isis.core.metamodel.spec.ObjectSpecification;
 import org.apache.isis.viewer.wicket.model.models.EntityModel;
@@ -32,7 +31,6 @@ import org.apache.isis.viewer.wicket.ui.ComponentFactory;
 import org.apache.isis.viewer.wicket.ui.ComponentType;
 import org.apache.isis.viewer.wicket.ui.components.entity.EntityComponentFactoryAbstract;
 import org.apache.isis.viewer.wicket.ui.components.layout.bs3.BS3GridPanel;
-import org.apache.isis.viewer.wicket.ui.components.layout.fixedcols.FCGridPanel;
 
 /**
  * {@link ComponentFactory} for {@link EntityLinksSelectorPanel}.
@@ -55,9 +53,6 @@ public class EntityLinksSelectorPanelFactory extends EntityComponentFactoryAbstr
         final Grid grid = facet.getGrid();
         if (grid != null) {
             final EntityModel entityModelWithLayoutMetadata = entityModel.cloneWithLayoutMetadata(grid);
-            if(grid instanceof FCGrid) {
-                return new FCGridPanel(id, entityModelWithLayoutMetadata);
-            }
             if(grid instanceof BS3Grid) {
                 return new BS3GridPanel(id, entityModelWithLayoutMetadata);
             }

http://git-wip-us.apache.org/repos/asf/isis/blob/69ed9c5e/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/layout/fixedcols/FCGridPanel.html
----------------------------------------------------------------------
diff --git a/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/layout/fixedcols/FCGridPanel.html b/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/layout/fixedcols/FCGridPanel.html
deleted file mode 100644
index 7b172aa..0000000
--- a/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/layout/fixedcols/FCGridPanel.html
+++ /dev/null
@@ -1,34 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-  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.
--->
-<html xmlns:wicket="http://wicket.apache.org">
-<body>
-<wicket:panel>
-	<div class="entityTabbed">
-		<div wicket:id="entitySummary"></div>
-
-        <div class="row">
-            <div wicket:id="leftColumn" class = "leftColumn"/>
-            <div wicket:id="middleColumn" class="middleColumn"/>
-            <div wicket:id="rightColumn" class = "rightColumn"/>
-        </div>
-	</div>
-</wicket:panel>
-</body>
-</html>

http://git-wip-us.apache.org/repos/asf/isis/blob/69ed9c5e/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/layout/fixedcols/FCGridPanel.java
----------------------------------------------------------------------
diff --git a/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/layout/fixedcols/FCGridPanel.java b/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/layout/fixedcols/FCGridPanel.java
deleted file mode 100644
index 4623028..0000000
--- a/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/layout/fixedcols/FCGridPanel.java
+++ /dev/null
@@ -1,114 +0,0 @@
-/*
- *  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.layout.fixedcols;
-
-import java.util.List;
-
-import com.google.common.collect.FluentIterable;
-
-import org.apache.isis.core.metamodel.services.grid.fixedcols.applib.FCColumn;
-import org.apache.isis.core.metamodel.services.grid.fixedcols.applib.FCGrid;
-import org.apache.isis.core.metamodel.services.grid.fixedcols.applib.FCTabGroup;
-import org.apache.isis.core.metamodel.adapter.ObjectAdapter;
-import org.apache.isis.core.metamodel.facets.members.cssclass.CssClassFacet;
-import org.apache.isis.core.metamodel.facets.object.grid.GridFacet;
-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.layout.fixedcols.columns.EntityColumn;
-import org.apache.isis.viewer.wicket.ui.components.layout.fixedcols.tabgrouplist.TabGroupListPanel;
-import org.apache.isis.viewer.wicket.ui.panels.PanelAbstract;
-import org.apache.isis.viewer.wicket.ui.util.CssClassAppender;
-
-/**
- * {@link PanelAbstract Panel} to represent an entity on a single page made up
- * of several &lt;div&gt; regions.
- */
-public class FCGridPanel extends PanelAbstract<EntityModel> {
-
-    private static final long serialVersionUID = 1L;
-
-    private static final String ID_LEFT_COLUMN = "leftColumn";
-    private static final String ID_MIDDLE_COLUMN = "middleColumn";
-    private static final String ID_RIGHT_COLUMN = "rightColumn";
-
-    public FCGridPanel(final String id, final EntityModel entityModel) {
-        super(id, entityModel);
-        buildGui();
-    }
-
-    private void buildGui() {
-        final EntityModel model = getModel();
-        final ObjectAdapter objectAdapter = model.getObject();
-        final CssClassFacet facet = objectAdapter.getSpecification().getFacet(CssClassFacet.class);
-        if(facet != null) {
-            final String cssClass = facet.cssClass(objectAdapter);
-            CssClassAppender.appendCssClassTo(this, cssClass);
-        }
-
-        // forces metadata to be derived && synced
-        final GridFacet GridFacet = model.getTypeOfSpecification().getFacet(GridFacet.class);
-        final FCGrid page = (FCGrid) GridFacet.getGrid();
-
-
-        addOrReplace(ComponentType.ENTITY_SUMMARY, model);
-
-        final int leftSpan = addColumnIfRequired(ID_LEFT_COLUMN, page.getLeft());
-
-        final TabGroupListPanel middleTabs = addTabGroups(ID_MIDDLE_COLUMN, page.getTabGroups());
-
-        final int rightSpan = addColumnIfRequired(ID_RIGHT_COLUMN, page.getRight());
-
-        final int columnSpans = leftSpan + rightSpan;
-        int tabGroupSpan = columnSpans < 12 ? 12 - (columnSpans) : 12;
-        CssClassAppender.appendCssClassTo(middleTabs, "col-xs-" + tabGroupSpan);
-
-    }
-
-    private TabGroupListPanel addTabGroups(
-            final String id, final List<FCTabGroup> tabGroupList) {
-        final EntityModel model = getModel();
-        final List<FCTabGroup> tabGroups = FluentIterable
-                .from(tabGroupList)
-                .filter(FCTabGroup.Predicates.notEmpty())
-                .toList();
-        final EntityModel entityModelWitHints = model.cloneWithLayoutMetadata(tabGroups);
-        final TabGroupListPanel middleComponent = new TabGroupListPanel(id, entityModelWitHints);
-        addOrReplace(middleComponent);
-        return middleComponent;
-    }
-
-    private int addColumnIfRequired(final String id, final FCColumn col) {
-        if(col != null) {
-            final EntityModel entityModel =
-                    getModel().cloneWithLayoutMetadata(col);
-            final FCColumn fcColumn = (FCColumn) entityModel.getLayoutMetadata();
-            final int span = fcColumn.getSpan();
-            if(span > 0) {
-                final EntityColumn entityColumn = new EntityColumn(id, entityModel);
-                addOrReplace(entityColumn);
-                CssClassAppender.appendCssClassTo(entityColumn, "col-xs-" + span);
-                return span;
-            }
-        }
-        permanentlyHide(id);
-        return 0;
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/isis/blob/69ed9c5e/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/layout/fixedcols/PropUtil.java
----------------------------------------------------------------------
diff --git a/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/layout/fixedcols/PropUtil.java b/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/layout/fixedcols/PropUtil.java
deleted file mode 100644
index 7fdd5ec..0000000
--- a/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/layout/fixedcols/PropUtil.java
+++ /dev/null
@@ -1,92 +0,0 @@
-/*
- *  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.layout.fixedcols;
-
-import java.util.List;
-import java.util.Map;
-
-import com.google.common.collect.FluentIterable;
-
-import org.apache.isis.applib.annotation.Where;
-import org.apache.isis.applib.filter.Filter;
-import org.apache.isis.applib.filter.Filters;
-import org.apache.isis.core.metamodel.services.grid.fixedcols.applib.FCColumn;
-import org.apache.isis.applib.layout.component.FieldSet;
-import org.apache.isis.core.metamodel.adapter.ObjectAdapter;
-import org.apache.isis.core.metamodel.consent.InteractionInitiatedBy;
-import org.apache.isis.core.metamodel.services.grid.fixedcols.applib.Hint;
-import org.apache.isis.core.metamodel.spec.ObjectSpecification;
-import org.apache.isis.core.metamodel.spec.ObjectSpecifications;
-import org.apache.isis.core.metamodel.spec.feature.Contributed;
-import org.apache.isis.core.metamodel.spec.feature.ObjectAssociation;
-import org.apache.isis.viewer.wicket.model.models.EntityModel;
-
-public final class PropUtil {
-
-    private PropUtil() {
-    }
-
-    public static List<String> propertyGroupNames(
-            final EntityModel entityModel,
-            final Hint hint, final FCColumn columnMetaDataIfAny) {
-        final ObjectAdapter adapter = entityModel.getObject();
-        final ObjectSpecification objSpec = adapter.getSpecification();
-
-        final Map<String, List<ObjectAssociation>> associationsByGroup =
-                propertiesByMemberOrder(adapter);
-
-        return columnMetaDataIfAny != null
-                ? FluentIterable
-                .from(columnMetaDataIfAny.getFieldSets())
-                .transform(FieldSet.Util.nameOf())
-                .toList()
-                : ObjectSpecifications.orderByMemberGroups(objSpec, associationsByGroup.keySet(),
-                hint);
-    }
-
-    public static Map<String, List<ObjectAssociation>> propertiesByMemberOrder(final ObjectAdapter adapter) {
-        final List<ObjectAssociation> properties = visibleProperties(adapter);
-        return ObjectAssociation.Util.groupByMemberOrderName(properties);
-    }
-
-    private static List<ObjectAssociation> visibleProperties(final ObjectAdapter adapter) {
-        return visibleProperties(adapter, Filters.<ObjectAssociation>any());
-    }
-
-    private static List<ObjectAssociation> visibleProperties(
-            final ObjectAdapter adapter,
-            final Filter<ObjectAssociation> filter) {
-        final ObjectSpecification objSpec = adapter.getSpecification();
-
-        return objSpec.getAssociations(
-                Contributed.INCLUDED, visiblePropertiesFilter(adapter, filter));
-    }
-
-    @SuppressWarnings("unchecked")
-    private static Filter<ObjectAssociation> visiblePropertiesFilter(
-            final ObjectAdapter adapter,
-            final Filter<ObjectAssociation> filter) {
-        return Filters.and(
-                ObjectAssociation.Filters.PROPERTIES,
-                ObjectAssociation.Filters.dynamicallyVisible(
-                        adapter, InteractionInitiatedBy.USER, Where.OBJECT_FORMS),
-                filter);
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/isis/blob/69ed9c5e/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/layout/fixedcols/collections/EntityCollectionsPanel.html
----------------------------------------------------------------------
diff --git a/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/layout/fixedcols/collections/EntityCollectionsPanel.html b/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/layout/fixedcols/collections/EntityCollectionsPanel.html
deleted file mode 100644
index 0e03ea9..0000000
--- a/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/layout/fixedcols/collections/EntityCollectionsPanel.html
+++ /dev/null
@@ -1,32 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-  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.
--->
-<html xmlns:wicket="http://wicket.apache.org">
-    <body>
-        <wicket:panel>
-            <div class="entityCollectionsPanel entityCollectionsComponentType">
-                <div wicket:id="collections">
-                    <div wicket:id="collection">
-                         [collection]
-                    </div>
-                </div>
-            </div>
-        </wicket:panel>
-    </body>
-</html>

http://git-wip-us.apache.org/repos/asf/isis/blob/69ed9c5e/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/layout/fixedcols/collections/EntityCollectionsPanel.java
----------------------------------------------------------------------
diff --git a/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/layout/fixedcols/collections/EntityCollectionsPanel.java b/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/layout/fixedcols/collections/EntityCollectionsPanel.java
deleted file mode 100644
index 09337dc..0000000
--- a/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/layout/fixedcols/collections/EntityCollectionsPanel.java
+++ /dev/null
@@ -1,151 +0,0 @@
-/*
- *  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.layout.fixedcols.collections;
-
-import java.util.Comparator;
-import java.util.List;
-
-import com.google.common.collect.FluentIterable;
-import com.google.common.collect.ImmutableList;
-
-import org.apache.wicket.markup.html.WebMarkupContainer;
-import org.apache.wicket.markup.repeater.RepeatingView;
-
-import org.apache.isis.applib.annotation.Where;
-import org.apache.isis.applib.filter.Filter;
-import org.apache.isis.applib.filter.Filters;
-import org.apache.isis.applib.layout.component.CollectionLayoutData;
-import org.apache.isis.core.metamodel.services.grid.fixedcols.applib.FCColumn;
-import org.apache.isis.core.metamodel.adapter.ObjectAdapter;
-import org.apache.isis.core.metamodel.consent.InteractionInitiatedBy;
-import org.apache.isis.core.metamodel.facets.members.order.MemberOrderFacet;
-import org.apache.isis.core.metamodel.spec.feature.Contributed;
-import org.apache.isis.core.metamodel.spec.feature.ObjectAssociation;
-import org.apache.isis.core.metamodel.util.DeweyOrderComparator;
-import org.apache.isis.viewer.wicket.model.models.EntityModel;
-import org.apache.isis.viewer.wicket.ui.components.entity.collection.EntityCollectionPanel;
-import org.apache.isis.viewer.wicket.ui.panels.PanelAbstract;
-
-/**
- * {@link PanelAbstract Panel} representing the properties of an entity, as per
- * the provided {@link EntityModel}.
- */
-public class EntityCollectionsPanel extends PanelAbstract<EntityModel> {
-
-    private static final long serialVersionUID = 1L;
-
-    private static final String ID_ENTITY_COLLECTIONS = "entityCollections";
-    private static final String ID_COLLECTIONS = "collections";
-    private static final String ID_COLLECTION = "collection";
-
-    // view metadata (if any available)
-    private final FCColumn fcColumnIfAny;
-
-    public EntityCollectionsPanel(final String id, final EntityModel entityModel) {
-        super(id, entityModel);
-
-        fcColumnIfAny = (FCColumn) entityModel.getLayoutMetadata();
-
-        buildGui();
-    }
-
-    private void buildGui() {
-        buildEntityPropertiesAndOrCollectionsGui();
-        setOutputMarkupId(true); // so can repaint via ajax
-    }
-
-    private void buildEntityPropertiesAndOrCollectionsGui() {
-        final EntityModel model = getModel();
-        final ObjectAdapter adapter = model.getObject();
-        if (adapter != null) {
-            addCollections();
-        } else {
-            permanentlyHide(ID_ENTITY_COLLECTIONS);
-        }
-    }
-
-    private void addCollections() {
-        final EntityModel entityModel = getModel();
-        final ObjectAdapter adapter = entityModel.getObject();
-
-        final Filter<ObjectAssociation> filter;
-        if (fcColumnIfAny != null) {
-            final ImmutableList<String> collectionIds = FluentIterable
-                    .from(fcColumnIfAny.getCollections())
-                    .transform(CollectionLayoutData.Functions.id())
-                    .toList();
-            filter = new Filter<ObjectAssociation>() {
-                @Override
-                public boolean accept(final ObjectAssociation objectAssociation) {
-                    return collectionIds.contains(objectAssociation.getId());
-                }
-            };
-        } else {
-            filter = Filters.any();
-        }
-
-        final List<ObjectAssociation> associations = visibleCollections(adapter, filter);
-        associations.sort(new Comparator<ObjectAssociation>() {
-            private final DeweyOrderComparator deweyOrderComparator = new DeweyOrderComparator();
-            @Override
-            public int compare(final ObjectAssociation o1, final ObjectAssociation o2) {
-                final MemberOrderFacet o1Facet = o1.getFacet(MemberOrderFacet.class);
-                final MemberOrderFacet o2Facet = o2.getFacet(MemberOrderFacet.class);
-                return o1Facet == null? +1:
-                        o2Facet == null? -1:
-                        deweyOrderComparator.compare(o1Facet.sequence(), o2Facet.sequence());
-            }
-        });
-
-        final RepeatingView collectionRv = new RepeatingView(ID_COLLECTIONS);
-        add(collectionRv);
-
-        for (final ObjectAssociation association : associations) {
-
-            final WebMarkupContainer collectionRvContainer = new WebMarkupContainer(collectionRv.newChildId());
-            collectionRv.add(collectionRvContainer);
-
-            final CollectionLayoutData collectionLayoutData = new CollectionLayoutData(association.getId());
-            final EntityModel entityModelWithCollectionLayoutMetadata =
-                    entityModel.cloneWithLayoutMetadata(collectionLayoutData);
-
-            collectionRvContainer.add(new EntityCollectionPanel(ID_COLLECTION, entityModelWithCollectionLayoutMetadata));
-        }
-    }
-
-    private static List<ObjectAssociation> visibleCollections(
-            final ObjectAdapter adapter,
-            final Filter<ObjectAssociation> filter) {
-        return adapter.getSpecification().getAssociations(
-                Contributed.INCLUDED, visibleCollectionsFilter(adapter, filter));
-    }
-
-    @SuppressWarnings("unchecked")
-    private static Filter<ObjectAssociation> visibleCollectionsFilter(
-            final ObjectAdapter adapter,
-            final Filter<ObjectAssociation> filter) {
-        return Filters.and(
-                ObjectAssociation.Filters.COLLECTIONS,
-                ObjectAssociation.Filters.dynamicallyVisible(
-                        adapter, InteractionInitiatedBy.USER, Where.PARENTED_TABLES),
-                filter);
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/isis/blob/69ed9c5e/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/layout/fixedcols/collections/EntityCollectionsPanelFactory.java
----------------------------------------------------------------------
diff --git a/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/layout/fixedcols/collections/EntityCollectionsPanelFactory.java b/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/layout/fixedcols/collections/EntityCollectionsPanelFactory.java
deleted file mode 100644
index 797720b..0000000
--- a/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/layout/fixedcols/collections/EntityCollectionsPanelFactory.java
+++ /dev/null
@@ -1,49 +0,0 @@
-/*
- *  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.layout.fixedcols.collections;
-
-import org.apache.wicket.Component;
-import org.apache.wicket.model.IModel;
-
-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;
-import org.apache.isis.viewer.wicket.ui.components.entity.EntityComponentFactoryAbstract;
-
-/**
- * {@link ComponentFactory} for {@link EntityCollectionsPanel}.
- */
-public class EntityCollectionsPanelFactory extends EntityComponentFactoryAbstract {
-
-    private static final long serialVersionUID = 1L;
-
-    public EntityCollectionsPanelFactory() {
-        super(ComponentType.ENTITY_COLLECTIONS, EntityCollectionsPanel.class);
-    }
-
-    @Override
-    public Component createComponent(final String id, final IModel<?> model) {
-        final EntityModel entityModel = (EntityModel) model;
-        return new EntityCollectionsPanel(id, entityModel);
-    }
-}
-
-
-

http://git-wip-us.apache.org/repos/asf/isis/blob/69ed9c5e/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/layout/fixedcols/columns/EntityColumn.html
----------------------------------------------------------------------
diff --git a/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/layout/fixedcols/columns/EntityColumn.html b/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/layout/fixedcols/columns/EntityColumn.html
deleted file mode 100644
index 44e3a23..0000000
--- a/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/layout/fixedcols/columns/EntityColumn.html
+++ /dev/null
@@ -1,31 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-  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.
--->
-<html xmlns:wicket="http://wicket.apache.org">
-    <body>
-        <wicket:panel>
-            <div class="columnMembers">
-                <div class="inputFormTable properties">
-                    <div wicket:id="propertyGroup">[propertyGroup]</div>
-                </div>
-                <div wicket:id="collections"></div>
-            </div>
-        </wicket:panel>
-    </body>
-</html>

http://git-wip-us.apache.org/repos/asf/isis/blob/69ed9c5e/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/layout/fixedcols/columns/EntityColumn.java
----------------------------------------------------------------------
diff --git a/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/layout/fixedcols/columns/EntityColumn.java b/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/layout/fixedcols/columns/EntityColumn.java
deleted file mode 100644
index b790d2f..0000000
--- a/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/layout/fixedcols/columns/EntityColumn.java
+++ /dev/null
@@ -1,191 +0,0 @@
-/*
- *  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.layout.fixedcols.columns;
-
-import java.util.Collection;
-import java.util.List;
-import java.util.Map;
-
-import com.google.common.base.Function;
-import com.google.common.collect.FluentIterable;
-import com.google.common.collect.ImmutableMap;
-import com.google.common.collect.Maps;
-
-import org.apache.wicket.MarkupContainer;
-import org.apache.wicket.markup.html.WebMarkupContainer;
-import org.apache.wicket.markup.repeater.RepeatingView;
-
-import org.apache.isis.applib.layout.component.FieldSet;
-import org.apache.isis.applib.layout.component.PropertyLayoutData;
-import org.apache.isis.core.metamodel.services.grid.fixedcols.applib.FCColumn;
-import org.apache.isis.core.metamodel.adapter.ObjectAdapter;
-import org.apache.isis.core.metamodel.facets.object.membergroups.MemberGroupLayoutFacet;
-import org.apache.isis.core.metamodel.services.grid.fixedcols.applib.Hint;
-import org.apache.isis.core.metamodel.spec.ObjectSpecification;
-import org.apache.isis.core.metamodel.spec.ObjectSpecifications;
-import org.apache.isis.core.metamodel.spec.feature.ObjectAssociation;
-import org.apache.isis.core.runtime.system.DeploymentType;
-import org.apache.isis.core.runtime.system.context.IsisContext;
-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.layout.fixedcols.PropUtil;
-import org.apache.isis.viewer.wicket.ui.components.entity.fieldset.PropertyGroup;
-import org.apache.isis.viewer.wicket.ui.panels.PanelAbstract;
-import org.apache.isis.viewer.wicket.ui.util.Components;
-
-/**
- * Adds properties (in property groups) and collections to a column.
- *
- * <p>
- *     If {@link FCColumn} is present, then only those properties and collections for that
- *     column metadata are rendered.   Otherwise the {@link MemberGroupLayoutFacet} on the
- *     {@link ObjectSpecification} in conjunction with the provided {@link Hint} is
- *     used to filter down to just those properties/collections in the column.
- * </p>
- */
-public class EntityColumn extends PanelAbstract<EntityModel> {
-
-    private static final long serialVersionUID = 1L;
-
-    private static final String ID_PROPERTY_GROUP = "propertyGroup";
-
-
-    // view metadata (populated for EntityTabbedPanel, absent for EntityEditablePanel)
-    private final FCColumn columnMetaDataIfAny;
-
-    // which column to render (populated for EntityEditablePanel, not required and so absent for EntityTabbedPanel)
-    final Hint hint;
-
-    private static Hint hintFrom(final EntityModel entityModel) {
-        final FCColumn fcColumn = (FCColumn) entityModel.getLayoutMetadata();
-        return fcColumn.getHint();
-    }
-
-
-    public EntityColumn(
-            final String id,
-            final EntityModel entityModel) {
-
-        this(id, entityModel, hintFrom(entityModel));
-    }
-
-    public EntityColumn(
-            final String id,
-            final EntityModel entityModel,
-            final Hint hint) {
-
-        super(id, entityModel);
-
-        columnMetaDataIfAny = (FCColumn) entityModel.getLayoutMetadata();
-        this.hint = hint;
-
-        buildGui();
-    }
-
-    private void buildGui() {
-        addPropertiesAndCollections(this, getModel());
-    }
-
-    private void addPropertiesAndCollections(
-            final MarkupContainer col,
-            final EntityModel entityModel) {
-        addPropertiesInColumn(col, entityModel);
-        addCollectionsIfRequired(col, entityModel);
-    }
-
-    private void addPropertiesInColumn(
-            final MarkupContainer markupContainer,
-            final EntityModel entityModel) {
-
-        final ObjectAdapter adapter = entityModel.getObject();
-        final ObjectSpecification objSpec = adapter.getSpecification();
-
-        final Map<String, List<ObjectAssociation>> associationsByGroup = PropUtil.propertiesByMemberOrder(adapter);
-
-        final RepeatingView memberGroupRv = new RepeatingView(ID_PROPERTY_GROUP);
-        markupContainer.add(memberGroupRv);
-
-        final ImmutableMap<String, FieldSet> propertyGroupMetadataByNameIfAny =
-                columnMetaDataIfAny != null
-                    ? Maps.uniqueIndex(columnMetaDataIfAny.getFieldSets(), FieldSet.Util.nameOf())
-                    : null;
-
-        final Collection<String> groupNames =
-                propertyGroupMetadataByNameIfAny != null
-                    ? propertyGroupMetadataByNameIfAny.keySet()
-                    : ObjectSpecifications.orderByMemberGroups(objSpec, associationsByGroup.keySet(), hint);
-
-        for(final String groupName: groupNames) {
-
-
-            final FieldSet fieldSet;
-            if (propertyGroupMetadataByNameIfAny != null) {
-                fieldSet = propertyGroupMetadataByNameIfAny.get(groupName);
-            }
-            else {
-                final List<ObjectAssociation> associationsInGroup = associationsByGroup.get(groupName);
-                fieldSet = new FieldSet(groupName);
-                fieldSet.setProperties(
-                        FluentIterable
-                                .from(associationsInGroup)
-                                .transform(
-                                    new Function<ObjectAssociation, PropertyLayoutData>() {
-                                        @Override
-                                        public PropertyLayoutData apply(final ObjectAssociation assoc) {
-                                            return new PropertyLayoutData(assoc.getId());
-                                        }
-                                    }).toList());
-            }
-
-            if(fieldSet.getProperties().isEmpty()) {
-                continue;
-            }
-
-            final String id = memberGroupRv.newChildId();
-
-            final EntityModel entityModelWithHints = entityModel.cloneWithLayoutMetadata(fieldSet);
-            final WebMarkupContainer memberGroupRvContainer = new PropertyGroup(id, entityModelWithHints);
-
-            memberGroupRv.add(memberGroupRvContainer);
-        }
-    }
-
-    private void addCollectionsIfRequired(
-            final MarkupContainer column,
-            final EntityModel entityModel) {
-
-        if(columnMetaDataIfAny != null) {
-            getComponentFactoryRegistry()
-                    .addOrReplaceComponent(column, "collections", ComponentType.ENTITY_COLLECTIONS, entityModel);
-        } else {
-            Components.permanentlyHide(column, "collections");
-        }
-    }
-
-
-
-    ///////////////////////////////////////////////////////
-    // Dependencies (from context)
-    ///////////////////////////////////////////////////////
-
-    protected DeploymentType getDeploymentType() {
-        return IsisContext.getDeploymentType();
-    }
-
-}