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/03/03 20:46:54 UTC

[01/50] [abbrv] isis git commit: ISIS-993: introducing the concept of minimal/normalized/complete grids (still WIP)

Repository: isis
Updated Branches:
  refs/heads/master 25f5899d6 -> 4f3932d38


http://git-wip-us.apache.org/repos/asf/isis/blob/5c831757/core/metamodel/src/test/java/org/apache/isis/core/metamodel/services/grid/BS3GridTest.java
----------------------------------------------------------------------
diff --git a/core/metamodel/src/test/java/org/apache/isis/core/metamodel/services/grid/BS3GridTest.java b/core/metamodel/src/test/java/org/apache/isis/core/metamodel/services/grid/BS3GridTest.java
index 706db56..7b90b82 100644
--- a/core/metamodel/src/test/java/org/apache/isis/core/metamodel/services/grid/BS3GridTest.java
+++ b/core/metamodel/src/test/java/org/apache/isis/core/metamodel/services/grid/BS3GridTest.java
@@ -30,6 +30,7 @@ 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.bootstrap3.BS3Col;
 import org.apache.isis.applib.layout.bootstrap3.BS3Grid;
 import org.apache.isis.applib.layout.bootstrap3.BS3Row;

http://git-wip-us.apache.org/repos/asf/isis/blob/5c831757/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
index 5cb1ed6..d3fbd1a 100644
--- 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
@@ -30,14 +30,15 @@ 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.common.ActionLayoutData;
 import org.apache.isis.applib.layout.common.CollectionLayoutData;
 import org.apache.isis.applib.layout.common.FieldSet;
 import org.apache.isis.applib.layout.common.PropertyLayoutData;
-import org.apache.isis.applib.layout.fixedcols.FCColumn;
-import org.apache.isis.applib.layout.fixedcols.FCGrid;
-import org.apache.isis.applib.layout.fixedcols.FCTab;
-import org.apache.isis.applib.layout.fixedcols.FCTabGroup;
+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;
 

http://git-wip-us.apache.org/repos/asf/isis/blob/5c831757/core/viewer-wicket-model/src/main/java/org/apache/isis/viewer/wicket/model/models/EntityModel.java
----------------------------------------------------------------------
diff --git a/core/viewer-wicket-model/src/main/java/org/apache/isis/viewer/wicket/model/models/EntityModel.java b/core/viewer-wicket-model/src/main/java/org/apache/isis/viewer/wicket/model/models/EntityModel.java
index d99b2a4..22866d4 100644
--- a/core/viewer-wicket-model/src/main/java/org/apache/isis/viewer/wicket/model/models/EntityModel.java
+++ b/core/viewer-wicket-model/src/main/java/org/apache/isis/viewer/wicket/model/models/EntityModel.java
@@ -29,7 +29,7 @@ import org.apache.wicket.model.Model;
 import org.apache.wicket.request.mapper.parameter.PageParameters;
 
 import org.apache.isis.applib.annotation.BookmarkPolicy;
-import org.apache.isis.applib.layout.fixedcols.FCColumn.Hint;
+import org.apache.isis.core.metamodel.services.grid.fixedcols.applib.FCColumn.Hint;
 import org.apache.isis.applib.services.memento.MementoService.Memento;
 import org.apache.isis.core.metamodel.adapter.ObjectAdapter;
 import org.apache.isis.core.metamodel.adapter.mgr.AdapterManager.ConcurrencyChecking;

http://git-wip-us.apache.org/repos/asf/isis/blob/5c831757/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 8b2f322..6b7dfcc 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,7 @@ import org.apache.wicket.model.IModel;
 
 import org.apache.isis.applib.layout.bootstrap3.BS3Grid;
 import org.apache.isis.applib.layout.common.Grid;
-import org.apache.isis.applib.layout.fixedcols.FCGrid;
+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;

http://git-wip-us.apache.org/repos/asf/isis/blob/5c831757/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
index 2db578d..4623028 100644
--- 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
@@ -23,9 +23,9 @@ import java.util.List;
 
 import com.google.common.collect.FluentIterable;
 
-import org.apache.isis.applib.layout.fixedcols.FCColumn;
-import org.apache.isis.applib.layout.fixedcols.FCGrid;
-import org.apache.isis.applib.layout.fixedcols.FCTabGroup;
+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;

http://git-wip-us.apache.org/repos/asf/isis/blob/5c831757/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
index 0cafe36..9079391 100644
--- 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
@@ -26,7 +26,7 @@ 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.applib.layout.fixedcols.FCColumn;
+import org.apache.isis.core.metamodel.services.grid.fixedcols.applib.FCColumn;
 import org.apache.isis.applib.layout.common.FieldSet;
 import org.apache.isis.core.metamodel.adapter.ObjectAdapter;
 import org.apache.isis.core.metamodel.consent.InteractionInitiatedBy;

http://git-wip-us.apache.org/repos/asf/isis/blob/5c831757/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
index 21c2ed0..b89009b 100644
--- 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
@@ -32,7 +32,7 @@ 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.common.CollectionLayoutData;
-import org.apache.isis.applib.layout.fixedcols.FCColumn;
+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;

http://git-wip-us.apache.org/repos/asf/isis/blob/5c831757/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
index cfb9bfa..aaacdef 100644
--- 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
@@ -33,7 +33,7 @@ import org.apache.wicket.markup.repeater.RepeatingView;
 
 import org.apache.isis.applib.layout.common.FieldSet;
 import org.apache.isis.applib.layout.common.PropertyLayoutData;
-import org.apache.isis.applib.layout.fixedcols.FCColumn;
+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.spec.ObjectSpecification;

http://git-wip-us.apache.org/repos/asf/isis/blob/5c831757/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
index f1f2a78..0b1d7b7 100644
--- 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
@@ -44,9 +44,9 @@ 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.applib.layout.fixedcols.FCColumn;
-import org.apache.isis.applib.layout.fixedcols.FCColumn.Hint;
-import org.apache.isis.applib.layout.fixedcols.FCTab;
+import org.apache.isis.core.metamodel.services.grid.fixedcols.applib.FCColumn;
+import org.apache.isis.core.metamodel.services.grid.fixedcols.applib.FCColumn.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;

http://git-wip-us.apache.org/repos/asf/isis/blob/5c831757/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
index 0934f80..f95d8db 100644
--- 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
@@ -24,7 +24,7 @@ import java.util.List;
 import org.apache.wicket.markup.html.list.ListItem;
 import org.apache.wicket.markup.html.list.ListView;
 
-import org.apache.isis.applib.layout.fixedcols.FCTabGroup;
+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;

http://git-wip-us.apache.org/repos/asf/isis/blob/5c831757/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
index 1e84474..77c90c1 100644
--- 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
@@ -29,8 +29,8 @@ 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.applib.layout.fixedcols.FCTab;
-import org.apache.isis.applib.layout.fixedcols.FCTabGroup;
+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;
 

http://git-wip-us.apache.org/repos/asf/isis/blob/5c831757/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
index 1dda0c6..d475fc8 100644
--- 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
@@ -1,6 +1,6 @@
 package org.apache.isis.viewer.wicket.ui.components.layout.fixedcols.tabs;
 
-import org.apache.isis.applib.layout.fixedcols.FCTab;
+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;


[10/50] [abbrv] isis git commit: ISIS-993: moving around and renaming the applib schema files for layout

Posted by da...@apache.org.
ISIS-993: moving around and renaming the applib schema files for layout


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

Branch: refs/heads/master
Commit: 67b6e05e0536dc8df60a57e2e9f705dfd244c46a
Parents: 7894322
Author: Dan Haywood <da...@haywood-associates.co.uk>
Authored: Wed Feb 10 16:12:21 2016 +0000
Committer: Dan Haywood <da...@haywood-associates.co.uk>
Committed: Wed Feb 10 16:12:21 2016 +0000

----------------------------------------------------------------------
 .../applib/layout/component/component.xsd       | 136 +++++++++
 .../layout/grid/bootstrap3/bootstrap3.xsd       | 136 +++++++++
 .../applib/layout/bootstrap3/bootstrap3.xsd     | 136 ---------
 .../schema/applib/layout/common/common.xsd      | 136 ---------
 .../applib/layout/fixedcols/fixedcols.xsd       |  39 ---
 .../isis/applib/annotation/ActionLayout.java    |   4 +-
 .../isis/applib/annotation/BookmarkPolicy.java  |   2 +-
 .../isis/applib/annotation/Contributed.java     |   2 +-
 .../isis/applib/annotation/LabelPosition.java   |   2 +-
 .../isis/applib/annotation/RenderType.java      |   2 +-
 .../apache/isis/applib/annotation/Where.java    |   2 +-
 .../applib/layout/bootstrap3/BS3ClearFix.java   |  24 --
 .../layout/bootstrap3/BS3ClearFixHidden.java    |  39 ---
 .../layout/bootstrap3/BS3ClearFixVisible.java   |  59 ----
 .../isis/applib/layout/bootstrap3/BS3Col.java   | 257 ----------------
 .../applib/layout/bootstrap3/BS3Element.java    |  35 ---
 .../layout/bootstrap3/BS3ElementAbstract.java   |  46 ---
 .../isis/applib/layout/bootstrap3/BS3Grid.java  | 304 -------------------
 .../isis/applib/layout/bootstrap3/BS3Row.java   | 140 ---------
 .../applib/layout/bootstrap3/BS3RowContent.java |  95 ------
 .../layout/bootstrap3/BS3RowContentOwner.java   |  25 --
 .../applib/layout/bootstrap3/BS3RowOwner.java   |  28 --
 .../isis/applib/layout/bootstrap3/BS3Tab.java   | 177 -----------
 .../applib/layout/bootstrap3/BS3TabGroup.java   | 123 --------
 .../layout/bootstrap3/BS3TabGroupOwner.java     |  28 --
 .../applib/layout/bootstrap3/BS3TabOwner.java   |  28 --
 .../isis/applib/layout/bootstrap3/HasCssId.java |  28 --
 .../applib/layout/bootstrap3/WithinGrid.java    |  27 --
 .../applib/layout/bootstrap3/package-info.java  |  34 ---
 .../applib/layout/common/ActionLayoutData.java  | 253 ---------------
 .../layout/common/ActionLayoutDataOwner.java    |  25 --
 .../layout/common/CollectionLayoutData.java     | 268 ----------------
 .../common/CollectionLayoutDataOwner.java       |  26 --
 .../layout/common/DomainObjectLayoutData.java   | 208 -------------
 .../common/DomainObjectLayoutDataOwner.java     |  25 --
 .../isis/applib/layout/common/FieldSet.java     | 223 --------------
 .../applib/layout/common/FieldSetOwner.java     |  25 --
 .../apache/isis/applib/layout/common/Grid.java  |  84 -----
 .../isis/applib/layout/common/GridAbstract.java | 181 -----------
 .../applib/layout/common/HasBookmarking.java    |  14 -
 .../isis/applib/layout/common/HasCssClass.java  |  12 -
 .../applib/layout/common/HasCssClassFa.java     |  16 -
 .../applib/layout/common/HasDescribedAs.java    |  12 -
 .../isis/applib/layout/common/HasHidden.java    |  14 -
 .../isis/applib/layout/common/HasNamed.java     |  17 --
 .../isis/applib/layout/common/MemberRegion.java |  33 --
 .../applib/layout/common/MemberRegionOwner.java |  23 --
 .../apache/isis/applib/layout/common/Owned.java |  23 --
 .../apache/isis/applib/layout/common/Owner.java |  24 --
 .../layout/common/PropertyLayoutData.java       | 252 ---------------
 .../isis/applib/layout/common/package-info.java |  36 ---
 .../layout/component/ActionLayoutData.java      | 253 +++++++++++++++
 .../layout/component/ActionLayoutDataOwner.java |  25 ++
 .../layout/component/CollectionLayoutData.java  | 268 ++++++++++++++++
 .../component/CollectionLayoutDataOwner.java    |  26 ++
 .../component/DomainObjectLayoutData.java       | 208 +++++++++++++
 .../component/DomainObjectLayoutDataOwner.java  |  25 ++
 .../isis/applib/layout/component/FieldSet.java  | 223 ++++++++++++++
 .../applib/layout/component/FieldSetOwner.java  |  25 ++
 .../isis/applib/layout/component/Grid.java      |  84 +++++
 .../applib/layout/component/GridAbstract.java   | 181 +++++++++++
 .../applib/layout/component/HasBookmarking.java |  14 +
 .../applib/layout/component/HasCssClass.java    |  12 +
 .../applib/layout/component/HasCssClassFa.java  |  16 +
 .../applib/layout/component/HasDescribedAs.java |  12 +
 .../isis/applib/layout/component/HasHidden.java |  14 +
 .../isis/applib/layout/component/HasNamed.java  |  17 ++
 .../applib/layout/component/MemberRegion.java   |  33 ++
 .../layout/component/MemberRegionOwner.java     |  23 ++
 .../isis/applib/layout/component/Owned.java     |  23 ++
 .../isis/applib/layout/component/Owner.java     |  24 ++
 .../layout/component/PropertyLayoutData.java    | 252 +++++++++++++++
 .../applib/layout/component/package-info.java   |  36 +++
 .../layout/grid/bootstrap3/BS3ClearFix.java     |  24 ++
 .../grid/bootstrap3/BS3ClearFixHidden.java      |  39 +++
 .../grid/bootstrap3/BS3ClearFixVisible.java     |  59 ++++
 .../applib/layout/grid/bootstrap3/BS3Col.java   | 257 ++++++++++++++++
 .../layout/grid/bootstrap3/BS3Element.java      |  35 +++
 .../grid/bootstrap3/BS3ElementAbstract.java     |  46 +++
 .../applib/layout/grid/bootstrap3/BS3Grid.java  | 304 +++++++++++++++++++
 .../applib/layout/grid/bootstrap3/BS3Row.java   | 140 +++++++++
 .../layout/grid/bootstrap3/BS3RowContent.java   |  95 ++++++
 .../grid/bootstrap3/BS3RowContentOwner.java     |  25 ++
 .../layout/grid/bootstrap3/BS3RowOwner.java     |  28 ++
 .../applib/layout/grid/bootstrap3/BS3Tab.java   | 177 +++++++++++
 .../layout/grid/bootstrap3/BS3TabGroup.java     | 123 ++++++++
 .../grid/bootstrap3/BS3TabGroupOwner.java       |  28 ++
 .../layout/grid/bootstrap3/BS3TabOwner.java     |  28 ++
 .../applib/layout/grid/bootstrap3/HasCssId.java |  28 ++
 .../layout/grid/bootstrap3/WithinGrid.java      |  27 ++
 .../layout/grid/bootstrap3/package-info.java    |  34 +++
 .../services/layout/GridNormalizerService.java  |   2 +-
 .../applib/services/layout/GridService.java     |   2 +-
 .../layout/Object_downloadLayoutXml.java        |   2 +-
 .../services/layout/Object_viewLayout.java      |   2 +-
 .../layout/ActionPositionFacetForActionXml.java |   2 +-
 .../layout/BookmarkPolicyFacetForActionXml.java |   2 +-
 .../layout/CssClassFaFacetForActionXml.java     |   2 +-
 .../layout/CssClassFacetForActionXml.java       |   2 +-
 .../layout/DescribedAsFacetForActionXml.java    |   2 +-
 .../layout/HiddenFacetForActionLayoutXml.java   |   2 +-
 .../actions/layout/NamedFacetForActionXml.java  |   2 +-
 .../layout/CssClassFacetForCollectionXml.java   |   2 +-
 .../DefaultViewFacetForCollectionXml.java       |   2 +-
 .../DescribedAsFacetForCollectionXml.java       |   2 +-
 .../layout/HiddenFacetForCollectionXml.java     |   2 +-
 .../layout/NamedFacetForCollectionXml.java      |   2 +-
 .../layout/PagedFacetForCollectionXml.java      |   2 +-
 .../layout/SortedByFacetForCollectionXml.java   |   2 +-
 .../metamodel/facets/object/grid/GridFacet.java |   2 +-
 .../facets/object/grid/GridFacetDefault.java    |   2 +-
 .../CssClassFacetForPropertyXml.java            |   2 +-
 .../DescribedAsFacetForPropertyXml.java         |   2 +-
 .../HiddenFacetForPropertyXml.java              |   2 +-
 .../LabelAtFacetForPropertyXml.java             |   2 +-
 .../MultiLineFacetForPropertyXml.java           |   2 +-
 .../NamedFacetForPropertyXml.java               |   2 +-
 .../RenderedAdjustedFacetForPropertyXml.java    |   2 +-
 .../TypicalLengthFacetForPropertyXml.java       |   2 +-
 .../grid/GridNormalizerServiceAbstract.java     |  30 +-
 .../services/grid/GridServiceDefault.java       |   6 +-
 .../bootstrap3/GridNormalizerServiceBS3.java    |  26 +-
 .../grid/fixedcols/GridNormalizerServiceFC.java |  10 +-
 .../grid/fixedcols/applib/FCColumn.java         |  12 +-
 .../grid/fixedcols/applib/FCColumnOwner.java    |   2 +-
 .../services/grid/fixedcols/applib/FCGrid.java  |  16 +-
 .../services/grid/fixedcols/applib/FCTab.java   |   8 +-
 .../grid/fixedcols/applib/FCTabGroup.java       |   2 +-
 .../grid/fixedcols/applib/FCTabGroupOwner.java  |   2 +-
 .../services/metamodel/MetadataMenu.java        |   2 +-
 .../object/layoutxml/GridFacetDefaultTest.java  |   2 +-
 .../metamodel/services/grid/BS3GridTest.java    |  20 +-
 .../metamodel/services/grid/FCGridTest.java     |  15 +-
 .../model/models/EntityCollectionModel.java     |   2 +-
 .../entity/fieldset/PropertyGroup.java          |   4 +-
 .../links/EntityLinksSelectorPanelFactory.java  |   4 +-
 .../ui/components/layout/bs3/BS3GridPanel.java  |   4 +-
 .../wicket/ui/components/layout/bs3/Util.java   |   4 +-
 .../layout/bs3/clearfix/ClearFix.java           |   2 +-
 .../ui/components/layout/bs3/col/Col.java       |  16 +-
 .../ui/components/layout/bs3/row/Row.java       |   8 +-
 .../layout/bs3/tabs/TabGroupPanel.java          |   4 +-
 .../ui/components/layout/bs3/tabs/TabPanel.java |   4 +-
 .../components/layout/fixedcols/PropUtil.java   |   2 +-
 .../collections/EntityCollectionsPanel.java     |   2 +-
 .../layout/fixedcols/columns/EntityColumn.java  |   4 +-
 .../wicket/ui/pages/entity/EntityPage.java      |   2 +-
 .../dom/simple/SimpleObject.layout-FC.xml       |  41 ---
 .../dom/simple/SimpleObject.layout.json         |  71 -----
 .../dom/simple/SimpleObject.layout.xml          |  64 +---
 150 files changed, 3713 insertions(+), 3913 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/isis/blob/67b6e05e/adocs/documentation/src/main/asciidoc/applib/layout/component/component.xsd
----------------------------------------------------------------------
diff --git a/adocs/documentation/src/main/asciidoc/applib/layout/component/component.xsd b/adocs/documentation/src/main/asciidoc/applib/layout/component/component.xsd
new file mode 100644
index 0000000..33dc6aa
--- /dev/null
+++ b/adocs/documentation/src/main/asciidoc/applib/layout/component/component.xsd
@@ -0,0 +1,136 @@
+<?xml version="1.0" standalone="yes"?>
+<xs:schema elementFormDefault="qualified" version="1.0" targetNamespace="http://isis.apache.org/applib/layout/component" xmlns:tns="http://isis.apache.org/applib/layout/component" xmlns:xs="http://www.w3.org/2001/XMLSchema">
+
+  <xs:element name="action" type="tns:action"/>
+
+  <xs:element name="collection" type="tns:collection"/>
+
+  <xs:element name="domainObject" type="tns:domainObject"/>
+
+  <xs:element name="fieldSet" type="tns:fieldSet"/>
+
+  <xs:element name="property" type="tns:property"/>
+
+  <xs:complexType name="domainObject">
+    <xs:sequence>
+      <xs:element name="named" type="xs:string" minOccurs="0"/>
+      <xs:element name="describedAs" type="xs:string" minOccurs="0"/>
+      <xs:element name="plural" type="xs:string" minOccurs="0"/>
+      <xs:element name="metadataError" type="xs:string" minOccurs="0"/>
+    </xs:sequence>
+    <xs:attribute name="bookmarking" type="tns:bookmarkPolicy"/>
+    <xs:attribute name="cssClass" type="xs:string"/>
+    <xs:attribute name="cssClassFa" type="xs:string"/>
+    <xs:attribute name="cssClassFaPosition" type="tns:cssClassFaPosition"/>
+  </xs:complexType>
+
+  <xs:complexType name="action">
+    <xs:sequence>
+      <xs:element name="named" type="xs:string" minOccurs="0"/>
+      <xs:element name="describedAs" type="xs:string" minOccurs="0"/>
+      <xs:element name="metadataError" type="xs:string" minOccurs="0"/>
+    </xs:sequence>
+    <xs:attribute name="bookmarking" type="tns:bookmarkPolicy"/>
+    <xs:attribute name="cssClass" type="xs:string"/>
+    <xs:attribute name="cssClassFa" type="xs:string"/>
+    <xs:attribute name="cssClassFaPosition" type="tns:cssClassFaPosition"/>
+    <xs:attribute name="hidden" type="tns:where"/>
+    <xs:attribute name="id" type="xs:string" use="required"/>
+    <xs:attribute name="namedEscaped" type="xs:boolean"/>
+    <xs:attribute name="position" type="tns:position"/>
+  </xs:complexType>
+
+  <xs:complexType name="fieldSet">
+    <xs:sequence>
+      <xs:element ref="tns:action" minOccurs="0" maxOccurs="unbounded"/>
+      <xs:element ref="tns:property" minOccurs="0" maxOccurs="unbounded"/>
+      <xs:element name="metadataError" type="xs:string" minOccurs="0"/>
+    </xs:sequence>
+    <xs:attribute name="name" type="xs:string" use="required"/>
+    <xs:attribute name="id" type="xs:string"/>
+    <xs:attribute name="unreferencedActions" type="xs:boolean"/>
+    <xs:attribute name="unreferencedProperties" type="xs:boolean"/>
+  </xs:complexType>
+
+  <xs:complexType name="property">
+    <xs:sequence>
+      <xs:element name="named" type="xs:string" minOccurs="0"/>
+      <xs:element name="describedAs" type="xs:string" minOccurs="0"/>
+      <xs:element ref="tns:action" minOccurs="0" maxOccurs="unbounded"/>
+      <xs:element name="metadataError" type="xs:string" minOccurs="0"/>
+    </xs:sequence>
+    <xs:attribute name="cssClass" type="xs:string"/>
+    <xs:attribute name="hidden" type="tns:where"/>
+    <xs:attribute name="id" type="xs:string" use="required"/>
+    <xs:attribute name="labelPosition" type="tns:labelPosition"/>
+    <xs:attribute name="multiLine" type="xs:int"/>
+    <xs:attribute name="namedEscaped" type="xs:boolean"/>
+    <xs:attribute name="renderedAsDayBefore" type="xs:boolean"/>
+    <xs:attribute name="typicalLength" type="xs:int"/>
+  </xs:complexType>
+
+  <xs:complexType name="collection">
+    <xs:sequence>
+      <xs:element name="named" type="xs:string" minOccurs="0"/>
+      <xs:element name="describedAs" type="xs:string" minOccurs="0"/>
+      <xs:element name="sortedBy" type="xs:string" minOccurs="0"/>
+      <xs:element ref="tns:action" minOccurs="0" maxOccurs="unbounded"/>
+      <xs:element name="metadataError" type="xs:string" minOccurs="0"/>
+    </xs:sequence>
+    <xs:attribute name="cssClass" type="xs:string"/>
+    <xs:attribute name="defaultView" type="xs:string"/>
+    <xs:attribute name="hidden" type="tns:where"/>
+    <xs:attribute name="id" type="xs:string" use="required"/>
+    <xs:attribute name="namedEscaped" type="xs:boolean"/>
+    <xs:attribute name="paged" type="xs:int"/>
+  </xs:complexType>
+
+  <xs:simpleType name="bookmarkPolicy">
+    <xs:restriction base="xs:string">
+      <xs:enumeration value="AS_ROOT"/>
+      <xs:enumeration value="AS_CHILD"/>
+      <xs:enumeration value="NEVER"/>
+    </xs:restriction>
+  </xs:simpleType>
+
+  <xs:simpleType name="cssClassFaPosition">
+    <xs:restriction base="xs:string">
+      <xs:enumeration value="LEFT"/>
+      <xs:enumeration value="RIGHT"/>
+    </xs:restriction>
+  </xs:simpleType>
+
+  <xs:simpleType name="where">
+    <xs:restriction base="xs:string">
+      <xs:enumeration value="EVERYWHERE"/>
+      <xs:enumeration value="ANYWHERE"/>
+      <xs:enumeration value="OBJECT_FORMS"/>
+      <xs:enumeration value="REFERENCES_PARENT"/>
+      <xs:enumeration value="PARENTED_TABLES"/>
+      <xs:enumeration value="STANDALONE_TABLES"/>
+      <xs:enumeration value="ALL_TABLES"/>
+      <xs:enumeration value="ALL_EXCEPT_STANDALONE_TABLES"/>
+      <xs:enumeration value="NOWHERE"/>
+      <xs:enumeration value="NOT_SPECIFIED"/>
+    </xs:restriction>
+  </xs:simpleType>
+
+  <xs:simpleType name="position">
+    <xs:restriction base="xs:string">
+      <xs:enumeration value="BELOW"/>
+      <xs:enumeration value="RIGHT"/>
+      <xs:enumeration value="PANEL"/>
+      <xs:enumeration value="PANEL_DROPDOWN"/>
+    </xs:restriction>
+  </xs:simpleType>
+
+  <xs:simpleType name="labelPosition">
+    <xs:restriction base="xs:string">
+      <xs:enumeration value="DEFAULT"/>
+      <xs:enumeration value="LEFT"/>
+      <xs:enumeration value="RIGHT"/>
+      <xs:enumeration value="TOP"/>
+      <xs:enumeration value="NONE"/>
+    </xs:restriction>
+  </xs:simpleType>
+</xs:schema>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/isis/blob/67b6e05e/adocs/documentation/src/main/asciidoc/applib/layout/grid/bootstrap3/bootstrap3.xsd
----------------------------------------------------------------------
diff --git a/adocs/documentation/src/main/asciidoc/applib/layout/grid/bootstrap3/bootstrap3.xsd b/adocs/documentation/src/main/asciidoc/applib/layout/grid/bootstrap3/bootstrap3.xsd
new file mode 100644
index 0000000..65d2bd6
--- /dev/null
+++ b/adocs/documentation/src/main/asciidoc/applib/layout/grid/bootstrap3/bootstrap3.xsd
@@ -0,0 +1,136 @@
+<?xml version="1.0" standalone="yes"?>
+<xs:schema elementFormDefault="qualified" version="1.0" targetNamespace="http://isis.apache.org/applib/layout/grid/bootstrap3" xmlns:tns="http://isis.apache.org/applib/layout/grid/bootstrap3" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:ns1="http://isis.apache.org/applib/layout/component">
+
+    <xs:import namespace="http://isis.apache.org/applib/layout/component" schemaLocation="../../component"/>
+
+    <xs:element name="clearFixHidden" type="tns:clearFixHidden"/>
+
+    <xs:element name="clearFixVisible" type="tns:clearFixVisible"/>
+
+    <xs:element name="col" type="tns:col"/>
+
+    <xs:element name="grid" type="tns:grid"/>
+
+    <xs:complexType name="grid">
+        <xs:sequence>
+            <xs:element name="row" type="tns:row" maxOccurs="unbounded"/>
+            <xs:element name="metadataError" type="xs:string" minOccurs="0" maxOccurs="unbounded"/>
+        </xs:sequence>
+        <xs:attribute name="cssClass" type="xs:string"/>
+    </xs:complexType>
+
+    <xs:complexType name="row">
+        <xs:complexContent>
+            <xs:extension base="tns:bs3ElementAbstract">
+                <xs:sequence>
+                    <xs:choice minOccurs="0" maxOccurs="unbounded">
+                        <xs:element ref="tns:col"/>
+                        <xs:element ref="tns:clearFixVisible"/>
+                        <xs:element ref="tns:clearFixHidden"/>
+                    </xs:choice>
+                    <xs:element name="metadataError" type="xs:string" minOccurs="0"/>
+                </xs:sequence>
+                <xs:attribute name="id" type="xs:string"/>
+            </xs:extension>
+        </xs:complexContent>
+    </xs:complexType>
+
+    <xs:complexType name="bs3ElementAbstract" abstract="true">
+        <xs:sequence/>
+        <xs:attribute name="cssClass" type="xs:string"/>
+    </xs:complexType>
+
+    <xs:complexType name="col">
+        <xs:complexContent>
+            <xs:extension base="tns:bs3RowContent">
+                <xs:sequence>
+                    <xs:element ref="ns1:domainObject" minOccurs="0"/>
+                    <xs:element ref="ns1:action" minOccurs="0" maxOccurs="unbounded"/>
+                    <xs:element name="row" type="tns:row" minOccurs="0" maxOccurs="unbounded"/>
+                    <xs:element name="tabGroup" type="tns:tabGroup" minOccurs="0" maxOccurs="unbounded"/>
+                    <xs:element ref="ns1:fieldSet" minOccurs="0" maxOccurs="unbounded"/>
+                    <xs:element ref="ns1:collection" minOccurs="0" maxOccurs="unbounded"/>
+                    <xs:element name="metadataError" type="xs:string" minOccurs="0"/>
+                </xs:sequence>
+                <xs:attribute name="id" type="xs:string"/>
+                <xs:attribute name="span" type="xs:int" use="required"/>
+                <xs:attribute name="unreferencedActions" type="xs:boolean"/>
+                <xs:attribute name="unreferencedCollections" type="xs:boolean"/>
+            </xs:extension>
+        </xs:complexContent>
+    </xs:complexType>
+
+    <xs:complexType name="bs3RowContent" abstract="true">
+        <xs:complexContent>
+            <xs:extension base="tns:bs3ElementAbstract">
+                <xs:sequence/>
+                <xs:attribute name="size" type="tns:size"/>
+            </xs:extension>
+        </xs:complexContent>
+    </xs:complexType>
+
+    <xs:complexType name="tabGroup">
+        <xs:complexContent>
+            <xs:extension base="tns:bs3ElementAbstract">
+                <xs:sequence>
+                    <xs:element name="tab" type="tns:tab" minOccurs="0" maxOccurs="unbounded"/>
+                    <xs:element name="metadataError" type="xs:string" minOccurs="0"/>
+                </xs:sequence>
+                <xs:attribute name="unreferencedCollections" type="xs:boolean"/>
+            </xs:extension>
+        </xs:complexContent>
+    </xs:complexType>
+
+    <xs:complexType name="tab">
+        <xs:complexContent>
+            <xs:extension base="tns:bs3ElementAbstract">
+                <xs:sequence>
+                    <xs:element name="row" type="tns:row" maxOccurs="unbounded"/>
+                </xs:sequence>
+                <xs:attribute name="name" type="xs:string" use="required"/>
+            </xs:extension>
+        </xs:complexContent>
+    </xs:complexType>
+
+    <xs:complexType name="clearFixVisible">
+        <xs:complexContent>
+            <xs:extension base="tns:bs3ClearFix">
+                <xs:sequence/>
+                <xs:attribute name="cssDisplay" type="tns:cssDisplay" use="required"/>
+            </xs:extension>
+        </xs:complexContent>
+    </xs:complexType>
+
+    <xs:complexType name="bs3ClearFix" abstract="true">
+        <xs:complexContent>
+            <xs:extension base="tns:bs3RowContent">
+                <xs:sequence/>
+            </xs:extension>
+        </xs:complexContent>
+    </xs:complexType>
+
+    <xs:complexType name="clearFixHidden">
+        <xs:complexContent>
+            <xs:extension base="tns:bs3ClearFix">
+                <xs:sequence/>
+            </xs:extension>
+        </xs:complexContent>
+    </xs:complexType>
+
+    <xs:simpleType name="size">
+        <xs:restriction base="xs:string">
+            <xs:enumeration value="XS"/>
+            <xs:enumeration value="SM"/>
+            <xs:enumeration value="MD"/>
+            <xs:enumeration value="LG"/>
+        </xs:restriction>
+    </xs:simpleType>
+
+    <xs:simpleType name="cssDisplay">
+        <xs:restriction base="xs:string">
+            <xs:enumeration value="BLOCK"/>
+            <xs:enumeration value="INLINE"/>
+            <xs:enumeration value="INLINE_BLOCK"/>
+        </xs:restriction>
+    </xs:simpleType>
+</xs:schema>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/isis/blob/67b6e05e/adocs/documentation/src/main/asciidoc/schema/applib/layout/bootstrap3/bootstrap3.xsd
----------------------------------------------------------------------
diff --git a/adocs/documentation/src/main/asciidoc/schema/applib/layout/bootstrap3/bootstrap3.xsd b/adocs/documentation/src/main/asciidoc/schema/applib/layout/bootstrap3/bootstrap3.xsd
deleted file mode 100644
index 39ca5fa..0000000
--- a/adocs/documentation/src/main/asciidoc/schema/applib/layout/bootstrap3/bootstrap3.xsd
+++ /dev/null
@@ -1,136 +0,0 @@
-<?xml version="1.0" standalone="yes"?>
-<xs:schema elementFormDefault="qualified" version="1.0" targetNamespace="http://isis.apache.org/schema/applib/layout/bootstrap3" xmlns:tns="http://isis.apache.org/schema/applib/layout/bootstrap3" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:ns1="http://isis.apache.org/schema/applib/layout/common">
-
-    <xs:import namespace="http://isis.apache.org/schema/applib/layout/common" schemaLocation="../common"/>
-
-    <xs:element name="clearFixHidden" type="tns:clearFixHidden"/>
-
-    <xs:element name="clearFixVisible" type="tns:clearFixVisible"/>
-
-    <xs:element name="col" type="tns:col"/>
-
-    <xs:element name="grid" type="tns:grid"/>
-
-    <xs:complexType name="grid">
-        <xs:sequence>
-            <xs:element name="row" type="tns:row" maxOccurs="unbounded"/>
-            <xs:element name="metadataError" type="xs:string" minOccurs="0" maxOccurs="unbounded"/>
-        </xs:sequence>
-        <xs:attribute name="cssClass" type="xs:string"/>
-    </xs:complexType>
-
-    <xs:complexType name="row">
-        <xs:complexContent>
-            <xs:extension base="tns:bs3ElementAbstract">
-                <xs:sequence>
-                    <xs:choice minOccurs="0" maxOccurs="unbounded">
-                        <xs:element ref="tns:col"/>
-                        <xs:element ref="tns:clearFixVisible"/>
-                        <xs:element ref="tns:clearFixHidden"/>
-                    </xs:choice>
-                    <xs:element name="metadataError" type="xs:string" minOccurs="0"/>
-                </xs:sequence>
-                <xs:attribute name="id" type="xs:string"/>
-            </xs:extension>
-        </xs:complexContent>
-    </xs:complexType>
-
-    <xs:complexType name="bs3ElementAbstract" abstract="true">
-        <xs:sequence/>
-        <xs:attribute name="cssClass" type="xs:string"/>
-    </xs:complexType>
-
-    <xs:complexType name="col">
-        <xs:complexContent>
-            <xs:extension base="tns:bs3RowContent">
-                <xs:sequence>
-                    <xs:element ref="ns1:domainObject" minOccurs="0"/>
-                    <xs:element ref="ns1:action" minOccurs="0" maxOccurs="unbounded"/>
-                    <xs:element name="row" type="tns:row" minOccurs="0" maxOccurs="unbounded"/>
-                    <xs:element name="tabGroup" type="tns:tabGroup" minOccurs="0" maxOccurs="unbounded"/>
-                    <xs:element ref="ns1:fieldSet" minOccurs="0" maxOccurs="unbounded"/>
-                    <xs:element ref="ns1:collection" minOccurs="0" maxOccurs="unbounded"/>
-                    <xs:element name="metadataError" type="xs:string" minOccurs="0"/>
-                </xs:sequence>
-                <xs:attribute name="id" type="xs:string"/>
-                <xs:attribute name="span" type="xs:int" use="required"/>
-                <xs:attribute name="unreferencedActions" type="xs:boolean"/>
-                <xs:attribute name="unreferencedCollections" type="xs:boolean"/>
-            </xs:extension>
-        </xs:complexContent>
-    </xs:complexType>
-
-    <xs:complexType name="bs3RowContent" abstract="true">
-        <xs:complexContent>
-            <xs:extension base="tns:bs3ElementAbstract">
-                <xs:sequence/>
-                <xs:attribute name="size" type="tns:size"/>
-            </xs:extension>
-        </xs:complexContent>
-    </xs:complexType>
-
-    <xs:complexType name="tabGroup">
-        <xs:complexContent>
-            <xs:extension base="tns:bs3ElementAbstract">
-                <xs:sequence>
-                    <xs:element name="tab" type="tns:tab" minOccurs="0" maxOccurs="unbounded"/>
-                    <xs:element name="metadataError" type="xs:string" minOccurs="0"/>
-                </xs:sequence>
-                <xs:attribute name="unreferencedCollections" type="xs:boolean"/>
-            </xs:extension>
-        </xs:complexContent>
-    </xs:complexType>
-
-    <xs:complexType name="tab">
-        <xs:complexContent>
-            <xs:extension base="tns:bs3ElementAbstract">
-                <xs:sequence>
-                    <xs:element name="row" type="tns:row" maxOccurs="unbounded"/>
-                </xs:sequence>
-                <xs:attribute name="name" type="xs:string" use="required"/>
-            </xs:extension>
-        </xs:complexContent>
-    </xs:complexType>
-
-    <xs:complexType name="clearFixVisible">
-        <xs:complexContent>
-            <xs:extension base="tns:bs3ClearFix">
-                <xs:sequence/>
-                <xs:attribute name="cssDisplay" type="tns:cssDisplay" use="required"/>
-            </xs:extension>
-        </xs:complexContent>
-    </xs:complexType>
-
-    <xs:complexType name="bs3ClearFix" abstract="true">
-        <xs:complexContent>
-            <xs:extension base="tns:bs3RowContent">
-                <xs:sequence/>
-            </xs:extension>
-        </xs:complexContent>
-    </xs:complexType>
-
-    <xs:complexType name="clearFixHidden">
-        <xs:complexContent>
-            <xs:extension base="tns:bs3ClearFix">
-                <xs:sequence/>
-            </xs:extension>
-        </xs:complexContent>
-    </xs:complexType>
-
-    <xs:simpleType name="size">
-        <xs:restriction base="xs:string">
-            <xs:enumeration value="XS"/>
-            <xs:enumeration value="SM"/>
-            <xs:enumeration value="MD"/>
-            <xs:enumeration value="LG"/>
-        </xs:restriction>
-    </xs:simpleType>
-
-    <xs:simpleType name="cssDisplay">
-        <xs:restriction base="xs:string">
-            <xs:enumeration value="BLOCK"/>
-            <xs:enumeration value="INLINE"/>
-            <xs:enumeration value="INLINE_BLOCK"/>
-        </xs:restriction>
-    </xs:simpleType>
-</xs:schema>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/isis/blob/67b6e05e/adocs/documentation/src/main/asciidoc/schema/applib/layout/common/common.xsd
----------------------------------------------------------------------
diff --git a/adocs/documentation/src/main/asciidoc/schema/applib/layout/common/common.xsd b/adocs/documentation/src/main/asciidoc/schema/applib/layout/common/common.xsd
deleted file mode 100644
index 5b614a9..0000000
--- a/adocs/documentation/src/main/asciidoc/schema/applib/layout/common/common.xsd
+++ /dev/null
@@ -1,136 +0,0 @@
-<?xml version="1.0" standalone="yes"?>
-<xs:schema elementFormDefault="qualified" version="1.0" targetNamespace="http://isis.apache.org/schema/applib/layout/common" xmlns:tns="http://isis.apache.org/schema/applib/layout/common" xmlns:xs="http://www.w3.org/2001/XMLSchema">
-
-  <xs:element name="action" type="tns:action"/>
-
-  <xs:element name="collection" type="tns:collection"/>
-
-  <xs:element name="domainObject" type="tns:domainObject"/>
-
-  <xs:element name="fieldSet" type="tns:fieldSet"/>
-
-  <xs:element name="property" type="tns:property"/>
-
-  <xs:complexType name="domainObject">
-    <xs:sequence>
-      <xs:element name="named" type="xs:string" minOccurs="0"/>
-      <xs:element name="describedAs" type="xs:string" minOccurs="0"/>
-      <xs:element name="plural" type="xs:string" minOccurs="0"/>
-      <xs:element name="metadataError" type="xs:string" minOccurs="0"/>
-    </xs:sequence>
-    <xs:attribute name="bookmarking" type="tns:bookmarkPolicy"/>
-    <xs:attribute name="cssClass" type="xs:string"/>
-    <xs:attribute name="cssClassFa" type="xs:string"/>
-    <xs:attribute name="cssClassFaPosition" type="tns:cssClassFaPosition"/>
-  </xs:complexType>
-
-  <xs:complexType name="action">
-    <xs:sequence>
-      <xs:element name="named" type="xs:string" minOccurs="0"/>
-      <xs:element name="describedAs" type="xs:string" minOccurs="0"/>
-      <xs:element name="metadataError" type="xs:string" minOccurs="0"/>
-    </xs:sequence>
-    <xs:attribute name="bookmarking" type="tns:bookmarkPolicy"/>
-    <xs:attribute name="cssClass" type="xs:string"/>
-    <xs:attribute name="cssClassFa" type="xs:string"/>
-    <xs:attribute name="cssClassFaPosition" type="tns:cssClassFaPosition"/>
-    <xs:attribute name="hidden" type="tns:where"/>
-    <xs:attribute name="id" type="xs:string" use="required"/>
-    <xs:attribute name="namedEscaped" type="xs:boolean"/>
-    <xs:attribute name="position" type="tns:position"/>
-  </xs:complexType>
-
-  <xs:complexType name="fieldSet">
-    <xs:sequence>
-      <xs:element ref="tns:action" minOccurs="0" maxOccurs="unbounded"/>
-      <xs:element ref="tns:property" minOccurs="0" maxOccurs="unbounded"/>
-      <xs:element name="metadataError" type="xs:string" minOccurs="0"/>
-    </xs:sequence>
-    <xs:attribute name="name" type="xs:string" use="required"/>
-    <xs:attribute name="id" type="xs:string"/>
-    <xs:attribute name="unreferencedActions" type="xs:boolean"/>
-    <xs:attribute name="unreferencedProperties" type="xs:boolean"/>
-  </xs:complexType>
-
-  <xs:complexType name="property">
-    <xs:sequence>
-      <xs:element name="named" type="xs:string" minOccurs="0"/>
-      <xs:element name="describedAs" type="xs:string" minOccurs="0"/>
-      <xs:element ref="tns:action" minOccurs="0" maxOccurs="unbounded"/>
-      <xs:element name="metadataError" type="xs:string" minOccurs="0"/>
-    </xs:sequence>
-    <xs:attribute name="cssClass" type="xs:string"/>
-    <xs:attribute name="hidden" type="tns:where"/>
-    <xs:attribute name="id" type="xs:string" use="required"/>
-    <xs:attribute name="labelPosition" type="tns:labelPosition"/>
-    <xs:attribute name="multiLine" type="xs:int"/>
-    <xs:attribute name="namedEscaped" type="xs:boolean"/>
-    <xs:attribute name="renderedAsDayBefore" type="xs:boolean"/>
-    <xs:attribute name="typicalLength" type="xs:int"/>
-  </xs:complexType>
-
-  <xs:complexType name="collection">
-    <xs:sequence>
-      <xs:element name="named" type="xs:string" minOccurs="0"/>
-      <xs:element name="describedAs" type="xs:string" minOccurs="0"/>
-      <xs:element name="sortedBy" type="xs:string" minOccurs="0"/>
-      <xs:element ref="tns:action" minOccurs="0" maxOccurs="unbounded"/>
-      <xs:element name="metadataError" type="xs:string" minOccurs="0"/>
-    </xs:sequence>
-    <xs:attribute name="cssClass" type="xs:string"/>
-    <xs:attribute name="defaultView" type="xs:string"/>
-    <xs:attribute name="hidden" type="tns:where"/>
-    <xs:attribute name="id" type="xs:string" use="required"/>
-    <xs:attribute name="namedEscaped" type="xs:boolean"/>
-    <xs:attribute name="paged" type="xs:int"/>
-  </xs:complexType>
-
-  <xs:simpleType name="bookmarkPolicy">
-    <xs:restriction base="xs:string">
-      <xs:enumeration value="AS_ROOT"/>
-      <xs:enumeration value="AS_CHILD"/>
-      <xs:enumeration value="NEVER"/>
-    </xs:restriction>
-  </xs:simpleType>
-
-  <xs:simpleType name="cssClassFaPosition">
-    <xs:restriction base="xs:string">
-      <xs:enumeration value="LEFT"/>
-      <xs:enumeration value="RIGHT"/>
-    </xs:restriction>
-  </xs:simpleType>
-
-  <xs:simpleType name="where">
-    <xs:restriction base="xs:string">
-      <xs:enumeration value="EVERYWHERE"/>
-      <xs:enumeration value="ANYWHERE"/>
-      <xs:enumeration value="OBJECT_FORMS"/>
-      <xs:enumeration value="REFERENCES_PARENT"/>
-      <xs:enumeration value="PARENTED_TABLES"/>
-      <xs:enumeration value="STANDALONE_TABLES"/>
-      <xs:enumeration value="ALL_TABLES"/>
-      <xs:enumeration value="ALL_EXCEPT_STANDALONE_TABLES"/>
-      <xs:enumeration value="NOWHERE"/>
-      <xs:enumeration value="NOT_SPECIFIED"/>
-    </xs:restriction>
-  </xs:simpleType>
-
-  <xs:simpleType name="position">
-    <xs:restriction base="xs:string">
-      <xs:enumeration value="BELOW"/>
-      <xs:enumeration value="RIGHT"/>
-      <xs:enumeration value="PANEL"/>
-      <xs:enumeration value="PANEL_DROPDOWN"/>
-    </xs:restriction>
-  </xs:simpleType>
-
-  <xs:simpleType name="labelPosition">
-    <xs:restriction base="xs:string">
-      <xs:enumeration value="DEFAULT"/>
-      <xs:enumeration value="LEFT"/>
-      <xs:enumeration value="RIGHT"/>
-      <xs:enumeration value="TOP"/>
-      <xs:enumeration value="NONE"/>
-    </xs:restriction>
-  </xs:simpleType>
-</xs:schema>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/isis/blob/67b6e05e/adocs/documentation/src/main/asciidoc/schema/applib/layout/fixedcols/fixedcols.xsd
----------------------------------------------------------------------
diff --git a/adocs/documentation/src/main/asciidoc/schema/applib/layout/fixedcols/fixedcols.xsd b/adocs/documentation/src/main/asciidoc/schema/applib/layout/fixedcols/fixedcols.xsd
deleted file mode 100644
index 7820a18..0000000
--- a/adocs/documentation/src/main/asciidoc/schema/applib/layout/fixedcols/fixedcols.xsd
+++ /dev/null
@@ -1,39 +0,0 @@
-<?xml version="1.0" standalone="yes"?>
-<xs:schema elementFormDefault="qualified" version="1.0" targetNamespace="http://isis.apache.org/schema/applib/layout/fixedcols" xmlns:tns="http://isis.apache.org/schema/applib/layout/fixedcols" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:ns1="http://isis.apache.org/schema/applib/layout/common">
-
-    <xs:import namespace="http://isis.apache.org/schema/applib/layout/common" schemaLocation="../common"/>
-
-    <xs:element name="grid" type="tns:grid"/>
-
-    <xs:complexType name="grid">
-        <xs:sequence>
-            <xs:element ref="ns1:action" minOccurs="0" maxOccurs="unbounded"/>
-            <xs:element name="left" type="tns:fcColumn" minOccurs="0"/>
-            <xs:element name="tabGroup" type="tns:fcTabGroup" maxOccurs="unbounded"/>
-            <xs:element name="right" type="tns:fcColumn" minOccurs="0"/>
-        </xs:sequence>
-    </xs:complexType>
-
-    <xs:complexType name="fcColumn">
-        <xs:sequence>
-            <xs:element ref="ns1:fieldSet" minOccurs="0" maxOccurs="unbounded"/>
-            <xs:element ref="ns1:collection" minOccurs="0" maxOccurs="unbounded"/>
-        </xs:sequence>
-        <xs:attribute name="span" type="xs:int" use="required"/>
-    </xs:complexType>
-
-    <xs:complexType name="fcTabGroup">
-        <xs:sequence>
-            <xs:element name="tab" type="tns:tab" maxOccurs="unbounded"/>
-        </xs:sequence>
-    </xs:complexType>
-
-    <xs:complexType name="tab">
-        <xs:sequence>
-            <xs:element name="left" type="tns:fcColumn"/>
-            <xs:element name="middle" type="tns:fcColumn" minOccurs="0"/>
-            <xs:element name="right" type="tns:fcColumn" minOccurs="0"/>
-        </xs:sequence>
-        <xs:attribute name="name" type="xs:string" use="required"/>
-    </xs:complexType>
-</xs:schema>

http://git-wip-us.apache.org/repos/asf/isis/blob/67b6e05e/core/applib/src/main/java/org/apache/isis/applib/annotation/ActionLayout.java
----------------------------------------------------------------------
diff --git a/core/applib/src/main/java/org/apache/isis/applib/annotation/ActionLayout.java b/core/applib/src/main/java/org/apache/isis/applib/annotation/ActionLayout.java
index 5aaf4ce..73982e9 100644
--- a/core/applib/src/main/java/org/apache/isis/applib/annotation/ActionLayout.java
+++ b/core/applib/src/main/java/org/apache/isis/applib/annotation/ActionLayout.java
@@ -75,7 +75,7 @@ public @interface ActionLayout {
     CssClassFaPosition cssClassFaPosition() default CssClassFaPosition.LEFT;
 
     @XmlType(
-            namespace = "http://isis.apache.org/schema/applib/layout/common"
+            namespace = "http://isis.apache.org/applib/layout/component"
     )
     enum CssClassFaPosition {
         LEFT, RIGHT
@@ -115,7 +115,7 @@ public @interface ActionLayout {
     Position position() default Position.BELOW;
 
     @XmlType(
-            namespace = "http://isis.apache.org/schema/applib/layout/common"
+            namespace = "http://isis.apache.org/applib/layout/component"
     )
     enum Position {
         BELOW,

http://git-wip-us.apache.org/repos/asf/isis/blob/67b6e05e/core/applib/src/main/java/org/apache/isis/applib/annotation/BookmarkPolicy.java
----------------------------------------------------------------------
diff --git a/core/applib/src/main/java/org/apache/isis/applib/annotation/BookmarkPolicy.java b/core/applib/src/main/java/org/apache/isis/applib/annotation/BookmarkPolicy.java
index 483e4f1..70e810e 100644
--- a/core/applib/src/main/java/org/apache/isis/applib/annotation/BookmarkPolicy.java
+++ b/core/applib/src/main/java/org/apache/isis/applib/annotation/BookmarkPolicy.java
@@ -22,7 +22,7 @@ package org.apache.isis.applib.annotation;
 import javax.xml.bind.annotation.XmlType;
 
 @XmlType(
-        namespace = "http://isis.apache.org/schema/applib/layout/common"
+        namespace = "http://isis.apache.org/applib/layout/component"
 )
 public enum BookmarkPolicy {
     /**

http://git-wip-us.apache.org/repos/asf/isis/blob/67b6e05e/core/applib/src/main/java/org/apache/isis/applib/annotation/Contributed.java
----------------------------------------------------------------------
diff --git a/core/applib/src/main/java/org/apache/isis/applib/annotation/Contributed.java b/core/applib/src/main/java/org/apache/isis/applib/annotation/Contributed.java
index cabb920..f0f39b3 100644
--- a/core/applib/src/main/java/org/apache/isis/applib/annotation/Contributed.java
+++ b/core/applib/src/main/java/org/apache/isis/applib/annotation/Contributed.java
@@ -25,7 +25,7 @@ import javax.xml.bind.annotation.XmlType;
  * The means by which a domain service action will be contributed to a domain object.
  */
 @XmlType(
-        namespace = "http://isis.apache.org/schema/applib/layout/common"
+        namespace = "http://isis.apache.org/applib/layout/component"
 )
 public enum Contributed {
     /**

http://git-wip-us.apache.org/repos/asf/isis/blob/67b6e05e/core/applib/src/main/java/org/apache/isis/applib/annotation/LabelPosition.java
----------------------------------------------------------------------
diff --git a/core/applib/src/main/java/org/apache/isis/applib/annotation/LabelPosition.java b/core/applib/src/main/java/org/apache/isis/applib/annotation/LabelPosition.java
index e43dc31..102aa36 100644
--- a/core/applib/src/main/java/org/apache/isis/applib/annotation/LabelPosition.java
+++ b/core/applib/src/main/java/org/apache/isis/applib/annotation/LabelPosition.java
@@ -27,7 +27,7 @@ import javax.xml.bind.annotation.XmlType;
  * @see org.apache.isis.applib.annotation.ParameterLayout
  */
 @XmlType(
-        namespace = "http://isis.apache.org/schema/applib/layout/common"
+        namespace = "http://isis.apache.org/applib/layout/component"
 )
 public enum LabelPosition {
     DEFAULT,

http://git-wip-us.apache.org/repos/asf/isis/blob/67b6e05e/core/applib/src/main/java/org/apache/isis/applib/annotation/RenderType.java
----------------------------------------------------------------------
diff --git a/core/applib/src/main/java/org/apache/isis/applib/annotation/RenderType.java b/core/applib/src/main/java/org/apache/isis/applib/annotation/RenderType.java
index d1205fa..6dfaf9e 100644
--- a/core/applib/src/main/java/org/apache/isis/applib/annotation/RenderType.java
+++ b/core/applib/src/main/java/org/apache/isis/applib/annotation/RenderType.java
@@ -21,7 +21,7 @@ package org.apache.isis.applib.annotation;
 import javax.xml.bind.annotation.XmlType;
 
 @XmlType(
-        namespace = "http://isis.apache.org/schema/applib/layout/common"
+        namespace = "http://isis.apache.org/applib/layout/component"
 )
 public enum RenderType {
     EAGERLY,

http://git-wip-us.apache.org/repos/asf/isis/blob/67b6e05e/core/applib/src/main/java/org/apache/isis/applib/annotation/Where.java
----------------------------------------------------------------------
diff --git a/core/applib/src/main/java/org/apache/isis/applib/annotation/Where.java b/core/applib/src/main/java/org/apache/isis/applib/annotation/Where.java
index ae072d2..3277649 100644
--- a/core/applib/src/main/java/org/apache/isis/applib/annotation/Where.java
+++ b/core/applib/src/main/java/org/apache/isis/applib/annotation/Where.java
@@ -41,7 +41,7 @@ import org.apache.isis.applib.util.Enums;
  * the framework developer should only use those values that represent concrete locations.  
  */
 @XmlType(
-        namespace = "http://isis.apache.org/schema/applib/layout/common"
+        namespace = "http://isis.apache.org/applib/layout/component"
 )
 public enum Where {
     /**

http://git-wip-us.apache.org/repos/asf/isis/blob/67b6e05e/core/applib/src/main/java/org/apache/isis/applib/layout/bootstrap3/BS3ClearFix.java
----------------------------------------------------------------------
diff --git a/core/applib/src/main/java/org/apache/isis/applib/layout/bootstrap3/BS3ClearFix.java b/core/applib/src/main/java/org/apache/isis/applib/layout/bootstrap3/BS3ClearFix.java
deleted file mode 100644
index 29bf036..0000000
--- a/core/applib/src/main/java/org/apache/isis/applib/layout/bootstrap3/BS3ClearFix.java
+++ /dev/null
@@ -1,24 +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.applib.layout.bootstrap3;
-
-public abstract class BS3ClearFix extends BS3RowContent {
-
-    public abstract String toCssClass();
-}

http://git-wip-us.apache.org/repos/asf/isis/blob/67b6e05e/core/applib/src/main/java/org/apache/isis/applib/layout/bootstrap3/BS3ClearFixHidden.java
----------------------------------------------------------------------
diff --git a/core/applib/src/main/java/org/apache/isis/applib/layout/bootstrap3/BS3ClearFixHidden.java b/core/applib/src/main/java/org/apache/isis/applib/layout/bootstrap3/BS3ClearFixHidden.java
deleted file mode 100644
index 69e8367..0000000
--- a/core/applib/src/main/java/org/apache/isis/applib/layout/bootstrap3/BS3ClearFixHidden.java
+++ /dev/null
@@ -1,39 +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.applib.layout.bootstrap3;
-
-import javax.xml.bind.annotation.XmlRootElement;
-import javax.xml.bind.annotation.XmlType;
-
-@XmlRootElement(
-        name = "clearFixHidden"
-)
-@XmlType(
-        name = "clearFixHidden"
-)
-public class BS3ClearFixHidden extends BS3ClearFix {
-
-    private static final long serialVersionUID = 1L;
-
-    @Override
-    public String toCssClass() {
-        return "clearfix hidden-" + getSize().toCssClassFragment();
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/isis/blob/67b6e05e/core/applib/src/main/java/org/apache/isis/applib/layout/bootstrap3/BS3ClearFixVisible.java
----------------------------------------------------------------------
diff --git a/core/applib/src/main/java/org/apache/isis/applib/layout/bootstrap3/BS3ClearFixVisible.java b/core/applib/src/main/java/org/apache/isis/applib/layout/bootstrap3/BS3ClearFixVisible.java
deleted file mode 100644
index 523e668..0000000
--- a/core/applib/src/main/java/org/apache/isis/applib/layout/bootstrap3/BS3ClearFixVisible.java
+++ /dev/null
@@ -1,59 +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.applib.layout.bootstrap3;
-
-import javax.xml.bind.annotation.XmlAttribute;
-import javax.xml.bind.annotation.XmlRootElement;
-import javax.xml.bind.annotation.XmlType;
-
-@XmlRootElement(
-        name = "clearFixVisible"
-)
-@XmlType(
-        name = "clearFixVisible"
-)
-public class BS3ClearFixVisible extends BS3ClearFix {
-
-    private static final long serialVersionUID = 1L;
-
-    public enum CssDisplay {
-        BLOCK,
-        INLINE,
-        INLINE_BLOCK
-    }
-
-    private CssDisplay cssDisplay;
-
-
-    @XmlAttribute(required = true)
-    public CssDisplay getCssDisplay() {
-        return cssDisplay;
-    }
-
-    public void setCssDisplay(final CssDisplay cssDisplay) {
-        this.cssDisplay = cssDisplay;
-    }
-
-
-    @Override
-    public String toCssClass() {
-        return "clearfix visible-" + getSize().toCssClassFragment() + "-" + getCssClass().toLowerCase().replace('_', '-');
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/isis/blob/67b6e05e/core/applib/src/main/java/org/apache/isis/applib/layout/bootstrap3/BS3Col.java
----------------------------------------------------------------------
diff --git a/core/applib/src/main/java/org/apache/isis/applib/layout/bootstrap3/BS3Col.java b/core/applib/src/main/java/org/apache/isis/applib/layout/bootstrap3/BS3Col.java
deleted file mode 100644
index d568f05..0000000
--- a/core/applib/src/main/java/org/apache/isis/applib/layout/bootstrap3/BS3Col.java
+++ /dev/null
@@ -1,257 +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.applib.layout.bootstrap3;
-
-import java.util.List;
-
-import javax.xml.bind.annotation.XmlAttribute;
-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 com.google.common.collect.Lists;
-
-import org.apache.isis.applib.layout.common.ActionLayoutData;
-import org.apache.isis.applib.layout.common.ActionLayoutDataOwner;
-import org.apache.isis.applib.layout.common.CollectionLayoutData;
-import org.apache.isis.applib.layout.common.CollectionLayoutDataOwner;
-import org.apache.isis.applib.layout.common.DomainObjectLayoutData;
-import org.apache.isis.applib.layout.common.DomainObjectLayoutDataOwner;
-import org.apache.isis.applib.layout.common.FieldSet;
-import org.apache.isis.applib.layout.common.FieldSetOwner;
-
-/**
- * A column within a row which, depending on its {@link #getSpan()}, could be as narrow as 1/12th of the page's width, all the way up to spanning the entire page.
- *
- * <p>
- *     Pretty much other content can be contained within a column, though most commonly it will be {@link FieldSet fieldset}s
- *     (a group of properties) or {@link CollectionLayoutData collection}s.  However, columns can also be used to
- *     contain further {@link BS3Row row}s (creating a nested grid of rows/cols/rows/cols) and {@link BS3TabGroup tabgroup}s.
- * </p>
- *
- * <p>
- *     It is rendered as a (eg) &lt;div class=&quot;col-md-4 ...&quot;&gt;
- * </p>
- */
-@XmlRootElement(
-        name = "col"
-)
-@XmlType(
-        name = "col"
-        , propOrder = {
-            "domainObject",
-            "actions",
-            "rows",
-            "tabGroups",
-            "fieldSets",
-            "collections",
-            "metadataError"
-        }
-)
-public class BS3Col extends BS3RowContent
-        implements ActionLayoutDataOwner, BS3TabGroupOwner, BS3RowOwner, FieldSetOwner, HasCssId,
-        CollectionLayoutDataOwner, DomainObjectLayoutDataOwner {
-
-    private static final long serialVersionUID = 1L;
-
-
-
-    private String id;
-
-    /**
-     * As per &lt;div id=&quot;...&quot;&gt;...&lt;/div&gt; : must be unique across entire page.
-     */
-    @XmlAttribute(required = false)
-    public String getId() {
-        return id;
-    }
-
-    public void setId(final String id) {
-        this.id = id;
-    }
-
-
-    private int span;
-
-    @XmlAttribute(required = true)
-    public int getSpan() {
-        return span;
-    }
-
-    public void setSpan(final int span) {
-        this.span = span;
-    }
-
-
-    private Boolean unreferencedActions;
-
-    /**
-     * Whether this column should be used to hold any unreferenced actions (contributed or &quot;native&quot;).
-     *
-     * <p>
-     *     Any layout must have precisely one column or {@link FieldSet} that has this attribute set.
-     * </p>
-     */
-    @XmlAttribute(required = false)
-    public Boolean isUnreferencedActions() {
-        return unreferencedActions;
-    }
-
-    public void setUnreferencedActions(final Boolean unreferencedActions) {
-        this.unreferencedActions = unreferencedActions;
-    }
-
-
-    private Boolean unreferencedCollections;
-    /**
-     * Whether this column should be used to hold any unreferenced collections (contributed or &quot;native&quot;).
-     *
-     * <p>
-     *     Any layout must have precisely one column or {@link BS3TabGroup tabgroup} that has this attribute set.
-     * </p>
-     */
-    @XmlAttribute(required = false)
-    public Boolean isUnreferencedCollections() {
-        return unreferencedCollections;
-    }
-
-    public void setUnreferencedCollections(final Boolean unreferencedCollections) {
-        this.unreferencedCollections = unreferencedCollections;
-    }
-
-
-
-
-
-    private DomainObjectLayoutData domainObject;
-
-    /**
-     * Whether to show the object's icon and title.
-     */
-    @XmlElementRef(type=DomainObjectLayoutData.class, name="domainObject", required = false)
-    public DomainObjectLayoutData getDomainObject() {
-        return domainObject;
-    }
-
-    public void setDomainObject(final DomainObjectLayoutData domainObjectLayoutData) {
-        this.domainObject = domainObjectLayoutData;
-    }
-
-
-
-    private List<ActionLayoutData> actions = Lists.newArrayList();
-
-    // no wrapper
-    @XmlElementRef(type = ActionLayoutData.class, name = "action", required = false)
-    public List<ActionLayoutData> getActions() {
-        return actions;
-    }
-
-    public void setActions(final List<ActionLayoutData> actions) {
-        this.actions = actions;
-    }
-
-
-
-    private List<BS3Row> rows = Lists.newArrayList();
-
-    // no wrapper
-    @XmlElement(name = "row", required = false)
-    public List<BS3Row> getRows() {
-        return rows;
-    }
-
-    public void setRows(final List<BS3Row> rows) {
-        this.rows = rows;
-    }
-
-
-
-    private List<BS3TabGroup> tabGroups = Lists.newArrayList();
-
-    // no wrapper
-    @XmlElement(name = "tabGroup", required = false)
-    public List<BS3TabGroup> getTabGroups() {
-        return tabGroups;
-    }
-
-    public void setTabGroups(final List<BS3TabGroup> tabGroups) {
-        this.tabGroups = tabGroups;
-    }
-
-
-
-    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 String metadataError;
-
-    /**
-     * For diagnostics; populated by the framework if and only if a metadata error.
-     */
-    @XmlElement(required = false)
-    public String getMetadataError() {
-        return metadataError;
-    }
-
-    public void setMetadataError(final String metadataError) {
-        this.metadataError = metadataError;
-    }
-
-
-
-    public String toCssClass() {
-        final Size size = getSize() != null? getSize(): Size.MD;
-        return "col-" + size.toCssClassFragment() + "-" + getSpan();
-    }
-
-
-    @Override public String toString() {
-        return "BS3Col{" +
-                "id='" + id + '\'' +
-                '}';
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/isis/blob/67b6e05e/core/applib/src/main/java/org/apache/isis/applib/layout/bootstrap3/BS3Element.java
----------------------------------------------------------------------
diff --git a/core/applib/src/main/java/org/apache/isis/applib/layout/bootstrap3/BS3Element.java b/core/applib/src/main/java/org/apache/isis/applib/layout/bootstrap3/BS3Element.java
deleted file mode 100644
index e407d10..0000000
--- a/core/applib/src/main/java/org/apache/isis/applib/layout/bootstrap3/BS3Element.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.applib.layout.bootstrap3;
-
-import java.io.Serializable;
-
-public interface BS3Element extends WithinGrid, Serializable {
-
-    /**
-     * Any additional CSS classes to render on the page element corresponding to this object,
-     * eg as per the <a href="http://getbootstrap.com/css/#grid-less">Bootstrap mixins</a> or just for
-     * custom styling.
-     */
-    String getCssClass();
-
-    void setCssClass(final String cssClass);
-
-
-}

http://git-wip-us.apache.org/repos/asf/isis/blob/67b6e05e/core/applib/src/main/java/org/apache/isis/applib/layout/bootstrap3/BS3ElementAbstract.java
----------------------------------------------------------------------
diff --git a/core/applib/src/main/java/org/apache/isis/applib/layout/bootstrap3/BS3ElementAbstract.java b/core/applib/src/main/java/org/apache/isis/applib/layout/bootstrap3/BS3ElementAbstract.java
deleted file mode 100644
index 0c39abc..0000000
--- a/core/applib/src/main/java/org/apache/isis/applib/layout/bootstrap3/BS3ElementAbstract.java
+++ /dev/null
@@ -1,46 +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.applib.layout.bootstrap3;
-
-import javax.xml.bind.annotation.XmlAttribute;
-
-/**
- * Superclass for all layout classes, factoring out the common {@link #getCssClass()} attribute.
- */
-public abstract class BS3ElementAbstract implements BS3Element {
-
-    private String cssClass;
-
-    /**
-     * Any additional CSS classes to render on the page element corresponding to this object,
-     * eg as per the <a href="http://getbootstrap.com/css/#grid-less">Bootstrap mixins</a> or just for
-     * custom styling.
-     */
-    @XmlAttribute(required = false)
-    public String getCssClass() {
-        return cssClass;
-    }
-
-    public void setCssClass(final String cssClass) {
-        this.cssClass = cssClass;
-    }
-
-
-
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/isis/blob/67b6e05e/core/applib/src/main/java/org/apache/isis/applib/layout/bootstrap3/BS3Grid.java
----------------------------------------------------------------------
diff --git a/core/applib/src/main/java/org/apache/isis/applib/layout/bootstrap3/BS3Grid.java b/core/applib/src/main/java/org/apache/isis/applib/layout/bootstrap3/BS3Grid.java
deleted file mode 100644
index 7ec9665..0000000
--- a/core/applib/src/main/java/org/apache/isis/applib/layout/bootstrap3/BS3Grid.java
+++ /dev/null
@@ -1,304 +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.applib.layout.bootstrap3;
-
-import java.util.LinkedHashMap;
-import java.util.List;
-
-import javax.xml.bind.annotation.XmlAttribute;
-import javax.xml.bind.annotation.XmlElement;
-import javax.xml.bind.annotation.XmlRootElement;
-import javax.xml.bind.annotation.XmlTransient;
-import javax.xml.bind.annotation.XmlType;
-
-import com.google.common.collect.Lists;
-import com.google.common.collect.Maps;
-
-import org.apache.isis.applib.annotation.Programmatic;
-import org.apache.isis.applib.layout.common.ActionLayoutData;
-import org.apache.isis.applib.layout.common.CollectionLayoutData;
-import org.apache.isis.applib.layout.common.DomainObjectLayoutData;
-import org.apache.isis.applib.layout.common.FieldSet;
-import org.apache.isis.applib.layout.common.Grid;
-import org.apache.isis.applib.layout.common.GridAbstract;
-import org.apache.isis.applib.layout.common.PropertyLayoutData;
-import org.apache.isis.applib.services.dto.Dto;
-
-/**
- * This is the top-level for rendering the domain object's properties, collections and actions.  It simply consists
- * of a number of rows.
- *
- * <p>
- *     The element is rendered as a &lt;div class=&quot;...&quot;&gt;
- * </p>
- */
-@XmlRootElement(
-        name = "grid"
-)
-@XmlType(
-        name = "grid"
-        , propOrder = {
-            "rows",
-            "metadataErrors"
-        }
-)
-public class BS3Grid extends GridAbstract implements BS3Element, Dto, BS3RowOwner {
-
-    private static final long serialVersionUID = 1L;
-
-
-    private String cssClass;
-
-    @XmlAttribute(required = false)
-    public String getCssClass() {
-        return cssClass;
-    }
-
-    public void setCssClass(final String cssClass) {
-        this.cssClass = cssClass;
-    }
-
-
-
-
-
-    private List<BS3Row> rows = Lists.newArrayList();
-
-    // no wrapper
-    @XmlElement(name = "row", required = true)
-    public List<BS3Row> getRows() {
-        return rows;
-    }
-
-    public void setRows(final List<BS3Row> rows) {
-        this.rows = rows;
-    }
-
-
-
-    private List<String> metadataErrors = Lists.newArrayList();
-
-    /**
-     * For diagnostics; populated by the framework if and only if a metadata error.
-     */
-    @XmlElement(name = "metadataError", required = false)
-    public List<String> getMetadataErrors() {
-        return metadataErrors;
-    }
-
-    public void setMetadataErrors(final List<String> metadataErrors) {
-        this.metadataErrors = metadataErrors;
-    }
-
-
-
-
-    private BS3RowOwner owner;
-
-
-
-    public interface Visitor extends Grid.Visitor {
-        void preVisit(final BS3Grid bs3Grid);
-        void visit(final BS3Grid bs3Grid);
-        void postVisit(final BS3Grid bs3Grid);
-        void preVisit(final BS3Row bs3Row);
-        void visit(final BS3Row bs3Row);
-        void postVisit(final BS3Row bs3Row);
-        void preVisit(final BS3Col bs3Col);
-        void visit(final BS3Col bs3Col);
-        void postVisit(final BS3Col bs3Col);
-        void visit(final BS3ClearFix bs3ClearFix);
-        void preVisit(final BS3TabGroup bs3TabGroup);
-        void visit(final BS3TabGroup bs3TabGroup);
-        void postVisit(final BS3TabGroup bs3TabGroup);
-        void preVisit(final BS3Tab bs3Tab);
-        void visit(final BS3Tab bs3Tab);
-        void postVisit(final BS3Tab bs3Tab);
-    }
-
-    public static class VisitorAdapter extends Grid.VisitorAdapter implements Visitor {
-        @Override public void preVisit(final BS3Grid bs3Grid) { }
-        @Override public void visit(final BS3Grid bs3Grid) { }
-        @Override public void postVisit(final BS3Grid bs3Grid) { }
-
-        @Override public void preVisit(final BS3Row bs3Row) { }
-        @Override public void visit(final BS3Row bs3Row) { }
-        @Override public void postVisit(final BS3Row bs3Row) { }
-
-        @Override public void preVisit(final BS3Col bs3Col) { }
-        @Override public void visit(final BS3Col bs3Col) { }
-        @Override public void postVisit(final BS3Col bs3Col) { }
-
-        @Override public void visit(final BS3ClearFix bs3ClearFix) { }
-
-        @Override public void preVisit(final BS3TabGroup bs3TabGroup) { }
-        @Override public void visit(final BS3TabGroup bs3TabGroup) { }
-        @Override public void postVisit(final BS3TabGroup bs3TabGroup) { }
-
-        @Override public void preVisit(final BS3Tab bs3Tab) { }
-        @Override public void visit(final BS3Tab bs3Tab) { }
-        @Override public void postVisit(final BS3Tab bs3Tab) { }
-    }
-
-    public void visit(final Grid.Visitor visitor) {
-        final BS3Grid.Visitor bs3Visitor = asBs3Visitor(visitor);
-        bs3Visitor.preVisit(this);
-        bs3Visitor.visit(this);
-        traverseRows(this, visitor);
-        bs3Visitor.postVisit(this);
-    }
-
-    protected void traverseRows(final BS3RowOwner rowOwner, final Grid.Visitor visitor) {
-        final BS3Grid.Visitor bs3Visitor = asBs3Visitor(visitor);
-        final List<BS3Row> rows = rowOwner.getRows();
-        for (BS3Row bs3Row : Lists.newArrayList(rows)) {
-            bs3Row.setOwner(this);
-            bs3Visitor.preVisit(bs3Row);
-            bs3Visitor.visit(bs3Row);
-            traverseCols(visitor, bs3Row);
-            bs3Visitor.postVisit(bs3Row);
-        }
-    }
-
-    private void traverseCols(final Grid.Visitor visitor, final BS3Row bs3Row) {
-        final BS3Grid.Visitor bs3Visitor = asBs3Visitor(visitor);
-        final List<BS3RowContent> cols = bs3Row.getCols();
-        for (BS3RowContent rowContent : Lists.newArrayList(cols)) {
-            rowContent.setOwner(bs3Row);
-            if(rowContent instanceof BS3Col) {
-                final BS3Col bs3Col = (BS3Col) rowContent;
-                bs3Visitor.preVisit(bs3Col);
-                bs3Visitor.visit(bs3Col);
-                traverseDomainObject(bs3Col, visitor);
-                traverseTabGroups(bs3Col, visitor);
-                traverseActions(bs3Col, visitor);
-                traverseFieldSets(bs3Col, visitor);
-                traverseCollections(bs3Col, visitor);
-                traverseRows(bs3Col, visitor);
-                bs3Visitor.postVisit(bs3Col);
-            } else if (rowContent instanceof BS3ClearFix) {
-                final BS3ClearFix bs3ClearFix = (BS3ClearFix) rowContent;
-                bs3Visitor.visit(bs3ClearFix);
-            } else {
-                throw new IllegalStateException(
-                        "Unrecognized implementation of BS3RowContent, " + rowContent);
-            }
-        }
-    }
-
-    private void traverseDomainObject(final BS3Col bs3Col, final Grid.Visitor visitor) {
-        final DomainObjectLayoutData domainObject = bs3Col.getDomainObject();
-        if(domainObject == null) {
-            return;
-        }
-        domainObject.setOwner(bs3Col);
-        visitor.visit(domainObject);
-    }
-
-    private void traverseTabGroups(
-            final BS3TabGroupOwner bs3TabGroupOwner,
-            final Grid.Visitor visitor) {
-        final BS3Grid.Visitor bs3Visitor = asBs3Visitor(visitor);
-        final List<BS3TabGroup> tabGroups = bs3TabGroupOwner.getTabGroups();
-        for (BS3TabGroup bs3TabGroup : Lists.newArrayList(tabGroups)) {
-            bs3TabGroup.setOwner(bs3TabGroupOwner);
-            bs3Visitor.preVisit(bs3TabGroup);
-            bs3Visitor.visit(bs3TabGroup);
-            traverseTabs(bs3TabGroup, visitor);
-            bs3Visitor.postVisit(bs3TabGroup);
-        }
-    }
-
-    private void traverseTabs(
-            final BS3TabOwner bs3TabOwner,
-            final Grid.Visitor visitor) {
-        final BS3Grid.Visitor bs3Visitor = asBs3Visitor(visitor);
-        final List<BS3Tab> tabs = bs3TabOwner.getTabs();
-        for (BS3Tab tab : Lists.newArrayList(tabs)) {
-            tab.setOwner(bs3TabOwner);
-            bs3Visitor.preVisit(tab);
-            bs3Visitor.visit(tab);
-            traverseRows(tab, visitor);
-            bs3Visitor.postVisit(tab);
-        }
-    }
-
-    private static Visitor asBs3Visitor(final Grid.Visitor visitor) {
-        return visitor instanceof Visitor? (Visitor) visitor : new BS3Grid.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);
-            }
-        };
-    }
-
-
-    @Programmatic
-    @XmlTransient
-    public LinkedHashMap<String, BS3Tab> getAllTabsByName() {
-        final LinkedHashMap<String, BS3Tab> tabsByName = Maps.newLinkedHashMap();
-
-        visit(new BS3Grid.VisitorAdapter() {
-            @Override
-            public void visit(final BS3Tab bS3Tab) {
-                tabsByName.put(bS3Tab.getName(), bS3Tab);
-            }
-        });
-        return tabsByName;
-    }
-
-
-    @Programmatic
-    @XmlTransient
-    public LinkedHashMap<String, HasCssId> getAllCssId() {
-        final LinkedHashMap<String, HasCssId> divsByCssId = Maps.newLinkedHashMap();
-
-        visit(new BS3Grid.VisitorAdapter() {
-            @Override
-            public void visit(final BS3Row bs3Row) {
-                final String id = bs3Row.getId();
-                divsByCssId.put(id, bs3Row);
-            }
-        });
-        return divsByCssId;
-    }
-
-    @Override
-    @Programmatic
-    @XmlTransient
-    public BS3Grid getGrid() {
-        return this;
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/isis/blob/67b6e05e/core/applib/src/main/java/org/apache/isis/applib/layout/bootstrap3/BS3Row.java
----------------------------------------------------------------------
diff --git a/core/applib/src/main/java/org/apache/isis/applib/layout/bootstrap3/BS3Row.java b/core/applib/src/main/java/org/apache/isis/applib/layout/bootstrap3/BS3Row.java
deleted file mode 100644
index d34e3ec..0000000
--- a/core/applib/src/main/java/org/apache/isis/applib/layout/bootstrap3/BS3Row.java
+++ /dev/null
@@ -1,140 +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.applib.layout.bootstrap3;
-
-import java.util.List;
-
-import javax.xml.bind.annotation.XmlAttribute;
-import javax.xml.bind.annotation.XmlElement;
-import javax.xml.bind.annotation.XmlElementRef;
-import javax.xml.bind.annotation.XmlElementRefs;
-import javax.xml.bind.annotation.XmlTransient;
-import javax.xml.bind.annotation.XmlType;
-
-import com.google.common.collect.Lists;
-
-import org.apache.isis.applib.annotation.Programmatic;
-
-/**
- * Contains a row of content, either on the top-level {@link BS3Grid page} or at any other lower-level element that can
- * contain rows, eg {@link BS3Tab tabs}.
- *
- * <p>
- *     It is rendered as a &lt;div class=&quot;row ...&quot;&gt;
- * </p>
- */
-@XmlType(
-        name = "row"
-        , propOrder = {
-            "cols"
-            , "metadataError"
-        }
-)
-public class BS3Row extends BS3ElementAbstract implements HasCssId, BS3RowContentOwner {
-
-    private static final long serialVersionUID = 1L;
-
-
-    private String id;
-
-    /**
-     * As per &lt;div id=&quot;...&quot;&gt;...&lt;/div&gt; : must be unique across entire page.
-     */
-    @XmlAttribute(required = false)
-    public String getId() {
-        return id;
-    }
-
-    public void setId(final String id) {
-        this.id = id;
-    }
-
-
-
-    private List<BS3RowContent> cols = Lists.newArrayList();
-
-    // no wrapper
-    @XmlElementRefs({
-            @XmlElementRef(type = BS3Col.class, name="col", required = true),
-            @XmlElementRef(type = BS3ClearFixVisible.class,  name="clearFixVisible", required = false),
-            @XmlElementRef(type = BS3ClearFixHidden.class,  name="clearFixHidden", required = false)
-    })
-    public List<BS3RowContent> getCols() {
-        return cols;
-    }
-
-    public void setCols(final List<BS3RowContent> cols) {
-        this.cols = cols;
-    }
-
-
-
-
-    private String metadataError;
-
-    /**
-     * For diagnostics; populated by the framework if and only if a metadata error.
-     */
-    @XmlElement(required = false)
-    public String getMetadataError() {
-        return metadataError;
-    }
-
-    public void setMetadataError(final String metadataError) {
-        this.metadataError = metadataError;
-    }
-
-
-    private BS3RowOwner owner;
-
-
-    /**
-     * Owner.
-     *
-     * <p>
-     *     Set programmatically by framework after reading in from XML.
-     * </p>
-     */
-    @XmlTransient
-    public BS3RowOwner getOwner() {
-        return owner;
-    }
-
-    public void setOwner(final BS3RowOwner owner) {
-        this.owner = owner;
-    }
-
-
-
-    @Override
-    @XmlTransient
-    @Programmatic
-    public BS3Grid getGrid() {
-        return getOwner().getGrid();
-    }
-
-
-    @Override public String toString() {
-        return "BS3Row{" +
-                "id='" + id + '\'' +
-                '}';
-    }
-
-
-}

http://git-wip-us.apache.org/repos/asf/isis/blob/67b6e05e/core/applib/src/main/java/org/apache/isis/applib/layout/bootstrap3/BS3RowContent.java
----------------------------------------------------------------------
diff --git a/core/applib/src/main/java/org/apache/isis/applib/layout/bootstrap3/BS3RowContent.java b/core/applib/src/main/java/org/apache/isis/applib/layout/bootstrap3/BS3RowContent.java
deleted file mode 100644
index 096578b..0000000
--- a/core/applib/src/main/java/org/apache/isis/applib/layout/bootstrap3/BS3RowContent.java
+++ /dev/null
@@ -1,95 +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.applib.layout.bootstrap3;
-
-import javax.xml.bind.annotation.XmlAttribute;
-import javax.xml.bind.annotation.XmlTransient;
-
-import org.apache.isis.applib.annotation.Programmatic;
-
-/**
- * Common superclass for any content of a row.
- *
- * <p>
- *     Most commonly the content of a row is {@link BS3Col col}umns, but it may be either of the
- *     {@link BS3ClearFix clearfix} classes.
- * </p>
- *
- */
-public abstract class BS3RowContent extends BS3ElementAbstract {
-
-    private static final long serialVersionUID = 1L;
-
-    /**
-     * As per <a href="http://getbootstrap.com/css/#grid-options">grid options</a>, also used in
-     * <a href="http://getbootstrap.com/css/#responsive-utilities">responsive utility</a> classes.
-     */
-    public enum Size {
-        XS,
-        SM,
-        MD,
-        LG;
-
-        public String toCssClassFragment() {
-            return name().toLowerCase();
-        }
-    }
-
-    private Size size;
-
-    /**
-     * Default if not specified is {@link Size#MD}.
-     */
-    @XmlAttribute(required = false)
-    public Size getSize() {
-        return size;
-    }
-
-    public void setSize(final Size size) {
-        this.size = size;
-    }
-
-
-    private BS3RowContentOwner owner;
-
-    /**
-     * Owner.
-     *
-     * <p>
-     *     Set programmatically by framework after reading in from XML.
-     * </p>
-     */
-    @XmlTransient
-    public BS3RowContentOwner getOwner() {
-        return owner;
-    }
-
-    public void setOwner(final BS3RowContentOwner owner) {
-        this.owner = owner;
-    }
-
-    @Override
-    @XmlTransient
-    @Programmatic
-    public BS3Grid getGrid() {
-        return getOwner().getGrid();
-    }
-
-
-}

http://git-wip-us.apache.org/repos/asf/isis/blob/67b6e05e/core/applib/src/main/java/org/apache/isis/applib/layout/bootstrap3/BS3RowContentOwner.java
----------------------------------------------------------------------
diff --git a/core/applib/src/main/java/org/apache/isis/applib/layout/bootstrap3/BS3RowContentOwner.java b/core/applib/src/main/java/org/apache/isis/applib/layout/bootstrap3/BS3RowContentOwner.java
deleted file mode 100644
index ed82e9e..0000000
--- a/core/applib/src/main/java/org/apache/isis/applib/layout/bootstrap3/BS3RowContentOwner.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.applib.layout.bootstrap3;
-
-import org.apache.isis.applib.layout.common.Owner;
-
-public interface BS3RowContentOwner extends Owner, WithinGrid {
-
-}

http://git-wip-us.apache.org/repos/asf/isis/blob/67b6e05e/core/applib/src/main/java/org/apache/isis/applib/layout/bootstrap3/BS3RowOwner.java
----------------------------------------------------------------------
diff --git a/core/applib/src/main/java/org/apache/isis/applib/layout/bootstrap3/BS3RowOwner.java b/core/applib/src/main/java/org/apache/isis/applib/layout/bootstrap3/BS3RowOwner.java
deleted file mode 100644
index aad3d43..0000000
--- a/core/applib/src/main/java/org/apache/isis/applib/layout/bootstrap3/BS3RowOwner.java
+++ /dev/null
@@ -1,28 +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.applib.layout.bootstrap3;
-
-import java.util.List;
-
-import org.apache.isis.applib.layout.common.Owner;
-
-public interface BS3RowOwner extends Owner, WithinGrid {
-
-    List<BS3Row> getRows();
-}


[50/50] [abbrv] isis git commit: ISIS-993: updating the components.xsd in docs directory

Posted by da...@apache.org.
ISIS-993: updating the components.xsd in docs directory


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

Branch: refs/heads/master
Commit: 4f3932d3894aee180910d5bad24514fcc7bd3673
Parents: b4adc4f
Author: Dan Haywood <da...@haywood-associates.co.uk>
Authored: Thu Mar 3 19:46:35 2016 +0000
Committer: Dan Haywood <da...@haywood-associates.co.uk>
Committed: Thu Mar 3 19:46:35 2016 +0000

----------------------------------------------------------------------
 .../applib/layout/component/component.xsd       | 42 ++++++++++----------
 1 file changed, 21 insertions(+), 21 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/isis/blob/4f3932d3/adocs/documentation/src/main/asciidoc/applib/layout/component/component.xsd
----------------------------------------------------------------------
diff --git a/adocs/documentation/src/main/asciidoc/applib/layout/component/component.xsd b/adocs/documentation/src/main/asciidoc/applib/layout/component/component.xsd
index 33dc6aa..0ed2a41 100644
--- a/adocs/documentation/src/main/asciidoc/applib/layout/component/component.xsd
+++ b/adocs/documentation/src/main/asciidoc/applib/layout/component/component.xsd
@@ -1,5 +1,4 @@
-<?xml version="1.0" standalone="yes"?>
-<xs:schema elementFormDefault="qualified" version="1.0" targetNamespace="http://isis.apache.org/applib/layout/component" xmlns:tns="http://isis.apache.org/applib/layout/component" xmlns:xs="http://www.w3.org/2001/XMLSchema">
+<?xml version="1.0" encoding="UTF-8"?><xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:tns="http://isis.apache.org/applib/layout/component" elementFormDefault="qualified" targetNamespace="http://isis.apache.org/applib/layout/component" version="1.0">
 
   <xs:element name="action" type="tns:action"/>
 
@@ -13,22 +12,23 @@
 
   <xs:complexType name="domainObject">
     <xs:sequence>
-      <xs:element name="named" type="xs:string" minOccurs="0"/>
-      <xs:element name="describedAs" type="xs:string" minOccurs="0"/>
-      <xs:element name="plural" type="xs:string" minOccurs="0"/>
-      <xs:element name="metadataError" type="xs:string" minOccurs="0"/>
+      <xs:element minOccurs="0" name="named" type="xs:string"/>
+      <xs:element minOccurs="0" name="describedAs" type="xs:string"/>
+      <xs:element minOccurs="0" name="plural" type="xs:string"/>
+      <xs:element minOccurs="0" name="metadataError" type="xs:string"/>
     </xs:sequence>
     <xs:attribute name="bookmarking" type="tns:bookmarkPolicy"/>
     <xs:attribute name="cssClass" type="xs:string"/>
     <xs:attribute name="cssClassFa" type="xs:string"/>
     <xs:attribute name="cssClassFaPosition" type="tns:cssClassFaPosition"/>
+    <xs:attribute name="namedEscaped" type="xs:boolean"/>
   </xs:complexType>
 
   <xs:complexType name="action">
     <xs:sequence>
-      <xs:element name="named" type="xs:string" minOccurs="0"/>
-      <xs:element name="describedAs" type="xs:string" minOccurs="0"/>
-      <xs:element name="metadataError" type="xs:string" minOccurs="0"/>
+      <xs:element minOccurs="0" name="named" type="xs:string"/>
+      <xs:element minOccurs="0" name="describedAs" type="xs:string"/>
+      <xs:element minOccurs="0" name="metadataError" type="xs:string"/>
     </xs:sequence>
     <xs:attribute name="bookmarking" type="tns:bookmarkPolicy"/>
     <xs:attribute name="cssClass" type="xs:string"/>
@@ -42,9 +42,9 @@
 
   <xs:complexType name="fieldSet">
     <xs:sequence>
-      <xs:element ref="tns:action" minOccurs="0" maxOccurs="unbounded"/>
-      <xs:element ref="tns:property" minOccurs="0" maxOccurs="unbounded"/>
-      <xs:element name="metadataError" type="xs:string" minOccurs="0"/>
+      <xs:element maxOccurs="unbounded" minOccurs="0" ref="tns:action"/>
+      <xs:element maxOccurs="unbounded" minOccurs="0" ref="tns:property"/>
+      <xs:element minOccurs="0" name="metadataError" type="xs:string"/>
     </xs:sequence>
     <xs:attribute name="name" type="xs:string" use="required"/>
     <xs:attribute name="id" type="xs:string"/>
@@ -54,10 +54,10 @@
 
   <xs:complexType name="property">
     <xs:sequence>
-      <xs:element name="named" type="xs:string" minOccurs="0"/>
-      <xs:element name="describedAs" type="xs:string" minOccurs="0"/>
-      <xs:element ref="tns:action" minOccurs="0" maxOccurs="unbounded"/>
-      <xs:element name="metadataError" type="xs:string" minOccurs="0"/>
+      <xs:element minOccurs="0" name="named" type="xs:string"/>
+      <xs:element minOccurs="0" name="describedAs" type="xs:string"/>
+      <xs:element maxOccurs="unbounded" minOccurs="0" ref="tns:action"/>
+      <xs:element minOccurs="0" name="metadataError" type="xs:string"/>
     </xs:sequence>
     <xs:attribute name="cssClass" type="xs:string"/>
     <xs:attribute name="hidden" type="tns:where"/>
@@ -71,11 +71,11 @@
 
   <xs:complexType name="collection">
     <xs:sequence>
-      <xs:element name="named" type="xs:string" minOccurs="0"/>
-      <xs:element name="describedAs" type="xs:string" minOccurs="0"/>
-      <xs:element name="sortedBy" type="xs:string" minOccurs="0"/>
-      <xs:element ref="tns:action" minOccurs="0" maxOccurs="unbounded"/>
-      <xs:element name="metadataError" type="xs:string" minOccurs="0"/>
+      <xs:element minOccurs="0" name="named" type="xs:string"/>
+      <xs:element minOccurs="0" name="describedAs" type="xs:string"/>
+      <xs:element minOccurs="0" name="sortedBy" type="xs:string"/>
+      <xs:element maxOccurs="unbounded" minOccurs="0" ref="tns:action"/>
+      <xs:element minOccurs="0" name="metadataError" type="xs:string"/>
     </xs:sequence>
     <xs:attribute name="cssClass" type="xs:string"/>
     <xs:attribute name="defaultView" type="xs:string"/>


[40/50] [abbrv] isis git commit: ISIS-993: when normalize, bind actions to properties or field sets (if metadata not already specified as an annotation).

Posted by da...@apache.org.
ISIS-993: when normalize, bind actions to properties or field sets (if metadata not already specified as an annotation).


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

Branch: refs/heads/master
Commit: e014bf80a823457bdbfc3acb5fac4b4a666715a1
Parents: 62f69d1
Author: Dan Haywood <da...@haywood-associates.co.uk>
Authored: Mon Feb 29 10:05:02 2016 +0000
Committer: Dan Haywood <da...@haywood-associates.co.uk>
Committed: Mon Feb 29 10:05:02 2016 +0000

----------------------------------------------------------------------
 .../layout/component/ActionLayoutDataOwner.java |   1 +
 .../layout/component/CollectionLayoutData.java  |   3 +-
 .../layout/component/PropertyLayoutData.java    |   4 +-
 .../grid/GridNormalizerServiceAbstract.java     |   3 +-
 .../bootstrap3/GridNormalizerServiceBS3.java    | 153 +++++++++++++------
 5 files changed, 117 insertions(+), 47 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/isis/blob/e014bf80/core/applib/src/main/java/org/apache/isis/applib/layout/component/ActionLayoutDataOwner.java
----------------------------------------------------------------------
diff --git a/core/applib/src/main/java/org/apache/isis/applib/layout/component/ActionLayoutDataOwner.java b/core/applib/src/main/java/org/apache/isis/applib/layout/component/ActionLayoutDataOwner.java
index 6372cfb..c4b07bb 100644
--- a/core/applib/src/main/java/org/apache/isis/applib/layout/component/ActionLayoutDataOwner.java
+++ b/core/applib/src/main/java/org/apache/isis/applib/layout/component/ActionLayoutDataOwner.java
@@ -22,4 +22,5 @@ import java.util.List;
 
 public interface ActionLayoutDataOwner extends Owner {
     List<ActionLayoutData> getActions();
+    void setActions(List<ActionLayoutData> actions);
 }

http://git-wip-us.apache.org/repos/asf/isis/blob/e014bf80/core/applib/src/main/java/org/apache/isis/applib/layout/component/CollectionLayoutData.java
----------------------------------------------------------------------
diff --git a/core/applib/src/main/java/org/apache/isis/applib/layout/component/CollectionLayoutData.java b/core/applib/src/main/java/org/apache/isis/applib/layout/component/CollectionLayoutData.java
index 813c8c1..54a664a 100644
--- a/core/applib/src/main/java/org/apache/isis/applib/layout/component/CollectionLayoutData.java
+++ b/core/applib/src/main/java/org/apache/isis/applib/layout/component/CollectionLayoutData.java
@@ -28,6 +28,7 @@ import javax.xml.bind.annotation.XmlTransient;
 import javax.xml.bind.annotation.XmlType;
 
 import com.google.common.base.Function;
+import com.google.common.collect.Lists;
 
 import org.apache.isis.applib.annotation.Where;
 
@@ -197,7 +198,7 @@ public class CollectionLayoutData
 
 
 
-    private List<ActionLayoutData> actions;
+    private List<ActionLayoutData> actions = Lists.newArrayList();
 
     // no wrapper
     @XmlElement(name = "action", required = false)

http://git-wip-us.apache.org/repos/asf/isis/blob/e014bf80/core/applib/src/main/java/org/apache/isis/applib/layout/component/PropertyLayoutData.java
----------------------------------------------------------------------
diff --git a/core/applib/src/main/java/org/apache/isis/applib/layout/component/PropertyLayoutData.java b/core/applib/src/main/java/org/apache/isis/applib/layout/component/PropertyLayoutData.java
index cf09ced..1922d76 100644
--- a/core/applib/src/main/java/org/apache/isis/applib/layout/component/PropertyLayoutData.java
+++ b/core/applib/src/main/java/org/apache/isis/applib/layout/component/PropertyLayoutData.java
@@ -27,6 +27,8 @@ import javax.xml.bind.annotation.XmlRootElement;
 import javax.xml.bind.annotation.XmlTransient;
 import javax.xml.bind.annotation.XmlType;
 
+import com.google.common.collect.Lists;
+
 import org.apache.isis.applib.annotation.LabelPosition;
 import org.apache.isis.applib.annotation.Where;
 
@@ -195,7 +197,7 @@ public class PropertyLayoutData
 
 
 
-    private List<ActionLayoutData> actions;
+    private List<ActionLayoutData> actions = Lists.newArrayList();
 
     // no wrapper
     @XmlElement(name = "action", required = false)

http://git-wip-us.apache.org/repos/asf/isis/blob/e014bf80/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 db40d07..fe7c5bb 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
@@ -176,11 +176,11 @@ public abstract class GridNormalizerServiceAbstract<G extends Grid>
     @Override
     public void complete(final G grid, final Class<?> domainClass) {
         normalize(grid, domainClass);
-        if(true) {
 
         final ObjectSpecification objectSpec = specificationLookup.loadSpecification(domainClass);
 
         grid.visit(new Grid.VisitorAdapter() {
+
             @Override
             public void visit(final ActionLayoutData actionLayoutData) {
                 final ObjectAction objectAction = objectSpec.getObjectAction(actionLayoutData.getId());
@@ -231,7 +231,6 @@ public abstract class GridNormalizerServiceAbstract<G extends Grid>
                 setPluralIfAny(domainObjectLayoutData, objectSpec);
             }
         });
-        }
     }
 
     private static boolean isDoOp(final Facet facet) {

http://git-wip-us.apache.org/repos/asf/isis/blob/e014bf80/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 e99a9e1..c57212a 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
@@ -22,11 +22,11 @@ import java.util.List;
 import java.util.Map;
 import java.util.Set;
 import java.util.concurrent.atomic.AtomicReference;
+import java.util.function.Consumer;
 
 import javax.annotation.Nullable;
 
 import com.google.common.base.Function;
-import com.google.common.base.Predicate;
 import com.google.common.base.Predicates;
 import com.google.common.base.Strings;
 import com.google.common.collect.FluentIterable;
@@ -41,6 +41,7 @@ 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.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;
@@ -52,7 +53,9 @@ import org.apache.isis.applib.layout.grid.bootstrap3.BS3Row;
 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.actions.position.ActionPositionFacet;
 import org.apache.isis.core.metamodel.facets.members.order.MemberOrderFacet;
+import org.apache.isis.core.metamodel.facets.members.order.annotprop.MemberOrderFacetAnnotation;
 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;
@@ -163,9 +166,9 @@ public class GridNormalizerServiceBS3 extends GridNormalizerServiceAbstract<BS3G
 
         final BS3Grid bs3Grid = (BS3Grid) grid;
 
-        final LinkedHashMap<String, PropertyLayoutData> propertyIds = bs3Grid.getAllPropertiesById();
-        final LinkedHashMap<String, CollectionLayoutData> collectionIds = bs3Grid.getAllCollectionsById();
-        final LinkedHashMap<String, ActionLayoutData> actionIds = bs3Grid.getAllActionsById();
+        final LinkedHashMap<String, PropertyLayoutData> propertyLayoutDataById = bs3Grid.getAllPropertiesById();
+        final LinkedHashMap<String, CollectionLayoutData> collectionLayoutDataById = bs3Grid.getAllCollectionsById();
+        final LinkedHashMap<String, ActionLayoutData> actionLayoutDataById = bs3Grid.getAllActionsById();
 
 
         // find all row and col ids
@@ -316,12 +319,12 @@ public class GridNormalizerServiceBS3 extends GridNormalizerServiceAbstract<BS3G
 
         // add missing properties will be added to the first fieldset of the specified column
         final Tuple<List<String>> propertyIdTuple =
-                surplusAndMissing(propertyIds.keySet(),  oneToOneAssociationById.keySet());
+                surplusAndMissing(propertyLayoutDataById.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");
+            propertyLayoutDataById.get(surplusPropertyId).setMetadataError("No such property");
         }
 
         // catalog which associations are bound to an existing field set
@@ -390,25 +393,26 @@ public class GridNormalizerServiceBS3 extends GridNormalizerServiceAbstract<BS3G
                 addPropertiesTo(fieldSet,
                         FluentIterable.from(associations)
                                       .transform(ObjectAssociation.Functions.toId())
-                                      .toList());
+                                      .toList(),
+                        propertyLayoutDataById);
             }
 
             if(!unboundPropertyIds.isEmpty()) {
                 final FieldSet fieldSet = fieldSetForUnreferencedPropertiesRef.get();
                 if(fieldSet != null) {
-                    addPropertiesTo(fieldSet, unboundPropertyIds);
+                    addPropertiesTo(fieldSet, unboundPropertyIds, propertyLayoutDataById);
                 }
             }
         }
 
         // any missing collections will be added as tabs to a new TabGroup in the specified column
         final Tuple<List<String>> collectionIdTuple =
-                surplusAndMissing(collectionIds.keySet(), oneToManyAssociationById.keySet());
+                surplusAndMissing(collectionLayoutDataById.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");
+            collectionLayoutDataById.get(surplusCollectionId).setMetadataError("No such collection");
         }
 
         if(!missingCollectionIds.isEmpty()) {
@@ -430,57 +434,100 @@ public class GridNormalizerServiceBS3 extends GridNormalizerServiceAbstract<BS3G
             } else {
                 final BS3Col bs3Col = colForUnreferencedCollectionsRef.get();
                 if(bs3Col != null) {
-                    addCollectionsTo(bs3Col, sortedMissingCollectionIds);
+                    addCollectionsTo(bs3Col, sortedMissingCollectionIds, collectionLayoutDataById);
                 }
             }
         }
 
         // any missing actions will be added as actions in the specified column
         final Tuple<List<String>> actionIdTuple =
-                surplusAndMissing(actionIds.keySet(), objectActionById.keySet());
+                surplusAndMissing(actionLayoutDataById.keySet(), objectActionById.keySet());
         final List<String> surplusActionIds = actionIdTuple.first;
+        final List<String> possiblyMissingActionIds = actionIdTuple.second;
 
-        // ... the missing actions are those in the second tuple, excluding those bound via @MemberOrder#name
-        // to a property or collection.
-        final List<String> missingActionIds =
-                FluentIterable.from(actionIdTuple.second)
-                        .filter(new Predicate<String>() {
+        final List<String> associatedActionIds = Lists.newArrayList();
+
+        FluentIterable.from(possiblyMissingActionIds)
+                .forEach(
+                        new Consumer<String>() {
                             @Override
-                            public boolean apply(final String actionId) {
+                            public void accept(final String actionId) {
                                 final ObjectAction oa = objectActionById.get(actionId);
                                 final MemberOrderFacet memberOrderFacet = oa.getFacet(MemberOrderFacet.class);
                                 if(memberOrderFacet == null) {
-                                    return true;
+                                    return;
                                 }
                                 final String memberOrderName = memberOrderFacet.name();
                                 if (memberOrderName == null) {
-                                    return true;
+                                    return;
                                 }
                                 final String id = asId(memberOrderName);
+
                                 if (oneToOneAssociationById.containsKey(id)) {
-                                    return false;
+                                    associatedActionIds.add(actionId);
+
+                                    if(!(memberOrderFacet instanceof MemberOrderFacetAnnotation)) {
+                                        // if binding not via annotation, then explicitly bind this
+                                        // action to the property
+                                        final PropertyLayoutData propertyLayoutData = propertyLayoutDataById.get(id);
+                                        final ActionLayoutData actionLayoutData = new ActionLayoutData(actionId);
+
+                                        final ActionPositionFacet actionPositionFacet = oa.getFacet(ActionPositionFacet.class);
+                                        final ActionLayoutDataOwner owner;
+                                        final ActionLayout.Position position;
+                                        if(actionPositionFacet != null) {
+                                            position = actionPositionFacet.position();
+                                            owner = position == ActionLayout.Position.PANEL ||
+                                                    position == ActionLayout.Position.PANEL_DROPDOWN
+                                                        ? propertyLayoutData.getOwner()
+                                                        : propertyLayoutData;
+                                        } else {
+                                            position = ActionLayout.Position.BELOW;
+                                            owner = propertyLayoutData;
+                                        }
+                                        actionLayoutData.setPosition(position);
+                                        addActionTo(owner, actionLayoutData);
+                                    }
+
+                                    return;
                                 }
                                 if (oneToManyAssociationById.containsKey(id)) {
-                                    return false;
+                                    associatedActionIds.add(actionId);
+
+                                    if(!(memberOrderFacet instanceof MemberOrderFacetAnnotation)) {
+                                        // if binding not via annotation, then explicitly bind this
+                                        // action to the property
+                                        final CollectionLayoutData collectionLayoutData = collectionLayoutDataById.get(id);
+                                        final ActionLayoutData actionLayoutData = new ActionLayoutData(actionId);
+                                        addActionTo(collectionLayoutData, actionLayoutData);
+                                    }
+                                    return;
                                 }
                                 // if the @MemberOrder for the action references a field set (that has bound
                                 // associations), then don't mark it as missing, butinstead explicitly add it to the
                                 // list of actions of that fieldset.
                                 final Set<String> boundAssociationIds = boundAssociationIdsByFieldSetId.get(id);
                                 if(boundAssociationIds != null && !boundAssociationIds.isEmpty()) {
+
+                                    associatedActionIds.add(actionId);
+
                                     final ActionLayoutData actionLayoutData = new ActionLayoutData(actionId);
+
                                     actionLayoutData.setPosition(ActionLayout.Position.PANEL_DROPDOWN);
-                                    fieldSetIds.get(id).getActions().add(actionLayoutData);
-                                    return false;
+                                    final FieldSet fieldSet = fieldSetIds.get(id);
+                                    addActionTo(fieldSet, actionLayoutData);
+                                    return;
                                 }
-                                // is missing after all.
-                                return true;
                             }
-                        })
-                        .toList();
+                        });
+
+        // ... the missing actions are those in the second tuple, excluding those associated (via @MemberOrder#name)
+        // to a property or collection.
+        final List<String> missingActionIds = Lists.newArrayList(possiblyMissingActionIds);
+        missingActionIds.removeAll(associatedActionIds);
 
         for (String surplusActionId : surplusActionIds) {
-            actionIds.get(surplusActionId).setMetadataError("No such action");
+            actionLayoutDataById.get(surplusActionId).setMetadataError("No such action");
         }
 
         if(!missingActionIds.isEmpty()) {
@@ -490,7 +537,7 @@ public class GridNormalizerServiceBS3 extends GridNormalizerServiceAbstract<BS3G
             } else {
                 final FieldSet fieldSet = fieldSetForUnreferencedActionsRef.get();
                 if(fieldSet != null) {
-                    addActionsTo(fieldSet, missingActionIds);
+                    addActionsTo(fieldSet, missingActionIds, actionLayoutDataById);
                 }
             }
         }
@@ -498,6 +545,14 @@ public class GridNormalizerServiceBS3 extends GridNormalizerServiceAbstract<BS3G
         return true;
     }
 
+    protected void addActionTo(final ActionLayoutDataOwner owner, final ActionLayoutData actionLayoutData) {
+        List<ActionLayoutData> actions = owner.getActions();
+        if(actions == null) {
+            owner.setActions(actions = Lists.newArrayList());
+        }
+        actions.add(actionLayoutData);
+    }
+
     static String asId(final String str) {
         if(Strings.isNullOrEmpty(str)) {
             return str;
@@ -508,10 +563,10 @@ public class GridNormalizerServiceBS3 extends GridNormalizerServiceAbstract<BS3G
 
     protected void addPropertiesTo(
             final FieldSet fieldSet,
-            final List<String> propertyIds) {
-        final List<PropertyLayoutData> properties = fieldSet.getProperties();
+            final List<String> propertyIds,
+            final LinkedHashMap<String, PropertyLayoutData> propertyLayoutDataById) {
         final ImmutableList<String> existingIds = FluentIterable
-                .from(properties)
+                .from(fieldSet.getProperties())
                 .transform(new Function<PropertyLayoutData, String>() {
                     @Nullable
                     @Override
@@ -522,13 +577,18 @@ public class GridNormalizerServiceBS3 extends GridNormalizerServiceAbstract<BS3G
                 .toList();
         for (final String propertyId : propertyIds) {
             if(!existingIds.contains(propertyId)) {
-                properties.add(new PropertyLayoutData(propertyId));
+                final PropertyLayoutData propertyLayoutData = new PropertyLayoutData(propertyId);
+                fieldSet.getProperties().add(propertyLayoutData);
+                propertyLayoutData.setOwner(fieldSet);
+                propertyLayoutDataById.put(propertyId, propertyLayoutData);
             }
         }
     }
 
-    protected void addActionsTo(final BS3Col bs3Col, final List<String> missingActionIds) {
-        for (String actionId : missingActionIds) {
+    protected void addActionsTo(
+            final BS3Col bs3Col,
+            final List<String> actionIds) {
+        for (String actionId : actionIds) {
             List<ActionLayoutData> actions = bs3Col.getActions();
             if(actions == null) {
                 actions = Lists.newArrayList();
@@ -538,20 +598,27 @@ public class GridNormalizerServiceBS3 extends GridNormalizerServiceAbstract<BS3G
         }
     }
 
-    protected void addActionsTo(final FieldSet fieldSet, final List<String> missingActionIds) {
+    protected void addActionsTo(
+            final FieldSet fieldSet,
+            final List<String> actionIds,
+            final LinkedHashMap<String, ActionLayoutData> actionLayoutDataById) {
         List<ActionLayoutData> actions = fieldSet.getActions();
-        for (String actionId : missingActionIds) {
-            actions.add(new ActionLayoutData(actionId));
+        for (String actionId : actionIds) {
+            final ActionLayoutData actionLayoutData = new ActionLayoutData(actionId);
+            actions.add(actionLayoutData);
+            actionLayoutDataById.put(actionId, actionLayoutData);
         }
     }
 
     protected void addCollectionsTo(
             final BS3Col tabRowCol,
-            final List<String> collectionIds) {
+            final List<String> collectionIds,
+            final LinkedHashMap<String, CollectionLayoutData> collectionLayoutDataById) {
         for (final String collectionId : collectionIds) {
-            final CollectionLayoutData layoutMetadata = new CollectionLayoutData(collectionId);
-            layoutMetadata.setDefaultView("table");
-            tabRowCol.getCollections().add(layoutMetadata);
+            final CollectionLayoutData collectionLayoutData = new CollectionLayoutData(collectionId);
+            collectionLayoutData.setDefaultView("table");
+            tabRowCol.getCollections().add(collectionLayoutData);
+            collectionLayoutDataById.put(collectionId, collectionLayoutData);
         }
     }
 


[12/50] [abbrv] isis git commit: ISIS-993: GridFacetDefault now derives a grid from facets if no XML is available.

Posted by da...@apache.org.
ISIS-993: GridFacetDefault now derives a grid from facets if no XML is available.

This design probably means that a lot of the existing "fixedcol" code could be removed; in effect we always render using BS3.  Will leave in for the moment, though.


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

Branch: refs/heads/master
Commit: 959d42477b4aefa383c562f166a91be630e3f3eb
Parents: 4104039
Author: Dan Haywood <da...@haywood-associates.co.uk>
Authored: Wed Feb 10 21:23:47 2016 +0000
Committer: Dan Haywood <da...@haywood-associates.co.uk>
Committed: Wed Feb 10 21:23:47 2016 +0000

----------------------------------------------------------------------
 .../applib/layout/grid/bootstrap3/BS3Col.java   |  3 +-
 .../facets/object/grid/GridFacetDefault.java    | 98 ++++++++++++++++++--
 .../json/LayoutMetadataReaderFromJson.java      |  4 +-
 .../services/grid/GridServiceDefault.java       |  6 +-
 .../services/metamodel/MetadataMenu.java        |  3 +-
 core/pom.xml                                    |  2 +
 .../ui/components/layout/bs3/col/Col.java       |  5 +
 .../dom/simple/SimpleObject.layout.xml          |  6 ++
 8 files changed, 112 insertions(+), 15 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/isis/blob/959d4247/core/applib/src/main/java/org/apache/isis/applib/layout/grid/bootstrap3/BS3Col.java
----------------------------------------------------------------------
diff --git a/core/applib/src/main/java/org/apache/isis/applib/layout/grid/bootstrap3/BS3Col.java b/core/applib/src/main/java/org/apache/isis/applib/layout/grid/bootstrap3/BS3Col.java
index bc289d8..2b33287 100644
--- a/core/applib/src/main/java/org/apache/isis/applib/layout/grid/bootstrap3/BS3Col.java
+++ b/core/applib/src/main/java/org/apache/isis/applib/layout/grid/bootstrap3/BS3Col.java
@@ -247,11 +247,10 @@ public class BS3Col extends BS3RowContent
         return "col-" + size.toCssClassFragment() + "-" + getSpan();
     }
 
-
     @Override public String toString() {
         return "BS3Col{" +
                 "id='" + id + '\'' +
+                ", span=" + span +
                 '}';
     }
-
 }

http://git-wip-us.apache.org/repos/asf/isis/blob/959d4247/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 69ada55..b4329db 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,16 +18,29 @@
  */
 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
@@ -52,7 +65,6 @@ public class GridFacetDefault
     private final GridService gridService;
 
     private Grid grid;
-    private boolean blacklisted;
 
     private GridFacetDefault(
             final FacetHolder facetHolder,
@@ -63,22 +75,91 @@ public class GridFacetDefault
         this.deploymentCategory = deploymentCategory;
     }
 
-    /**
-     * Blacklisting only occurs if running in production mode.
-     */
     public Grid getGrid() {
-        if (deploymentCategory.isProduction() || blacklisted) {
+        if (deploymentCategory.isProduction() && this.grid != null) {
             return this.grid;
         }
         final Class<?> domainClass = getSpecification().getCorrespondingClass();
-        final Grid grid = gridService.fromXml(domainClass);
-        if(deploymentCategory.isProduction() && grid == null) {
-            blacklisted = true;
+        Grid grid = gridService.fromXml(domainClass);
+        if(grid == null) {
+            grid = deriveGrid();
         }
+
         this.grid = 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(memberGroup);
+                if(unreferencedProperties && col.getFieldSets().isEmpty()) {
+                    fieldSet.setUnreferencedProperties(true);
+                }
+                col.getFieldSets().add(fieldSet);
+            }
+        }
+    }
+
+
+
     private Grid normalize(final Grid grid) {
         if(grid == null) {
             return null;
@@ -88,6 +169,7 @@ public class GridFacetDefault
         return gridService.normalize(grid);
     }
 
+
     private ObjectSpecification getSpecification() {
         return (ObjectSpecification) getFacetHolder();
     }

http://git-wip-us.apache.org/repos/asf/isis/blob/959d4247/core/metamodel/src/main/java/org/apache/isis/core/metamodel/layoutmetadata/json/LayoutMetadataReaderFromJson.java
----------------------------------------------------------------------
diff --git a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/layoutmetadata/json/LayoutMetadataReaderFromJson.java b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/layoutmetadata/json/LayoutMetadataReaderFromJson.java
index 05b84fc..59cdb77 100644
--- a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/layoutmetadata/json/LayoutMetadataReaderFromJson.java
+++ b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/layoutmetadata/json/LayoutMetadataReaderFromJson.java
@@ -415,7 +415,7 @@ public class LayoutMetadataReaderFromJson implements LayoutMetadataReader2, Serv
         }
 
         try {
-            final GridService gridService = getObjectLayoutMetadataService();
+            final GridService gridService = getGridService();
             if(gridService.exists(domainClass)) {
                 blacklisted.add(domainClass);
                 return null;
@@ -699,7 +699,7 @@ public class LayoutMetadataReaderFromJson implements LayoutMetadataReader2, Serv
 
 
 
-    private GridService getObjectLayoutMetadataService() {
+    private GridService getGridService() {
         return servicesInjector.lookupService(GridService.class);
     }
 

http://git-wip-us.apache.org/repos/asf/isis/blob/959d4247/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 6da6da7..e9dc2b2 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
@@ -41,13 +41,14 @@ import org.slf4j.LoggerFactory;
 import org.apache.isis.applib.annotation.DomainService;
 import org.apache.isis.applib.annotation.NatureOfService;
 import org.apache.isis.applib.annotation.Programmatic;
-import org.apache.isis.applib.services.layout.GridNormalizerService;
 import org.apache.isis.applib.layout.component.Grid;
 import org.apache.isis.applib.services.jaxb.JaxbService;
+import org.apache.isis.applib.services.layout.GridNormalizerService;
 import org.apache.isis.applib.services.layout.GridService;
 import org.apache.isis.core.metamodel.deployment.DeploymentCategory;
 import org.apache.isis.core.metamodel.deployment.DeploymentCategoryAware;
 import org.apache.isis.core.metamodel.facets.object.grid.GridFacet;
+import org.apache.isis.core.metamodel.layoutmetadata.json.LayoutMetadataReaderFromJson;
 import org.apache.isis.core.metamodel.spec.ObjectSpecification;
 import org.apache.isis.core.metamodel.spec.SpecificationLoader;
 import org.apache.isis.core.metamodel.spec.SpecificationLoaderAware;
@@ -69,6 +70,8 @@ public class GridServiceDefault
     // cache (used only in prototyping mode)
     private final Map<String, Grid> pageByXml = Maps.newHashMap();
 
+    private LayoutMetadataReaderFromJson layoutMetadataReaderFromJson = new LayoutMetadataReaderFromJson();
+
     @Override
     @Programmatic
     public boolean exists(final Class<?> domainClass) {
@@ -94,7 +97,6 @@ public class GridServiceDefault
             return null;
         }
 
-
         if(!deploymentCategory.isProduction()) {
             final Grid grid = pageByXml.get(xml);
             if(grid != null) {

http://git-wip-us.apache.org/repos/asf/isis/blob/959d4247/core/metamodel/src/main/java/org/apache/isis/core/metamodel/services/metamodel/MetadataMenu.java
----------------------------------------------------------------------
diff --git a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/services/metamodel/MetadataMenu.java b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/services/metamodel/MetadataMenu.java
index e5f469b..2872f1e 100644
--- a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/services/metamodel/MetadataMenu.java
+++ b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/services/metamodel/MetadataMenu.java
@@ -88,7 +88,8 @@ public class MetadataMenu implements SpecificationLoaderSpiAware {
             restrictTo = RestrictTo.PROTOTYPING
     )
     @ActionLayout(
-            cssClassFa = "fa-download"
+            cssClassFa = "fa-download",
+            named = "Download Layouts (XML)"
     )
     @MemberOrder(sequence="500.400.1")
     public Blob downloadLayouts(final GridService.Style style) {

http://git-wip-us.apache.org/repos/asf/isis/blob/959d4247/core/pom.xml
----------------------------------------------------------------------
diff --git a/core/pom.xml b/core/pom.xml
index 3734a80..0f609dd 100644
--- a/core/pom.xml
+++ b/core/pom.xml
@@ -96,6 +96,8 @@
 	    ISIS-1288: seen integration tests to fail;
 	    domain object date holding 1-Aug-2015 after xactn retrieved as 31-Jul-2015
 
+        https://github.com/datanucleus/datanucleus-jodatime/commit/b85795a1bf5f92909a95d2c8f8822bba2ba38b5f
+
         <datanucleus-jodatime.version>4.1.1</datanucleus-jodatime.version>
 	-->
         <datanucleus-maven-plugin.version>4.0.2</datanucleus-maven-plugin.version>

http://git-wip-us.apache.org/repos/asf/isis/blob/959d4247/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/layout/bs3/col/Col.java
----------------------------------------------------------------------
diff --git a/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/layout/bs3/col/Col.java b/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/layout/bs3/col/Col.java
index 93198b2..057ea4b 100644
--- a/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/layout/bs3/col/Col.java
+++ b/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/layout/bs3/col/Col.java
@@ -86,6 +86,11 @@ public class Col extends PanelAbstract<EntityModel> {
 
         setRenderBodyOnly(true);
 
+        if(bs3Col.getSpan() == 0) {
+            Components.permanentlyHide(this, ID_COL);
+            return;
+        }
+
         final WebMarkupContainer div = new WebMarkupContainer(ID_COL);
 
         CssClassAppender.appendCssClassTo(div, bs3Col.toCssClass());

http://git-wip-us.apache.org/repos/asf/isis/blob/959d4247/example/application/simpleapp/dom/src/main/java/domainapp/dom/simple/SimpleObject.layout.xml
----------------------------------------------------------------------
diff --git a/example/application/simpleapp/dom/src/main/java/domainapp/dom/simple/SimpleObject.layout.xml b/example/application/simpleapp/dom/src/main/java/domainapp/dom/simple/SimpleObject.layout.xml
index 47529e2..5072933 100644
--- a/example/application/simpleapp/dom/src/main/java/domainapp/dom/simple/SimpleObject.layout.xml
+++ b/example/application/simpleapp/dom/src/main/java/domainapp/dom/simple/SimpleObject.layout.xml
@@ -15,6 +15,12 @@
                             <c:fieldSet name="Properties">
                                 <c:property id="name"/>
                             </c:fieldSet>
+                        </bs3:col>
+                    </bs3:row>
+                </bs3:tab>
+                <bs3:tab name="Misc">
+                    <bs3:row>
+                        <bs3:col span="12">
                             <c:fieldSet name="Misc">
                                 <c:property id="versionSequence"/>
                             </c:fieldSet>


[11/50] [abbrv] isis git commit: Merge branch 'master' into ISIS-993

Posted by da...@apache.org.
Merge branch 'master' into ISIS-993


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

Branch: refs/heads/master
Commit: 41040399c22304b128f738871dfade1b1eda49c1
Parents: 67b6e05 f206da6
Author: Dan Haywood <da...@haywood-associates.co.uk>
Authored: Wed Feb 10 19:42:15 2016 +0000
Committer: Dan Haywood <da...@haywood-associates.co.uk>
Committed: Wed Feb 10 19:42:15 2016 +0000

----------------------------------------------------------------------
 .../documentation/src/main/asciidoc/index.html  | 41 +++++++++++++-------
 core/pom.xml                                    |  6 +++
 2 files changed, 32 insertions(+), 15 deletions(-)
----------------------------------------------------------------------



[05/50] [abbrv] isis git commit: ISIS-993: can now download normalized, complete or minimal layouts.

Posted by da...@apache.org.
ISIS-993: can now download normalized, complete or minimal layouts.


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

Branch: refs/heads/master
Commit: 78943221cc6eccc0afed292910bb84a62b8a37bf
Parents: ecf6d17
Author: Dan Haywood <da...@haywood-associates.co.uk>
Authored: Wed Feb 10 11:33:06 2016 +0000
Committer: Dan Haywood <da...@haywood-associates.co.uk>
Committed: Wed Feb 10 11:33:06 2016 +0000

----------------------------------------------------------------------
 .../isis/applib/layout/bootstrap3/BS3Col.java   |  3 ++-
 .../isis/applib/layout/bootstrap3/BS3Grid.java  |  9 ++++----
 .../applib/layout/common/ActionLayoutData.java  |  2 +-
 .../layout/common/DomainObjectLayoutData.java   |  8 +++----
 .../common/DomainObjectLayoutDataOwner.java     |  2 ++
 .../isis/applib/layout/common/GridAbstract.java | 10 ++++----
 .../applib/services/layout/GridService.java     |  2 +-
 .../layout/Object_downloadLayoutXml.java        |  6 ++---
 .../grid/GridNormalizerServiceAbstract.java     | 24 ++++++++++++++++----
 .../services/grid/GridServiceDefault.java       | 12 ++++++++++
 .../services/metamodel/MetadataMenu.java        |  7 +++---
 .../dom/simple/SimpleObject.layout.xml          |  2 ++
 12 files changed, 60 insertions(+), 27 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/isis/blob/78943221/core/applib/src/main/java/org/apache/isis/applib/layout/bootstrap3/BS3Col.java
----------------------------------------------------------------------
diff --git a/core/applib/src/main/java/org/apache/isis/applib/layout/bootstrap3/BS3Col.java b/core/applib/src/main/java/org/apache/isis/applib/layout/bootstrap3/BS3Col.java
index 1a5bec7..d568f05 100644
--- a/core/applib/src/main/java/org/apache/isis/applib/layout/bootstrap3/BS3Col.java
+++ b/core/applib/src/main/java/org/apache/isis/applib/layout/bootstrap3/BS3Col.java
@@ -33,6 +33,7 @@ import org.apache.isis.applib.layout.common.ActionLayoutDataOwner;
 import org.apache.isis.applib.layout.common.CollectionLayoutData;
 import org.apache.isis.applib.layout.common.CollectionLayoutDataOwner;
 import org.apache.isis.applib.layout.common.DomainObjectLayoutData;
+import org.apache.isis.applib.layout.common.DomainObjectLayoutDataOwner;
 import org.apache.isis.applib.layout.common.FieldSet;
 import org.apache.isis.applib.layout.common.FieldSetOwner;
 
@@ -66,7 +67,7 @@ import org.apache.isis.applib.layout.common.FieldSetOwner;
 )
 public class BS3Col extends BS3RowContent
         implements ActionLayoutDataOwner, BS3TabGroupOwner, BS3RowOwner, FieldSetOwner, HasCssId,
-        CollectionLayoutDataOwner {
+        CollectionLayoutDataOwner, DomainObjectLayoutDataOwner {
 
     private static final long serialVersionUID = 1L;
 

http://git-wip-us.apache.org/repos/asf/isis/blob/78943221/core/applib/src/main/java/org/apache/isis/applib/layout/bootstrap3/BS3Grid.java
----------------------------------------------------------------------
diff --git a/core/applib/src/main/java/org/apache/isis/applib/layout/bootstrap3/BS3Grid.java b/core/applib/src/main/java/org/apache/isis/applib/layout/bootstrap3/BS3Grid.java
index 5d0cb47..7ec9665 100644
--- a/core/applib/src/main/java/org/apache/isis/applib/layout/bootstrap3/BS3Grid.java
+++ b/core/applib/src/main/java/org/apache/isis/applib/layout/bootstrap3/BS3Grid.java
@@ -166,7 +166,8 @@ public class BS3Grid extends GridAbstract implements BS3Element, Dto, BS3RowOwne
 
     protected void traverseRows(final BS3RowOwner rowOwner, final Grid.Visitor visitor) {
         final BS3Grid.Visitor bs3Visitor = asBs3Visitor(visitor);
-        for (BS3Row bs3Row : rowOwner.getRows()) {
+        final List<BS3Row> rows = rowOwner.getRows();
+        for (BS3Row bs3Row : Lists.newArrayList(rows)) {
             bs3Row.setOwner(this);
             bs3Visitor.preVisit(bs3Row);
             bs3Visitor.visit(bs3Row);
@@ -178,7 +179,7 @@ public class BS3Grid extends GridAbstract implements BS3Element, Dto, BS3RowOwne
     private void traverseCols(final Grid.Visitor visitor, final BS3Row bs3Row) {
         final BS3Grid.Visitor bs3Visitor = asBs3Visitor(visitor);
         final List<BS3RowContent> cols = bs3Row.getCols();
-        for (BS3RowContent rowContent : cols) {
+        for (BS3RowContent rowContent : Lists.newArrayList(cols)) {
             rowContent.setOwner(bs3Row);
             if(rowContent instanceof BS3Col) {
                 final BS3Col bs3Col = (BS3Col) rowContent;
@@ -215,7 +216,7 @@ public class BS3Grid extends GridAbstract implements BS3Element, Dto, BS3RowOwne
             final Grid.Visitor visitor) {
         final BS3Grid.Visitor bs3Visitor = asBs3Visitor(visitor);
         final List<BS3TabGroup> tabGroups = bs3TabGroupOwner.getTabGroups();
-        for (BS3TabGroup bs3TabGroup : tabGroups) {
+        for (BS3TabGroup bs3TabGroup : Lists.newArrayList(tabGroups)) {
             bs3TabGroup.setOwner(bs3TabGroupOwner);
             bs3Visitor.preVisit(bs3TabGroup);
             bs3Visitor.visit(bs3TabGroup);
@@ -229,7 +230,7 @@ public class BS3Grid extends GridAbstract implements BS3Element, Dto, BS3RowOwne
             final Grid.Visitor visitor) {
         final BS3Grid.Visitor bs3Visitor = asBs3Visitor(visitor);
         final List<BS3Tab> tabs = bs3TabOwner.getTabs();
-        for (BS3Tab tab : tabs) {
+        for (BS3Tab tab : Lists.newArrayList(tabs)) {
             tab.setOwner(bs3TabOwner);
             bs3Visitor.preVisit(tab);
             bs3Visitor.visit(tab);

http://git-wip-us.apache.org/repos/asf/isis/blob/78943221/core/applib/src/main/java/org/apache/isis/applib/layout/common/ActionLayoutData.java
----------------------------------------------------------------------
diff --git a/core/applib/src/main/java/org/apache/isis/applib/layout/common/ActionLayoutData.java b/core/applib/src/main/java/org/apache/isis/applib/layout/common/ActionLayoutData.java
index 5097349..6bd4113 100644
--- a/core/applib/src/main/java/org/apache/isis/applib/layout/common/ActionLayoutData.java
+++ b/core/applib/src/main/java/org/apache/isis/applib/layout/common/ActionLayoutData.java
@@ -48,7 +48,7 @@ import org.apache.isis.applib.annotation.Where;
         , "metadataError"
     }
 )
-public class ActionLayoutData implements Serializable, Owned<ActionLayoutDataOwner>,HasCssClass, HasCssClassFa,
+public class ActionLayoutData implements Serializable, Owned<ActionLayoutDataOwner>, HasCssClass, HasCssClassFa,
         HasDescribedAs, HasHidden, HasNamed, HasBookmarking {
 
     private static final long serialVersionUID = 1L;

http://git-wip-us.apache.org/repos/asf/isis/blob/78943221/core/applib/src/main/java/org/apache/isis/applib/layout/common/DomainObjectLayoutData.java
----------------------------------------------------------------------
diff --git a/core/applib/src/main/java/org/apache/isis/applib/layout/common/DomainObjectLayoutData.java b/core/applib/src/main/java/org/apache/isis/applib/layout/common/DomainObjectLayoutData.java
index d15d27b..a0502e3 100644
--- a/core/applib/src/main/java/org/apache/isis/applib/layout/common/DomainObjectLayoutData.java
+++ b/core/applib/src/main/java/org/apache/isis/applib/layout/common/DomainObjectLayoutData.java
@@ -43,7 +43,7 @@ import org.apache.isis.applib.annotation.BookmarkPolicy;
             , "metadataError"
         }
 )
-public class DomainObjectLayoutData implements Serializable,
+public class DomainObjectLayoutData implements Serializable, Owned<DomainObjectLayoutDataOwner>,
         HasBookmarking, HasCssClass, HasCssClassFa, HasDescribedAs, HasNamed {
 
     private static final long serialVersionUID = 1L;
@@ -185,7 +185,7 @@ public class DomainObjectLayoutData implements Serializable,
 
 
 
-    private MemberRegionOwner owner;
+    private DomainObjectLayoutDataOwner owner;
     /**
      * Owner.
      *
@@ -194,11 +194,11 @@ public class DomainObjectLayoutData implements Serializable,
      * </p>
      */
     @XmlTransient
-    public MemberRegionOwner getOwner() {
+    public DomainObjectLayoutDataOwner getOwner() {
         return owner;
     }
 
-    public void setOwner(final MemberRegionOwner owner) {
+    public void setOwner(final DomainObjectLayoutDataOwner owner) {
         this.owner = owner;
     }
 

http://git-wip-us.apache.org/repos/asf/isis/blob/78943221/core/applib/src/main/java/org/apache/isis/applib/layout/common/DomainObjectLayoutDataOwner.java
----------------------------------------------------------------------
diff --git a/core/applib/src/main/java/org/apache/isis/applib/layout/common/DomainObjectLayoutDataOwner.java b/core/applib/src/main/java/org/apache/isis/applib/layout/common/DomainObjectLayoutDataOwner.java
index 2b719e9..77e9e8c 100644
--- a/core/applib/src/main/java/org/apache/isis/applib/layout/common/DomainObjectLayoutDataOwner.java
+++ b/core/applib/src/main/java/org/apache/isis/applib/layout/common/DomainObjectLayoutDataOwner.java
@@ -20,4 +20,6 @@ package org.apache.isis.applib.layout.common;
 
 public interface DomainObjectLayoutDataOwner extends Owner {
 
+    DomainObjectLayoutData getDomainObject();
+    void setDomainObject(DomainObjectLayoutData domainObjectLayoutData);
 }

http://git-wip-us.apache.org/repos/asf/isis/blob/78943221/core/applib/src/main/java/org/apache/isis/applib/layout/common/GridAbstract.java
----------------------------------------------------------------------
diff --git a/core/applib/src/main/java/org/apache/isis/applib/layout/common/GridAbstract.java b/core/applib/src/main/java/org/apache/isis/applib/layout/common/GridAbstract.java
index d320dff..eac1588 100644
--- a/core/applib/src/main/java/org/apache/isis/applib/layout/common/GridAbstract.java
+++ b/core/applib/src/main/java/org/apache/isis/applib/layout/common/GridAbstract.java
@@ -23,6 +23,7 @@ import java.util.List;
 
 import javax.xml.bind.annotation.XmlTransient;
 
+import com.google.common.collect.Lists;
 import com.google.common.collect.Maps;
 
 import org.apache.isis.applib.annotation.Programmatic;
@@ -49,7 +50,6 @@ public abstract class GridAbstract implements Grid {
     }
 
     @Programmatic
-    @XmlTransient
     public void setDomainClass(final Class<?> domainClass) {
         this.domainClass = domainClass;
     }
@@ -80,7 +80,7 @@ public abstract class GridAbstract implements Grid {
         if(actionLayoutDatas == null) {
             return;
         }
-        for (final ActionLayoutData actionLayoutData : actionLayoutDatas) {
+        for (final ActionLayoutData actionLayoutData : Lists.newArrayList(actionLayoutDatas)) {
             actionLayoutData.setOwner(actionLayoutDataOwner);
             visitor.visit(actionLayoutData);
         }
@@ -92,12 +92,12 @@ public abstract class GridAbstract implements Grid {
      */
     protected void traverseFieldSets(final FieldSetOwner fieldSetOwner, final GridAbstract.Visitor visitor) {
         final List<FieldSet> fieldSets = fieldSetOwner.getFieldSets();
-        for (FieldSet fieldSet : fieldSets) {
+        for (FieldSet fieldSet : Lists.newArrayList(fieldSets)) {
             fieldSet.setOwner(fieldSetOwner);
             visitor.visit(fieldSet);
             traverseActions(fieldSet, visitor);
             final List<PropertyLayoutData> properties = fieldSet.getProperties();
-            for (final PropertyLayoutData property : properties) {
+            for (final PropertyLayoutData property : Lists.newArrayList(properties)) {
                 property.setOwner(fieldSet);
                 visitor.visit(property);
                 traverseActions(property, visitor);
@@ -112,7 +112,7 @@ public abstract class GridAbstract implements Grid {
     protected void traverseCollections(
             final CollectionLayoutDataOwner owner, final GridAbstract.Visitor visitor) {
         final List<CollectionLayoutData> collections = owner.getCollections();
-        for (CollectionLayoutData collection : collections) {
+        for (CollectionLayoutData collection : Lists.newArrayList(collections)) {
             collection.setOwner(owner);
             visitor.visit(collection);
             traverseActions(collection, visitor);

http://git-wip-us.apache.org/repos/asf/isis/blob/78943221/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 fc33df4..8a671a1 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
@@ -103,7 +103,7 @@ public interface GridService {
     /**
      * For all of the available {@link GridNormalizerService}s available, return only the first one for any that
      * are for the same grid implementation.
-     * 
+     *
      * <p>
      *   This allows default implementations (eg for bootstrap3) to be overridden while also allowing for the more
      *   general idea of multiple implementations.

http://git-wip-us.apache.org/repos/asf/isis/blob/78943221/core/applib/src/main/java/org/apache/isis/applib/services/layout/Object_downloadLayoutXml.java
----------------------------------------------------------------------
diff --git a/core/applib/src/main/java/org/apache/isis/applib/services/layout/Object_downloadLayoutXml.java b/core/applib/src/main/java/org/apache/isis/applib/services/layout/Object_downloadLayoutXml.java
index 10fee16..d3a5128 100644
--- a/core/applib/src/main/java/org/apache/isis/applib/services/layout/Object_downloadLayoutXml.java
+++ b/core/applib/src/main/java/org/apache/isis/applib/services/layout/Object_downloadLayoutXml.java
@@ -63,15 +63,15 @@ public class Object_downloadLayoutXml {
                         gridService.tnsAndSchemaLocation(grid)
                 ));
 
-        return new Clob(Util.withSuffix(fileName, "xml"), "text/xml", xml);
+        return new Clob(Util.withSuffix(fileName, style.name().toLowerCase() + ".xml"), "text/xml", xml);
     }
 
     public boolean hide$$() {
         // can use either style to determine whether this action should be hidden
-        return getGrid(GridService.Style.COMPLETE) == null;
+        return getGrid(GridService.Style.NORMALIZED) == null;
     }
     public String default0$$() {
-        return Util.withSuffix(object.getClass().getSimpleName(), "layout.xml");
+        return Util.withSuffix(object.getClass().getSimpleName(), "layout");
     }
     public GridService.Style default1$$() {
         return GridService.Style.NORMALIZED;

http://git-wip-us.apache.org/repos/asf/isis/blob/78943221/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 3c38356..279086c 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
@@ -40,6 +40,7 @@ import org.apache.isis.applib.layout.common.ActionLayoutData;
 import org.apache.isis.applib.layout.common.ActionLayoutDataOwner;
 import org.apache.isis.applib.layout.common.CollectionLayoutData;
 import org.apache.isis.applib.layout.common.DomainObjectLayoutData;
+import org.apache.isis.applib.layout.common.DomainObjectLayoutDataOwner;
 import org.apache.isis.applib.layout.common.FieldSet;
 import org.apache.isis.applib.layout.common.Grid;
 import org.apache.isis.applib.layout.common.HasBookmarking;
@@ -180,6 +181,8 @@ public abstract class GridNormalizerServiceAbstract<G extends Grid>
     @Override
     public void complete(final G grid, final Class<?> domainClass) {
         normalize(grid, domainClass);
+        if(true) {
+
         final ObjectSpecification objectSpec = specificationLookup.loadSpecification(domainClass);
 
         grid.visit(new FCGrid.VisitorAdapter() {
@@ -233,6 +236,7 @@ public abstract class GridNormalizerServiceAbstract<G extends Grid>
                 setPluralIfAny(domainObjectLayoutData, objectSpec);
             }
         });
+        }
     }
 
     private static boolean isDoOp(final Facet facet) {
@@ -348,9 +352,11 @@ public abstract class GridNormalizerServiceAbstract<G extends Grid>
         final NamedFacet namedFacet = facetHolder.getFacet(NamedFacet.class);
         if(isDoOp(namedFacet)) {
             final String named = namedFacet.value();
-            final boolean escaped = namedFacet.escaped();
             if(!Strings.isNullOrEmpty(named)){
                 hasNamed.setNamed(named);
+            }
+            final boolean escaped = namedFacet.escaped();
+            if(!escaped) {
                 hasNamed.setNamedEscaped(escaped);
             }
         }
@@ -438,12 +444,20 @@ public abstract class GridNormalizerServiceAbstract<G extends Grid>
                 actionLayoutData.getOwner().getActions().remove(actionLayoutData);
             }
 
-            @Override public void visit(final CollectionLayoutData collectionLayoutData) {
-                collectionLayoutData.getOwner().getCollections().remove(this);
+            @Override
+            public void visit(final CollectionLayoutData collectionLayoutData) {
+                collectionLayoutData.getOwner().getCollections().remove(collectionLayoutData);
             }
 
-            @Override public void visit(final PropertyLayoutData propertyLayoutData) {
-                propertyLayoutData.getOwner().getProperties().remove(this);
+            @Override
+            public void visit(final PropertyLayoutData propertyLayoutData) {
+                propertyLayoutData.getOwner().getProperties().remove(propertyLayoutData);
+            }
+
+            @Override
+            public void visit(final DomainObjectLayoutData domainObjectLayoutData) {
+                final DomainObjectLayoutDataOwner owner = domainObjectLayoutData.getOwner();
+                owner.setDomainObject(new DomainObjectLayoutData());
             }
         });
     }

http://git-wip-us.apache.org/repos/asf/isis/blob/78943221/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 97588b9..f99b84d 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
@@ -153,6 +153,10 @@ public class GridServiceDefault
     @Programmatic
     public Grid normalize(final Grid grid) {
 
+        if(grid == null) {
+            return null;
+        }
+
         // 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
         // in order to trample over the .layout.json's original facets
@@ -175,6 +179,10 @@ 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);
@@ -187,6 +195,10 @@ 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/78943221/core/metamodel/src/main/java/org/apache/isis/core/metamodel/services/metamodel/MetadataMenu.java
----------------------------------------------------------------------
diff --git a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/services/metamodel/MetadataMenu.java b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/services/metamodel/MetadataMenu.java
index 76a436e..73a3fab 100644
--- a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/services/metamodel/MetadataMenu.java
+++ b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/services/metamodel/MetadataMenu.java
@@ -91,7 +91,7 @@ public class MetadataMenu implements SpecificationLoaderSpiAware {
             cssClassFa = "fa-download"
     )
     @MemberOrder(sequence="500.400.1")
-    public Blob downloadLayouts() {
+    public Blob downloadLayouts(final GridService.Style style) {
         final Collection<ObjectSpecification> allSpecs = specificationLoader.allSpecifications();
         final Collection<ObjectSpecification> domainObjectSpecs = Collections2
                 .filter(allSpecs, new Predicate<ObjectSpecification>(){
@@ -108,7 +108,7 @@ public class MetadataMenu implements SpecificationLoaderSpiAware {
             final OutputStreamWriter writer = new OutputStreamWriter(zos);
             for (final ObjectSpecification objectSpec : domainObjectSpecs) {
                 final Class<?> domainClass = objectSpec.getCorrespondingClass();
-                final Grid grid = gridService.toGrid(domainClass, GridService.Style.NORMALIZED);
+                final Grid grid = gridService.toGrid(domainClass, style);
                 if(grid != null) {
                     zos.putNextEntry(new ZipEntry(zipEntryNameFor(objectSpec)));
                     String xml = jaxbService.toXml(grid);
@@ -118,7 +118,8 @@ public class MetadataMenu implements SpecificationLoaderSpiAware {
                 }
             }
             writer.close();
-            return new Blob("layouts.zip", mimeTypeApplicationZip, baos.toByteArray());
+            final String fileName = "layouts." + style.name().toLowerCase() + ".zip";
+            return new Blob(fileName, mimeTypeApplicationZip, baos.toByteArray());
         } catch (final IOException ex) {
             throw new FatalException("Unable to create zip of layouts", ex);
         }

http://git-wip-us.apache.org/repos/asf/isis/blob/78943221/example/application/simpleapp/dom/src/main/java/domainapp/dom/simple/SimpleObject.layout.xml
----------------------------------------------------------------------
diff --git a/example/application/simpleapp/dom/src/main/java/domainapp/dom/simple/SimpleObject.layout.xml b/example/application/simpleapp/dom/src/main/java/domainapp/dom/simple/SimpleObject.layout.xml
index b076822..9652100 100644
--- a/example/application/simpleapp/dom/src/main/java/domainapp/dom/simple/SimpleObject.layout.xml
+++ b/example/application/simpleapp/dom/src/main/java/domainapp/dom/simple/SimpleObject.layout.xml
@@ -1,6 +1,7 @@
 <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
 <bs3:grid xsi:schemaLocation="http://isis.apache.org/schema/applib/layout/common http://isis.apache.org/schema/applib/layout/common/common.xsd http://isis.apache.org/schema/applib/layout/bootstrap3 http://isis.apache.org/schema/applib/layout/bootstrap3/bootstrap3.xsd" xmlns:c="http://isis.apache.org/schema/applib/layout/common" xmlns:bs3="http://isis.apache.org/schema/applib/layout/bootstrap3" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
 
+
 <!--
     <bs3:row>
         <bs3:col span="8" unreferencedActions="false">
@@ -34,6 +35,7 @@
         </bs3:col>
     </bs3:row>
 -->
+
     <bs3:row>
         <bs3:col span="12" unreferencedActions="false">
             <c:domainObject/>


[46/50] [abbrv] isis git commit: ISIS-993: removing the ability to view the Grid as a view model (in its own right); no real use case for this functionality at the moment.

Posted by da...@apache.org.
ISIS-993: removing the ability to view the Grid as a view model (in its own right); no real use case for this functionality at the moment.


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

Branch: refs/heads/master
Commit: 2c960ca9eb20756a92d6fe9f77b4c22dc507c267
Parents: 393312e
Author: Dan Haywood <da...@haywood-associates.co.uk>
Authored: Thu Mar 3 12:36:49 2016 +0000
Committer: Dan Haywood <da...@haywood-associates.co.uk>
Committed: Thu Mar 3 12:36:49 2016 +0000

----------------------------------------------------------------------
 .../services/layout/Object_viewLayout.java      | 71 --------------------
 1 file changed, 71 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/isis/blob/2c960ca9/core/applib/src/main/java/org/apache/isis/applib/services/layout/Object_viewLayout.java
----------------------------------------------------------------------
diff --git a/core/applib/src/main/java/org/apache/isis/applib/services/layout/Object_viewLayout.java b/core/applib/src/main/java/org/apache/isis/applib/services/layout/Object_viewLayout.java
deleted file mode 100644
index 249b95a..0000000
--- a/core/applib/src/main/java/org/apache/isis/applib/services/layout/Object_viewLayout.java
+++ /dev/null
@@ -1,71 +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.applib.services.layout;
-
-import javax.inject.Inject;
-
-import org.apache.isis.applib.annotation.Action;
-import org.apache.isis.applib.annotation.ActionLayout;
-import org.apache.isis.applib.annotation.MemberOrder;
-import org.apache.isis.applib.annotation.Mixin;
-import org.apache.isis.applib.annotation.Programmatic;
-import org.apache.isis.applib.annotation.RestrictTo;
-import org.apache.isis.applib.annotation.SemanticsOf;
-import org.apache.isis.applib.layout.component.Grid;
-
-@Mixin
-public class Object_viewLayout {
-
-    private final Object object;
-
-    public Object_viewLayout(final Object object) {
-        this.object = object;
-    }
-
-    public static class ActionDomainEvent extends org.apache.isis.applib.IsisApplibModule.ActionDomainEvent<Object_viewLayout> {}
-
-
-
-    @Programmatic // TODO ... excluded for now (getting an Isis framework exception in the view model rendering).
-    @Action(
-            domainEvent = ActionDomainEvent.class,
-            semantics = SemanticsOf.SAFE,
-            restrictTo = RestrictTo.PROTOTYPING
-    )
-    @ActionLayout(
-            cssClassFa = "fa-th"
-    )
-    @MemberOrder(sequence = "550.2")
-    public Grid $$() {
-        return getGrid(GridService.Style.NORMALIZED);
-    }
-
-    @Programmatic // TODO ... excluded for now (getting an Isis framework exception in the view model rendering).
-    public boolean hide$$() {
-        return getGrid(GridService.Style.NORMALIZED) == null;
-    }
-
-    protected Grid getGrid(final GridService.Style style) {
-        return gridService.toGrid(object, style);
-    }
-
-
-
-    @Inject
-    GridService gridService;
-
-}


[08/50] [abbrv] isis git commit: ISIS-993: moving around and renaming the applib schema files for layout

Posted by da...@apache.org.
http://git-wip-us.apache.org/repos/asf/isis/blob/67b6e05e/core/applib/src/main/java/org/apache/isis/applib/layout/component/ActionLayoutDataOwner.java
----------------------------------------------------------------------
diff --git a/core/applib/src/main/java/org/apache/isis/applib/layout/component/ActionLayoutDataOwner.java b/core/applib/src/main/java/org/apache/isis/applib/layout/component/ActionLayoutDataOwner.java
new file mode 100644
index 0000000..6372cfb
--- /dev/null
+++ b/core/applib/src/main/java/org/apache/isis/applib/layout/component/ActionLayoutDataOwner.java
@@ -0,0 +1,25 @@
+/*
+ *  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.applib.layout.component;
+
+import java.util.List;
+
+public interface ActionLayoutDataOwner extends Owner {
+    List<ActionLayoutData> getActions();
+}

http://git-wip-us.apache.org/repos/asf/isis/blob/67b6e05e/core/applib/src/main/java/org/apache/isis/applib/layout/component/CollectionLayoutData.java
----------------------------------------------------------------------
diff --git a/core/applib/src/main/java/org/apache/isis/applib/layout/component/CollectionLayoutData.java b/core/applib/src/main/java/org/apache/isis/applib/layout/component/CollectionLayoutData.java
new file mode 100644
index 0000000..813c8c1
--- /dev/null
+++ b/core/applib/src/main/java/org/apache/isis/applib/layout/component/CollectionLayoutData.java
@@ -0,0 +1,268 @@
+/*
+ *  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.applib.layout.component;
+
+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.XmlRootElement;
+import javax.xml.bind.annotation.XmlTransient;
+import javax.xml.bind.annotation.XmlType;
+
+import com.google.common.base.Function;
+
+import org.apache.isis.applib.annotation.Where;
+
+/**
+ * Describes the layout of a single collection, broadly corresponds to the {@link org.apache.isis.applib.annotation.CollectionLayout} annotation.
+ *
+ * <p>
+ *     Note that {@link org.apache.isis.applib.annotation.CollectionLayout#render()} is omitted because
+ *     {@link #defaultView} is its replacement.
+ * </p>
+ */
+@XmlRootElement(
+        name = "collection"
+)
+@XmlType(
+        name = "collection"
+        , propOrder = {
+                "named"
+                ,"describedAs"
+                ,"sortedBy"
+                , "actions"
+                , "metadataError"
+        }
+)
+public class CollectionLayoutData
+        implements MemberRegion<CollectionLayoutDataOwner>,
+                   ActionLayoutDataOwner,
+                   Serializable,
+                   HasCssClass, HasDescribedAs, HasHidden, HasNamed {
+
+    private static final long serialVersionUID = 1L;
+
+    public CollectionLayoutData() {
+    }
+    public CollectionLayoutData(final String id) {
+        setId(id);
+    }
+
+
+    private String id;
+
+    /**
+     * Collection identifier, being the getter method without "get" prefix, first letter lower cased.
+     */
+    @XmlAttribute(required = true)
+    public String getId() {
+        return id;
+    }
+
+    public void setId(String id) {
+        this.id = id;
+    }
+
+
+
+    private String cssClass;
+
+    @Override
+    @XmlAttribute(required = false)
+    public String getCssClass() {
+        return cssClass;
+    }
+
+    @Override
+    public void setCssClass(String cssClass) {
+        this.cssClass = cssClass;
+    }
+
+
+
+    private String describedAs;
+
+    @Override
+    @XmlElement(required = false)
+    public String getDescribedAs() {
+        return describedAs;
+    }
+
+    @Override
+    public void setDescribedAs(String describedAs) {
+        this.describedAs = describedAs;
+    }
+
+
+
+    private String defaultView;
+
+    /**
+     * Typically <code>table</code> or <code>hidden</code>, but could be any other named view that is configured and
+     * appropriate, eg <code>gmap3</code> or <code>fullcalendar2</code>.
+     */
+    @XmlAttribute(required = false)
+    public String getDefaultView() {
+        return defaultView;
+    }
+
+    public void setDefaultView(String defaultView) {
+        this.defaultView = defaultView;
+    }
+
+
+    private Where hidden;
+
+    @Override
+    @XmlAttribute(required = false)
+    public Where getHidden() {
+        return hidden;
+    }
+
+    @Override
+    public void setHidden(Where hidden) {
+        this.hidden = hidden;
+    }
+
+
+    private String named;
+
+    @Override
+    @XmlElement(required = false)
+    public String getNamed() {
+        return named;
+    }
+
+    @Override
+    public void setNamed(String named) {
+        this.named = named;
+    }
+
+
+    private Boolean namedEscaped;
+
+    @Override
+    @XmlAttribute(required = false)
+    public Boolean getNamedEscaped() {
+        return namedEscaped;
+    }
+
+    @Override
+    public void setNamedEscaped(Boolean namedEscaped) {
+        this.namedEscaped = namedEscaped;
+    }
+
+
+    private Integer paged;
+
+    @XmlAttribute(required = false)
+    public Integer getPaged() {
+        return paged;
+    }
+
+    public void setPaged(Integer paged) {
+        this.paged = paged;
+    }
+
+
+
+    private String sortedBy;
+
+    @XmlElement(required = false)
+    public String getSortedBy() {
+        return sortedBy;
+    }
+
+    public void setSortedBy(String sortedBy) {
+        this.sortedBy = sortedBy;
+    }
+
+
+
+    private List<ActionLayoutData> actions;
+
+    // no wrapper
+    @XmlElement(name = "action", required = false)
+    public List<ActionLayoutData> getActions() {
+        return actions;
+    }
+
+    public void setActions(List<ActionLayoutData> actionLayoutDatas) {
+        this.actions = actionLayoutDatas;
+    }
+
+
+
+    private CollectionLayoutDataOwner owner;
+    /**
+     * Owner.
+     *
+     * <p>
+     *     Set programmatically by framework after reading in from XML.
+     * </p>
+     */
+    @XmlTransient
+    public CollectionLayoutDataOwner getOwner() {
+        return owner;
+    }
+
+    public void setOwner(final CollectionLayoutDataOwner owner) {
+        this.owner = owner;
+    }
+
+
+    private String metadataError;
+
+    /**
+     * For diagnostics; populated by the framework if and only if a metadata error.
+     */
+    @XmlElement(required = false)
+    public String getMetadataError() {
+        return metadataError;
+    }
+
+    public void setMetadataError(final String metadataError) {
+        this.metadataError = metadataError;
+    }
+
+
+
+
+
+    public static class Functions {
+        private Functions(){}
+
+        public static Function<CollectionLayoutData, String> id() {
+            return new Function<CollectionLayoutData, String>() {
+                @Override
+                public String apply(final CollectionLayoutData metadata) {
+                    return metadata.getId();
+                }
+            };
+        }
+    }
+
+    @Override public String toString() {
+        return "CollectionLayoutData{" +
+                "id='" + id + '\'' +
+                '}';
+    }
+}

http://git-wip-us.apache.org/repos/asf/isis/blob/67b6e05e/core/applib/src/main/java/org/apache/isis/applib/layout/component/CollectionLayoutDataOwner.java
----------------------------------------------------------------------
diff --git a/core/applib/src/main/java/org/apache/isis/applib/layout/component/CollectionLayoutDataOwner.java b/core/applib/src/main/java/org/apache/isis/applib/layout/component/CollectionLayoutDataOwner.java
new file mode 100644
index 0000000..b4ecb19
--- /dev/null
+++ b/core/applib/src/main/java/org/apache/isis/applib/layout/component/CollectionLayoutDataOwner.java
@@ -0,0 +1,26 @@
+/*
+ *  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.applib.layout.component;
+
+import java.util.List;
+
+public interface CollectionLayoutDataOwner extends MemberRegionOwner {
+
+    List<CollectionLayoutData> getCollections();
+}

http://git-wip-us.apache.org/repos/asf/isis/blob/67b6e05e/core/applib/src/main/java/org/apache/isis/applib/layout/component/DomainObjectLayoutData.java
----------------------------------------------------------------------
diff --git a/core/applib/src/main/java/org/apache/isis/applib/layout/component/DomainObjectLayoutData.java b/core/applib/src/main/java/org/apache/isis/applib/layout/component/DomainObjectLayoutData.java
new file mode 100644
index 0000000..276b0a3
--- /dev/null
+++ b/core/applib/src/main/java/org/apache/isis/applib/layout/component/DomainObjectLayoutData.java
@@ -0,0 +1,208 @@
+/*
+ *  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.applib.layout.component;
+
+import java.io.Serializable;
+
+import javax.xml.bind.annotation.XmlAttribute;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlTransient;
+import javax.xml.bind.annotation.XmlType;
+
+import org.apache.isis.applib.annotation.BookmarkPolicy;
+
+/**
+ * Describes the layout of the title and icon of a domain object, broadly corresponding to {@link org.apache.isis.applib.annotation.DomainObjectLayout}.
+ */
+@XmlRootElement(
+        name = "domainObject"
+)
+@XmlType(
+        name = "domainObject"
+        , propOrder = {
+            "named"
+            , "describedAs"
+            , "plural"
+            , "metadataError"
+        }
+)
+public class DomainObjectLayoutData implements Serializable, Owned<DomainObjectLayoutDataOwner>,
+        HasBookmarking, HasCssClass, HasCssClassFa, HasDescribedAs, HasNamed {
+
+    private static final long serialVersionUID = 1L;
+
+    public DomainObjectLayoutData() {
+    }
+
+
+    private BookmarkPolicy bookmarking;
+
+    @Override
+    @XmlAttribute(required = false)
+    public BookmarkPolicy getBookmarking() {
+        return bookmarking;
+    }
+
+    @Override
+    public void setBookmarking(BookmarkPolicy bookmarking) {
+        this.bookmarking = bookmarking;
+    }
+
+
+
+    private String cssClass;
+
+    @Override
+    @XmlAttribute(required = false)
+    public String getCssClass() {
+        return cssClass;
+    }
+
+    @Override
+    public void setCssClass(String cssClass) {
+        this.cssClass = cssClass;
+    }
+
+
+    private String cssClassFa;
+
+    @Override
+    @XmlAttribute(required = false)
+    public String getCssClassFa() {
+        return cssClassFa;
+    }
+
+    @Override
+    public void setCssClassFa(String cssClassFa) {
+        this.cssClassFa = cssClassFa;
+    }
+
+
+
+    private org.apache.isis.applib.annotation.ActionLayout.CssClassFaPosition cssClassFaPosition;
+
+    @Override
+    @XmlAttribute(required = false)
+    public org.apache.isis.applib.annotation.ActionLayout.CssClassFaPosition getCssClassFaPosition() {
+        return cssClassFaPosition;
+    }
+
+    @Override
+    public void setCssClassFaPosition(org.apache.isis.applib.annotation.ActionLayout.CssClassFaPosition cssClassFaPosition) {
+        this.cssClassFaPosition = cssClassFaPosition;
+    }
+
+
+    private String describedAs;
+
+    @Override
+    @XmlElement(required = false)
+    public String getDescribedAs() {
+        return describedAs;
+    }
+
+    @Override
+    public void setDescribedAs(String describedAs) {
+        this.describedAs = describedAs;
+    }
+
+
+
+    private String named;
+
+    @Override
+    @XmlElement(required = false)
+    public String getNamed() {
+        return named;
+    }
+
+    @Override
+    public void setNamed(String named) {
+        this.named = named;
+    }
+
+
+    private Boolean namedEscaped;
+
+    @Override
+    @XmlAttribute(required = false)
+    public Boolean getNamedEscaped() {
+        return namedEscaped;
+    }
+
+    @Override
+    public void setNamedEscaped(Boolean namedEscaped) {
+        this.namedEscaped = namedEscaped;
+    }
+
+
+
+    private String plural;
+
+    @XmlElement(required = false)
+    public String getPlural() {
+        return plural;
+    }
+
+    public void setPlural(String plural) {
+        this.plural = plural;
+    }
+
+
+
+
+
+    private String metadataError;
+
+    /**
+     * For diagnostics; populated by the framework if and only if a metadata error.
+     */
+    @XmlElement(required = false)
+    public String getMetadataError() {
+        return metadataError;
+    }
+
+    public void setMetadataError(final String metadataError) {
+        this.metadataError = metadataError;
+    }
+
+
+
+    private DomainObjectLayoutDataOwner owner;
+    /**
+     * Owner.
+     *
+     * <p>
+     *     Set programmatically by framework after reading in from XML.
+     * </p>
+     */
+    @XmlTransient
+    public DomainObjectLayoutDataOwner getOwner() {
+        return owner;
+    }
+
+    public void setOwner(final DomainObjectLayoutDataOwner owner) {
+        this.owner = owner;
+    }
+
+
+
+
+}

http://git-wip-us.apache.org/repos/asf/isis/blob/67b6e05e/core/applib/src/main/java/org/apache/isis/applib/layout/component/DomainObjectLayoutDataOwner.java
----------------------------------------------------------------------
diff --git a/core/applib/src/main/java/org/apache/isis/applib/layout/component/DomainObjectLayoutDataOwner.java b/core/applib/src/main/java/org/apache/isis/applib/layout/component/DomainObjectLayoutDataOwner.java
new file mode 100644
index 0000000..74c6a25
--- /dev/null
+++ b/core/applib/src/main/java/org/apache/isis/applib/layout/component/DomainObjectLayoutDataOwner.java
@@ -0,0 +1,25 @@
+/*
+ *  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.applib.layout.component;
+
+public interface DomainObjectLayoutDataOwner extends Owner {
+
+    DomainObjectLayoutData getDomainObject();
+    void setDomainObject(DomainObjectLayoutData domainObjectLayoutData);
+}

http://git-wip-us.apache.org/repos/asf/isis/blob/67b6e05e/core/applib/src/main/java/org/apache/isis/applib/layout/component/FieldSet.java
----------------------------------------------------------------------
diff --git a/core/applib/src/main/java/org/apache/isis/applib/layout/component/FieldSet.java b/core/applib/src/main/java/org/apache/isis/applib/layout/component/FieldSet.java
new file mode 100644
index 0000000..e2533da
--- /dev/null
+++ b/core/applib/src/main/java/org/apache/isis/applib/layout/component/FieldSet.java
@@ -0,0 +1,223 @@
+/*
+ *  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.applib.layout.component;
+
+import java.io.Serializable;
+import java.util.List;
+
+import javax.annotation.Nullable;
+import javax.xml.bind.annotation.XmlAttribute;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlTransient;
+import javax.xml.bind.annotation.XmlType;
+
+import com.google.common.base.Function;
+import com.google.common.collect.Lists;
+
+import org.apache.isis.applib.annotation.MemberOrder;
+import org.apache.isis.applib.layout.grid.bootstrap3.BS3Col;
+
+/**
+ * A {@link MemberRegion region} of the page containing a set of
+ * related {@link PropertyLayoutData properties} and associated
+ * {@link ActionLayoutData actions}.
+ */
+@XmlRootElement(
+        name = "fieldSet"
+)
+@XmlType(
+        name = "fieldSet"
+        , propOrder = {
+                "name"
+                , "actions"
+                , "properties"
+                , "metadataError"
+        }
+)
+public class FieldSet
+        implements MemberRegion<FieldSetOwner>,
+                   ActionLayoutDataOwner,
+                   Serializable {
+
+    private static final long serialVersionUID = 1L;
+
+    public FieldSet() {
+    }
+
+    public FieldSet(final String name) {
+        setName(name);
+    }
+
+
+
+    private String id;
+
+    /**
+     * As per &lt;div id=&quot;...&quot;&gt;...&lt;/div&gt; : must be unique across entire page.
+     */
+    @XmlAttribute(required = false)
+    public String getId() {
+        return id;
+    }
+
+    public void setId(final String id) {
+        this.id = id;
+    }
+
+
+
+    private Boolean unreferencedActions;
+
+    /**
+     * Whether this fieldset should be used to hold any unreferenced actions (contributed or &quot;native&quot;).
+     *
+     * <p>
+     *     Any layout must have precisely one fieldset or {@link BS3Col col} that has this attribute set.
+     * </p>
+     */
+    @XmlAttribute(required = false)
+    public Boolean isUnreferencedActions() {
+        return unreferencedActions;
+    }
+
+    public void setUnreferencedActions(final Boolean unreferencedActions) {
+        this.unreferencedActions = unreferencedActions;
+    }
+
+
+    private Boolean unreferencedProperties;
+    /**
+     * Whether this fieldset should be used to hold any unreferenced properties (contributed or &quot;native&quot;).
+     *
+     * <p>
+     *     Any grid layout must have precisely one fieldset that has this attribute set.
+     * </p>
+     */
+    @XmlAttribute(required = false)
+    public Boolean isUnreferencedProperties() {
+        return unreferencedProperties;
+    }
+
+    public void setUnreferencedProperties(final Boolean unreferencedProperties) {
+        this.unreferencedProperties = unreferencedProperties;
+    }
+
+
+
+
+    private String name;
+
+    /**
+     * Corresponds to the {@link MemberOrder#name()} (when applied to properties).
+     */
+    @XmlAttribute(required = true)
+    public String getName() {
+        return name;
+    }
+
+    public void setName(String name) {
+        this.name = name;
+    }
+
+
+
+    private List<ActionLayoutData> actions = Lists.newArrayList();
+
+    // no wrapper
+    @XmlElement(name = "action", required = false)
+    public List<ActionLayoutData> getActions() {
+        return actions;
+    }
+
+    public void setActions(List<ActionLayoutData> actionLayoutDatas) {
+        this.actions = actionLayoutDatas;
+    }
+
+
+
+    private List<PropertyLayoutData> properties = Lists.newArrayList();
+
+    // no wrapper; required=false because may be auto-generated
+    @XmlElement(name = "property", required = false)
+    public List<PropertyLayoutData> getProperties() {
+        return properties;
+    }
+
+    public void setProperties(List<PropertyLayoutData> properties) {
+        this.properties = properties;
+    }
+
+
+    private FieldSetOwner owner;
+    /**
+     * Owner.
+     *
+     * <p>
+     *     Set programmatically by framework after reading in from XML.
+     * </p>
+     */
+    @XmlTransient
+    public FieldSetOwner getOwner() {
+        return owner;
+    }
+
+    public void setOwner(final FieldSetOwner owner) {
+        this.owner = owner;
+    }
+
+
+
+
+
+    private String metadataError;
+
+    /**
+     * For diagnostics; populated by the framework if and only if a metadata error.
+     */
+    @XmlElement(required = false)
+    public String getMetadataError() {
+        return metadataError;
+    }
+
+    public void setMetadataError(final String metadataError) {
+        this.metadataError = metadataError;
+    }
+
+
+
+    public static class Util {
+        private Util(){}
+        public static Function<? super FieldSet, String> nameOf() {
+            return new Function<FieldSet, String>() {
+                @Nullable @Override
+                public String apply(@Nullable final FieldSet fieldSet) {
+                    return fieldSet.getName();
+                }
+            };
+        }
+    }
+
+    @Override public String toString() {
+        return "FieldSet{" +
+                "id='" + id + '\'' +
+                '}';
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/isis/blob/67b6e05e/core/applib/src/main/java/org/apache/isis/applib/layout/component/FieldSetOwner.java
----------------------------------------------------------------------
diff --git a/core/applib/src/main/java/org/apache/isis/applib/layout/component/FieldSetOwner.java b/core/applib/src/main/java/org/apache/isis/applib/layout/component/FieldSetOwner.java
new file mode 100644
index 0000000..c6a0942
--- /dev/null
+++ b/core/applib/src/main/java/org/apache/isis/applib/layout/component/FieldSetOwner.java
@@ -0,0 +1,25 @@
+/*
+ *  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.applib.layout.component;
+
+import java.util.List;
+
+public interface FieldSetOwner extends MemberRegionOwner {
+    List<FieldSet> getFieldSets();
+}

http://git-wip-us.apache.org/repos/asf/isis/blob/67b6e05e/core/applib/src/main/java/org/apache/isis/applib/layout/component/Grid.java
----------------------------------------------------------------------
diff --git a/core/applib/src/main/java/org/apache/isis/applib/layout/component/Grid.java b/core/applib/src/main/java/org/apache/isis/applib/layout/component/Grid.java
new file mode 100644
index 0000000..754a2b1
--- /dev/null
+++ b/core/applib/src/main/java/org/apache/isis/applib/layout/component/Grid.java
@@ -0,0 +1,84 @@
+/*
+ *  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.applib.layout.component;
+
+import java.util.LinkedHashMap;
+
+import org.apache.isis.applib.annotation.Programmatic;
+import org.apache.isis.applib.services.layout.GridService;
+
+/**
+ * All top-level page layout classes should implement this interface.
+ *
+ * <p>
+ *     It is used by the {@link GridService} as a common based type for any layouts read in from XML.
+ * </p>
+ */
+public interface Grid {
+
+    @Programmatic
+    Class<?> getDomainClass();
+
+    @Programmatic
+    void setDomainClass(final Class<?> domainClass);
+
+    @Programmatic
+    boolean isNormalized();
+
+    @Programmatic
+    void setNormalized(final boolean normalized);
+
+    @Programmatic
+    LinkedHashMap<String, PropertyLayoutData> getAllPropertiesById();
+
+    @Programmatic
+    LinkedHashMap<String, CollectionLayoutData> getAllCollectionsById();
+
+    @Programmatic
+    LinkedHashMap<String, ActionLayoutData> getAllActionsById();
+
+    interface Visitor {
+        void visit(final DomainObjectLayoutData domainObjectLayoutData);
+
+        void visit(final ActionLayoutData actionLayoutData);
+
+        void visit(final PropertyLayoutData propertyLayoutData);
+
+        void visit(final CollectionLayoutData collectionLayoutData);
+
+        void visit(final FieldSet fieldSet);
+    }
+
+    class VisitorAdapter implements Visitor {
+        @Override public void visit(final DomainObjectLayoutData domainObjectLayoutData) {
+        }
+        @Override public void visit(final ActionLayoutData actionLayoutData) {
+        }
+        @Override public void visit(final PropertyLayoutData propertyLayoutData) {
+        }
+        @Override public void visit(final CollectionLayoutData collectionLayoutData) {
+        }
+        @Override public void visit(final FieldSet fieldSet) {
+        }
+    }
+
+    @Programmatic
+    void visit(final Grid.Visitor visitor);
+
+}

http://git-wip-us.apache.org/repos/asf/isis/blob/67b6e05e/core/applib/src/main/java/org/apache/isis/applib/layout/component/GridAbstract.java
----------------------------------------------------------------------
diff --git a/core/applib/src/main/java/org/apache/isis/applib/layout/component/GridAbstract.java b/core/applib/src/main/java/org/apache/isis/applib/layout/component/GridAbstract.java
new file mode 100644
index 0000000..e097756
--- /dev/null
+++ b/core/applib/src/main/java/org/apache/isis/applib/layout/component/GridAbstract.java
@@ -0,0 +1,181 @@
+/*
+ *  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.applib.layout.component;
+
+import java.util.LinkedHashMap;
+import java.util.List;
+
+import javax.xml.bind.annotation.XmlTransient;
+
+import com.google.common.collect.Lists;
+import com.google.common.collect.Maps;
+
+import org.apache.isis.applib.annotation.Programmatic;
+import org.apache.isis.applib.layout.grid.bootstrap3.BS3Grid;
+import org.apache.isis.applib.services.layout.GridService;
+
+/**
+ * All top-level page layout classes should implement this interface.
+ *
+ * <p>
+ *     It is used by the {@link GridService} as a common based type for any layouts read in from XML.
+ * </p>
+ */
+@XmlTransient // ignore this class
+public abstract class GridAbstract implements Grid {
+
+
+    private Class<?> domainClass;
+
+    @Programmatic
+    @XmlTransient
+    public Class<?> getDomainClass() {
+        return domainClass;
+    }
+
+    @Programmatic
+    public void setDomainClass(final Class<?> domainClass) {
+        this.domainClass = domainClass;
+    }
+
+
+
+    private boolean normalized;
+
+    @Programmatic
+    @XmlTransient
+    public boolean isNormalized() {
+        return normalized;
+    }
+
+    @Programmatic
+    public void setNormalized(final boolean normalized) {
+        this.normalized = normalized;
+    }
+
+
+    /**
+     * Convenience for subclasses.
+     */
+    protected void traverseActions(
+            final ActionLayoutDataOwner actionLayoutDataOwner,
+            final GridAbstract.Visitor visitor) {
+        final List<ActionLayoutData> actionLayoutDatas = actionLayoutDataOwner.getActions();
+        if(actionLayoutDatas == null) {
+            return;
+        }
+        for (final ActionLayoutData actionLayoutData : Lists.newArrayList(actionLayoutDatas)) {
+            actionLayoutData.setOwner(actionLayoutDataOwner);
+            visitor.visit(actionLayoutData);
+        }
+    }
+
+
+    /**
+     * Convenience for subclasses.
+     */
+    protected void traverseFieldSets(final FieldSetOwner fieldSetOwner, final GridAbstract.Visitor visitor) {
+        final List<FieldSet> fieldSets = fieldSetOwner.getFieldSets();
+        for (FieldSet fieldSet : Lists.newArrayList(fieldSets)) {
+            fieldSet.setOwner(fieldSetOwner);
+            visitor.visit(fieldSet);
+            traverseActions(fieldSet, visitor);
+            final List<PropertyLayoutData> properties = fieldSet.getProperties();
+            for (final PropertyLayoutData property : Lists.newArrayList(properties)) {
+                property.setOwner(fieldSet);
+                visitor.visit(property);
+                traverseActions(property, visitor);
+            }
+        }
+    }
+
+
+    /**
+     * Convenience for subclasses.
+     */
+    protected void traverseCollections(
+            final CollectionLayoutDataOwner owner, final GridAbstract.Visitor visitor) {
+        final List<CollectionLayoutData> collections = owner.getCollections();
+        for (CollectionLayoutData collection : Lists.newArrayList(collections)) {
+            collection.setOwner(owner);
+            visitor.visit(collection);
+            traverseActions(collection, visitor);
+        }
+    }
+
+
+    @Programmatic
+    @XmlTransient
+    public LinkedHashMap<String, PropertyLayoutData> getAllPropertiesById() {
+        final LinkedHashMap<String, PropertyLayoutData> propertiesById = Maps.newLinkedHashMap();
+        visit(new BS3Grid.VisitorAdapter() {
+            public void visit(final PropertyLayoutData propertyLayoutData) {
+                propertiesById.put(propertyLayoutData.getId(), propertyLayoutData);
+            }
+        });
+        return propertiesById;
+    }
+
+
+    @Programmatic
+    @XmlTransient
+    public LinkedHashMap<String, CollectionLayoutData> getAllCollectionsById() {
+        final LinkedHashMap<String, CollectionLayoutData> collectionsById = Maps.newLinkedHashMap();
+
+        visit(new BS3Grid.VisitorAdapter() {
+            @Override
+            public void visit(final CollectionLayoutData collectionLayoutData) {
+                collectionsById.put(collectionLayoutData.getId(), collectionLayoutData);
+            }
+        });
+        return collectionsById;
+    }
+
+
+    @Programmatic
+    @XmlTransient
+    public LinkedHashMap<String, ActionLayoutData> getAllActionsById() {
+        final LinkedHashMap<String, ActionLayoutData> actionsById = Maps.newLinkedHashMap();
+
+        visit(new BS3Grid.VisitorAdapter() {
+            @Override
+            public void visit(final ActionLayoutData actionLayoutData) {
+                actionsById.put(actionLayoutData.getId(), actionLayoutData);
+            }
+        });
+        return actionsById;
+    }
+
+
+    @Programmatic
+    @XmlTransient
+    public LinkedHashMap<String, FieldSet> getAllFieldSetsByName() {
+        final LinkedHashMap<String, FieldSet> fieldSetsByName = Maps.newLinkedHashMap();
+
+        visit(new BS3Grid.VisitorAdapter() {
+            @Override
+            public void visit(final FieldSet fieldSet) {
+                fieldSetsByName.put(fieldSet.getName(), fieldSet);
+            }
+        });
+        return fieldSetsByName;
+    }
+
+
+}

http://git-wip-us.apache.org/repos/asf/isis/blob/67b6e05e/core/applib/src/main/java/org/apache/isis/applib/layout/component/HasBookmarking.java
----------------------------------------------------------------------
diff --git a/core/applib/src/main/java/org/apache/isis/applib/layout/component/HasBookmarking.java b/core/applib/src/main/java/org/apache/isis/applib/layout/component/HasBookmarking.java
new file mode 100644
index 0000000..b4750cf
--- /dev/null
+++ b/core/applib/src/main/java/org/apache/isis/applib/layout/component/HasBookmarking.java
@@ -0,0 +1,14 @@
+package org.apache.isis.applib.layout.component;
+
+import javax.xml.bind.annotation.XmlAttribute;
+
+import org.apache.isis.applib.annotation.BookmarkPolicy;
+
+/**
+ * Created by Dan on 10/02/2016.
+ */
+public interface HasBookmarking {
+    @XmlAttribute(required = false) BookmarkPolicy getBookmarking();
+
+    void setBookmarking(BookmarkPolicy bookmarking);
+}

http://git-wip-us.apache.org/repos/asf/isis/blob/67b6e05e/core/applib/src/main/java/org/apache/isis/applib/layout/component/HasCssClass.java
----------------------------------------------------------------------
diff --git a/core/applib/src/main/java/org/apache/isis/applib/layout/component/HasCssClass.java b/core/applib/src/main/java/org/apache/isis/applib/layout/component/HasCssClass.java
new file mode 100644
index 0000000..3126d09
--- /dev/null
+++ b/core/applib/src/main/java/org/apache/isis/applib/layout/component/HasCssClass.java
@@ -0,0 +1,12 @@
+package org.apache.isis.applib.layout.component;
+
+import javax.xml.bind.annotation.XmlAttribute;
+
+/**
+ * Created by Dan on 10/02/2016.
+ */
+public interface HasCssClass {
+    @XmlAttribute(required = false) String getCssClass();
+
+    void setCssClass(String cssClass);
+}

http://git-wip-us.apache.org/repos/asf/isis/blob/67b6e05e/core/applib/src/main/java/org/apache/isis/applib/layout/component/HasCssClassFa.java
----------------------------------------------------------------------
diff --git a/core/applib/src/main/java/org/apache/isis/applib/layout/component/HasCssClassFa.java b/core/applib/src/main/java/org/apache/isis/applib/layout/component/HasCssClassFa.java
new file mode 100644
index 0000000..f6111d8
--- /dev/null
+++ b/core/applib/src/main/java/org/apache/isis/applib/layout/component/HasCssClassFa.java
@@ -0,0 +1,16 @@
+package org.apache.isis.applib.layout.component;
+
+import javax.xml.bind.annotation.XmlAttribute;
+
+/**
+ * Created by Dan on 10/02/2016.
+ */
+public interface HasCssClassFa {
+    @XmlAttribute(required = false) String getCssClassFa();
+
+    void setCssClassFa(String cssClassFa);
+
+    @XmlAttribute(required = false) org.apache.isis.applib.annotation.ActionLayout.CssClassFaPosition getCssClassFaPosition();
+
+    void setCssClassFaPosition(org.apache.isis.applib.annotation.ActionLayout.CssClassFaPosition cssClassFaPosition);
+}

http://git-wip-us.apache.org/repos/asf/isis/blob/67b6e05e/core/applib/src/main/java/org/apache/isis/applib/layout/component/HasDescribedAs.java
----------------------------------------------------------------------
diff --git a/core/applib/src/main/java/org/apache/isis/applib/layout/component/HasDescribedAs.java b/core/applib/src/main/java/org/apache/isis/applib/layout/component/HasDescribedAs.java
new file mode 100644
index 0000000..44e4b5d
--- /dev/null
+++ b/core/applib/src/main/java/org/apache/isis/applib/layout/component/HasDescribedAs.java
@@ -0,0 +1,12 @@
+package org.apache.isis.applib.layout.component;
+
+import javax.xml.bind.annotation.XmlElement;
+
+/**
+ * Created by Dan on 10/02/2016.
+ */
+public interface HasDescribedAs {
+    @XmlElement(required = false) String getDescribedAs();
+
+    void setDescribedAs(String describedAs);
+}

http://git-wip-us.apache.org/repos/asf/isis/blob/67b6e05e/core/applib/src/main/java/org/apache/isis/applib/layout/component/HasHidden.java
----------------------------------------------------------------------
diff --git a/core/applib/src/main/java/org/apache/isis/applib/layout/component/HasHidden.java b/core/applib/src/main/java/org/apache/isis/applib/layout/component/HasHidden.java
new file mode 100644
index 0000000..935357a
--- /dev/null
+++ b/core/applib/src/main/java/org/apache/isis/applib/layout/component/HasHidden.java
@@ -0,0 +1,14 @@
+package org.apache.isis.applib.layout.component;
+
+import javax.xml.bind.annotation.XmlAttribute;
+
+import org.apache.isis.applib.annotation.Where;
+
+/**
+ * Created by Dan on 10/02/2016.
+ */
+public interface HasHidden {
+    @XmlAttribute(required = false) Where getHidden();
+
+    void setHidden(Where hidden);
+}

http://git-wip-us.apache.org/repos/asf/isis/blob/67b6e05e/core/applib/src/main/java/org/apache/isis/applib/layout/component/HasNamed.java
----------------------------------------------------------------------
diff --git a/core/applib/src/main/java/org/apache/isis/applib/layout/component/HasNamed.java b/core/applib/src/main/java/org/apache/isis/applib/layout/component/HasNamed.java
new file mode 100644
index 0000000..3099496
--- /dev/null
+++ b/core/applib/src/main/java/org/apache/isis/applib/layout/component/HasNamed.java
@@ -0,0 +1,17 @@
+package org.apache.isis.applib.layout.component;
+
+import javax.xml.bind.annotation.XmlAttribute;
+import javax.xml.bind.annotation.XmlElement;
+
+/**
+ * Created by Dan on 10/02/2016.
+ */
+public interface HasNamed {
+    @XmlElement(required = false) String getNamed();
+
+    void setNamed(String named);
+
+    @XmlAttribute(required = false) Boolean getNamedEscaped();
+
+    void setNamedEscaped(Boolean namedEscaped);
+}

http://git-wip-us.apache.org/repos/asf/isis/blob/67b6e05e/core/applib/src/main/java/org/apache/isis/applib/layout/component/MemberRegion.java
----------------------------------------------------------------------
diff --git a/core/applib/src/main/java/org/apache/isis/applib/layout/component/MemberRegion.java b/core/applib/src/main/java/org/apache/isis/applib/layout/component/MemberRegion.java
new file mode 100644
index 0000000..f44efe2
--- /dev/null
+++ b/core/applib/src/main/java/org/apache/isis/applib/layout/component/MemberRegion.java
@@ -0,0 +1,33 @@
+/*
+ *  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.applib.layout.component;
+
+/**
+ * Represents an area on the page containing one or several related members.
+ *
+ * <p>
+ *     Implementations include a <code>FieldSet</code> (containing a number
+ *     of properties and their actions), and a <code>CollectionLayoutData</code>
+ *     (containing a single collection and associated actions)
+ * </p>
+ */
+public interface MemberRegion<T extends MemberRegionOwner> extends Owned<T> {
+
+
+}

http://git-wip-us.apache.org/repos/asf/isis/blob/67b6e05e/core/applib/src/main/java/org/apache/isis/applib/layout/component/MemberRegionOwner.java
----------------------------------------------------------------------
diff --git a/core/applib/src/main/java/org/apache/isis/applib/layout/component/MemberRegionOwner.java b/core/applib/src/main/java/org/apache/isis/applib/layout/component/MemberRegionOwner.java
new file mode 100644
index 0000000..a32526a
--- /dev/null
+++ b/core/applib/src/main/java/org/apache/isis/applib/layout/component/MemberRegionOwner.java
@@ -0,0 +1,23 @@
+/*
+ *  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.applib.layout.component;
+
+public interface MemberRegionOwner extends Owner {
+
+}

http://git-wip-us.apache.org/repos/asf/isis/blob/67b6e05e/core/applib/src/main/java/org/apache/isis/applib/layout/component/Owned.java
----------------------------------------------------------------------
diff --git a/core/applib/src/main/java/org/apache/isis/applib/layout/component/Owned.java b/core/applib/src/main/java/org/apache/isis/applib/layout/component/Owned.java
new file mode 100644
index 0000000..807fe54
--- /dev/null
+++ b/core/applib/src/main/java/org/apache/isis/applib/layout/component/Owned.java
@@ -0,0 +1,23 @@
+/*
+ *  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.applib.layout.component;
+
+public interface Owned<T extends Owner> {
+    T getOwner();
+}

http://git-wip-us.apache.org/repos/asf/isis/blob/67b6e05e/core/applib/src/main/java/org/apache/isis/applib/layout/component/Owner.java
----------------------------------------------------------------------
diff --git a/core/applib/src/main/java/org/apache/isis/applib/layout/component/Owner.java b/core/applib/src/main/java/org/apache/isis/applib/layout/component/Owner.java
new file mode 100644
index 0000000..37299cf
--- /dev/null
+++ b/core/applib/src/main/java/org/apache/isis/applib/layout/component/Owner.java
@@ -0,0 +1,24 @@
+/*
+ *  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.applib.layout.component;
+
+public interface Owner {
+
+
+}

http://git-wip-us.apache.org/repos/asf/isis/blob/67b6e05e/core/applib/src/main/java/org/apache/isis/applib/layout/component/PropertyLayoutData.java
----------------------------------------------------------------------
diff --git a/core/applib/src/main/java/org/apache/isis/applib/layout/component/PropertyLayoutData.java b/core/applib/src/main/java/org/apache/isis/applib/layout/component/PropertyLayoutData.java
new file mode 100644
index 0000000..cf09ced
--- /dev/null
+++ b/core/applib/src/main/java/org/apache/isis/applib/layout/component/PropertyLayoutData.java
@@ -0,0 +1,252 @@
+/*
+ *  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.applib.layout.component;
+
+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.XmlRootElement;
+import javax.xml.bind.annotation.XmlTransient;
+import javax.xml.bind.annotation.XmlType;
+
+import org.apache.isis.applib.annotation.LabelPosition;
+import org.apache.isis.applib.annotation.Where;
+
+/**
+ * Describes the layout of a single property, broadly corresponds to the {@link org.apache.isis.applib.annotation.PropertyLayout} annotation.
+ */
+@XmlRootElement(
+        name = "property"
+)
+@XmlType(
+        name = "property"
+        , propOrder = {
+                "named"
+                , "describedAs"
+                , "actions"
+                , "metadataError"
+        }
+)
+public class PropertyLayoutData
+        implements ActionLayoutDataOwner,
+                   Serializable,
+                   Owned<FieldSet>,
+                   HasCssClass, HasDescribedAs, HasHidden, HasNamed {
+
+    private static final long serialVersionUID = 1L;
+
+    public PropertyLayoutData() {
+    }
+
+    public PropertyLayoutData(final String id) {
+        this.id = id;
+    }
+
+    private String id;
+
+    /**
+     * Property identifier, being the getter method without "get" or "is" prefix, first letter lower cased.
+     */
+    @XmlAttribute(required = true)
+    public String getId() {
+        return id;
+    }
+
+    public void setId(String id) {
+        this.id = id;
+    }
+
+
+
+    private String cssClass;
+
+    @Override
+    @XmlAttribute(required = false)
+    public String getCssClass() {
+        return cssClass;
+    }
+
+    @Override
+    public void setCssClass(String cssClass) {
+        this.cssClass = cssClass;
+    }
+
+
+    private String describedAs;
+
+    @Override
+    @XmlElement(required = false)
+    public String getDescribedAs() {
+        return describedAs;
+    }
+
+    @Override
+    public void setDescribedAs(String describedAs) {
+        this.describedAs = describedAs;
+    }
+
+
+    private Where hidden;
+
+    @Override
+    @XmlAttribute(required = false)
+    public Where getHidden() {
+        return hidden;
+    }
+
+    @Override
+    public void setHidden(Where hidden) {
+        this.hidden = hidden;
+    }
+
+
+    private LabelPosition labelPosition;
+
+    @XmlAttribute(required = false)
+    public LabelPosition getLabelPosition() {
+        return labelPosition;
+    }
+
+    public void setLabelPosition(LabelPosition labelPosition) {
+        this.labelPosition = labelPosition;
+    }
+
+
+    private Integer multiLine;
+
+    @XmlAttribute(required = false)
+    public Integer getMultiLine() {
+        return multiLine;
+    }
+
+    public void setMultiLine(Integer multiLine) {
+        this.multiLine = multiLine;
+    }
+
+
+    private String named;
+
+    @Override
+    @XmlElement(required = false)
+    public String getNamed() {
+        return named;
+    }
+
+    @Override
+    public void setNamed(String named) {
+        this.named = named;
+    }
+
+
+    private Boolean namedEscaped;
+
+    @Override
+    @XmlAttribute(required = false)
+    public Boolean getNamedEscaped() {
+        return namedEscaped;
+    }
+
+    @Override
+    public void setNamedEscaped(Boolean namedEscaped) {
+        this.namedEscaped = namedEscaped;
+    }
+
+
+    private Boolean renderedAsDayBefore;
+
+    @XmlAttribute(required = false)
+    public Boolean getRenderedAsDayBefore() {
+        return renderedAsDayBefore;
+    }
+
+    public void setRenderedAsDayBefore(Boolean renderedAsDayBefore) {
+        this.renderedAsDayBefore = renderedAsDayBefore;
+    }
+
+
+    private Integer typicalLength;
+
+    @XmlAttribute(required = false)
+    public Integer getTypicalLength() {
+        return typicalLength;
+    }
+
+    public void setTypicalLength(Integer typicalLength) {
+        this.typicalLength = typicalLength;
+    }
+
+
+
+    private List<ActionLayoutData> actions;
+
+    // no wrapper
+    @XmlElement(name = "action", required = false)
+    public List<ActionLayoutData> getActions() {
+        return actions;
+    }
+
+    public void setActions(List<ActionLayoutData> actionLayoutDatas) {
+        this.actions = actionLayoutDatas;
+    }
+
+
+    private FieldSet owner;
+    /**
+     * Owner.
+     *
+     * <p>
+     *     Set programmatically by framework after reading in from XML.
+     * </p>
+     */
+    @XmlTransient
+    public FieldSet getOwner() {
+        return owner;
+    }
+
+    public void setOwner(final FieldSet owner) {
+        this.owner = owner;
+    }
+
+
+
+    private String metadataError;
+
+    /**
+     * For diagnostics; populated by the framework if and only if a metadata error.
+     */
+    @XmlElement(required = false)
+    public String getMetadataError() {
+        return metadataError;
+    }
+
+    public void setMetadataError(final String metadataError) {
+        this.metadataError = metadataError;
+    }
+
+
+    @Override
+    public String toString() {
+        return "PropertyLayoutData{" +
+                "id='" + id + '\'' +
+                '}';
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/isis/blob/67b6e05e/core/applib/src/main/java/org/apache/isis/applib/layout/component/package-info.java
----------------------------------------------------------------------
diff --git a/core/applib/src/main/java/org/apache/isis/applib/layout/component/package-info.java b/core/applib/src/main/java/org/apache/isis/applib/layout/component/package-info.java
new file mode 100644
index 0000000..3b17836
--- /dev/null
+++ b/core/applib/src/main/java/org/apache/isis/applib/layout/component/package-info.java
@@ -0,0 +1,36 @@
+/*
+ *  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.
+ */
+
+/**
+ * The classes in this package provide layout metadata for a domain object's properties, collections and actions - the
+ * &quot;building blocks&quot; which then must be arranged into some sort of layout.
+ *
+ * <p>
+ *     The <code>bootstrap3</code> and <code>fixedcols</code> packages both provide different ways of doing the layout,
+ *     and both reference the classes in this package.
+ * </p>
+ *
+ */
+@javax.xml.bind.annotation.XmlSchema(
+        namespace = "http://isis.apache.org/applib/layout/component",
+        elementFormDefault = javax.xml.bind.annotation.XmlNsForm.QUALIFIED
+        // specifying the location seems to cause JaxbService#toXsd() to not generate the schema; not sure why...
+        //, location = ..."http://isis.apache.org/schema/metamodel/layout/common/common.xsd"
+)
+package org.apache.isis.applib.layout.component;
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/isis/blob/67b6e05e/core/applib/src/main/java/org/apache/isis/applib/layout/grid/bootstrap3/BS3ClearFix.java
----------------------------------------------------------------------
diff --git a/core/applib/src/main/java/org/apache/isis/applib/layout/grid/bootstrap3/BS3ClearFix.java b/core/applib/src/main/java/org/apache/isis/applib/layout/grid/bootstrap3/BS3ClearFix.java
new file mode 100644
index 0000000..acf64e9
--- /dev/null
+++ b/core/applib/src/main/java/org/apache/isis/applib/layout/grid/bootstrap3/BS3ClearFix.java
@@ -0,0 +1,24 @@
+/*
+ *  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.applib.layout.grid.bootstrap3;
+
+public abstract class BS3ClearFix extends BS3RowContent {
+
+    public abstract String toCssClass();
+}

http://git-wip-us.apache.org/repos/asf/isis/blob/67b6e05e/core/applib/src/main/java/org/apache/isis/applib/layout/grid/bootstrap3/BS3ClearFixHidden.java
----------------------------------------------------------------------
diff --git a/core/applib/src/main/java/org/apache/isis/applib/layout/grid/bootstrap3/BS3ClearFixHidden.java b/core/applib/src/main/java/org/apache/isis/applib/layout/grid/bootstrap3/BS3ClearFixHidden.java
new file mode 100644
index 0000000..817b685
--- /dev/null
+++ b/core/applib/src/main/java/org/apache/isis/applib/layout/grid/bootstrap3/BS3ClearFixHidden.java
@@ -0,0 +1,39 @@
+/*
+ *  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.applib.layout.grid.bootstrap3;
+
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlType;
+
+@XmlRootElement(
+        name = "clearFixHidden"
+)
+@XmlType(
+        name = "clearFixHidden"
+)
+public class BS3ClearFixHidden extends BS3ClearFix {
+
+    private static final long serialVersionUID = 1L;
+
+    @Override
+    public String toCssClass() {
+        return "clearfix hidden-" + getSize().toCssClassFragment();
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/isis/blob/67b6e05e/core/applib/src/main/java/org/apache/isis/applib/layout/grid/bootstrap3/BS3ClearFixVisible.java
----------------------------------------------------------------------
diff --git a/core/applib/src/main/java/org/apache/isis/applib/layout/grid/bootstrap3/BS3ClearFixVisible.java b/core/applib/src/main/java/org/apache/isis/applib/layout/grid/bootstrap3/BS3ClearFixVisible.java
new file mode 100644
index 0000000..bb83ca5
--- /dev/null
+++ b/core/applib/src/main/java/org/apache/isis/applib/layout/grid/bootstrap3/BS3ClearFixVisible.java
@@ -0,0 +1,59 @@
+/*
+ *  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.applib.layout.grid.bootstrap3;
+
+import javax.xml.bind.annotation.XmlAttribute;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlType;
+
+@XmlRootElement(
+        name = "clearFixVisible"
+)
+@XmlType(
+        name = "clearFixVisible"
+)
+public class BS3ClearFixVisible extends BS3ClearFix {
+
+    private static final long serialVersionUID = 1L;
+
+    public enum CssDisplay {
+        BLOCK,
+        INLINE,
+        INLINE_BLOCK
+    }
+
+    private CssDisplay cssDisplay;
+
+
+    @XmlAttribute(required = true)
+    public CssDisplay getCssDisplay() {
+        return cssDisplay;
+    }
+
+    public void setCssDisplay(final CssDisplay cssDisplay) {
+        this.cssDisplay = cssDisplay;
+    }
+
+
+    @Override
+    public String toCssClass() {
+        return "clearfix visible-" + getSize().toCssClassFragment() + "-" + getCssClass().toLowerCase().replace('_', '-');
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/isis/blob/67b6e05e/core/applib/src/main/java/org/apache/isis/applib/layout/grid/bootstrap3/BS3Col.java
----------------------------------------------------------------------
diff --git a/core/applib/src/main/java/org/apache/isis/applib/layout/grid/bootstrap3/BS3Col.java b/core/applib/src/main/java/org/apache/isis/applib/layout/grid/bootstrap3/BS3Col.java
new file mode 100644
index 0000000..bc289d8
--- /dev/null
+++ b/core/applib/src/main/java/org/apache/isis/applib/layout/grid/bootstrap3/BS3Col.java
@@ -0,0 +1,257 @@
+/*
+ *  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.applib.layout.grid.bootstrap3;
+
+import java.util.List;
+
+import javax.xml.bind.annotation.XmlAttribute;
+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 com.google.common.collect.Lists;
+
+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.CollectionLayoutDataOwner;
+import org.apache.isis.applib.layout.component.DomainObjectLayoutData;
+import org.apache.isis.applib.layout.component.DomainObjectLayoutDataOwner;
+import org.apache.isis.applib.layout.component.FieldSet;
+import org.apache.isis.applib.layout.component.FieldSetOwner;
+
+/**
+ * A column within a row which, depending on its {@link #getSpan()}, could be as narrow as 1/12th of the page's width, all the way up to spanning the entire page.
+ *
+ * <p>
+ *     Pretty much other content can be contained within a column, though most commonly it will be {@link FieldSet fieldset}s
+ *     (a group of properties) or {@link CollectionLayoutData collection}s.  However, columns can also be used to
+ *     contain further {@link BS3Row row}s (creating a nested grid of rows/cols/rows/cols) and {@link BS3TabGroup tabgroup}s.
+ * </p>
+ *
+ * <p>
+ *     It is rendered as a (eg) &lt;div class=&quot;col-md-4 ...&quot;&gt;
+ * </p>
+ */
+@XmlRootElement(
+        name = "col"
+)
+@XmlType(
+        name = "col"
+        , propOrder = {
+            "domainObject",
+            "actions",
+            "rows",
+            "tabGroups",
+            "fieldSets",
+            "collections",
+            "metadataError"
+        }
+)
+public class BS3Col extends BS3RowContent
+        implements ActionLayoutDataOwner, BS3TabGroupOwner, BS3RowOwner, FieldSetOwner, HasCssId,
+        CollectionLayoutDataOwner, DomainObjectLayoutDataOwner {
+
+    private static final long serialVersionUID = 1L;
+
+
+
+    private String id;
+
+    /**
+     * As per &lt;div id=&quot;...&quot;&gt;...&lt;/div&gt; : must be unique across entire page.
+     */
+    @XmlAttribute(required = false)
+    public String getId() {
+        return id;
+    }
+
+    public void setId(final String id) {
+        this.id = id;
+    }
+
+
+    private int span;
+
+    @XmlAttribute(required = true)
+    public int getSpan() {
+        return span;
+    }
+
+    public void setSpan(final int span) {
+        this.span = span;
+    }
+
+
+    private Boolean unreferencedActions;
+
+    /**
+     * Whether this column should be used to hold any unreferenced actions (contributed or &quot;native&quot;).
+     *
+     * <p>
+     *     Any layout must have precisely one column or {@link FieldSet} that has this attribute set.
+     * </p>
+     */
+    @XmlAttribute(required = false)
+    public Boolean isUnreferencedActions() {
+        return unreferencedActions;
+    }
+
+    public void setUnreferencedActions(final Boolean unreferencedActions) {
+        this.unreferencedActions = unreferencedActions;
+    }
+
+
+    private Boolean unreferencedCollections;
+    /**
+     * Whether this column should be used to hold any unreferenced collections (contributed or &quot;native&quot;).
+     *
+     * <p>
+     *     Any layout must have precisely one column or {@link BS3TabGroup tabgroup} that has this attribute set.
+     * </p>
+     */
+    @XmlAttribute(required = false)
+    public Boolean isUnreferencedCollections() {
+        return unreferencedCollections;
+    }
+
+    public void setUnreferencedCollections(final Boolean unreferencedCollections) {
+        this.unreferencedCollections = unreferencedCollections;
+    }
+
+
+
+
+
+    private DomainObjectLayoutData domainObject;
+
+    /**
+     * Whether to show the object's icon and title.
+     */
+    @XmlElementRef(type=DomainObjectLayoutData.class, name="domainObject", required = false)
+    public DomainObjectLayoutData getDomainObject() {
+        return domainObject;
+    }
+
+    public void setDomainObject(final DomainObjectLayoutData domainObjectLayoutData) {
+        this.domainObject = domainObjectLayoutData;
+    }
+
+
+
+    private List<ActionLayoutData> actions = Lists.newArrayList();
+
+    // no wrapper
+    @XmlElementRef(type = ActionLayoutData.class, name = "action", required = false)
+    public List<ActionLayoutData> getActions() {
+        return actions;
+    }
+
+    public void setActions(final List<ActionLayoutData> actions) {
+        this.actions = actions;
+    }
+
+
+
+    private List<BS3Row> rows = Lists.newArrayList();
+
+    // no wrapper
+    @XmlElement(name = "row", required = false)
+    public List<BS3Row> getRows() {
+        return rows;
+    }
+
+    public void setRows(final List<BS3Row> rows) {
+        this.rows = rows;
+    }
+
+
+
+    private List<BS3TabGroup> tabGroups = Lists.newArrayList();
+
+    // no wrapper
+    @XmlElement(name = "tabGroup", required = false)
+    public List<BS3TabGroup> getTabGroups() {
+        return tabGroups;
+    }
+
+    public void setTabGroups(final List<BS3TabGroup> tabGroups) {
+        this.tabGroups = tabGroups;
+    }
+
+
+
+    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 String metadataError;
+
+    /**
+     * For diagnostics; populated by the framework if and only if a metadata error.
+     */
+    @XmlElement(required = false)
+    public String getMetadataError() {
+        return metadataError;
+    }
+
+    public void setMetadataError(final String metadataError) {
+        this.metadataError = metadataError;
+    }
+
+
+
+    public String toCssClass() {
+        final Size size = getSize() != null? getSize(): Size.MD;
+        return "col-" + size.toCssClassFragment() + "-" + getSpan();
+    }
+
+
+    @Override public String toString() {
+        return "BS3Col{" +
+                "id='" + id + '\'' +
+                '}';
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/isis/blob/67b6e05e/core/applib/src/main/java/org/apache/isis/applib/layout/grid/bootstrap3/BS3Element.java
----------------------------------------------------------------------
diff --git a/core/applib/src/main/java/org/apache/isis/applib/layout/grid/bootstrap3/BS3Element.java b/core/applib/src/main/java/org/apache/isis/applib/layout/grid/bootstrap3/BS3Element.java
new file mode 100644
index 0000000..062d557
--- /dev/null
+++ b/core/applib/src/main/java/org/apache/isis/applib/layout/grid/bootstrap3/BS3Element.java
@@ -0,0 +1,35 @@
+/*
+ *  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.applib.layout.grid.bootstrap3;
+
+import java.io.Serializable;
+
+public interface BS3Element extends WithinGrid, Serializable {
+
+    /**
+     * Any additional CSS classes to render on the page element corresponding to this object,
+     * eg as per the <a href="http://getbootstrap.com/css/#grid-less">Bootstrap mixins</a> or just for
+     * custom styling.
+     */
+    String getCssClass();
+
+    void setCssClass(final String cssClass);
+
+
+}

http://git-wip-us.apache.org/repos/asf/isis/blob/67b6e05e/core/applib/src/main/java/org/apache/isis/applib/layout/grid/bootstrap3/BS3ElementAbstract.java
----------------------------------------------------------------------
diff --git a/core/applib/src/main/java/org/apache/isis/applib/layout/grid/bootstrap3/BS3ElementAbstract.java b/core/applib/src/main/java/org/apache/isis/applib/layout/grid/bootstrap3/BS3ElementAbstract.java
new file mode 100644
index 0000000..ef0e312
--- /dev/null
+++ b/core/applib/src/main/java/org/apache/isis/applib/layout/grid/bootstrap3/BS3ElementAbstract.java
@@ -0,0 +1,46 @@
+/*
+ *  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.applib.layout.grid.bootstrap3;
+
+import javax.xml.bind.annotation.XmlAttribute;
+
+/**
+ * Superclass for all layout classes, factoring out the common {@link #getCssClass()} attribute.
+ */
+public abstract class BS3ElementAbstract implements BS3Element {
+
+    private String cssClass;
+
+    /**
+     * Any additional CSS classes to render on the page element corresponding to this object,
+     * eg as per the <a href="http://getbootstrap.com/css/#grid-less">Bootstrap mixins</a> or just for
+     * custom styling.
+     */
+    @XmlAttribute(required = false)
+    public String getCssClass() {
+        return cssClass;
+    }
+
+    public void setCssClass(final String cssClass) {
+        this.cssClass = cssClass;
+    }
+
+
+
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/isis/blob/67b6e05e/core/applib/src/main/java/org/apache/isis/applib/layout/grid/bootstrap3/BS3Grid.java
----------------------------------------------------------------------
diff --git a/core/applib/src/main/java/org/apache/isis/applib/layout/grid/bootstrap3/BS3Grid.java b/core/applib/src/main/java/org/apache/isis/applib/layout/grid/bootstrap3/BS3Grid.java
new file mode 100644
index 0000000..dc836ec
--- /dev/null
+++ b/core/applib/src/main/java/org/apache/isis/applib/layout/grid/bootstrap3/BS3Grid.java
@@ -0,0 +1,304 @@
+/*
+ *  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.applib.layout.grid.bootstrap3;
+
+import java.util.LinkedHashMap;
+import java.util.List;
+
+import javax.xml.bind.annotation.XmlAttribute;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlTransient;
+import javax.xml.bind.annotation.XmlType;
+
+import com.google.common.collect.Lists;
+import com.google.common.collect.Maps;
+
+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.GridAbstract;
+import org.apache.isis.applib.layout.component.PropertyLayoutData;
+import org.apache.isis.applib.services.dto.Dto;
+
+/**
+ * This is the top-level for rendering the domain object's properties, collections and actions.  It simply consists
+ * of a number of rows.
+ *
+ * <p>
+ *     The element is rendered as a &lt;div class=&quot;...&quot;&gt;
+ * </p>
+ */
+@XmlRootElement(
+        name = "grid"
+)
+@XmlType(
+        name = "grid"
+        , propOrder = {
+            "rows",
+            "metadataErrors"
+        }
+)
+public class BS3Grid extends GridAbstract implements BS3Element, Dto, BS3RowOwner {
+
+    private static final long serialVersionUID = 1L;
+
+
+    private String cssClass;
+
+    @XmlAttribute(required = false)
+    public String getCssClass() {
+        return cssClass;
+    }
+
+    public void setCssClass(final String cssClass) {
+        this.cssClass = cssClass;
+    }
+
+
+
+
+
+    private List<BS3Row> rows = Lists.newArrayList();
+
+    // no wrapper
+    @XmlElement(name = "row", required = true)
+    public List<BS3Row> getRows() {
+        return rows;
+    }
+
+    public void setRows(final List<BS3Row> rows) {
+        this.rows = rows;
+    }
+
+
+
+    private List<String> metadataErrors = Lists.newArrayList();
+
+    /**
+     * For diagnostics; populated by the framework if and only if a metadata error.
+     */
+    @XmlElement(name = "metadataError", required = false)
+    public List<String> getMetadataErrors() {
+        return metadataErrors;
+    }
+
+    public void setMetadataErrors(final List<String> metadataErrors) {
+        this.metadataErrors = metadataErrors;
+    }
+
+
+
+
+    private BS3RowOwner owner;
+
+
+
+    public interface Visitor extends Grid.Visitor {
+        void preVisit(final BS3Grid bs3Grid);
+        void visit(final BS3Grid bs3Grid);
+        void postVisit(final BS3Grid bs3Grid);
+        void preVisit(final BS3Row bs3Row);
+        void visit(final BS3Row bs3Row);
+        void postVisit(final BS3Row bs3Row);
+        void preVisit(final BS3Col bs3Col);
+        void visit(final BS3Col bs3Col);
+        void postVisit(final BS3Col bs3Col);
+        void visit(final BS3ClearFix bs3ClearFix);
+        void preVisit(final BS3TabGroup bs3TabGroup);
+        void visit(final BS3TabGroup bs3TabGroup);
+        void postVisit(final BS3TabGroup bs3TabGroup);
+        void preVisit(final BS3Tab bs3Tab);
+        void visit(final BS3Tab bs3Tab);
+        void postVisit(final BS3Tab bs3Tab);
+    }
+
+    public static class VisitorAdapter extends Grid.VisitorAdapter implements Visitor {
+        @Override public void preVisit(final BS3Grid bs3Grid) { }
+        @Override public void visit(final BS3Grid bs3Grid) { }
+        @Override public void postVisit(final BS3Grid bs3Grid) { }
+
+        @Override public void preVisit(final BS3Row bs3Row) { }
+        @Override public void visit(final BS3Row bs3Row) { }
+        @Override public void postVisit(final BS3Row bs3Row) { }
+
+        @Override public void preVisit(final BS3Col bs3Col) { }
+        @Override public void visit(final BS3Col bs3Col) { }
+        @Override public void postVisit(final BS3Col bs3Col) { }
+
+        @Override public void visit(final BS3ClearFix bs3ClearFix) { }
+
+        @Override public void preVisit(final BS3TabGroup bs3TabGroup) { }
+        @Override public void visit(final BS3TabGroup bs3TabGroup) { }
+        @Override public void postVisit(final BS3TabGroup bs3TabGroup) { }
+
+        @Override public void preVisit(final BS3Tab bs3Tab) { }
+        @Override public void visit(final BS3Tab bs3Tab) { }
+        @Override public void postVisit(final BS3Tab bs3Tab) { }
+    }
+
+    public void visit(final Grid.Visitor visitor) {
+        final BS3Grid.Visitor bs3Visitor = asBs3Visitor(visitor);
+        bs3Visitor.preVisit(this);
+        bs3Visitor.visit(this);
+        traverseRows(this, visitor);
+        bs3Visitor.postVisit(this);
+    }
+
+    protected void traverseRows(final BS3RowOwner rowOwner, final Grid.Visitor visitor) {
+        final BS3Grid.Visitor bs3Visitor = asBs3Visitor(visitor);
+        final List<BS3Row> rows = rowOwner.getRows();
+        for (BS3Row bs3Row : Lists.newArrayList(rows)) {
+            bs3Row.setOwner(this);
+            bs3Visitor.preVisit(bs3Row);
+            bs3Visitor.visit(bs3Row);
+            traverseCols(visitor, bs3Row);
+            bs3Visitor.postVisit(bs3Row);
+        }
+    }
+
+    private void traverseCols(final Grid.Visitor visitor, final BS3Row bs3Row) {
+        final BS3Grid.Visitor bs3Visitor = asBs3Visitor(visitor);
+        final List<BS3RowContent> cols = bs3Row.getCols();
+        for (BS3RowContent rowContent : Lists.newArrayList(cols)) {
+            rowContent.setOwner(bs3Row);
+            if(rowContent instanceof BS3Col) {
+                final BS3Col bs3Col = (BS3Col) rowContent;
+                bs3Visitor.preVisit(bs3Col);
+                bs3Visitor.visit(bs3Col);
+                traverseDomainObject(bs3Col, visitor);
+                traverseTabGroups(bs3Col, visitor);
+                traverseActions(bs3Col, visitor);
+                traverseFieldSets(bs3Col, visitor);
+                traverseCollections(bs3Col, visitor);
+                traverseRows(bs3Col, visitor);
+                bs3Visitor.postVisit(bs3Col);
+            } else if (rowContent instanceof BS3ClearFix) {
+                final BS3ClearFix bs3ClearFix = (BS3ClearFix) rowContent;
+                bs3Visitor.visit(bs3ClearFix);
+            } else {
+                throw new IllegalStateException(
+                        "Unrecognized implementation of BS3RowContent, " + rowContent);
+            }
+        }
+    }
+
+    private void traverseDomainObject(final BS3Col bs3Col, final Grid.Visitor visitor) {
+        final DomainObjectLayoutData domainObject = bs3Col.getDomainObject();
+        if(domainObject == null) {
+            return;
+        }
+        domainObject.setOwner(bs3Col);
+        visitor.visit(domainObject);
+    }
+
+    private void traverseTabGroups(
+            final BS3TabGroupOwner bs3TabGroupOwner,
+            final Grid.Visitor visitor) {
+        final BS3Grid.Visitor bs3Visitor = asBs3Visitor(visitor);
+        final List<BS3TabGroup> tabGroups = bs3TabGroupOwner.getTabGroups();
+        for (BS3TabGroup bs3TabGroup : Lists.newArrayList(tabGroups)) {
+            bs3TabGroup.setOwner(bs3TabGroupOwner);
+            bs3Visitor.preVisit(bs3TabGroup);
+            bs3Visitor.visit(bs3TabGroup);
+            traverseTabs(bs3TabGroup, visitor);
+            bs3Visitor.postVisit(bs3TabGroup);
+        }
+    }
+
+    private void traverseTabs(
+            final BS3TabOwner bs3TabOwner,
+            final Grid.Visitor visitor) {
+        final BS3Grid.Visitor bs3Visitor = asBs3Visitor(visitor);
+        final List<BS3Tab> tabs = bs3TabOwner.getTabs();
+        for (BS3Tab tab : Lists.newArrayList(tabs)) {
+            tab.setOwner(bs3TabOwner);
+            bs3Visitor.preVisit(tab);
+            bs3Visitor.visit(tab);
+            traverseRows(tab, visitor);
+            bs3Visitor.postVisit(tab);
+        }
+    }
+
+    private static Visitor asBs3Visitor(final Grid.Visitor visitor) {
+        return visitor instanceof Visitor? (Visitor) visitor : new BS3Grid.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);
+            }
+        };
+    }
+
+
+    @Programmatic
+    @XmlTransient
+    public LinkedHashMap<String, BS3Tab> getAllTabsByName() {
+        final LinkedHashMap<String, BS3Tab> tabsByName = Maps.newLinkedHashMap();
+
+        visit(new BS3Grid.VisitorAdapter() {
+            @Override
+            public void visit(final BS3Tab bS3Tab) {
+                tabsByName.put(bS3Tab.getName(), bS3Tab);
+            }
+        });
+        return tabsByName;
+    }
+
+
+    @Programmatic
+    @XmlTransient
+    public LinkedHashMap<String, HasCssId> getAllCssId() {
+        final LinkedHashMap<String, HasCssId> divsByCssId = Maps.newLinkedHashMap();
+
+        visit(new BS3Grid.VisitorAdapter() {
+            @Override
+            public void visit(final BS3Row bs3Row) {
+                final String id = bs3Row.getId();
+                divsByCssId.put(id, bs3Row);
+            }
+        });
+        return divsByCssId;
+    }
+
+    @Override
+    @Programmatic
+    @XmlTransient
+    public BS3Grid getGrid() {
+        return this;
+    }
+
+}


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

Posted by da...@apache.org.
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/master
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);
 
                 }


[07/50] [abbrv] isis git commit: ISIS-993: moving around and renaming the applib schema files for layout

Posted by da...@apache.org.
http://git-wip-us.apache.org/repos/asf/isis/blob/67b6e05e/core/applib/src/main/java/org/apache/isis/applib/layout/grid/bootstrap3/BS3Row.java
----------------------------------------------------------------------
diff --git a/core/applib/src/main/java/org/apache/isis/applib/layout/grid/bootstrap3/BS3Row.java b/core/applib/src/main/java/org/apache/isis/applib/layout/grid/bootstrap3/BS3Row.java
new file mode 100644
index 0000000..5fd3b56
--- /dev/null
+++ b/core/applib/src/main/java/org/apache/isis/applib/layout/grid/bootstrap3/BS3Row.java
@@ -0,0 +1,140 @@
+/*
+ *  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.applib.layout.grid.bootstrap3;
+
+import java.util.List;
+
+import javax.xml.bind.annotation.XmlAttribute;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlElementRef;
+import javax.xml.bind.annotation.XmlElementRefs;
+import javax.xml.bind.annotation.XmlTransient;
+import javax.xml.bind.annotation.XmlType;
+
+import com.google.common.collect.Lists;
+
+import org.apache.isis.applib.annotation.Programmatic;
+
+/**
+ * Contains a row of content, either on the top-level {@link BS3Grid page} or at any other lower-level element that can
+ * contain rows, eg {@link BS3Tab tabs}.
+ *
+ * <p>
+ *     It is rendered as a &lt;div class=&quot;row ...&quot;&gt;
+ * </p>
+ */
+@XmlType(
+        name = "row"
+        , propOrder = {
+            "cols"
+            , "metadataError"
+        }
+)
+public class BS3Row extends BS3ElementAbstract implements HasCssId, BS3RowContentOwner {
+
+    private static final long serialVersionUID = 1L;
+
+
+    private String id;
+
+    /**
+     * As per &lt;div id=&quot;...&quot;&gt;...&lt;/div&gt; : must be unique across entire page.
+     */
+    @XmlAttribute(required = false)
+    public String getId() {
+        return id;
+    }
+
+    public void setId(final String id) {
+        this.id = id;
+    }
+
+
+
+    private List<BS3RowContent> cols = Lists.newArrayList();
+
+    // no wrapper
+    @XmlElementRefs({
+            @XmlElementRef(type = BS3Col.class, name="col", required = true),
+            @XmlElementRef(type = BS3ClearFixVisible.class,  name="clearFixVisible", required = false),
+            @XmlElementRef(type = BS3ClearFixHidden.class,  name="clearFixHidden", required = false)
+    })
+    public List<BS3RowContent> getCols() {
+        return cols;
+    }
+
+    public void setCols(final List<BS3RowContent> cols) {
+        this.cols = cols;
+    }
+
+
+
+
+    private String metadataError;
+
+    /**
+     * For diagnostics; populated by the framework if and only if a metadata error.
+     */
+    @XmlElement(required = false)
+    public String getMetadataError() {
+        return metadataError;
+    }
+
+    public void setMetadataError(final String metadataError) {
+        this.metadataError = metadataError;
+    }
+
+
+    private BS3RowOwner owner;
+
+
+    /**
+     * Owner.
+     *
+     * <p>
+     *     Set programmatically by framework after reading in from XML.
+     * </p>
+     */
+    @XmlTransient
+    public BS3RowOwner getOwner() {
+        return owner;
+    }
+
+    public void setOwner(final BS3RowOwner owner) {
+        this.owner = owner;
+    }
+
+
+
+    @Override
+    @XmlTransient
+    @Programmatic
+    public BS3Grid getGrid() {
+        return getOwner().getGrid();
+    }
+
+
+    @Override public String toString() {
+        return "BS3Row{" +
+                "id='" + id + '\'' +
+                '}';
+    }
+
+
+}

http://git-wip-us.apache.org/repos/asf/isis/blob/67b6e05e/core/applib/src/main/java/org/apache/isis/applib/layout/grid/bootstrap3/BS3RowContent.java
----------------------------------------------------------------------
diff --git a/core/applib/src/main/java/org/apache/isis/applib/layout/grid/bootstrap3/BS3RowContent.java b/core/applib/src/main/java/org/apache/isis/applib/layout/grid/bootstrap3/BS3RowContent.java
new file mode 100644
index 0000000..892193e
--- /dev/null
+++ b/core/applib/src/main/java/org/apache/isis/applib/layout/grid/bootstrap3/BS3RowContent.java
@@ -0,0 +1,95 @@
+/*
+ *  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.applib.layout.grid.bootstrap3;
+
+import javax.xml.bind.annotation.XmlAttribute;
+import javax.xml.bind.annotation.XmlTransient;
+
+import org.apache.isis.applib.annotation.Programmatic;
+
+/**
+ * Common superclass for any content of a row.
+ *
+ * <p>
+ *     Most commonly the content of a row is {@link BS3Col col}umns, but it may be either of the
+ *     {@link BS3ClearFix clearfix} classes.
+ * </p>
+ *
+ */
+public abstract class BS3RowContent extends BS3ElementAbstract {
+
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * As per <a href="http://getbootstrap.com/css/#grid-options">grid options</a>, also used in
+     * <a href="http://getbootstrap.com/css/#responsive-utilities">responsive utility</a> classes.
+     */
+    public enum Size {
+        XS,
+        SM,
+        MD,
+        LG;
+
+        public String toCssClassFragment() {
+            return name().toLowerCase();
+        }
+    }
+
+    private Size size;
+
+    /**
+     * Default if not specified is {@link Size#MD}.
+     */
+    @XmlAttribute(required = false)
+    public Size getSize() {
+        return size;
+    }
+
+    public void setSize(final Size size) {
+        this.size = size;
+    }
+
+
+    private BS3RowContentOwner owner;
+
+    /**
+     * Owner.
+     *
+     * <p>
+     *     Set programmatically by framework after reading in from XML.
+     * </p>
+     */
+    @XmlTransient
+    public BS3RowContentOwner getOwner() {
+        return owner;
+    }
+
+    public void setOwner(final BS3RowContentOwner owner) {
+        this.owner = owner;
+    }
+
+    @Override
+    @XmlTransient
+    @Programmatic
+    public BS3Grid getGrid() {
+        return getOwner().getGrid();
+    }
+
+
+}

http://git-wip-us.apache.org/repos/asf/isis/blob/67b6e05e/core/applib/src/main/java/org/apache/isis/applib/layout/grid/bootstrap3/BS3RowContentOwner.java
----------------------------------------------------------------------
diff --git a/core/applib/src/main/java/org/apache/isis/applib/layout/grid/bootstrap3/BS3RowContentOwner.java b/core/applib/src/main/java/org/apache/isis/applib/layout/grid/bootstrap3/BS3RowContentOwner.java
new file mode 100644
index 0000000..c0f1dbd
--- /dev/null
+++ b/core/applib/src/main/java/org/apache/isis/applib/layout/grid/bootstrap3/BS3RowContentOwner.java
@@ -0,0 +1,25 @@
+/*
+ *  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.applib.layout.grid.bootstrap3;
+
+import org.apache.isis.applib.layout.component.Owner;
+
+public interface BS3RowContentOwner extends Owner, WithinGrid {
+
+}

http://git-wip-us.apache.org/repos/asf/isis/blob/67b6e05e/core/applib/src/main/java/org/apache/isis/applib/layout/grid/bootstrap3/BS3RowOwner.java
----------------------------------------------------------------------
diff --git a/core/applib/src/main/java/org/apache/isis/applib/layout/grid/bootstrap3/BS3RowOwner.java b/core/applib/src/main/java/org/apache/isis/applib/layout/grid/bootstrap3/BS3RowOwner.java
new file mode 100644
index 0000000..1dafe14
--- /dev/null
+++ b/core/applib/src/main/java/org/apache/isis/applib/layout/grid/bootstrap3/BS3RowOwner.java
@@ -0,0 +1,28 @@
+/*
+ *  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.applib.layout.grid.bootstrap3;
+
+import java.util.List;
+
+import org.apache.isis.applib.layout.component.Owner;
+
+public interface BS3RowOwner extends Owner, WithinGrid {
+
+    List<BS3Row> getRows();
+}

http://git-wip-us.apache.org/repos/asf/isis/blob/67b6e05e/core/applib/src/main/java/org/apache/isis/applib/layout/grid/bootstrap3/BS3Tab.java
----------------------------------------------------------------------
diff --git a/core/applib/src/main/java/org/apache/isis/applib/layout/grid/bootstrap3/BS3Tab.java b/core/applib/src/main/java/org/apache/isis/applib/layout/grid/bootstrap3/BS3Tab.java
new file mode 100644
index 0000000..1cd3268
--- /dev/null
+++ b/core/applib/src/main/java/org/apache/isis/applib/layout/grid/bootstrap3/BS3Tab.java
@@ -0,0 +1,177 @@
+/*
+ *  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.applib.layout.grid.bootstrap3;
+
+import java.util.List;
+import java.util.concurrent.atomic.AtomicBoolean;
+
+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.ActionLayoutData;
+import org.apache.isis.applib.layout.component.CollectionLayoutData;
+import org.apache.isis.applib.layout.component.DomainObjectLayoutData;
+import org.apache.isis.applib.layout.component.PropertyLayoutData;
+
+/**
+ * Represents a tab within a {@link BS3TabGroup tab group}.
+ *
+ * <p>
+ *     They simply contain one or more {@link BS3Row row}s.
+ * </p>
+ */
+@XmlType(
+        name = "tab"
+        , propOrder = {
+            "name",
+            "rows"
+        }
+)
+public class BS3Tab extends BS3ElementAbstract implements BS3RowOwner {
+
+    private static final long serialVersionUID = 1L;
+
+    private String name;
+    @XmlAttribute(required = true)
+    public String getName() {
+        return name;
+    }
+
+    public void setName(final String name) {
+        this.name = name;
+    }
+
+
+    private List<BS3Row> rows = Lists.newArrayList();
+
+    // no wrapper
+    @XmlElement(name = "row", required = true)
+    public List<BS3Row> getRows() {
+        return rows;
+    }
+
+    public void setRows(final List<BS3Row> rows) {
+        this.rows = rows;
+    }
+
+
+
+    private BS3TabOwner owner;
+
+    /**
+     * Owner.
+     *
+     * <p>
+     *     Set programmatically by framework after reading in from XML.
+     * </p>
+     */
+    @XmlTransient
+    public BS3TabOwner getOwner() {
+        return owner;
+    }
+
+    public void setOwner(final BS3TabOwner owner) {
+        this.owner = owner;
+    }
+
+
+    public static class Predicates {
+        public static Predicate<BS3Tab> notEmpty() {
+            final AtomicBoolean visitingTheNode = new AtomicBoolean(false);
+            final AtomicBoolean foundContent = new AtomicBoolean(false);
+
+            return new Predicate<BS3Tab>() {
+                @Override
+                public boolean apply(final BS3Tab thisBs3Tab) {
+                    final BS3Grid owningGrid = thisBs3Tab.getGrid();
+                    owningGrid.visit(new BS3Grid.VisitorAdapter() {
+
+                        /**
+                         * if found the tab, then reset 'foundContent' to false, and then use 'visitingTheNode' as
+                         * a marker to indicate that the visitor is now being passed to the nodes underneath the tab.
+                         * In those children, if visited (with the 'visitingTheNode' flag enabled), then simply set the
+                         * 'foundContent' flag.
+                         */
+                        @Override
+                        public void preVisit(final BS3Tab bs3Tab) {
+                            if(bs3Tab == thisBs3Tab) {
+                                foundContent.set(false);
+                                visitingTheNode.set(true);
+                            }
+                        }
+
+                        @Override public void postVisit(final BS3Tab bs3Tab) {
+                            if(bs3Tab == thisBs3Tab) {
+                                visitingTheNode.set(false);
+                            }
+                        }
+
+                        @Override
+                        public void visit(final DomainObjectLayoutData domainObjectLayoutData) {
+                            if(visitingTheNode.get()) {
+                                foundContent.set(true);
+                            }
+                        }
+
+                        @Override
+                        public void visit(final ActionLayoutData actionLayoutData) {
+                            if(visitingTheNode.get()) {
+                                foundContent.set(true);
+                            }
+                        }
+
+                        @Override
+                        public void visit(final PropertyLayoutData propertyLayoutData) {
+                            if(visitingTheNode.get()) {
+                                foundContent.set(true);
+                            }
+                        }
+
+                        @Override
+                        public void visit(final CollectionLayoutData collectionLayoutData) {
+                            if(visitingTheNode.get()) {
+                                foundContent.set(true);
+                            }
+                        }
+                    });
+                    return foundContent.get();
+                }
+            };
+        }
+    }
+
+    @Override
+    @XmlTransient
+    @Programmatic
+    public BS3Grid getGrid() {
+        return getOwner().getGrid();
+    }
+
+    @Override public String toString() {
+        return "BS3Tab{" +
+                "name='" + name + '\'' +
+                '}';
+    }
+}

http://git-wip-us.apache.org/repos/asf/isis/blob/67b6e05e/core/applib/src/main/java/org/apache/isis/applib/layout/grid/bootstrap3/BS3TabGroup.java
----------------------------------------------------------------------
diff --git a/core/applib/src/main/java/org/apache/isis/applib/layout/grid/bootstrap3/BS3TabGroup.java b/core/applib/src/main/java/org/apache/isis/applib/layout/grid/bootstrap3/BS3TabGroup.java
new file mode 100644
index 0000000..06e75a7
--- /dev/null
+++ b/core/applib/src/main/java/org/apache/isis/applib/layout/grid/bootstrap3/BS3TabGroup.java
@@ -0,0 +1,123 @@
+/*
+ *  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.applib.layout.grid.bootstrap3;
+
+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.collect.Lists;
+
+import org.apache.isis.applib.annotation.Programmatic;
+
+/**
+ * Represents a tab group containing one or more {@link BS3Tab tab}s.
+ */
+@XmlType(
+        name = "tabGroup"
+        , propOrder = {
+            "tabs",
+            "metadataError"
+        }
+)
+public class BS3TabGroup extends BS3ElementAbstract implements BS3TabOwner {
+
+    private static final long serialVersionUID = 1L;
+
+
+
+    private Boolean unreferencedCollections;
+    /**
+     * Whether this tab group should be used to hold any unreferenced collections (contributed or &quot;native&quot;).
+     *
+     * <p>
+     *     Any layout must have precisely one tab group or {@link BS3Col col} that has this attribute set.
+     * </p>
+     */
+    @XmlAttribute(required = false)
+    public Boolean isUnreferencedCollections() {
+        return unreferencedCollections;
+    }
+
+    public void setUnreferencedCollections(final Boolean unreferencedCollections) {
+        this.unreferencedCollections = unreferencedCollections;
+    }
+
+
+
+
+    private List<BS3Tab> tabs = Lists.newArrayList();
+
+    // no wrapper; required=false because may be auto-generated
+    @XmlElement(name = "tab", required = false)
+    public List<BS3Tab> getTabs() {
+        return tabs;
+    }
+
+    public void setTabs(final List<BS3Tab> tabs) {
+        this.tabs = tabs;
+    }
+
+
+    private BS3TabGroupOwner owner;
+
+    /**
+     * Owner.
+     *
+     * <p>
+     *     Set programmatically by framework after reading in from XML.
+     * </p>
+     */
+    @XmlTransient
+    public BS3TabGroupOwner getOwner() {
+        return owner;
+    }
+
+    public void setOwner(final BS3TabGroupOwner owner) {
+        this.owner = owner;
+    }
+
+
+
+    private String metadataError;
+
+    /**
+     * For diagnostics; populated by the framework if and only if a metadata error.
+     */
+    @XmlElement(required = false)
+    public String getMetadataError() {
+        return metadataError;
+    }
+
+    public void setMetadataError(final String metadataError) {
+        this.metadataError = metadataError;
+    }
+
+    @Override
+    @XmlTransient
+    @Programmatic
+    public BS3Grid getGrid() {
+        return getOwner().getGrid();
+    }
+
+}
+

http://git-wip-us.apache.org/repos/asf/isis/blob/67b6e05e/core/applib/src/main/java/org/apache/isis/applib/layout/grid/bootstrap3/BS3TabGroupOwner.java
----------------------------------------------------------------------
diff --git a/core/applib/src/main/java/org/apache/isis/applib/layout/grid/bootstrap3/BS3TabGroupOwner.java b/core/applib/src/main/java/org/apache/isis/applib/layout/grid/bootstrap3/BS3TabGroupOwner.java
new file mode 100644
index 0000000..280058f
--- /dev/null
+++ b/core/applib/src/main/java/org/apache/isis/applib/layout/grid/bootstrap3/BS3TabGroupOwner.java
@@ -0,0 +1,28 @@
+/*
+ *  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.applib.layout.grid.bootstrap3;
+
+import java.util.List;
+
+import org.apache.isis.applib.layout.component.Owner;
+
+public interface BS3TabGroupOwner extends Owner, WithinGrid {
+
+    List<BS3TabGroup> getTabGroups();
+}

http://git-wip-us.apache.org/repos/asf/isis/blob/67b6e05e/core/applib/src/main/java/org/apache/isis/applib/layout/grid/bootstrap3/BS3TabOwner.java
----------------------------------------------------------------------
diff --git a/core/applib/src/main/java/org/apache/isis/applib/layout/grid/bootstrap3/BS3TabOwner.java b/core/applib/src/main/java/org/apache/isis/applib/layout/grid/bootstrap3/BS3TabOwner.java
new file mode 100644
index 0000000..2a3620d
--- /dev/null
+++ b/core/applib/src/main/java/org/apache/isis/applib/layout/grid/bootstrap3/BS3TabOwner.java
@@ -0,0 +1,28 @@
+/*
+ *  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.applib.layout.grid.bootstrap3;
+
+import java.util.List;
+
+import org.apache.isis.applib.layout.component.Owner;
+
+public interface BS3TabOwner extends Owner, WithinGrid {
+
+    List<BS3Tab> getTabs();
+}

http://git-wip-us.apache.org/repos/asf/isis/blob/67b6e05e/core/applib/src/main/java/org/apache/isis/applib/layout/grid/bootstrap3/HasCssId.java
----------------------------------------------------------------------
diff --git a/core/applib/src/main/java/org/apache/isis/applib/layout/grid/bootstrap3/HasCssId.java b/core/applib/src/main/java/org/apache/isis/applib/layout/grid/bootstrap3/HasCssId.java
new file mode 100644
index 0000000..9b774da
--- /dev/null
+++ b/core/applib/src/main/java/org/apache/isis/applib/layout/grid/bootstrap3/HasCssId.java
@@ -0,0 +1,28 @@
+/*
+ *  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.applib.layout.grid.bootstrap3;
+
+public interface HasCssId {
+
+    /**
+     * As per &lt;div id=&quot;...&quot;&gt;...&lt;/div&gt; : must be unique across entire page.
+     */
+    String getId();
+
+}

http://git-wip-us.apache.org/repos/asf/isis/blob/67b6e05e/core/applib/src/main/java/org/apache/isis/applib/layout/grid/bootstrap3/WithinGrid.java
----------------------------------------------------------------------
diff --git a/core/applib/src/main/java/org/apache/isis/applib/layout/grid/bootstrap3/WithinGrid.java b/core/applib/src/main/java/org/apache/isis/applib/layout/grid/bootstrap3/WithinGrid.java
new file mode 100644
index 0000000..2f45a1f
--- /dev/null
+++ b/core/applib/src/main/java/org/apache/isis/applib/layout/grid/bootstrap3/WithinGrid.java
@@ -0,0 +1,27 @@
+/*
+ *  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.applib.layout.grid.bootstrap3;
+
+import org.apache.isis.applib.annotation.Programmatic;
+
+public interface WithinGrid {
+
+    @Programmatic
+    BS3Grid getGrid();
+}

http://git-wip-us.apache.org/repos/asf/isis/blob/67b6e05e/core/applib/src/main/java/org/apache/isis/applib/layout/grid/bootstrap3/package-info.java
----------------------------------------------------------------------
diff --git a/core/applib/src/main/java/org/apache/isis/applib/layout/grid/bootstrap3/package-info.java b/core/applib/src/main/java/org/apache/isis/applib/layout/grid/bootstrap3/package-info.java
new file mode 100644
index 0000000..3658ae9
--- /dev/null
+++ b/core/applib/src/main/java/org/apache/isis/applib/layout/grid/bootstrap3/package-info.java
@@ -0,0 +1,34 @@
+/*
+ *  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.
+ */
+
+/**
+ * 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 modelled closely after <a href="http://getbootstrap.com/">Bootstrap</a>, and is intended to
+ *     support the grid layouts implemented by that CSS framework.  This flexibility comes at the cost of some
+ *     verbosity.
+ * </p>
+ */
+@javax.xml.bind.annotation.XmlSchema(
+        namespace = "http://isis.apache.org/applib/layout/grid/bootstrap3",
+        elementFormDefault = javax.xml.bind.annotation.XmlNsForm.QUALIFIED
+)
+package org.apache.isis.applib.layout.grid.bootstrap3;
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/isis/blob/67b6e05e/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 ced93eb..a967d95 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
@@ -17,7 +17,7 @@
 package org.apache.isis.applib.services.layout;
 
 import org.apache.isis.applib.annotation.Programmatic;
-import org.apache.isis.applib.layout.common.Grid;
+import org.apache.isis.applib.layout.component.Grid;
 
 /**
  * Provides implementation of {@link Grid}.

http://git-wip-us.apache.org/repos/asf/isis/blob/67b6e05e/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 8a671a1..1606046 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
@@ -21,7 +21,7 @@ import java.util.List;
 import org.apache.isis.applib.annotation.MemberGroupLayout;
 import org.apache.isis.applib.annotation.MemberOrder;
 import org.apache.isis.applib.annotation.Programmatic;
-import org.apache.isis.applib.layout.common.Grid;
+import org.apache.isis.applib.layout.component.Grid;
 
 public interface GridService {
 

http://git-wip-us.apache.org/repos/asf/isis/blob/67b6e05e/core/applib/src/main/java/org/apache/isis/applib/services/layout/Object_downloadLayoutXml.java
----------------------------------------------------------------------
diff --git a/core/applib/src/main/java/org/apache/isis/applib/services/layout/Object_downloadLayoutXml.java b/core/applib/src/main/java/org/apache/isis/applib/services/layout/Object_downloadLayoutXml.java
index d3a5128..3679e0a 100644
--- a/core/applib/src/main/java/org/apache/isis/applib/services/layout/Object_downloadLayoutXml.java
+++ b/core/applib/src/main/java/org/apache/isis/applib/services/layout/Object_downloadLayoutXml.java
@@ -28,7 +28,7 @@ import org.apache.isis.applib.annotation.Mixin;
 import org.apache.isis.applib.annotation.ParameterLayout;
 import org.apache.isis.applib.annotation.RestrictTo;
 import org.apache.isis.applib.annotation.SemanticsOf;
-import org.apache.isis.applib.layout.common.Grid;
+import org.apache.isis.applib.layout.component.Grid;
 import org.apache.isis.applib.services.jaxb.JaxbService;
 import org.apache.isis.applib.value.Clob;
 

http://git-wip-us.apache.org/repos/asf/isis/blob/67b6e05e/core/applib/src/main/java/org/apache/isis/applib/services/layout/Object_viewLayout.java
----------------------------------------------------------------------
diff --git a/core/applib/src/main/java/org/apache/isis/applib/services/layout/Object_viewLayout.java b/core/applib/src/main/java/org/apache/isis/applib/services/layout/Object_viewLayout.java
index 6d2e3a7..249b95a 100644
--- a/core/applib/src/main/java/org/apache/isis/applib/services/layout/Object_viewLayout.java
+++ b/core/applib/src/main/java/org/apache/isis/applib/services/layout/Object_viewLayout.java
@@ -25,7 +25,7 @@ import org.apache.isis.applib.annotation.Mixin;
 import org.apache.isis.applib.annotation.Programmatic;
 import org.apache.isis.applib.annotation.RestrictTo;
 import org.apache.isis.applib.annotation.SemanticsOf;
-import org.apache.isis.applib.layout.common.Grid;
+import org.apache.isis.applib.layout.component.Grid;
 
 @Mixin
 public class Object_viewLayout {

http://git-wip-us.apache.org/repos/asf/isis/blob/67b6e05e/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/actions/layout/ActionPositionFacetForActionXml.java
----------------------------------------------------------------------
diff --git a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/actions/layout/ActionPositionFacetForActionXml.java b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/actions/layout/ActionPositionFacetForActionXml.java
index 0997821..be7cdda 100644
--- a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/actions/layout/ActionPositionFacetForActionXml.java
+++ b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/actions/layout/ActionPositionFacetForActionXml.java
@@ -19,7 +19,7 @@
 
 package org.apache.isis.core.metamodel.facets.actions.layout;
 
-import org.apache.isis.applib.layout.common.ActionLayoutData;
+import org.apache.isis.applib.layout.component.ActionLayoutData;
 import org.apache.isis.core.metamodel.facetapi.FacetHolder;
 import org.apache.isis.core.metamodel.facets.actions.position.ActionPositionFacet;
 import org.apache.isis.core.metamodel.facets.actions.position.ActionPositionFacetAbstract;

http://git-wip-us.apache.org/repos/asf/isis/blob/67b6e05e/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/actions/layout/BookmarkPolicyFacetForActionXml.java
----------------------------------------------------------------------
diff --git a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/actions/layout/BookmarkPolicyFacetForActionXml.java b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/actions/layout/BookmarkPolicyFacetForActionXml.java
index 73ddb4b..3e7e5e0 100644
--- a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/actions/layout/BookmarkPolicyFacetForActionXml.java
+++ b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/actions/layout/BookmarkPolicyFacetForActionXml.java
@@ -20,7 +20,7 @@
 package org.apache.isis.core.metamodel.facets.actions.layout;
 
 import org.apache.isis.applib.annotation.BookmarkPolicy;
-import org.apache.isis.applib.layout.common.ActionLayoutData;
+import org.apache.isis.applib.layout.component.ActionLayoutData;
 import org.apache.isis.core.metamodel.facetapi.FacetHolder;
 import org.apache.isis.core.metamodel.facets.object.bookmarkpolicy.BookmarkPolicyFacet;
 import org.apache.isis.core.metamodel.facets.object.bookmarkpolicy.BookmarkPolicyFacetAbstract;

http://git-wip-us.apache.org/repos/asf/isis/blob/67b6e05e/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/actions/layout/CssClassFaFacetForActionXml.java
----------------------------------------------------------------------
diff --git a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/actions/layout/CssClassFaFacetForActionXml.java b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/actions/layout/CssClassFaFacetForActionXml.java
index 3435bf3..acef43b 100644
--- a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/actions/layout/CssClassFaFacetForActionXml.java
+++ b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/actions/layout/CssClassFaFacetForActionXml.java
@@ -21,7 +21,7 @@ package org.apache.isis.core.metamodel.facets.actions.layout;
 
 import com.google.common.base.Strings;
 
-import org.apache.isis.applib.layout.common.ActionLayoutData;
+import org.apache.isis.applib.layout.component.ActionLayoutData;
 import org.apache.isis.core.metamodel.facetapi.FacetHolder;
 import org.apache.isis.core.metamodel.facets.members.cssclassfa.CssClassFaFacet;
 import org.apache.isis.core.metamodel.facets.members.cssclassfa.CssClassFaFacetAbstract;

http://git-wip-us.apache.org/repos/asf/isis/blob/67b6e05e/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/actions/layout/CssClassFacetForActionXml.java
----------------------------------------------------------------------
diff --git a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/actions/layout/CssClassFacetForActionXml.java b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/actions/layout/CssClassFacetForActionXml.java
index b26feb5..d6131b6 100644
--- a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/actions/layout/CssClassFacetForActionXml.java
+++ b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/actions/layout/CssClassFacetForActionXml.java
@@ -21,7 +21,7 @@ package org.apache.isis.core.metamodel.facets.actions.layout;
 
 import com.google.common.base.Strings;
 
-import org.apache.isis.applib.layout.common.ActionLayoutData;
+import org.apache.isis.applib.layout.component.ActionLayoutData;
 import org.apache.isis.core.metamodel.facetapi.FacetHolder;
 import org.apache.isis.core.metamodel.facets.members.cssclass.CssClassFacet;
 import org.apache.isis.core.metamodel.facets.members.cssclass.CssClassFacetAbstract;

http://git-wip-us.apache.org/repos/asf/isis/blob/67b6e05e/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/actions/layout/DescribedAsFacetForActionXml.java
----------------------------------------------------------------------
diff --git a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/actions/layout/DescribedAsFacetForActionXml.java b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/actions/layout/DescribedAsFacetForActionXml.java
index 644dd1d..39409ac 100644
--- a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/actions/layout/DescribedAsFacetForActionXml.java
+++ b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/actions/layout/DescribedAsFacetForActionXml.java
@@ -21,7 +21,7 @@ package org.apache.isis.core.metamodel.facets.actions.layout;
 
 import com.google.common.base.Strings;
 
-import org.apache.isis.applib.layout.common.ActionLayoutData;
+import org.apache.isis.applib.layout.component.ActionLayoutData;
 import org.apache.isis.core.metamodel.facetapi.FacetHolder;
 import org.apache.isis.core.metamodel.facets.all.describedas.DescribedAsFacet;
 import org.apache.isis.core.metamodel.facets.all.describedas.DescribedAsFacetAbstract;

http://git-wip-us.apache.org/repos/asf/isis/blob/67b6e05e/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/actions/layout/HiddenFacetForActionLayoutXml.java
----------------------------------------------------------------------
diff --git a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/actions/layout/HiddenFacetForActionLayoutXml.java b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/actions/layout/HiddenFacetForActionLayoutXml.java
index e2b66f1..b4114fb 100644
--- a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/actions/layout/HiddenFacetForActionLayoutXml.java
+++ b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/actions/layout/HiddenFacetForActionLayoutXml.java
@@ -21,7 +21,7 @@ package org.apache.isis.core.metamodel.facets.actions.layout;
 
 import org.apache.isis.applib.annotation.When;
 import org.apache.isis.applib.annotation.Where;
-import org.apache.isis.applib.layout.common.ActionLayoutData;
+import org.apache.isis.applib.layout.component.ActionLayoutData;
 import org.apache.isis.core.metamodel.adapter.ObjectAdapter;
 import org.apache.isis.core.metamodel.facetapi.FacetHolder;
 import org.apache.isis.core.metamodel.facets.all.hide.HiddenFacet;

http://git-wip-us.apache.org/repos/asf/isis/blob/67b6e05e/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/actions/layout/NamedFacetForActionXml.java
----------------------------------------------------------------------
diff --git a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/actions/layout/NamedFacetForActionXml.java b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/actions/layout/NamedFacetForActionXml.java
index 96ad7d6..ff785dc 100644
--- a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/actions/layout/NamedFacetForActionXml.java
+++ b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/actions/layout/NamedFacetForActionXml.java
@@ -21,7 +21,7 @@ package org.apache.isis.core.metamodel.facets.actions.layout;
 
 import com.google.common.base.Strings;
 
-import org.apache.isis.applib.layout.common.ActionLayoutData;
+import org.apache.isis.applib.layout.component.ActionLayoutData;
 import org.apache.isis.core.metamodel.facetapi.FacetHolder;
 import org.apache.isis.core.metamodel.facets.all.named.NamedFacet;
 import org.apache.isis.core.metamodel.facets.all.named.NamedFacetAbstract;

http://git-wip-us.apache.org/repos/asf/isis/blob/67b6e05e/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/collections/layout/CssClassFacetForCollectionXml.java
----------------------------------------------------------------------
diff --git a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/collections/layout/CssClassFacetForCollectionXml.java b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/collections/layout/CssClassFacetForCollectionXml.java
index ed258d7..2840cc0 100644
--- a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/collections/layout/CssClassFacetForCollectionXml.java
+++ b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/collections/layout/CssClassFacetForCollectionXml.java
@@ -21,7 +21,7 @@ package org.apache.isis.core.metamodel.facets.collections.layout;
 
 import com.google.common.base.Strings;
 
-import org.apache.isis.applib.layout.common.CollectionLayoutData;
+import org.apache.isis.applib.layout.component.CollectionLayoutData;
 import org.apache.isis.core.metamodel.facetapi.FacetHolder;
 import org.apache.isis.core.metamodel.facets.members.cssclass.CssClassFacet;
 import org.apache.isis.core.metamodel.facets.members.cssclass.CssClassFacetAbstract;

http://git-wip-us.apache.org/repos/asf/isis/blob/67b6e05e/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/collections/layout/DefaultViewFacetForCollectionXml.java
----------------------------------------------------------------------
diff --git a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/collections/layout/DefaultViewFacetForCollectionXml.java b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/collections/layout/DefaultViewFacetForCollectionXml.java
index 9fce33d..3141f64 100644
--- a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/collections/layout/DefaultViewFacetForCollectionXml.java
+++ b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/collections/layout/DefaultViewFacetForCollectionXml.java
@@ -21,7 +21,7 @@ package org.apache.isis.core.metamodel.facets.collections.layout;
 
 import com.google.common.base.Strings;
 
-import org.apache.isis.applib.layout.common.CollectionLayoutData;
+import org.apache.isis.applib.layout.component.CollectionLayoutData;
 import org.apache.isis.core.metamodel.facetapi.FacetHolder;
 import org.apache.isis.core.metamodel.facets.collections.collection.defaultview.DefaultViewFacet;
 import org.apache.isis.core.metamodel.facets.collections.collection.defaultview.DefaultViewFacetAbstract;

http://git-wip-us.apache.org/repos/asf/isis/blob/67b6e05e/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/collections/layout/DescribedAsFacetForCollectionXml.java
----------------------------------------------------------------------
diff --git a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/collections/layout/DescribedAsFacetForCollectionXml.java b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/collections/layout/DescribedAsFacetForCollectionXml.java
index 818419b..fcaa63f 100644
--- a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/collections/layout/DescribedAsFacetForCollectionXml.java
+++ b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/collections/layout/DescribedAsFacetForCollectionXml.java
@@ -21,7 +21,7 @@ package org.apache.isis.core.metamodel.facets.collections.layout;
 
 import com.google.common.base.Strings;
 
-import org.apache.isis.applib.layout.common.CollectionLayoutData;
+import org.apache.isis.applib.layout.component.CollectionLayoutData;
 import org.apache.isis.core.metamodel.facetapi.FacetHolder;
 import org.apache.isis.core.metamodel.facets.all.describedas.DescribedAsFacet;
 import org.apache.isis.core.metamodel.facets.all.describedas.DescribedAsFacetAbstract;

http://git-wip-us.apache.org/repos/asf/isis/blob/67b6e05e/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/collections/layout/HiddenFacetForCollectionXml.java
----------------------------------------------------------------------
diff --git a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/collections/layout/HiddenFacetForCollectionXml.java b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/collections/layout/HiddenFacetForCollectionXml.java
index 3ef846b..a8466e4 100644
--- a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/collections/layout/HiddenFacetForCollectionXml.java
+++ b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/collections/layout/HiddenFacetForCollectionXml.java
@@ -21,7 +21,7 @@ package org.apache.isis.core.metamodel.facets.collections.layout;
 
 import org.apache.isis.applib.annotation.When;
 import org.apache.isis.applib.annotation.Where;
-import org.apache.isis.applib.layout.common.CollectionLayoutData;
+import org.apache.isis.applib.layout.component.CollectionLayoutData;
 import org.apache.isis.core.metamodel.adapter.ObjectAdapter;
 import org.apache.isis.core.metamodel.facetapi.FacetHolder;
 import org.apache.isis.core.metamodel.facets.all.hide.HiddenFacet;

http://git-wip-us.apache.org/repos/asf/isis/blob/67b6e05e/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/collections/layout/NamedFacetForCollectionXml.java
----------------------------------------------------------------------
diff --git a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/collections/layout/NamedFacetForCollectionXml.java b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/collections/layout/NamedFacetForCollectionXml.java
index 8283f4e..11d10d0 100644
--- a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/collections/layout/NamedFacetForCollectionXml.java
+++ b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/collections/layout/NamedFacetForCollectionXml.java
@@ -21,7 +21,7 @@ package org.apache.isis.core.metamodel.facets.collections.layout;
 
 import com.google.common.base.Strings;
 
-import org.apache.isis.applib.layout.common.CollectionLayoutData;
+import org.apache.isis.applib.layout.component.CollectionLayoutData;
 import org.apache.isis.core.metamodel.facetapi.FacetHolder;
 import org.apache.isis.core.metamodel.facets.all.named.NamedFacet;
 import org.apache.isis.core.metamodel.facets.all.named.NamedFacetAbstract;

http://git-wip-us.apache.org/repos/asf/isis/blob/67b6e05e/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/collections/layout/PagedFacetForCollectionXml.java
----------------------------------------------------------------------
diff --git a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/collections/layout/PagedFacetForCollectionXml.java b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/collections/layout/PagedFacetForCollectionXml.java
index 78932b9..1ee6a7a 100644
--- a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/collections/layout/PagedFacetForCollectionXml.java
+++ b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/collections/layout/PagedFacetForCollectionXml.java
@@ -19,7 +19,7 @@
 
 package org.apache.isis.core.metamodel.facets.collections.layout;
 
-import org.apache.isis.applib.layout.common.CollectionLayoutData;
+import org.apache.isis.applib.layout.component.CollectionLayoutData;
 import org.apache.isis.core.metamodel.facetapi.FacetHolder;
 import org.apache.isis.core.metamodel.facets.object.paged.PagedFacet;
 import org.apache.isis.core.metamodel.facets.object.paged.PagedFacetAbstract;

http://git-wip-us.apache.org/repos/asf/isis/blob/67b6e05e/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/collections/layout/SortedByFacetForCollectionXml.java
----------------------------------------------------------------------
diff --git a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/collections/layout/SortedByFacetForCollectionXml.java b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/collections/layout/SortedByFacetForCollectionXml.java
index 9f5da94..b030736 100644
--- a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/collections/layout/SortedByFacetForCollectionXml.java
+++ b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/collections/layout/SortedByFacetForCollectionXml.java
@@ -21,7 +21,7 @@ package org.apache.isis.core.metamodel.facets.collections.layout;
 
 import java.util.Comparator;
 
-import org.apache.isis.applib.layout.common.CollectionLayoutData;
+import org.apache.isis.applib.layout.component.CollectionLayoutData;
 import org.apache.isis.core.commons.lang.ClassUtil;
 import org.apache.isis.core.metamodel.facetapi.FacetHolder;
 import org.apache.isis.core.metamodel.facets.collections.sortedby.SortedByFacet;

http://git-wip-us.apache.org/repos/asf/isis/blob/67b6e05e/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/object/grid/GridFacet.java
----------------------------------------------------------------------
diff --git a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/object/grid/GridFacet.java b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/object/grid/GridFacet.java
index c3b0dae..75dbda9 100644
--- a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/object/grid/GridFacet.java
+++ b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/object/grid/GridFacet.java
@@ -19,7 +19,7 @@
 package org.apache.isis.core.metamodel.facets.object.grid;
 
 
-import org.apache.isis.applib.layout.common.Grid;
+import org.apache.isis.applib.layout.component.Grid;
 import org.apache.isis.core.metamodel.facetapi.Facet;
 
 /**

http://git-wip-us.apache.org/repos/asf/isis/blob/67b6e05e/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 fc9ee46..69ada55 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
@@ -21,7 +21,7 @@ package org.apache.isis.core.metamodel.facets.object.grid;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-import org.apache.isis.applib.layout.common.Grid;
+import org.apache.isis.applib.layout.component.Grid;
 import org.apache.isis.applib.services.layout.GridService;
 import org.apache.isis.core.metamodel.deployment.DeploymentCategory;
 import org.apache.isis.core.metamodel.facetapi.Facet;

http://git-wip-us.apache.org/repos/asf/isis/blob/67b6e05e/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/properties/propertylayout/CssClassFacetForPropertyXml.java
----------------------------------------------------------------------
diff --git a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/properties/propertylayout/CssClassFacetForPropertyXml.java b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/properties/propertylayout/CssClassFacetForPropertyXml.java
index 41e03e9..d072f2a 100644
--- a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/properties/propertylayout/CssClassFacetForPropertyXml.java
+++ b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/properties/propertylayout/CssClassFacetForPropertyXml.java
@@ -21,7 +21,7 @@ package org.apache.isis.core.metamodel.facets.properties.propertylayout;
 
 import com.google.common.base.Strings;
 
-import org.apache.isis.applib.layout.common.PropertyLayoutData;
+import org.apache.isis.applib.layout.component.PropertyLayoutData;
 import org.apache.isis.core.metamodel.facetapi.FacetHolder;
 import org.apache.isis.core.metamodel.facets.members.cssclass.CssClassFacet;
 import org.apache.isis.core.metamodel.facets.members.cssclass.CssClassFacetAbstract;

http://git-wip-us.apache.org/repos/asf/isis/blob/67b6e05e/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/properties/propertylayout/DescribedAsFacetForPropertyXml.java
----------------------------------------------------------------------
diff --git a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/properties/propertylayout/DescribedAsFacetForPropertyXml.java b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/properties/propertylayout/DescribedAsFacetForPropertyXml.java
index f1bac93..a99c98d 100644
--- a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/properties/propertylayout/DescribedAsFacetForPropertyXml.java
+++ b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/properties/propertylayout/DescribedAsFacetForPropertyXml.java
@@ -21,7 +21,7 @@ package org.apache.isis.core.metamodel.facets.properties.propertylayout;
 
 import com.google.common.base.Strings;
 
-import org.apache.isis.applib.layout.common.PropertyLayoutData;
+import org.apache.isis.applib.layout.component.PropertyLayoutData;
 import org.apache.isis.core.metamodel.facetapi.FacetHolder;
 import org.apache.isis.core.metamodel.facets.all.describedas.DescribedAsFacet;
 import org.apache.isis.core.metamodel.facets.all.describedas.DescribedAsFacetAbstract;

http://git-wip-us.apache.org/repos/asf/isis/blob/67b6e05e/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/properties/propertylayout/HiddenFacetForPropertyXml.java
----------------------------------------------------------------------
diff --git a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/properties/propertylayout/HiddenFacetForPropertyXml.java b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/properties/propertylayout/HiddenFacetForPropertyXml.java
index 481f815..8e83321 100644
--- a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/properties/propertylayout/HiddenFacetForPropertyXml.java
+++ b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/properties/propertylayout/HiddenFacetForPropertyXml.java
@@ -21,7 +21,7 @@ package org.apache.isis.core.metamodel.facets.properties.propertylayout;
 
 import org.apache.isis.applib.annotation.When;
 import org.apache.isis.applib.annotation.Where;
-import org.apache.isis.applib.layout.common.PropertyLayoutData;
+import org.apache.isis.applib.layout.component.PropertyLayoutData;
 import org.apache.isis.core.metamodel.adapter.ObjectAdapter;
 import org.apache.isis.core.metamodel.facetapi.FacetHolder;
 import org.apache.isis.core.metamodel.facets.all.hide.HiddenFacet;

http://git-wip-us.apache.org/repos/asf/isis/blob/67b6e05e/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/properties/propertylayout/LabelAtFacetForPropertyXml.java
----------------------------------------------------------------------
diff --git a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/properties/propertylayout/LabelAtFacetForPropertyXml.java b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/properties/propertylayout/LabelAtFacetForPropertyXml.java
index 11fbe7f..494a7eb 100644
--- a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/properties/propertylayout/LabelAtFacetForPropertyXml.java
+++ b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/properties/propertylayout/LabelAtFacetForPropertyXml.java
@@ -20,7 +20,7 @@
 package org.apache.isis.core.metamodel.facets.properties.propertylayout;
 
 import org.apache.isis.applib.annotation.LabelPosition;
-import org.apache.isis.applib.layout.common.PropertyLayoutData;
+import org.apache.isis.applib.layout.component.PropertyLayoutData;
 import org.apache.isis.core.metamodel.facetapi.FacetHolder;
 import org.apache.isis.core.metamodel.facets.objectvalue.labelat.LabelAtFacet;
 import org.apache.isis.core.metamodel.facets.objectvalue.labelat.LabelAtFacetAbstract;

http://git-wip-us.apache.org/repos/asf/isis/blob/67b6e05e/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/properties/propertylayout/MultiLineFacetForPropertyXml.java
----------------------------------------------------------------------
diff --git a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/properties/propertylayout/MultiLineFacetForPropertyXml.java b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/properties/propertylayout/MultiLineFacetForPropertyXml.java
index 1fca4d7..f55facc 100644
--- a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/properties/propertylayout/MultiLineFacetForPropertyXml.java
+++ b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/properties/propertylayout/MultiLineFacetForPropertyXml.java
@@ -19,7 +19,7 @@
 
 package org.apache.isis.core.metamodel.facets.properties.propertylayout;
 
-import org.apache.isis.applib.layout.common.PropertyLayoutData;
+import org.apache.isis.applib.layout.component.PropertyLayoutData;
 import org.apache.isis.core.metamodel.facetapi.FacetHolder;
 import org.apache.isis.core.metamodel.facets.objectvalue.multiline.MultiLineFacet;
 import org.apache.isis.core.metamodel.facets.objectvalue.multiline.MultiLineFacetAbstract;

http://git-wip-us.apache.org/repos/asf/isis/blob/67b6e05e/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/properties/propertylayout/NamedFacetForPropertyXml.java
----------------------------------------------------------------------
diff --git a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/properties/propertylayout/NamedFacetForPropertyXml.java b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/properties/propertylayout/NamedFacetForPropertyXml.java
index d93fe64..f4c45d8 100644
--- a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/properties/propertylayout/NamedFacetForPropertyXml.java
+++ b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/properties/propertylayout/NamedFacetForPropertyXml.java
@@ -21,7 +21,7 @@ package org.apache.isis.core.metamodel.facets.properties.propertylayout;
 
 import com.google.common.base.Strings;
 
-import org.apache.isis.applib.layout.common.PropertyLayoutData;
+import org.apache.isis.applib.layout.component.PropertyLayoutData;
 import org.apache.isis.core.metamodel.facetapi.FacetHolder;
 import org.apache.isis.core.metamodel.facets.all.named.NamedFacet;
 import org.apache.isis.core.metamodel.facets.all.named.NamedFacetAbstract;

http://git-wip-us.apache.org/repos/asf/isis/blob/67b6e05e/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/properties/propertylayout/RenderedAdjustedFacetForPropertyXml.java
----------------------------------------------------------------------
diff --git a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/properties/propertylayout/RenderedAdjustedFacetForPropertyXml.java b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/properties/propertylayout/RenderedAdjustedFacetForPropertyXml.java
index 16ea651..cb4c346 100644
--- a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/properties/propertylayout/RenderedAdjustedFacetForPropertyXml.java
+++ b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/properties/propertylayout/RenderedAdjustedFacetForPropertyXml.java
@@ -19,7 +19,7 @@
 
 package org.apache.isis.core.metamodel.facets.properties.propertylayout;
 
-import org.apache.isis.applib.layout.common.PropertyLayoutData;
+import org.apache.isis.applib.layout.component.PropertyLayoutData;
 import org.apache.isis.core.metamodel.facetapi.FacetHolder;
 import org.apache.isis.core.metamodel.facets.objectvalue.renderedadjusted.RenderedAdjustedFacet;
 import org.apache.isis.core.metamodel.facets.objectvalue.renderedadjusted.RenderedAdjustedFacetAbstract;

http://git-wip-us.apache.org/repos/asf/isis/blob/67b6e05e/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/properties/propertylayout/TypicalLengthFacetForPropertyXml.java
----------------------------------------------------------------------
diff --git a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/properties/propertylayout/TypicalLengthFacetForPropertyXml.java b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/properties/propertylayout/TypicalLengthFacetForPropertyXml.java
index e55d867..8e2fbf3 100644
--- a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/properties/propertylayout/TypicalLengthFacetForPropertyXml.java
+++ b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/properties/propertylayout/TypicalLengthFacetForPropertyXml.java
@@ -19,7 +19,7 @@
 
 package org.apache.isis.core.metamodel.facets.properties.propertylayout;
 
-import org.apache.isis.applib.layout.common.PropertyLayoutData;
+import org.apache.isis.applib.layout.component.PropertyLayoutData;
 import org.apache.isis.core.metamodel.facetapi.FacetHolder;
 import org.apache.isis.core.metamodel.facets.objectvalue.typicallen.TypicalLengthFacet;
 import org.apache.isis.core.metamodel.facets.objectvalue.typicallen.TypicalLengthFacetAbstract;

http://git-wip-us.apache.org/repos/asf/isis/blob/67b6e05e/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 279086c..d8b1742 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
@@ -36,21 +36,21 @@ import org.apache.isis.applib.annotation.BookmarkPolicy;
 import org.apache.isis.applib.annotation.LabelPosition;
 import org.apache.isis.applib.annotation.Programmatic;
 import org.apache.isis.applib.annotation.Where;
-import org.apache.isis.applib.layout.common.ActionLayoutData;
-import org.apache.isis.applib.layout.common.ActionLayoutDataOwner;
-import org.apache.isis.applib.layout.common.CollectionLayoutData;
-import org.apache.isis.applib.layout.common.DomainObjectLayoutData;
-import org.apache.isis.applib.layout.common.DomainObjectLayoutDataOwner;
-import org.apache.isis.applib.layout.common.FieldSet;
-import org.apache.isis.applib.layout.common.Grid;
-import org.apache.isis.applib.layout.common.HasBookmarking;
-import org.apache.isis.applib.layout.common.HasCssClass;
-import org.apache.isis.applib.layout.common.HasCssClassFa;
-import org.apache.isis.applib.layout.common.HasDescribedAs;
-import org.apache.isis.applib.layout.common.HasHidden;
-import org.apache.isis.applib.layout.common.HasNamed;
-import org.apache.isis.applib.layout.common.MemberRegionOwner;
-import org.apache.isis.applib.layout.common.PropertyLayoutData;
+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.DomainObjectLayoutDataOwner;
+import org.apache.isis.applib.layout.component.FieldSet;
+import org.apache.isis.applib.layout.component.Grid;
+import org.apache.isis.applib.layout.component.HasBookmarking;
+import org.apache.isis.applib.layout.component.HasCssClass;
+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;
 import org.apache.isis.applib.services.layout.GridNormalizerService;

http://git-wip-us.apache.org/repos/asf/isis/blob/67b6e05e/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 f99b84d..6da6da7 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
@@ -42,7 +42,7 @@ import org.apache.isis.applib.annotation.DomainService;
 import org.apache.isis.applib.annotation.NatureOfService;
 import org.apache.isis.applib.annotation.Programmatic;
 import org.apache.isis.applib.services.layout.GridNormalizerService;
-import org.apache.isis.applib.layout.common.Grid;
+import org.apache.isis.applib.layout.component.Grid;
 import org.apache.isis.applib.services.jaxb.JaxbService;
 import org.apache.isis.applib.services.layout.GridService;
 import org.apache.isis.core.metamodel.deployment.DeploymentCategory;
@@ -60,8 +60,8 @@ public class GridServiceDefault
 
     private static final Logger LOG = LoggerFactory.getLogger(GridServiceDefault.class);
 
-    public static final String COMMON_TNS = "http://isis.apache.org/schema/applib/layout/common";
-    public static final String COMMON_SCHEMA_LOCATION = "http://isis.apache.org/schema/applib/layout/common/common.xsd";
+    public static final String COMMON_TNS = "http://isis.apache.org/applib/layout/component";
+    public static final String COMMON_SCHEMA_LOCATION = "http://isis.apache.org/applib/layout/component/component.xsd";
 
     // for better logging messages (used only in prototyping mode)
     private final Map<Class<?>, String> badXmlByClass = Maps.newHashMap();

http://git-wip-us.apache.org/repos/asf/isis/blob/67b6e05e/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 c0e0fa9..7523e10 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
@@ -30,17 +30,17 @@ import com.google.common.collect.Maps;
 
 import org.apache.isis.applib.annotation.DomainService;
 import org.apache.isis.applib.annotation.NatureOfService;
-import org.apache.isis.applib.layout.bootstrap3.BS3Col;
-import org.apache.isis.applib.layout.bootstrap3.BS3Grid;
-import org.apache.isis.applib.layout.bootstrap3.BS3Row;
-import org.apache.isis.applib.layout.bootstrap3.BS3RowContent;
-import org.apache.isis.applib.layout.bootstrap3.BS3Tab;
-import org.apache.isis.applib.layout.bootstrap3.BS3TabGroup;
-import org.apache.isis.applib.layout.common.ActionLayoutData;
-import org.apache.isis.applib.layout.common.CollectionLayoutData;
-import org.apache.isis.applib.layout.common.FieldSet;
-import org.apache.isis.applib.layout.common.Grid;
-import org.apache.isis.applib.layout.common.PropertyLayoutData;
+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.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.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.facets.members.order.MemberOrderFacet;
 import org.apache.isis.core.metamodel.services.grid.GridNormalizerServiceAbstract;
 import org.apache.isis.core.metamodel.spec.ObjectSpecification;
@@ -53,8 +53,8 @@ import org.apache.isis.core.metamodel.spec.feature.OneToOneAssociation;
 )
 public class GridNormalizerServiceBS3 extends GridNormalizerServiceAbstract<BS3Grid> {
 
-    public static final String TNS = "http://isis.apache.org/schema/applib/layout/bootstrap3";
-    public static final String SCHEMA_LOCATION = "http://isis.apache.org/schema/applib/layout/bootstrap3/bootstrap3.xsd";
+    public static final String TNS = "http://isis.apache.org/applib/layout/grid/bootstrap3";
+    public static final String SCHEMA_LOCATION = "http://isis.apache.org/applib/layout/grid/bootstrap3/bootstrap3.xsd";
 
     public GridNormalizerServiceBS3() {
         super(BS3Grid.class, TNS, SCHEMA_LOCATION);

http://git-wip-us.apache.org/repos/asf/isis/blob/67b6e05e/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
index d48fddb..bf3b5a2 100644
--- 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
@@ -25,11 +25,11 @@ 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.common.ActionLayoutData;
-import org.apache.isis.applib.layout.common.CollectionLayoutData;
-import org.apache.isis.applib.layout.common.FieldSet;
-import org.apache.isis.applib.layout.common.Grid;
-import org.apache.isis.applib.layout.common.PropertyLayoutData;
+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;

http://git-wip-us.apache.org/repos/asf/isis/blob/67b6e05e/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
index 157428a..f071117 100644
--- 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
@@ -29,12 +29,12 @@ import javax.xml.bind.annotation.XmlType;
 import com.google.common.collect.Lists;
 
 import org.apache.isis.applib.annotation.MemberGroupLayout;
-import org.apache.isis.applib.layout.common.CollectionLayoutData;
-import org.apache.isis.applib.layout.common.CollectionLayoutDataOwner;
-import org.apache.isis.applib.layout.common.FieldSet;
-import org.apache.isis.applib.layout.common.FieldSetOwner;
-import org.apache.isis.applib.layout.common.Owned;
-import org.apache.isis.applib.layout.common.PropertyLayoutData;
+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

http://git-wip-us.apache.org/repos/asf/isis/blob/67b6e05e/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
index 9bc073c..e35621c 100644
--- 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
@@ -18,7 +18,7 @@
  */
 package org.apache.isis.core.metamodel.services.grid.fixedcols.applib;
 
-import org.apache.isis.applib.layout.common.Owner;
+import org.apache.isis.applib.layout.component.Owner;
 
 public interface FCColumnOwner extends Owner {
 

http://git-wip-us.apache.org/repos/asf/isis/blob/67b6e05e/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
index b7625af..851e504 100644
--- 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
@@ -26,14 +26,14 @@ import javax.xml.bind.annotation.XmlElementRef;
 import javax.xml.bind.annotation.XmlRootElement;
 import javax.xml.bind.annotation.XmlType;
 
-import org.apache.isis.applib.layout.common.ActionLayoutData;
-import org.apache.isis.applib.layout.common.ActionLayoutDataOwner;
-import org.apache.isis.applib.layout.common.CollectionLayoutData;
-import org.apache.isis.applib.layout.common.DomainObjectLayoutData;
-import org.apache.isis.applib.layout.common.FieldSet;
-import org.apache.isis.applib.layout.common.Grid;
-import org.apache.isis.applib.layout.common.GridAbstract;
-import org.apache.isis.applib.layout.common.PropertyLayoutData;
+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;
 
 /**

http://git-wip-us.apache.org/repos/asf/isis/blob/67b6e05e/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
index 3ce6df8..1dc41c7 100644
--- 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
@@ -30,10 +30,10 @@ 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.common.CollectionLayoutData;
-import org.apache.isis.applib.layout.common.MemberRegion;
-import org.apache.isis.applib.layout.common.Owned;
-import org.apache.isis.applib.layout.common.FieldSet;
+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"

http://git-wip-us.apache.org/repos/asf/isis/blob/67b6e05e/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
index d27eae8..771db47 100644
--- 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
@@ -29,7 +29,7 @@ import com.google.common.base.Predicate;
 import com.google.common.collect.FluentIterable;
 import com.google.common.collect.Lists;
 
-import org.apache.isis.applib.layout.common.Owned;
+import org.apache.isis.applib.layout.component.Owned;
 
 @XmlType(
         propOrder = {

http://git-wip-us.apache.org/repos/asf/isis/blob/67b6e05e/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
index f6f59d5..165a32b 100644
--- 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
@@ -18,7 +18,7 @@
  */
 package org.apache.isis.core.metamodel.services.grid.fixedcols.applib;
 
-import org.apache.isis.applib.layout.common.Owner;
+import org.apache.isis.applib.layout.component.Owner;
 
 public interface FCTabGroupOwner extends Owner {
 

http://git-wip-us.apache.org/repos/asf/isis/blob/67b6e05e/core/metamodel/src/main/java/org/apache/isis/core/metamodel/services/metamodel/MetadataMenu.java
----------------------------------------------------------------------
diff --git a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/services/metamodel/MetadataMenu.java b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/services/metamodel/MetadataMenu.java
index 73a3fab..e5f469b 100644
--- a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/services/metamodel/MetadataMenu.java
+++ b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/services/metamodel/MetadataMenu.java
@@ -42,7 +42,7 @@ import org.apache.isis.applib.annotation.NatureOfService;
 import org.apache.isis.applib.annotation.Programmatic;
 import org.apache.isis.applib.annotation.RestrictTo;
 import org.apache.isis.applib.annotation.SemanticsOf;
-import org.apache.isis.applib.layout.common.Grid;
+import org.apache.isis.applib.layout.component.Grid;
 import org.apache.isis.applib.services.jaxb.JaxbService;
 import org.apache.isis.applib.services.layout.GridService;
 import org.apache.isis.applib.value.Blob;

http://git-wip-us.apache.org/repos/asf/isis/blob/67b6e05e/core/metamodel/src/test/java/org/apache/isis/core/metamodel/facets/object/layoutxml/GridFacetDefaultTest.java
----------------------------------------------------------------------
diff --git a/core/metamodel/src/test/java/org/apache/isis/core/metamodel/facets/object/layoutxml/GridFacetDefaultTest.java b/core/metamodel/src/test/java/org/apache/isis/core/metamodel/facets/object/layoutxml/GridFacetDefaultTest.java
index aa8b224..50777b1 100644
--- a/core/metamodel/src/test/java/org/apache/isis/core/metamodel/facets/object/layoutxml/GridFacetDefaultTest.java
+++ b/core/metamodel/src/test/java/org/apache/isis/core/metamodel/facets/object/layoutxml/GridFacetDefaultTest.java
@@ -22,7 +22,7 @@ import java.util.concurrent.atomic.AtomicReference;
 
 import org.junit.Test;
 
-import org.apache.isis.applib.layout.common.FieldSet;
+import org.apache.isis.applib.layout.component.FieldSet;
 
 import static org.hamcrest.CoreMatchers.is;
 import static org.hamcrest.CoreMatchers.nullValue;

http://git-wip-us.apache.org/repos/asf/isis/blob/67b6e05e/core/metamodel/src/test/java/org/apache/isis/core/metamodel/services/grid/BS3GridTest.java
----------------------------------------------------------------------
diff --git a/core/metamodel/src/test/java/org/apache/isis/core/metamodel/services/grid/BS3GridTest.java b/core/metamodel/src/test/java/org/apache/isis/core/metamodel/services/grid/BS3GridTest.java
index 7b90b82..8f2f0ba 100644
--- a/core/metamodel/src/test/java/org/apache/isis/core/metamodel/services/grid/BS3GridTest.java
+++ b/core/metamodel/src/test/java/org/apache/isis/core/metamodel/services/grid/BS3GridTest.java
@@ -31,16 +31,16 @@ import org.junit.Before;
 import org.junit.Test;
 
 import org.apache.isis.applib.services.layout.GridNormalizerService;
-import org.apache.isis.applib.layout.bootstrap3.BS3Col;
-import org.apache.isis.applib.layout.bootstrap3.BS3Grid;
-import org.apache.isis.applib.layout.bootstrap3.BS3Row;
-import org.apache.isis.applib.layout.bootstrap3.BS3Tab;
-import org.apache.isis.applib.layout.bootstrap3.BS3TabGroup;
-import org.apache.isis.applib.layout.common.ActionLayoutData;
-import org.apache.isis.applib.layout.common.CollectionLayoutData;
-import org.apache.isis.applib.layout.common.DomainObjectLayoutData;
-import org.apache.isis.applib.layout.common.FieldSet;
-import org.apache.isis.applib.layout.common.PropertyLayoutData;
+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.layout.grid.bootstrap3.BS3Tab;
+import org.apache.isis.applib.layout.grid.bootstrap3.BS3TabGroup;
+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.PropertyLayoutData;
 import org.apache.isis.applib.services.jaxb.JaxbService;
 import org.apache.isis.core.metamodel.services.grid.bootstrap3.GridNormalizerServiceBS3;
 

http://git-wip-us.apache.org/repos/asf/isis/blob/67b6e05e/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
index d3fbd1a..6b67072 100644
--- 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
@@ -31,10 +31,10 @@ import org.junit.Before;
 import org.junit.Test;
 
 import org.apache.isis.applib.services.layout.GridNormalizerService;
-import org.apache.isis.applib.layout.common.ActionLayoutData;
-import org.apache.isis.applib.layout.common.CollectionLayoutData;
-import org.apache.isis.applib.layout.common.FieldSet;
-import org.apache.isis.applib.layout.common.PropertyLayoutData;
+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;
@@ -73,9 +73,10 @@ public class FCGridTest {
         fcPage.setTabGroups(Lists.<FCTabGroup>newArrayList());
         fcPage.getTabGroups().add(new FCTabGroup());
         FCTabGroup tabGroup = fcPage.getTabGroups().get(0);
-        FCTab FCTab = tabGroup.getTabs().get(0);
-        FCTab.setName("Common");
-        FCColumn left = FCTab.getLeft();
+        FCTab fcTab = new FCTab();
+        tabGroup.getTabs().add(fcTab);
+        fcTab.setName("Common");
+        FCColumn left = fcTab.getLeft();
 
         FieldSet leftPropGroup = new FieldSet();
         left.setFieldSets(Lists.<FieldSet>newArrayList());


[34/50] [abbrv] 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/master
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;
                 }
             };
         }


[04/50] [abbrv] isis git commit: ISIS-993: hold the domainClass within the grid.

Posted by da...@apache.org.
ISIS-993: hold the domainClass within the grid.


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

Branch: refs/heads/master
Commit: ecf6d1708be0a409cd8fb5d0257235b3b0de1f5b
Parents: 6053d1a
Author: Dan Haywood <da...@haywood-associates.co.uk>
Authored: Wed Feb 10 10:37:18 2016 +0000
Committer: Dan Haywood <da...@haywood-associates.co.uk>
Committed: Wed Feb 10 10:37:18 2016 +0000

----------------------------------------------------------------------
 .../layout/common/DomainObjectLayoutData.java   | 12 +++++
 .../apache/isis/applib/layout/common/Grid.java  | 20 ++++++--
 .../isis/applib/layout/common/GridAbstract.java | 17 +++++++
 .../layout/common/PropertyLayoutData.java       |  6 +--
 .../applib/services/layout/GridService.java     | 50 +++++++++++++++-----
 .../facets/object/grid/GridFacetDefault.java    |  2 +-
 .../services/grid/GridServiceDefault.java       | 32 +++++--------
 7 files changed, 98 insertions(+), 41 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/isis/blob/ecf6d170/core/applib/src/main/java/org/apache/isis/applib/layout/common/DomainObjectLayoutData.java
----------------------------------------------------------------------
diff --git a/core/applib/src/main/java/org/apache/isis/applib/layout/common/DomainObjectLayoutData.java b/core/applib/src/main/java/org/apache/isis/applib/layout/common/DomainObjectLayoutData.java
index 702a3d6..d15d27b 100644
--- a/core/applib/src/main/java/org/apache/isis/applib/layout/common/DomainObjectLayoutData.java
+++ b/core/applib/src/main/java/org/apache/isis/applib/layout/common/DomainObjectLayoutData.java
@@ -54,11 +54,13 @@ public class DomainObjectLayoutData implements Serializable,
 
     private BookmarkPolicy bookmarking;
 
+    @Override
     @XmlAttribute(required = false)
     public BookmarkPolicy getBookmarking() {
         return bookmarking;
     }
 
+    @Override
     public void setBookmarking(BookmarkPolicy bookmarking) {
         this.bookmarking = bookmarking;
     }
@@ -67,11 +69,13 @@ public class DomainObjectLayoutData implements Serializable,
 
     private String cssClass;
 
+    @Override
     @XmlAttribute(required = false)
     public String getCssClass() {
         return cssClass;
     }
 
+    @Override
     public void setCssClass(String cssClass) {
         this.cssClass = cssClass;
     }
@@ -79,11 +83,13 @@ public class DomainObjectLayoutData implements Serializable,
 
     private String cssClassFa;
 
+    @Override
     @XmlAttribute(required = false)
     public String getCssClassFa() {
         return cssClassFa;
     }
 
+    @Override
     public void setCssClassFa(String cssClassFa) {
         this.cssClassFa = cssClassFa;
     }
@@ -92,11 +98,13 @@ public class DomainObjectLayoutData implements Serializable,
 
     private org.apache.isis.applib.annotation.ActionLayout.CssClassFaPosition cssClassFaPosition;
 
+    @Override
     @XmlAttribute(required = false)
     public org.apache.isis.applib.annotation.ActionLayout.CssClassFaPosition getCssClassFaPosition() {
         return cssClassFaPosition;
     }
 
+    @Override
     public void setCssClassFaPosition(org.apache.isis.applib.annotation.ActionLayout.CssClassFaPosition cssClassFaPosition) {
         this.cssClassFaPosition = cssClassFaPosition;
     }
@@ -104,11 +112,13 @@ public class DomainObjectLayoutData implements Serializable,
 
     private String describedAs;
 
+    @Override
     @XmlElement(required = false)
     public String getDescribedAs() {
         return describedAs;
     }
 
+    @Override
     public void setDescribedAs(String describedAs) {
         this.describedAs = describedAs;
     }
@@ -117,11 +127,13 @@ public class DomainObjectLayoutData implements Serializable,
 
     private String named;
 
+    @Override
     @XmlElement(required = false)
     public String getNamed() {
         return named;
     }
 
+    @Override
     public void setNamed(String named) {
         this.named = named;
     }

http://git-wip-us.apache.org/repos/asf/isis/blob/ecf6d170/core/applib/src/main/java/org/apache/isis/applib/layout/common/Grid.java
----------------------------------------------------------------------
diff --git a/core/applib/src/main/java/org/apache/isis/applib/layout/common/Grid.java b/core/applib/src/main/java/org/apache/isis/applib/layout/common/Grid.java
index 7380a3a..fd7b067 100644
--- a/core/applib/src/main/java/org/apache/isis/applib/layout/common/Grid.java
+++ b/core/applib/src/main/java/org/apache/isis/applib/layout/common/Grid.java
@@ -19,10 +19,8 @@
 package org.apache.isis.applib.layout.common;
 
 import java.util.LinkedHashMap;
-import java.util.List;
 
 import org.apache.isis.applib.annotation.Programmatic;
-import org.apache.isis.applib.layout.bootstrap3.BS3Col;
 import org.apache.isis.applib.services.layout.GridService;
 
 /**
@@ -34,15 +32,26 @@ import org.apache.isis.applib.services.layout.GridService;
  */
 public interface Grid {
 
+    @Programmatic
+    Class<?> getDomainClass();
+
+    @Programmatic
+    void setDomainClass(final Class<?> domainClass);
+
+    @Programmatic
     boolean isNormalized();
 
+    @Programmatic
     void setNormalized(final boolean normalized);
 
-    @Programmatic LinkedHashMap<String, PropertyLayoutData> getAllPropertiesById();
+    @Programmatic
+    LinkedHashMap<String, PropertyLayoutData> getAllPropertiesById();
 
-    @Programmatic LinkedHashMap<String, CollectionLayoutData> getAllCollectionsById();
+    @Programmatic
+    LinkedHashMap<String, CollectionLayoutData> getAllCollectionsById();
 
-    @Programmatic LinkedHashMap<String, ActionLayoutData> getAllActionsById();
+    @Programmatic
+    LinkedHashMap<String, ActionLayoutData> getAllActionsById();
 
     interface Visitor {
         void visit(final DomainObjectLayoutData domainObjectLayoutData);
@@ -69,6 +78,7 @@ public interface Grid {
         }
     }
 
+    @Programmatic
     void visit(final Grid.Visitor visitor);
 
 }

http://git-wip-us.apache.org/repos/asf/isis/blob/ecf6d170/core/applib/src/main/java/org/apache/isis/applib/layout/common/GridAbstract.java
----------------------------------------------------------------------
diff --git a/core/applib/src/main/java/org/apache/isis/applib/layout/common/GridAbstract.java b/core/applib/src/main/java/org/apache/isis/applib/layout/common/GridAbstract.java
index 2efb85c..d320dff 100644
--- a/core/applib/src/main/java/org/apache/isis/applib/layout/common/GridAbstract.java
+++ b/core/applib/src/main/java/org/apache/isis/applib/layout/common/GridAbstract.java
@@ -39,6 +39,23 @@ import org.apache.isis.applib.services.layout.GridService;
 @XmlTransient // ignore this class
 public abstract class GridAbstract implements Grid {
 
+
+    private Class<?> domainClass;
+
+    @Programmatic
+    @XmlTransient
+    public Class<?> getDomainClass() {
+        return domainClass;
+    }
+
+    @Programmatic
+    @XmlTransient
+    public void setDomainClass(final Class<?> domainClass) {
+        this.domainClass = domainClass;
+    }
+
+
+
     private boolean normalized;
 
     @Programmatic

http://git-wip-us.apache.org/repos/asf/isis/blob/ecf6d170/core/applib/src/main/java/org/apache/isis/applib/layout/common/PropertyLayoutData.java
----------------------------------------------------------------------
diff --git a/core/applib/src/main/java/org/apache/isis/applib/layout/common/PropertyLayoutData.java b/core/applib/src/main/java/org/apache/isis/applib/layout/common/PropertyLayoutData.java
index 9bbec66..923833a 100644
--- a/core/applib/src/main/java/org/apache/isis/applib/layout/common/PropertyLayoutData.java
+++ b/core/applib/src/main/java/org/apache/isis/applib/layout/common/PropertyLayoutData.java
@@ -242,13 +242,11 @@ public class PropertyLayoutData
     }
 
 
-
-
-    @Override public String toString() {
+    @Override
+    public String toString() {
         return "PropertyLayoutData{" +
                 "id='" + id + '\'' +
                 '}';
     }
 
-
 }

http://git-wip-us.apache.org/repos/asf/isis/blob/ecf6d170/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 ec2d699..fc33df4 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
@@ -18,6 +18,8 @@ package org.apache.isis.applib.services.layout;
 
 import java.util.List;
 
+import org.apache.isis.applib.annotation.MemberGroupLayout;
+import org.apache.isis.applib.annotation.MemberOrder;
 import org.apache.isis.applib.annotation.Programmatic;
 import org.apache.isis.applib.layout.common.Grid;
 
@@ -26,12 +28,14 @@ public interface GridService {
     /**
      * Whether any metadata exists for this domain class, and if so then whether it is valid or invalid.
      */
-    @Programmatic boolean exists(Class<?> domainClass);
+    @Programmatic
+    boolean exists(Class<?> domainClass);
 
     /**
      * Returns (raw unnormalized) metadata, eg per the <code>.layout.xml</code> file.
      */
-    @Programmatic Grid fromXml(Class<?> domainClass);
+    @Programmatic
+    Grid fromXml(Class<?> domainClass);
 
     /**
      * Normalize the grid with respect to the specified domain class.
@@ -40,27 +44,48 @@ public interface GridService {
      *     This will (often) modify the grid graph in order to add in any unreferenced actions and so forth.
      * </p>
      */
-    Grid normalize(Grid grid, final Class<?> domainClass);
+    Grid normalize(Grid grid);
 
-    Grid complete(Grid grid, final Class<?> domainClass);
+    Grid complete(Grid grid);
 
-    Grid minimal(Grid grid, final Class<?> domainClass);
+    Grid minimal(Grid grid);
 
     enum Style {
 
+        /**
+         * As per {@link #NORMALIZED}, but also with all (non-null) facets for all
+         * properties/collections/actions also included included in the grid.
+         *
+         * <p>
+         *     The intention here is that any layout metadata annotations can be removed from the code.
+         * </p>
+         */
         COMPLETE,
         /**
-         * Default, corresponding to raw state along with any additional regions added
-         * as a result of normalization process.
+         * Default, whereby missing properties/collections/actions are added to regions,
+         * and unused/empty regions are removed/trimmed.
+         *
+         * <p>
+         *     It should be possible to remove any {@link MemberOrder} and {@link MemberGroupLayout} annotations but
+         *     any layout annotations would need to be retained.
+         * </p>
          */
         NORMALIZED,
+        /**
+         * As per {@link #NORMALIZED}, but with no properties/collections/actions.
+         *
+         * <p>
+         *     The intention here is for layout annotations that &quot;bind&quot; the properties/collections/actions
+         *     to the regions to be retained.
+         * </p>
+         */
         MINIMAL
     }
 
     /**
-     * Obtains the (normalized) layout metadata, if any, for the (domain class of the) specified domain object.
+     * Obtains the layout metadata, if any, for the (domain class of the) specified domain object.
      *
-     * @param style - whether the returned grid should be complete (having been normalized), or should be as
+     * @param style - whether the returned grid should be complete, normalized, or as
      *              minimal as possible.
      */
     @Programmatic Grid toGrid(Object domainObject, final Style style);
@@ -78,12 +103,13 @@ public interface GridService {
     /**
      * For all of the available {@link GridNormalizerService}s available, return only the first one for any that
      * are for the same grid implementation.
-     * <p/>
+     * 
      * <p>
-     * This allows default implementations (eg for bootstrap3) to be overridden while also allowing for the more
-     * general idea of multiple implementations.
+     *   This allows default implementations (eg for bootstrap3) to be overridden while also allowing for the more
+     *   general idea of multiple implementations.
      * </p>
      */
     @Programmatic
     List<GridNormalizerService<?>> gridNormalizerServices();
+
 }

http://git-wip-us.apache.org/repos/asf/isis/blob/ecf6d170/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 4f5f0ae..fc9ee46 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
@@ -85,7 +85,7 @@ public class GridFacetDefault
         }
         final Class<?> domainClass = getSpecification().getCorrespondingClass();
 
-        return gridService.normalize(grid, domainClass);
+        return gridService.normalize(grid);
     }
 
     private ObjectSpecification getSpecification() {

http://git-wip-us.apache.org/repos/asf/isis/blob/ecf6d170/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 1d078f5..97588b9 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
@@ -127,11 +127,12 @@ public class GridServiceDefault
                     .toList();
             final JAXBContext context = JAXBContext.newInstance(pageImplementations.toArray(new Class[0]));
 
-            final Grid metadata = (Grid) jaxbService.fromXml(context, xml);
+            final Grid grid = (Grid) jaxbService.fromXml(context, xml);
+            grid.setDomainClass(domainClass);
             if(!deploymentCategory.isProduction()) {
-                pageByXml.put(xml, metadata);
+                pageByXml.put(xml, grid);
             }
-            return metadata;
+            return grid;
         } catch(Exception ex) {
 
             if(!deploymentCategory.isProduction()) {
@@ -150,7 +151,7 @@ public class GridServiceDefault
 
     @Override
     @Programmatic
-    public Grid normalize(final Grid grid, final Class<?> domainClass) {
+    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
@@ -159,6 +160,8 @@ public class GridServiceDefault
             return grid;
         }
 
+        final Class<?> domainClass = grid.getDomainClass();
+
         for (GridNormalizerService gridNormalizerService : gridNormalizerServices()) {
             gridNormalizerService.normalize(grid, domainClass);
         }
@@ -170,8 +173,9 @@ public class GridServiceDefault
 
     @Override
     @Programmatic
-    public Grid complete(final Grid grid, final Class<?> domainClass) {
+    public Grid complete(final Grid grid) {
 
+        final Class<?> domainClass = grid.getDomainClass();
         for (GridNormalizerService gridNormalizerService : gridNormalizerServices()) {
             gridNormalizerService.complete(grid, domainClass);
         }
@@ -181,8 +185,9 @@ public class GridServiceDefault
 
     @Override
     @Programmatic
-    public Grid minimal(final Grid grid, final Class<?> domainClass) {
+    public Grid minimal(final Grid grid) {
 
+        final Class<?> domainClass = grid.getDomainClass();
         for (GridNormalizerService gridNormalizerService : gridNormalizerServices()) {
             gridNormalizerService.minimal(grid, domainClass);
         }
@@ -217,25 +222,14 @@ public class GridServiceDefault
             final GridFacet facet = objectSpec.getFacet(GridFacet.class);
             return facet != null? facet.getGrid(): null;
         case COMPLETE:
-            return completeGridFor(domainClass);
+            return complete(fromXml(domainClass));
         case MINIMAL:
-            return minimalGridFor(domainClass);
+            return minimal(fromXml(domainClass));
         default:
             throw new IllegalArgumentException("unsupported style");
         }
     }
 
-    protected Grid minimalGridFor(final Class<?> domainClass) {
-        Grid grid = fromXml(domainClass);
-        return grid;
-    }
-
-    protected Grid completeGridFor(final Class<?> domainClass) {
-        Grid grid = fromXml(domainClass);
-        grid = normalize(grid, domainClass);
-        return grid;
-    }
-
     @Override
     public String tnsAndSchemaLocation(final Grid grid) {
         final List<String> parts = Lists.newArrayList();


[24/50] [abbrv] 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/master
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();
-    }
-
-}


[35/50] [abbrv] isis git commit: ISIS-933: fixing layout issues when the layout.xml HAS been specified...

Posted by da...@apache.org.
ISIS-933: fixing layout issues when the layout.xml HAS been specified...

* was adding in properties to fieldsets twice, even if already in the fieldset.  (This bug because previously I had been focusing on getting the auto-add for non-referenced properties to work, based on @MemberOrder)

Also:
* ensuring that can reload dynamically without having to invalidate cache.  This bug was due to the SpeificationCacheDefault ( which maintains two separate hashmaps to cache specs) getting out-of-whack internally ... specId holding one version of a spec, while className holding a different on.
* remove versionSequence from SimpleObject (as now have the Persistable_... mixins).


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

Branch: refs/heads/master
Commit: 97abf1b441e813a18a637d64d07ae31c1c934fd3
Parents: 4ccb9ca
Author: Dan Haywood <da...@haywood-associates.co.uk>
Authored: Wed Feb 24 06:25:06 2016 +0000
Committer: Dan Haywood <da...@haywood-associates.co.uk>
Committed: Wed Feb 24 06:25:06 2016 +0000

----------------------------------------------------------------------
 .../services/grid/GridNormalizerServiceAbstract.java | 15 ---------------
 .../grid/bootstrap3/GridNormalizerServiceBS3.java    | 15 ++++++++++++++-
 .../metamodel/specloader/ObjectReflectorDefault.java |  2 +-
 .../specloader/SpecificationCacheDefault.java        |  5 ++++-
 .../viewer/wicket/ui/pages/entity/EntityPage.java    |  7 ++++---
 .../main/java/domainapp/dom/simple/SimpleObject.java | 14 ++------------
 .../domainapp/dom/simple/SimpleObject.layout.xml     | 11 +++++------
 7 files changed, 30 insertions(+), 39 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/isis/blob/97abf1b4/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 8d92c89..db40d07 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
@@ -21,7 +21,6 @@ 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;
 
@@ -641,20 +640,6 @@ public abstract class GridNormalizerServiceAbstract<G extends Grid>
     }
 
 
-    protected static String nextInSequenceFor(
-            final String key, final Map<String, int[]> seqByKey) {
-        synchronized (seqByKey) {
-            int[] holder = seqByKey.get(key);
-            if(holder == null) {
-                holder = new int[]{0};
-                seqByKey.put(key, holder);
-            }
-            holder[0]++;
-            return ""+holder[0];
-        }
-    }
-
-
     protected SpecificationLoader specificationLookup;
 
     public void setSpecificationLoader(final SpecificationLoader specificationLookup) {

http://git-wip-us.apache.org/repos/asf/isis/blob/97abf1b4/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 9ad5161..e99a9e1 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
@@ -509,8 +509,21 @@ public class GridNormalizerServiceBS3 extends GridNormalizerServiceAbstract<BS3G
     protected void addPropertiesTo(
             final FieldSet fieldSet,
             final List<String> propertyIds) {
+        final List<PropertyLayoutData> properties = fieldSet.getProperties();
+        final ImmutableList<String> existingIds = FluentIterable
+                .from(properties)
+                .transform(new Function<PropertyLayoutData, String>() {
+                    @Nullable
+                    @Override
+                    public String apply(@Nullable final PropertyLayoutData propertyLayoutData) {
+                        return propertyLayoutData.getId();
+                    }
+                })
+                .toList();
         for (final String propertyId : propertyIds) {
-            fieldSet.getProperties().add(new PropertyLayoutData(propertyId));
+            if(!existingIds.contains(propertyId)) {
+                properties.add(new PropertyLayoutData(propertyId));
+            }
         }
     }
 

http://git-wip-us.apache.org/repos/asf/isis/blob/97abf1b4/core/metamodel/src/main/java/org/apache/isis/core/metamodel/specloader/ObjectReflectorDefault.java
----------------------------------------------------------------------
diff --git a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/specloader/ObjectReflectorDefault.java b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/specloader/ObjectReflectorDefault.java
index 2957dd7..a48fab0 100644
--- a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/specloader/ObjectReflectorDefault.java
+++ b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/specloader/ObjectReflectorDefault.java
@@ -385,7 +385,7 @@ public final class ObjectReflectorDefault
             // don't have an ObjectSpecId; hence the guard.
             if(spec.containsDoOpFacet(ObjectSpecIdFacet.class)) {
                 ObjectSpecId specId = spec.getSpecId();
-                if (getCache().getByObjectType(specId) == null) {
+                if (getCache().getByObjectType(specId) != spec) {
                     getCache().recache(spec);
                 }
             }

http://git-wip-us.apache.org/repos/asf/isis/blob/97abf1b4/core/metamodel/src/main/java/org/apache/isis/core/metamodel/specloader/SpecificationCacheDefault.java
----------------------------------------------------------------------
diff --git a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/specloader/SpecificationCacheDefault.java b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/specloader/SpecificationCacheDefault.java
index ad23aff..1e4df63 100644
--- a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/specloader/SpecificationCacheDefault.java
+++ b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/specloader/SpecificationCacheDefault.java
@@ -29,6 +29,7 @@ import org.apache.isis.core.metamodel.facets.object.objectspecid.ObjectSpecIdFac
 import org.apache.isis.core.metamodel.spec.ObjectSpecId;
 import org.apache.isis.core.metamodel.spec.ObjectSpecification;
 import org.apache.isis.core.metamodel.specloader.validator.MetaModelValidator;
+import org.apache.isis.core.metamodel.specloader.validator.ValidationFailures;
 
 class SpecificationCacheDefault {
     
@@ -41,6 +42,7 @@ class SpecificationCacheDefault {
 
     public void cache(final String className, final ObjectSpecification spec) {
         specByClassName.put(className, spec);
+        recache(spec);
     }
     
 
@@ -60,7 +62,8 @@ class SpecificationCacheDefault {
     }
 
     /**
-     * Populated as a result of running {@link MetaModelValidator#validate() validation} after xxxallxxx most specs have been loaded. 
+     * Populated as a result of running {@link MetaModelValidator#validate(ValidationFailures)} validation} after
+     * xxxallxxx most specs have been loaded.
      */
     void setCacheBySpecId(Map<ObjectSpecId, ObjectSpecification> specById) {
         this.specById = Maps.newHashMap();

http://git-wip-us.apache.org/repos/asf/isis/blob/97abf1b4/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 26ab321..f1d05e1 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
@@ -145,9 +145,10 @@ public class EntityPage extends PageAbstract {
 
             // if none, then fallback to invalidating entire cache
             // (this is the original LayoutMetadataFromJson behaviour)
-            if(!getDeploymentType().isProduction()) {
-                getSpecificationLoader().invalidateCacheFor(objectAdapter.getObject());
-            }
+
+//            if(!getDeploymentType().isProduction()) {
+//                getSpecificationLoader().invalidateCacheFor(objectAdapter.getObject());
+//            }
 
             // as a side-effect, this will update facets
             final Grid unused = facet.getGrid();

http://git-wip-us.apache.org/repos/asf/isis/blob/97abf1b4/example/application/simpleapp/dom/src/main/java/domainapp/dom/simple/SimpleObject.java
----------------------------------------------------------------------
diff --git a/example/application/simpleapp/dom/src/main/java/domainapp/dom/simple/SimpleObject.java b/example/application/simpleapp/dom/src/main/java/domainapp/dom/simple/SimpleObject.java
index 6ac1bf3..366dbb3 100644
--- a/example/application/simpleapp/dom/src/main/java/domainapp/dom/simple/SimpleObject.java
+++ b/example/application/simpleapp/dom/src/main/java/domainapp/dom/simple/SimpleObject.java
@@ -21,7 +21,6 @@ package domainapp.dom.simple;
 import java.util.List;
 
 import javax.inject.Inject;
-import javax.jdo.JDOHelper;
 import javax.jdo.annotations.IdentityType;
 import javax.jdo.annotations.VersionStrategy;
 
@@ -31,6 +30,7 @@ import org.apache.isis.applib.annotation.BookmarkPolicy;
 import org.apache.isis.applib.annotation.CollectionLayout;
 import org.apache.isis.applib.annotation.DomainObject;
 import org.apache.isis.applib.annotation.DomainObjectLayout;
+import org.apache.isis.applib.annotation.Editing;
 import org.apache.isis.applib.annotation.MemberOrder;
 import org.apache.isis.applib.annotation.Parameter;
 import org.apache.isis.applib.annotation.ParameterLayout;
@@ -85,7 +85,7 @@ public class SimpleObject implements Comparable<SimpleObject> {
             length = NAME_LENGTH
     )
     @Property(
-            //editing = Editing.DISABLED
+            editing = Editing.DISABLED
     )
     @PropertyLayout(
             namedEscaped = false
@@ -135,16 +135,6 @@ public class SimpleObject implements Comparable<SimpleObject> {
     }
 
 
-    /**
-     * version (derived property)
-     */
-    public java.sql.Timestamp getVersionSequence() {
-        return (java.sql.Timestamp) JDOHelper.getVersion(this);
-    }
-
-    public boolean hideVersionSequence() {
-        return getName().contains("ob");
-    }
 
     @Override
     public int compareTo(final SimpleObject other) {

http://git-wip-us.apache.org/repos/asf/isis/blob/97abf1b4/example/application/simpleapp/dom/src/main/java/domainapp/dom/simple/SimpleObject.layout.xml
----------------------------------------------------------------------
diff --git a/example/application/simpleapp/dom/src/main/java/domainapp/dom/simple/SimpleObject.layout.xml b/example/application/simpleapp/dom/src/main/java/domainapp/dom/simple/SimpleObject.layout.xml
index c0eaded..85b6a0c 100644
--- a/example/application/simpleapp/dom/src/main/java/domainapp/dom/simple/SimpleObject.layout.xml
+++ b/example/application/simpleapp/dom/src/main/java/domainapp/dom/simple/SimpleObject.layout.xml
@@ -13,18 +13,17 @@
                     <bs3:row>
                         <bs3:col span="12">
                             <c:fieldSet name="Properties">
-                                <c:property id="name"/>
-                                <c:property id="versionSequence"/>
+                                <c:property id="name">
+                                    <c:action id="updateName" position="BELOW"/>
+                                </c:property>
                             </c:fieldSet>
                         </bs3:col>
                     </bs3:row>
                 </bs3:tab>
-                <bs3:tab name="Misc">
+                <bs3:tab name="Metadata">
                     <bs3:row>
                         <bs3:col span="12">
-                            <c:fieldSet name="Metadata">
-                                <c:property id="versionSequence"/>
-                            </c:fieldSet>
+                            <c:fieldSet name="Metadata"/>
                         </bs3:col>
                     </bs3:row>
                 </bs3:tab>


[36/50] [abbrv] isis git commit: ISIS-1311: split out Persistable_datanucleusVersion mixin into two, one for timestamps and one for longs (per different VersionStrategy in JDO annotation).

Posted by da...@apache.org.
ISIS-1311: split out Persistable_datanucleusVersion mixin into two, one for timestamps and one for longs (per different VersionStrategy in JDO annotation).

Also:
- remove the hideXxx() for Object_downloadLayoutXml mixin, will always be visible.


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

Branch: refs/heads/master
Commit: 23f92334256fb76ee57d9f2807df2602cab60096
Parents: 97abf1b
Author: Dan Haywood <da...@haywood-associates.co.uk>
Authored: Wed Feb 24 06:28:55 2016 +0000
Committer: Dan Haywood <da...@haywood-associates.co.uk>
Committed: Wed Feb 24 06:28:55 2016 +0000

----------------------------------------------------------------------
 .../layout/Object_downloadLayoutXml.java        |  6 +-
 .../jdosupport/Persistable_datanucleusId.java   |  6 +-
 .../Persistable_datanucleusVersion.java         | 64 --------------------
 .../Persistable_datanucleusVersionLong.java     | 64 ++++++++++++++++++++
 ...Persistable_datanucleusVersionTimestamp.java | 64 ++++++++++++++++++++
 5 files changed, 132 insertions(+), 72 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/isis/blob/23f92334/core/applib/src/main/java/org/apache/isis/applib/services/layout/Object_downloadLayoutXml.java
----------------------------------------------------------------------
diff --git a/core/applib/src/main/java/org/apache/isis/applib/services/layout/Object_downloadLayoutXml.java b/core/applib/src/main/java/org/apache/isis/applib/services/layout/Object_downloadLayoutXml.java
index eee95b0..0a0fb47 100644
--- a/core/applib/src/main/java/org/apache/isis/applib/services/layout/Object_downloadLayoutXml.java
+++ b/core/applib/src/main/java/org/apache/isis/applib/services/layout/Object_downloadLayoutXml.java
@@ -52,7 +52,7 @@ public class Object_downloadLayoutXml {
             cssClassFa = "fa-download",
             position = ActionLayout.Position.PANEL_DROPDOWN
     )
-    @MemberOrder(name = "Metadata", sequence = "550.1")
+    @MemberOrder(name = "Metadata", sequence = "700.1")
     public Object $$(
             @ParameterLayout(named = "File name")
             final String fileName,
@@ -67,10 +67,6 @@ public class Object_downloadLayoutXml {
         return new Clob(Util.withSuffix(fileName, style.name().toLowerCase() + ".xml"), "text/xml", xml);
     }
 
-    public boolean hide$$() {
-        // can use either style to determine whether this action should be hidden
-        return getGrid(GridService.Style.NORMALIZED) == null;
-    }
     public String default0$$() {
         return Util.withSuffix(object.getClass().getSimpleName(), "layout");
     }

http://git-wip-us.apache.org/repos/asf/isis/blob/23f92334/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
index 15a7296..51041e6 100644
--- 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
@@ -53,7 +53,7 @@ public class Persistable_datanucleusId {
             hidden = Where.ALL_TABLES
     )
     @MemberOrder(name = "Metadata", sequence = "800.1")
-    public Long datanucleusId() {
+    public Long $$() {
         final Object objectId = JDOHelper.getObjectId(persistable);
         if(objectId instanceof DatastoreId) {
             final DatastoreId datastoreId = (DatastoreId) objectId;
@@ -63,8 +63,8 @@ public class Persistable_datanucleusId {
         return null;
     }
 
-    public boolean hideDatanucleusId() {
-        return datanucleusId() == null;
+    public boolean hide$$() {
+        return $$() == null;
     }
 
 

http://git-wip-us.apache.org/repos/asf/isis/blob/23f92334/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
deleted file mode 100644
index 083ba86..0000000
--- a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/services/jdosupport/Persistable_datanucleusVersion.java
+++ /dev/null
@@ -1,64 +0,0 @@
-/*
- *  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/23f92334/core/metamodel/src/main/java/org/apache/isis/core/metamodel/services/jdosupport/Persistable_datanucleusVersionLong.java
----------------------------------------------------------------------
diff --git a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/services/jdosupport/Persistable_datanucleusVersionLong.java b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/services/jdosupport/Persistable_datanucleusVersionLong.java
new file mode 100644
index 0000000..0bf2603
--- /dev/null
+++ b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/services/jdosupport/Persistable_datanucleusVersionLong.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_datanucleusVersionLong {
+
+    private final Persistable persistable;
+
+    public Persistable_datanucleusVersionLong(final Persistable persistable) {
+        this.persistable = persistable;
+    }
+
+    public static class ActionDomainEvent extends org.apache.isis.applib.IsisApplibModule.ActionDomainEvent<Persistable_datanucleusVersionLong> {}
+
+    @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 $$() {
+        final Object version = JDOHelper.getVersion(persistable);
+        return version != null && version instanceof Long ? (Long) version : null;
+    }
+
+    public boolean hide$$() {
+        return $$() == null;
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/isis/blob/23f92334/core/metamodel/src/main/java/org/apache/isis/core/metamodel/services/jdosupport/Persistable_datanucleusVersionTimestamp.java
----------------------------------------------------------------------
diff --git a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/services/jdosupport/Persistable_datanucleusVersionTimestamp.java b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/services/jdosupport/Persistable_datanucleusVersionTimestamp.java
new file mode 100644
index 0000000..24960a9
--- /dev/null
+++ b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/services/jdosupport/Persistable_datanucleusVersionTimestamp.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_datanucleusVersionTimestamp {
+
+    private final Persistable persistable;
+
+    public Persistable_datanucleusVersionTimestamp(final Persistable persistable) {
+        this.persistable = persistable;
+    }
+
+    public static class ActionDomainEvent extends org.apache.isis.applib.IsisApplibModule.ActionDomainEvent<Persistable_datanucleusVersionTimestamp> {}
+
+    @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 java.sql.Timestamp $$() {
+        final Object version = JDOHelper.getVersion(persistable);
+        return version != null && version instanceof java.sql.Timestamp ? (java.sql.Timestamp) version : null;
+    }
+
+    public boolean hide$$() {
+        return $$() == null;
+    }
+
+}


[06/50] [abbrv] isis git commit: ISIS-993: moving around and renaming the applib schema files for layout

Posted by da...@apache.org.
http://git-wip-us.apache.org/repos/asf/isis/blob/67b6e05e/core/viewer-wicket-model/src/main/java/org/apache/isis/viewer/wicket/model/models/EntityCollectionModel.java
----------------------------------------------------------------------
diff --git a/core/viewer-wicket-model/src/main/java/org/apache/isis/viewer/wicket/model/models/EntityCollectionModel.java b/core/viewer-wicket-model/src/main/java/org/apache/isis/viewer/wicket/model/models/EntityCollectionModel.java
index 17c6fc9..91d93f6 100644
--- a/core/viewer-wicket-model/src/main/java/org/apache/isis/viewer/wicket/model/models/EntityCollectionModel.java
+++ b/core/viewer-wicket-model/src/main/java/org/apache/isis/viewer/wicket/model/models/EntityCollectionModel.java
@@ -31,7 +31,7 @@ import com.google.common.collect.Iterables;
 import com.google.common.collect.Lists;
 import com.google.common.collect.Maps;
 
-import org.apache.isis.applib.layout.common.CollectionLayoutData;
+import org.apache.isis.applib.layout.component.CollectionLayoutData;
 import org.apache.isis.core.commons.factory.InstanceUtil;
 import org.apache.isis.core.commons.lang.ClassUtil;
 import org.apache.isis.core.commons.lang.Closure;

http://git-wip-us.apache.org/repos/asf/isis/blob/67b6e05e/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/fieldset/PropertyGroup.java
----------------------------------------------------------------------
diff --git a/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/fieldset/PropertyGroup.java b/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/fieldset/PropertyGroup.java
index 57bc89c..3c12319 100644
--- a/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/fieldset/PropertyGroup.java
+++ b/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/fieldset/PropertyGroup.java
@@ -27,8 +27,8 @@ import org.apache.wicket.markup.html.basic.Label;
 import org.apache.wicket.markup.repeater.RepeatingView;
 
 import org.apache.isis.applib.annotation.ActionLayout;
-import org.apache.isis.applib.layout.common.FieldSet;
-import org.apache.isis.applib.layout.common.PropertyLayoutData;
+import org.apache.isis.applib.layout.component.FieldSet;
+import org.apache.isis.applib.layout.component.PropertyLayoutData;
 import org.apache.isis.core.metamodel.adapter.ObjectAdapter;
 import org.apache.isis.core.metamodel.adapter.mgr.AdapterManager;
 import org.apache.isis.core.metamodel.spec.feature.ObjectAction;

http://git-wip-us.apache.org/repos/asf/isis/blob/67b6e05e/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 6b7dfcc..d83915c 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
@@ -22,8 +22,8 @@ package org.apache.isis.viewer.wicket.ui.components.entity.selector.links;
 import org.apache.wicket.Component;
 import org.apache.wicket.model.IModel;
 
-import org.apache.isis.applib.layout.bootstrap3.BS3Grid;
-import org.apache.isis.applib.layout.common.Grid;
+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;

http://git-wip-us.apache.org/repos/asf/isis/blob/67b6e05e/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/layout/bs3/BS3GridPanel.java
----------------------------------------------------------------------
diff --git a/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/layout/bs3/BS3GridPanel.java b/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/layout/bs3/BS3GridPanel.java
index 7137a11..59ef10d 100644
--- a/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/layout/bs3/BS3GridPanel.java
+++ b/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/layout/bs3/BS3GridPanel.java
@@ -22,8 +22,8 @@ package org.apache.isis.viewer.wicket.ui.components.layout.bs3;
 import org.apache.wicket.markup.html.WebMarkupContainer;
 import org.apache.wicket.markup.repeater.RepeatingView;
 
-import org.apache.isis.applib.layout.bootstrap3.BS3Grid;
-import org.apache.isis.applib.layout.bootstrap3.BS3Row;
+import org.apache.isis.applib.layout.grid.bootstrap3.BS3Grid;
+import org.apache.isis.applib.layout.grid.bootstrap3.BS3Row;
 import org.apache.isis.viewer.wicket.model.models.EntityModel;
 import org.apache.isis.viewer.wicket.ui.components.layout.bs3.row.Row;
 import org.apache.isis.viewer.wicket.ui.panels.PanelAbstract;

http://git-wip-us.apache.org/repos/asf/isis/blob/67b6e05e/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/layout/bs3/Util.java
----------------------------------------------------------------------
diff --git a/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/layout/bs3/Util.java b/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/layout/bs3/Util.java
index 90a84f0..e7bc76b 100644
--- a/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/layout/bs3/Util.java
+++ b/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/layout/bs3/Util.java
@@ -23,8 +23,8 @@ import com.google.common.base.Strings;
 
 import org.apache.wicket.MarkupContainer;
 
-import org.apache.isis.applib.layout.bootstrap3.BS3Element;
-import org.apache.isis.applib.layout.bootstrap3.BS3ElementAbstract;
+import org.apache.isis.applib.layout.grid.bootstrap3.BS3Element;
+import org.apache.isis.applib.layout.grid.bootstrap3.BS3ElementAbstract;
 import org.apache.isis.viewer.wicket.ui.util.CssClassAppender;
 
 public class Util {

http://git-wip-us.apache.org/repos/asf/isis/blob/67b6e05e/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/layout/bs3/clearfix/ClearFix.java
----------------------------------------------------------------------
diff --git a/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/layout/bs3/clearfix/ClearFix.java b/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/layout/bs3/clearfix/ClearFix.java
index e33c5fd..598dad3 100644
--- a/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/layout/bs3/clearfix/ClearFix.java
+++ b/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/layout/bs3/clearfix/ClearFix.java
@@ -20,7 +20,7 @@ package org.apache.isis.viewer.wicket.ui.components.layout.bs3.clearfix;
 
 import org.apache.wicket.markup.html.WebMarkupContainer;
 
-import org.apache.isis.applib.layout.bootstrap3.BS3ClearFix;
+import org.apache.isis.applib.layout.grid.bootstrap3.BS3ClearFix;
 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;

http://git-wip-us.apache.org/repos/asf/isis/blob/67b6e05e/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/layout/bs3/col/Col.java
----------------------------------------------------------------------
diff --git a/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/layout/bs3/col/Col.java b/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/layout/bs3/col/Col.java
index 3332e1c..93198b2 100644
--- a/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/layout/bs3/col/Col.java
+++ b/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/layout/bs3/col/Col.java
@@ -32,14 +32,14 @@ import org.apache.wicket.Component;
 import org.apache.wicket.markup.html.WebMarkupContainer;
 import org.apache.wicket.markup.repeater.RepeatingView;
 
-import org.apache.isis.applib.layout.bootstrap3.BS3Col;
-import org.apache.isis.applib.layout.bootstrap3.BS3Row;
-import org.apache.isis.applib.layout.bootstrap3.BS3Tab;
-import org.apache.isis.applib.layout.bootstrap3.BS3TabGroup;
-import org.apache.isis.applib.layout.common.ActionLayoutData;
-import org.apache.isis.applib.layout.common.CollectionLayoutData;
-import org.apache.isis.applib.layout.common.DomainObjectLayoutData;
-import org.apache.isis.applib.layout.common.FieldSet;
+import org.apache.isis.applib.layout.grid.bootstrap3.BS3Col;
+import org.apache.isis.applib.layout.grid.bootstrap3.BS3Row;
+import org.apache.isis.applib.layout.grid.bootstrap3.BS3Tab;
+import org.apache.isis.applib.layout.grid.bootstrap3.BS3TabGroup;
+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.core.metamodel.spec.feature.ObjectAction;
 import org.apache.isis.core.runtime.system.DeploymentType;
 import org.apache.isis.core.runtime.system.context.IsisContext;

http://git-wip-us.apache.org/repos/asf/isis/blob/67b6e05e/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/layout/bs3/row/Row.java
----------------------------------------------------------------------
diff --git a/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/layout/bs3/row/Row.java b/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/layout/bs3/row/Row.java
index c54c58f..7aac0fe 100644
--- a/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/layout/bs3/row/Row.java
+++ b/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/layout/bs3/row/Row.java
@@ -21,10 +21,10 @@ package org.apache.isis.viewer.wicket.ui.components.layout.bs3.row;
 import org.apache.wicket.markup.html.WebMarkupContainer;
 import org.apache.wicket.markup.repeater.RepeatingView;
 
-import org.apache.isis.applib.layout.bootstrap3.BS3ClearFix;
-import org.apache.isis.applib.layout.bootstrap3.BS3Col;
-import org.apache.isis.applib.layout.bootstrap3.BS3Row;
-import org.apache.isis.applib.layout.bootstrap3.BS3RowContent;
+import org.apache.isis.applib.layout.grid.bootstrap3.BS3ClearFix;
+import org.apache.isis.applib.layout.grid.bootstrap3.BS3Col;
+import org.apache.isis.applib.layout.grid.bootstrap3.BS3Row;
+import org.apache.isis.applib.layout.grid.bootstrap3.BS3RowContent;
 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;

http://git-wip-us.apache.org/repos/asf/isis/blob/67b6e05e/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/layout/bs3/tabs/TabGroupPanel.java
----------------------------------------------------------------------
diff --git a/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/layout/bs3/tabs/TabGroupPanel.java b/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/layout/bs3/tabs/TabGroupPanel.java
index e1bf0d2..b350b6c 100644
--- a/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/layout/bs3/tabs/TabGroupPanel.java
+++ b/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/layout/bs3/tabs/TabGroupPanel.java
@@ -29,8 +29,8 @@ 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.applib.layout.bootstrap3.BS3Tab;
-import org.apache.isis.applib.layout.bootstrap3.BS3TabGroup;
+import org.apache.isis.applib.layout.grid.bootstrap3.BS3Tab;
+import org.apache.isis.applib.layout.grid.bootstrap3.BS3TabGroup;
 import org.apache.isis.viewer.wicket.model.models.EntityModel;
 import org.apache.isis.viewer.wicket.model.util.ScopedSessionAttribute;
 

http://git-wip-us.apache.org/repos/asf/isis/blob/67b6e05e/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/layout/bs3/tabs/TabPanel.java
----------------------------------------------------------------------
diff --git a/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/layout/bs3/tabs/TabPanel.java b/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/layout/bs3/tabs/TabPanel.java
index 93f85ac..61c81e7 100644
--- a/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/layout/bs3/tabs/TabPanel.java
+++ b/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/layout/bs3/tabs/TabPanel.java
@@ -3,8 +3,8 @@ package org.apache.isis.viewer.wicket.ui.components.layout.bs3.tabs;
 import org.apache.wicket.markup.html.WebMarkupContainer;
 import org.apache.wicket.markup.repeater.RepeatingView;
 
-import org.apache.isis.applib.layout.bootstrap3.BS3Row;
-import org.apache.isis.applib.layout.bootstrap3.BS3Tab;
+import org.apache.isis.applib.layout.grid.bootstrap3.BS3Row;
+import org.apache.isis.applib.layout.grid.bootstrap3.BS3Tab;
 import org.apache.isis.viewer.wicket.model.hints.HasUiHintDisambiguator;
 import org.apache.isis.viewer.wicket.model.models.EntityModel;
 import org.apache.isis.viewer.wicket.ui.components.layout.bs3.Util;

http://git-wip-us.apache.org/repos/asf/isis/blob/67b6e05e/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
index 9079391..f487ef0 100644
--- 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
@@ -27,7 +27,7 @@ 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.common.FieldSet;
+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.spec.ObjectSpecification;

http://git-wip-us.apache.org/repos/asf/isis/blob/67b6e05e/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
index b89009b..6f36549 100644
--- 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
@@ -31,7 +31,7 @@ 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.common.CollectionLayoutData;
+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;

http://git-wip-us.apache.org/repos/asf/isis/blob/67b6e05e/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
index aaacdef..2abe0a6 100644
--- 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
@@ -31,8 +31,8 @@ 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.common.FieldSet;
-import org.apache.isis.applib.layout.common.PropertyLayoutData;
+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;

http://git-wip-us.apache.org/repos/asf/isis/blob/67b6e05e/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 e2b01db..b29bf94 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
@@ -29,7 +29,7 @@ import org.apache.wicket.model.AbstractReadOnlyModel;
 import org.apache.wicket.request.mapper.parameter.PageParameters;
 import org.apache.wicket.util.string.Strings;
 
-import org.apache.isis.applib.layout.common.Grid;
+import org.apache.isis.applib.layout.component.Grid;
 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;

http://git-wip-us.apache.org/repos/asf/isis/blob/67b6e05e/example/application/simpleapp/dom/src/main/java/domainapp/dom/simple/SimpleObject.layout-FC.xml
----------------------------------------------------------------------
diff --git a/example/application/simpleapp/dom/src/main/java/domainapp/dom/simple/SimpleObject.layout-FC.xml b/example/application/simpleapp/dom/src/main/java/domainapp/dom/simple/SimpleObject.layout-FC.xml
deleted file mode 100644
index f92597a..0000000
--- a/example/application/simpleapp/dom/src/main/java/domainapp/dom/simple/SimpleObject.layout-FC.xml
+++ /dev/null
@@ -1,41 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
-<grid xsi:schemaLocation="http://isis.apache.org/schema/applib/layout/common http://isis.apache.org/schema/applib/layout/common/common.xsd http://isis.apache.org/schema/applib/layout/fixedcols http://isis.apache.org/schema/applib/layout/fixedcols/fixedcols.xsd" xmlns="http://isis.apache.org/schema/applib/layout/fixedcols" xmlns:c="http://isis.apache.org/schema/applib/layout/common" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
-
-
-    <left span="0">
-    </left>
-    <tabGroup>
-        <tab name="Properties">
-            <left span="12">
-                <c:fieldSet name="General">
-                    <c:action id="delete" position="PANEL_DROPDOWN"/>
-                    <c:property id="name" labelPosition="TOP">
-                        <c:action id="updateName">
-                            <c:describedAs>This allows the name to be updated</c:describedAs>
-                        </c:action>
-                    </c:property>
-                </c:fieldSet>
-            </left>
-        </tab>
-        <tab name="Metadata">
-            <left span="12">
-                <c:fieldSet name="Foo">
-                    <c:action id="downloadJdoMetadata" position="PANEL"/>
-                    <c:action id="downloadLayoutXml" position="PANEL"/>
-                    <c:property id="versionSequence"/>
-                </c:fieldSet>
-
-            </left>
-        </tab>
-    </tabGroup>
-    <tabGroup>
-        <tab name="Collections">
-            <left span="12">
-                <c:collection id="similarTo" defaultView="table"/>
-            </left>
-            <right span="6">
-                <c:collection id="others" defaultView="table"/>
-            </right>
-        </tab>
-    </tabGroup>
-</grid>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/isis/blob/67b6e05e/example/application/simpleapp/dom/src/main/java/domainapp/dom/simple/SimpleObject.layout.json
----------------------------------------------------------------------
diff --git a/example/application/simpleapp/dom/src/main/java/domainapp/dom/simple/SimpleObject.layout.json b/example/application/simpleapp/dom/src/main/java/domainapp/dom/simple/SimpleObject.layout.json
deleted file mode 100644
index a8f1d31..0000000
--- a/example/application/simpleapp/dom/src/main/java/domainapp/dom/simple/SimpleObject.layout.json
+++ /dev/null
@@ -1,71 +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.
- */
-{
-    "columns": [
-        {
-            "span": 6,
-            "memberGroups": {
-                "General": {
-                    "members": {
-                        "name": {
-                            "propertyLayout": {
-                                "named": "Name",
-                                "namedEscaped": false
-                            },
-                            "actions": {
-                                "updateName": {
-                                    "actionLayout": {
-                                        "position": "BOTTOM"
-                                    }
-                                }
-                            }
-                        }
-                    }
-                },
-                "Metadata": {
-                    "members": {
-                        "versionSequence": {
-                            "propertyLayout": {
-                                "named": "Version"
-                            },
-                            "actions": {
-                                "downloadJdoMetadata": {
-                                    "actionLayout": {
-                                        "position": "PANEL_DROPDOWN"
-                                    }
-                                }
-                            }
-                        }
-                    }
-                }
-            }
-        },
-        {
-            "span": 0,
-            "memberGroups": {}
-        },
-        {
-            "span": 0,
-            "memberGroups": {}
-        },
-        {
-            "span": 6,
-            "collections": {}
-        }
-    ],
-    "actions": {}
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/isis/blob/67b6e05e/example/application/simpleapp/dom/src/main/java/domainapp/dom/simple/SimpleObject.layout.xml
----------------------------------------------------------------------
diff --git a/example/application/simpleapp/dom/src/main/java/domainapp/dom/simple/SimpleObject.layout.xml b/example/application/simpleapp/dom/src/main/java/domainapp/dom/simple/SimpleObject.layout.xml
index 9652100..47529e2 100644
--- a/example/application/simpleapp/dom/src/main/java/domainapp/dom/simple/SimpleObject.layout.xml
+++ b/example/application/simpleapp/dom/src/main/java/domainapp/dom/simple/SimpleObject.layout.xml
@@ -1,54 +1,21 @@
 <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
-<bs3:grid xsi:schemaLocation="http://isis.apache.org/schema/applib/layout/common http://isis.apache.org/schema/applib/layout/common/common.xsd http://isis.apache.org/schema/applib/layout/bootstrap3 http://isis.apache.org/schema/applib/layout/bootstrap3/bootstrap3.xsd" xmlns:c="http://isis.apache.org/schema/applib/layout/common" xmlns:bs3="http://isis.apache.org/schema/applib/layout/bootstrap3" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
-
-
-<!--
-    <bs3:row>
-        <bs3:col span="8" unreferencedActions="false">
-            <c:domainObject/>
-        </bs3:col>
-    </bs3:row>
-
-    <bs3:row>
-        <bs3:col span="12">
-            <bs3:tabGroup>
-                <bs3:tab name="Properties">
-                    <bs3:row>
-                        <bs3:col span="6">
-                            <c:fieldSet name="General" unreferencedProperties="true" unreferencedActions="true"/>
-                        </bs3:col>
-                        <bs3:col span="6">
-                            <c:fieldSet name="Metadata">
-                                <c:action id="downloadJdoMetadata"/>
-                                <c:action id="downloadLayoutXml" position="PANEL_DROPDOWN"/>
-                                <c:property id="versionSequence"/>
-                            </c:fieldSet>
-                        </bs3:col>
-                    </bs3:row>
-                </bs3:tab>
-            </bs3:tabGroup>
-        </bs3:col>
-    </bs3:row>
-    <bs3:row>
-        <bs3:col span="12">
-            <bs3:tabGroup unreferencedCollections="true"/>
-        </bs3:col>
-    </bs3:row>
--->
+<bs3:grid xsi:schemaLocation="http://isis.apache.org/applib/layout/component http://isis.apache.org/applib/layout/component/component.xsd http://isis.apache.org/applib/layout/grid/bootstrap3 http://isis.apache.org/applib/layout/grid/bootstrap3/bootstrap3.xsd" xmlns:c="http://isis.apache.org/applib/layout/component" xmlns:bs3="http://isis.apache.org/applib/layout/grid/bootstrap3" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
 
     <bs3:row>
-        <bs3:col span="12" unreferencedActions="false">
+        <bs3:col span="12" unreferencedActions="true">
             <c:domainObject/>
         </bs3:col>
     </bs3:row>
     <bs3:row>
         <bs3:col span="6">
             <bs3:tabGroup>
-                <bs3:tab name="General" cssClass="bar">
-                    <bs3:row cssClass="foo">
+                <bs3:tab name="General">
+                    <bs3:row>
                         <bs3:col span="12">
-                            <c:fieldSet name="Properties" unreferencedActions="true">
+                            <c:fieldSet name="Properties">
                                 <c:property id="name"/>
+                            </c:fieldSet>
+                            <c:fieldSet name="Misc">
                                 <c:property id="versionSequence"/>
                             </c:fieldSet>
                         </bs3:col>
@@ -67,23 +34,6 @@
         </bs3:col>
         <bs3:col span="6">
             <bs3:tabGroup  unreferencedCollections="true">
-                <bs3:tab name="Others">
-                    <bs3:row>
-                        <bs3:col span="12">
-                            <c:collection id="others" defaultView="table"/>
-                        </bs3:col>
-                    </bs3:row>
-                </bs3:tab>
-            </bs3:tabGroup>
-            <bs3:tabGroup>
-                <bs3:tab name="Similar To">
-                    <bs3:row>
-                        <bs3:col span="12">
-
-                        </bs3:col>
-                    </bs3:row>
-                </bs3:tab>
-
             </bs3:tabGroup>
         </bs3:col>
     </bs3:row>


[44/50] [abbrv] isis git commit: ISIS-993: ensure columns in tables are rendered in correct order (require eagerly obtaining grid); also when rendering, ignore any invalid properties/collections/actions.

Posted by da...@apache.org.
ISIS-993: ensure columns in tables are rendered in correct order (require eagerly obtaining grid); also when rendering, ignore any invalid properties/collections/actions.


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

Branch: refs/heads/master
Commit: 7628fc9d309c8a58ca9f9bbe1e29fa5c5cc044e6
Parents: 2c62912
Author: Dan Haywood <da...@haywood-associates.co.uk>
Authored: Thu Mar 3 10:38:07 2016 +0000
Committer: Dan Haywood <da...@haywood-associates.co.uk>
Committed: Thu Mar 3 10:38:07 2016 +0000

----------------------------------------------------------------------
 .../metamodel/spec/feature/ObjectMember.java    | 13 ++++++++++-
 .../CollectionContentsAsAjaxTablePanel.java     | 23 +++++++++++++++++---
 .../entity/fieldset/PropertyGroup.java          | 11 ++++++++--
 .../ui/components/layout/bs3/col/Col.java       | 14 +++++++++++-
 .../wicket/ui/pages/entity/EntityPage.java      | 21 +++---------------
 5 files changed, 57 insertions(+), 25 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/isis/blob/7628fc9d/core/metamodel/src/main/java/org/apache/isis/core/metamodel/spec/feature/ObjectMember.java
----------------------------------------------------------------------
diff --git a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/spec/feature/ObjectMember.java b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/spec/feature/ObjectMember.java
index 147cc61..b099991 100644
--- a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/spec/feature/ObjectMember.java
+++ b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/spec/feature/ObjectMember.java
@@ -26,6 +26,7 @@ import java.util.List;
 import javax.annotation.Nullable;
 
 import com.google.common.base.Function;
+import com.google.common.collect.ImmutableMap;
 import com.google.common.collect.Maps;
 
 import org.apache.isis.applib.annotation.When;
@@ -184,7 +185,17 @@ public interface ObjectMember extends ObjectFeature {
         private Util(){}
 
         public static <T extends ObjectMember> HashMap<String, T> mapById(final List<T> members) {
-            return Maps.newHashMap(Maps.uniqueIndex(members, ObjectMember.Functions.getId()));
+
+            // fails if there are multiple members with the same id...
+            //            return Maps.newHashMap(Maps.uniqueIndex(members, ObjectMember.Functions.getId()));
+
+            final HashMap<String, T> memberById = Maps.newHashMap();
+            for (T member : members) {
+                final String id = Functions.getId().apply(member);
+                // if there are multiple members with same id, just disregard
+                memberById.put(id, member);
+            }
+            return memberById;
         }
     }
 

http://git-wip-us.apache.org/repos/asf/isis/blob/7628fc9d/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/collectioncontents/ajaxtable/CollectionContentsAsAjaxTablePanel.java
----------------------------------------------------------------------
diff --git a/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/collectioncontents/ajaxtable/CollectionContentsAsAjaxTablePanel.java b/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/collectioncontents/ajaxtable/CollectionContentsAsAjaxTablePanel.java
index 11bef5c..836fe87 100644
--- a/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/collectioncontents/ajaxtable/CollectionContentsAsAjaxTablePanel.java
+++ b/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/collectioncontents/ajaxtable/CollectionContentsAsAjaxTablePanel.java
@@ -34,11 +34,13 @@ import org.apache.wicket.model.Model;
 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.Grid;
 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.facets.all.hide.HiddenFacet;
 import org.apache.isis.core.metamodel.facets.all.named.NamedFacet;
+import org.apache.isis.core.metamodel.facets.object.grid.GridFacet;
 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;
@@ -142,15 +144,30 @@ public class CollectionContentsAsAjaxTablePanel
 
 
 
-    private void addTitleColumn(final List<IColumn<ObjectAdapter,String>> columns, ObjectAdapterMemento parentAdapterMementoIfAny, int maxTitleParented, int maxTitleStandalone) {
-        int maxTitleLength = getModel().isParented()? maxTitleParented: maxTitleStandalone;
+    private void addTitleColumn(
+            final List<IColumn<ObjectAdapter,String>> columns,
+            final ObjectAdapterMemento parentAdapterMementoIfAny,
+            final int maxTitleParented,
+            final int maxTitleStandalone) {
+        final int maxTitleLength = getModel().isParented()? maxTitleParented: maxTitleStandalone;
         columns.add(new ObjectAdapterTitleColumn(parentAdapterMementoIfAny, maxTitleLength));
     }
 
     private void addPropertyColumnsIfRequired(final List<IColumn<ObjectAdapter,String>> columns) {
         final ObjectSpecification typeOfSpec = getModel().getTypeOfSpecification();
 
-        final Where whereContext = 
+        // same code also appears in EntityPage.
+        // we need to do this here otherwise any tables will render the columns in the wrong order until at least
+        // one object of that type has been rendered via EntityPage.
+        final GridFacet gridFacet = typeOfSpec.getFacet(GridFacet.class);
+        if(gridFacet != null) {
+            // 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 unused = gridFacet.getGrid();
+        }
+
+        final Where whereContext =
                 getModel().isParented()
                     ? Where.PARENTED_TABLES
                     : Where.STANDALONE_TABLES;

http://git-wip-us.apache.org/repos/asf/isis/blob/7628fc9d/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/fieldset/PropertyGroup.java
----------------------------------------------------------------------
diff --git a/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/fieldset/PropertyGroup.java b/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/fieldset/PropertyGroup.java
index a1810bf..e77dfab 100644
--- a/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/fieldset/PropertyGroup.java
+++ b/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/fieldset/PropertyGroup.java
@@ -97,9 +97,16 @@ public class PropertyGroup extends PanelAbstract<EntityModel> implements HasDyna
         div.add(propertyRv);
 
         final ImmutableList<ObjectAssociation> visibleAssociations = FluentIterable.from(properties)
+                .filter(new Predicate<PropertyLayoutData>() {
+                    @Override
+                    public boolean apply(final PropertyLayoutData propertyLayoutData) {
+                        return propertyLayoutData.getMetadataError() == null;
+                    }
+                })
                 .transform(new Function<PropertyLayoutData, ObjectAssociation>() {
-                    @Override public ObjectAssociation apply(final PropertyLayoutData propertyLayoutData) {
-                        return adapter.getSpecification().getAssociation(propertyLayoutData.getId());
+                    @Override
+                    public ObjectAssociation apply(final PropertyLayoutData propertyLayoutData) {
+                        return  adapter.getSpecification().getAssociation(propertyLayoutData.getId());
                     }
                 })
                 .filter(new Predicate<ObjectAssociation>() {

http://git-wip-us.apache.org/repos/asf/isis/blob/7628fc9d/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/layout/bs3/col/Col.java
----------------------------------------------------------------------
diff --git a/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/layout/bs3/col/Col.java b/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/layout/bs3/col/Col.java
index 132218f..53c8cae 100644
--- a/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/layout/bs3/col/Col.java
+++ b/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/layout/bs3/col/Col.java
@@ -131,6 +131,11 @@ public class Col extends PanelAbstract<EntityModel> implements HasDynamicallyVis
         final List<ActionLayoutData> actionLayoutDatas = bs3Col.getActions();
         final List<ObjectAction> visibleActions =
             FluentIterable.from(actionLayoutDatas)
+                    .filter(new Predicate<ActionLayoutData>() {
+                        @Override public boolean apply(final ActionLayoutData actionLayoutData) {
+                            return actionLayoutData.getMetadataError() == null;
+                        }
+                    })
                     .transform(new Function<ActionLayoutData, ObjectAction>() {
                         @Nullable @Override public ObjectAction apply(@Nullable final ActionLayoutData actionLayoutData) {
                             return getModel().getTypeOfSpecification().getObjectAction(actionLayoutData.getId());
@@ -252,7 +257,14 @@ public class Col extends PanelAbstract<EntityModel> implements HasDynamicallyVis
 
 
         // collections
-        final List<CollectionLayoutData> collections = bs3Col.getCollections();
+        final List<CollectionLayoutData> collections =
+                FluentIterable.from(bs3Col.getCollections()).filter(
+                    new Predicate<CollectionLayoutData>() {
+                        @Override
+                        public boolean apply(final CollectionLayoutData collectionLayoutData) {
+                            return collectionLayoutData.getMetadataError() == null;
+                        }
+                    }).toList();
         if(!collections.isEmpty()) {
             final RepeatingViewWithDynamicallyVisibleContent collectionRv =
                     new RepeatingViewWithDynamicallyVisibleContent(ID_COLLECTIONS);

http://git-wip-us.apache.org/repos/asf/isis/blob/7628fc9d/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 f1d05e1..5c5a507 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
@@ -36,6 +36,7 @@ import org.apache.isis.core.metamodel.adapter.version.ConcurrencyException;
 import org.apache.isis.core.metamodel.consent.InteractionInitiatedBy;
 import org.apache.isis.core.metamodel.deployment.DeploymentCategory;
 import org.apache.isis.core.metamodel.facets.object.grid.GridFacet;
+import org.apache.isis.core.metamodel.spec.ObjectSpecification;
 import org.apache.isis.core.metamodel.spec.feature.ObjectMember;
 import org.apache.isis.core.runtime.system.DeploymentType;
 import org.apache.isis.core.runtime.system.context.IsisContext;
@@ -130,29 +131,13 @@ public class EntityPage extends PageAbstract {
             throw new ObjectMember.AuthorizationException();
         }
 
-
-
-
-        //
-        // invalidate the cache so that can do dynamic reloading of layout metadata etc.
-        //
-        final GridFacet facet = entityModel.getTypeOfSpecification()
-                .getFacet(GridFacet.class);
+        final ObjectSpecification objectSpec = entityModel.getTypeOfSpecification();
+        final GridFacet facet = objectSpec.getFacet(GridFacet.class);
         if(facet != null) {
             // 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.
-
-            // 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();
-
         }
 
 


[15/50] [abbrv] isis git commit: ISIS-993: suppress properties from fieldsets that should be invisible.

Posted by da...@apache.org.
ISIS-993: suppress properties from fieldsets that should be invisible.


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

Branch: refs/heads/master
Commit: 2bde2a1e50b025d1a052829b99376da77a8a66b2
Parents: d2340eb
Author: Dan Haywood <da...@haywood-associates.co.uk>
Authored: Sun Feb 14 15:21:13 2016 +0000
Committer: Dan Haywood <da...@haywood-associates.co.uk>
Committed: Sun Feb 14 15:21:13 2016 +0000

----------------------------------------------------------------------
 .../wicket/ui/components/entity/fieldset/PropertyGroup.java   | 7 +++++++
 1 file changed, 7 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/isis/blob/2bde2a1e/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/fieldset/PropertyGroup.java
----------------------------------------------------------------------
diff --git a/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/fieldset/PropertyGroup.java b/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/fieldset/PropertyGroup.java
index 3c12319..7cb2052 100644
--- a/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/fieldset/PropertyGroup.java
+++ b/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/fieldset/PropertyGroup.java
@@ -27,10 +27,13 @@ import org.apache.wicket.markup.html.basic.Label;
 import org.apache.wicket.markup.repeater.RepeatingView;
 
 import org.apache.isis.applib.annotation.ActionLayout;
+import org.apache.isis.applib.annotation.Where;
 import org.apache.isis.applib.layout.component.FieldSet;
 import org.apache.isis.applib.layout.component.PropertyLayoutData;
 import org.apache.isis.core.metamodel.adapter.ObjectAdapter;
 import org.apache.isis.core.metamodel.adapter.mgr.AdapterManager;
+import org.apache.isis.core.metamodel.consent.Consent;
+import org.apache.isis.core.metamodel.consent.InteractionInitiatedBy;
 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.OneToOneAssociation;
@@ -81,6 +84,10 @@ public class PropertyGroup extends PanelAbstract<EntityModel> {
         final List<PropertyLayoutData> properties = fieldSet.getProperties();
         for (PropertyLayoutData property : properties) {
             final ObjectAssociation association = adapter.getSpecification().getAssociation(property.getId());
+            final Consent visibility = association.isVisible(adapter, InteractionInitiatedBy.USER, Where.OBJECT_FORMS);
+            if(visibility.isVetoed()) {
+                continue;
+            }
 
             final WebMarkupContainer propertyRvContainer = new WebMarkupContainer(propertyRv.newChildId());
             propertyRv.add(propertyRvContainer);


[16/50] [abbrv] isis git commit: ISIS-993: better derivation of default grid from existing metadata when none is available.

Posted by da...@apache.org.
ISIS-993: better derivation of default grid from existing metadata when none is available.

Also:
- allow actions to be associated in @MemberOrder#name with fieldset ids; wire up to first property within that fieldset
- associate the (framework-provided downloadLayoutXml and downloadJdoMetadata actions with "metadata" fieldset.
- some fixes for CSS for dropdowns


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

Branch: refs/heads/master
Commit: 697bcdbc59341a10f4bb6f645bb3c856ab6226fc
Parents: 2bde2a1
Author: Dan Haywood <da...@haywood-associates.co.uk>
Authored: Mon Feb 15 08:54:05 2016 +0000
Committer: Dan Haywood <da...@haywood-associates.co.uk>
Committed: Mon Feb 15 08:54:05 2016 +0000

----------------------------------------------------------------------
 .../layout/Object_downloadLayoutXml.java        |  5 +-
 .../facets/object/grid/GridFacetDefault.java    |  3 +-
 .../bootstrap3/GridNormalizerServiceBS3.java    | 73 +++++++++++++++-----
 .../Persistable_downloadJdoMetadata.java        |  5 +-
 .../wicket/ui/pages/bootstrap-overrides.css     |  9 +++
 5 files changed, 72 insertions(+), 23 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/isis/blob/697bcdbc/core/applib/src/main/java/org/apache/isis/applib/services/layout/Object_downloadLayoutXml.java
----------------------------------------------------------------------
diff --git a/core/applib/src/main/java/org/apache/isis/applib/services/layout/Object_downloadLayoutXml.java b/core/applib/src/main/java/org/apache/isis/applib/services/layout/Object_downloadLayoutXml.java
index 3679e0a..eee95b0 100644
--- a/core/applib/src/main/java/org/apache/isis/applib/services/layout/Object_downloadLayoutXml.java
+++ b/core/applib/src/main/java/org/apache/isis/applib/services/layout/Object_downloadLayoutXml.java
@@ -49,9 +49,10 @@ public class Object_downloadLayoutXml {
             restrictTo = RestrictTo.PROTOTYPING
     )
     @ActionLayout(
-            cssClassFa = "fa-download"
+            cssClassFa = "fa-download",
+            position = ActionLayout.Position.PANEL_DROPDOWN
     )
-    @MemberOrder(sequence = "550.1")
+    @MemberOrder(name = "Metadata", sequence = "550.1")
     public Object $$(
             @ParameterLayout(named = "File name")
             final String fileName,

http://git-wip-us.apache.org/repos/asf/isis/blob/697bcdbc/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 9cdabb5..e02efde 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
@@ -150,8 +150,9 @@ public class GridFacetDefault
             final List<String> leftMemberGroups = memberGroupNames;
             for (String memberGroup : leftMemberGroups) {
                 final FieldSet fieldSet = new FieldSet();
-                fieldSet.setId(memberGroup); // to bind to later via @MemberOrder#name()
                 fieldSet.setName(memberGroup);
+                // fieldSet's id will be derived from the name later
+                // during normalization phase.
                 if(unreferencedProperties && col.getFieldSets().isEmpty()) {
                     fieldSet.setUnreferencedProperties(true);
                 }

http://git-wip-us.apache.org/repos/asf/isis/blob/697bcdbc/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 1cb65c9..d5aed0c 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
@@ -26,11 +26,13 @@ import javax.annotation.Nullable;
 
 import com.google.common.base.Function;
 import com.google.common.base.Predicate;
+import com.google.common.base.Strings;
 import com.google.common.collect.FluentIterable;
 import com.google.common.collect.ImmutableList;
 import com.google.common.collect.Lists;
 import com.google.common.collect.Maps;
 
+import org.apache.isis.applib.annotation.ActionLayout;
 import org.apache.isis.applib.annotation.DomainService;
 import org.apache.isis.applib.annotation.NatureOfService;
 import org.apache.isis.applib.layout.component.ActionLayoutData;
@@ -71,7 +73,8 @@ public class GridNormalizerServiceBS3 extends GridNormalizerServiceAbstract<BS3G
             final Grid grid,
             final Map<String, OneToOneAssociation> oneToOneAssociationById,
             final Map<String, OneToManyAssociation> oneToManyAssociationById,
-            final Map<String, ObjectAction> objectActionById, final ObjectSpecification objectSpec) {
+            final Map<String, ObjectAction> objectActionById,
+            final ObjectSpecification objectSpec) {
 
         final BS3Grid bs3Grid = (BS3Grid) grid;
 
@@ -83,6 +86,7 @@ public class GridNormalizerServiceBS3 extends GridNormalizerServiceAbstract<BS3G
         // find all row and col ids
         // ensure that all Ids are different
 
+        final List<String> gridIds = Lists.newArrayList();
         final LinkedHashMap<String, BS3Row> rowIds = Maps.newLinkedHashMap();
         final LinkedHashMap<String, BS3Col> colIds = Maps.newLinkedHashMap();
         final LinkedHashMap<String, FieldSet> fieldSetIds = Maps.newLinkedHashMap();
@@ -96,12 +100,13 @@ public class GridNormalizerServiceBS3 extends GridNormalizerServiceAbstract<BS3G
                 if(id == null) {
                     return;
                 }
-                if(rowIds.containsKey(id) || colIds.containsKey(id)) {
-                    bs3Row.setMetadataError("There is another col with this id");
+                if(gridIds.contains(id)) {
+                    bs3Row.setMetadataError("There is another element in the grid with this id");
                     duplicateIdDetected.set(true);
                     return;
                 }
                 rowIds.put(id, bs3Row);
+                gridIds.add(id);
             }
 
             @Override
@@ -110,26 +115,29 @@ public class GridNormalizerServiceBS3 extends GridNormalizerServiceAbstract<BS3G
                 if(id == null) {
                     return;
                 }
-                if(rowIds.containsKey(id) || colIds.containsKey(id)) {
-                    bs3Col.setMetadataError("There is another col with this id");
+                if(gridIds.contains(id)) {
+                    bs3Col.setMetadataError("There is another element in the grid with this id");
                     duplicateIdDetected.set(true);
                     return;
                 }
                 colIds.put(id, bs3Col);
+                gridIds.add(id);
             }
 
             @Override
             public void visit(final FieldSet fieldSet) {
-                final String id = fieldSet.getId();
+                String id = fieldSet.getId();
                 if(id == null) {
-                    return;
+                    final String name = fieldSet.getName();
+                    fieldSet.setId(id = asId(name));
                 }
-                if(rowIds.containsKey(id) || fieldSetIds.containsKey(id)) {
-                    fieldSet.setMetadataError("There is another fieldset with this id");
+                if(gridIds.contains(id)) {
+                    fieldSet.setMetadataError("There is another element in the grid with this id");
                     duplicateIdDetected.set(true);
                     return;
                 }
                 fieldSetIds.put(id, fieldSet);
+                gridIds.add(id);
             }
         });
 
@@ -231,20 +239,19 @@ public class GridNormalizerServiceBS3 extends GridNormalizerServiceAbstract<BS3G
             propertyIds.get(surplusPropertyId).setMetadataError("No such property");
         }
 
+        final Map<String, List<OneToOneAssociation>> boundAssociationsByFieldSetId = Maps.newHashMap();
         if(!missingPropertyIds.isEmpty()) {
-            final Map<String, List<OneToOneAssociation>> boundAssociationsByFieldSetId = Maps.newHashMap();
             final List<String> unboundPropertyIds = Lists.newArrayList(missingPropertyIds);
             for (String missingPropertyId : missingPropertyIds) {
                 final OneToOneAssociation otoa = oneToOneAssociationById.get(missingPropertyId);
                 final MemberOrderFacet memberOrderFacet = otoa.getFacet(MemberOrderFacet.class);
                 if(memberOrderFacet != null) {
-                    final String name = memberOrderFacet.name();
-                    if(fieldSetIds.containsKey(name)) {
-                        List<OneToOneAssociation> boundAssociations =
-                                boundAssociationsByFieldSetId.get(name);
+                    final String id = asId(memberOrderFacet.name());
+                    if(fieldSetIds.containsKey(id)) {
+                        List<OneToOneAssociation> boundAssociations = boundAssociationsByFieldSetId.get(id);
                         if(boundAssociations == null) {
                             boundAssociations = Lists.newArrayList();
-                            boundAssociationsByFieldSetId.put(name, boundAssociations);
+                            boundAssociationsByFieldSetId.put(id, boundAssociations);
                         }
                         boundAssociations.add(otoa);
                         unboundPropertyIds.remove(missingPropertyId);
@@ -316,7 +323,8 @@ public class GridNormalizerServiceBS3 extends GridNormalizerServiceAbstract<BS3G
         final List<String> missingActionIds =
                 FluentIterable.from(actionIdTuple.second)
                         .filter(new Predicate<String>() {
-                            @Override public boolean apply(@Nullable final String actionId) {
+                            @Override
+                            public boolean apply(final String actionId) {
                                 final ObjectAction oa = objectActionById.get(actionId);
                                 final MemberOrderFacet memberOrderFacet = oa.getFacet(MemberOrderFacet.class);
                                 if(memberOrderFacet == null) {
@@ -326,8 +334,29 @@ public class GridNormalizerServiceBS3 extends GridNormalizerServiceAbstract<BS3G
                                 if (memberOrderName == null) {
                                     return true;
                                 }
-                                return  !oneToOneAssociationById.containsKey(memberOrderName) &&
-                                        !oneToManyAssociationById.containsKey(memberOrderName);
+                                final String id = asId(memberOrderName);
+                                if (oneToOneAssociationById.containsKey(id)) {
+                                    return false;
+                                }
+                                if (oneToManyAssociationById.containsKey(id)) {
+                                    return false;
+                                }
+                                // if the @MemberOrder references a field set, then don't mark it as missing, but
+                                // instead explicitly add it to the list of actions of that fieldset.
+                                // (note we only do this provided we already know that
+                                // there is at least one property for said fieldset)
+                                if(boundAssociationsByFieldSetId.containsKey(id)) {
+                                    final List<OneToOneAssociation> oneToOneAssociations =
+                                            boundAssociationsByFieldSetId.get(id);
+                                    if(!oneToOneAssociations.isEmpty()) {
+                                        final ActionLayoutData actionLayoutData = new ActionLayoutData(actionId);
+                                        actionLayoutData.setPosition(ActionLayout.Position.PANEL_DROPDOWN);
+                                        fieldSetIds.get(id).getActions().add(actionLayoutData);
+                                    }
+                                    return false;
+                                }
+                                // is missing after all.
+                                return true;
                             }
                         })
                         .toList();
@@ -351,6 +380,14 @@ public class GridNormalizerServiceBS3 extends GridNormalizerServiceAbstract<BS3G
         return true;
     }
 
+    static String asId(final String str) {
+        if(Strings.isNullOrEmpty(str)) {
+            return str;
+        }
+        final char c = str.charAt(0);
+        return Character.toLowerCase(c) + str.substring(1).replaceAll("\\s+", "");
+    }
+
     private static Comparator<ObjectAssociation> byMemberOrderSequence() {
         return new Comparator<ObjectAssociation>() {
             private final DeweyOrderComparator deweyOrderComparator = new DeweyOrderComparator();

http://git-wip-us.apache.org/repos/asf/isis/blob/697bcdbc/core/metamodel/src/main/java/org/apache/isis/core/metamodel/services/jdosupport/Persistable_downloadJdoMetadata.java
----------------------------------------------------------------------
diff --git a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/services/jdosupport/Persistable_downloadJdoMetadata.java b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/services/jdosupport/Persistable_downloadJdoMetadata.java
index ffa1368..d0b136f 100644
--- a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/services/jdosupport/Persistable_downloadJdoMetadata.java
+++ b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/services/jdosupport/Persistable_downloadJdoMetadata.java
@@ -52,9 +52,10 @@ public class Persistable_downloadJdoMetadata {
             restrictTo = RestrictTo.PROTOTYPING
     )
     @ActionLayout(
-            cssClassFa = "fa-download"
+            cssClassFa = "fa-download",
+            position = ActionLayout.Position.PANEL_DROPDOWN
     )
-    @MemberOrder(sequence = "800.1")
+    @MemberOrder(name = "Metadata", sequence = "800.1")
     public Clob $$(
             @ParameterLayout(named = ".jdo file name")
             final String fileName) throws JAXBException, IOException {

http://git-wip-us.apache.org/repos/asf/isis/blob/697bcdbc/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 5df7fcb..83954d7 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
@@ -365,6 +365,7 @@ div.entityHeaderPanel .iconAndTitle{
 
 div.entityHeaderPanel .iconAndTitleLabel {
     float: left;
+    margin-bottom: 10px;
 }
 
 div.entityHeaderPanel .entityActions .cssMenuPanel .cssMenuItems:first-child {
@@ -756,4 +757,12 @@ tr.headers th form input {
 
 .tabbable {
     padding-bottom: 10px;
+}
+
+.additionalLinkListDropDown ul.dropdown-menu li.additionalLinkItem {
+    width: 100%;
+}
+.additionalLinkListDropDown ul.dropdown-menu {
+    padding-top: 0%;
+    padding-bottom: 0%;
 }
\ No newline at end of file


[37/50] [abbrv] isis git commit: ISIS-993: fixes to prevent SpecificationCacheDefault from getting out-of-whack (by mapping ObjectSpecId to className, rather than spec; can then use the className to look up the spec in turn).

Posted by da...@apache.org.
ISIS-993: fixes to prevent SpecificationCacheDefault from getting out-of-whack (by mapping ObjectSpecId to className, rather than spec; can then use the className to look up the spec in turn).

This stuff came about because reloading of grid after change was only working if invalidated the class spec (= refresh twice).


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

Branch: refs/heads/master
Commit: 48fe231be5f2946d81eb2192ebfbdd958bbe21a6
Parents: 23f9233
Author: Dan Haywood <da...@haywood-associates.co.uk>
Authored: Fri Feb 26 14:38:55 2016 +0000
Committer: Dan Haywood <da...@haywood-associates.co.uk>
Committed: Fri Feb 26 14:39:37 2016 +0000

----------------------------------------------------------------------
 .../specloader/ObjectReflectorDefault.java      |  2 +-
 .../specloader/SpecificationCacheDefault.java   | 23 +++++++++++++-------
 2 files changed, 16 insertions(+), 9 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/isis/blob/48fe231b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/specloader/ObjectReflectorDefault.java
----------------------------------------------------------------------
diff --git a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/specloader/ObjectReflectorDefault.java b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/specloader/ObjectReflectorDefault.java
index a48fab0..2957dd7 100644
--- a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/specloader/ObjectReflectorDefault.java
+++ b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/specloader/ObjectReflectorDefault.java
@@ -385,7 +385,7 @@ public final class ObjectReflectorDefault
             // don't have an ObjectSpecId; hence the guard.
             if(spec.containsDoOpFacet(ObjectSpecIdFacet.class)) {
                 ObjectSpecId specId = spec.getSpecId();
-                if (getCache().getByObjectType(specId) != spec) {
+                if (getCache().getByObjectType(specId) == null) {
                     getCache().recache(spec);
                 }
             }

http://git-wip-us.apache.org/repos/asf/isis/blob/48fe231b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/specloader/SpecificationCacheDefault.java
----------------------------------------------------------------------
diff --git a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/specloader/SpecificationCacheDefault.java b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/specloader/SpecificationCacheDefault.java
index 1e4df63..4d2b476 100644
--- a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/specloader/SpecificationCacheDefault.java
+++ b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/specloader/SpecificationCacheDefault.java
@@ -34,7 +34,7 @@ import org.apache.isis.core.metamodel.specloader.validator.ValidationFailures;
 class SpecificationCacheDefault {
     
     private final Map<String, ObjectSpecification> specByClassName = Maps.newHashMap();
-    private Map<ObjectSpecId, ObjectSpecification> specById;
+    private Map<ObjectSpecId, String> classNameBySpecId;
 
     public ObjectSpecification get(final String className) {
         return specByClassName.get(className);
@@ -58,16 +58,20 @@ class SpecificationCacheDefault {
         if (!isInitialized()) {
             throw new IllegalStateException("SpecificationCache by object type has not yet been initialized");
         }
-        return specById.get(objectSpecID);
+        final String className = classNameBySpecId.get(objectSpecID);
+        return className != null ? specByClassName.get(className) : null;
     }
 
     /**
      * Populated as a result of running {@link MetaModelValidator#validate(ValidationFailures)} validation} after
      * xxxallxxx most specs have been loaded.
      */
-    void setCacheBySpecId(Map<ObjectSpecId, ObjectSpecification> specById) {
-        this.specById = Maps.newHashMap();
-        this.specById.putAll(specById);
+    void setCacheBySpecId(final Map<ObjectSpecId, ObjectSpecification> specById) {
+        this.classNameBySpecId = Maps.newHashMap();
+        for (ObjectSpecId objectSpecId : specById.keySet()) {
+            final ObjectSpecification objectSpec = specById.get(objectSpecId);
+            this.classNameBySpecId.put(objectSpecId, objectSpec.getCorrespondingClass().getName());
+        }
     }
 
     public ObjectSpecification remove(String typeName) {
@@ -77,7 +81,7 @@ class SpecificationCacheDefault {
                 // umm.  It turns out that anonymous inner classes (eg org.estatio.dom.WithTitleGetter$ToString$1)
                 // don't have an ObjectSpecId; hence the guard.
                 ObjectSpecId specId = removed.getSpecId();
-                specById.remove(specId);
+                classNameBySpecId.remove(specId);
             }
         }
         return removed;
@@ -92,11 +96,14 @@ class SpecificationCacheDefault {
             // just ignore.
             return;
         }
-        specById.put(spec.getSpecId(), spec);
+        if(!spec.containsDoOpFacet(ObjectSpecIdFacet.class)) {
+            return;
+        }
+        classNameBySpecId.put(spec.getSpecId(), spec.getCorrespondingClass().getName());
     }
     
     boolean isInitialized() {
-        return specById != null;
+        return classNameBySpecId != null;
     }
 
 }


[18/50] [abbrv] isis git commit: ISIS-993: dynamically evaluate visibility of tabpanel, tab, row, col, fieldset and collection (suppress parent containers if there would be nothing to show).

Posted by da...@apache.org.
ISIS-993: dynamically evaluate visibility of tabpanel, tab, row, col, fieldset and collection (suppress parent containers if there would be nothing to show).


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

Branch: refs/heads/master
Commit: f65487e46008680f6368afc186e5f43513dfc50b
Parents: 30bfe8c
Author: Dan Haywood <da...@haywood-associates.co.uk>
Authored: Mon Feb 15 13:22:02 2016 +0000
Committer: Dan Haywood <da...@haywood-associates.co.uk>
Committed: Mon Feb 15 13:22:02 2016 +0000

----------------------------------------------------------------------
 .../ActionResultResponseType.java               |  20 +++-
 .../collection/EntityCollectionPanel.java       | 109 +++++++++++--------
 .../entity/fieldset/PropertyGroup.html          |   2 +-
 .../entity/fieldset/PropertyGroup.java          |  73 ++++++++++---
 .../ui/components/layout/bs3/col/Col.java       |  92 +++++++++++-----
 ...eatingViewWithDynamicallyVisibleContent.java |  54 +++++++++
 .../ui/components/layout/bs3/row/Row.java       |  32 ++++--
 .../layout/bs3/tabs/TabGroupPanel.java          |  23 +++-
 .../ui/components/layout/bs3/tabs/TabPanel.java |  49 +++++++--
 .../ui/panels/HasDynamicallyVisibleContent.java |  26 +++++
 .../java/domainapp/dom/simple/SimpleObject.java |   7 ++
 11 files changed, 375 insertions(+), 112 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/isis/blob/f65487e4/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/actionresponse/ActionResultResponseType.java
----------------------------------------------------------------------
diff --git a/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/actionresponse/ActionResultResponseType.java b/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/actionresponse/ActionResultResponseType.java
index 606d969..6b98431 100644
--- a/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/actionresponse/ActionResultResponseType.java
+++ b/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/actionresponse/ActionResultResponseType.java
@@ -19,12 +19,15 @@ package org.apache.isis.viewer.wicket.ui.actionresponse;
 import java.net.URL;
 import java.util.Collection;
 import java.util.List;
+import java.util.concurrent.Callable;
+
 import com.google.common.collect.Lists;
 import org.apache.wicket.ajax.AjaxRequestTarget;
 import org.apache.wicket.request.IRequestHandler;
 import org.apache.isis.applib.value.Blob;
 import org.apache.isis.applib.value.Clob;
 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.object.value.ValueFacet;
 import org.apache.isis.core.metamodel.spec.ObjectSpecification;
@@ -136,10 +139,23 @@ public enum ActionResultResponseType {
         return IsisContext.getPersistenceSession().adapterFor(pojo);
     }
 
-    private static ActionResultResponse toEntityPage(final ActionModel model, final ObjectAdapter actualAdapter, ConcurrencyException exIfAny) {
+    private static ActionResultResponse toEntityPage(final ActionModel model, final ObjectAdapter actualAdapter, final ConcurrencyException exIfAny) {
         // this will not preserve the URL (because pageParameters are not copied over)
         // but trying to preserve them seems to cause the 302 redirect to be swallowed somehow
-        final EntityPage entityPage = new EntityPage(actualAdapter, exIfAny);
+        final EntityPage entityPage =
+
+                // disabling concurrency checking after the layout XML (grid) feature
+                // was throwing an exception when rebuild grid after invoking action
+                // not certain why that would be the case, but think it should be
+                // safe to simply disable while recreating the page to re-render back to user.
+                AdapterManager.ConcurrencyChecking.executeWithConcurrencyCheckingDisabled(
+                    new Callable<EntityPage>() {
+                        @Override public EntityPage call() throws Exception {
+                            return new EntityPage(actualAdapter, exIfAny);
+                        }
+                    }
+            );
+
         return ActionResultResponse.toPage(entityPage);
     }
 

http://git-wip-us.apache.org/repos/asf/isis/blob/f65487e4/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/collection/EntityCollectionPanel.java
----------------------------------------------------------------------
diff --git a/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/collection/EntityCollectionPanel.java b/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/collection/EntityCollectionPanel.java
index f5a6c16..0fa887d 100644
--- a/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/collection/EntityCollectionPanel.java
+++ b/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/collection/EntityCollectionPanel.java
@@ -26,7 +26,10 @@ import org.apache.wicket.markup.html.WebMarkupContainer;
 import org.apache.wicket.markup.html.basic.Label;
 import org.apache.wicket.model.Model;
 
+import org.apache.isis.applib.annotation.Where;
 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.facets.all.named.NamedFacet;
 import org.apache.isis.core.metamodel.facets.members.cssclass.CssClassFacet;
 import org.apache.isis.core.metamodel.spec.feature.OneToManyAssociation;
@@ -39,14 +42,16 @@ import org.apache.isis.viewer.wicket.ui.components.actionmenu.entityactions.Addi
 import org.apache.isis.viewer.wicket.ui.components.collection.CollectionPanel;
 import org.apache.isis.viewer.wicket.ui.components.collection.selector.CollectionSelectorHelper;
 import org.apache.isis.viewer.wicket.ui.components.collection.selector.CollectionSelectorPanel;
+import org.apache.isis.viewer.wicket.ui.panels.HasDynamicallyVisibleContent;
 import org.apache.isis.viewer.wicket.ui.panels.PanelAbstract;
+import org.apache.isis.viewer.wicket.ui.util.Components;
 import org.apache.isis.viewer.wicket.ui.util.CssClassAppender;
 
 /**
  * {@link PanelAbstract Panel} representing the properties of an entity, as per
  * the provided {@link EntityModel}.
  */
-public class EntityCollectionPanel extends PanelAbstract<EntityModel> {
+public class EntityCollectionPanel extends PanelAbstract<EntityModel> implements HasDynamicallyVisibleContent {
 
     private static final long serialVersionUID = 1L;
 
@@ -59,81 +64,99 @@ public class EntityCollectionPanel extends PanelAbstract<EntityModel> {
 
     private final ScopedSessionAttribute<Integer> selectedItemSessionAttribute;
 
+    final WebMarkupContainer div;
+
     public EntityCollectionPanel(final String id, final EntityModel entityModel) {
         super(id, entityModel);
 
         selectedItemSessionAttribute = ScopedSessionAttribute.create(
                 entityModel, this,  EntityCollectionModel.SESSION_ATTRIBUTE_SELECTED_ITEM);
 
+        div = buildGui();
     }
 
     /**
-     * Build UI only after added to parent.
+     * Attach UI only after added to parent.
      */
     public void onInitialize() {
         super.onInitialize();
-        buildGui();
-    }
 
-    private void buildGui() {
+        final WebMarkupContainer panel = this;
+        if(contentDynamicallyVisible) {
+            panel.add(div);
+        } else {
+            Components.permanentlyHide(panel, div.getId());
+        }
+
+    }
 
-        final WebMarkupContainer collectionRvContainer = this;
+    private WebMarkupContainer buildGui() {
+        final WebMarkupContainer div = new WebMarkupContainer(ID_COLLECTION_GROUP);
 
         final EntityCollectionModel entityCollectionModel = EntityCollectionModel.createParented(getModel());
         final OneToManyAssociation association = entityCollectionModel.getCollectionMemento().getCollection();
+        final ObjectAdapter objectAdapter = getModel().getObject();
+        final Consent visibility = association.isVisible(objectAdapter, InteractionInitiatedBy.USER, Where.OBJECT_FORMS);
 
-        final CssClassFacet facet = association.getFacet(CssClassFacet.class);
-        if(facet != null) {
-            final ObjectAdapter objectAdapter = getModel().getObject();
-            final String cssClass = facet.cssClass(objectAdapter);
-            CssClassAppender.appendCssClassTo(collectionRvContainer, cssClass);
-        }
+        if(visibility.isAllowed()) {
 
-        final WebMarkupContainer fieldSet = new WebMarkupContainer(ID_COLLECTION_GROUP);
-        collectionRvContainer.add(fieldSet);
+            contentDynamicallyVisible = true;
 
-        final CollectionPanel collectionPanel = new CollectionPanel(ID_COLLECTION, entityCollectionModel);
+            final CssClassFacet facet = association.getFacet(CssClassFacet.class);
+            if(facet != null) {
+                final String cssClass = facet.cssClass(objectAdapter);
+                CssClassAppender.appendCssClassTo(div, cssClass);
+            }
 
-        Label labelComponent = collectionPanel.createLabel(ID_COLLECTION_NAME, association.getName());
-        final NamedFacet namedFacet = association.getFacet(NamedFacet.class);
-        labelComponent.setEscapeModelStrings(namedFacet == null || namedFacet.escaped());
-        fieldSet.add(labelComponent);
+            final CollectionPanel collectionPanel = new CollectionPanel(ID_COLLECTION, entityCollectionModel);
 
-        final String description = association.getDescription();
-        if(description != null) {
-            labelComponent.add(new AttributeAppender("title", Model.of(description)));
-        }
+            Label labelComponent = collectionPanel.createLabel(ID_COLLECTION_NAME, association.getName());
+            final NamedFacet namedFacet = association.getFacet(NamedFacet.class);
+            labelComponent.setEscapeModelStrings(namedFacet == null || namedFacet.escaped());
+            div.add(labelComponent);
 
-        final List<LinkAndLabel> links = entityCollectionModel.getLinks();
-        AdditionalLinksPanel.addAdditionalLinks (fieldSet,ID_ADDITIONAL_LINKS, links, AdditionalLinksPanel.Style.INLINE_LIST);
+            final String description = association.getDescription();
+            if(description != null) {
+                labelComponent.add(new AttributeAppender("title", Model.of(description)));
+            }
 
-        final CollectionSelectorHelper selectorHelper =
-                new CollectionSelectorHelper(entityCollectionModel, getComponentFactoryRegistry(),
-                        selectedItemSessionAttribute);
+            final List<LinkAndLabel> links = entityCollectionModel.getLinks();
+            AdditionalLinksPanel.addAdditionalLinks (div,ID_ADDITIONAL_LINKS, links, AdditionalLinksPanel.Style.INLINE_LIST);
 
-        final List<ComponentFactory> componentFactories = selectorHelper.getComponentFactories();
+            final CollectionSelectorHelper selectorHelper =
+                    new CollectionSelectorHelper(entityCollectionModel, getComponentFactoryRegistry(),
+                            selectedItemSessionAttribute);
 
-        if (componentFactories.size() <= 1) {
-            permanentlyHide(ID_SELECTOR_DROPDOWN);
-        } else {
-            CollectionSelectorPanel selectorDropdownPanel =
-                    new CollectionSelectorPanel(ID_SELECTOR_DROPDOWN,
-                    entityCollectionModel, selectedItemSessionAttribute);
+            final List<ComponentFactory> componentFactories = selectorHelper.getComponentFactories();
 
-            final Model<ComponentFactory> componentFactoryModel = new Model<>();
+            if (componentFactories.size() <= 1) {
+                permanentlyHide(ID_SELECTOR_DROPDOWN);
+            } else {
+                CollectionSelectorPanel selectorDropdownPanel =
+                        new CollectionSelectorPanel(ID_SELECTOR_DROPDOWN,
+                                entityCollectionModel, selectedItemSessionAttribute);
 
-            final int selected = selectorHelper.honourViewHintElseDefault(selectorDropdownPanel);
+                final Model<ComponentFactory> componentFactoryModel = new Model<>();
 
-            ComponentFactory selectedComponentFactory = componentFactories.get(selected);
-            componentFactoryModel.setObject(selectedComponentFactory);
+                final int selected = selectorHelper.honourViewHintElseDefault(selectorDropdownPanel);
 
-            this.setOutputMarkupId(true);
-            fieldSet.addOrReplace(selectorDropdownPanel);
+                ComponentFactory selectedComponentFactory = componentFactories.get(selected);
+                componentFactoryModel.setObject(selectedComponentFactory);
 
-            collectionPanel.setSelectorDropdownPanel(selectorDropdownPanel);
+                this.setOutputMarkupId(true);
+                div.addOrReplace(selectorDropdownPanel);
+
+                collectionPanel.setSelectorDropdownPanel(selectorDropdownPanel);
+            }
+            div.addOrReplace(collectionPanel);
         }
-        fieldSet.addOrReplace(collectionPanel);
+        return div;
     }
 
+    private boolean contentDynamicallyVisible = false;
+    @Override
+    public boolean isContentDynamicallyVisible() {
+        return contentDynamicallyVisible;
+    }
 
 }

http://git-wip-us.apache.org/repos/asf/isis/blob/f65487e4/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 38245a0..5b402cb 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
@@ -20,7 +20,7 @@
 <html xmlns:wicket="http://wicket.apache.org">
     <body>
         <wicket:panel>
-            <fieldset class="memberGroup">
+            <fieldset class="memberGroup" wicket:id="memberGroup">
                 <div class="panel panel-default">
                     <div class="panel-heading">
                         <span wicket:id="memberGroupName" class="panel-title">[group name]</span>

http://git-wip-us.apache.org/repos/asf/isis/blob/f65487e4/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/fieldset/PropertyGroup.java
----------------------------------------------------------------------
diff --git a/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/fieldset/PropertyGroup.java b/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/fieldset/PropertyGroup.java
index 7cb2052..fac77cf 100644
--- a/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/fieldset/PropertyGroup.java
+++ b/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/fieldset/PropertyGroup.java
@@ -20,6 +20,12 @@ package org.apache.isis.viewer.wicket.ui.components.entity.fieldset;
 
 import java.util.List;
 
+import javax.annotation.Nullable;
+
+import com.google.common.base.Function;
+import com.google.common.base.Predicate;
+import com.google.common.collect.FluentIterable;
+import com.google.common.collect.ImmutableList;
 import com.google.common.collect.Lists;
 
 import org.apache.wicket.markup.html.WebMarkupContainer;
@@ -44,10 +50,13 @@ 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.actionmenu.entityactions.AdditionalLinksPanel;
 import org.apache.isis.viewer.wicket.ui.components.actionmenu.entityactions.EntityActionUtil;
+import org.apache.isis.viewer.wicket.ui.panels.HasDynamicallyVisibleContent;
 import org.apache.isis.viewer.wicket.ui.panels.PanelAbstract;
+import org.apache.isis.viewer.wicket.ui.util.Components;
 
-public class PropertyGroup extends PanelAbstract<EntityModel> {
+public class PropertyGroup extends PanelAbstract<EntityModel> implements HasDynamicallyVisibleContent {
 
+    private static final String ID_MEMBER_GROUP = "memberGroup";
     private static final String ID_MEMBER_GROUP_NAME = "memberGroupName";
 
     private static final String ID_ASSOCIATED_ACTION_LINKS_PANEL = "associatedActionLinksPanel";
@@ -70,30 +79,43 @@ public class PropertyGroup extends PanelAbstract<EntityModel> {
     }
 
     private void buildGui() {
-        String groupName = fieldSet.getName();
+
+        final List<PropertyLayoutData> properties = fieldSet.getProperties();
+
         // changed to NO_CHECK because more complex BS3 layouts trip concurrency exception (haven't investigated as to why).
         final ObjectAdapter adapter = getModel().load(AdapterManager.ConcurrencyChecking.NO_CHECK);
 
-        add(new Label(ID_MEMBER_GROUP_NAME, groupName));
+        final WebMarkupContainer div = new WebMarkupContainer(ID_MEMBER_GROUP);
 
-        final List<LinkAndLabel> memberGroupActions = Lists.newArrayList();
+        String groupName = fieldSet.getName();
 
-        final RepeatingView propertyRv = new RepeatingView(ID_PROPERTIES);
-        add(propertyRv);
+        div.add(new Label(ID_MEMBER_GROUP_NAME, groupName));
 
-        final List<PropertyLayoutData> properties = fieldSet.getProperties();
-        for (PropertyLayoutData property : properties) {
-            final ObjectAssociation association = adapter.getSpecification().getAssociation(property.getId());
-            final Consent visibility = association.isVisible(adapter, InteractionInitiatedBy.USER, Where.OBJECT_FORMS);
-            if(visibility.isVetoed()) {
-                continue;
-            }
+        final List<LinkAndLabel> memberGroupActions = Lists.newArrayList();
 
+        final RepeatingView propertyRv = new RepeatingView(ID_PROPERTIES);
+        div.add(propertyRv);
+
+        final ImmutableList<ObjectAssociation> visibleAssociations = FluentIterable.from(properties)
+                .transform(new Function<PropertyLayoutData, ObjectAssociation>() {
+                    @Override public ObjectAssociation apply(final PropertyLayoutData propertyLayoutData) {
+                        return adapter.getSpecification().getAssociation(propertyLayoutData.getId());
+                    }
+                })
+                .filter(new Predicate<ObjectAssociation>() {
+                    @Override public boolean apply(@Nullable final ObjectAssociation objectAssociation) {
+                        final Consent visibility =
+                                objectAssociation .isVisible(adapter, InteractionInitiatedBy.USER, Where.OBJECT_FORMS);
+                        return visibility.isAllowed();
+                    }
+                })
+                .toList();
+
+        for (final ObjectAssociation association : visibleAssociations) {
             final WebMarkupContainer propertyRvContainer = new WebMarkupContainer(propertyRv.newChildId());
             propertyRv.add(propertyRvContainer);
-
-            addPropertyToForm(getModel(), (OneToOneAssociation) association, propertyRvContainer,
-                    memberGroupActions);
+            addPropertyToForm(getModel(), (OneToOneAssociation) association, propertyRvContainer, memberGroupActions);
+            contentDynamicallyVisible = true;
         }
 
         final List<LinkAndLabel> actionsPanel = LinkAndLabel
@@ -102,13 +124,20 @@ public class PropertyGroup extends PanelAbstract<EntityModel> {
                 .positioned(memberGroupActions, ActionLayout.Position.PANEL_DROPDOWN);
 
         AdditionalLinksPanel.addAdditionalLinks(
-                this, ID_ASSOCIATED_ACTION_LINKS_PANEL,
+                div, ID_ASSOCIATED_ACTION_LINKS_PANEL,
                 actionsPanel,
                 AdditionalLinksPanel.Style.INLINE_LIST);
         AdditionalLinksPanel.addAdditionalLinks(
-                this, ID_ASSOCIATED_ACTION_LINKS_PANEL_DROPDOWN,
+                div, ID_ASSOCIATED_ACTION_LINKS_PANEL_DROPDOWN,
                 actionsPanelDropDown,
                 AdditionalLinksPanel.Style.DROPDOWN);
+
+        // either add the built content, or hide entire
+        if(!contentDynamicallyVisible) {
+            Components.permanentlyHide(this, div.getId());
+        } else {
+            this.add(div);
+        }
     }
 
     private void addPropertyToForm(
@@ -128,4 +157,12 @@ public class PropertyGroup extends PanelAbstract<EntityModel> {
         entityActions.addAll(
                 EntityActionUtil.asLinkAndLabelsForAdditionalLinksPanel(entityModel, associatedActions));
     }
+
+
+    private boolean contentDynamicallyVisible = false;
+    @Override
+    public boolean isContentDynamicallyVisible() {
+        return contentDynamicallyVisible;
+    }
+
 }

http://git-wip-us.apache.org/repos/asf/isis/blob/f65487e4/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/layout/bs3/col/Col.java
----------------------------------------------------------------------
diff --git a/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/layout/bs3/col/Col.java b/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/layout/bs3/col/Col.java
index 057ea4b..8f99ad1 100644
--- a/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/layout/bs3/col/Col.java
+++ b/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/layout/bs3/col/Col.java
@@ -30,16 +30,18 @@ import com.google.common.collect.Lists;
 
 import org.apache.wicket.Component;
 import org.apache.wicket.markup.html.WebMarkupContainer;
-import org.apache.wicket.markup.repeater.RepeatingView;
 
-import org.apache.isis.applib.layout.grid.bootstrap3.BS3Col;
-import org.apache.isis.applib.layout.grid.bootstrap3.BS3Row;
-import org.apache.isis.applib.layout.grid.bootstrap3.BS3Tab;
-import org.apache.isis.applib.layout.grid.bootstrap3.BS3TabGroup;
+import org.apache.isis.applib.annotation.Where;
 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.grid.bootstrap3.BS3Col;
+import org.apache.isis.applib.layout.grid.bootstrap3.BS3Row;
+import org.apache.isis.applib.layout.grid.bootstrap3.BS3Tab;
+import org.apache.isis.applib.layout.grid.bootstrap3.BS3TabGroup;
+import org.apache.isis.core.metamodel.consent.Consent;
+import org.apache.isis.core.metamodel.consent.InteractionInitiatedBy;
 import org.apache.isis.core.metamodel.spec.feature.ObjectAction;
 import org.apache.isis.core.runtime.system.DeploymentType;
 import org.apache.isis.core.runtime.system.context.IsisContext;
@@ -54,11 +56,12 @@ import org.apache.isis.viewer.wicket.ui.components.entity.fieldset.PropertyGroup
 import org.apache.isis.viewer.wicket.ui.components.layout.bs3.Util;
 import org.apache.isis.viewer.wicket.ui.components.layout.bs3.row.Row;
 import org.apache.isis.viewer.wicket.ui.components.layout.bs3.tabs.TabGroupPanel;
+import org.apache.isis.viewer.wicket.ui.panels.HasDynamicallyVisibleContent;
 import org.apache.isis.viewer.wicket.ui.panels.PanelAbstract;
 import org.apache.isis.viewer.wicket.ui.util.Components;
 import org.apache.isis.viewer.wicket.ui.util.CssClassAppender;
 
-public class Col extends PanelAbstract<EntityModel> {
+public class Col extends PanelAbstract<EntityModel> implements HasDynamicallyVisibleContent {
 
     private static final long serialVersionUID = 1L;
 
@@ -96,8 +99,6 @@ public class Col extends PanelAbstract<EntityModel> {
         CssClassAppender.appendCssClassTo(div, bs3Col.toCssClass());
         Util.appendCssClass(div, bs3Col, ID_COL);
 
-        this.addOrReplace(div);
-
         // icon/title
         final DomainObjectLayoutData domainObject = bs3Col.getDomainObject();
 
@@ -115,6 +116,8 @@ public class Col extends PanelAbstract<EntityModel> {
             actionOwner = entityHeaderPanel;
             actionIdToUse = "entityActions";
             actionIdToHide = "actions";
+
+            contentDynamicallyVisible = true;
         } else {
             Components.permanentlyHide(div, ID_ENTITY_HEADER_PANEL);
             actionOwner = div;
@@ -126,19 +129,28 @@ public class Col extends PanelAbstract<EntityModel> {
         // actions
         // (rendering depends on whether also showing the icon/title)
         final List<ActionLayoutData> actionLayoutDatas = bs3Col.getActions();
-            final List<ObjectAction> objectActions =
-                FluentIterable.from(actionLayoutDatas)
-                        .transform(new Function<ActionLayoutData, ObjectAction>() {
-                            @Nullable @Override public ObjectAction apply(@Nullable final ActionLayoutData actionLayoutData) {
-                                return getModel().getTypeOfSpecification().getObjectAction(actionLayoutData.getId());
-                            }
-                        })
-                        .filter(Predicates.<ObjectAction>notNull())
-                        .toList();
-        final List<LinkAndLabel> entityActionLinks = EntityActionUtil.asLinkAndLabelsForAdditionalLinksPanel(getModel(), objectActions);
+        final List<ObjectAction> visibleActions =
+            FluentIterable.from(actionLayoutDatas)
+                    .transform(new Function<ActionLayoutData, ObjectAction>() {
+                        @Nullable @Override public ObjectAction apply(@Nullable final ActionLayoutData actionLayoutData) {
+                            return getModel().getTypeOfSpecification().getObjectAction(actionLayoutData.getId());
+                        }
+                    })
+                    .filter(Predicates.<ObjectAction>notNull())
+                    .filter(new Predicate<ObjectAction>() {
+                        @Override public boolean apply(@Nullable final ObjectAction objectAction) {
+                            final Consent visibility = objectAction
+                                    .isVisible(getModel().getObject(), InteractionInitiatedBy.USER, Where.OBJECT_FORMS);
+                            return visibility.isAllowed();
+                        }
+                    })
+                    .toList();
+        final List<LinkAndLabel> entityActionLinks =
+                EntityActionUtil.asLinkAndLabelsForAdditionalLinksPanel(getModel(), visibleActions);
 
         if(!entityActionLinks.isEmpty()) {
             AdditionalLinksPanel.addAdditionalLinks(actionOwner, actionIdToUse, entityActionLinks, AdditionalLinksPanel.Style.INLINE_LIST);
+            contentDynamicallyVisible = true;
         } else {
             Components.permanentlyHide(actionOwner, actionIdToUse);
         }
@@ -151,8 +163,9 @@ public class Col extends PanelAbstract<EntityModel> {
         // rows
         final List<BS3Row> rows = Lists.newArrayList(this.bs3Col.getRows());
         if(!rows.isEmpty()) {
-            final RepeatingView rowsRv = buildRows(ID_ROWS, rows);
+            final RepeatingViewWithDynamicallyVisibleContent rowsRv = buildRows(ID_ROWS, rows);
             div.add(rowsRv);
+            contentDynamicallyVisible = contentDynamicallyVisible || rowsRv.isContentDynamicallyVisible();
         } else {
             Components.permanentlyHide(div, ID_ROWS);
         }
@@ -172,7 +185,8 @@ public class Col extends PanelAbstract<EntityModel> {
                             }
                         }).toList();
         if(!tabGroupsWithNonEmptyTabs.isEmpty()) {
-            final RepeatingView tabGroupRv = new RepeatingView(ID_TAB_GROUPS);
+            final RepeatingViewWithDynamicallyVisibleContent tabGroupRv =
+                    new RepeatingViewWithDynamicallyVisibleContent(ID_TAB_GROUPS);
 
             for (BS3TabGroup bs3TabGroup : tabGroupsWithNonEmptyTabs) {
 
@@ -190,7 +204,7 @@ public class Col extends PanelAbstract<EntityModel> {
                     final BS3Tab bs3Tab = tabs.get(0);
                     // render the rows of the one-and-only tab of this tab group.
                     final List<BS3Row> tabRows = bs3Tab.getRows();
-                    final RepeatingView rowsRv = buildRows(id, tabRows);
+                    final RepeatingViewWithDynamicallyVisibleContent rowsRv = buildRows(id, tabRows);
                     tabGroupRv.add(rowsRv);
                     break;
                 default:
@@ -204,6 +218,7 @@ public class Col extends PanelAbstract<EntityModel> {
 
             }
             div.add(tabGroupRv);
+            contentDynamicallyVisible = contentDynamicallyVisible || tabGroupRv.isContentDynamicallyVisible();
         } else {
             Components.permanentlyHide(div, ID_TAB_GROUPS);
         }
@@ -218,58 +233,77 @@ public class Col extends PanelAbstract<EntityModel> {
                     }
                 }).toList();
         if(!fieldSetsWithProperties.isEmpty()) {
-            final RepeatingView fieldSetRv = new RepeatingView(ID_FIELD_SETS);
+            final RepeatingViewWithDynamicallyVisibleContent fieldSetRv =
+                    new RepeatingViewWithDynamicallyVisibleContent(ID_FIELD_SETS);
 
             for (FieldSet fieldSet : fieldSetsWithProperties) {
 
                 final String id = fieldSetRv.newChildId();
                 final EntityModel entityModelWithHints = getModel().cloneWithLayoutMetadata(fieldSet);
 
-                final WebMarkupContainer propertyGroup = new PropertyGroup(id, entityModelWithHints);
+                final PropertyGroup propertyGroup = new PropertyGroup(id, entityModelWithHints);
                 fieldSetRv.add(propertyGroup);
             }
             div.add(fieldSetRv);
+            contentDynamicallyVisible = contentDynamicallyVisible || fieldSetRv.isContentDynamicallyVisible();
         } else {
             Components.permanentlyHide(div, ID_FIELD_SETS);
         }
 
 
-
         // collections
         final List<CollectionLayoutData> collections = bs3Col.getCollections();
         if(!collections.isEmpty()) {
-            final RepeatingView collectionRv = new RepeatingView(ID_COLLECTIONS);
+            final RepeatingViewWithDynamicallyVisibleContent collectionRv =
+                    new RepeatingViewWithDynamicallyVisibleContent(ID_COLLECTIONS);
 
             for (CollectionLayoutData collection : collections) {
 
                 final String id = collectionRv.newChildId();
                 final EntityModel entityModelWithHints = getModel().cloneWithLayoutMetadata(collection);
 
-                final WebMarkupContainer collectionPanel = new EntityCollectionPanel(id, entityModelWithHints);
+                final EntityCollectionPanel collectionPanel = new EntityCollectionPanel(id, entityModelWithHints);
                 collectionRv.add(collectionPanel);
             }
             div.add(collectionRv);
+            contentDynamicallyVisible = contentDynamicallyVisible || collectionRv.isContentDynamicallyVisible();
         } else {
             Components.permanentlyHide(div, ID_COLLECTIONS);
         }
 
+
+        final WebMarkupContainer panel = this;
+        if(contentDynamicallyVisible) {
+            panel.add(div);
+        } else {
+            Components.permanentlyHide(panel, div.getId());
+        }
+
     }
 
-    private RepeatingView buildRows(final String owningId, final List<BS3Row> rows) {
-        final RepeatingView rowRv = new RepeatingView(owningId);
+    private RepeatingViewWithDynamicallyVisibleContent buildRows(final String owningId, final List<BS3Row> rows) {
+        final RepeatingViewWithDynamicallyVisibleContent rowRv =
+                new RepeatingViewWithDynamicallyVisibleContent(owningId);
 
         for(final BS3Row bs3Row: rows) {
 
             final String id = rowRv.newChildId();
             final EntityModel entityModelWithHints = getModel().cloneWithLayoutMetadata(bs3Row);
 
-            final WebMarkupContainer row = new Row(id, entityModelWithHints);
+            final Row row = new Row(id, entityModelWithHints);
 
             rowRv.add(row);
         }
         return rowRv;
     }
 
+
+    private boolean contentDynamicallyVisible = false;
+    @Override
+    public boolean isContentDynamicallyVisible() {
+        return contentDynamicallyVisible;
+    }
+
     ///////////////////////////////////////////////////////
     // Dependencies (from context)
     ///////////////////////////////////////////////////////

http://git-wip-us.apache.org/repos/asf/isis/blob/f65487e4/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/layout/bs3/col/RepeatingViewWithDynamicallyVisibleContent.java
----------------------------------------------------------------------
diff --git a/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/layout/bs3/col/RepeatingViewWithDynamicallyVisibleContent.java b/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/layout/bs3/col/RepeatingViewWithDynamicallyVisibleContent.java
new file mode 100644
index 0000000..b61e912
--- /dev/null
+++ b/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/layout/bs3/col/RepeatingViewWithDynamicallyVisibleContent.java
@@ -0,0 +1,54 @@
+/*
+ *  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.bs3.col;
+
+import org.apache.wicket.Component;
+import org.apache.wicket.MarkupContainer;
+import org.apache.wicket.markup.repeater.RepeatingView;
+
+import org.apache.isis.viewer.wicket.ui.panels.HasDynamicallyVisibleContent;
+
+public class RepeatingViewWithDynamicallyVisibleContent extends RepeatingView implements HasDynamicallyVisibleContent {
+
+    public RepeatingViewWithDynamicallyVisibleContent(final String id) {
+        super(id);
+    }
+
+    @Override
+    public MarkupContainer add(final Component... children) {
+        final MarkupContainer component = super.add(children);
+        for (Component child : children) {
+            if(child instanceof HasDynamicallyVisibleContent) {
+                final HasDynamicallyVisibleContent hasDynamicallyVisibleContent = (HasDynamicallyVisibleContent) child;
+                contentDynamicallyVisible = contentDynamicallyVisible || hasDynamicallyVisibleContent.isContentDynamicallyVisible();
+            } else {
+                contentDynamicallyVisible = true;
+            }
+        }
+        return component;
+    }
+
+    private boolean contentDynamicallyVisible = false;
+
+    @Override
+    public boolean isContentDynamicallyVisible() {
+        return contentDynamicallyVisible;
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/isis/blob/f65487e4/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/layout/bs3/row/Row.java
----------------------------------------------------------------------
diff --git a/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/layout/bs3/row/Row.java b/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/layout/bs3/row/Row.java
index 7aac0fe..56d0e05 100644
--- a/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/layout/bs3/row/Row.java
+++ b/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/layout/bs3/row/Row.java
@@ -19,7 +19,6 @@
 package org.apache.isis.viewer.wicket.ui.components.layout.bs3.row;
 
 import org.apache.wicket.markup.html.WebMarkupContainer;
-import org.apache.wicket.markup.repeater.RepeatingView;
 
 import org.apache.isis.applib.layout.grid.bootstrap3.BS3ClearFix;
 import org.apache.isis.applib.layout.grid.bootstrap3.BS3Col;
@@ -31,9 +30,12 @@ import org.apache.isis.viewer.wicket.model.models.EntityModel;
 import org.apache.isis.viewer.wicket.ui.components.layout.bs3.Util;
 import org.apache.isis.viewer.wicket.ui.components.layout.bs3.clearfix.ClearFix;
 import org.apache.isis.viewer.wicket.ui.components.layout.bs3.col.Col;
+import org.apache.isis.viewer.wicket.ui.components.layout.bs3.col.RepeatingViewWithDynamicallyVisibleContent;
+import org.apache.isis.viewer.wicket.ui.panels.HasDynamicallyVisibleContent;
 import org.apache.isis.viewer.wicket.ui.panels.PanelAbstract;
+import org.apache.isis.viewer.wicket.ui.util.Components;
 
-public class Row extends PanelAbstract<EntityModel> {
+public class Row extends PanelAbstract<EntityModel> implements HasDynamicallyVisibleContent {
 
     private static final long serialVersionUID = 1L;
 
@@ -54,9 +56,8 @@ public class Row extends PanelAbstract<EntityModel> {
 
     private void buildGui() {
 
-        Util.appendCssClass(this, bs3Row, "row");
-
-        final RepeatingView rv = new RepeatingView(ID_ROW_CONTENTS);
+        final RepeatingViewWithDynamicallyVisibleContent rv =
+                new RepeatingViewWithDynamicallyVisibleContent(ID_ROW_CONTENTS);
 
         for(final BS3RowContent bs3RowContent: bs3Row.getCols()) {
 
@@ -65,7 +66,10 @@ public class Row extends PanelAbstract<EntityModel> {
 
             final WebMarkupContainer rowContent;
             if(bs3RowContent instanceof BS3Col) {
-                rowContent = new Col(id, entityModelWithHints);
+                Col col = new Col(id, entityModelWithHints);
+                contentDynamicallyVisible = contentDynamicallyVisible || col.isContentDynamicallyVisible();
+                rowContent = col;
+
             } else if (bs3RowContent instanceof BS3ClearFix) {
                 rowContent = new ClearFix(id, entityModelWithHints);
             } else {
@@ -75,7 +79,21 @@ public class Row extends PanelAbstract<EntityModel> {
             rv.add(rowContent);
         }
 
-        add(rv);
+        final WebMarkupContainer panel = this;
+        if(contentDynamicallyVisible) {
+            Util.appendCssClass(panel, bs3Row, "row");
+            panel.add(rv);
+        } else {
+            Components.permanentlyHide(panel, rv.getId());
+        }
+
+    }
+
+
+    private boolean contentDynamicallyVisible = false;
+    @Override
+    public boolean isContentDynamicallyVisible() {
+        return contentDynamicallyVisible;
     }
 
     ///////////////////////////////////////////////////////

http://git-wip-us.apache.org/repos/asf/isis/blob/f65487e4/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/layout/bs3/tabs/TabGroupPanel.java
----------------------------------------------------------------------
diff --git a/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/layout/bs3/tabs/TabGroupPanel.java b/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/layout/bs3/tabs/TabGroupPanel.java
index b350b6c..14db996 100644
--- a/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/layout/bs3/tabs/TabGroupPanel.java
+++ b/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/layout/bs3/tabs/TabGroupPanel.java
@@ -20,6 +20,7 @@ package org.apache.isis.viewer.wicket.ui.components.layout.bs3.tabs;
 
 import java.util.List;
 
+import com.google.common.base.Predicate;
 import com.google.common.collect.FluentIterable;
 import com.google.common.collect.Lists;
 
@@ -33,10 +34,12 @@ import org.apache.isis.applib.layout.grid.bootstrap3.BS3Tab;
 import org.apache.isis.applib.layout.grid.bootstrap3.BS3TabGroup;
 import org.apache.isis.viewer.wicket.model.models.EntityModel;
 import org.apache.isis.viewer.wicket.model.util.ScopedSessionAttribute;
+import org.apache.isis.viewer.wicket.ui.components.layout.bs3.col.RepeatingViewWithDynamicallyVisibleContent;
 
 import de.agilecoders.wicket.core.markup.html.bootstrap.tabs.AjaxBootstrapTabbedPanel;
 
-public class TabGroupPanel extends AjaxBootstrapTabbedPanel {
+// hmmm... not sure how to make this implement HasDynamicallyVisibleContent
+public class TabGroupPanel extends AjaxBootstrapTabbedPanel  {
 
     public static final String SESSION_ATTR_SELECTED_TAB = "selectedTab";
 
@@ -53,12 +56,18 @@ public class TabGroupPanel extends AjaxBootstrapTabbedPanel {
                 .toList();
 
         for (final BS3Tab bs3Tab : tablist) {
+            final RepeatingViewWithDynamicallyVisibleContent rv = TabPanel.newRows(entityModel, bs3Tab);
             tabs.add(new AbstractTab(Model.of(bs3Tab.getName())) {
                 private static final long serialVersionUID = 1L;
 
                 @Override
                 public Panel getPanel(String panelId) {
-                    return new TabPanel(panelId, entityModel, bs3Tab);
+                    return new TabPanel(panelId, entityModel, bs3Tab, rv);
+                }
+
+                @Override
+                public boolean isVisible() {
+                    return rv.isContentDynamicallyVisible();
                 }
             });
         }
@@ -94,4 +103,14 @@ public class TabGroupPanel extends AjaxBootstrapTabbedPanel {
             }
         }
     }
+
+    @Override
+    public boolean isVisible() {
+        return FluentIterable.<AbstractTab>from(getTabs()).anyMatch(new Predicate<AbstractTab>() {
+            @Override
+            public boolean apply(final AbstractTab tab) {
+                return tab.isVisible();
+            }
+        });
+    }
 }

http://git-wip-us.apache.org/repos/asf/isis/blob/f65487e4/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/layout/bs3/tabs/TabPanel.java
----------------------------------------------------------------------
diff --git a/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/layout/bs3/tabs/TabPanel.java b/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/layout/bs3/tabs/TabPanel.java
index 61c81e7..48277ae 100644
--- a/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/layout/bs3/tabs/TabPanel.java
+++ b/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/layout/bs3/tabs/TabPanel.java
@@ -1,17 +1,19 @@
 package org.apache.isis.viewer.wicket.ui.components.layout.bs3.tabs;
 
 import org.apache.wicket.markup.html.WebMarkupContainer;
-import org.apache.wicket.markup.repeater.RepeatingView;
 
 import org.apache.isis.applib.layout.grid.bootstrap3.BS3Row;
 import org.apache.isis.applib.layout.grid.bootstrap3.BS3Tab;
 import org.apache.isis.viewer.wicket.model.hints.HasUiHintDisambiguator;
 import org.apache.isis.viewer.wicket.model.models.EntityModel;
 import org.apache.isis.viewer.wicket.ui.components.layout.bs3.Util;
+import org.apache.isis.viewer.wicket.ui.components.layout.bs3.col.RepeatingViewWithDynamicallyVisibleContent;
 import org.apache.isis.viewer.wicket.ui.components.layout.bs3.row.Row;
+import org.apache.isis.viewer.wicket.ui.panels.HasDynamicallyVisibleContent;
 import org.apache.isis.viewer.wicket.ui.panels.PanelAbstract;
+import org.apache.isis.viewer.wicket.ui.util.Components;
 
-public class TabPanel extends PanelAbstract implements HasUiHintDisambiguator {
+public class TabPanel extends PanelAbstract implements HasUiHintDisambiguator, HasDynamicallyVisibleContent {
 
     private static final long serialVersionUID = 1L;
 
@@ -21,10 +23,14 @@ public class TabPanel extends PanelAbstract implements HasUiHintDisambiguator {
     private final BS3Tab bs3Tab;
 
     public TabPanel(String id, final EntityModel model, final BS3Tab bs3Tab) {
+        this(id, model, bs3Tab, null);
+    }
+
+    public TabPanel(String id, final EntityModel model, final BS3Tab bs3Tab, final RepeatingViewWithDynamicallyVisibleContent repeatingViewWithDynamicallyVisibleContent) {
         super(id);
 
         this.bs3Tab = bs3Tab;
-        buildGui(model, bs3Tab);
+        buildGui(model, bs3Tab, repeatingViewWithDynamicallyVisibleContent);
     }
 
     /**
@@ -35,24 +41,47 @@ public class TabPanel extends PanelAbstract implements HasUiHintDisambiguator {
         return bs3Tab.getName();
     }
 
-    protected void buildGui(final EntityModel model, final BS3Tab bs3Tab) {
+    protected void buildGui(final EntityModel model, final BS3Tab bs3Tab, final RepeatingViewWithDynamicallyVisibleContent rvIfAny) {
+
+        final WebMarkupContainer div = new WebMarkupContainer(ID_TAB_PANEL);
 
-        final WebMarkupContainer container = new WebMarkupContainer(ID_TAB_PANEL);
+        final RepeatingViewWithDynamicallyVisibleContent rv = rvIfAny != null ? rvIfAny : newRows(model, bs3Tab);
+        div.add(rv);
+        contentDynamicallyVisible = contentDynamicallyVisible || rv.isContentDynamicallyVisible();
+
+        final WebMarkupContainer panel = this;
+        if(contentDynamicallyVisible) {
+            Util.appendCssClassIfRequired(panel, bs3Tab);
+            panel.add(div);
+        } else {
+            Components.permanentlyHide(panel, div.getId());
+        }
 
-        Util.appendCssClassIfRequired(this, bs3Tab);
+    }
 
-        final RepeatingView rv = new RepeatingView(ID_ROWS);
+    public static RepeatingViewWithDynamicallyVisibleContent newRows(final EntityModel model, final BS3Tab bs3Tab) {
+        final RepeatingViewWithDynamicallyVisibleContent rv = new RepeatingViewWithDynamicallyVisibleContent(ID_ROWS);
 
         for(final BS3Row bs3Row: bs3Tab.getRows()) {
 
             final String newChildId = rv.newChildId();
             final EntityModel entityModelWithHints = model.cloneWithLayoutMetadata(bs3Row);
 
-            final WebMarkupContainer row = new Row(newChildId, entityModelWithHints);
+            final Row row = new Row(newChildId, entityModelWithHints);
 
             rv.add(row);
         }
-        container.add(rv);
-        add(container);
+        return rv;
+    }
+
+    private boolean contentDynamicallyVisible = false;
+    @Override
+    public boolean isContentDynamicallyVisible() {
+        return contentDynamicallyVisible;
+    }
+
+    @Override
+    public boolean isVisible() {
+        return isContentDynamicallyVisible();
     }
 }

http://git-wip-us.apache.org/repos/asf/isis/blob/f65487e4/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/panels/HasDynamicallyVisibleContent.java
----------------------------------------------------------------------
diff --git a/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/panels/HasDynamicallyVisibleContent.java b/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/panels/HasDynamicallyVisibleContent.java
new file mode 100644
index 0000000..d5440fd
--- /dev/null
+++ b/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/panels/HasDynamicallyVisibleContent.java
@@ -0,0 +1,26 @@
+/*
+ *  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.panels;
+
+public interface HasDynamicallyVisibleContent {
+
+    boolean isContentDynamicallyVisible();
+
+}

http://git-wip-us.apache.org/repos/asf/isis/blob/f65487e4/example/application/simpleapp/dom/src/main/java/domainapp/dom/simple/SimpleObject.java
----------------------------------------------------------------------
diff --git a/example/application/simpleapp/dom/src/main/java/domainapp/dom/simple/SimpleObject.java b/example/application/simpleapp/dom/src/main/java/domainapp/dom/simple/SimpleObject.java
index 7f2702e..18abff2 100644
--- a/example/application/simpleapp/dom/src/main/java/domainapp/dom/simple/SimpleObject.java
+++ b/example/application/simpleapp/dom/src/main/java/domainapp/dom/simple/SimpleObject.java
@@ -28,6 +28,7 @@ import javax.jdo.annotations.VersionStrategy;
 import org.apache.isis.applib.DomainObjectContainer;
 import org.apache.isis.applib.annotation.Action;
 import org.apache.isis.applib.annotation.BookmarkPolicy;
+import org.apache.isis.applib.annotation.CollectionLayout;
 import org.apache.isis.applib.annotation.DomainObject;
 import org.apache.isis.applib.annotation.DomainObjectLayout;
 import org.apache.isis.applib.annotation.Editing;
@@ -139,6 +140,9 @@ public class SimpleObject implements Comparable<SimpleObject> {
         return (java.sql.Timestamp) JDOHelper.getVersion(this);
     }
 
+    public boolean hideVersionSequence() {
+        return getName().contains("ob");
+    }
 
     @Override
     public int compareTo(final SimpleObject other) {
@@ -155,6 +159,9 @@ public class SimpleObject implements Comparable<SimpleObject> {
         return simpleObjects.findByName(getName().substring(0,1));
     }
 
+    @CollectionLayout(
+            defaultView = "table"
+    )
     public List<SimpleObject> getOthers() {
         return simpleObjects.listAll();
     }


[42/50] [abbrv] isis git commit: ISIS-993: minor refactoring of helper methos in GridNormalizerService implementations.

Posted by da...@apache.org.
ISIS-993: minor refactoring of helper methos in GridNormalizerService implementations.


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

Branch: refs/heads/master
Commit: bf1288c28759b7f2b0bf0366f89eb4e7f13f9c1c
Parents: e417a8a
Author: Dan Haywood <da...@haywood-associates.co.uk>
Authored: Tue Mar 1 06:13:13 2016 +0000
Committer: Dan Haywood <da...@haywood-associates.co.uk>
Committed: Tue Mar 1 06:13:13 2016 +0000

----------------------------------------------------------------------
 .../bootstrap3/GridNormalizerServiceBS3.java    | 87 ++++++++++----------
 1 file changed, 42 insertions(+), 45 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/isis/blob/bf1288c2/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 0f7fa85..0eb73c9 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
@@ -560,22 +560,6 @@ public class GridNormalizerServiceBS3 extends GridNormalizerServiceAbstract<BS3G
         return true;
     }
 
-    protected void addActionTo(final ActionLayoutDataOwner owner, final ActionLayoutData actionLayoutData) {
-        List<ActionLayoutData> actions = owner.getActions();
-        if(actions == null) {
-            owner.setActions(actions = Lists.newArrayList());
-        }
-        actions.add(actionLayoutData);
-    }
-
-    static String asId(final String str) {
-        if(Strings.isNullOrEmpty(str)) {
-            return str;
-        }
-        final char c = str.charAt(0);
-        return Character.toLowerCase(c) + str.substring(1).replaceAll("\\s+", "");
-    }
-
     protected void addPropertiesTo(
             final FieldSet fieldSet,
             final List<String> propertyIds,
@@ -600,35 +584,6 @@ public class GridNormalizerServiceBS3 extends GridNormalizerServiceAbstract<BS3G
         }
     }
 
-    protected void addActionsTo(
-            final BS3Col bs3Col,
-            final List<String> actionIds,
-            final LinkedHashMap<String, ActionLayoutData> actionLayoutDataById) {
-        for (String actionId : actionIds) {
-            List<ActionLayoutData> actions = bs3Col.getActions();
-            if(actions == null) {
-                actions = Lists.newArrayList();
-                bs3Col.setActions(actions);
-            }
-            final ActionLayoutData actionLayoutData = new ActionLayoutData(actionId);
-            actions.add(actionLayoutData);
-            actionLayoutDataById.put(actionId, actionLayoutData);
-            actionLayoutData.setOwner(bs3Col);
-        }
-    }
-
-    protected void addActionsTo(
-            final FieldSet fieldSet,
-            final List<String> actionIds,
-            final LinkedHashMap<String, ActionLayoutData> actionLayoutDataById) {
-        List<ActionLayoutData> actions = fieldSet.getActions();
-        for (String actionId : actionIds) {
-            final ActionLayoutData actionLayoutData = new ActionLayoutData(actionId);
-            actions.add(actionLayoutData);
-            actionLayoutDataById.put(actionId, actionLayoutData);
-        }
-    }
-
     protected void addCollectionsTo(
             final BS3Col tabRowCol,
             final List<String> collectionIds,
@@ -667,8 +622,50 @@ public class GridNormalizerServiceBS3 extends GridNormalizerServiceAbstract<BS3G
         }
     }
 
+    protected void addActionsTo(
+            final BS3Col bs3Col,
+            final List<String> actionIds,
+            final LinkedHashMap<String, ActionLayoutData> actionLayoutDataById) {
+        for (String actionId : actionIds) {
+            final ActionLayoutData actionLayoutData = new ActionLayoutData(actionId);
+            addActionTo(bs3Col, actionLayoutData);
+            actionLayoutDataById.put(actionId, actionLayoutData);
+        }
+    }
+
+    protected void addActionsTo(
+            final FieldSet fieldSet,
+            final List<String> actionIds,
+            final LinkedHashMap<String, ActionLayoutData> actionLayoutDataById) {
+        for (String actionId : actionIds) {
+            final ActionLayoutData actionLayoutData = new ActionLayoutData(actionId);
+            addActionTo(fieldSet, actionLayoutData);
+            actionLayoutDataById.put(actionId, actionLayoutData);
+        }
+    }
+
+    protected void addActionTo(
+            final ActionLayoutDataOwner owner,
+            final ActionLayoutData actionLayoutData) {
+        List<ActionLayoutData> actions = owner.getActions();
+        if(actions == null) {
+            owner.setActions(actions = Lists.newArrayList());
+        }
+        actions.add(actionLayoutData);
+        actionLayoutData.setOwner(owner);
+    }
+
     private static Boolean isSet(final Boolean flag) {
         return flag != null && flag;
     }
 
+    private static String asId(final String str) {
+        if(Strings.isNullOrEmpty(str)) {
+            return str;
+        }
+        final char c = str.charAt(0);
+        return Character.toLowerCase(c) + str.substring(1).replaceAll("\\s+", "");
+    }
+
+
 }


[14/50] [abbrv] isis git commit: ISIS-993: associate properties into their correct fieldsets, honouring ordering. Also order collections.

Posted by da...@apache.org.
ISIS-993: associate properties into their correct fieldsets, honouring ordering.  Also order collections.

in addition:
- bug fix to suppress not contributed collections (from superclasses) being rendered also as actions
- tweak to CSS for BS3 layout
- move DeweyComparator to metamodel module (from runtime module).


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

Branch: refs/heads/master
Commit: d2340ebd5839d94b0976f00a530e4daba6c41b45
Parents: bbd593b
Author: Dan Haywood <da...@haywood-associates.co.uk>
Authored: Fri Feb 12 10:05:01 2016 +0000
Committer: Dan Haywood <da...@haywood-associates.co.uk>
Committed: Fri Feb 12 10:05:01 2016 +0000

----------------------------------------------------------------------
 .../layout/ActionLayoutFacetFactory.java        |   6 +-
 .../facets/object/grid/GridFacetDefault.java    |   6 +-
 .../bootstrap3/GridNormalizerServiceBS3.java    | 126 +++++++++++++++----
 .../metamodel/util/DeweyOrderComparator.java    |  82 ++++++++++++
 .../runtime/services/DeweyOrderComparator.java  |  82 ------------
 .../ServicesInstallerFromAnnotation.java        |   7 +-
 .../ServicesInstallerFromConfiguration.java     |   1 +
 ...InstallerFromConfigurationAndAnnotation.java |   1 +
 .../services/DeweyOrderComparatorTest.java      |   2 +
 .../ui/components/layout/bs3/col/Col.html       |   2 +-
 .../collections/EntityCollectionsPanel.java     |   2 +-
 .../wicket/ui/pages/bootstrap-overrides.css     |   2 +
 12 files changed, 200 insertions(+), 119 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/isis/blob/d2340ebd/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/actions/layout/ActionLayoutFacetFactory.java
----------------------------------------------------------------------
diff --git a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/actions/layout/ActionLayoutFacetFactory.java b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/actions/layout/ActionLayoutFacetFactory.java
index 6219faa..5803825 100644
--- a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/actions/layout/ActionLayoutFacetFactory.java
+++ b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/actions/layout/ActionLayoutFacetFactory.java
@@ -18,7 +18,6 @@
  */
 package org.apache.isis.core.metamodel.facets.actions.layout;
 
-import java.lang.reflect.Method;
 import java.util.Properties;
 
 import org.apache.isis.applib.annotation.ActionLayout;
@@ -133,9 +132,8 @@ public class ActionLayoutFacetFactory extends FacetFactoryAbstract implements Co
     }
 
     protected boolean isContributingServiceOrMixinObject(final ProcessMethodContext processMethodContext) {
-        final Method method = processMethodContext.getMethod();
-        final Class<?> declaringClass = method.getDeclaringClass();
-        final ObjectSpecification spec = getSpecificationLoader().loadSpecification(declaringClass);
+        final Class<?> cls =  processMethodContext.getCls();
+        final ObjectSpecification spec = getSpecificationLoader().loadSpecification(cls);
 
         return isContributingService(spec) || isMixinObject(spec);
     }

http://git-wip-us.apache.org/repos/asf/isis/blob/d2340ebd/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 b4329db..9cdabb5 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
@@ -149,7 +149,9 @@ public class GridFacetDefault
             propsRow.getCols().add(col);
             final List<String> leftMemberGroups = memberGroupNames;
             for (String memberGroup : leftMemberGroups) {
-                final FieldSet fieldSet = new FieldSet(memberGroup);
+                final FieldSet fieldSet = new FieldSet();
+                fieldSet.setId(memberGroup); // to bind to later via @MemberOrder#name()
+                fieldSet.setName(memberGroup);
                 if(unreferencedProperties && col.getFieldSets().isEmpty()) {
                     fieldSet.setUnreferencedProperties(true);
                 }
@@ -164,7 +166,7 @@ public class GridFacetDefault
         if(grid == null) {
             return null;
         }
-        final Class<?> domainClass = getSpecification().getCorrespondingClass();
+        // unused... final Class<?> domainClass = getSpecification().getCorrespondingClass();
 
         return gridService.normalize(grid);
     }

http://git-wip-us.apache.org/repos/asf/isis/blob/d2340ebd/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 7523e10..1cb65c9 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,6 +16,7 @@
  */
 package org.apache.isis.core.metamodel.services.grid.bootstrap3;
 
+import java.util.Comparator;
 import java.util.LinkedHashMap;
 import java.util.List;
 import java.util.Map;
@@ -23,30 +24,34 @@ import java.util.concurrent.atomic.AtomicReference;
 
 import javax.annotation.Nullable;
 
+import com.google.common.base.Function;
 import com.google.common.base.Predicate;
 import com.google.common.collect.FluentIterable;
+import com.google.common.collect.ImmutableList;
 import com.google.common.collect.Lists;
 import com.google.common.collect.Maps;
 
 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.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.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.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.facets.members.order.MemberOrderFacet;
 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.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
@@ -80,6 +85,7 @@ public class GridNormalizerServiceBS3 extends GridNormalizerServiceAbstract<BS3G
 
         final LinkedHashMap<String, BS3Row> rowIds = Maps.newLinkedHashMap();
         final LinkedHashMap<String, BS3Col> colIds = Maps.newLinkedHashMap();
+        final LinkedHashMap<String, FieldSet> fieldSetIds = Maps.newLinkedHashMap();
 
         final AtomicReference<Boolean> duplicateIdDetected = new AtomicReference<>(false);
 
@@ -111,6 +117,20 @@ public class GridNormalizerServiceBS3 extends GridNormalizerServiceAbstract<BS3G
                 }
                 colIds.put(id, bs3Col);
             }
+
+            @Override
+            public void visit(final FieldSet fieldSet) {
+                final String id = fieldSet.getId();
+                if(id == null) {
+                    return;
+                }
+                if(rowIds.containsKey(id) || fieldSetIds.containsKey(id)) {
+                    fieldSet.setMetadataError("There is another fieldset with this id");
+                    duplicateIdDetected.set(true);
+                    return;
+                }
+                fieldSetIds.put(id, fieldSet);
+            }
         });
 
         if(duplicateIdDetected.get()) {
@@ -212,9 +232,43 @@ public class GridNormalizerServiceBS3 extends GridNormalizerServiceAbstract<BS3G
         }
 
         if(!missingPropertyIds.isEmpty()) {
-            final FieldSet fieldSet = fieldSetForUnreferencedPropertiesRef.get();
-            if(fieldSet != null) {
-                addMissingPropertiesTo(fieldSet, missingPropertyIds);
+            final Map<String, List<OneToOneAssociation>> boundAssociationsByFieldSetId = Maps.newHashMap();
+            final List<String> unboundPropertyIds = Lists.newArrayList(missingPropertyIds);
+            for (String missingPropertyId : missingPropertyIds) {
+                final OneToOneAssociation otoa = oneToOneAssociationById.get(missingPropertyId);
+                final MemberOrderFacet memberOrderFacet = otoa.getFacet(MemberOrderFacet.class);
+                if(memberOrderFacet != null) {
+                    final String name = memberOrderFacet.name();
+                    if(fieldSetIds.containsKey(name)) {
+                        List<OneToOneAssociation> boundAssociations =
+                                boundAssociationsByFieldSetId.get(name);
+                        if(boundAssociations == null) {
+                            boundAssociations = Lists.newArrayList();
+                            boundAssociationsByFieldSetId.put(name, boundAssociations);
+                        }
+                        boundAssociations.add(otoa);
+                        unboundPropertyIds.remove(missingPropertyId);
+                    }
+                }
+            }
+
+            for (String fieldSetId : boundAssociationsByFieldSetId.keySet()) {
+                final FieldSet fieldSet = fieldSetIds.get(fieldSetId);
+                final List<OneToOneAssociation> associations =
+                        boundAssociationsByFieldSetId.get(fieldSetId);
+
+                associations.sort(byMemberOrderSequence());
+                addPropertiesTo(fieldSet,
+                        FluentIterable.from(associations)
+                                      .transform(ObjectAssociation.Functions.toId())
+                                      .toList());
+            }
+
+            if(!unboundPropertyIds.isEmpty()) {
+                final FieldSet fieldSet = fieldSetForUnreferencedPropertiesRef.get();
+                if(fieldSet != null) {
+                    addPropertiesTo(fieldSet, unboundPropertyIds);
+                }
             }
         }
 
@@ -229,13 +283,25 @@ public class GridNormalizerServiceBS3 extends GridNormalizerServiceAbstract<BS3G
         }
 
         if(!missingCollectionIds.isEmpty()) {
+            List<OneToManyAssociation> sortedCollections = Lists.newArrayList(
+                    FluentIterable.from(missingCollectionIds)
+                    .transform(new Function<String, OneToManyAssociation>() {
+                        @Nullable @Override public OneToManyAssociation apply(@Nullable final String collectionId) {
+                            return oneToManyAssociationById.get(collectionId);
+                        }
+                    })
+                    .toSortedList(byMemberOrderSequence())
+
+            );
+            final ImmutableList<String> sortedMissingCollectionIds = FluentIterable.from(sortedCollections)
+                    .transform(ObjectAssociation.Functions.toId()).toList();
             final BS3TabGroup bs3TabGroup = tabGroupForUnreferencedCollectionsRef.get();
             if(bs3TabGroup != null) {
-                addMissingCollectionsTo(bs3TabGroup, missingCollectionIds, objectSpec);
+                addCollectionsTo(bs3TabGroup, sortedMissingCollectionIds, objectSpec);
             } else {
                 final BS3Col bs3Col = colForUnreferencedCollectionsRef.get();
                 if(bs3Col != null) {
-                    addMissingCollectionsTo(bs3Col, missingCollectionIds);
+                    addCollectionsTo(bs3Col, sortedMissingCollectionIds);
                 }
             }
         }
@@ -273,11 +339,11 @@ public class GridNormalizerServiceBS3 extends GridNormalizerServiceAbstract<BS3G
         if(!missingActionIds.isEmpty()) {
             final BS3Col bs3Col = colForUnreferencedActionsRef.get();
             if(bs3Col != null) {
-                addMissingActionsTo(bs3Col, missingActionIds);
+                addActionsTo(bs3Col, missingActionIds);
             } else {
                 final FieldSet fieldSet = fieldSetForUnreferencedActionsRef.get();
                 if(fieldSet != null) {
-                    addMissingActionsTo(fieldSet, missingActionIds);
+                    addActionsTo(fieldSet, missingActionIds);
                 }
             }
         }
@@ -285,15 +351,29 @@ public class GridNormalizerServiceBS3 extends GridNormalizerServiceAbstract<BS3G
         return true;
     }
 
-    protected void addMissingPropertiesTo(
+    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> missingPropertyIds) {
-        for (final String propertyId : missingPropertyIds) {
+            final List<String> propertyIds) {
+        for (final String propertyId : propertyIds) {
             fieldSet.getProperties().add(new PropertyLayoutData(propertyId));
         }
     }
 
-    protected void addMissingActionsTo(final BS3Col bs3Col, final List<String> missingActionIds) {
+    protected void addActionsTo(final BS3Col bs3Col, final List<String> missingActionIds) {
         for (String actionId : missingActionIds) {
             List<ActionLayoutData> actions = bs3Col.getActions();
             if(actions == null) {
@@ -304,28 +384,28 @@ public class GridNormalizerServiceBS3 extends GridNormalizerServiceAbstract<BS3G
         }
     }
 
-    protected void addMissingActionsTo(final FieldSet fieldSet, final List<String> missingActionIds) {
+    protected void addActionsTo(final FieldSet fieldSet, final List<String> missingActionIds) {
         List<ActionLayoutData> actions = fieldSet.getActions();
         for (String actionId : missingActionIds) {
             actions.add(new ActionLayoutData(actionId));
         }
     }
 
-    protected void addMissingCollectionsTo(
+    protected void addCollectionsTo(
             final BS3Col tabRowCol,
-            final List<String> missingCollectionIds) {
-        for (final String collectionId : missingCollectionIds) {
+            final List<String> collectionIds) {
+        for (final String collectionId : collectionIds) {
             final CollectionLayoutData layoutMetadata = new CollectionLayoutData(collectionId);
             layoutMetadata.setDefaultView("table");
             tabRowCol.getCollections().add(layoutMetadata);
         }
     }
 
-    protected void addMissingCollectionsTo(
+    protected void addCollectionsTo(
             final BS3TabGroup tabGroup,
-            final List<String> missingCollectionIds,
+            final List<String> collectionIds,
             final ObjectSpecification objectSpec) {
-        for (final String collectionId : missingCollectionIds) {
+        for (final String collectionId : collectionIds) {
             final BS3Tab bs3Tab = new BS3Tab();
             bs3Tab.setName(objectSpec.getAssociation(collectionId).getName());
             tabGroup.getTabs().add(bs3Tab);

http://git-wip-us.apache.org/repos/asf/isis/blob/d2340ebd/core/metamodel/src/main/java/org/apache/isis/core/metamodel/util/DeweyOrderComparator.java
----------------------------------------------------------------------
diff --git a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/util/DeweyOrderComparator.java b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/util/DeweyOrderComparator.java
new file mode 100644
index 0000000..0845838
--- /dev/null
+++ b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/util/DeweyOrderComparator.java
@@ -0,0 +1,82 @@
+/*
+ *  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.util;
+
+import java.util.Comparator;
+import java.util.List;
+import com.google.common.base.Function;
+import com.google.common.base.Splitter;
+import com.google.common.collect.Iterators;
+import com.google.common.collect.Lists;
+
+public class DeweyOrderComparator implements Comparator<String> {
+
+    public DeweyOrderComparator() {}
+
+    @Override
+    public int compare(String o1, String o2) {
+        final Parsed<String> p1 = new Parsed<String>(o1);
+        final Parsed<String> p2 = new Parsed<String>(o2);
+        return p1.compareTo(p2);
+    }
+
+    private static class Parsed<V> implements Comparable<Parsed<V>> {
+        private static final Function<String, Integer> PARSE = new Function<String, Integer>() {
+            @Override
+            public Integer apply(String input) {
+                try {
+                    return Integer.parseInt(input);
+                } catch (NumberFormatException e) {
+                    return Integer.MAX_VALUE;
+                }
+            }
+        };
+        private final List<Integer> parts;
+        private final String key;
+        Parsed(String key) {
+            this.key = key;
+            final Iterable<String> iter = Splitter.on(".").split(key);
+            parts = Lists.newArrayList(Iterators.transform(iter.iterator(), PARSE));
+        }
+
+        @Override
+        public int compareTo(Parsed<V> other) {
+            for (int i = 0; i < parts.size(); i++) {
+                Integer p = parts.get(i);
+                if (other.parts.size() == i) {
+                    // run out of parts for other, put it before us
+                    return +1;
+                }
+                final Integer q = other.parts.get(i);
+                final int comparison = p.compareTo(q);
+                if(comparison != 0) {
+                    return +comparison;
+                }
+            }
+            if(other.parts.size() > parts.size()) {
+                // run out of parts on our side, still more on others; put us before it
+                return -1;
+            }
+            return 0;
+        }
+    }
+}
+
+

http://git-wip-us.apache.org/repos/asf/isis/blob/d2340ebd/core/runtime/src/main/java/org/apache/isis/core/runtime/services/DeweyOrderComparator.java
----------------------------------------------------------------------
diff --git a/core/runtime/src/main/java/org/apache/isis/core/runtime/services/DeweyOrderComparator.java b/core/runtime/src/main/java/org/apache/isis/core/runtime/services/DeweyOrderComparator.java
deleted file mode 100644
index 7c6d373..0000000
--- a/core/runtime/src/main/java/org/apache/isis/core/runtime/services/DeweyOrderComparator.java
+++ /dev/null
@@ -1,82 +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.runtime.services;
-
-import java.util.Comparator;
-import java.util.List;
-import com.google.common.base.Function;
-import com.google.common.base.Splitter;
-import com.google.common.collect.Iterators;
-import com.google.common.collect.Lists;
-
-public class DeweyOrderComparator implements Comparator<String> {
-
-    public DeweyOrderComparator() {}
-
-    @Override
-    public int compare(String o1, String o2) {
-        final Parsed<String> p1 = new Parsed<String>(o1);
-        final Parsed<String> p2 = new Parsed<String>(o2);
-        return p1.compareTo(p2);
-    }
-
-    private static class Parsed<V> implements Comparable<Parsed<V>> {
-        private static final Function<String, Integer> PARSE = new Function<String, Integer>() {
-            @Override
-            public Integer apply(String input) {
-                try {
-                    return Integer.parseInt(input);
-                } catch (NumberFormatException e) {
-                    return Integer.MAX_VALUE;
-                }
-            }
-        };
-        private final List<Integer> parts;
-        private final String key;
-        Parsed(String key) {
-            this.key = key;
-            final Iterable<String> iter = Splitter.on(".").split(key);
-            parts = Lists.newArrayList(Iterators.transform(iter.iterator(), PARSE));
-        }
-
-        @Override
-        public int compareTo(Parsed<V> other) {
-            for (int i = 0; i < parts.size(); i++) {
-                Integer p = parts.get(i);
-                if (other.parts.size() == i) {
-                    // run out of parts for other, put it before us
-                    return +1;
-                }
-                final Integer q = other.parts.get(i);
-                final int comparison = p.compareTo(q);
-                if(comparison != 0) {
-                    return +comparison;
-                }
-            }
-            if(other.parts.size() > parts.size()) {
-                // run out of parts on our side, still more on others; put us before it
-                return -1;
-            }
-            return 0;
-        }
-    }
-}
-
-

http://git-wip-us.apache.org/repos/asf/isis/blob/d2340ebd/core/runtime/src/main/java/org/apache/isis/core/runtime/services/ServicesInstallerFromAnnotation.java
----------------------------------------------------------------------
diff --git a/core/runtime/src/main/java/org/apache/isis/core/runtime/services/ServicesInstallerFromAnnotation.java b/core/runtime/src/main/java/org/apache/isis/core/runtime/services/ServicesInstallerFromAnnotation.java
index dfc19e7..5b7ebb2 100644
--- a/core/runtime/src/main/java/org/apache/isis/core/runtime/services/ServicesInstallerFromAnnotation.java
+++ b/core/runtime/src/main/java/org/apache/isis/core/runtime/services/ServicesInstallerFromAnnotation.java
@@ -26,7 +26,6 @@ import java.util.SortedMap;
 import java.util.SortedSet;
 
 import javax.annotation.PreDestroy;
-import javax.jdo.annotations.PersistenceCapable;
 
 import com.google.common.base.Function;
 import com.google.common.base.Joiner;
@@ -38,10 +37,6 @@ import com.google.common.collect.Lists;
 import com.google.common.collect.Maps;
 
 import org.reflections.Reflections;
-import org.reflections.scanners.SubTypesScanner;
-import org.reflections.scanners.TypeAnnotationsScanner;
-import org.reflections.util.ClasspathHelper;
-import org.reflections.util.ConfigurationBuilder;
 import org.reflections.vfs.Vfs;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -49,8 +44,8 @@ import org.slf4j.LoggerFactory;
 import org.apache.isis.applib.AppManifest;
 import org.apache.isis.applib.annotation.DomainService;
 import org.apache.isis.applib.annotation.DomainServiceLayout;
-import org.apache.isis.applib.fixturescripts.FixtureScript;
 import org.apache.isis.applib.services.classdiscovery.ClassDiscoveryServiceUsingReflections;
+import org.apache.isis.core.metamodel.util.DeweyOrderComparator;
 
 import static com.google.common.base.Predicates.and;
 import static com.google.common.base.Predicates.not;

http://git-wip-us.apache.org/repos/asf/isis/blob/d2340ebd/core/runtime/src/main/java/org/apache/isis/core/runtime/services/ServicesInstallerFromConfiguration.java
----------------------------------------------------------------------
diff --git a/core/runtime/src/main/java/org/apache/isis/core/runtime/services/ServicesInstallerFromConfiguration.java b/core/runtime/src/main/java/org/apache/isis/core/runtime/services/ServicesInstallerFromConfiguration.java
index e58d90e..0b75593 100644
--- a/core/runtime/src/main/java/org/apache/isis/core/runtime/services/ServicesInstallerFromConfiguration.java
+++ b/core/runtime/src/main/java/org/apache/isis/core/runtime/services/ServicesInstallerFromConfiguration.java
@@ -34,6 +34,7 @@ import org.slf4j.LoggerFactory;
 
 import org.apache.isis.core.commons.config.ConfigurationConstants;
 import org.apache.isis.core.commons.config.IsisConfiguration;
+import org.apache.isis.core.metamodel.util.DeweyOrderComparator;
 import org.apache.isis.core.runtime.fixturedomainservice.ObjectFixtureService;
 import org.apache.isis.core.runtime.system.DeploymentType;
 import org.apache.isis.core.runtime.system.SystemConstants;

http://git-wip-us.apache.org/repos/asf/isis/blob/d2340ebd/core/runtime/src/main/java/org/apache/isis/core/runtime/services/ServicesInstallerFromConfigurationAndAnnotation.java
----------------------------------------------------------------------
diff --git a/core/runtime/src/main/java/org/apache/isis/core/runtime/services/ServicesInstallerFromConfigurationAndAnnotation.java b/core/runtime/src/main/java/org/apache/isis/core/runtime/services/ServicesInstallerFromConfigurationAndAnnotation.java
index 3ef5ad7..20c5869 100644
--- a/core/runtime/src/main/java/org/apache/isis/core/runtime/services/ServicesInstallerFromConfigurationAndAnnotation.java
+++ b/core/runtime/src/main/java/org/apache/isis/core/runtime/services/ServicesInstallerFromConfigurationAndAnnotation.java
@@ -30,6 +30,7 @@ import org.slf4j.LoggerFactory;
 
 import org.apache.isis.core.commons.config.IsisConfiguration;
 import org.apache.isis.core.commons.config.IsisConfigurationBuilder;
+import org.apache.isis.core.metamodel.util.DeweyOrderComparator;
 
 public class ServicesInstallerFromConfigurationAndAnnotation extends ServicesInstallerAbstract  {
 

http://git-wip-us.apache.org/repos/asf/isis/blob/d2340ebd/core/runtime/src/test/java/org/apache/isis/core/runtime/services/DeweyOrderComparatorTest.java
----------------------------------------------------------------------
diff --git a/core/runtime/src/test/java/org/apache/isis/core/runtime/services/DeweyOrderComparatorTest.java b/core/runtime/src/test/java/org/apache/isis/core/runtime/services/DeweyOrderComparatorTest.java
index d0f5448..71b6e01 100644
--- a/core/runtime/src/test/java/org/apache/isis/core/runtime/services/DeweyOrderComparatorTest.java
+++ b/core/runtime/src/test/java/org/apache/isis/core/runtime/services/DeweyOrderComparatorTest.java
@@ -26,6 +26,8 @@ import org.junit.Rule;
 import org.junit.Test;
 import org.junit.rules.ExpectedException;
 
+import org.apache.isis.core.metamodel.util.DeweyOrderComparator;
+
 import static org.hamcrest.CoreMatchers.is;
 
 public class DeweyOrderComparatorTest {

http://git-wip-us.apache.org/repos/asf/isis/blob/d2340ebd/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/layout/bs3/col/Col.html
----------------------------------------------------------------------
diff --git a/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/layout/bs3/col/Col.html b/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/layout/bs3/col/Col.html
index fef305b..6518561 100644
--- a/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/layout/bs3/col/Col.html
+++ b/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/layout/bs3/col/Col.html
@@ -40,7 +40,7 @@
                 <div class="fieldSets" wicket:id="fieldSets">
                     [fieldsets]
                 </div>
-                <div class="collections" wicket:id="collections">
+                <div class="collections entityCollection" wicket:id="collections">
                     [collections]
                 </div>
             </div>

http://git-wip-us.apache.org/repos/asf/isis/blob/d2340ebd/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
index 6f36549..09337dc 100644
--- 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
@@ -38,7 +38,7 @@ 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.runtime.services.DeweyOrderComparator;
+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;

http://git-wip-us.apache.org/repos/asf/isis/blob/d2340ebd/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 43c615d..5df7fcb 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
@@ -469,6 +469,8 @@ div.additionalLinkList {
     padding-bottom: 10px;
 }
 
+.collections div.additionalLinkList,
+.collections ul.additionalLinkList,
 .standaloneCollectionPanel div.additionalLinkList,
 .standaloneCollectionPanel ul.additionalLinkList,
 .entityCollectionsPanel div.additionalLinkList,


[20/50] [abbrv] isis git commit: ISIS-993: starting to remove the FC (fixed col) stuff ... moving out FCColumn.Hint enum.

Posted by da...@apache.org.
ISIS-993: starting to remove the FC (fixed col) stuff ... moving out FCColumn.Hint enum.


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

Branch: refs/heads/master
Commit: e57acf256b1c727475be62fed70e1d6a07f28327
Parents: a40a869
Author: Dan Haywood <da...@haywood-associates.co.uk>
Authored: Tue Feb 16 10:03:37 2016 +0000
Committer: Dan Haywood <da...@haywood-associates.co.uk>
Committed: Tue Feb 16 10:03:37 2016 +0000

----------------------------------------------------------------------
 .../json/LayoutMetadataReaderFromJson.java      |  2 +-
 .../grid/fixedcols/applib/FCColumn.java         | 26 ----------
 .../services/grid/fixedcols/applib/FCGrid.java  |  4 +-
 .../services/grid/fixedcols/applib/FCTab.java   |  6 +--
 .../services/grid/fixedcols/applib/Hint.java    | 51 ++++++++++++++++++++
 .../metamodel/spec/ObjectSpecifications.java    |  9 ++--
 .../viewer/wicket/model/models/EntityModel.java |  2 +-
 .../components/layout/fixedcols/PropUtil.java   |  3 +-
 .../layout/fixedcols/columns/EntityColumn.java  |  9 ++--
 .../propsandcolls/EntityPropsAndCollsForm.java  |  2 +-
 10 files changed, 70 insertions(+), 44 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/isis/blob/e57acf25/core/metamodel/src/main/java/org/apache/isis/core/metamodel/layoutmetadata/json/LayoutMetadataReaderFromJson.java
----------------------------------------------------------------------
diff --git a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/layoutmetadata/json/LayoutMetadataReaderFromJson.java b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/layoutmetadata/json/LayoutMetadataReaderFromJson.java
index 59cdb77..1c11dea 100644
--- a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/layoutmetadata/json/LayoutMetadataReaderFromJson.java
+++ b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/layoutmetadata/json/LayoutMetadataReaderFromJson.java
@@ -84,7 +84,7 @@ import org.apache.isis.core.metamodel.runtimecontext.ServicesInjectorAware;
 import org.apache.isis.core.metamodel.spec.ActionType;
 import org.apache.isis.core.metamodel.spec.ObjectSpecification;
 import org.apache.isis.core.metamodel.spec.ObjectSpecifications;
-import org.apache.isis.core.metamodel.services.grid.fixedcols.applib.FCColumn.Hint;
+import org.apache.isis.core.metamodel.services.grid.fixedcols.applib.Hint;
 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;

http://git-wip-us.apache.org/repos/asf/isis/blob/e57acf25/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
index f071117..b2cab4b 100644
--- 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
@@ -28,7 +28,6 @@ import javax.xml.bind.annotation.XmlType;
 
 import com.google.common.collect.Lists;
 
-import org.apache.isis.applib.annotation.MemberGroupLayout;
 import org.apache.isis.applib.layout.component.CollectionLayoutData;
 import org.apache.isis.applib.layout.component.CollectionLayoutDataOwner;
 import org.apache.isis.applib.layout.component.FieldSet;
@@ -133,29 +132,4 @@ public class FCColumn implements Serializable, FieldSetOwner, CollectionLayoutDa
         this.hint = hint;
     }
 
-
-
-    public enum Hint {
-        LEFT,
-        MIDDLE,
-        RIGHT;
-
-        public int from(MemberGroupLayout.ColumnSpans columnSpans) {
-            if(this == LEFT) return columnSpans.getLeft();
-            if(this == MIDDLE) return columnSpans.getMiddle();
-            if(this == RIGHT) return columnSpans.getRight();
-            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/e57acf25/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
index 851e504..b544fc2 100644
--- 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
@@ -79,7 +79,7 @@ public class FCGrid extends GridAbstract implements Dto, ActionLayoutDataOwner,
 
     public void setLeft(final FCColumn left) {
         this.left = left;
-        left.setHint(FCColumn.Hint.LEFT);
+        left.setHint(Hint.LEFT);
     }
 
 
@@ -107,7 +107,7 @@ public class FCGrid extends GridAbstract implements Dto, ActionLayoutDataOwner,
 
     public void setRight(final FCColumn right) {
         this.right = right;
-        right.setHint(FCColumn.Hint.RIGHT);
+        right.setHint(Hint.RIGHT);
     }
 
 

http://git-wip-us.apache.org/repos/asf/isis/blob/e57acf25/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
index 1dc41c7..49e4489 100644
--- 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
@@ -70,7 +70,7 @@ public class FCTab implements FCColumnOwner, Serializable, Owned<FCTabGroup> {
 
     public void setLeft(final FCColumn left) {
         this.left = left;
-        left.setHint(FCColumn.Hint.LEFT);
+        left.setHint(Hint.LEFT);
     }
 
 
@@ -83,7 +83,7 @@ public class FCTab implements FCColumnOwner, Serializable, Owned<FCTabGroup> {
 
     public void setMiddle(final FCColumn middle) {
         this.middle = middle;
-        middle.setHint(FCColumn.Hint.MIDDLE);
+        middle.setHint(Hint.MIDDLE);
     }
 
 
@@ -96,7 +96,7 @@ public class FCTab implements FCColumnOwner, Serializable, Owned<FCTabGroup> {
 
     public void setRight(final FCColumn right) {
         this.right = right;
-        right.setHint(FCColumn.Hint.RIGHT);
+        right.setHint(Hint.RIGHT);
     }
 
 

http://git-wip-us.apache.org/repos/asf/isis/blob/e57acf25/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
new file mode 100644
index 0000000..a4b0555
--- /dev/null
+++ b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/services/grid/fixedcols/applib/Hint.java
@@ -0,0 +1,51 @@
+/*
+ *  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.annotation.MemberGroupLayout;
+
+public enum Hint {
+    LEFT,
+    MIDDLE,
+    RIGHT;
+
+    public int from(MemberGroupLayout.ColumnSpans columnSpans) {
+        if (this == LEFT)
+            return columnSpans.getLeft();
+        if (this == MIDDLE)
+            return columnSpans.getMiddle();
+        if (this == RIGHT)
+            return columnSpans.getRight();
+        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/e57acf25/core/metamodel/src/main/java/org/apache/isis/core/metamodel/spec/ObjectSpecifications.java
----------------------------------------------------------------------
diff --git a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/spec/ObjectSpecifications.java b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/spec/ObjectSpecifications.java
index a47e9c5..d3a7f77 100644
--- a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/spec/ObjectSpecifications.java
+++ b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/spec/ObjectSpecifications.java
@@ -25,9 +25,8 @@ import java.util.Set;
 
 import com.google.common.collect.Lists;
 
-import org.apache.isis.core.metamodel.services.grid.fixedcols.applib.FCColumn;
 import org.apache.isis.core.metamodel.facets.object.membergroups.MemberGroupLayoutFacet;
-
+import org.apache.isis.core.metamodel.services.grid.fixedcols.applib.Hint;
 
 public final class ObjectSpecifications {
 
@@ -37,7 +36,7 @@ public final class ObjectSpecifications {
     public static List<String> orderByMemberGroups(
             final ObjectSpecification objSpec,
             final Set<String> groupNamesToOrder,
-            final FCColumn.Hint hint) {
+            final Hint hint) {
 
         final MemberGroupLayoutFacet facet = objSpec.getFacet(MemberGroupLayoutFacet.class);
         final List<String> leftColumnGroupNames = Lists.newArrayList(groupNamesToOrder);
@@ -47,10 +46,10 @@ public final class ObjectSpecifications {
             return leftColumnGroupNames;
         }
         
-        if(hint == FCColumn.Hint.MIDDLE) {
+        if(hint == Hint.MIDDLE) {
             return facet.getColumnSpans().getMiddle()>0? facet.getMiddle(): Collections.<String>emptyList();
         }
-        if(hint == FCColumn.Hint.RIGHT) {
+        if(hint == Hint.RIGHT) {
             return facet.getColumnSpans().getRight()>0? facet.getRight(): Collections.<String>emptyList();
         }
         

http://git-wip-us.apache.org/repos/asf/isis/blob/e57acf25/core/viewer-wicket-model/src/main/java/org/apache/isis/viewer/wicket/model/models/EntityModel.java
----------------------------------------------------------------------
diff --git a/core/viewer-wicket-model/src/main/java/org/apache/isis/viewer/wicket/model/models/EntityModel.java b/core/viewer-wicket-model/src/main/java/org/apache/isis/viewer/wicket/model/models/EntityModel.java
index 22866d4..b26529b 100644
--- a/core/viewer-wicket-model/src/main/java/org/apache/isis/viewer/wicket/model/models/EntityModel.java
+++ b/core/viewer-wicket-model/src/main/java/org/apache/isis/viewer/wicket/model/models/EntityModel.java
@@ -29,7 +29,7 @@ import org.apache.wicket.model.Model;
 import org.apache.wicket.request.mapper.parameter.PageParameters;
 
 import org.apache.isis.applib.annotation.BookmarkPolicy;
-import org.apache.isis.core.metamodel.services.grid.fixedcols.applib.FCColumn.Hint;
+import org.apache.isis.core.metamodel.services.grid.fixedcols.applib.Hint;
 import org.apache.isis.applib.services.memento.MementoService.Memento;
 import org.apache.isis.core.metamodel.adapter.ObjectAdapter;
 import org.apache.isis.core.metamodel.adapter.mgr.AdapterManager.ConcurrencyChecking;

http://git-wip-us.apache.org/repos/asf/isis/blob/e57acf25/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
index f487ef0..7fdd5ec 100644
--- 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
@@ -30,6 +30,7 @@ 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;
@@ -43,7 +44,7 @@ public final class PropUtil {
 
     public static List<String> propertyGroupNames(
             final EntityModel entityModel,
-            final FCColumn.Hint hint, final FCColumn columnMetaDataIfAny) {
+            final Hint hint, final FCColumn columnMetaDataIfAny) {
         final ObjectAdapter adapter = entityModel.getObject();
         final ObjectSpecification objSpec = adapter.getSpecification();
 

http://git-wip-us.apache.org/repos/asf/isis/blob/e57acf25/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
index 2abe0a6..b790d2f 100644
--- 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
@@ -36,6 +36,7 @@ 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;
@@ -54,7 +55,7 @@ import org.apache.isis.viewer.wicket.ui.util.Components;
  * <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 FCColumn.Hint} is
+ *     {@link ObjectSpecification} in conjunction with the provided {@link Hint} is
  *     used to filter down to just those properties/collections in the column.
  * </p>
  */
@@ -69,9 +70,9 @@ public class EntityColumn extends PanelAbstract<EntityModel> {
     private final FCColumn columnMetaDataIfAny;
 
     // which column to render (populated for EntityEditablePanel, not required and so absent for EntityTabbedPanel)
-    final FCColumn.Hint hint;
+    final Hint hint;
 
-    private static FCColumn.Hint hintFrom(final EntityModel entityModel) {
+    private static Hint hintFrom(final EntityModel entityModel) {
         final FCColumn fcColumn = (FCColumn) entityModel.getLayoutMetadata();
         return fcColumn.getHint();
     }
@@ -87,7 +88,7 @@ public class EntityColumn extends PanelAbstract<EntityModel> {
     public EntityColumn(
             final String id,
             final EntityModel entityModel,
-            final FCColumn.Hint hint) {
+            final Hint hint) {
 
         super(id, entityModel);
 

http://git-wip-us.apache.org/repos/asf/isis/blob/e57acf25/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
index 0b1d7b7..f8ba43d 100644
--- 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
@@ -45,7 +45,7 @@ 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.FCColumn.Hint;
+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;


[41/50] [abbrv] isis git commit: ISIS-993: ensure that actions associated to properties/collections/fieldsets are added in the correct order when normalizing grid.

Posted by da...@apache.org.
ISIS-993: ensure that actions associated to properties/collections/fieldsets are added in the correct order when normalizing grid.


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

Branch: refs/heads/master
Commit: e417a8ab5984393394113066a7ad1ea8379bcab2
Parents: e014bf8
Author: Dan Haywood <da...@haywood-associates.co.uk>
Authored: Mon Feb 29 11:10:50 2016 +0000
Committer: Dan Haywood <da...@haywood-associates.co.uk>
Committed: Mon Feb 29 11:13:43 2016 +0000

----------------------------------------------------------------------
 .../bootstrap3/GridNormalizerServiceBS3.java    | 31 ++++++++++++++++----
 .../spec/feature/ObjectAssociation.java         |  4 +++
 .../metamodel/spec/feature/ObjectMember.java    | 24 +++++++++++++++
 .../specimpl/ObjectSpecificationAbstract.java   |  3 +-
 4 files changed, 55 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/isis/blob/e417a8ab/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 c57212a..0f7fa85 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
@@ -62,6 +62,7 @@ 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.ObjectMember;
 import org.apache.isis.core.metamodel.spec.feature.OneToManyAssociation;
 import org.apache.isis.core.metamodel.spec.feature.OneToOneAssociation;
 
@@ -423,7 +424,7 @@ public class GridNormalizerServiceBS3 extends GridNormalizerServiceAbstract<BS3G
                             return oneToManyAssociationById.get(collectionId);
                         }
                     })
-                    .toSortedList(ObjectAssociation.Comparators.byMemberOrderSequence())
+                    .toSortedList(ObjectMember.Comparators.byMemberOrderSequence())
 
             );
             final ImmutableList<String> sortedMissingCollectionIds = FluentIterable.from(sortedCollections)
@@ -447,7 +448,21 @@ public class GridNormalizerServiceBS3 extends GridNormalizerServiceAbstract<BS3G
 
         final List<String> associatedActionIds = Lists.newArrayList();
 
-        FluentIterable.from(possiblyMissingActionIds)
+        List<ObjectAction> sortedPossiblyMissingActions = Lists.newArrayList(
+                FluentIterable.from(possiblyMissingActionIds)
+                        .transform(new Function<String, ObjectAction>() {
+                            @Nullable @Override public ObjectAction apply(@Nullable final String actionId) {
+                                return objectActionById.get(actionId);
+                            }
+                        })
+                        .toSortedList(ObjectMember.Comparators.byMemberOrderSequence()));
+
+        List<String> sortedPossiblyMissingActionIds =
+                FluentIterable.from(sortedPossiblyMissingActions)
+                .transform(ObjectMember.Functions.getId())
+                .toList();
+
+            FluentIterable.from(sortedPossiblyMissingActionIds)
                 .forEach(
                         new Consumer<String>() {
                             @Override
@@ -523,7 +538,7 @@ public class GridNormalizerServiceBS3 extends GridNormalizerServiceAbstract<BS3G
 
         // ... the missing actions are those in the second tuple, excluding those associated (via @MemberOrder#name)
         // to a property or collection.
-        final List<String> missingActionIds = Lists.newArrayList(possiblyMissingActionIds);
+        final List<String> missingActionIds = Lists.newArrayList(sortedPossiblyMissingActionIds);
         missingActionIds.removeAll(associatedActionIds);
 
         for (String surplusActionId : surplusActionIds) {
@@ -533,7 +548,7 @@ public class GridNormalizerServiceBS3 extends GridNormalizerServiceAbstract<BS3G
         if(!missingActionIds.isEmpty()) {
             final BS3Col bs3Col = colForUnreferencedActionsRef.get();
             if(bs3Col != null) {
-                addActionsTo(bs3Col, missingActionIds);
+                addActionsTo(bs3Col, missingActionIds, actionLayoutDataById);
             } else {
                 final FieldSet fieldSet = fieldSetForUnreferencedActionsRef.get();
                 if(fieldSet != null) {
@@ -587,14 +602,18 @@ public class GridNormalizerServiceBS3 extends GridNormalizerServiceAbstract<BS3G
 
     protected void addActionsTo(
             final BS3Col bs3Col,
-            final List<String> actionIds) {
+            final List<String> actionIds,
+            final LinkedHashMap<String, ActionLayoutData> actionLayoutDataById) {
         for (String actionId : actionIds) {
             List<ActionLayoutData> actions = bs3Col.getActions();
             if(actions == null) {
                 actions = Lists.newArrayList();
                 bs3Col.setActions(actions);
             }
-            actions.add(new ActionLayoutData(actionId));
+            final ActionLayoutData actionLayoutData = new ActionLayoutData(actionId);
+            actions.add(actionLayoutData);
+            actionLayoutDataById.put(actionId, actionLayoutData);
+            actionLayoutData.setOwner(bs3Col);
         }
     }
 

http://git-wip-us.apache.org/repos/asf/isis/blob/e417a8ab/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 ae31903..922144b 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
@@ -410,6 +410,10 @@ public interface ObjectAssociation extends ObjectMember, CurrentHolder {
     // //////////////////////////////////////////////////////
 
     public static class Comparators {
+        /**
+         * Use {@link ObjectMember.Comparators#byMemberOrderSequence()} instead.
+         */
+        @Deprecated
         public static Comparator<ObjectAssociation> byMemberOrderSequence() {
             return new Comparator<ObjectAssociation>() {
                 private final DeweyOrderComparator deweyOrderComparator = new DeweyOrderComparator();

http://git-wip-us.apache.org/repos/asf/isis/blob/e417a8ab/core/metamodel/src/main/java/org/apache/isis/core/metamodel/spec/feature/ObjectMember.java
----------------------------------------------------------------------
diff --git a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/spec/feature/ObjectMember.java b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/spec/feature/ObjectMember.java
index 9d8fa15..147cc61 100644
--- a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/spec/feature/ObjectMember.java
+++ b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/spec/feature/ObjectMember.java
@@ -19,6 +19,7 @@
 
 package org.apache.isis.core.metamodel.spec.feature;
 
+import java.util.Comparator;
 import java.util.HashMap;
 import java.util.List;
 
@@ -33,6 +34,8 @@ 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.facets.all.hide.HiddenFacet;
+import org.apache.isis.core.metamodel.facets.members.order.MemberOrderFacet;
+import org.apache.isis.core.metamodel.util.DeweyOrderComparator;
 
 /**
  * Provides reflective access to an action or a field on a domain object.
@@ -185,4 +188,25 @@ public interface ObjectMember extends ObjectFeature {
         }
     }
 
+    // //////////////////////////////////////////////////////
+    // Comparators
+    // //////////////////////////////////////////////////////
+
+    public static class Comparators {
+        public static Comparator<ObjectMember> byMemberOrderSequence() {
+            return new Comparator<ObjectMember>() {
+                private final DeweyOrderComparator deweyOrderComparator = new DeweyOrderComparator();
+                @Override
+                public int compare(final ObjectMember o1, final ObjectMember 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());
+                }
+            };
+        }
+
+    }
+
 }

http://git-wip-us.apache.org/repos/asf/isis/blob/e417a8ab/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 708e700..68eaf9b 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
@@ -95,6 +95,7 @@ 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.ObjectActionParameter;
 import org.apache.isis.core.metamodel.spec.feature.ObjectAssociation;
+import org.apache.isis.core.metamodel.spec.feature.ObjectMember;
 import org.apache.isis.core.metamodel.spec.feature.ObjectMemberDependencies;
 import org.apache.isis.core.metamodel.spec.feature.OneToManyAssociation;
 import org.apache.isis.core.metamodel.spec.feature.OneToOneAssociation;
@@ -712,7 +713,7 @@ public abstract class ObjectSpecificationAbstract extends FacetHolderImpl implem
         return Lists.newArrayList(
                 FluentIterable.from(allAssociations)
                         .filter(Filters.asPredicate(filter))
-                        .toSortedList(ObjectAssociation.Comparators.byMemberOrderSequence())
+                        .toSortedList(ObjectMember.Comparators.byMemberOrderSequence())
         );
     }
 


[19/50] [abbrv] isis git commit: ISIS-993: reuse Wicket's isVisible() for dynamically visible content (refactor of HasDynamicallyVisibleContent interface).

Posted by da...@apache.org.
ISIS-993: reuse Wicket's isVisible() for dynamically visible content (refactor of HasDynamicallyVisibleContent interface).


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

Branch: refs/heads/master
Commit: a40a8696f3fde8e02d82d3bf409052b898d2dc5e
Parents: f65487e4
Author: Dan Haywood <da...@haywood-associates.co.uk>
Authored: Tue Feb 16 10:00:46 2016 +0000
Committer: Dan Haywood <da...@haywood-associates.co.uk>
Committed: Tue Feb 16 10:00:46 2016 +0000

----------------------------------------------------------------------
 .../collection/EntityCollectionPanel.java       | 10 +++++-----
 .../entity/fieldset/PropertyGroup.java          | 10 +++++-----
 .../ui/components/layout/bs3/col/Col.java       | 20 ++++++++++----------
 ...eatingViewWithDynamicallyVisibleContent.java | 10 +++++-----
 .../ui/components/layout/bs3/row/Row.java       | 10 +++++-----
 .../layout/bs3/tabs/TabGroupPanel.java          |  2 +-
 .../ui/components/layout/bs3/tabs/TabPanel.java | 13 ++++---------
 .../ui/panels/HasDynamicallyVisibleContent.java | 12 +++++++++++-
 .../java/domainapp/dom/simple/SimpleObject.java |  8 ++++++++
 9 files changed, 54 insertions(+), 41 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/isis/blob/a40a8696/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/collection/EntityCollectionPanel.java
----------------------------------------------------------------------
diff --git a/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/collection/EntityCollectionPanel.java b/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/collection/EntityCollectionPanel.java
index 0fa887d..01824bd 100644
--- a/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/collection/EntityCollectionPanel.java
+++ b/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/collection/EntityCollectionPanel.java
@@ -82,7 +82,7 @@ public class EntityCollectionPanel extends PanelAbstract<EntityModel> implements
         super.onInitialize();
 
         final WebMarkupContainer panel = this;
-        if(contentDynamicallyVisible) {
+        if(visible) {
             panel.add(div);
         } else {
             Components.permanentlyHide(panel, div.getId());
@@ -100,7 +100,7 @@ public class EntityCollectionPanel extends PanelAbstract<EntityModel> implements
 
         if(visibility.isAllowed()) {
 
-            contentDynamicallyVisible = true;
+            visible = true;
 
             final CssClassFacet facet = association.getFacet(CssClassFacet.class);
             if(facet != null) {
@@ -153,10 +153,10 @@ public class EntityCollectionPanel extends PanelAbstract<EntityModel> implements
         return div;
     }
 
-    private boolean contentDynamicallyVisible = false;
+    private boolean visible = false;
     @Override
-    public boolean isContentDynamicallyVisible() {
-        return contentDynamicallyVisible;
+    public boolean isVisible() {
+        return visible;
     }
 
 }

http://git-wip-us.apache.org/repos/asf/isis/blob/a40a8696/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/fieldset/PropertyGroup.java
----------------------------------------------------------------------
diff --git a/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/fieldset/PropertyGroup.java b/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/fieldset/PropertyGroup.java
index fac77cf..a1810bf 100644
--- a/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/fieldset/PropertyGroup.java
+++ b/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/fieldset/PropertyGroup.java
@@ -115,7 +115,7 @@ public class PropertyGroup extends PanelAbstract<EntityModel> implements HasDyna
             final WebMarkupContainer propertyRvContainer = new WebMarkupContainer(propertyRv.newChildId());
             propertyRv.add(propertyRvContainer);
             addPropertyToForm(getModel(), (OneToOneAssociation) association, propertyRvContainer, memberGroupActions);
-            contentDynamicallyVisible = true;
+            visible = true;
         }
 
         final List<LinkAndLabel> actionsPanel = LinkAndLabel
@@ -133,7 +133,7 @@ public class PropertyGroup extends PanelAbstract<EntityModel> implements HasDyna
                 AdditionalLinksPanel.Style.DROPDOWN);
 
         // either add the built content, or hide entire
-        if(!contentDynamicallyVisible) {
+        if(!visible) {
             Components.permanentlyHide(this, div.getId());
         } else {
             this.add(div);
@@ -159,10 +159,10 @@ public class PropertyGroup extends PanelAbstract<EntityModel> implements HasDyna
     }
 
 
-    private boolean contentDynamicallyVisible = false;
+    private boolean visible = false;
     @Override
-    public boolean isContentDynamicallyVisible() {
-        return contentDynamicallyVisible;
+    public boolean isVisible() {
+        return visible;
     }
 
 }

http://git-wip-us.apache.org/repos/asf/isis/blob/a40a8696/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/layout/bs3/col/Col.java
----------------------------------------------------------------------
diff --git a/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/layout/bs3/col/Col.java b/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/layout/bs3/col/Col.java
index 8f99ad1..132218f 100644
--- a/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/layout/bs3/col/Col.java
+++ b/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/layout/bs3/col/Col.java
@@ -117,7 +117,7 @@ public class Col extends PanelAbstract<EntityModel> implements HasDynamicallyVis
             actionIdToUse = "entityActions";
             actionIdToHide = "actions";
 
-            contentDynamicallyVisible = true;
+            visible = true;
         } else {
             Components.permanentlyHide(div, ID_ENTITY_HEADER_PANEL);
             actionOwner = div;
@@ -150,7 +150,7 @@ public class Col extends PanelAbstract<EntityModel> implements HasDynamicallyVis
 
         if(!entityActionLinks.isEmpty()) {
             AdditionalLinksPanel.addAdditionalLinks(actionOwner, actionIdToUse, entityActionLinks, AdditionalLinksPanel.Style.INLINE_LIST);
-            contentDynamicallyVisible = true;
+            visible = true;
         } else {
             Components.permanentlyHide(actionOwner, actionIdToUse);
         }
@@ -165,7 +165,7 @@ public class Col extends PanelAbstract<EntityModel> implements HasDynamicallyVis
         if(!rows.isEmpty()) {
             final RepeatingViewWithDynamicallyVisibleContent rowsRv = buildRows(ID_ROWS, rows);
             div.add(rowsRv);
-            contentDynamicallyVisible = contentDynamicallyVisible || rowsRv.isContentDynamicallyVisible();
+            visible = visible || rowsRv.isVisible();
         } else {
             Components.permanentlyHide(div, ID_ROWS);
         }
@@ -218,7 +218,7 @@ public class Col extends PanelAbstract<EntityModel> implements HasDynamicallyVis
 
             }
             div.add(tabGroupRv);
-            contentDynamicallyVisible = contentDynamicallyVisible || tabGroupRv.isContentDynamicallyVisible();
+            visible = visible || tabGroupRv.isVisible();
         } else {
             Components.permanentlyHide(div, ID_TAB_GROUPS);
         }
@@ -245,7 +245,7 @@ public class Col extends PanelAbstract<EntityModel> implements HasDynamicallyVis
                 fieldSetRv.add(propertyGroup);
             }
             div.add(fieldSetRv);
-            contentDynamicallyVisible = contentDynamicallyVisible || fieldSetRv.isContentDynamicallyVisible();
+            visible = visible || fieldSetRv.isVisible();
         } else {
             Components.permanentlyHide(div, ID_FIELD_SETS);
         }
@@ -266,14 +266,14 @@ public class Col extends PanelAbstract<EntityModel> implements HasDynamicallyVis
                 collectionRv.add(collectionPanel);
             }
             div.add(collectionRv);
-            contentDynamicallyVisible = contentDynamicallyVisible || collectionRv.isContentDynamicallyVisible();
+            visible = visible || collectionRv.isVisible();
         } else {
             Components.permanentlyHide(div, ID_COLLECTIONS);
         }
 
 
         final WebMarkupContainer panel = this;
-        if(contentDynamicallyVisible) {
+        if(visible) {
             panel.add(div);
         } else {
             Components.permanentlyHide(panel, div.getId());
@@ -298,10 +298,10 @@ public class Col extends PanelAbstract<EntityModel> implements HasDynamicallyVis
     }
 
 
-    private boolean contentDynamicallyVisible = false;
+    private boolean visible = false;
     @Override
-    public boolean isContentDynamicallyVisible() {
-        return contentDynamicallyVisible;
+    public boolean isVisible() {
+        return visible;
     }
 
     ///////////////////////////////////////////////////////

http://git-wip-us.apache.org/repos/asf/isis/blob/a40a8696/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/layout/bs3/col/RepeatingViewWithDynamicallyVisibleContent.java
----------------------------------------------------------------------
diff --git a/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/layout/bs3/col/RepeatingViewWithDynamicallyVisibleContent.java b/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/layout/bs3/col/RepeatingViewWithDynamicallyVisibleContent.java
index b61e912..aaf61a1 100644
--- a/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/layout/bs3/col/RepeatingViewWithDynamicallyVisibleContent.java
+++ b/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/layout/bs3/col/RepeatingViewWithDynamicallyVisibleContent.java
@@ -36,19 +36,19 @@ public class RepeatingViewWithDynamicallyVisibleContent extends RepeatingView im
         for (Component child : children) {
             if(child instanceof HasDynamicallyVisibleContent) {
                 final HasDynamicallyVisibleContent hasDynamicallyVisibleContent = (HasDynamicallyVisibleContent) child;
-                contentDynamicallyVisible = contentDynamicallyVisible || hasDynamicallyVisibleContent.isContentDynamicallyVisible();
+                visible = visible || hasDynamicallyVisibleContent.isVisible();
             } else {
-                contentDynamicallyVisible = true;
+                visible = true;
             }
         }
         return component;
     }
 
-    private boolean contentDynamicallyVisible = false;
+    private boolean visible = false;
 
     @Override
-    public boolean isContentDynamicallyVisible() {
-        return contentDynamicallyVisible;
+    public boolean isVisible() {
+        return visible;
     }
 
 }

http://git-wip-us.apache.org/repos/asf/isis/blob/a40a8696/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/layout/bs3/row/Row.java
----------------------------------------------------------------------
diff --git a/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/layout/bs3/row/Row.java b/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/layout/bs3/row/Row.java
index 56d0e05..06327b2 100644
--- a/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/layout/bs3/row/Row.java
+++ b/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/layout/bs3/row/Row.java
@@ -67,7 +67,7 @@ public class Row extends PanelAbstract<EntityModel> implements HasDynamicallyVis
             final WebMarkupContainer rowContent;
             if(bs3RowContent instanceof BS3Col) {
                 Col col = new Col(id, entityModelWithHints);
-                contentDynamicallyVisible = contentDynamicallyVisible || col.isContentDynamicallyVisible();
+                visible = visible || col.isVisible();
                 rowContent = col;
 
             } else if (bs3RowContent instanceof BS3ClearFix) {
@@ -80,7 +80,7 @@ public class Row extends PanelAbstract<EntityModel> implements HasDynamicallyVis
         }
 
         final WebMarkupContainer panel = this;
-        if(contentDynamicallyVisible) {
+        if(visible) {
             Util.appendCssClass(panel, bs3Row, "row");
             panel.add(rv);
         } else {
@@ -90,10 +90,10 @@ public class Row extends PanelAbstract<EntityModel> implements HasDynamicallyVis
     }
 
 
-    private boolean contentDynamicallyVisible = false;
+    private boolean visible = false;
     @Override
-    public boolean isContentDynamicallyVisible() {
-        return contentDynamicallyVisible;
+    public boolean isVisible() {
+        return visible;
     }
 
     ///////////////////////////////////////////////////////

http://git-wip-us.apache.org/repos/asf/isis/blob/a40a8696/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/layout/bs3/tabs/TabGroupPanel.java
----------------------------------------------------------------------
diff --git a/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/layout/bs3/tabs/TabGroupPanel.java b/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/layout/bs3/tabs/TabGroupPanel.java
index 14db996..3d44a14 100644
--- a/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/layout/bs3/tabs/TabGroupPanel.java
+++ b/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/layout/bs3/tabs/TabGroupPanel.java
@@ -67,7 +67,7 @@ public class TabGroupPanel extends AjaxBootstrapTabbedPanel  {
 
                 @Override
                 public boolean isVisible() {
-                    return rv.isContentDynamicallyVisible();
+                    return rv.isVisible();
                 }
             });
         }

http://git-wip-us.apache.org/repos/asf/isis/blob/a40a8696/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/layout/bs3/tabs/TabPanel.java
----------------------------------------------------------------------
diff --git a/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/layout/bs3/tabs/TabPanel.java b/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/layout/bs3/tabs/TabPanel.java
index 48277ae..c804d69 100644
--- a/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/layout/bs3/tabs/TabPanel.java
+++ b/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/layout/bs3/tabs/TabPanel.java
@@ -47,10 +47,10 @@ public class TabPanel extends PanelAbstract implements HasUiHintDisambiguator, H
 
         final RepeatingViewWithDynamicallyVisibleContent rv = rvIfAny != null ? rvIfAny : newRows(model, bs3Tab);
         div.add(rv);
-        contentDynamicallyVisible = contentDynamicallyVisible || rv.isContentDynamicallyVisible();
+        visible = visible || rv.isVisible();
 
         final WebMarkupContainer panel = this;
-        if(contentDynamicallyVisible) {
+        if(visible) {
             Util.appendCssClassIfRequired(panel, bs3Tab);
             panel.add(div);
         } else {
@@ -74,14 +74,9 @@ public class TabPanel extends PanelAbstract implements HasUiHintDisambiguator, H
         return rv;
     }
 
-    private boolean contentDynamicallyVisible = false;
-    @Override
-    public boolean isContentDynamicallyVisible() {
-        return contentDynamicallyVisible;
-    }
-
+    private boolean visible = false;
     @Override
     public boolean isVisible() {
-        return isContentDynamicallyVisible();
+        return visible;
     }
 }

http://git-wip-us.apache.org/repos/asf/isis/blob/a40a8696/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/panels/HasDynamicallyVisibleContent.java
----------------------------------------------------------------------
diff --git a/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/panels/HasDynamicallyVisibleContent.java b/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/panels/HasDynamicallyVisibleContent.java
index d5440fd..d23e1b8 100644
--- a/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/panels/HasDynamicallyVisibleContent.java
+++ b/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/panels/HasDynamicallyVisibleContent.java
@@ -19,8 +19,18 @@
 
 package org.apache.isis.viewer.wicket.ui.panels;
 
+import org.apache.isis.viewer.wicket.ui.components.layout.bs3.col.Col;
+
+/**
+ * Implemented by all Wicket UI components that contain other content which may or
+ * may not be visible, eg per user, or per imperative hideXxx() method.
+ *
+ * <p>
+ *     The {@link Col}, {@link org.apache.isis.viewer.wicket.ui.components.layout.bs3.row.Row} etc components that implement this interface cascade their visibility up to their parent component; so for example if a tabpanel contains a tab that contains a single fieldset that contains a single property, and that property is invisible, then the entire tab is invisible.
+ * </p>
+ */
 public interface HasDynamicallyVisibleContent {
 
-    boolean isContentDynamicallyVisible();
+    boolean isVisible();
 
 }

http://git-wip-us.apache.org/repos/asf/isis/blob/a40a8696/example/application/simpleapp/dom/src/main/java/domainapp/dom/simple/SimpleObject.java
----------------------------------------------------------------------
diff --git a/example/application/simpleapp/dom/src/main/java/domainapp/dom/simple/SimpleObject.java b/example/application/simpleapp/dom/src/main/java/domainapp/dom/simple/SimpleObject.java
index 18abff2..706db7a 100644
--- a/example/application/simpleapp/dom/src/main/java/domainapp/dom/simple/SimpleObject.java
+++ b/example/application/simpleapp/dom/src/main/java/domainapp/dom/simple/SimpleObject.java
@@ -159,6 +159,10 @@ public class SimpleObject implements Comparable<SimpleObject> {
         return simpleObjects.findByName(getName().substring(0,1));
     }
 
+    public boolean hideSimilarTo() {
+        return getName().contains("ob");
+    }
+
     @CollectionLayout(
             defaultView = "table"
     )
@@ -166,6 +170,10 @@ public class SimpleObject implements Comparable<SimpleObject> {
         return simpleObjects.listAll();
     }
 
+    public boolean hideOthers() {
+        return getName().contains("ob");
+    }
+
     @Inject
     SimpleObjects simpleObjects;
 


[48/50] [abbrv] isis git commit: ISIS-993: extending grid structure to include offsets and allow multiple col-XX-nn to be defined per column.

Posted by da...@apache.org.
ISIS-993: extending grid structure to include offsets and allow multiple col-XX-nn to be defined per column.

Also tidied up the simpleapp:
- removed .layout.json for HomePageViewModel, replaced with a .layout.xml
- cleaned up SimpleObject (removing those test collections)
- removed SimpleObject#updateName action.


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

Branch: refs/heads/master
Commit: ff4d3427b501b37ee0a36ac3f69d67f39fa79526
Parents: f763fce
Author: Dan Haywood <da...@haywood-associates.co.uk>
Authored: Thu Mar 3 18:19:51 2016 +0000
Committer: Dan Haywood <da...@haywood-associates.co.uk>
Committed: Thu Mar 3 18:26:44 2016 +0000

----------------------------------------------------------------------
 .../layout/grid/bootstrap3/bootstrap3.xsd       |  47 +++++----
 .../grid/bootstrap3/BS3ClearFixHidden.java      |   4 +-
 .../grid/bootstrap3/BS3ClearFixVisible.java     |  10 +-
 .../applib/layout/grid/bootstrap3/BS3Col.java   |  27 ++++-
 .../layout/grid/bootstrap3/BS3RowContent.java   |  15 ---
 .../applib/layout/grid/bootstrap3/Size.java     |  16 +++
 .../applib/layout/grid/bootstrap3/SizeSpan.java | 101 +++++++++++++++++++
 .../layout/grid/bootstrap3/BS3ColTest.java      |  45 +++++++++
 .../layout/grid/bootstrap3/SizeSpanTest.java    |  44 ++++++++
 .../bootstrap3/GridNormalizerServiceBS3.java    |   4 +-
 .../homepage/HomePageViewModel.layout.json      |  43 --------
 .../homepage/HomePageViewModel.layout.xml       |  30 ++++++
 .../java/domainapp/dom/simple/SimpleObject.java |  65 +-----------
 .../dom/simple/SimpleObject.layout.xml          |   7 +-
 .../modules/simple/SimpleObjectIntegTest.java   |  44 +++++---
 15 files changed, 334 insertions(+), 168 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/isis/blob/ff4d3427/adocs/documentation/src/main/asciidoc/applib/layout/grid/bootstrap3/bootstrap3.xsd
----------------------------------------------------------------------
diff --git a/adocs/documentation/src/main/asciidoc/applib/layout/grid/bootstrap3/bootstrap3.xsd b/adocs/documentation/src/main/asciidoc/applib/layout/grid/bootstrap3/bootstrap3.xsd
index 65d2bd6..09087f6 100644
--- a/adocs/documentation/src/main/asciidoc/applib/layout/grid/bootstrap3/bootstrap3.xsd
+++ b/adocs/documentation/src/main/asciidoc/applib/layout/grid/bootstrap3/bootstrap3.xsd
@@ -1,5 +1,4 @@
-<?xml version="1.0" standalone="yes"?>
-<xs:schema elementFormDefault="qualified" version="1.0" targetNamespace="http://isis.apache.org/applib/layout/grid/bootstrap3" xmlns:tns="http://isis.apache.org/applib/layout/grid/bootstrap3" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:ns1="http://isis.apache.org/applib/layout/component">
+<?xml version="1.0" encoding="UTF-8"?><xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:ns1="http://isis.apache.org/applib/layout/component" xmlns:tns="http://isis.apache.org/applib/layout/grid/bootstrap3" elementFormDefault="qualified" targetNamespace="http://isis.apache.org/applib/layout/grid/bootstrap3" version="1.0">
 
     <xs:import namespace="http://isis.apache.org/applib/layout/component" schemaLocation="../../component"/>
 
@@ -13,8 +12,8 @@
 
     <xs:complexType name="grid">
         <xs:sequence>
-            <xs:element name="row" type="tns:row" maxOccurs="unbounded"/>
-            <xs:element name="metadataError" type="xs:string" minOccurs="0" maxOccurs="unbounded"/>
+            <xs:element maxOccurs="unbounded" name="row" type="tns:row"/>
+            <xs:element maxOccurs="unbounded" minOccurs="0" name="metadataError" type="xs:string"/>
         </xs:sequence>
         <xs:attribute name="cssClass" type="xs:string"/>
     </xs:complexType>
@@ -23,19 +22,19 @@
         <xs:complexContent>
             <xs:extension base="tns:bs3ElementAbstract">
                 <xs:sequence>
-                    <xs:choice minOccurs="0" maxOccurs="unbounded">
+                    <xs:choice maxOccurs="unbounded" minOccurs="0">
                         <xs:element ref="tns:col"/>
                         <xs:element ref="tns:clearFixVisible"/>
                         <xs:element ref="tns:clearFixHidden"/>
                     </xs:choice>
-                    <xs:element name="metadataError" type="xs:string" minOccurs="0"/>
+                    <xs:element minOccurs="0" name="metadataError" type="xs:string"/>
                 </xs:sequence>
                 <xs:attribute name="id" type="xs:string"/>
             </xs:extension>
         </xs:complexContent>
     </xs:complexType>
 
-    <xs:complexType name="bs3ElementAbstract" abstract="true">
+    <xs:complexType abstract="true" name="bs3ElementAbstract">
         <xs:sequence/>
         <xs:attribute name="cssClass" type="xs:string"/>
     </xs:complexType>
@@ -44,13 +43,14 @@
         <xs:complexContent>
             <xs:extension base="tns:bs3RowContent">
                 <xs:sequence>
-                    <xs:element ref="ns1:domainObject" minOccurs="0"/>
-                    <xs:element ref="ns1:action" minOccurs="0" maxOccurs="unbounded"/>
-                    <xs:element name="row" type="tns:row" minOccurs="0" maxOccurs="unbounded"/>
-                    <xs:element name="tabGroup" type="tns:tabGroup" minOccurs="0" maxOccurs="unbounded"/>
-                    <xs:element ref="ns1:fieldSet" minOccurs="0" maxOccurs="unbounded"/>
-                    <xs:element ref="ns1:collection" minOccurs="0" maxOccurs="unbounded"/>
-                    <xs:element name="metadataError" type="xs:string" minOccurs="0"/>
+                    <xs:element maxOccurs="unbounded" minOccurs="0" name="sizeSpan" type="tns:sizeSpan"/>
+                    <xs:element minOccurs="0" ref="ns1:domainObject"/>
+                    <xs:element maxOccurs="unbounded" minOccurs="0" ref="ns1:action"/>
+                    <xs:element maxOccurs="unbounded" minOccurs="0" name="row" type="tns:row"/>
+                    <xs:element maxOccurs="unbounded" minOccurs="0" name="tabGroup" type="tns:tabGroup"/>
+                    <xs:element maxOccurs="unbounded" minOccurs="0" ref="ns1:fieldSet"/>
+                    <xs:element maxOccurs="unbounded" minOccurs="0" ref="ns1:collection"/>
+                    <xs:element minOccurs="0" name="metadataError" type="xs:string"/>
                 </xs:sequence>
                 <xs:attribute name="id" type="xs:string"/>
                 <xs:attribute name="span" type="xs:int" use="required"/>
@@ -60,7 +60,7 @@
         </xs:complexContent>
     </xs:complexType>
 
-    <xs:complexType name="bs3RowContent" abstract="true">
+    <xs:complexType abstract="true" name="bs3RowContent">
         <xs:complexContent>
             <xs:extension base="tns:bs3ElementAbstract">
                 <xs:sequence/>
@@ -69,12 +69,19 @@
         </xs:complexContent>
     </xs:complexType>
 
+    <xs:complexType name="sizeSpan">
+        <xs:all/>
+        <xs:attribute name="offset" type="xs:boolean"/>
+        <xs:attribute name="size" type="tns:size" use="required"/>
+        <xs:attribute name="span" type="xs:int" use="required"/>
+    </xs:complexType>
+
     <xs:complexType name="tabGroup">
         <xs:complexContent>
             <xs:extension base="tns:bs3ElementAbstract">
                 <xs:sequence>
-                    <xs:element name="tab" type="tns:tab" minOccurs="0" maxOccurs="unbounded"/>
-                    <xs:element name="metadataError" type="xs:string" minOccurs="0"/>
+                    <xs:element maxOccurs="unbounded" minOccurs="0" name="tab" type="tns:tab"/>
+                    <xs:element minOccurs="0" name="metadataError" type="xs:string"/>
                 </xs:sequence>
                 <xs:attribute name="unreferencedCollections" type="xs:boolean"/>
             </xs:extension>
@@ -85,7 +92,7 @@
         <xs:complexContent>
             <xs:extension base="tns:bs3ElementAbstract">
                 <xs:sequence>
-                    <xs:element name="row" type="tns:row" maxOccurs="unbounded"/>
+                    <xs:element maxOccurs="unbounded" name="row" type="tns:row"/>
                 </xs:sequence>
                 <xs:attribute name="name" type="xs:string" use="required"/>
             </xs:extension>
@@ -101,7 +108,7 @@
         </xs:complexContent>
     </xs:complexType>
 
-    <xs:complexType name="bs3ClearFix" abstract="true">
+    <xs:complexType abstract="true" name="bs3ClearFix">
         <xs:complexContent>
             <xs:extension base="tns:bs3RowContent">
                 <xs:sequence/>
@@ -133,4 +140,4 @@
             <xs:enumeration value="INLINE_BLOCK"/>
         </xs:restriction>
     </xs:simpleType>
-</xs:schema>
\ No newline at end of file
+</xs:schema>

http://git-wip-us.apache.org/repos/asf/isis/blob/ff4d3427/core/applib/src/main/java/org/apache/isis/applib/layout/grid/bootstrap3/BS3ClearFixHidden.java
----------------------------------------------------------------------
diff --git a/core/applib/src/main/java/org/apache/isis/applib/layout/grid/bootstrap3/BS3ClearFixHidden.java b/core/applib/src/main/java/org/apache/isis/applib/layout/grid/bootstrap3/BS3ClearFixHidden.java
index 407fe0f..db754de 100644
--- a/core/applib/src/main/java/org/apache/isis/applib/layout/grid/bootstrap3/BS3ClearFixHidden.java
+++ b/core/applib/src/main/java/org/apache/isis/applib/layout/grid/bootstrap3/BS3ClearFixHidden.java
@@ -41,7 +41,9 @@ public class BS3ClearFixHidden extends BS3ClearFix {
 
     @Override
     public String toCssClass() {
-        return "clearfix hidden-" + getSize().toCssClassFragment();
+        return "clearfix "
+                + "hidden-" + getSize().toCssClassFragment()  +
+                (getCssClass() != null? " " + getCssClass(): "");
     }
 
 }

http://git-wip-us.apache.org/repos/asf/isis/blob/ff4d3427/core/applib/src/main/java/org/apache/isis/applib/layout/grid/bootstrap3/BS3ClearFixVisible.java
----------------------------------------------------------------------
diff --git a/core/applib/src/main/java/org/apache/isis/applib/layout/grid/bootstrap3/BS3ClearFixVisible.java b/core/applib/src/main/java/org/apache/isis/applib/layout/grid/bootstrap3/BS3ClearFixVisible.java
index 5704680..6516e09 100644
--- a/core/applib/src/main/java/org/apache/isis/applib/layout/grid/bootstrap3/BS3ClearFixVisible.java
+++ b/core/applib/src/main/java/org/apache/isis/applib/layout/grid/bootstrap3/BS3ClearFixVisible.java
@@ -43,7 +43,11 @@ public class BS3ClearFixVisible extends BS3ClearFix {
     public enum CssDisplay {
         BLOCK,
         INLINE,
-        INLINE_BLOCK
+        INLINE_BLOCK;
+
+        public String toCssClassFragment() {
+            return name().toLowerCase().replace('_', '-');
+        }
     }
 
     private CssDisplay cssDisplay;
@@ -61,7 +65,9 @@ public class BS3ClearFixVisible extends BS3ClearFix {
 
     @Override
     public String toCssClass() {
-        return "clearfix visible-" + getSize().toCssClassFragment() + "-" + getCssClass().toLowerCase().replace('_', '-');
+        return "clearfix "
+                + "visible-" + getSize().toCssClassFragment() + "-" + getCssDisplay().toCssClassFragment() +
+                (getCssClass() != null? " " + getCssClass(): "");
     }
 
 }

http://git-wip-us.apache.org/repos/asf/isis/blob/ff4d3427/core/applib/src/main/java/org/apache/isis/applib/layout/grid/bootstrap3/BS3Col.java
----------------------------------------------------------------------
diff --git a/core/applib/src/main/java/org/apache/isis/applib/layout/grid/bootstrap3/BS3Col.java b/core/applib/src/main/java/org/apache/isis/applib/layout/grid/bootstrap3/BS3Col.java
index 2b33287..12d9fa0 100644
--- a/core/applib/src/main/java/org/apache/isis/applib/layout/grid/bootstrap3/BS3Col.java
+++ b/core/applib/src/main/java/org/apache/isis/applib/layout/grid/bootstrap3/BS3Col.java
@@ -56,6 +56,7 @@ import org.apache.isis.applib.layout.component.FieldSetOwner;
 @XmlType(
         name = "col"
         , propOrder = {
+            "sizeSpans",
             "domainObject",
             "actions",
             "rows",
@@ -155,6 +156,19 @@ public class BS3Col extends BS3RowContent
     }
 
 
+    private List<SizeSpan> sizeSpans = Lists.newArrayList();
+
+    // no wrapper
+    @XmlElement(name = "sizeSpan", required = false)
+    public List<SizeSpan> getSizeSpans() {
+        return sizeSpans;
+    }
+
+    public void setSizeSpans(final List<SizeSpan> sizeSpans) {
+        this.sizeSpans = sizeSpans;
+    }
+
+
 
     private List<ActionLayoutData> actions = Lists.newArrayList();
 
@@ -243,14 +257,17 @@ public class BS3Col extends BS3RowContent
 
 
     public String toCssClass() {
+        final StringBuilder buf = new StringBuilder();
         final Size size = getSize() != null? getSize(): Size.MD;
-        return "col-" + size.toCssClassFragment() + "-" + getSpan();
+        SizeSpan.with(size, getSpan()).appendCssClassFragment(buf);
+        for (SizeSpan sizeSpan : getSizeSpans()) {
+            sizeSpan.appendCssClassFragment(buf);
+        }
+        buf.append((getCssClass() != null? " " + getCssClass(): ""));
+        return buf.toString();
     }
 
     @Override public String toString() {
-        return "BS3Col{" +
-                "id='" + id + '\'' +
-                ", span=" + span +
-                '}';
+        return (id != null? "#" + id + " ": "") + toCssClass();
     }
 }

http://git-wip-us.apache.org/repos/asf/isis/blob/ff4d3427/core/applib/src/main/java/org/apache/isis/applib/layout/grid/bootstrap3/BS3RowContent.java
----------------------------------------------------------------------
diff --git a/core/applib/src/main/java/org/apache/isis/applib/layout/grid/bootstrap3/BS3RowContent.java b/core/applib/src/main/java/org/apache/isis/applib/layout/grid/bootstrap3/BS3RowContent.java
index 892193e..cfdd27c 100644
--- a/core/applib/src/main/java/org/apache/isis/applib/layout/grid/bootstrap3/BS3RowContent.java
+++ b/core/applib/src/main/java/org/apache/isis/applib/layout/grid/bootstrap3/BS3RowContent.java
@@ -36,21 +36,6 @@ public abstract class BS3RowContent extends BS3ElementAbstract {
 
     private static final long serialVersionUID = 1L;
 
-    /**
-     * As per <a href="http://getbootstrap.com/css/#grid-options">grid options</a>, also used in
-     * <a href="http://getbootstrap.com/css/#responsive-utilities">responsive utility</a> classes.
-     */
-    public enum Size {
-        XS,
-        SM,
-        MD,
-        LG;
-
-        public String toCssClassFragment() {
-            return name().toLowerCase();
-        }
-    }
-
     private Size size;
 
     /**

http://git-wip-us.apache.org/repos/asf/isis/blob/ff4d3427/core/applib/src/main/java/org/apache/isis/applib/layout/grid/bootstrap3/Size.java
----------------------------------------------------------------------
diff --git a/core/applib/src/main/java/org/apache/isis/applib/layout/grid/bootstrap3/Size.java b/core/applib/src/main/java/org/apache/isis/applib/layout/grid/bootstrap3/Size.java
new file mode 100644
index 0000000..d01e7d9
--- /dev/null
+++ b/core/applib/src/main/java/org/apache/isis/applib/layout/grid/bootstrap3/Size.java
@@ -0,0 +1,16 @@
+package org.apache.isis.applib.layout.grid.bootstrap3;
+
+/**
+ * As per <a href="http://getbootstrap.com/css/#grid-options">grid options</a>, also used in
+ * <a href="http://getbootstrap.com/css/#responsive-utilities">responsive utility</a> classes.
+ */
+public enum Size {
+    XS,
+    SM,
+    MD,
+    LG;
+
+    public String toCssClassFragment() {
+        return name().toLowerCase();
+    }
+}

http://git-wip-us.apache.org/repos/asf/isis/blob/ff4d3427/core/applib/src/main/java/org/apache/isis/applib/layout/grid/bootstrap3/SizeSpan.java
----------------------------------------------------------------------
diff --git a/core/applib/src/main/java/org/apache/isis/applib/layout/grid/bootstrap3/SizeSpan.java b/core/applib/src/main/java/org/apache/isis/applib/layout/grid/bootstrap3/SizeSpan.java
new file mode 100644
index 0000000..cfba0c7
--- /dev/null
+++ b/core/applib/src/main/java/org/apache/isis/applib/layout/grid/bootstrap3/SizeSpan.java
@@ -0,0 +1,101 @@
+/*
+ *  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.applib.layout.grid.bootstrap3;
+
+import javax.xml.bind.annotation.XmlAttribute;
+import javax.xml.bind.annotation.XmlType;
+
+/**
+ *
+ */
+@XmlType(
+        name = "sizeSpan"
+        , propOrder = {}
+)
+public class SizeSpan {
+
+    private static final long serialVersionUID = 1L;
+
+
+    public static SizeSpan with(final Size size, final int span) {
+        final SizeSpan ss = new SizeSpan();
+        ss.setSize(size);
+        ss.setSpan(span);
+        return ss;
+    }
+
+    public static SizeSpan offset(final Size size, final int span) {
+        final SizeSpan ss = with(size, span);
+        ss.setOffset(true);
+        return ss;
+    }
+
+    private Size size;
+
+    @XmlAttribute(required = true)
+    public Size getSize() {
+        return size;
+    }
+
+    public void setSize(final Size size) {
+        this.size = size;
+    }
+
+
+    private int span;
+
+    @XmlAttribute(required = true)
+    public int getSpan() {
+        return span;
+    }
+
+    public void setSpan(final int span) {
+        this.span = span;
+    }
+
+
+    private Boolean offset;
+
+
+    @XmlAttribute(required = false)
+    public Boolean isOffset() {
+        return offset;
+    }
+
+    public void setOffset(final Boolean offset) {
+        this.offset = offset;
+    }
+
+
+    public String toCssClassFragment() {
+        return appendCssClassFragment(new StringBuilder()).toString();
+    }
+
+    public StringBuilder appendCssClassFragment(final StringBuilder buf) {
+        if(buf.length() > 0) {
+            buf.append(" ");
+        }
+        buf.append("col-")
+           .append(size.toCssClassFragment())
+           .append("-")
+           .append(offset != null && offset ? "offset-": "")
+           .append(span);
+        return buf;
+    }
+}

http://git-wip-us.apache.org/repos/asf/isis/blob/ff4d3427/core/applib/src/test/java/org/apache/isis/applib/layout/grid/bootstrap3/BS3ColTest.java
----------------------------------------------------------------------
diff --git a/core/applib/src/test/java/org/apache/isis/applib/layout/grid/bootstrap3/BS3ColTest.java b/core/applib/src/test/java/org/apache/isis/applib/layout/grid/bootstrap3/BS3ColTest.java
new file mode 100644
index 0000000..0cf29e2
--- /dev/null
+++ b/core/applib/src/test/java/org/apache/isis/applib/layout/grid/bootstrap3/BS3ColTest.java
@@ -0,0 +1,45 @@
+package org.apache.isis.applib.layout.grid.bootstrap3;
+
+import org.junit.Before;
+import org.junit.Test;
+
+import static org.hamcrest.CoreMatchers.equalTo;
+import static org.hamcrest.CoreMatchers.is;
+import static org.junit.Assert.assertThat;
+
+public class BS3ColTest {
+
+    BS3Col bs3Col;
+    @Before
+    public void setUp() throws Exception {
+        bs3Col = new BS3Col();
+    }
+
+    @Test
+    public void size_and_span() throws Exception {
+        bs3Col.setSize(Size.MD);
+        bs3Col.setSpan(4);
+
+        assertThat(bs3Col.toCssClass(), is(equalTo("col-md-4")));
+    }
+
+    @Test
+    public void extra_css_class() throws Exception {
+        bs3Col.setSize(Size.SM);
+        bs3Col.setSpan(8);
+        bs3Col.setCssClass("foobar");
+
+        assertThat(bs3Col.toCssClass(), is(equalTo("col-sm-8 foobar")));
+    }
+
+    @Test
+    public void with_additional_classes() throws Exception {
+        bs3Col.setSize(Size.SM);
+        bs3Col.setSpan(6);
+
+        bs3Col.getSizeSpans().add(SizeSpan.with(Size.MD, 5));
+        bs3Col.getSizeSpans().add(SizeSpan.offset(Size.MD, 2));
+
+        assertThat(bs3Col.toCssClass(), is(equalTo("col-sm-6 col-md-5 col-md-offset-2")));
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/isis/blob/ff4d3427/core/applib/src/test/java/org/apache/isis/applib/layout/grid/bootstrap3/SizeSpanTest.java
----------------------------------------------------------------------
diff --git a/core/applib/src/test/java/org/apache/isis/applib/layout/grid/bootstrap3/SizeSpanTest.java b/core/applib/src/test/java/org/apache/isis/applib/layout/grid/bootstrap3/SizeSpanTest.java
new file mode 100644
index 0000000..28d8bbd
--- /dev/null
+++ b/core/applib/src/test/java/org/apache/isis/applib/layout/grid/bootstrap3/SizeSpanTest.java
@@ -0,0 +1,44 @@
+package org.apache.isis.applib.layout.grid.bootstrap3;
+
+import org.junit.Before;
+import org.junit.Test;
+
+import static org.hamcrest.CoreMatchers.equalTo;
+import static org.hamcrest.CoreMatchers.is;
+import static org.junit.Assert.assertThat;
+
+public class SizeSpanTest {
+
+    SizeSpan ss;
+
+    @Before
+    public void setUp() throws Exception {
+        ss = new SizeSpan();
+    }
+
+    @Test
+    public void with_no_offset() throws Exception {
+
+        ss.setSize(Size.MD);
+        ss.setSpan(4);
+
+        final String s = ss.toCssClassFragment();
+
+        assertThat(s, is(equalTo("col-md-4")));
+
+    }
+
+    @Test
+    public void with_offset() throws Exception {
+
+        ss.setSize(Size.SM);
+        ss.setSpan(0);
+        ss.setOffset(true);
+
+        final String s = ss.toCssClassFragment();
+
+        assertThat(s, is(equalTo("col-sm-offset-0")));
+
+    }
+
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/isis/blob/ff4d3427/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 0eb73c9..e421320 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
@@ -50,9 +50,9 @@ import org.apache.isis.applib.layout.component.PropertyLayoutData;
 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.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.applib.layout.grid.bootstrap3.Size;
 import org.apache.isis.core.metamodel.facets.actions.position.ActionPositionFacet;
 import org.apache.isis.core.metamodel.facets.members.order.MemberOrderFacet;
 import org.apache.isis.core.metamodel.facets.members.order.annotprop.MemberOrderFacetAnnotation;
@@ -612,7 +612,7 @@ public class GridNormalizerServiceBS3 extends GridNormalizerServiceAbstract<BS3G
 
             final BS3Col tabRowCol = new BS3Col();
             tabRowCol.setSpan(12);
-            tabRowCol.setSize(BS3RowContent.Size.MD);
+            tabRowCol.setSize(Size.MD);
             tabRowCol.setOwner(tabRow);
             tabRow.getCols().add(tabRowCol);
 

http://git-wip-us.apache.org/repos/asf/isis/blob/ff4d3427/example/application/simpleapp/app/src/main/java/domainapp/app/services/homepage/HomePageViewModel.layout.json
----------------------------------------------------------------------
diff --git a/example/application/simpleapp/app/src/main/java/domainapp/app/services/homepage/HomePageViewModel.layout.json b/example/application/simpleapp/app/src/main/java/domainapp/app/services/homepage/HomePageViewModel.layout.json
deleted file mode 100644
index 34f78e0..0000000
--- a/example/application/simpleapp/app/src/main/java/domainapp/app/services/homepage/HomePageViewModel.layout.json
+++ /dev/null
@@ -1,43 +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.
- */
-{
-    "columns": [
-        {
-            "span": 0,
-            "memberGroups": {}
-        },
-        {
-            "span": 0,
-            "memberGroups": {}
-        },
-        {
-            "span": 0,
-            "memberGroups": {}
-        },
-        {
-            "span": 12,
-            "collections": {
-                "objects": {
-                    "collectionLayout": {
-                        "render": "EAGERLY"
-                    }
-                }
-            }
-        }
-    ],
-    "actions": {}
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/isis/blob/ff4d3427/example/application/simpleapp/app/src/main/java/domainapp/app/services/homepage/HomePageViewModel.layout.xml
----------------------------------------------------------------------
diff --git a/example/application/simpleapp/app/src/main/java/domainapp/app/services/homepage/HomePageViewModel.layout.xml b/example/application/simpleapp/app/src/main/java/domainapp/app/services/homepage/HomePageViewModel.layout.xml
new file mode 100644
index 0000000..33c40ab
--- /dev/null
+++ b/example/application/simpleapp/app/src/main/java/domainapp/app/services/homepage/HomePageViewModel.layout.xml
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<bs3:grid xsi:schemaLocation="http://isis.apache.org/applib/layout/component http://isis.apache.org/applib/layout/component/component.xsd" xmlns="http://isis.apache.org/applib/layout/component" xmlns:bs3="http://isis.apache.org/applib/layout/grid/bootstrap3" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+    <bs3:row>
+        <bs3:col span="2">
+            <bs3:sizeSpan size="LG" span="2" offset="true"/>
+            <bs3:row>
+                <bs3:col span="12" unreferencedActions="true">
+                    <domainObject/>
+                </bs3:col>
+            </bs3:row>
+            <bs3:row>
+                <bs3:col span="12">
+                    <action id="downloadLayoutXml"/>
+                </bs3:col>
+            </bs3:row>
+        </bs3:col>
+        <bs3:col span="4" unreferencedCollections="true">
+            <bs3:row>
+                <bs3:col span="12">
+                    <collection id="objects" defaultView="table"/>
+                </bs3:col>
+            </bs3:row>
+        </bs3:col>
+    </bs3:row>
+    <bs3:row>
+        <bs3:col span="0">
+            <fieldSet name="General" id="general" unreferencedProperties="true"/>
+        </bs3:col>
+    </bs3:row>
+</bs3:grid>

http://git-wip-us.apache.org/repos/asf/isis/blob/ff4d3427/example/application/simpleapp/dom/src/main/java/domainapp/dom/simple/SimpleObject.java
----------------------------------------------------------------------
diff --git a/example/application/simpleapp/dom/src/main/java/domainapp/dom/simple/SimpleObject.java b/example/application/simpleapp/dom/src/main/java/domainapp/dom/simple/SimpleObject.java
index 366dbb3..6d11400 100644
--- a/example/application/simpleapp/dom/src/main/java/domainapp/dom/simple/SimpleObject.java
+++ b/example/application/simpleapp/dom/src/main/java/domainapp/dom/simple/SimpleObject.java
@@ -18,24 +18,14 @@
  */
 package domainapp.dom.simple;
 
-import java.util.List;
-
-import javax.inject.Inject;
 import javax.jdo.annotations.IdentityType;
 import javax.jdo.annotations.VersionStrategy;
 
 import org.apache.isis.applib.DomainObjectContainer;
 import org.apache.isis.applib.annotation.Action;
-import org.apache.isis.applib.annotation.BookmarkPolicy;
-import org.apache.isis.applib.annotation.CollectionLayout;
 import org.apache.isis.applib.annotation.DomainObject;
-import org.apache.isis.applib.annotation.DomainObjectLayout;
-import org.apache.isis.applib.annotation.Editing;
-import org.apache.isis.applib.annotation.MemberOrder;
 import org.apache.isis.applib.annotation.Parameter;
 import org.apache.isis.applib.annotation.ParameterLayout;
-import org.apache.isis.applib.annotation.Property;
-import org.apache.isis.applib.annotation.PropertyLayout;
 import org.apache.isis.applib.annotation.SemanticsOf;
 import org.apache.isis.applib.services.eventbus.ActionDomainEvent;
 import org.apache.isis.applib.services.eventbus.PropertyDomainEvent;
@@ -67,9 +57,6 @@ import org.apache.isis.applib.util.ObjectContracts;
 })
 @javax.jdo.annotations.Unique(name="SimpleObject_name_UNQ", members = {"name"})
 @DomainObject
-@DomainObjectLayout(
-        bookmarking = BookmarkPolicy.AS_ROOT
-)
 public class SimpleObject implements Comparable<SimpleObject> {
 
     public static final int NAME_LENGTH = 40;
@@ -79,17 +66,12 @@ public class SimpleObject implements Comparable<SimpleObject> {
         return TranslatableString.tr("Object: {name}", "name", getName());
     }
 
+
     public static class NameDomainEvent extends PropertyDomainEvent<SimpleObject,String> {}
     @javax.jdo.annotations.Column(
             allowsNull="false",
             length = NAME_LENGTH
     )
-    @Property(
-            editing = Editing.DISABLED
-    )
-    @PropertyLayout(
-            namedEscaped = false
-    )
     private String name;
     public String getName() {
         return name;
@@ -103,27 +85,6 @@ public class SimpleObject implements Comparable<SimpleObject> {
     }
 
 
-    public static class UpdateNameDomainEvent extends ActionDomainEvent<SimpleObject> {}
-    @Action(
-            domainEvent = UpdateNameDomainEvent.class,
-            semantics = SemanticsOf.IDEMPOTENT
-    )
-    @MemberOrder(name = "name", sequence = "1")
-    public SimpleObject updateName(
-            @Parameter(maxLength = NAME_LENGTH)
-            @ParameterLayout(named = "New name")
-            final String name) {
-        setName(name);
-        return this;
-    }
-    public String default0UpdateName() {
-        return getName();
-    }
-    public TranslatableString validateUpdateName(final String name) {
-        return name.contains("!")? TranslatableString.tr("Exclamation mark is not allowed"): null;
-    }
-
-
 
     public static class DeleteDomainEvent extends ActionDomainEvent<SimpleObject> {}
     @Action(
@@ -143,30 +104,6 @@ public class SimpleObject implements Comparable<SimpleObject> {
 
 
     @javax.inject.Inject
-    @SuppressWarnings("unused")
     DomainObjectContainer container;
 
-
-    public List<SimpleObject> getSimilarTo() {
-        return simpleObjects.findByName(getName().substring(0,1));
-    }
-
-    public boolean hideSimilarTo() {
-        return getName().contains("ob");
-    }
-
-    @CollectionLayout(
-            defaultView = "table"
-    )
-    public List<SimpleObject> getOthers() {
-        return simpleObjects.listAll();
-    }
-
-    public boolean hideOthers() {
-        return getName().contains("ob");
-    }
-
-    @Inject
-    SimpleObjects simpleObjects;
-
 }

http://git-wip-us.apache.org/repos/asf/isis/blob/ff4d3427/example/application/simpleapp/dom/src/main/java/domainapp/dom/simple/SimpleObject.layout.xml
----------------------------------------------------------------------
diff --git a/example/application/simpleapp/dom/src/main/java/domainapp/dom/simple/SimpleObject.layout.xml b/example/application/simpleapp/dom/src/main/java/domainapp/dom/simple/SimpleObject.layout.xml
index 85b6a0c..6bc597b 100644
--- a/example/application/simpleapp/dom/src/main/java/domainapp/dom/simple/SimpleObject.layout.xml
+++ b/example/application/simpleapp/dom/src/main/java/domainapp/dom/simple/SimpleObject.layout.xml
@@ -3,7 +3,7 @@
 
     <bs3:row>
         <bs3:col span="12" unreferencedActions="true">
-            <c:domainObject/>
+            <c:domainObject bookmarking="AS_ROOT"/>
         </bs3:col>
     </bs3:row>
     <bs3:row>
@@ -12,8 +12,9 @@
                 <bs3:tab name="General">
                     <bs3:row>
                         <bs3:col span="12">
-                            <c:fieldSet name="Properties">
-                                <c:property id="name">
+                            <c:fieldSet name="Name">
+                                <c:action id="delete"/>
+                                <c:property id="name" namedEscaped="true">
                                     <c:action id="updateName" position="BELOW"/>
                                 </c:property>
                             </c:fieldSet>

http://git-wip-us.apache.org/repos/asf/isis/blob/ff4d3427/example/application/simpleapp/integtests/src/test/java/domainapp/integtests/tests/modules/simple/SimpleObjectIntegTest.java
----------------------------------------------------------------------
diff --git a/example/application/simpleapp/integtests/src/test/java/domainapp/integtests/tests/modules/simple/SimpleObjectIntegTest.java b/example/application/simpleapp/integtests/src/test/java/domainapp/integtests/tests/modules/simple/SimpleObjectIntegTest.java
index a935ec6..58cb941 100644
--- a/example/application/simpleapp/integtests/src/test/java/domainapp/integtests/tests/modules/simple/SimpleObjectIntegTest.java
+++ b/example/application/simpleapp/integtests/src/test/java/domainapp/integtests/tests/modules/simple/SimpleObjectIntegTest.java
@@ -18,6 +18,8 @@
  */
 package domainapp.integtests.tests.modules.simple;
 
+import java.sql.Timestamp;
+
 import javax.inject.Inject;
 
 import org.junit.Before;
@@ -25,8 +27,9 @@ import org.junit.Test;
 
 import org.apache.isis.applib.DomainObjectContainer;
 import org.apache.isis.applib.fixturescripts.FixtureScripts;
-import org.apache.isis.applib.services.wrapper.DisabledException;
 import org.apache.isis.applib.services.wrapper.InvalidException;
+import org.apache.isis.core.metamodel.services.jdosupport.Persistable_datanucleusId;
+import org.apache.isis.core.metamodel.services.jdosupport.Persistable_datanucleusVersionTimestamp;
 
 import domainapp.dom.simple.SimpleObject;
 import domainapp.fixture.scenarios.RecreateSimpleObjects;
@@ -64,24 +67,15 @@ public class SimpleObjectIntegTest extends DomainAppIntegTest {
             assertThat(name).isEqualTo(fs.NAMES.get(0));
         }
 
-        @Test
-        public void cannotBeUpdatedDirectly() throws Exception {
-
-            // expect
-            expectedExceptions.expect(DisabledException.class);
-
-            // when
-            simpleObjectWrapped.setName("new name");
-        }
     }
 
     public static class UpdateName extends SimpleObjectIntegTest {
 
         @Test
-        public void happyCase() throws Exception {
+        public void canBeUpdatedDirectly() throws Exception {
 
             // when
-            simpleObjectWrapped.updateName("new name");
+            simpleObjectWrapped.setName("new name");
 
             // then
             assertThat(simpleObjectWrapped.getName()).isEqualTo("new name");
@@ -95,7 +89,7 @@ public class SimpleObjectIntegTest extends DomainAppIntegTest {
             expectedExceptions.expectMessage("Exclamation mark is not allowed");
 
             // when
-            simpleObjectWrapped.updateName("new name!");
+            simpleObjectWrapped.setName("new name!");
         }
     }
 
@@ -118,4 +112,28 @@ public class SimpleObjectIntegTest extends DomainAppIntegTest {
             assertThat(title).isEqualTo("Object: " + name);
         }
     }
+
+    public static class DataNucleusId extends SimpleObjectIntegTest {
+
+        @Test
+        public void shouldBePopulated() throws Exception {
+            // when
+            final Long id = mixin(Persistable_datanucleusId.class, simpleObjectPojo).$$();
+            // then
+            assertThat(id).isGreaterThanOrEqualTo(0);
+        }
+    }
+
+    public static class DataNucleusVersionTimestamp extends SimpleObjectIntegTest {
+
+        @Test
+        public void shouldBePopulated() throws Exception {
+            // when
+            final Timestamp timestamp = mixin(Persistable_datanucleusVersionTimestamp.class, simpleObjectPojo).$$();
+            // then
+            assertThat(timestamp).isNotNull();
+        }
+    }
+
+
 }
\ No newline at end of file


[26/50] [abbrv] 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/master
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 {
 


[39/50] [abbrv] isis git commit: Merge branch 'master' into ISIS-993

Posted by da...@apache.org.
Merge branch 'master' into ISIS-993

# Conflicts:
#	core/applib/src/main/java/org/apache/isis/applib/services/dto/Dto_downloadXml.java
#	core/applib/src/main/java/org/apache/isis/applib/services/jaxb/CatalogingSchemaOutputResolver.java


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

Branch: refs/heads/master
Commit: 62f69d173430efa00c0f06df84ba33aac1c188c1
Parents: df32988 25f5899
Author: Dan Haywood <da...@haywood-associates.co.uk>
Authored: Fri Feb 26 14:52:28 2016 +0000
Committer: Dan Haywood <da...@haywood-associates.co.uk>
Committed: Fri Feb 26 14:52:28 2016 +0000

----------------------------------------------------------------------
 .../applib/services/dto/Dto_downloadXml.java    |  1 +
 .../jaxb/CatalogingSchemaOutputResolver.java    | 77 +++++++++++++++++++-
 .../isis/tool/mavenplugin/IsisMojoXsd.java      | 10 ++-
 3 files changed, 83 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/isis/blob/62f69d17/core/applib/src/main/java/org/apache/isis/applib/services/dto/Dto_downloadXml.java
----------------------------------------------------------------------
diff --cc core/applib/src/main/java/org/apache/isis/applib/services/dto/Dto_downloadXml.java
index 34b1072,dc972f1..7fec121
--- a/core/applib/src/main/java/org/apache/isis/applib/services/dto/Dto_downloadXml.java
+++ b/core/applib/src/main/java/org/apache/isis/applib/services/dto/Dto_downloadXml.java
@@@ -50,7 -53,8 +50,8 @@@ public class Dto_downloadXml 
      @MemberOrder(sequence = "500.1")
      public Object $$(
              @ParameterLayout(named = "File name")
 -            final String fileName) throws JAXBException, IOException {
 +            final String fileName) {
+ 
          final String xml = jaxbService.toXml(dto);
          return new Clob(Util.withSuffix(fileName, "xml"), "text/xml", xml);
      }

http://git-wip-us.apache.org/repos/asf/isis/blob/62f69d17/core/applib/src/main/java/org/apache/isis/applib/services/jaxb/CatalogingSchemaOutputResolver.java
----------------------------------------------------------------------
diff --cc core/applib/src/main/java/org/apache/isis/applib/services/jaxb/CatalogingSchemaOutputResolver.java
index 5d16c95,0000000..0408bab
mode 100644,000000..100644
--- a/core/applib/src/main/java/org/apache/isis/applib/services/jaxb/CatalogingSchemaOutputResolver.java
+++ b/core/applib/src/main/java/org/apache/isis/applib/services/jaxb/CatalogingSchemaOutputResolver.java
@@@ -1,83 -1,0 +1,152 @@@
 +/**
 + *  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.applib.services.jaxb;
 +
 +import java.io.IOException;
++import java.io.StringReader;
++import java.io.StringWriter;
 +import java.util.Collections;
 +import java.util.List;
 +import java.util.Map;
 +
 +import javax.xml.bind.SchemaOutputResolver;
++import javax.xml.parsers.DocumentBuilder;
++import javax.xml.parsers.DocumentBuilderFactory;
 +import javax.xml.transform.Result;
++import javax.xml.transform.Transformer;
++import javax.xml.transform.TransformerFactory;
++import javax.xml.transform.dom.DOMSource;
 +import javax.xml.transform.stream.StreamResult;
 +
 +import com.google.common.collect.Lists;
 +import com.google.common.collect.Maps;
 +
++import org.w3c.dom.Attr;
++import org.w3c.dom.Document;
++import org.w3c.dom.Element;
++import org.w3c.dom.Node;
++import org.w3c.dom.NodeList;
++import org.xml.sax.InputSource;
++
 +/**
 + * An implementation of {@link SchemaOutputResolver} that keeps track of all the schemas for which it has
 + * {@link #createOutput(String, String) created} an output {@link StreamResult} containing the content of the schema.
 + */
- class CatalogingSchemaOutputResolver extends SchemaOutputResolver
- {
++class CatalogingSchemaOutputResolver extends SchemaOutputResolver {
++
++    private static final String SCHEMA_LOCATION_INCORRECT = "http://isis.apache.org/schema/common";
++    private static final String SCHEMA_LOCATION_CORRECT = "http://isis.apache.org/schema/common/common.xsd";
++
 +    private final JaxbService.IsisSchemas isisSchemas;
-     private List<String> namespaceUris = Lists.newArrayList();
++    private final List<String> namespaceUris = Lists.newArrayList();
 +
 +    public CatalogingSchemaOutputResolver(final JaxbService.IsisSchemas isisSchemas) {
 +        this.isisSchemas = isisSchemas;
 +    }
 +
 +    public List<String> getNamespaceUris() {
 +        return namespaceUris;
 +    }
 +
 +    private Map<String, StreamResultWithWriter> schemaResultByNamespaceUri = Maps.newLinkedHashMap();
 +
 +    public String getSchemaTextFor(final String namespaceUri) {
 +        final StreamResultWithWriter streamResult = schemaResultByNamespaceUri.get(namespaceUri);
-         return streamResult != null? streamResult.asString(): null;
++        if (streamResult == null) {
++            return null;
++        }
++        String xsd = streamResult.asString();
++
++        try {
++            final DocumentBuilderFactory docBuildFactory = DocumentBuilderFactory.newInstance();
++            final DocumentBuilder parser = docBuildFactory.newDocumentBuilder();
++            final Document document = parser.parse(new InputSource(new StringReader(xsd)));
++
++            final Element el = document.getDocumentElement();
++            replaceCommonSchemaLocationIfAny(el);
++
++            final Transformer transformer = TransformerFactory.newInstance().newTransformer();
++            final StringWriter writer = new StringWriter();
++            transformer.transform(new DOMSource(document), new StreamResult(writer));
++            xsd = writer.toString();
++
++        } catch(Exception ex) {
++            // ignore
++        }
++
++        return xsd;
++    }
++
++    // replace <xs:import namespace="..." schemaLocation="http://isis.apache.org/schema/common"/>
++    // with    <xs:import namespace="..." schemaLocation="http://isis.apache.org/schema/common/common.xsd"/>
++    private static void replaceCommonSchemaLocationIfAny(final Node node) {
++        if(schemaLocationReplacedIn(node)) {
++            return;
++        }
++        final NodeList nodeList = node.getChildNodes();
++        for (int i = 0; i < nodeList.getLength(); i++) {
++            final Node currentNode = nodeList.item(i);
++            if (currentNode.getNodeType() == Node.ELEMENT_NODE) {
++                replaceCommonSchemaLocationIfAny(currentNode);
++            }
++        }
++    }
++
++    private static boolean schemaLocationReplacedIn(final Node node) {
++        if(node instanceof Element) {
++            final Element importEl = (Element) node;
++            final Attr schemaLocationAttr = importEl.getAttributeNode("schemaLocation");
++            if(schemaLocationAttr != null) {
++                final String value = schemaLocationAttr.getValue();
++                if(SCHEMA_LOCATION_INCORRECT.endsWith(value)) {
++                    schemaLocationAttr.setValue(SCHEMA_LOCATION_CORRECT);
++                    return true;
++                }
++            }
++        }
++        return false;
 +    }
 +
 +    @Override
 +    public Result createOutput(
 +            final String namespaceUri, final String suggestedFileName) throws IOException {
 +
 +        final StreamResultWithWriter result = new StreamResultWithWriter();
 +
 +        result.setSystemId(namespaceUri);
 +
 +        if (isisSchemas.shouldIgnore(namespaceUri)) {
 +            // skip
 +        } else {
 +            namespaceUris.add(namespaceUri);
 +            schemaResultByNamespaceUri.put(namespaceUri, result);
 +        }
 +
 +        return result;
 +    }
 +
 +    public Map<String, String> asMap() {
 +        final Map<String,String> map = Maps.newLinkedHashMap();
 +        final List<String> namespaceUris = getNamespaceUris();
 +
 +        for (String namespaceUri : namespaceUris) {
 +            map.put(namespaceUri, getSchemaTextFor(namespaceUri));
 +        }
 +
 +        return Collections.unmodifiableMap(map);
 +    }
 +}


[27/50] [abbrv] 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/master
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/50] [abbrv] isis git commit: ISIS-993: introducing the concept of minimal/normalized/complete grids (still WIP)

Posted by da...@apache.org.
ISIS-993: introducing the concept of minimal/normalized/complete grids (still WIP)

Also:
- moved responsibility for determining the available set of gridNormalizerServices to GridService (ensure only one such per grid implementation)
- moved the FC applib classes into the metamodel, so no longer public API.


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

Branch: refs/heads/master
Commit: 5c831757d34919ab7b36f84a6e6579a4061a97e3
Parents: f3e8bbf
Author: Dan Haywood <da...@haywood-associates.co.uk>
Authored: Tue Feb 9 08:02:44 2016 +0000
Committer: Dan Haywood <da...@haywood-associates.co.uk>
Committed: Tue Feb 9 08:02:44 2016 +0000

----------------------------------------------------------------------
 .../isis/applib/layout/fixedcols/FCColumn.java  | 161 ---------------
 .../applib/layout/fixedcols/FCColumnOwner.java  |  25 ---
 .../isis/applib/layout/fixedcols/FCGrid.java    | 204 -------------------
 .../isis/applib/layout/fixedcols/FCTab.java     | 159 ---------------
 .../applib/layout/fixedcols/FCTabGroup.java     |  94 ---------
 .../layout/fixedcols/FCTabGroupOwner.java       |  25 ---
 .../applib/layout/fixedcols/package-info.java   |  35 ----
 .../services/layout/GridNormalizerService.java  |  48 +++++
 .../applib/services/layout/GridService.java     |  53 ++++-
 .../layout/Object_downloadLayoutXml.java        |  15 +-
 .../services/layout/Object_viewLayout.java      |   8 +-
 .../facets/object/grid/GridFacetDefault.java    |  29 +--
 .../facets/object/grid/GridFacetFactory.java    |  11 +-
 .../json/LayoutMetadataReaderFromJson.java      |   2 +-
 .../services/grid/GridNormalizerService.java    |  38 ----
 .../grid/GridNormalizerServiceAbstract.java     |  26 ++-
 .../services/grid/GridServiceDefault.java       | 110 +++++++++-
 .../grid/fixedcols/GridNormalizerServiceFC.java |   8 +-
 .../grid/fixedcols/applib/FCColumn.java         | 161 +++++++++++++++
 .../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 +++
 .../grid/fixedcols/applib/package-info.java     |  44 ++++
 .../services/metamodel/MetadataMenu.java        |   2 +-
 .../metamodel/spec/ObjectSpecifications.java    |   2 +-
 .../metamodel/services/grid/BS3GridTest.java    |   1 +
 .../metamodel/services/grid/FCGridTest.java     |   9 +-
 .../viewer/wicket/model/models/EntityModel.java |   2 +-
 .../links/EntityLinksSelectorPanelFactory.java  |   2 +-
 .../layout/fixedcols/FCGridPanel.java           |   6 +-
 .../components/layout/fixedcols/PropUtil.java   |   2 +-
 .../collections/EntityCollectionsPanel.java     |   2 +-
 .../layout/fixedcols/columns/EntityColumn.java  |   2 +-
 .../propsandcolls/EntityPropsAndCollsForm.java  |   6 +-
 .../tabgrouplist/TabGroupListPanel.java         |   2 +-
 .../layout/fixedcols/tabs/TabGroupPanel.java    |   4 +-
 .../layout/fixedcols/tabs/TabPanel.java         |   2 +-
 39 files changed, 983 insertions(+), 824 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/isis/blob/5c831757/core/applib/src/main/java/org/apache/isis/applib/layout/fixedcols/FCColumn.java
----------------------------------------------------------------------
diff --git a/core/applib/src/main/java/org/apache/isis/applib/layout/fixedcols/FCColumn.java b/core/applib/src/main/java/org/apache/isis/applib/layout/fixedcols/FCColumn.java
deleted file mode 100644
index 79d94b4..0000000
--- a/core/applib/src/main/java/org/apache/isis/applib/layout/fixedcols/FCColumn.java
+++ /dev/null
@@ -1,161 +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.applib.layout.fixedcols;
-
-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.annotation.MemberGroupLayout;
-import org.apache.isis.applib.layout.common.CollectionLayoutData;
-import org.apache.isis.applib.layout.common.CollectionLayoutDataOwner;
-import org.apache.isis.applib.layout.common.FieldSet;
-import org.apache.isis.applib.layout.common.FieldSetOwner;
-import org.apache.isis.applib.layout.common.Owned;
-import org.apache.isis.applib.layout.common.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;
-    }
-
-
-
-    public enum Hint {
-        LEFT,
-        MIDDLE,
-        RIGHT;
-
-        public int from(MemberGroupLayout.ColumnSpans columnSpans) {
-            if(this == LEFT) return columnSpans.getLeft();
-            if(this == MIDDLE) return columnSpans.getMiddle();
-            if(this == RIGHT) return columnSpans.getRight();
-            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/5c831757/core/applib/src/main/java/org/apache/isis/applib/layout/fixedcols/FCColumnOwner.java
----------------------------------------------------------------------
diff --git a/core/applib/src/main/java/org/apache/isis/applib/layout/fixedcols/FCColumnOwner.java b/core/applib/src/main/java/org/apache/isis/applib/layout/fixedcols/FCColumnOwner.java
deleted file mode 100644
index fe2ea76..0000000
--- a/core/applib/src/main/java/org/apache/isis/applib/layout/fixedcols/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.applib.layout.fixedcols;
-
-import org.apache.isis.applib.layout.common.Owner;
-
-public interface FCColumnOwner extends Owner {
-
-}

http://git-wip-us.apache.org/repos/asf/isis/blob/5c831757/core/applib/src/main/java/org/apache/isis/applib/layout/fixedcols/FCGrid.java
----------------------------------------------------------------------
diff --git a/core/applib/src/main/java/org/apache/isis/applib/layout/fixedcols/FCGrid.java b/core/applib/src/main/java/org/apache/isis/applib/layout/fixedcols/FCGrid.java
deleted file mode 100644
index 01626dd..0000000
--- a/core/applib/src/main/java/org/apache/isis/applib/layout/fixedcols/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.applib.layout.fixedcols;
-
-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.common.ActionLayoutData;
-import org.apache.isis.applib.layout.common.ActionLayoutDataOwner;
-import org.apache.isis.applib.layout.common.CollectionLayoutData;
-import org.apache.isis.applib.layout.common.DomainObjectLayoutData;
-import org.apache.isis.applib.layout.common.FieldSet;
-import org.apache.isis.applib.layout.common.Grid;
-import org.apache.isis.applib.layout.common.GridAbstract;
-import org.apache.isis.applib.layout.common.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(FCColumn.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(FCColumn.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/5c831757/core/applib/src/main/java/org/apache/isis/applib/layout/fixedcols/FCTab.java
----------------------------------------------------------------------
diff --git a/core/applib/src/main/java/org/apache/isis/applib/layout/fixedcols/FCTab.java b/core/applib/src/main/java/org/apache/isis/applib/layout/fixedcols/FCTab.java
deleted file mode 100644
index f7b7100..0000000
--- a/core/applib/src/main/java/org/apache/isis/applib/layout/fixedcols/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.applib.layout.fixedcols;
-
-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.common.CollectionLayoutData;
-import org.apache.isis.applib.layout.common.MemberRegion;
-import org.apache.isis.applib.layout.common.Owned;
-import org.apache.isis.applib.layout.common.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(FCColumn.Hint.LEFT);
-    }
-
-
-    private FCColumn middle;
-
-    @XmlElement(required = false)
-    public FCColumn getMiddle() {
-        return middle;
-    }
-
-    public void setMiddle(final FCColumn middle) {
-        this.middle = middle;
-        middle.setHint(FCColumn.Hint.MIDDLE);
-    }
-
-
-    private FCColumn right;
-
-    @XmlElement(required = false)
-    public FCColumn getRight() {
-        return right;
-    }
-
-    public void setRight(final FCColumn right) {
-        this.right = right;
-        right.setHint(FCColumn.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/5c831757/core/applib/src/main/java/org/apache/isis/applib/layout/fixedcols/FCTabGroup.java
----------------------------------------------------------------------
diff --git a/core/applib/src/main/java/org/apache/isis/applib/layout/fixedcols/FCTabGroup.java b/core/applib/src/main/java/org/apache/isis/applib/layout/fixedcols/FCTabGroup.java
deleted file mode 100644
index 93c88970..0000000
--- a/core/applib/src/main/java/org/apache/isis/applib/layout/fixedcols/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.applib.layout.fixedcols;
-
-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.common.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/5c831757/core/applib/src/main/java/org/apache/isis/applib/layout/fixedcols/FCTabGroupOwner.java
----------------------------------------------------------------------
diff --git a/core/applib/src/main/java/org/apache/isis/applib/layout/fixedcols/FCTabGroupOwner.java b/core/applib/src/main/java/org/apache/isis/applib/layout/fixedcols/FCTabGroupOwner.java
deleted file mode 100644
index 2b37c0f..0000000
--- a/core/applib/src/main/java/org/apache/isis/applib/layout/fixedcols/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.applib.layout.fixedcols;
-
-import org.apache.isis.applib.layout.common.Owner;
-
-public interface FCTabGroupOwner extends Owner {
-
-}

http://git-wip-us.apache.org/repos/asf/isis/blob/5c831757/core/applib/src/main/java/org/apache/isis/applib/layout/fixedcols/package-info.java
----------------------------------------------------------------------
diff --git a/core/applib/src/main/java/org/apache/isis/applib/layout/fixedcols/package-info.java b/core/applib/src/main/java/org/apache/isis/applib/layout/fixedcols/package-info.java
deleted file mode 100644
index af1fb85..0000000
--- a/core/applib/src/main/java/org/apache/isis/applib/layout/fixedcols/package-info.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.
- */
-
-/**
- * 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.applib.layout.fixedcols;
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/isis/blob/5c831757/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
new file mode 100644
index 0000000..ced93eb
--- /dev/null
+++ b/core/applib/src/main/java/org/apache/isis/applib/services/layout/GridNormalizerService.java
@@ -0,0 +1,48 @@
+/**
+ *  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.applib.services.layout;
+
+import org.apache.isis.applib.annotation.Programmatic;
+import org.apache.isis.applib.layout.common.Grid;
+
+/**
+ * Provides implementation of {@link Grid}.
+ * @param <G>
+ */
+public interface GridNormalizerService<G extends Grid> {
+
+    /**
+     * Which grid implementation is understood by this.
+     */
+    @Programmatic
+    Class<? extends Grid> gridImplementation();
+
+    @Programmatic
+    String tns();
+
+    @Programmatic
+    String schemaLocation();
+
+    @Programmatic
+    void normalize(G grid, Class<?> domainClass);
+
+    @Programmatic
+    void complete(G grid, Class<?> domainClass);
+
+    @Programmatic
+    void minimal(G grid, Class<?> domainClass);
+}

http://git-wip-us.apache.org/repos/asf/isis/blob/5c831757/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 a641889..ec2d699 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
@@ -16,6 +16,8 @@
  */
 package org.apache.isis.applib.services.layout;
 
+import java.util.List;
+
 import org.apache.isis.applib.annotation.Programmatic;
 import org.apache.isis.applib.layout.common.Grid;
 
@@ -24,8 +26,7 @@ public interface GridService {
     /**
      * Whether any metadata exists for this domain class, and if so then whether it is valid or invalid.
      */
-    @Programmatic
-    boolean exists(Class<?> domainClass);
+    @Programmatic boolean exists(Class<?> domainClass);
 
     /**
      * Returns (raw unnormalized) metadata, eg per the <code>.layout.xml</code> file.
@@ -33,14 +34,56 @@ public interface GridService {
     @Programmatic Grid fromXml(Class<?> domainClass);
 
     /**
+     * Normalize the grid with respect to the specified domain class.
+     *
+     * <p>
+     *     This will (often) modify the grid graph in order to add in any unreferenced actions and so forth.
+     * </p>
+     */
+    Grid normalize(Grid grid, final Class<?> domainClass);
+
+    Grid complete(Grid grid, final Class<?> domainClass);
+
+    Grid minimal(Grid grid, final Class<?> domainClass);
+
+    enum Style {
+
+        COMPLETE,
+        /**
+         * Default, corresponding to raw state along with any additional regions added
+         * as a result of normalization process.
+         */
+        NORMALIZED,
+        MINIMAL
+    }
+
+    /**
      * Obtains the (normalized) layout metadata, if any, for the (domain class of the) specified domain object.
+     *
+     * @param style - whether the returned grid should be complete (having been normalized), or should be as
+     *              minimal as possible.
      */
-    @Programmatic Grid toGrid(Object domainObject);
+    @Programmatic Grid toGrid(Object domainObject, final Style style);
 
     /**
      * Obtains the (normalized) layout metadata, if any, for the specified domain class.
+     *
+     * @param style - whether the returned grid should be complete (having been normalized), or should be as
+     *              minimal as possible.
      */
-    @Programmatic Grid toGrid(Class<?> domainClass);
+    @Programmatic Grid toGrid(Class<?> domainClass, final Style style);
 
     String tnsAndSchemaLocation(final Grid grid);
-}
\ No newline at end of file
+
+    /**
+     * For all of the available {@link GridNormalizerService}s available, return only the first one for any that
+     * are for the same grid implementation.
+     * <p/>
+     * <p>
+     * This allows default implementations (eg for bootstrap3) to be overridden while also allowing for the more
+     * general idea of multiple implementations.
+     * </p>
+     */
+    @Programmatic
+    List<GridNormalizerService<?>> gridNormalizerServices();
+}

http://git-wip-us.apache.org/repos/asf/isis/blob/5c831757/core/applib/src/main/java/org/apache/isis/applib/services/layout/Object_downloadLayoutXml.java
----------------------------------------------------------------------
diff --git a/core/applib/src/main/java/org/apache/isis/applib/services/layout/Object_downloadLayoutXml.java b/core/applib/src/main/java/org/apache/isis/applib/services/layout/Object_downloadLayoutXml.java
index 01beb41..10fee16 100644
--- a/core/applib/src/main/java/org/apache/isis/applib/services/layout/Object_downloadLayoutXml.java
+++ b/core/applib/src/main/java/org/apache/isis/applib/services/layout/Object_downloadLayoutXml.java
@@ -54,8 +54,9 @@ public class Object_downloadLayoutXml {
     @MemberOrder(sequence = "550.1")
     public Object $$(
             @ParameterLayout(named = "File name")
-            final String fileName) {
-        final Grid grid = getPage();
+            final String fileName,
+            final GridService.Style style) {
+        final Grid grid = getGrid(style);
         final String xml = jaxbService.toXml(grid,
                 ImmutableMap.<String,Object>of(
                         Marshaller.JAXB_SCHEMA_LOCATION,
@@ -66,14 +67,18 @@ public class Object_downloadLayoutXml {
     }
 
     public boolean hide$$() {
-        return getPage() == null;
+        // can use either style to determine whether this action should be hidden
+        return getGrid(GridService.Style.COMPLETE) == null;
     }
     public String default0$$() {
         return Util.withSuffix(object.getClass().getSimpleName(), "layout.xml");
     }
+    public GridService.Style default1$$() {
+        return GridService.Style.NORMALIZED;
+    }
 
-    protected Grid getPage() {
-        return gridService.toGrid(object);
+    protected Grid getGrid(final GridService.Style style) {
+        return gridService.toGrid(object, style);
     }
 
     @Inject

http://git-wip-us.apache.org/repos/asf/isis/blob/5c831757/core/applib/src/main/java/org/apache/isis/applib/services/layout/Object_viewLayout.java
----------------------------------------------------------------------
diff --git a/core/applib/src/main/java/org/apache/isis/applib/services/layout/Object_viewLayout.java b/core/applib/src/main/java/org/apache/isis/applib/services/layout/Object_viewLayout.java
index df38db2..6d2e3a7 100644
--- a/core/applib/src/main/java/org/apache/isis/applib/services/layout/Object_viewLayout.java
+++ b/core/applib/src/main/java/org/apache/isis/applib/services/layout/Object_viewLayout.java
@@ -51,16 +51,16 @@ public class Object_viewLayout {
     )
     @MemberOrder(sequence = "550.2")
     public Grid $$() {
-        return getPage();
+        return getGrid(GridService.Style.NORMALIZED);
     }
 
     @Programmatic // TODO ... excluded for now (getting an Isis framework exception in the view model rendering).
     public boolean hide$$() {
-        return getPage() == null;
+        return getGrid(GridService.Style.NORMALIZED) == null;
     }
 
-    protected Grid getPage() {
-        return gridService.toGrid(object);
+    protected Grid getGrid(final GridService.Style style) {
+        return gridService.toGrid(object, style);
     }
 
 

http://git-wip-us.apache.org/repos/asf/isis/blob/5c831757/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 596829d..4f5f0ae 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
@@ -22,13 +22,11 @@ import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
 import org.apache.isis.applib.layout.common.Grid;
-import org.apache.isis.applib.services.i18n.TranslationService;
 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.services.grid.GridNormalizerService;
 import org.apache.isis.core.metamodel.spec.ObjectSpecification;
 
 public class GridFacetDefault
@@ -45,15 +43,11 @@ public class GridFacetDefault
 
     public static GridFacet create(
             final FacetHolder facetHolder,
-            final TranslationService translationService,
             final GridService gridService,
-            final GridNormalizerService gridNormalizerService, final DeploymentCategory deploymentCategory) {
-        return new GridFacetDefault(facetHolder, translationService, gridService, gridNormalizerService,
-                deploymentCategory);
+            final DeploymentCategory deploymentCategory) {
+        return new GridFacetDefault(facetHolder, gridService, deploymentCategory);
     }
 
-    private final TranslationService translationService;
-    private final GridNormalizerService gridNormalizerService;
     private final DeploymentCategory deploymentCategory;
     private final GridService gridService;
 
@@ -62,14 +56,10 @@ public class GridFacetDefault
 
     private GridFacetDefault(
             final FacetHolder facetHolder,
-            final TranslationService translationService,
             final GridService gridService,
-            final GridNormalizerService gridNormalizerService,
             final DeploymentCategory deploymentCategory) {
         super(GridFacetDefault.type(), facetHolder, Derivation.NOT_DERIVED);
         this.gridService = gridService;
-        this.translationService = translationService;
-        this.gridNormalizerService = gridNormalizerService;
         this.deploymentCategory = deploymentCategory;
     }
 
@@ -93,21 +83,9 @@ public class GridFacetDefault
         if(grid == null) {
             return null;
         }
-
-        // 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
-        // in order to trample over the .layout.json's original facets
-        if(grid.isNormalized()) {
-            return grid;
-        }
-
         final Class<?> domainClass = getSpecification().getCorrespondingClass();
 
-        gridNormalizerService.normalize(grid, domainClass);
-
-        grid.setNormalized(true);
-
-        return grid;
+        return gridService.normalize(grid, domainClass);
     }
 
     private ObjectSpecification getSpecification() {
@@ -115,5 +93,4 @@ public class GridFacetDefault
     }
 
 
-
 }

http://git-wip-us.apache.org/repos/asf/isis/blob/5c831757/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/object/grid/GridFacetFactory.java
----------------------------------------------------------------------
diff --git a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/object/grid/GridFacetFactory.java b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/object/grid/GridFacetFactory.java
index 9c4f9cd..1cfcd04 100644
--- a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/object/grid/GridFacetFactory.java
+++ b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/object/grid/GridFacetFactory.java
@@ -16,10 +16,12 @@
  * under the License. */
 package org.apache.isis.core.metamodel.facets.object.grid;
 
+import java.util.List;
+
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-import org.apache.isis.applib.services.i18n.TranslationService;
+import org.apache.isis.applib.services.layout.GridNormalizerService;
 import org.apache.isis.applib.services.layout.GridService;
 import org.apache.isis.core.metamodel.facetapi.FacetHolder;
 import org.apache.isis.core.metamodel.facetapi.FacetUtil;
@@ -27,7 +29,6 @@ import org.apache.isis.core.metamodel.facetapi.FeatureType;
 import org.apache.isis.core.metamodel.facets.FacetFactoryAbstract;
 import org.apache.isis.core.metamodel.runtimecontext.ServicesInjector;
 import org.apache.isis.core.metamodel.runtimecontext.ServicesInjectorAware;
-import org.apache.isis.core.metamodel.services.grid.GridNormalizerService;
 
 public class GridFacetFactory extends FacetFactoryAbstract implements ServicesInjectorAware {
 
@@ -41,16 +42,12 @@ public class GridFacetFactory extends FacetFactoryAbstract implements ServicesIn
     public void process(final ProcessClassContext processClassContext) {
         final FacetHolder facetHolder = processClassContext.getFacetHolder();
 
-        final TranslationService translationService =
-                servicesInjector.lookupService(TranslationService.class);
         final GridService gridService =
                 servicesInjector.lookupService(GridService.class);
-        final GridNormalizerService gridNormalizerService =
-                servicesInjector.lookupService(GridNormalizerService.class);
 
         FacetUtil.addFacet(
                 GridFacetDefault.create(facetHolder,
-                        translationService, gridService, gridNormalizerService, getDeploymentCategory()));
+                        gridService, getDeploymentCategory()));
     }
 
     private ServicesInjector servicesInjector;

http://git-wip-us.apache.org/repos/asf/isis/blob/5c831757/core/metamodel/src/main/java/org/apache/isis/core/metamodel/layoutmetadata/json/LayoutMetadataReaderFromJson.java
----------------------------------------------------------------------
diff --git a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/layoutmetadata/json/LayoutMetadataReaderFromJson.java b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/layoutmetadata/json/LayoutMetadataReaderFromJson.java
index 779cf66..05b84fc 100644
--- a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/layoutmetadata/json/LayoutMetadataReaderFromJson.java
+++ b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/layoutmetadata/json/LayoutMetadataReaderFromJson.java
@@ -84,7 +84,7 @@ import org.apache.isis.core.metamodel.runtimecontext.ServicesInjectorAware;
 import org.apache.isis.core.metamodel.spec.ActionType;
 import org.apache.isis.core.metamodel.spec.ObjectSpecification;
 import org.apache.isis.core.metamodel.spec.ObjectSpecifications;
-import org.apache.isis.applib.layout.fixedcols.FCColumn.Hint;
+import org.apache.isis.core.metamodel.services.grid.fixedcols.applib.FCColumn.Hint;
 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;

http://git-wip-us.apache.org/repos/asf/isis/blob/5c831757/core/metamodel/src/main/java/org/apache/isis/core/metamodel/services/grid/GridNormalizerService.java
----------------------------------------------------------------------
diff --git a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/services/grid/GridNormalizerService.java b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/services/grid/GridNormalizerService.java
deleted file mode 100644
index 844168b..0000000
--- a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/services/grid/GridNormalizerService.java
+++ /dev/null
@@ -1,38 +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 org.apache.isis.applib.annotation.Programmatic;
-import org.apache.isis.applib.layout.common.Grid;
-
-public interface GridNormalizerService<G extends Grid> {
-
-    @Programmatic
-    Class<? extends Grid> gridImplementation();
-
-    @Programmatic
-    String tns();
-
-    @Programmatic
-    String schemaLocation();
-
-    @Programmatic
-    void normalize(G grid, Class<?> domainClass);
-
-
-
-}

http://git-wip-us.apache.org/repos/asf/isis/blob/5c831757/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 91d8aba..79d3548 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
@@ -31,6 +31,7 @@ import org.slf4j.LoggerFactory;
 
 import org.apache.isis.applib.DomainObjectContainer;
 import org.apache.isis.applib.annotation.Programmatic;
+import org.apache.isis.applib.services.layout.GridNormalizerService;
 import org.apache.isis.applib.layout.common.ActionLayoutData;
 import org.apache.isis.applib.layout.common.ActionLayoutDataOwner;
 import org.apache.isis.applib.layout.common.CollectionLayoutData;
@@ -38,10 +39,10 @@ import org.apache.isis.applib.layout.common.FieldSet;
 import org.apache.isis.applib.layout.common.Grid;
 import org.apache.isis.applib.layout.common.MemberRegionOwner;
 import org.apache.isis.applib.layout.common.PropertyLayoutData;
-import org.apache.isis.applib.layout.fixedcols.FCColumn;
-import org.apache.isis.applib.layout.fixedcols.FCColumnOwner;
-import org.apache.isis.applib.layout.fixedcols.FCGrid;
-import org.apache.isis.applib.layout.fixedcols.FCTab;
+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.applib.services.i18n.TranslationService;
 import org.apache.isis.applib.services.jaxb.JaxbService;
 import org.apache.isis.core.metamodel.facetapi.Facet;
@@ -119,6 +120,10 @@ public abstract class GridNormalizerServiceAbstract<G extends Grid>
     @Override
     public void normalize(final G grid, final Class<?> domainClass) {
 
+        if(!gridImplementation.isAssignableFrom(grid.getClass())) {
+            // ignore any other grid implementations
+            return;
+        }
         final ObjectSpecification objectSpec = specificationLookup.loadSpecification(domainClass);
 
         final Map<String, OneToOneAssociation> oneToOneAssociationById =
@@ -142,6 +147,19 @@ public abstract class GridNormalizerServiceAbstract<G extends Grid>
         }
     }
 
+    @Programmatic
+    @Override
+    public void complete(final G grid, final Class<?> domainClass) {
+        // TODO: do some different logic here...
+        normalize(grid, domainClass);
+    }
+
+    @Programmatic
+    @Override
+    public void minimal(final G grid, final Class<?> domainClass) {
+        // TODO: do some different logic here...
+        normalize(grid, domainClass);
+    }
     /**
      * Ensures that all object members (properties, collections and actions) are in the metadata.
      */

http://git-wip-us.apache.org/repos/asf/isis/blob/5c831757/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 66d4f9e..1d078f5 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
@@ -29,6 +29,7 @@ import javax.xml.bind.JAXBContext;
 
 import com.google.common.base.Function;
 import com.google.common.base.Joiner;
+import com.google.common.base.Predicate;
 import com.google.common.collect.FluentIterable;
 import com.google.common.collect.Lists;
 import com.google.common.collect.Maps;
@@ -40,6 +41,7 @@ import org.slf4j.LoggerFactory;
 import org.apache.isis.applib.annotation.DomainService;
 import org.apache.isis.applib.annotation.NatureOfService;
 import org.apache.isis.applib.annotation.Programmatic;
+import org.apache.isis.applib.services.layout.GridNormalizerService;
 import org.apache.isis.applib.layout.common.Grid;
 import org.apache.isis.applib.services.jaxb.JaxbService;
 import org.apache.isis.applib.services.layout.GridService;
@@ -146,6 +148,48 @@ public class GridServiceDefault
         }
     }
 
+    @Override
+    @Programmatic
+    public Grid normalize(final Grid grid, final Class<?> domainClass) {
+
+        // 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
+        // in order to trample over the .layout.json's original facets
+        if(grid.isNormalized()) {
+            return grid;
+        }
+
+        for (GridNormalizerService gridNormalizerService : gridNormalizerServices()) {
+            gridNormalizerService.normalize(grid, domainClass);
+        }
+
+        grid.setNormalized(true);
+
+        return grid;
+    }
+
+    @Override
+    @Programmatic
+    public Grid complete(final Grid grid, final Class<?> domainClass) {
+
+        for (GridNormalizerService gridNormalizerService : gridNormalizerServices()) {
+            gridNormalizerService.complete(grid, domainClass);
+        }
+
+        return grid;
+    }
+
+    @Override
+    @Programmatic
+    public Grid minimal(final Grid grid, final Class<?> domainClass) {
+
+        for (GridNormalizerService gridNormalizerService : gridNormalizerServices()) {
+            gridNormalizerService.minimal(grid, domainClass);
+        }
+
+        return grid;
+    }
+
     private static String resourceContentOf(final Class<?> cls, final String resourceName) throws IOException {
         final URL url = Resources.getResource(cls, resourceName);
         return Resources.toString(url, Charset.defaultCharset());
@@ -158,17 +202,39 @@ public class GridServiceDefault
 
     @Override
     @Programmatic
-    public Grid toGrid(final Object domainObject) {
-        return toGrid(domainObject.getClass());
+    public Grid toGrid(final Object domainObject, final Style style) {
+        return toGrid(domainObject.getClass(), style);
     }
 
     @Override
-    public Grid toGrid(final Class<?> domainClass) {
-        final ObjectSpecification objectSpec = specificationLookup.loadSpecification(domainClass);
-        final GridFacet facet = objectSpec.getFacet(GridFacet.class);
-        return facet != null? facet.getGrid(): null;
+    public Grid toGrid(final Class<?> domainClass, final Style style) {
+        switch (style) {
+        case NORMALIZED:
+            // obtain the already normalized grid, if available.
+            // (if there is none, then the facet will delegate back to this service to do the normalization,
+            // but then will cache it for any subsequent requests).
+            final ObjectSpecification objectSpec = specificationLookup.loadSpecification(domainClass);
+            final GridFacet facet = objectSpec.getFacet(GridFacet.class);
+            return facet != null? facet.getGrid(): null;
+        case COMPLETE:
+            return completeGridFor(domainClass);
+        case MINIMAL:
+            return minimalGridFor(domainClass);
+        default:
+            throw new IllegalArgumentException("unsupported style");
+        }
     }
 
+    protected Grid minimalGridFor(final Class<?> domainClass) {
+        Grid grid = fromXml(domainClass);
+        return grid;
+    }
+
+    protected Grid completeGridFor(final Class<?> domainClass) {
+        Grid grid = fromXml(domainClass);
+        grid = normalize(grid, domainClass);
+        return grid;
+    }
 
     @Override
     public String tnsAndSchemaLocation(final Grid grid) {
@@ -189,6 +255,38 @@ public class GridServiceDefault
 
     ////////////////////////////////////////////////////////
 
+    private List<GridNormalizerService<?>> filteredGridNormalizerServices;
+
+    /**
+     * For all of the available {@link GridNormalizerService}s available, return only the first one for any that
+     * are for the same grid implementation.
+     */
+    @Programmatic
+    public List<GridNormalizerService<?>> gridNormalizerServices() {
+
+        if (filteredGridNormalizerServices == null) {
+            List<GridNormalizerService<?>> services = Lists.newArrayList();
+
+            for (GridNormalizerService gridNormalizerService : this.gridNormalizerServices) {
+                final Class gridImplementation = gridNormalizerService.gridImplementation();
+                final boolean notSeenBefore = FluentIterable.from(services).filter(new Predicate<GridNormalizerService<?>>() {
+                    @Override public boolean apply(@Nullable final GridNormalizerService<?> gridNormalizerService) {
+                        return gridNormalizerService.gridImplementation() == gridImplementation;
+                    }
+                }).isEmpty();
+                if(notSeenBefore) {
+                    services.add(gridNormalizerService);
+                }
+            }
+
+            filteredGridNormalizerServices = services;
+
+        }
+        return filteredGridNormalizerServices;
+    }
+
+    ////////////////////////////////////////////////////////
+
 
     //region > injected dependencies
 

http://git-wip-us.apache.org/repos/asf/isis/blob/5c831757/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
index c617c73..d48fddb 100644
--- 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
@@ -30,10 +30,10 @@ import org.apache.isis.applib.layout.common.CollectionLayoutData;
 import org.apache.isis.applib.layout.common.FieldSet;
 import org.apache.isis.applib.layout.common.Grid;
 import org.apache.isis.applib.layout.common.PropertyLayoutData;
-import org.apache.isis.applib.layout.fixedcols.FCColumn;
-import org.apache.isis.applib.layout.fixedcols.FCGrid;
-import org.apache.isis.applib.layout.fixedcols.FCTab;
-import org.apache.isis.applib.layout.fixedcols.FCTabGroup;
+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;

http://git-wip-us.apache.org/repos/asf/isis/blob/5c831757/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
new file mode 100644
index 0000000..157428a
--- /dev/null
+++ b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/services/grid/fixedcols/applib/FCColumn.java
@@ -0,0 +1,161 @@
+/*
+ *  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.annotation.MemberGroupLayout;
+import org.apache.isis.applib.layout.common.CollectionLayoutData;
+import org.apache.isis.applib.layout.common.CollectionLayoutDataOwner;
+import org.apache.isis.applib.layout.common.FieldSet;
+import org.apache.isis.applib.layout.common.FieldSetOwner;
+import org.apache.isis.applib.layout.common.Owned;
+import org.apache.isis.applib.layout.common.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;
+    }
+
+
+
+    public enum Hint {
+        LEFT,
+        MIDDLE,
+        RIGHT;
+
+        public int from(MemberGroupLayout.ColumnSpans columnSpans) {
+            if(this == LEFT) return columnSpans.getLeft();
+            if(this == MIDDLE) return columnSpans.getMiddle();
+            if(this == RIGHT) return columnSpans.getRight();
+            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/5c831757/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
new file mode 100644
index 0000000..9bc073c
--- /dev/null
+++ b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/services/grid/fixedcols/applib/FCColumnOwner.java
@@ -0,0 +1,25 @@
+/*
+ *  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.common.Owner;
+
+public interface FCColumnOwner extends Owner {
+
+}

http://git-wip-us.apache.org/repos/asf/isis/blob/5c831757/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
new file mode 100644
index 0000000..b7625af
--- /dev/null
+++ b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/services/grid/fixedcols/applib/FCGrid.java
@@ -0,0 +1,204 @@
+/*
+ *  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.common.ActionLayoutData;
+import org.apache.isis.applib.layout.common.ActionLayoutDataOwner;
+import org.apache.isis.applib.layout.common.CollectionLayoutData;
+import org.apache.isis.applib.layout.common.DomainObjectLayoutData;
+import org.apache.isis.applib.layout.common.FieldSet;
+import org.apache.isis.applib.layout.common.Grid;
+import org.apache.isis.applib.layout.common.GridAbstract;
+import org.apache.isis.applib.layout.common.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(FCColumn.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(FCColumn.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/5c831757/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
new file mode 100644
index 0000000..3ce6df8
--- /dev/null
+++ b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/services/grid/fixedcols/applib/FCTab.java
@@ -0,0 +1,159 @@
+/*
+ *  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.common.CollectionLayoutData;
+import org.apache.isis.applib.layout.common.MemberRegion;
+import org.apache.isis.applib.layout.common.Owned;
+import org.apache.isis.applib.layout.common.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(FCColumn.Hint.LEFT);
+    }
+
+
+    private FCColumn middle;
+
+    @XmlElement(required = false)
+    public FCColumn getMiddle() {
+        return middle;
+    }
+
+    public void setMiddle(final FCColumn middle) {
+        this.middle = middle;
+        middle.setHint(FCColumn.Hint.MIDDLE);
+    }
+
+
+    private FCColumn right;
+
+    @XmlElement(required = false)
+    public FCColumn getRight() {
+        return right;
+    }
+
+    public void setRight(final FCColumn right) {
+        this.right = right;
+        right.setHint(FCColumn.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/5c831757/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
new file mode 100644
index 0000000..d27eae8
--- /dev/null
+++ b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/services/grid/fixedcols/applib/FCTabGroup.java
@@ -0,0 +1,94 @@
+/*
+ *  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.common.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/5c831757/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
new file mode 100644
index 0000000..f6f59d5
--- /dev/null
+++ b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/services/grid/fixedcols/applib/FCTabGroupOwner.java
@@ -0,0 +1,25 @@
+/*
+ *  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.common.Owner;
+
+public interface FCTabGroupOwner extends Owner {
+
+}

http://git-wip-us.apache.org/repos/asf/isis/blob/5c831757/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
new file mode 100644
index 0000000..3cdd1f1
--- /dev/null
+++ b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/services/grid/fixedcols/applib/package-info.java
@@ -0,0 +1,44 @@
+/*
+ *  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/5c831757/core/metamodel/src/main/java/org/apache/isis/core/metamodel/services/metamodel/MetadataMenu.java
----------------------------------------------------------------------
diff --git a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/services/metamodel/MetadataMenu.java b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/services/metamodel/MetadataMenu.java
index c017adf..76a436e 100644
--- a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/services/metamodel/MetadataMenu.java
+++ b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/services/metamodel/MetadataMenu.java
@@ -108,7 +108,7 @@ public class MetadataMenu implements SpecificationLoaderSpiAware {
             final OutputStreamWriter writer = new OutputStreamWriter(zos);
             for (final ObjectSpecification objectSpec : domainObjectSpecs) {
                 final Class<?> domainClass = objectSpec.getCorrespondingClass();
-                final Grid grid = gridService.toGrid(domainClass);
+                final Grid grid = gridService.toGrid(domainClass, GridService.Style.NORMALIZED);
                 if(grid != null) {
                     zos.putNextEntry(new ZipEntry(zipEntryNameFor(objectSpec)));
                     String xml = jaxbService.toXml(grid);

http://git-wip-us.apache.org/repos/asf/isis/blob/5c831757/core/metamodel/src/main/java/org/apache/isis/core/metamodel/spec/ObjectSpecifications.java
----------------------------------------------------------------------
diff --git a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/spec/ObjectSpecifications.java b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/spec/ObjectSpecifications.java
index 686ab7c..a47e9c5 100644
--- a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/spec/ObjectSpecifications.java
+++ b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/spec/ObjectSpecifications.java
@@ -25,7 +25,7 @@ import java.util.Set;
 
 import com.google.common.collect.Lists;
 
-import org.apache.isis.applib.layout.fixedcols.FCColumn;
+import org.apache.isis.core.metamodel.services.grid.fixedcols.applib.FCColumn;
 import org.apache.isis.core.metamodel.facets.object.membergroups.MemberGroupLayoutFacet;
 
 


[38/50] [abbrv] isis git commit: ISIS-993: minor changes, working towards being able to generate .layout.xml for complete vs normalized vs minimal (no longer NPEs for complete etc), however...

Posted by da...@apache.org.
ISIS-993: minor changes, working towards being able to generate .layout.xml for complete vs normalized vs minimal (no longer NPEs for complete etc), however...

... not yet correctly roundtripping for anything other than the complete .layout.xml.


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

Branch: refs/heads/master
Commit: df329882299524e194a7e9d0e86f497421eaa110
Parents: 48fe231
Author: Dan Haywood <da...@haywood-associates.co.uk>
Authored: Fri Feb 26 14:43:29 2016 +0000
Committer: Dan Haywood <da...@haywood-associates.co.uk>
Committed: Fri Feb 26 14:43:29 2016 +0000

----------------------------------------------------------------------
 .../metamodel/facets/object/grid/GridFacet.java    | 10 +++++++++-
 .../services/grid/GridServiceDefault.java          | 17 +++++++++--------
 2 files changed, 18 insertions(+), 9 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/isis/blob/df329882/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/object/grid/GridFacet.java
----------------------------------------------------------------------
diff --git a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/object/grid/GridFacet.java b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/object/grid/GridFacet.java
index 75dbda9..4b09be1 100644
--- a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/object/grid/GridFacet.java
+++ b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/object/grid/GridFacet.java
@@ -20,10 +20,18 @@ package org.apache.isis.core.metamodel.facets.object.grid;
 
 
 import org.apache.isis.applib.layout.component.Grid;
+import org.apache.isis.applib.services.layout.GridNormalizerService;
+import org.apache.isis.applib.services.layout.GridService;
 import org.apache.isis.core.metamodel.facetapi.Facet;
 
 /**
- * Corresponds to providing a <code>.layout.xml</code> file for the domain object's class.
+ * Obtain the current grid, derived either from a <code>.layout.xml</code> file, and normalized, or synthesized from
+ * existing layout metadata (annotations or <code>layout.json</code>).
+ *
+ * <p>
+ *     Most of the heavy lifting is done by delegating to the {@link GridService} and {@link GridNormalizerService}
+ *     services.
+ * </p>
  */
 public interface GridFacet extends Facet {
 

http://git-wip-us.apache.org/repos/asf/isis/blob/df329882/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 4ce3f02..7a774d3 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
@@ -229,21 +229,22 @@ public class GridServiceDefault
     public Grid toGrid(final Class<?> domainClass, final Style style) {
         switch (style) {
         case NORMALIZED:
-            // obtain the already normalized grid, if available.
-            // (if there is none, then the facet will delegate back to this service to do the normalization,
-            // but then will cache it for any subsequent requests).
-            final ObjectSpecification objectSpec = specificationLookup.loadSpecification(domainClass);
-            final GridFacet facet = objectSpec.getFacet(GridFacet.class);
-            return facet != null? facet.getGrid(): null;
+            return normalizedGrid(domainClass);
         case COMPLETE:
-            return complete(fromXml(domainClass));
+            return complete(normalizedGrid(domainClass));
         case MINIMAL:
-            return minimal(fromXml(domainClass));
+            return minimal(normalizedGrid(domainClass));
         default:
             throw new IllegalArgumentException("unsupported style");
         }
     }
 
+    protected Grid normalizedGrid(final Class<?> domainClass) {
+        final ObjectSpecification objectSpec = specificationLookup.loadSpecification(domainClass);
+        final GridFacet facet = objectSpec.getFacet(GridFacet.class);
+        return facet != null? facet.getGrid(): null;
+    }
+
     @Override
     public String tnsAndSchemaLocation(final Grid grid) {
         final List<String> parts = Lists.newArrayList();


[25/50] [abbrv] 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/master
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


[21/50] [abbrv] isis git commit: ISIS-993: first-cut of single-edit properties (using modal prompt dialog). Prereq for removing the FixedCol stuff.

Posted by da...@apache.org.
ISIS-993: first-cut of single-edit properties (using modal prompt dialog).  Prereq for removing the FixedCol stuff.


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

Branch: refs/heads/master
Commit: de3e385f02d1941a569934bdfc583c3839488b08
Parents: e57acf2
Author: Dan Haywood <da...@haywood-associates.co.uk>
Authored: Wed Feb 17 00:46:01 2016 +0000
Committer: Dan Haywood <da...@haywood-associates.co.uk>
Committed: Wed Feb 17 00:46:01 2016 +0000

----------------------------------------------------------------------
 .../ComponentFactoryRegistrarDefault.java       |  14 +-
 .../hints/IsisPropertyEditCompletedEvent.java   |  46 +++
 .../viewer/wicket/model/models/EntityModel.java |  34 +--
 .../model/models/PropertyEditExecutor.java      |  35 +++
 .../viewer/wicket/model/models/ScalarModel.java |  57 ++++
 .../isis/viewer/wicket/ui/ComponentType.java    |   8 +
 .../actions/ActionParametersFormPanel.java      |   1 -
 .../property/PropertyEditFormPanel.html         |  42 +++
 .../property/PropertyEditFormPanel.java         | 199 ++++++++++++
 .../property/PropertyEditFormPanelFactory.java  |  52 ++++
 .../components/property/PropertyEditPanel.html  |  35 +++
 .../components/property/PropertyEditPanel.java  | 300 +++++++++++++++++++
 .../property/PropertyEditPanelFactory.java      |  52 ++++
 .../property/PropertyEditPromptHeaderPanel.html |  32 ++
 .../property/PropertyEditPromptHeaderPanel.java |  54 ++++
 .../components/scalars/ScalarPanelAbstract.html |   2 +-
 .../components/scalars/ScalarPanelAbstract.java |  48 ++-
 .../scalars/ScalarPanelTextFieldAbstract.java   |  11 +-
 .../wicket/ui/pages/bootstrap-overrides.css     |  12 +-
 .../ui/pages/jquery.isis.wicket.viewer.js       |  11 +
 .../java/domainapp/dom/simple/SimpleObject.java |   6 +-
 .../dom/simple/SimpleObject.layout.xml          |   1 +
 22 files changed, 1008 insertions(+), 44 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/isis/blob/de3e385f/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 eacb114..7120113 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
@@ -39,15 +39,17 @@ import org.apache.isis.viewer.wicket.ui.components.collectioncontents.multiple.C
 import org.apache.isis.viewer.wicket.ui.components.collectioncontents.summary.CollectionContentsAsSummaryFactory;
 import org.apache.isis.viewer.wicket.ui.components.collectioncontents.unresolved.CollectionContentsAsUnresolvedPanelFactory;
 import org.apache.isis.viewer.wicket.ui.components.empty.EmptyCollectionPanelFactory;
-import org.apache.isis.viewer.wicket.ui.components.layout.fixedcols.collections.EntityCollectionsPanelFactory;
 import org.apache.isis.viewer.wicket.ui.components.entity.header.EntityHeaderPanelFactory;
 import org.apache.isis.viewer.wicket.ui.components.entity.icontitle.EntityIconAndTitlePanelFactory;
 import org.apache.isis.viewer.wicket.ui.components.entity.icontitle.EntityIconTitleAndCopyLinkPanelFactory;
-import org.apache.isis.viewer.wicket.ui.components.layout.fixedcols.propsandcolls.EntityPropsAndCollsPanelFactory;
 import org.apache.isis.viewer.wicket.ui.components.entity.selector.links.EntityLinksSelectorPanelFactory;
-import org.apache.isis.viewer.wicket.ui.components.layout.EntityPanelFactory;
 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;
 import org.apache.isis.viewer.wicket.ui.components.scalars.isisapplib.IsisClobPanelFactory;
 import org.apache.isis.viewer.wicket.ui.components.scalars.isisapplib.IsisColorPanelFactory;
@@ -135,6 +137,7 @@ public class ComponentFactoryRegistrarDefault implements ComponentFactoryRegistr
         addComponentFactoriesForActionInfo(componentFactories);
         addComponentFactoriesForAction(componentFactories);
         addComponentFactoriesForActionLink(componentFactories);
+        addComponentFactoriesForPropertyEdit(componentFactories);
         addComponentFactoriesForEntityCollection(componentFactories);
         addComponentFactoriesForEntityCollectionContents(componentFactories);
         addComponentFactoriesForEmptyCollection(componentFactories);
@@ -265,6 +268,11 @@ public class ComponentFactoryRegistrarDefault implements ComponentFactoryRegistr
         componentFactories.add(new StandaloneCollectionPanelFactory());
     }
 
+    protected void addComponentFactoriesForPropertyEdit(final ComponentFactoryList componentFactories) {
+        componentFactories.add(new PropertyEditPanelFactory());
+        componentFactories.add(new PropertyEditFormPanelFactory());
+    }
+
     protected void addComponentFactoriesForActionLink(final ComponentFactoryList componentFactories) {
         componentFactories.add(new ActionLinkPanelFactory());
     }

http://git-wip-us.apache.org/repos/asf/isis/blob/de3e385f/core/viewer-wicket-model/src/main/java/org/apache/isis/viewer/wicket/model/hints/IsisPropertyEditCompletedEvent.java
----------------------------------------------------------------------
diff --git a/core/viewer-wicket-model/src/main/java/org/apache/isis/viewer/wicket/model/hints/IsisPropertyEditCompletedEvent.java b/core/viewer-wicket-model/src/main/java/org/apache/isis/viewer/wicket/model/hints/IsisPropertyEditCompletedEvent.java
new file mode 100644
index 0000000..77313de
--- /dev/null
+++ b/core/viewer-wicket-model/src/main/java/org/apache/isis/viewer/wicket/model/hints/IsisPropertyEditCompletedEvent.java
@@ -0,0 +1,46 @@
+/**
+ *  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.hints;
+
+import org.apache.wicket.ajax.AjaxRequestTarget;
+import org.apache.wicket.markup.html.form.Form;
+
+import org.apache.isis.viewer.wicket.model.models.ScalarModel;
+
+/**
+ *
+ */
+public class IsisPropertyEditCompletedEvent extends IsisEventLetterAbstract {
+
+    private final ScalarModel scalarModel;
+    private final Form<?> form;
+
+    public IsisPropertyEditCompletedEvent(ScalarModel scalarModel, AjaxRequestTarget target, Form<?> form) {
+        super(target);
+        this.scalarModel = scalarModel;
+        this.form = form;
+    }
+
+    public ScalarModel getScalarModel() {
+        return scalarModel;
+    }
+
+    public Form<?> getForm() {
+        return form;
+    }
+}
+

http://git-wip-us.apache.org/repos/asf/isis/blob/de3e385f/core/viewer-wicket-model/src/main/java/org/apache/isis/viewer/wicket/model/models/EntityModel.java
----------------------------------------------------------------------
diff --git a/core/viewer-wicket-model/src/main/java/org/apache/isis/viewer/wicket/model/models/EntityModel.java b/core/viewer-wicket-model/src/main/java/org/apache/isis/viewer/wicket/model/models/EntityModel.java
index b26529b..47e8315 100644
--- a/core/viewer-wicket-model/src/main/java/org/apache/isis/viewer/wicket/model/models/EntityModel.java
+++ b/core/viewer-wicket-model/src/main/java/org/apache/isis/viewer/wicket/model/models/EntityModel.java
@@ -38,13 +38,11 @@ import org.apache.isis.core.metamodel.adapter.oid.RootOid;
 import org.apache.isis.core.metamodel.adapter.version.ConcurrencyException;
 import org.apache.isis.core.metamodel.consent.Consent;
 import org.apache.isis.core.metamodel.consent.InteractionInitiatedBy;
-import org.apache.isis.core.metamodel.facets.members.disabled.DisabledFacet;
 import org.apache.isis.core.metamodel.facets.object.bookmarkpolicy.BookmarkPolicyFacet;
 import org.apache.isis.core.metamodel.facets.object.viewmodel.ViewModelFacet;
 import org.apache.isis.core.metamodel.spec.ObjectSpecId;
 import org.apache.isis.core.metamodel.spec.ObjectSpecification;
 import org.apache.isis.core.metamodel.spec.SpecificationLoaderSpi;
-import org.apache.isis.core.metamodel.spec.feature.OneToOneAssociation;
 import org.apache.isis.core.runtime.services.memento.MementoServiceDefault;
 import org.apache.isis.core.runtime.system.context.IsisContext;
 import org.apache.isis.viewer.wicket.model.common.PageParametersUtils;
@@ -505,36 +503,7 @@ public class EntityModel extends BookmarkableModel<ObjectAdapter> {
     public ObjectAdapter apply() {
         ObjectAdapter adapter = getObjectAdapterMemento().getObjectAdapter(ConcurrencyChecking.CHECK);
         for (final ScalarModel scalarModel : propertyScalarModels.values()) {
-            final OneToOneAssociation property = scalarModel.getPropertyMemento().getProperty();
-
-            //
-            // previously there was a guard here to only apply changes provided:
-            //
-            // property.containsDoOpFacet(NotPersistedFacet.class) == null
-            //
-            // however, that logic is wrong; although a property may not be directly
-            // persisted so far as JDO is concerned, it may be indirectly persisted
-            // as the result of business logic in the setter.
-            //
-            // for example, see ExampleTaggableEntity (in isisaddons-module-tags).
-            //
-
-            //
-            // on the other hand, we mustn't attempt to apply changes for disabled properties...
-            // even if the property is persisted (it might be written to by an action), it is never updated by
-            // an edit.
-            //
-            // Fundamentally, then, any non-disabled property (whether persisted or not) should be updated in the
-            // Isis runtime.
-            //
-
-            if(property.containsDoOpFacet(DisabledFacet.class)) {
-                // skip, as per comments above
-                continue;
-            }
-
-            final ObjectAdapter associate = scalarModel.getObject();
-            property.set(adapter, associate, InteractionInitiatedBy.USER);
+            scalarModel.applyValue(adapter);
         }
 
         final ViewModelFacet recreatableObjectFacet = adapter.getSpecification().getFacet(ViewModelFacet.class);
@@ -553,7 +522,6 @@ public class EntityModel extends BookmarkableModel<ObjectAdapter> {
         return adapter;
     }
 
-
     // //////////////////////////////////////////////////////////
     // Pending
     // //////////////////////////////////////////////////////////

http://git-wip-us.apache.org/repos/asf/isis/blob/de3e385f/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
new file mode 100644
index 0000000..ca99e4f
--- /dev/null
+++ b/core/viewer-wicket-model/src/main/java/org/apache/isis/viewer/wicket/model/models/PropertyEditExecutor.java
@@ -0,0 +1,35 @@
+/*
+ *  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/de3e385f/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 1e1c85e..b465456 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
@@ -40,6 +40,7 @@ import org.apache.isis.core.metamodel.consent.InteractionInitiatedBy;
 import org.apache.isis.core.metamodel.deployment.DeploymentCategory;
 import org.apache.isis.core.metamodel.facetapi.Facet;
 import org.apache.isis.core.metamodel.facetapi.FacetHolder;
+import org.apache.isis.core.metamodel.facets.members.disabled.DisabledFacet;
 import org.apache.isis.core.metamodel.facets.object.parseable.ParseableFacet;
 import org.apache.isis.core.metamodel.facets.objectvalue.mandatory.MandatoryFacet;
 import org.apache.isis.core.metamodel.facets.objectvalue.typicallen.TypicalLengthFacet;
@@ -767,6 +768,62 @@ 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();
+
+        final ObjectAdapter adapter = getParentObjectAdapterMemento().getObjectAdapter(ConcurrencyChecking.CHECK);
+
+        final ObjectAdapter associate = getObject();
+
+        final Consent validity = property.isAssociationValid(adapter, associate, InteractionInitiatedBy.USER);
+        return validity.isAllowed() ? null : validity.getReason();
+    }
+
+    public void applyValue(final ObjectAdapter adapter) {
+        final OneToOneAssociation property = getPropertyMemento().getProperty();
+
+        //
+        // previously there was a guard here to only apply changes provided:
+        //
+        // property.containsDoOpFacet(NotPersistedFacet.class) == null
+        //
+        // however, that logic is wrong; although a property may not be directly
+        // persisted so far as JDO is concerned, it may be indirectly persisted
+        // as the result of business logic in the setter.
+        //
+        // for example, see ExampleTaggableEntity (in isisaddons-module-tags).
+        //
+
+        //
+        // on the other hand, we mustn't attempt to apply changes for disabled properties...
+        // even if the property is persisted (it might be written to by an action), it is never updated by
+        // an edit.
+        //
+        // Fundamentally, then, any non-disabled property (whether persisted or not) should be updated in the
+        // Isis runtime.
+        //
+
+        if(property.containsDoOpFacet(DisabledFacet.class)) {
+            // skip, as per comments above
+            return;
+        }
+
+        final ObjectAdapter associate = getObject();
+        property.set(adapter, associate, InteractionInitiatedBy.USER);
+    }
+
+
+
+
     // //////////////////////////////////////
 
     /**

http://git-wip-us.apache.org/repos/asf/isis/blob/de3e385f/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 a4e8865..b55e74e 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
@@ -95,6 +95,10 @@ public enum ComponentType {
      */
     PARAMETERS,
     /**
+     * The edit form (property value and buttons) of an property.
+     */
+    PROPERTY_EDIT_FORM,
+    /**
      * Info details for an action, eg to display the target, a resubmit button,
      * any description or help text, and so on.
      */
@@ -104,6 +108,10 @@ public enum ComponentType {
      */
     ACTION_PROMPT,
     /**
+     * Used to display a single property for editing.
+     */
+    PROPERTY_EDIT_PROMPT,
+    /**
      * Top-level component for rendering a standalone collection (ie as returned by
      * an action).
      */

http://git-wip-us.apache.org/repos/asf/isis/blob/de3e385f/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 d1d7020..0c31a65 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
@@ -74,7 +74,6 @@ public class ActionParametersFormPanel extends PanelAbstract<ActionModel> {
     private static final String ID_ACTION_PARAMETERS = "parameters";
 
     private final ActionExecutor actionExecutor;
-    //private final ActionPrompt actionPromptIfAny;
 
     public ActionParametersFormPanel(final String id, final ActionModel model) {
         super(id, model);

http://git-wip-us.apache.org/repos/asf/isis/blob/de3e385f/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/property/PropertyEditFormPanel.html
----------------------------------------------------------------------
diff --git a/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/property/PropertyEditFormPanel.html b/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/property/PropertyEditFormPanel.html
new file mode 100644
index 0000000..352c214
--- /dev/null
+++ b/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/property/PropertyEditFormPanel.html
@@ -0,0 +1,42 @@
+<?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="propertyEditForm inputForm">
+                <form wicket:id="inputForm" method="post" class="form-horizontal propertyEditForm">
+                    <fieldset class="inputFormTable parameters">
+                        <div wicket:id="property" class="property">
+                          <div wicket:id="scalarNameAndValue">[scalar]</div>
+                        </div>
+                        <span wicket:id="feedback"></span>
+                        <div class="buttons">
+                            <input type="submit" wicket:id="okButton" value="OK" class="ok btn btn-sm btn-primary"/>
+                            <input type="submit" wicket:id="cancelButton" value="Cancel" class="cancel btn btn-sm btn-default"/>
+                        </div>
+                    </fieldset>
+                </form>
+            </div>
+        </wicket:panel>
+    </body>
+</html>
+
+
+

http://git-wip-us.apache.org/repos/asf/isis/blob/de3e385f/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
new file mode 100644
index 0000000..b51bb19
--- /dev/null
+++ b/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/property/PropertyEditFormPanel.java
@@ -0,0 +1,199 @@
+/*
+ *  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.property;
+
+import org.apache.wicket.Component;
+import org.apache.wicket.ajax.AjaxRequestTarget;
+import org.apache.wicket.ajax.markup.html.form.AjaxButton;
+import org.apache.wicket.event.Broadcast;
+import org.apache.wicket.markup.html.WebMarkupContainer;
+import org.apache.wicket.markup.html.form.Form;
+import org.apache.wicket.model.ResourceModel;
+
+import org.apache.isis.core.commons.ensure.Ensure;
+import org.apache.isis.core.metamodel.adapter.ObjectAdapter;
+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.ScalarModel;
+import org.apache.isis.viewer.wicket.ui.ComponentType;
+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;
+import org.apache.isis.viewer.wicket.ui.components.widgets.formcomponent.FormFeedbackPanel;
+import org.apache.isis.viewer.wicket.ui.errors.JGrowlBehaviour;
+import org.apache.isis.viewer.wicket.ui.errors.JGrowlUtil;
+import org.apache.isis.viewer.wicket.ui.panels.PanelAbstract;
+
+import static org.hamcrest.CoreMatchers.is;
+import static org.hamcrest.CoreMatchers.not;
+import static org.hamcrest.CoreMatchers.nullValue;
+
+/**
+ * {@link PanelAbstract Panel} to capture the arguments for an action
+ * invocation.
+ */
+public class PropertyEditFormPanel extends PanelAbstract<ScalarModel> {
+
+    private static final long serialVersionUID = 1L;
+
+    private static final String ID_OK_BUTTON = "okButton";
+    private static final String ID_CANCEL_BUTTON = "cancelButton";
+
+    private static final String ID_PROPERTY = "property";
+
+    private final PropertyEditExecutor propertyEditExecutor;
+
+    public PropertyEditFormPanel(final String id, final ScalarModel model) {
+        super(id, model);
+
+        Ensure.ensureThatArg(model.getExecutor(), is(not(nullValue())));
+
+        this.propertyEditExecutor = model.getExecutor();
+
+        buildGui();
+    }
+
+    private void buildGui() {
+        ScalarModel model = getModel();
+
+        add(new PropertyEditForm("inputForm", model));
+    }
+
+    class PropertyEditForm extends Form<ObjectAdapter> implements ScalarModelSubscriber  {
+
+        private static final long serialVersionUID = 1L;
+
+        private static final String ID_FEEDBACK = "feedback";
+        
+        private ScalarPanelAbstract propertyPanel = null;
+
+        public PropertyEditForm(final String id, final ScalarModel actionModel) {
+            super(id, actionModel);
+
+            setOutputMarkupId(true); // for ajax button
+            
+            addParameters();
+
+            FormFeedbackPanel formFeedback = new FormFeedbackPanel(ID_FEEDBACK);
+            addOrReplace(formFeedback);
+            addButtons();
+        }
+
+        private ScalarModel getScalarModel() {
+            return (ScalarModel) super.getModel();
+        }
+
+        private void addParameters() {
+            final ScalarModel scalarModel = getScalarModel();
+
+            final WebMarkupContainer container = new WebMarkupContainer(ID_PROPERTY);
+            add(container);
+
+            final Component component = getComponentFactoryRegistry().addOrReplaceComponent(container, ComponentType.SCALAR_NAME_AND_VALUE, scalarModel);
+            final ScalarPanelAbstract paramPanel = component instanceof ScalarPanelAbstract ? (ScalarPanelAbstract) component : null;
+            propertyPanel = paramPanel;
+            if(paramPanel != null) {
+                paramPanel.setOutputMarkupId(true);
+                paramPanel.notifyOnChange(this);
+            }
+        }
+
+
+        private void addButtons() {
+            AjaxButton okButton = new AjaxButton(ID_OK_BUTTON, new ResourceModel("okLabel")) {
+                private static final long serialVersionUID = 1L;
+
+                @Override
+                public void onSubmit(AjaxRequestTarget target, Form<?> form) {
+                    boolean succeeded = propertyEditExecutor.editAndProcessResults(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
+                        // new page is rendered.
+                        target.appendJavaScript("isisShowVeil();\n");
+
+                        send(getPage(), Broadcast.EXACT, new IsisPropertyEditCompletedEvent(getScalarModel(), target, form));
+
+                        target.add(form);
+                    } else {
+
+                        final StringBuilder builder = new StringBuilder();
+
+                        // ensure any jGrowl errors are shown
+                        // (normally would be flushed when traverse to next page).
+                        String errorMessagesIfAny = JGrowlUtil.asJGrowlCalls(IsisContext.getMessageBroker());
+                        builder.append(errorMessagesIfAny);
+
+                        // append the JS to the response.
+                        String buf = builder.toString();
+                        target.appendJavaScript(buf);
+                        target.add(form);
+                    }
+                };
+
+                /**
+                 * On validation error
+                 */
+                @Override
+                protected void onError(AjaxRequestTarget target, Form<?> form) {
+                    super.onError(target, form);
+                    target.add(form);
+                }
+            };
+            okButton.add(new JGrowlBehaviour());
+            setDefaultButton(okButton);
+            add(okButton);
+
+            AjaxButton cancelButton = new AjaxButton(ID_CANCEL_BUTTON, new ResourceModel("cancelLabel")) {
+                private static final long serialVersionUID = 1L;
+
+                @Override
+                public void onSubmit(final AjaxRequestTarget target, Form<?> form) {
+                    final ActionPrompt actionPromptIfAny = ActionPromptProvider.Util.getFrom(PropertyEditFormPanel.this).getActionPrompt();
+                    if(actionPromptIfAny != null) {
+                        actionPromptIfAny.closePrompt(target);
+                    }
+                }
+            };
+            // so can submit with invalid content (eg mandatory params missing)
+            cancelButton.setDefaultFormProcessing(false);
+            add(cancelButton);
+
+        }
+
+        @Override
+        public void onUpdate(
+                final AjaxRequestTarget target, final ScalarModelProvider provider) {
+
+        }
+
+        public void onError(AjaxRequestTarget target, ScalarModelProvider provider) {
+            if(provider instanceof Component) {
+                // ensure that any feedback error associated with the providing component is shown.
+                target.add((Component)provider); 
+            }
+        }
+
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/isis/blob/de3e385f/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/property/PropertyEditFormPanelFactory.java
----------------------------------------------------------------------
diff --git a/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/property/PropertyEditFormPanelFactory.java b/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/property/PropertyEditFormPanelFactory.java
new file mode 100644
index 0000000..50ecbf6
--- /dev/null
+++ b/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/property/PropertyEditFormPanelFactory.java
@@ -0,0 +1,52 @@
+/*
+ *  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.property;
+
+import org.apache.wicket.Component;
+import org.apache.wicket.model.IModel;
+
+import org.apache.isis.viewer.wicket.model.models.ScalarModel;
+import org.apache.isis.viewer.wicket.ui.ComponentFactory;
+import org.apache.isis.viewer.wicket.ui.ComponentFactoryAbstract;
+import org.apache.isis.viewer.wicket.ui.ComponentType;
+
+/**
+ * {@link ComponentFactory} for {@link PropertyEditFormPanel}.
+ */
+public class PropertyEditFormPanelFactory extends ComponentFactoryAbstract {
+
+    private static final long serialVersionUID = 1L;
+
+    public PropertyEditFormPanelFactory() {
+        super(ComponentType.PROPERTY_EDIT_FORM, PropertyEditFormPanel.class);
+    }
+
+    @Override
+    public ApplicationAdvice appliesTo(final IModel<?> model) {
+        return appliesIf(model instanceof ScalarModel);
+    }
+
+    @Override
+    public Component createComponent(final String id, final IModel<?> model) {
+        final ScalarModel scalarModel = (ScalarModel) model;
+        return new PropertyEditFormPanel(id, scalarModel);
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/isis/blob/de3e385f/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/property/PropertyEditPanel.html
----------------------------------------------------------------------
diff --git a/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/property/PropertyEditPanel.html b/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/property/PropertyEditPanel.html
new file mode 100644
index 0000000..8eacbe3
--- /dev/null
+++ b/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/property/PropertyEditPanel.html
@@ -0,0 +1,35 @@
+<?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.
+-->
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"  
+      xmlns:wicket="http://wicket.apache.org/dtds.data/wicket-xhtml1.4-strict.dtd"  
+      xml:lang="en"  
+      lang="en">
+    <body>
+        <wicket:panel>
+            <div class="propertyEditPanel propertyEditComponentType">
+                <div wicket:id="header" class="iconAndTitle panel panel-default actionPanelHeaderNew">
+                     <wicket:container wicket:id="entityIconAndTitle">[icon and title]</wicket:container>
+                </div>
+                <div wicket:id="propertyEditForm"></div>
+            </div>
+        </wicket:panel>
+    </body>
+</html>

http://git-wip-us.apache.org/repos/asf/isis/blob/de3e385f/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
new file mode 100644
index 0000000..76e48b2
--- /dev/null
+++ b/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/property/PropertyEditPanel.java
@@ -0,0 +1,300 @@
+/*
+ *  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.property;
+
+import java.util.List;
+
+import com.google.common.base.Throwables;
+
+import org.apache.wicket.ajax.AjaxRequestTarget;
+import org.apache.wicket.markup.html.WebMarkupContainer;
+import org.apache.wicket.markup.html.basic.Label;
+import org.apache.wicket.markup.html.form.Form;
+import org.apache.wicket.model.Model;
+
+import org.apache.isis.applib.services.command.Command;
+import org.apache.isis.applib.services.command.CommandContext;
+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;
+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.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.ScalarModel;
+import org.apache.isis.viewer.wicket.ui.ComponentType;
+import org.apache.isis.viewer.wicket.ui.actionresponse.ActionResultResponseHandlingStrategy;
+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 {
+
+    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
+     */
+    private boolean showHeader = true;
+
+    public PropertyEditPanel(final String id, final ScalarModel scalarModel) {
+        super(id, new ScalarModel(scalarModel.getParentObjectAdapterMemento(), scalarModel.getPropertyMemento()));
+        getScalarModel().setExecutor(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();
+
+        buildGui(getModel());
+    }
+
+    private void buildGui(final ScalarModel scalarModel) {
+        buildGuiForParameters(scalarModel);
+    }
+
+    ScalarModel getScalarModel() {
+        return super.getModel();
+    }
+
+    public PropertyEditPanel setShowHeader(boolean showHeader) {
+        this.showHeader = showHeader;
+        return this;
+    }
+
+    private void buildGuiForParameters(final ScalarModel scalarModel) {
+
+        WebMarkupContainer header = addHeader();
+
+        ObjectAdapter targetAdapter = null;
+        try {
+            targetAdapter = scalarModel.getParentObjectAdapterMemento()
+                    .getObjectAdapter(AdapterManager.ConcurrencyChecking.CHECK);
+
+            scalarModel.toEditMode();
+
+            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)));
+
+        } catch (final ConcurrencyException ex) {
+
+            // second attempt should succeed, because the Oid would have
+            // been updated in the attempt
+            if (targetAdapter == null) {
+                targetAdapter = scalarModel.getParentObjectAdapterMemento()
+                        .getObjectAdapter(AdapterManager.ConcurrencyChecking.CHECK);
+            }
+
+            // page redirect/handling
+            final EntityPage entityPage = new EntityPage(targetAdapter, null);
+            setResponsePage(entityPage);
+
+            getMessageBroker().addWarning(ex.getMessage());
+        }
+    }
+
+    private WebMarkupContainer addHeader() {
+        WebMarkupContainer header = new WebMarkupContainer(ID_HEADER) {
+            @Override
+            protected void onConfigure() {
+                super.onConfigure();
+
+                setVisible(showHeader);
+            }
+        };
+        addOrReplace(header);
+        return header;
+    }
+
+    /**
+     * @param feedbackForm - for feedback messages.
+     * @return
+     */
+    @Override
+    public boolean editAndProcessResults(AjaxRequestTarget target, Form<?> feedbackForm) {
+
+        permanentlyHide(ComponentType.ENTITY_ICON_AND_TITLE);
+
+        ObjectAdapter targetAdapter = null;
+        try {
+            targetAdapter = getModel().getParentObjectAdapterMemento().getObjectAdapter(
+                    AdapterManager.ConcurrencyChecking.CHECK);
+
+            // no concurrency exception, so continue...
+            return editTargetAndProcessResults(targetAdapter, target, feedbackForm);
+
+        } catch (ConcurrencyException ex) {
+
+            // second attempt should succeed, because the Oid would have
+            // been updated in the attempt
+            if (targetAdapter == null) {
+                targetAdapter = getModel().getParentObjectAdapterMemento().getObjectAdapter(
+                        AdapterManager.ConcurrencyChecking.CHECK);
+            }
+
+            // page redirect/handling
+            final EntityPage entityPage = new EntityPage(targetAdapter, null);
+            setResponsePage(entityPage);
+
+            getMessageBroker().addWarning(ex.getMessage());
+            return false;
+        }
+    }
+
+
+
+    private boolean editTargetAndProcessResults(
+            final ObjectAdapter targetAdapter,
+            final AjaxRequestTarget target,
+            final Form<?> feedbackForm) {
+
+        final ScalarModel scalarModel = getScalarModel();
+
+        // validate the action parameters (if any)
+        final String invalidReasonIfAny = scalarModel.getReasonInvalidIfAny();
+
+        if (invalidReasonIfAny != null) {
+            raiseWarning(target, feedbackForm, invalidReasonIfAny);
+            return false;
+        }
+
+        final CommandContext commandContext = getServicesInjector().lookupService(CommandContext.class);
+        final Command command;
+        if (commandContext != null) {
+            command = commandContext.getCommand();
+            command.setExecutor(Command.Executor.USER);
+        } else {
+            command = null;
+        }
+
+
+        // the object store could raise an exception (eg uniqueness constraint)
+        // so we handle it here.
+        try {
+            // could be programmatic flushing, so must include in the try... finally
+
+            ObjectAdapter adapter = getScalarModel().getParentObjectAdapterMemento()
+                    .getObjectAdapter(AdapterManager.ConcurrencyChecking.CHECK);
+
+            getScalarModel().applyValue(adapter);
+
+            // flush any queued changes, so concurrency or violation exceptions (if any)
+            // will be thrown here
+            getTransactionManager().flushTransaction();
+
+            final EntityPage entityPage = new EntityPage(adapter, null);
+            setResponsePage(entityPage);
+
+            return true;
+
+        } catch (RuntimeException ex) {
+
+            String message = recognizeException(ex, target, feedbackForm);
+
+            if (message != null) {
+                // no need to add to message broker, should already have been added...
+
+                if(feedbackForm == null) {
+                    // forward on instead to void page
+                    // (otherwise, we'll have rendered an action parameters page
+                    // and so we'll be staying on that page)
+                    ActionResultResponseHandlingStrategy.REDIRECT_TO_VOID.handleResults(this, null);
+                }
+
+                return false;
+            }
+
+            // not handled, so capture and propagate
+            if(command != null) {
+                command.setException(Throwables.getStackTraceAsString(ex));
+            }
+
+            throw ex;
+        }
+    }
+
+
+    private String recognizeException(RuntimeException ex, AjaxRequestTarget target, Form<?> feedbackForm) {
+        
+        // REVIEW: this code is similar to stuff in EntityPropertiesForm, perhaps move up to superclass?
+        // REVIEW: similar code also in WebRequestCycleForIsis; combine?
+        
+        // see if the exception is recognized as being a non-serious error
+        // (nb: similar code in WebRequestCycleForIsis, as a fallback)
+        List<ExceptionRecognizer> exceptionRecognizers = getServicesInjector().lookupServices(ExceptionRecognizer.class);
+        String recognizedErrorIfAny = new ExceptionRecognizerComposite(exceptionRecognizers).recognize(ex);
+        if(recognizedErrorIfAny != null) {
+
+            // recognized
+            raiseWarning(target, feedbackForm, recognizedErrorIfAny);
+
+            getTransactionManager().getTransaction().clearAbortCause();
+            
+            // there's no need to abort the transaction, it will have already been done
+            // (in IsisTransactionManager#executeWithinTransaction(...)).
+        }
+        return recognizedErrorIfAny;
+    }
+
+    public void raiseWarning(AjaxRequestTarget target, Form<?> feedbackForm, String error) {
+        if(target != null && feedbackForm != null) {
+            target.add(feedbackForm);
+            feedbackForm.error(error);
+        } else {
+            getMessageBroker().addWarning(error);
+        }
+    }
+
+
+    ///////////////////////////////////////////////////////
+    // Dependencies (from context)
+    ///////////////////////////////////////////////////////
+    
+    protected IsisTransactionManager getTransactionManager() {
+        return IsisContext.getTransactionManager();
+    }
+
+    protected MessageBroker getMessageBroker() {
+        return getAuthenticationSession().getMessageBroker();
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/isis/blob/de3e385f/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/property/PropertyEditPanelFactory.java
----------------------------------------------------------------------
diff --git a/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/property/PropertyEditPanelFactory.java b/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/property/PropertyEditPanelFactory.java
new file mode 100644
index 0000000..a5b8076
--- /dev/null
+++ b/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/property/PropertyEditPanelFactory.java
@@ -0,0 +1,52 @@
+/*
+ *  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.property;
+
+import org.apache.wicket.Component;
+import org.apache.wicket.model.IModel;
+
+import org.apache.isis.viewer.wicket.model.models.ScalarModel;
+import org.apache.isis.viewer.wicket.ui.ComponentFactory;
+import org.apache.isis.viewer.wicket.ui.ComponentFactoryAbstract;
+import org.apache.isis.viewer.wicket.ui.ComponentType;
+
+/**
+ * {@link ComponentFactory} for {@link PropertyEditPanel}.
+ */
+public class PropertyEditPanelFactory extends ComponentFactoryAbstract {
+
+    private static final long serialVersionUID = 1L;
+
+    public PropertyEditPanelFactory() {
+        super(ComponentType.PROPERTY_EDIT_PROMPT, PropertyEditPanel.class);
+    }
+
+    @Override
+    public ApplicationAdvice appliesTo(final IModel<?> model) {
+        return appliesIf(model instanceof ScalarModel);
+    }
+
+    @Override
+    public Component createComponent(final String id, final IModel<?> model) {
+        final ScalarModel scalarModel = (ScalarModel) model;
+        return new PropertyEditPanel(id, scalarModel);
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/isis/blob/de3e385f/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/property/PropertyEditPromptHeaderPanel.html
----------------------------------------------------------------------
diff --git a/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/property/PropertyEditPromptHeaderPanel.html b/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/property/PropertyEditPromptHeaderPanel.html
new file mode 100644
index 0000000..173b259
--- /dev/null
+++ b/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/property/PropertyEditPromptHeaderPanel.html
@@ -0,0 +1,32 @@
+<?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.
+-->
+<!DOCTYPE html>
+<html xmlns="http://www.w3.org/1999/xhtml"
+      xmlns:wicket="http://wicket.apache.org"
+      xml:lang="en"
+      lang="en">
+    <body>
+        <wicket:panel>
+            <div class="iconAndTitle propertyPanelHeaderNew">
+                <span wicket:enclosure="entityIconAndTitle"><span wicket:id="entityIconAndTitle">[icon and title]</span> :</span> <span wicket:id="propertyName" class="propertyName">[property name]</span>
+            </div>
+        </wicket:panel>
+    </body>
+</html>

http://git-wip-us.apache.org/repos/asf/isis/blob/de3e385f/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
new file mode 100644
index 0000000..f62f986
--- /dev/null
+++ b/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/property/PropertyEditPromptHeaderPanel.java
@@ -0,0 +1,54 @@
+/*
+ *  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.property;
+
+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.adapter.mgr.AdapterManager;
+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;
+import org.apache.isis.viewer.wicket.ui.panels.PanelAbstract;
+
+/**
+ * A panel used as a title for the action prompts
+ */
+public class PropertyEditPromptHeaderPanel extends PanelAbstract<ScalarModel> {
+
+    private static final String ID_PROPERTY_NAME = "propertyName";
+
+    public PropertyEditPromptHeaderPanel(String id, final ScalarModel model) {
+        super(id, model);
+
+        ObjectAdapter targetAdapter =
+                model.getParentObjectAdapterMemento().getObjectAdapter(AdapterManager.ConcurrencyChecking.NO_CHECK);
+
+        getComponentFactoryRegistry().addOrReplaceComponent(this, ComponentType.ENTITY_ICON_AND_TITLE, new EntityModel(targetAdapter));
+
+        add(new Label(ID_PROPERTY_NAME, new AbstractReadOnlyModel<String>() {
+            @Override
+            public String getObject() {
+                return model.getPropertyMemento().getProperty().getName();
+            }
+        }));
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/isis/blob/de3e385f/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 4d6bd0f..e7715cd 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,7 +28,7 @@
                 <div class="form-group" wicket:id="scalarIfRegular">
                     <label wicket:id="scalarName" class="scalarName control-label">[Label text]</label>
                     <span class="scalarValueWrapper">
-                        <wicket:child/>
+                        <span class="editing"><wicket:child/><a wicket:id="editProperty" href="#" class="btn btn-link btn-xs" style="float: right;">edit</a></span>
                         <span wicket:id="feedback" class="help-block"></span>
                         <span wicket:id="associatedActionLinksBelow"></span>
                     </span>

http://git-wip-us.apache.org/repos/asf/isis/blob/de3e385f/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 a9df6fa..b3b59b1 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
@@ -25,11 +25,13 @@ import com.google.common.collect.Lists;
 
 import org.apache.wicket.Component;
 import org.apache.wicket.MarkupContainer;
+import org.apache.wicket.ajax.AjaxEventBehavior;
 import org.apache.wicket.ajax.AjaxRequestTarget;
 import org.apache.wicket.ajax.form.AjaxFormComponentUpdatingBehavior;
 import org.apache.wicket.behavior.AttributeAppender;
 import org.apache.wicket.behavior.Behavior;
 import org.apache.wicket.feedback.ComponentFeedbackMessageFilter;
+import org.apache.wicket.markup.html.WebMarkupContainer;
 import org.apache.wicket.markup.html.form.LabeledWebMarkupContainer;
 import org.apache.wicket.markup.html.panel.Fragment;
 import org.apache.wicket.model.Model;
@@ -44,11 +46,17 @@ import org.apache.isis.core.metamodel.facets.objectvalue.labelat.LabelAtFacet;
 import org.apache.isis.core.runtime.system.DeploymentType;
 import org.apache.isis.core.runtime.system.context.IsisContext;
 import org.apache.isis.viewer.wicket.model.links.LinkAndLabel;
+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.RenderingHint;
 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.actionmenu.entityactions.AdditionalLinksPanel;
+import org.apache.isis.viewer.wicket.ui.components.property.PropertyEditPanel;
+import org.apache.isis.viewer.wicket.ui.components.property.PropertyEditPromptHeaderPanel;
 import org.apache.isis.viewer.wicket.ui.components.scalars.TextFieldValueModel.ScalarModelProvider;
 import org.apache.isis.viewer.wicket.ui.panels.PanelAbstract;
+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;
@@ -74,6 +82,7 @@ public abstract class ScalarPanelAbstract extends PanelAbstract<ScalarModel> imp
     private static final String ID_ASSOCIATED_ACTION_LINKS_BELOW = "associatedActionLinksBelow";
     private static final String ID_ASSOCIATED_ACTION_LINKS_RIGHT = "associatedActionLinksRight";
 
+    private static final String ID_EDIT_PROPERTY = "editProperty";
     private static final String ID_FEEDBACK = "feedback";
 
     public enum CompactType {
@@ -193,11 +202,13 @@ public abstract class ScalarPanelAbstract extends PanelAbstract<ScalarModel> imp
                 guiForceBuilt = false;
             }
         }
+
         final ScalarModel scalarModel = getModel();
+        final String disableReasonIfAny = scalarModel.disable(getRendering().getWhere());
+
         if (scalarModel.isViewMode()) {
             onBeforeRenderWhenViewMode();
         } else {
-            final String disableReasonIfAny = scalarModel.disable(getRendering().getWhere());
             if (disableReasonIfAny != null) {
                 onBeforeRenderWhenDisabled(disableReasonIfAny);
             } else {
@@ -294,6 +305,41 @@ public abstract class ScalarPanelAbstract extends PanelAbstract<ScalarModel> imp
 
     protected void addFeedbackTo(MarkupContainer markupContainer, Component component) {
         markupContainer.addOrReplace(new NotificationPanel(ID_FEEDBACK, component, new ComponentFeedbackMessageFilter(component)));
+
+        final String disableReasonIfAny = scalarModel.disable(getRendering().getWhere());
+        if (disableReasonIfAny == null && scalarModel.isViewMode()) {
+            final WebMarkupContainer editProperty = new WebMarkupContainer(ID_EDIT_PROPERTY);
+
+            editProperty.setOutputMarkupId(true);
+
+            editProperty.add(new AjaxEventBehavior("click") {
+                protected void onEvent(AjaxRequestTarget target) {
+
+                    final ActionPrompt prompt = ActionPromptProvider.Util
+                            .getFrom(ScalarPanelAbstract.this).getActionPrompt();
+
+                    PropertyEditPromptHeaderPanel titlePanel = new PropertyEditPromptHeaderPanel(prompt.getTitleId(),
+                            scalarModel);
+
+                    final PropertyEditPanel propertyEditPanel =
+                            (PropertyEditPanel) getComponentFactoryRegistry().createComponent(
+                                    ComponentType.PROPERTY_EDIT_PROMPT, prompt.getContentId(), scalarModel);
+
+                    propertyEditPanel.setShowHeader(false);
+
+                    prompt.setTitle(titlePanel, target);
+                    prompt.setPanel(propertyEditPanel, target);
+                    propertyEditPanel.setActionPrompt(prompt);
+                    prompt.showPrompt(target);
+
+                }
+            });
+
+            markupContainer.addOrReplace(editProperty);
+        } else {
+            Components.permanentlyHide(markupContainer, ID_EDIT_PROPERTY);
+        }
+
     }
 
 

http://git-wip-us.apache.org/repos/asf/isis/blob/de3e385f/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/scalars/ScalarPanelTextFieldAbstract.java
----------------------------------------------------------------------
diff --git a/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/scalars/ScalarPanelTextFieldAbstract.java b/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/scalars/ScalarPanelTextFieldAbstract.java
index 61103d0..259813e 100644
--- a/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/scalars/ScalarPanelTextFieldAbstract.java
+++ b/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/scalars/ScalarPanelTextFieldAbstract.java
@@ -21,7 +21,9 @@ package org.apache.isis.viewer.wicket.ui.components.scalars;
 
 import java.io.Serializable;
 import java.util.List;
+
 import com.google.common.base.Strings;
+
 import org.apache.wicket.AttributeModifier;
 import org.apache.wicket.Component;
 import org.apache.wicket.MarkupContainer;
@@ -36,11 +38,12 @@ import org.apache.wicket.model.Model;
 import org.apache.wicket.validation.IValidatable;
 import org.apache.wicket.validation.IValidator;
 import org.apache.wicket.validation.ValidationError;
+
 import org.apache.isis.core.metamodel.adapter.ObjectAdapter;
 import org.apache.isis.core.metamodel.facets.SingleIntValueFacet;
 import org.apache.isis.core.metamodel.facets.all.named.NamedFacet;
-import org.apache.isis.core.metamodel.facets.objectvalue.typicallen.TypicalLengthFacet;
 import org.apache.isis.core.metamodel.facets.objectvalue.maxlen.MaxLengthFacet;
+import org.apache.isis.core.metamodel.facets.objectvalue.typicallen.TypicalLengthFacet;
 import org.apache.isis.viewer.wicket.model.links.LinkAndLabel;
 import org.apache.isis.viewer.wicket.model.models.ScalarModel;
 import org.apache.isis.viewer.wicket.ui.components.actionmenu.entityactions.EntityActionUtil;
@@ -239,6 +242,12 @@ public abstract class ScalarPanelTextFieldAbstract<T extends Serializable> exten
     protected void onBeforeRenderWhenViewMode() {
         super.onBeforeRenderWhenViewMode();
         textField.setEnabled(false);
+
+        final String disableReasonIfAny = scalarModel.disable(getRendering().getWhere());
+        if(disableReasonIfAny == null) {
+            CssClassAppender.appendCssClassTo(this, "editable");
+        }
+
         setTitleAttribute("");
     }
 

http://git-wip-us.apache.org/repos/asf/isis/blob/de3e385f/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 83954d7..f7b9487 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
@@ -533,6 +533,7 @@ div.label-left label.control-label {
     text-align: left;
 }
 
+.propertyEditForm .label-left label.control-label,
 .actionParametersForm .label-left label.control-label {
     padding-left: 10px;
 }
@@ -607,7 +608,8 @@ div.label-right .scalarValueWrapper .control-label{
 /* Labels on the left/top/none END */
 
 
-.form-horizontal.actionParametersForm .form-group {
+.form-horizontal.actionParametersForm .form-group,
+.form-horizontal.propertyEditForm .form-group {
     margin-left: -5px;
 }
 
@@ -661,6 +663,7 @@ div.referencePanel.scalarNameAndValueComponentType {
     font-style: italic;
 }
 
+.propertyEditForm .buttons,
 .actionParametersForm .buttons {
     padding-top: 20px;
 }
@@ -765,4 +768,9 @@ tr.headers th form input {
 .additionalLinkListDropDown ul.dropdown-menu {
     padding-top: 0%;
     padding-bottom: 0%;
-}
\ No newline at end of file
+}
+
+/* cheap and nasty; ought really to suppress in Java code ... */
+.propertyEditForm .additionalLinkList {
+    display: none;
+}

http://git-wip-us.apache.org/repos/asf/isis/blob/de3e385f/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/pages/jquery.isis.wicket.viewer.js
----------------------------------------------------------------------
diff --git a/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/pages/jquery.isis.wicket.viewer.js b/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/pages/jquery.isis.wicket.viewer.js
index 512a499..e59913c 100644
--- a/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/pages/jquery.isis.wicket.viewer.js
+++ b/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/pages/jquery.isis.wicket.viewer.js
@@ -138,6 +138,17 @@ $(function() {
             $('.copyLink').css({visibility: 'hidden'});
         }
     );
+
+/*
+    $('.editing .editable').parent().hover(function () {
+        var inputEl = $(this).find("> .editable")
+        $(inputEl).css({cursor: 'pointer'})
+    },function () {
+        var inputEl = $(this).find("> .editable")
+        $(inputEl).css({cursor: 'auto'})
+    });
+*/
+
 });
 
 /**

http://git-wip-us.apache.org/repos/asf/isis/blob/de3e385f/example/application/simpleapp/dom/src/main/java/domainapp/dom/simple/SimpleObject.java
----------------------------------------------------------------------
diff --git a/example/application/simpleapp/dom/src/main/java/domainapp/dom/simple/SimpleObject.java b/example/application/simpleapp/dom/src/main/java/domainapp/dom/simple/SimpleObject.java
index 706db7a..6ac1bf3 100644
--- a/example/application/simpleapp/dom/src/main/java/domainapp/dom/simple/SimpleObject.java
+++ b/example/application/simpleapp/dom/src/main/java/domainapp/dom/simple/SimpleObject.java
@@ -31,7 +31,6 @@ import org.apache.isis.applib.annotation.BookmarkPolicy;
 import org.apache.isis.applib.annotation.CollectionLayout;
 import org.apache.isis.applib.annotation.DomainObject;
 import org.apache.isis.applib.annotation.DomainObjectLayout;
-import org.apache.isis.applib.annotation.Editing;
 import org.apache.isis.applib.annotation.MemberOrder;
 import org.apache.isis.applib.annotation.Parameter;
 import org.apache.isis.applib.annotation.ParameterLayout;
@@ -86,7 +85,7 @@ public class SimpleObject implements Comparable<SimpleObject> {
             length = NAME_LENGTH
     )
     @Property(
-            editing = Editing.DISABLED
+            //editing = Editing.DISABLED
     )
     @PropertyLayout(
             namedEscaped = false
@@ -99,6 +98,9 @@ public class SimpleObject implements Comparable<SimpleObject> {
         this.name = name;
     }
 
+    public TranslatableString validateName(final String name) {
+        return name != null && name.contains("!")? TranslatableString.tr("Exclamation mark is not allowed"): null;
+    }
 
 
     public static class UpdateNameDomainEvent extends ActionDomainEvent<SimpleObject> {}

http://git-wip-us.apache.org/repos/asf/isis/blob/de3e385f/example/application/simpleapp/dom/src/main/java/domainapp/dom/simple/SimpleObject.layout.xml
----------------------------------------------------------------------
diff --git a/example/application/simpleapp/dom/src/main/java/domainapp/dom/simple/SimpleObject.layout.xml b/example/application/simpleapp/dom/src/main/java/domainapp/dom/simple/SimpleObject.layout.xml
index 9012b51..c0eaded 100644
--- a/example/application/simpleapp/dom/src/main/java/domainapp/dom/simple/SimpleObject.layout.xml
+++ b/example/application/simpleapp/dom/src/main/java/domainapp/dom/simple/SimpleObject.layout.xml
@@ -14,6 +14,7 @@
                         <bs3:col span="12">
                             <c:fieldSet name="Properties">
                                 <c:property id="name"/>
+                                <c:property id="versionSequence"/>
                             </c:fieldSet>
                         </bs3:col>
                     </bs3:row>


[45/50] [abbrv] isis git commit: ISIS-993: fixing unit test from refactoring of SpecificationCacheDefault earlier

Posted by da...@apache.org.
ISIS-993: fixing unit test from refactoring of SpecificationCacheDefault earlier


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

Branch: refs/heads/master
Commit: 393312e4a52a914bfd32d595925b22c700c37187
Parents: 7628fc9
Author: Dan Haywood <da...@haywood-associates.co.uk>
Authored: Thu Mar 3 11:09:11 2016 +0000
Committer: Dan Haywood <da...@haywood-associates.co.uk>
Committed: Thu Mar 3 11:09:11 2016 +0000

----------------------------------------------------------------------
 .../specloader/SpecificationCacheDefault.java   |  5 ++++-
 .../SpecificationCacheDefaultTest.java          | 21 ++++++++++++++------
 2 files changed, 19 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/isis/blob/393312e4/core/metamodel/src/main/java/org/apache/isis/core/metamodel/specloader/SpecificationCacheDefault.java
----------------------------------------------------------------------
diff --git a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/specloader/SpecificationCacheDefault.java b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/specloader/SpecificationCacheDefault.java
index 4d2b476..d5a212c 100644
--- a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/specloader/SpecificationCacheDefault.java
+++ b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/specloader/SpecificationCacheDefault.java
@@ -68,9 +68,12 @@ class SpecificationCacheDefault {
      */
     void setCacheBySpecId(final Map<ObjectSpecId, ObjectSpecification> specById) {
         this.classNameBySpecId = Maps.newHashMap();
+
         for (ObjectSpecId objectSpecId : specById.keySet()) {
             final ObjectSpecification objectSpec = specById.get(objectSpecId);
-            this.classNameBySpecId.put(objectSpecId, objectSpec.getCorrespondingClass().getName());
+            final String className = objectSpec.getCorrespondingClass().getName();
+            this.classNameBySpecId.put(objectSpecId, className);
+            this.specByClassName.put(className, objectSpec);
         }
     }
 

http://git-wip-us.apache.org/repos/asf/isis/blob/393312e4/core/metamodel/src/test/java/org/apache/isis/core/metamodel/specloader/SpecificationCacheDefaultTest.java
----------------------------------------------------------------------
diff --git a/core/metamodel/src/test/java/org/apache/isis/core/metamodel/specloader/SpecificationCacheDefaultTest.java b/core/metamodel/src/test/java/org/apache/isis/core/metamodel/specloader/SpecificationCacheDefaultTest.java
index 09f2d71..49bbf18 100644
--- a/core/metamodel/src/test/java/org/apache/isis/core/metamodel/specloader/SpecificationCacheDefaultTest.java
+++ b/core/metamodel/src/test/java/org/apache/isis/core/metamodel/specloader/SpecificationCacheDefaultTest.java
@@ -18,16 +18,12 @@
  */
 package org.apache.isis.core.metamodel.specloader;
 
-import static org.hamcrest.CoreMatchers.is;
-import static org.junit.Assert.assertNull;
-import static org.junit.Assert.assertSame;
-import static org.junit.Assert.assertThat;
-
 import java.util.Collection;
 import java.util.Map;
 
 import com.google.common.collect.Maps;
 
+import org.jmock.Expectations;
 import org.jmock.auto.Mock;
 import org.junit.After;
 import org.junit.Before;
@@ -39,11 +35,16 @@ import org.apache.isis.core.metamodel.spec.ObjectSpecification;
 import org.apache.isis.core.unittestsupport.jmocking.JUnitRuleMockery2;
 import org.apache.isis.core.unittestsupport.jmocking.JUnitRuleMockery2.Mode;
 
+import static org.hamcrest.CoreMatchers.is;
+import static org.junit.Assert.assertNull;
+import static org.junit.Assert.assertSame;
+import static org.junit.Assert.assertThat;
+
 public class SpecificationCacheDefaultTest {
 
     @Rule
     public JUnitRuleMockery2 context = JUnitRuleMockery2.createFor(Mode.INTERFACES_ONLY);
-    
+
     @Mock
     private ObjectSpecification customerSpec;
     @Mock
@@ -54,6 +55,14 @@ public class SpecificationCacheDefaultTest {
     @Before
     public void setUp() throws Exception {
         specificationCache = new SpecificationCacheDefault();
+
+        context.checking(new Expectations() {{
+            allowing(customerSpec).getCorrespondingClass();
+            will(returnValue(Customer.class));
+
+            allowing(orderSpec).getCorrespondingClass();
+            will(returnValue(Order.class));
+        }});
     }
 
     @After


[29/50] [abbrv] 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/master
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) {
 


[23/50] [abbrv] 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);
-
-    }
-}


[17/50] [abbrv] isis git commit: ISIS-993: improving derivation of properties when layout xml exists with field sets and actions bound to those fieldsets only through @MemberOrder#name annotation.

Posted by da...@apache.org.
ISIS-993: improving derivation of properties when layout xml exists with field sets and actions bound to those fieldsets only through @MemberOrder#name annotation.


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

Branch: refs/heads/master
Commit: 30bfe8c62bbf2fa3894ccc52afb7719cf66f4bca
Parents: 697bcdb
Author: Dan Haywood <da...@haywood-associates.co.uk>
Authored: Mon Feb 15 09:58:02 2016 +0000
Committer: Dan Haywood <da...@haywood-associates.co.uk>
Committed: Mon Feb 15 09:58:02 2016 +0000

----------------------------------------------------------------------
 .../bootstrap3/GridNormalizerServiceBS3.java    | 98 +++++++++++++-------
 .../dom/simple/SimpleObject.layout.xml          |  2 +-
 2 files changed, 68 insertions(+), 32 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/isis/blob/30bfe8c6/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 d5aed0c..283bb49 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
@@ -20,17 +20,20 @@ import java.util.Comparator;
 import java.util.LinkedHashMap;
 import java.util.List;
 import java.util.Map;
+import java.util.Set;
 import java.util.concurrent.atomic.AtomicReference;
 
 import javax.annotation.Nullable;
 
 import com.google.common.base.Function;
 import com.google.common.base.Predicate;
+import com.google.common.base.Predicates;
 import com.google.common.base.Strings;
 import com.google.common.collect.FluentIterable;
 import com.google.common.collect.ImmutableList;
 import com.google.common.collect.Lists;
 import com.google.common.collect.Maps;
+import com.google.common.collect.Sets;
 
 import org.apache.isis.applib.annotation.ActionLayout;
 import org.apache.isis.applib.annotation.DomainService;
@@ -239,30 +242,67 @@ public class GridNormalizerServiceBS3 extends GridNormalizerServiceAbstract<BS3G
             propertyIds.get(surplusPropertyId).setMetadataError("No such property");
         }
 
-        final Map<String, List<OneToOneAssociation>> boundAssociationsByFieldSetId = Maps.newHashMap();
-        if(!missingPropertyIds.isEmpty()) {
-            final List<String> unboundPropertyIds = Lists.newArrayList(missingPropertyIds);
-            for (String missingPropertyId : missingPropertyIds) {
-                final OneToOneAssociation otoa = oneToOneAssociationById.get(missingPropertyId);
-                final MemberOrderFacet memberOrderFacet = otoa.getFacet(MemberOrderFacet.class);
-                if(memberOrderFacet != null) {
-                    final String id = asId(memberOrderFacet.name());
-                    if(fieldSetIds.containsKey(id)) {
-                        List<OneToOneAssociation> boundAssociations = boundAssociationsByFieldSetId.get(id);
-                        if(boundAssociations == null) {
-                            boundAssociations = Lists.newArrayList();
-                            boundAssociationsByFieldSetId.put(id, boundAssociations);
-                        }
-                        boundAssociations.add(otoa);
-                        unboundPropertyIds.remove(missingPropertyId);
+        // catalog which associations are bound to an existing field set
+        // so that (below) we can determine which missing property ids are not unbound vs which should be included
+        // in the fieldset that they are bound to.
+        final Map<String, Set<String>> boundAssociationIdsByFieldSetId = Maps.newHashMap();
+
+        // all those explicitly in the grid
+        for (FieldSet fieldSet : fieldSetIds.values()) {
+            final String fieldSetId = fieldSet.getId();
+            Set<String> boundAssociationIds = boundAssociationIdsByFieldSetId.get(fieldSetId);
+            if(boundAssociationIds == null) {
+                boundAssociationIds = Sets.newLinkedHashSet();
+                boundAssociationIds.addAll(
+                        FluentIterable.from(fieldSet.getProperties()).transform(
+                                new Function<PropertyLayoutData, String>() {
+                                    @Override
+                                    public String apply(@Nullable final PropertyLayoutData propertyLayoutData) {
+                                        return propertyLayoutData.getId();
+                                    }
+                                }).toList());
+                boundAssociationIdsByFieldSetId.put(fieldSetId, boundAssociationIds);
+            }
+        }
+        // along with any specified by existing metadata
+        for (OneToOneAssociation otoa : oneToOneAssociationById.values()) {
+            final MemberOrderFacet memberOrderFacet = otoa.getFacet(MemberOrderFacet.class);
+            if(memberOrderFacet != null) {
+                final String id = asId(memberOrderFacet.name());
+                if(fieldSetIds.containsKey(id)) {
+                    Set<String> boundAssociationIds = boundAssociationIdsByFieldSetId.get(id);
+                    if(boundAssociationIds == null) {
+                        boundAssociationIds = Sets.newLinkedHashSet();
+                        boundAssociationIdsByFieldSetId.put(id, boundAssociationIds);
                     }
+                    boundAssociationIds.add(otoa.getId());
                 }
             }
+        }
+
+        if(!missingPropertyIds.isEmpty()) {
+
+            final List<String> unboundPropertyIds = Lists.newArrayList(missingPropertyIds);
+
+            for (final String fieldSetId : boundAssociationIdsByFieldSetId.keySet()) {
+                final Set<String> boundPropertyIds = boundAssociationIdsByFieldSetId.get(fieldSetId);
+                unboundPropertyIds.removeAll(boundPropertyIds);
+            }
 
-            for (String fieldSetId : boundAssociationsByFieldSetId.keySet()) {
+            for (final String fieldSetId : boundAssociationIdsByFieldSetId.keySet()) {
                 final FieldSet fieldSet = fieldSetIds.get(fieldSetId);
-                final List<OneToOneAssociation> associations =
-                        boundAssociationsByFieldSetId.get(fieldSetId);
+                final Set<String> associationIds =
+                        boundAssociationIdsByFieldSetId.get(fieldSetId);
+
+                final List<OneToOneAssociation> associations = Lists.newArrayList(
+                        FluentIterable.from(associationIds)
+                        .transform(new Function<String, OneToOneAssociation>() {
+                            @Nullable @Override public OneToOneAssociation apply(final String propertyId) {
+                                return oneToOneAssociationById.get(propertyId);
+                            }
+                        })
+                        .filter(Predicates.<OneToOneAssociation>notNull())
+                );
 
                 associations.sort(byMemberOrderSequence());
                 addPropertiesTo(fieldSet,
@@ -341,18 +381,14 @@ public class GridNormalizerServiceBS3 extends GridNormalizerServiceAbstract<BS3G
                                 if (oneToManyAssociationById.containsKey(id)) {
                                     return false;
                                 }
-                                // if the @MemberOrder references a field set, then don't mark it as missing, but
-                                // instead explicitly add it to the list of actions of that fieldset.
-                                // (note we only do this provided we already know that
-                                // there is at least one property for said fieldset)
-                                if(boundAssociationsByFieldSetId.containsKey(id)) {
-                                    final List<OneToOneAssociation> oneToOneAssociations =
-                                            boundAssociationsByFieldSetId.get(id);
-                                    if(!oneToOneAssociations.isEmpty()) {
-                                        final ActionLayoutData actionLayoutData = new ActionLayoutData(actionId);
-                                        actionLayoutData.setPosition(ActionLayout.Position.PANEL_DROPDOWN);
-                                        fieldSetIds.get(id).getActions().add(actionLayoutData);
-                                    }
+                                // if the @MemberOrder for the action references a field set (that has bound
+                                // associations), then don't mark it as missing, butinstead explicitly add it to the
+                                // list of actions of that fieldset.
+                                final Set<String> boundAssociationIds = boundAssociationIdsByFieldSetId.get(id);
+                                if(boundAssociationIds != null && !boundAssociationIds.isEmpty()) {
+                                    final ActionLayoutData actionLayoutData = new ActionLayoutData(actionId);
+                                    actionLayoutData.setPosition(ActionLayout.Position.PANEL_DROPDOWN);
+                                    fieldSetIds.get(id).getActions().add(actionLayoutData);
                                     return false;
                                 }
                                 // is missing after all.

http://git-wip-us.apache.org/repos/asf/isis/blob/30bfe8c6/example/application/simpleapp/dom/src/main/java/domainapp/dom/simple/SimpleObject.layout.xml
----------------------------------------------------------------------
diff --git a/example/application/simpleapp/dom/src/main/java/domainapp/dom/simple/SimpleObject.layout.xml b/example/application/simpleapp/dom/src/main/java/domainapp/dom/simple/SimpleObject.layout.xml
index 5072933..9012b51 100644
--- a/example/application/simpleapp/dom/src/main/java/domainapp/dom/simple/SimpleObject.layout.xml
+++ b/example/application/simpleapp/dom/src/main/java/domainapp/dom/simple/SimpleObject.layout.xml
@@ -21,7 +21,7 @@
                 <bs3:tab name="Misc">
                     <bs3:row>
                         <bs3:col span="12">
-                            <c:fieldSet name="Misc">
+                            <c:fieldSet name="Metadata">
                                 <c:property id="versionSequence"/>
                             </c:fieldSet>
                         </bs3:col>


[03/50] [abbrv] isis git commit: ISIS-993: fleshing out the GridNormalizerServiceAbstract for the "complete" and "minimal" updating of Grid graphs (prior to conversion to XML).

Posted by da...@apache.org.
ISIS-993: fleshing out the GridNormalizerServiceAbstract for the "complete" and "minimal" updating of Grid graphs (prior to conversion to XML).


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

Branch: refs/heads/master
Commit: 6053d1a8efed2d5cae9cbbc8b0497796397686cd
Parents: 5c83175
Author: Dan Haywood <da...@haywood-associates.co.uk>
Authored: Wed Feb 10 10:21:00 2016 +0000
Committer: Dan Haywood <da...@haywood-associates.co.uk>
Committed: Wed Feb 10 10:21:00 2016 +0000

----------------------------------------------------------------------
 .../isis/applib/layout/bootstrap3/BS3Grid.java  |   2 +-
 .../applib/layout/common/ActionLayoutData.java  |  19 +-
 .../layout/common/CollectionLayoutData.java     |  22 +-
 .../common/CollectionLayoutDataOwner.java       |   1 +
 .../layout/common/DomainObjectLayoutData.java   |  16 +-
 .../isis/applib/layout/common/FieldSet.java     |  11 +-
 .../applib/layout/common/HasBookmarking.java    |  14 +
 .../isis/applib/layout/common/HasCssClass.java  |  12 +
 .../applib/layout/common/HasCssClassFa.java     |  16 +
 .../applib/layout/common/HasDescribedAs.java    |  12 +
 .../isis/applib/layout/common/HasHidden.java    |  14 +
 .../isis/applib/layout/common/HasNamed.java     |  17 ++
 .../isis/applib/layout/common/MemberRegion.java |   2 +-
 .../layout/common/PropertyLayoutData.java       |  16 +-
 .../members/cssclassfa/CssClassFaPosition.java  |  24 ++
 .../grid/GridNormalizerServiceAbstract.java     | 301 ++++++++++++++++++-
 16 files changed, 479 insertions(+), 20 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/isis/blob/6053d1a8/core/applib/src/main/java/org/apache/isis/applib/layout/bootstrap3/BS3Grid.java
----------------------------------------------------------------------
diff --git a/core/applib/src/main/java/org/apache/isis/applib/layout/bootstrap3/BS3Grid.java b/core/applib/src/main/java/org/apache/isis/applib/layout/bootstrap3/BS3Grid.java
index a893cfb..5d0cb47 100644
--- a/core/applib/src/main/java/org/apache/isis/applib/layout/bootstrap3/BS3Grid.java
+++ b/core/applib/src/main/java/org/apache/isis/applib/layout/bootstrap3/BS3Grid.java
@@ -113,7 +113,7 @@ public class BS3Grid extends GridAbstract implements BS3Element, Dto, BS3RowOwne
 
 
 
-    interface Visitor extends Grid.Visitor {
+    public interface Visitor extends Grid.Visitor {
         void preVisit(final BS3Grid bs3Grid);
         void visit(final BS3Grid bs3Grid);
         void postVisit(final BS3Grid bs3Grid);

http://git-wip-us.apache.org/repos/asf/isis/blob/6053d1a8/core/applib/src/main/java/org/apache/isis/applib/layout/common/ActionLayoutData.java
----------------------------------------------------------------------
diff --git a/core/applib/src/main/java/org/apache/isis/applib/layout/common/ActionLayoutData.java b/core/applib/src/main/java/org/apache/isis/applib/layout/common/ActionLayoutData.java
index f1aa540..5097349 100644
--- a/core/applib/src/main/java/org/apache/isis/applib/layout/common/ActionLayoutData.java
+++ b/core/applib/src/main/java/org/apache/isis/applib/layout/common/ActionLayoutData.java
@@ -48,7 +48,8 @@ import org.apache.isis.applib.annotation.Where;
         , "metadataError"
     }
 )
-public class ActionLayoutData implements Serializable, Owned<ActionLayoutDataOwner> {
+public class ActionLayoutData implements Serializable, Owned<ActionLayoutDataOwner>,HasCssClass, HasCssClassFa,
+        HasDescribedAs, HasHidden, HasNamed, HasBookmarking {
 
     private static final long serialVersionUID = 1L;
 
@@ -79,11 +80,13 @@ public class ActionLayoutData implements Serializable, Owned<ActionLayoutDataOwn
 
     private BookmarkPolicy bookmarking;
 
+    @Override
     @XmlAttribute(required = false)
     public BookmarkPolicy getBookmarking() {
         return bookmarking;
     }
 
+    @Override
     public void setBookmarking(BookmarkPolicy bookmarking) {
         this.bookmarking = bookmarking;
     }
@@ -91,11 +94,13 @@ public class ActionLayoutData implements Serializable, Owned<ActionLayoutDataOwn
 
     private String cssClass;
 
+    @Override
     @XmlAttribute(required = false)
     public String getCssClass() {
         return cssClass;
     }
 
+    @Override
     public void setCssClass(String cssClass) {
         this.cssClass = cssClass;
     }
@@ -103,11 +108,13 @@ public class ActionLayoutData implements Serializable, Owned<ActionLayoutDataOwn
 
     private String cssClassFa;
 
+    @Override
     @XmlAttribute(required = false)
     public String getCssClassFa() {
         return cssClassFa;
     }
 
+    @Override
     public void setCssClassFa(String cssClassFa) {
         this.cssClassFa = cssClassFa;
     }
@@ -116,11 +123,13 @@ public class ActionLayoutData implements Serializable, Owned<ActionLayoutDataOwn
 
     private org.apache.isis.applib.annotation.ActionLayout.CssClassFaPosition cssClassFaPosition;
 
+    @Override
     @XmlAttribute(required = false)
     public org.apache.isis.applib.annotation.ActionLayout.CssClassFaPosition getCssClassFaPosition() {
         return cssClassFaPosition;
     }
 
+    @Override
     public void setCssClassFaPosition(org.apache.isis.applib.annotation.ActionLayout.CssClassFaPosition cssClassFaPosition) {
         this.cssClassFaPosition = cssClassFaPosition;
     }
@@ -128,11 +137,13 @@ public class ActionLayoutData implements Serializable, Owned<ActionLayoutDataOwn
 
     private String describedAs;
 
+    @Override
     @XmlElement(required = false)
     public String getDescribedAs() {
         return describedAs;
     }
 
+    @Override
     public void setDescribedAs(String describedAs) {
         this.describedAs = describedAs;
     }
@@ -141,11 +152,13 @@ public class ActionLayoutData implements Serializable, Owned<ActionLayoutDataOwn
 
     private Where hidden;
 
+    @Override
     @XmlAttribute(required = false)
     public Where getHidden() {
         return hidden;
     }
 
+    @Override
     public void setHidden(Where hidden) {
         this.hidden = hidden;
     }
@@ -154,11 +167,13 @@ public class ActionLayoutData implements Serializable, Owned<ActionLayoutDataOwn
 
     private String named;
 
+    @Override
     @XmlElement(required = false)
     public String getNamed() {
         return named;
     }
 
+    @Override
     public void setNamed(String named) {
         this.named = named;
     }
@@ -167,11 +182,13 @@ public class ActionLayoutData implements Serializable, Owned<ActionLayoutDataOwn
 
     private Boolean namedEscaped;
 
+    @Override
     @XmlAttribute(required = false)
     public Boolean getNamedEscaped() {
         return namedEscaped;
     }
 
+    @Override
     public void setNamedEscaped(Boolean namedEscaped) {
         this.namedEscaped = namedEscaped;
     }

http://git-wip-us.apache.org/repos/asf/isis/blob/6053d1a8/core/applib/src/main/java/org/apache/isis/applib/layout/common/CollectionLayoutData.java
----------------------------------------------------------------------
diff --git a/core/applib/src/main/java/org/apache/isis/applib/layout/common/CollectionLayoutData.java b/core/applib/src/main/java/org/apache/isis/applib/layout/common/CollectionLayoutData.java
index 19758d6..05a331f 100644
--- a/core/applib/src/main/java/org/apache/isis/applib/layout/common/CollectionLayoutData.java
+++ b/core/applib/src/main/java/org/apache/isis/applib/layout/common/CollectionLayoutData.java
@@ -52,7 +52,11 @@ import org.apache.isis.applib.annotation.Where;
                 , "metadataError"
         }
 )
-public class CollectionLayoutData implements MemberRegion, ActionLayoutDataOwner, Serializable {
+public class CollectionLayoutData
+        implements MemberRegion<CollectionLayoutDataOwner>,
+                   ActionLayoutDataOwner,
+                   Serializable,
+                   HasCssClass, HasDescribedAs, HasHidden, HasNamed {
 
     private static final long serialVersionUID = 1L;
 
@@ -81,11 +85,13 @@ public class CollectionLayoutData implements MemberRegion, ActionLayoutDataOwner
 
     private String cssClass;
 
+    @Override
     @XmlAttribute(required = false)
     public String getCssClass() {
         return cssClass;
     }
 
+    @Override
     public void setCssClass(String cssClass) {
         this.cssClass = cssClass;
     }
@@ -94,11 +100,13 @@ public class CollectionLayoutData implements MemberRegion, ActionLayoutDataOwner
 
     private String describedAs;
 
+    @Override
     @XmlElement(required = false)
     public String getDescribedAs() {
         return describedAs;
     }
 
+    @Override
     public void setDescribedAs(String describedAs) {
         this.describedAs = describedAs;
     }
@@ -123,11 +131,13 @@ public class CollectionLayoutData implements MemberRegion, ActionLayoutDataOwner
 
     private Where hidden;
 
+    @Override
     @XmlAttribute(required = false)
     public Where getHidden() {
         return hidden;
     }
 
+    @Override
     public void setHidden(Where hidden) {
         this.hidden = hidden;
     }
@@ -135,11 +145,13 @@ public class CollectionLayoutData implements MemberRegion, ActionLayoutDataOwner
 
     private String named;
 
+    @Override
     @XmlElement(required = false)
     public String getNamed() {
         return named;
     }
 
+    @Override
     public void setNamed(String named) {
         this.named = named;
     }
@@ -147,11 +159,13 @@ public class CollectionLayoutData implements MemberRegion, ActionLayoutDataOwner
 
     private Boolean namedEscaped;
 
+    @Override
     @XmlAttribute(required = false)
     public Boolean getNamedEscaped() {
         return namedEscaped;
     }
 
+    @Override
     public void setNamedEscaped(Boolean namedEscaped) {
         this.namedEscaped = namedEscaped;
     }
@@ -197,7 +211,7 @@ public class CollectionLayoutData implements MemberRegion, ActionLayoutDataOwner
 
 
 
-    private MemberRegionOwner owner;
+    private CollectionLayoutDataOwner owner;
     /**
      * Owner.
      *
@@ -206,11 +220,11 @@ public class CollectionLayoutData implements MemberRegion, ActionLayoutDataOwner
      * </p>
      */
     @XmlTransient
-    public MemberRegionOwner getOwner() {
+    public CollectionLayoutDataOwner getOwner() {
         return owner;
     }
 
-    public void setOwner(final MemberRegionOwner owner) {
+    public void setOwner(final CollectionLayoutDataOwner owner) {
         this.owner = owner;
     }
 

http://git-wip-us.apache.org/repos/asf/isis/blob/6053d1a8/core/applib/src/main/java/org/apache/isis/applib/layout/common/CollectionLayoutDataOwner.java
----------------------------------------------------------------------
diff --git a/core/applib/src/main/java/org/apache/isis/applib/layout/common/CollectionLayoutDataOwner.java b/core/applib/src/main/java/org/apache/isis/applib/layout/common/CollectionLayoutDataOwner.java
index 438ae56..0eae2c7 100644
--- a/core/applib/src/main/java/org/apache/isis/applib/layout/common/CollectionLayoutDataOwner.java
+++ b/core/applib/src/main/java/org/apache/isis/applib/layout/common/CollectionLayoutDataOwner.java
@@ -21,5 +21,6 @@ package org.apache.isis.applib.layout.common;
 import java.util.List;
 
 public interface CollectionLayoutDataOwner extends MemberRegionOwner {
+
     List<CollectionLayoutData> getCollections();
 }

http://git-wip-us.apache.org/repos/asf/isis/blob/6053d1a8/core/applib/src/main/java/org/apache/isis/applib/layout/common/DomainObjectLayoutData.java
----------------------------------------------------------------------
diff --git a/core/applib/src/main/java/org/apache/isis/applib/layout/common/DomainObjectLayoutData.java b/core/applib/src/main/java/org/apache/isis/applib/layout/common/DomainObjectLayoutData.java
index 0db726a..702a3d6 100644
--- a/core/applib/src/main/java/org/apache/isis/applib/layout/common/DomainObjectLayoutData.java
+++ b/core/applib/src/main/java/org/apache/isis/applib/layout/common/DomainObjectLayoutData.java
@@ -43,7 +43,8 @@ import org.apache.isis.applib.annotation.BookmarkPolicy;
             , "metadataError"
         }
 )
-public class DomainObjectLayoutData implements Serializable {
+public class DomainObjectLayoutData implements Serializable,
+        HasBookmarking, HasCssClass, HasCssClassFa, HasDescribedAs, HasNamed {
 
     private static final long serialVersionUID = 1L;
 
@@ -126,6 +127,19 @@ public class DomainObjectLayoutData implements Serializable {
     }
 
 
+    private Boolean namedEscaped;
+
+    @Override
+    @XmlAttribute(required = false)
+    public Boolean getNamedEscaped() {
+        return namedEscaped;
+    }
+
+    @Override
+    public void setNamedEscaped(Boolean namedEscaped) {
+        this.namedEscaped = namedEscaped;
+    }
+
 
 
     private String plural;

http://git-wip-us.apache.org/repos/asf/isis/blob/6053d1a8/core/applib/src/main/java/org/apache/isis/applib/layout/common/FieldSet.java
----------------------------------------------------------------------
diff --git a/core/applib/src/main/java/org/apache/isis/applib/layout/common/FieldSet.java b/core/applib/src/main/java/org/apache/isis/applib/layout/common/FieldSet.java
index 262796b..7037135 100644
--- a/core/applib/src/main/java/org/apache/isis/applib/layout/common/FieldSet.java
+++ b/core/applib/src/main/java/org/apache/isis/applib/layout/common/FieldSet.java
@@ -51,7 +51,10 @@ import org.apache.isis.applib.layout.bootstrap3.BS3Col;
                 , "metadataError"
         }
 )
-public class FieldSet implements MemberRegion, ActionLayoutDataOwner, Serializable {
+public class FieldSet
+        implements MemberRegion<FieldSetOwner>,
+                   ActionLayoutDataOwner,
+                   Serializable {
 
     private static final long serialVersionUID = 1L;
 
@@ -162,7 +165,7 @@ public class FieldSet implements MemberRegion, ActionLayoutDataOwner, Serializab
     }
 
 
-    private MemberRegionOwner owner;
+    private FieldSetOwner owner;
     /**
      * Owner.
      *
@@ -171,11 +174,11 @@ public class FieldSet implements MemberRegion, ActionLayoutDataOwner, Serializab
      * </p>
      */
     @XmlTransient
-    public MemberRegionOwner getOwner() {
+    public FieldSetOwner getOwner() {
         return owner;
     }
 
-    public void setOwner(final MemberRegionOwner owner) {
+    public void setOwner(final FieldSetOwner owner) {
         this.owner = owner;
     }
 

http://git-wip-us.apache.org/repos/asf/isis/blob/6053d1a8/core/applib/src/main/java/org/apache/isis/applib/layout/common/HasBookmarking.java
----------------------------------------------------------------------
diff --git a/core/applib/src/main/java/org/apache/isis/applib/layout/common/HasBookmarking.java b/core/applib/src/main/java/org/apache/isis/applib/layout/common/HasBookmarking.java
new file mode 100644
index 0000000..ad841a2
--- /dev/null
+++ b/core/applib/src/main/java/org/apache/isis/applib/layout/common/HasBookmarking.java
@@ -0,0 +1,14 @@
+package org.apache.isis.applib.layout.common;
+
+import javax.xml.bind.annotation.XmlAttribute;
+
+import org.apache.isis.applib.annotation.BookmarkPolicy;
+
+/**
+ * Created by Dan on 10/02/2016.
+ */
+public interface HasBookmarking {
+    @XmlAttribute(required = false) BookmarkPolicy getBookmarking();
+
+    void setBookmarking(BookmarkPolicy bookmarking);
+}

http://git-wip-us.apache.org/repos/asf/isis/blob/6053d1a8/core/applib/src/main/java/org/apache/isis/applib/layout/common/HasCssClass.java
----------------------------------------------------------------------
diff --git a/core/applib/src/main/java/org/apache/isis/applib/layout/common/HasCssClass.java b/core/applib/src/main/java/org/apache/isis/applib/layout/common/HasCssClass.java
new file mode 100644
index 0000000..e42dc09
--- /dev/null
+++ b/core/applib/src/main/java/org/apache/isis/applib/layout/common/HasCssClass.java
@@ -0,0 +1,12 @@
+package org.apache.isis.applib.layout.common;
+
+import javax.xml.bind.annotation.XmlAttribute;
+
+/**
+ * Created by Dan on 10/02/2016.
+ */
+public interface HasCssClass {
+    @XmlAttribute(required = false) String getCssClass();
+
+    void setCssClass(String cssClass);
+}

http://git-wip-us.apache.org/repos/asf/isis/blob/6053d1a8/core/applib/src/main/java/org/apache/isis/applib/layout/common/HasCssClassFa.java
----------------------------------------------------------------------
diff --git a/core/applib/src/main/java/org/apache/isis/applib/layout/common/HasCssClassFa.java b/core/applib/src/main/java/org/apache/isis/applib/layout/common/HasCssClassFa.java
new file mode 100644
index 0000000..763b8dd
--- /dev/null
+++ b/core/applib/src/main/java/org/apache/isis/applib/layout/common/HasCssClassFa.java
@@ -0,0 +1,16 @@
+package org.apache.isis.applib.layout.common;
+
+import javax.xml.bind.annotation.XmlAttribute;
+
+/**
+ * Created by Dan on 10/02/2016.
+ */
+public interface HasCssClassFa {
+    @XmlAttribute(required = false) String getCssClassFa();
+
+    void setCssClassFa(String cssClassFa);
+
+    @XmlAttribute(required = false) org.apache.isis.applib.annotation.ActionLayout.CssClassFaPosition getCssClassFaPosition();
+
+    void setCssClassFaPosition(org.apache.isis.applib.annotation.ActionLayout.CssClassFaPosition cssClassFaPosition);
+}

http://git-wip-us.apache.org/repos/asf/isis/blob/6053d1a8/core/applib/src/main/java/org/apache/isis/applib/layout/common/HasDescribedAs.java
----------------------------------------------------------------------
diff --git a/core/applib/src/main/java/org/apache/isis/applib/layout/common/HasDescribedAs.java b/core/applib/src/main/java/org/apache/isis/applib/layout/common/HasDescribedAs.java
new file mode 100644
index 0000000..f19c95a
--- /dev/null
+++ b/core/applib/src/main/java/org/apache/isis/applib/layout/common/HasDescribedAs.java
@@ -0,0 +1,12 @@
+package org.apache.isis.applib.layout.common;
+
+import javax.xml.bind.annotation.XmlElement;
+
+/**
+ * Created by Dan on 10/02/2016.
+ */
+public interface HasDescribedAs {
+    @XmlElement(required = false) String getDescribedAs();
+
+    void setDescribedAs(String describedAs);
+}

http://git-wip-us.apache.org/repos/asf/isis/blob/6053d1a8/core/applib/src/main/java/org/apache/isis/applib/layout/common/HasHidden.java
----------------------------------------------------------------------
diff --git a/core/applib/src/main/java/org/apache/isis/applib/layout/common/HasHidden.java b/core/applib/src/main/java/org/apache/isis/applib/layout/common/HasHidden.java
new file mode 100644
index 0000000..7953141
--- /dev/null
+++ b/core/applib/src/main/java/org/apache/isis/applib/layout/common/HasHidden.java
@@ -0,0 +1,14 @@
+package org.apache.isis.applib.layout.common;
+
+import javax.xml.bind.annotation.XmlAttribute;
+
+import org.apache.isis.applib.annotation.Where;
+
+/**
+ * Created by Dan on 10/02/2016.
+ */
+public interface HasHidden {
+    @XmlAttribute(required = false) Where getHidden();
+
+    void setHidden(Where hidden);
+}

http://git-wip-us.apache.org/repos/asf/isis/blob/6053d1a8/core/applib/src/main/java/org/apache/isis/applib/layout/common/HasNamed.java
----------------------------------------------------------------------
diff --git a/core/applib/src/main/java/org/apache/isis/applib/layout/common/HasNamed.java b/core/applib/src/main/java/org/apache/isis/applib/layout/common/HasNamed.java
new file mode 100644
index 0000000..4a29ee9
--- /dev/null
+++ b/core/applib/src/main/java/org/apache/isis/applib/layout/common/HasNamed.java
@@ -0,0 +1,17 @@
+package org.apache.isis.applib.layout.common;
+
+import javax.xml.bind.annotation.XmlAttribute;
+import javax.xml.bind.annotation.XmlElement;
+
+/**
+ * Created by Dan on 10/02/2016.
+ */
+public interface HasNamed {
+    @XmlElement(required = false) String getNamed();
+
+    void setNamed(String named);
+
+    @XmlAttribute(required = false) Boolean getNamedEscaped();
+
+    void setNamedEscaped(Boolean namedEscaped);
+}

http://git-wip-us.apache.org/repos/asf/isis/blob/6053d1a8/core/applib/src/main/java/org/apache/isis/applib/layout/common/MemberRegion.java
----------------------------------------------------------------------
diff --git a/core/applib/src/main/java/org/apache/isis/applib/layout/common/MemberRegion.java b/core/applib/src/main/java/org/apache/isis/applib/layout/common/MemberRegion.java
index daf4aed4..f335cde 100644
--- a/core/applib/src/main/java/org/apache/isis/applib/layout/common/MemberRegion.java
+++ b/core/applib/src/main/java/org/apache/isis/applib/layout/common/MemberRegion.java
@@ -27,7 +27,7 @@ package org.apache.isis.applib.layout.common;
  *     (containing a single collection and associated actions)
  * </p>
  */
-public interface MemberRegion extends Owned<MemberRegionOwner> {
+public interface MemberRegion<T extends MemberRegionOwner> extends Owned<T> {
 
 
 }

http://git-wip-us.apache.org/repos/asf/isis/blob/6053d1a8/core/applib/src/main/java/org/apache/isis/applib/layout/common/PropertyLayoutData.java
----------------------------------------------------------------------
diff --git a/core/applib/src/main/java/org/apache/isis/applib/layout/common/PropertyLayoutData.java b/core/applib/src/main/java/org/apache/isis/applib/layout/common/PropertyLayoutData.java
index 91e7ee0..9bbec66 100644
--- a/core/applib/src/main/java/org/apache/isis/applib/layout/common/PropertyLayoutData.java
+++ b/core/applib/src/main/java/org/apache/isis/applib/layout/common/PropertyLayoutData.java
@@ -45,7 +45,11 @@ import org.apache.isis.applib.annotation.Where;
                 , "metadataError"
         }
 )
-public class PropertyLayoutData implements ActionLayoutDataOwner, Serializable, Owned<FieldSet> {
+public class PropertyLayoutData
+        implements ActionLayoutDataOwner,
+                   Serializable,
+                   Owned<FieldSet>,
+                   HasCssClass, HasDescribedAs, HasHidden, HasNamed {
 
     private static final long serialVersionUID = 1L;
 
@@ -74,11 +78,13 @@ public class PropertyLayoutData implements ActionLayoutDataOwner, Serializable,
 
     private String cssClass;
 
+    @Override
     @XmlAttribute(required = false)
     public String getCssClass() {
         return cssClass;
     }
 
+    @Override
     public void setCssClass(String cssClass) {
         this.cssClass = cssClass;
     }
@@ -86,11 +92,13 @@ public class PropertyLayoutData implements ActionLayoutDataOwner, Serializable,
 
     private String describedAs;
 
+    @Override
     @XmlElement(required = false)
     public String getDescribedAs() {
         return describedAs;
     }
 
+    @Override
     public void setDescribedAs(String describedAs) {
         this.describedAs = describedAs;
     }
@@ -98,11 +106,13 @@ public class PropertyLayoutData implements ActionLayoutDataOwner, Serializable,
 
     private Where hidden;
 
+    @Override
     @XmlAttribute(required = false)
     public Where getHidden() {
         return hidden;
     }
 
+    @Override
     public void setHidden(Where hidden) {
         this.hidden = hidden;
     }
@@ -134,11 +144,13 @@ public class PropertyLayoutData implements ActionLayoutDataOwner, Serializable,
 
     private String named;
 
+    @Override
     @XmlElement(required = false)
     public String getNamed() {
         return named;
     }
 
+    @Override
     public void setNamed(String named) {
         this.named = named;
     }
@@ -146,11 +158,13 @@ public class PropertyLayoutData implements ActionLayoutDataOwner, Serializable,
 
     private Boolean namedEscaped;
 
+    @Override
     @XmlAttribute(required = false)
     public Boolean getNamedEscaped() {
         return namedEscaped;
     }
 
+    @Override
     public void setNamedEscaped(Boolean namedEscaped) {
         this.namedEscaped = namedEscaped;
     }

http://git-wip-us.apache.org/repos/asf/isis/blob/6053d1a8/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/members/cssclassfa/CssClassFaPosition.java
----------------------------------------------------------------------
diff --git a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/members/cssclassfa/CssClassFaPosition.java b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/members/cssclassfa/CssClassFaPosition.java
index 4692f6a..a08e4af 100644
--- a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/members/cssclassfa/CssClassFaPosition.java
+++ b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/members/cssclassfa/CssClassFaPosition.java
@@ -72,4 +72,28 @@ public enum CssClassFaPosition {
         }
         throw new IllegalArgumentException("not recognized: " + cssClassFaPosition);
     }
+    @Deprecated
+    public DomainObjectLayout.CssClassFaPosition toDomainObjectLayoutPosition() {
+        if (this == CssClassFaPosition.LEFT) {
+            return DomainObjectLayout.CssClassFaPosition.LEFT;
+        } else {
+            return DomainObjectLayout.CssClassFaPosition.RIGHT;
+        }
+    }
+    @Deprecated
+    public ViewModelLayout.CssClassFaPosition toViewModelLayoutPosition() {
+        if (this == CssClassFaPosition.LEFT) {
+            return ViewModelLayout.CssClassFaPosition.LEFT;
+        } else {
+            return ViewModelLayout.CssClassFaPosition.RIGHT;
+        }
+    }
+    @Deprecated
+    public ActionLayout.CssClassFaPosition toActionLayoutPosition() {
+        if (this == CssClassFaPosition.LEFT) {
+            return ActionLayout.CssClassFaPosition.LEFT;
+        } else {
+            return ActionLayout.CssClassFaPosition.RIGHT;
+        }
+    }
 }

http://git-wip-us.apache.org/repos/asf/isis/blob/6053d1a8/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 79d3548..3c38356 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
@@ -17,6 +17,7 @@
 package org.apache.isis.core.metamodel.services.grid;
 
 import java.util.Collection;
+import java.util.Comparator;
 import java.util.List;
 import java.util.Map;
 
@@ -30,22 +31,30 @@ import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
 import org.apache.isis.applib.DomainObjectContainer;
+import org.apache.isis.applib.annotation.ActionLayout;
+import org.apache.isis.applib.annotation.BookmarkPolicy;
+import org.apache.isis.applib.annotation.LabelPosition;
 import org.apache.isis.applib.annotation.Programmatic;
-import org.apache.isis.applib.services.layout.GridNormalizerService;
+import org.apache.isis.applib.annotation.Where;
 import org.apache.isis.applib.layout.common.ActionLayoutData;
 import org.apache.isis.applib.layout.common.ActionLayoutDataOwner;
 import org.apache.isis.applib.layout.common.CollectionLayoutData;
+import org.apache.isis.applib.layout.common.DomainObjectLayoutData;
 import org.apache.isis.applib.layout.common.FieldSet;
 import org.apache.isis.applib.layout.common.Grid;
+import org.apache.isis.applib.layout.common.HasBookmarking;
+import org.apache.isis.applib.layout.common.HasCssClass;
+import org.apache.isis.applib.layout.common.HasCssClassFa;
+import org.apache.isis.applib.layout.common.HasDescribedAs;
+import org.apache.isis.applib.layout.common.HasHidden;
+import org.apache.isis.applib.layout.common.HasNamed;
 import org.apache.isis.applib.layout.common.MemberRegionOwner;
 import org.apache.isis.applib.layout.common.PropertyLayoutData;
-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.applib.services.i18n.TranslationService;
 import org.apache.isis.applib.services.jaxb.JaxbService;
+import org.apache.isis.applib.services.layout.GridNormalizerService;
 import org.apache.isis.core.metamodel.facetapi.Facet;
+import org.apache.isis.core.metamodel.facetapi.FacetHolder;
 import org.apache.isis.core.metamodel.facetapi.FacetUtil;
 import org.apache.isis.core.metamodel.facets.actions.layout.ActionPositionFacetForActionXml;
 import org.apache.isis.core.metamodel.facets.actions.layout.BookmarkPolicyFacetForActionXml;
@@ -54,6 +63,11 @@ import org.apache.isis.core.metamodel.facets.actions.layout.CssClassFacetForActi
 import org.apache.isis.core.metamodel.facets.actions.layout.DescribedAsFacetForActionXml;
 import org.apache.isis.core.metamodel.facets.actions.layout.HiddenFacetForActionLayoutXml;
 import org.apache.isis.core.metamodel.facets.actions.layout.NamedFacetForActionXml;
+import org.apache.isis.core.metamodel.facets.actions.position.ActionPositionFacet;
+import org.apache.isis.core.metamodel.facets.all.describedas.DescribedAsFacet;
+import org.apache.isis.core.metamodel.facets.all.hide.HiddenFacet;
+import org.apache.isis.core.metamodel.facets.all.named.NamedFacet;
+import org.apache.isis.core.metamodel.facets.collections.collection.defaultview.DefaultViewFacet;
 import org.apache.isis.core.metamodel.facets.collections.layout.CssClassFacetForCollectionXml;
 import org.apache.isis.core.metamodel.facets.collections.layout.DefaultViewFacetForCollectionXml;
 import org.apache.isis.core.metamodel.facets.collections.layout.DescribedAsFacetForCollectionXml;
@@ -61,7 +75,18 @@ import org.apache.isis.core.metamodel.facets.collections.layout.HiddenFacetForCo
 import org.apache.isis.core.metamodel.facets.collections.layout.NamedFacetForCollectionXml;
 import org.apache.isis.core.metamodel.facets.collections.layout.PagedFacetForCollectionXml;
 import org.apache.isis.core.metamodel.facets.collections.layout.SortedByFacetForCollectionXml;
+import org.apache.isis.core.metamodel.facets.collections.sortedby.SortedByFacet;
+import org.apache.isis.core.metamodel.facets.members.cssclass.CssClassFacet;
+import org.apache.isis.core.metamodel.facets.members.cssclassfa.CssClassFaFacet;
+import org.apache.isis.core.metamodel.facets.members.cssclassfa.CssClassFaPosition;
 import org.apache.isis.core.metamodel.facets.members.order.annotprop.MemberOrderFacetXml;
+import org.apache.isis.core.metamodel.facets.object.bookmarkpolicy.BookmarkPolicyFacet;
+import org.apache.isis.core.metamodel.facets.object.paged.PagedFacet;
+import org.apache.isis.core.metamodel.facets.object.plural.PluralFacet;
+import org.apache.isis.core.metamodel.facets.objectvalue.labelat.LabelAtFacet;
+import org.apache.isis.core.metamodel.facets.objectvalue.multiline.MultiLineFacet;
+import org.apache.isis.core.metamodel.facets.objectvalue.renderedadjusted.RenderedAdjustedFacet;
+import org.apache.isis.core.metamodel.facets.objectvalue.typicallen.TypicalLengthFacet;
 import org.apache.isis.core.metamodel.facets.properties.propertylayout.CssClassFacetForPropertyXml;
 import org.apache.isis.core.metamodel.facets.properties.propertylayout.DescribedAsFacetForPropertyXml;
 import org.apache.isis.core.metamodel.facets.properties.propertylayout.HiddenFacetForPropertyXml;
@@ -70,6 +95,10 @@ 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;
@@ -150,15 +179,273 @@ public abstract class GridNormalizerServiceAbstract<G extends Grid>
     @Programmatic
     @Override
     public void complete(final G grid, final Class<?> domainClass) {
-        // TODO: do some different logic here...
         normalize(grid, domainClass);
+        final ObjectSpecification objectSpec = specificationLookup.loadSpecification(domainClass);
+
+        grid.visit(new FCGrid.VisitorAdapter() {
+            @Override
+            public void visit(final ActionLayoutData actionLayoutData) {
+                final ObjectAction objectAction = objectSpec.getObjectAction(actionLayoutData.getId());
+
+                setBookmarkingIfAny(actionLayoutData, objectAction);
+                setCssClassIfAny(actionLayoutData, objectAction);
+                setCssClassFaIfAny(actionLayoutData, objectAction);
+                setDescribedAsIfAny(actionLayoutData, objectAction);
+                setHiddenIfAny(actionLayoutData, objectAction);
+                setNamedIfAny(actionLayoutData, objectAction);
+                setActionPositionIfAny(actionLayoutData, objectAction);
+            }
+
+            @Override
+            public void visit(final CollectionLayoutData collectionLayoutData) {
+                final ObjectAssociation collection = objectSpec.getAssociation(collectionLayoutData.getId());
+
+                setCssClassIfAny(collectionLayoutData, collection);
+                setDefaultViewIfAny(collectionLayoutData, collection);
+                setDescribedAsIfAny(collectionLayoutData, collection);
+                setHiddenIfAny(collectionLayoutData, collection);
+                setNamedIfAny(collectionLayoutData, collection);
+                setPagedIfAny(collectionLayoutData, collection);
+                setSortedByIfAny(collectionLayoutData, collection);
+            }
+
+            @Override
+            public void visit(final PropertyLayoutData propertyLayoutData) {
+                final ObjectAssociation property = objectSpec.getAssociation(propertyLayoutData.getId());
+
+                setCssClassIfAny(propertyLayoutData, property);
+                setDescribedAsIfAny(propertyLayoutData, property);
+                setHiddenIfAny(propertyLayoutData, property);
+                setNamedIfAny(propertyLayoutData, property);
+                setLabelPositionIfAny(propertyLayoutData, property);
+                setMultiLineIfAny(propertyLayoutData, property);
+                setRenderedAsDayBeforeIfAny(propertyLayoutData, property);
+                setTypicalLengthIfAny(propertyLayoutData, property);
+            }
+
+            @Override
+            public void visit(final DomainObjectLayoutData domainObjectLayoutData) {
+                setBookmarkingIfAny(domainObjectLayoutData, objectSpec);
+                setCssClassIfAny(domainObjectLayoutData, objectSpec);
+                setCssClassFaIfAny(domainObjectLayoutData, objectSpec);
+                setDescribedAsIfAny(domainObjectLayoutData, objectSpec);
+                setNamedIfAny(domainObjectLayoutData, objectSpec);
+                setPluralIfAny(domainObjectLayoutData, objectSpec);
+            }
+        });
+    }
+
+    private static boolean isDoOp(final Facet facet) {
+        return facet != null && !facet.isNoop();
+    }
+
+    protected void setBookmarkingIfAny(
+            final HasBookmarking hasBookmarking,
+            final FacetHolder facetHolder) {
+        final BookmarkPolicyFacet bookmarkPolicyFacet = facetHolder.getFacet(BookmarkPolicyFacet.class);
+        if(isDoOp(bookmarkPolicyFacet)) {
+            final BookmarkPolicy bookmarking = bookmarkPolicyFacet.value();
+            if(bookmarking != null) {
+                hasBookmarking.setBookmarking(bookmarking);
+            }
+        }
+    }
+
+    protected void setCssClassIfAny(
+            final HasCssClass hasCssClass,
+            final FacetHolder facetHolder) {
+        final CssClassFacet cssClassFacet = facetHolder.getFacet(CssClassFacet.class);
+        if(isDoOp(cssClassFacet)) {
+            try {
+                // try...finally because CSS class may vary by object, and we pass in only null
+                final String cssClass = cssClassFacet.cssClass(null);
+                if(!Strings.isNullOrEmpty(cssClass)) {
+                    hasCssClass.setCssClass(cssClass);
+                }
+            } catch(Exception ignore) {
+                // ignore
+            }
+        }
+    }
+
+    protected void setCssClassFaIfAny(
+            final HasCssClassFa hasCssClassFa,
+            final FacetHolder facetHolder) {
+        final CssClassFaFacet cssClassFaFacet = facetHolder.getFacet(CssClassFaFacet.class);
+        if (isDoOp(cssClassFaFacet)) {
+            final String cssClassFa = cssClassFaFacet.value();
+            final CssClassFaPosition position = cssClassFaFacet.getPosition();
+            if(!Strings.isNullOrEmpty(cssClassFa)) {
+                hasCssClassFa.setCssClassFa(cssClassFa);
+                hasCssClassFa.setCssClassFaPosition(position.toActionLayoutPosition());
+            }
+        }
+    }
+
+    protected void setDefaultViewIfAny(
+            final CollectionLayoutData collectionLayoutData,
+            final FacetHolder facetHolder) {
+        final DefaultViewFacet defaultViewFacet = facetHolder.getFacet(DefaultViewFacet.class);
+        if(isDoOp(defaultViewFacet)) {
+            final String defaultView = defaultViewFacet.value();
+            if(!Strings.isNullOrEmpty(defaultView)) {
+                collectionLayoutData.setDefaultView(defaultView);
+            }
+        }
+    }
+
+    protected void setDescribedAsIfAny(
+            final HasDescribedAs hasDescribedAs,
+            final FacetHolder facetHolder) {
+        final DescribedAsFacet describedAsFacet = facetHolder.getFacet(DescribedAsFacet.class);
+        if(isDoOp(describedAsFacet)) {
+            final String describedAs = describedAsFacet.value();
+            if(!Strings.isNullOrEmpty(describedAs)) {
+                hasDescribedAs.setDescribedAs(describedAs);
+            }
+        }
     }
 
+    protected void setHiddenIfAny(
+            final HasHidden hasHidden,
+            final FacetHolder facetHolder) {
+        final HiddenFacet hiddenFacet = facetHolder.getFacet(HiddenFacet.class);
+        if (isDoOp(hiddenFacet)) {
+            final Where where = hiddenFacet.where();
+            if(where != null) {
+                hasHidden.setHidden(where);
+            }
+        }
+    }
+
+    protected void setLabelPositionIfAny(
+            final PropertyLayoutData propertyLayoutData,
+            final FacetHolder facetHolder) {
+        final LabelAtFacet labelAtFacet = facetHolder.getFacet(LabelAtFacet.class);
+        if(isDoOp(labelAtFacet)) {
+            final LabelPosition labelPosition = labelAtFacet.label();
+            if(labelPosition != null) {
+                propertyLayoutData.setLabelPosition(labelPosition);
+            }
+        }
+    }
+
+    protected void setMultiLineIfAny(
+            final PropertyLayoutData propertyLayoutData,
+            final FacetHolder facetHolder) {
+        final MultiLineFacet multiLineFacet = facetHolder.getFacet(MultiLineFacet.class);
+        if(isDoOp(multiLineFacet)) {
+            final int numberOfLines = multiLineFacet.numberOfLines();
+            if(numberOfLines > 0) {
+                propertyLayoutData.setMultiLine(numberOfLines);
+            }
+        }
+    }
+
+    protected void setNamedIfAny(
+            final HasNamed hasNamed,
+            final FacetHolder facetHolder) {
+        final NamedFacet namedFacet = facetHolder.getFacet(NamedFacet.class);
+        if(isDoOp(namedFacet)) {
+            final String named = namedFacet.value();
+            final boolean escaped = namedFacet.escaped();
+            if(!Strings.isNullOrEmpty(named)){
+                hasNamed.setNamed(named);
+                hasNamed.setNamedEscaped(escaped);
+            }
+        }
+    }
+
+    protected void setPagedIfAny(
+            final CollectionLayoutData collectionLayoutData,
+            final FacetHolder facetHolder) {
+        final PagedFacet pagedFacet = facetHolder.getFacet(PagedFacet.class);
+        if(isDoOp(pagedFacet)) {
+            final int value = pagedFacet.value();
+            if(value > 0) {
+                collectionLayoutData.setPaged(value);
+            }
+        }
+    }
+
+    protected void setPluralIfAny(
+            final DomainObjectLayoutData domainObjectLayoutData,
+            final FacetHolder facetHolder) {
+        final PluralFacet pluralFacet = facetHolder.getFacet(PluralFacet.class);
+        if(isDoOp(pluralFacet)) {
+            final String plural = pluralFacet.value();
+            if(!Strings.isNullOrEmpty(plural)) {
+                domainObjectLayoutData.setPlural(plural);
+            }
+        }
+    }
+
+
+    protected void setActionPositionIfAny(
+            final ActionLayoutData actionLayoutData,
+            final FacetHolder facetHolder) {
+        final ActionPositionFacet actionPositionFacet = facetHolder.getFacet(ActionPositionFacet.class);
+        if(isDoOp(actionPositionFacet)) {
+            final ActionLayout.Position position = actionPositionFacet.position();
+            if(position != null) {
+                actionLayoutData.setPosition(position);
+            }
+        }
+    }
+
+    protected void setRenderedAsDayBeforeIfAny(
+            final PropertyLayoutData propertyLayoutData,
+            final FacetHolder facetHolder) {
+        final RenderedAdjustedFacet renderedAdjustedFacet = facetHolder.getFacet(RenderedAdjustedFacet.class);
+        if(isDoOp(renderedAdjustedFacet)) {
+            final int adjusted = renderedAdjustedFacet.value();
+            propertyLayoutData.setRenderedAsDayBefore(adjusted != 0);
+        }
+    }
+
+    protected void setSortedByIfAny(
+            final CollectionLayoutData collectionLayoutData,
+            final FacetHolder facetHolder) {
+        final SortedByFacet sortedByFacet = facetHolder.getFacet(SortedByFacet.class);
+        if(isDoOp(sortedByFacet)) {
+            final Class<? extends Comparator<?>> className = sortedByFacet.value();
+            if(className != null) {
+                collectionLayoutData.setSortedBy(className.getCanonicalName());
+            }
+        }
+    }
+
+    protected void setTypicalLengthIfAny(
+            final PropertyLayoutData propertyLayoutData,
+            final FacetHolder facetHolder) {
+        final TypicalLengthFacet typicalLengthFacet = facetHolder.getFacet(TypicalLengthFacet.class);
+        if(isDoOp(typicalLengthFacet)) {
+            final int typicalLength = typicalLengthFacet.value();
+            if(typicalLength > 0) {
+                propertyLayoutData.setTypicalLength(typicalLength);
+            }
+        }
+    }
+
+
     @Programmatic
     @Override
     public void minimal(final G grid, final Class<?> domainClass) {
-        // TODO: do some different logic here...
         normalize(grid, domainClass);
+        grid.visit(new FCGrid.VisitorAdapter() {
+            @Override
+            public void visit(final ActionLayoutData actionLayoutData) {
+                actionLayoutData.getOwner().getActions().remove(actionLayoutData);
+            }
+
+            @Override public void visit(final CollectionLayoutData collectionLayoutData) {
+                collectionLayoutData.getOwner().getCollections().remove(this);
+            }
+
+            @Override public void visit(final PropertyLayoutData propertyLayoutData) {
+                propertyLayoutData.getOwner().getProperties().remove(this);
+            }
+        });
     }
     /**
      * Ensures that all object members (properties, collections and actions) are in the metadata.


[28/50] [abbrv] 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/master
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();
+
         }
 
 


[13/50] [abbrv] isis git commit: ISIS-993: guard against invisible actions corresponding to null links.

Posted by da...@apache.org.
ISIS-993: guard against invisible actions corresponding to null links.


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

Branch: refs/heads/master
Commit: bbd593bc10ab486aad16cc7eff6dd3b2e06a0222
Parents: 959d424
Author: Dan Haywood <da...@haywood-associates.co.uk>
Authored: Thu Feb 11 10:08:59 2016 +0000
Committer: Dan Haywood <da...@haywood-associates.co.uk>
Committed: Thu Feb 11 10:08:59 2016 +0000

----------------------------------------------------------------------
 .../entityactions/EntityActionUtil.java         | 24 ++++++++++++++------
 1 file changed, 17 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/isis/blob/bbd593bc/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/actionmenu/entityactions/EntityActionUtil.java
----------------------------------------------------------------------
diff --git a/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/actionmenu/entityactions/EntityActionUtil.java b/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/actionmenu/entityactions/EntityActionUtil.java
index de6e2ca..efa53f6 100644
--- a/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/actionmenu/entityactions/EntityActionUtil.java
+++ b/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/actionmenu/entityactions/EntityActionUtil.java
@@ -22,6 +22,8 @@ import java.util.Collections;
 import java.util.Comparator;
 import java.util.List;
 import com.google.common.base.Function;
+import com.google.common.base.Predicates;
+import com.google.common.collect.FluentIterable;
 import com.google.common.collect.Lists;
 import org.apache.wicket.Session;
 import org.apache.isis.applib.annotation.Where;
@@ -107,6 +109,11 @@ public final class EntityActionUtil {
      * Converts an {@link org.apache.isis.viewer.wicket.model.models.EntityModel} and a (subset of its) {@link org.apache.isis.core.metamodel.spec.feature.ObjectAction}s into a
      * list of {@link org.apache.isis.viewer.wicket.model.links.LinkAndLabel}s intended to be apassed
      * to the {@link AdditionalLinksPanel}.
+     *
+     * <p>
+     *     The length of the list returned may smaller than the inbound actions; any null links
+     *     (for invisible actions) will be discarded.
+     * </p>
      */
     public static List<LinkAndLabel> asLinkAndLabelsForAdditionalLinksPanel(
             final EntityModel entityModel,
@@ -116,13 +123,16 @@ public final class EntityActionUtil {
         final ActionLinkFactory linkFactory = new EntityActionLinkFactory(entityModel);
 
         final ObjectAdapterMemento adapterMemento = entityModel.getObjectAdapterMemento();
-        return Lists.transform(actions, new Function<ObjectAction, LinkAndLabel>() {
-
-            @Override
-            public LinkAndLabel apply(ObjectAction objectAction) {
-                return linkFactory.newLink(linkId, adapterMemento, objectAction);
-            }
-        });
+        return FluentIterable.from(actions)
+                .transform(new Function<ObjectAction, LinkAndLabel>() {
+
+                    @Override
+                    public LinkAndLabel apply(ObjectAction objectAction) {
+                        return linkFactory.newLink(linkId, adapterMemento, objectAction);
+                    }
+                })
+                .filter(Predicates.<LinkAndLabel>notNull())
+                .toList();
     }
 
     private static List<ObjectAction> addActions(


[31/50] [abbrv] 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/master
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);
     }
 
 }


[33/50] [abbrv] 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/master
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();
         }


[32/50] [abbrv] 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/master
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;


[43/50] [abbrv] isis git commit: ISIS-993: only include entities and view models' layouts in zip file from MetadataMenu#downloadLayouts (XML)

Posted by da...@apache.org.
ISIS-993: only include entities and view models' layouts in zip file from MetadataMenu#downloadLayouts (XML)


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

Branch: refs/heads/master
Commit: 2c62912527240861e2d26bbfac470f06dde70111
Parents: bf1288c
Author: Dan Haywood <da...@haywood-associates.co.uk>
Authored: Wed Mar 2 18:12:20 2016 +0000
Committer: Dan Haywood <da...@haywood-associates.co.uk>
Committed: Wed Mar 2 18:12:20 2016 +0000

----------------------------------------------------------------------
 .../services/metamodel/MetadataMenu.java         | 19 +++++++++++++++----
 1 file changed, 15 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/isis/blob/2c629125/core/metamodel/src/main/java/org/apache/isis/core/metamodel/services/metamodel/MetadataMenu.java
----------------------------------------------------------------------
diff --git a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/services/metamodel/MetadataMenu.java b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/services/metamodel/MetadataMenu.java
index 2872f1e..bcec6c9 100644
--- a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/services/metamodel/MetadataMenu.java
+++ b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/services/metamodel/MetadataMenu.java
@@ -27,9 +27,11 @@ import java.util.zip.ZipOutputStream;
 import javax.activation.MimeType;
 import javax.activation.MimeTypeParseException;
 import javax.inject.Inject;
+import javax.xml.bind.Marshaller;
 
 import com.google.common.base.Predicate;
 import com.google.common.collect.Collections2;
+import com.google.common.collect.ImmutableMap;
 
 import org.apache.isis.applib.FatalException;
 import org.apache.isis.applib.IsisApplibModule;
@@ -46,9 +48,11 @@ import org.apache.isis.applib.layout.component.Grid;
 import org.apache.isis.applib.services.jaxb.JaxbService;
 import org.apache.isis.applib.services.layout.GridService;
 import org.apache.isis.applib.value.Blob;
+import org.apache.isis.core.metamodel.facets.object.viewmodel.ViewModelFacet;
 import org.apache.isis.core.metamodel.spec.ObjectSpecification;
 import org.apache.isis.core.metamodel.spec.SpecificationLoaderSpi;
 import org.apache.isis.core.metamodel.spec.SpecificationLoaderSpiAware;
+import org.apache.isis.objectstore.jdo.metamodel.facets.object.persistencecapable.JdoPersistenceCapableFacet;
 
 @DomainService(
         nature = NatureOfService.VIEW_MENU_ONLY
@@ -99,9 +103,8 @@ public class MetadataMenu implements SpecificationLoaderSpiAware {
                     @Override
                     public boolean apply(final ObjectSpecification input) {
                         return  !input.isAbstract() &&
-                                !input.isService() &&
-                                !input.isValue() &&
-                                !input.isParentedOrFreeCollection();
+                                (input.containsDoOpFacet(JdoPersistenceCapableFacet.class) ||
+                                 input.containsDoOpFacet(ViewModelFacet.class));
                     }});
         try {
             final ByteArrayOutputStream baos = new ByteArrayOutputStream();
@@ -112,7 +115,11 @@ public class MetadataMenu implements SpecificationLoaderSpiAware {
                 final Grid grid = gridService.toGrid(domainClass, style);
                 if(grid != null) {
                     zos.putNextEntry(new ZipEntry(zipEntryNameFor(objectSpec)));
-                    String xml = jaxbService.toXml(grid);
+                    final String xml = jaxbService.toXml(grid,
+                            ImmutableMap.<String,Object>of(
+                                    Marshaller.JAXB_SCHEMA_LOCATION,
+                                    gridService.tnsAndSchemaLocation(grid)
+                            ));
                     writer.write(xml);
                     writer.flush();
                     zos.closeEntry();
@@ -126,6 +133,10 @@ public class MetadataMenu implements SpecificationLoaderSpiAware {
         }
     }
 
+    public GridService.Style default0DownloadLayouts() {
+        return GridService.Style.NORMALIZED;
+    }
+
     private static String zipEntryNameFor(final ObjectSpecification objectSpec) {
         final String fqn = objectSpec.getFullIdentifier();
         return fqn.replace(".", File.separator)+".layout.xml";


[30/50] [abbrv] 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/master
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;
+}
+


[47/50] [abbrv] isis git commit: ISIS-993: updating javadoc is all.

Posted by da...@apache.org.
ISIS-993: updating javadoc is all.


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

Branch: refs/heads/master
Commit: f763fce110a8bc40c49e5d38fd9b5f63aa4aaf0e
Parents: 2c960ca
Author: Dan Haywood <da...@haywood-associates.co.uk>
Authored: Thu Mar 3 15:55:01 2016 +0000
Committer: Dan Haywood <da...@haywood-associates.co.uk>
Committed: Thu Mar 3 15:55:01 2016 +0000

----------------------------------------------------------------------
 .../applib/layout/grid/bootstrap3/BS3ClearFixHidden.java     | 8 ++++++++
 .../applib/layout/grid/bootstrap3/BS3ClearFixVisible.java    | 8 ++++++++
 2 files changed, 16 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/isis/blob/f763fce1/core/applib/src/main/java/org/apache/isis/applib/layout/grid/bootstrap3/BS3ClearFixHidden.java
----------------------------------------------------------------------
diff --git a/core/applib/src/main/java/org/apache/isis/applib/layout/grid/bootstrap3/BS3ClearFixHidden.java b/core/applib/src/main/java/org/apache/isis/applib/layout/grid/bootstrap3/BS3ClearFixHidden.java
index 817b685..407fe0f 100644
--- a/core/applib/src/main/java/org/apache/isis/applib/layout/grid/bootstrap3/BS3ClearFixHidden.java
+++ b/core/applib/src/main/java/org/apache/isis/applib/layout/grid/bootstrap3/BS3ClearFixHidden.java
@@ -21,6 +21,14 @@ package org.apache.isis.applib.layout.grid.bootstrap3;
 import javax.xml.bind.annotation.XmlRootElement;
 import javax.xml.bind.annotation.XmlType;
 
+/**
+ * One of the <a href="http://getbootstrap.com/css/#responsive-utilities">Responsive utility classes</a>.
+ *
+ *
+ * <p>
+ *     It is rendered as a (eg) &lt;div class=&quot;clearfix hidden-xs ...&quot;&gt;
+ * </p>
+ */
 @XmlRootElement(
         name = "clearFixHidden"
 )

http://git-wip-us.apache.org/repos/asf/isis/blob/f763fce1/core/applib/src/main/java/org/apache/isis/applib/layout/grid/bootstrap3/BS3ClearFixVisible.java
----------------------------------------------------------------------
diff --git a/core/applib/src/main/java/org/apache/isis/applib/layout/grid/bootstrap3/BS3ClearFixVisible.java b/core/applib/src/main/java/org/apache/isis/applib/layout/grid/bootstrap3/BS3ClearFixVisible.java
index bb83ca5..5704680 100644
--- a/core/applib/src/main/java/org/apache/isis/applib/layout/grid/bootstrap3/BS3ClearFixVisible.java
+++ b/core/applib/src/main/java/org/apache/isis/applib/layout/grid/bootstrap3/BS3ClearFixVisible.java
@@ -22,6 +22,14 @@ import javax.xml.bind.annotation.XmlAttribute;
 import javax.xml.bind.annotation.XmlRootElement;
 import javax.xml.bind.annotation.XmlType;
 
+/**
+ * One of the <a href="http://getbootstrap.com/css/#responsive-utilities">Responsive utility classes</a>.
+ *
+ *
+ * <p>
+ *     It is rendered as a (eg) &lt;div class=&quot;clearfix visible-xs-block ...&quot;&gt;
+ * </p>
+ */
 @XmlRootElement(
         name = "clearFixVisible"
 )


[49/50] [abbrv] isis git commit: ISIS-1287: minor CSS fix for "are you sure" popup.

Posted by da...@apache.org.
ISIS-1287: minor CSS fix for "are you sure" popup.


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

Branch: refs/heads/master
Commit: b4adc4ff6c83bb02838852f325f1aa4ac04bc1b9
Parents: ff4d342
Author: Dan Haywood <da...@haywood-associates.co.uk>
Authored: Thu Mar 3 18:26:49 2016 +0000
Committer: Dan Haywood <da...@haywood-associates.co.uk>
Committed: Thu Mar 3 18:26:49 2016 +0000

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


http://git-wip-us.apache.org/repos/asf/isis/blob/b4adc4ff/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 c23d4da..a799f0a 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
@@ -815,3 +815,9 @@ tr.headers th form input {
     margin-top: 5px;
 }
 
+
+.popover.confirmation .btn-group .btn {
+    width: 100%;
+    margin: 5px;
+    padding: 5px;
+}
\ No newline at end of file


[09/50] [abbrv] isis git commit: ISIS-993: moving around and renaming the applib schema files for layout

Posted by da...@apache.org.
http://git-wip-us.apache.org/repos/asf/isis/blob/67b6e05e/core/applib/src/main/java/org/apache/isis/applib/layout/bootstrap3/BS3Tab.java
----------------------------------------------------------------------
diff --git a/core/applib/src/main/java/org/apache/isis/applib/layout/bootstrap3/BS3Tab.java b/core/applib/src/main/java/org/apache/isis/applib/layout/bootstrap3/BS3Tab.java
deleted file mode 100644
index 100b8a3..0000000
--- a/core/applib/src/main/java/org/apache/isis/applib/layout/bootstrap3/BS3Tab.java
+++ /dev/null
@@ -1,177 +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.applib.layout.bootstrap3;
-
-import java.util.List;
-import java.util.concurrent.atomic.AtomicBoolean;
-
-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.common.ActionLayoutData;
-import org.apache.isis.applib.layout.common.CollectionLayoutData;
-import org.apache.isis.applib.layout.common.DomainObjectLayoutData;
-import org.apache.isis.applib.layout.common.PropertyLayoutData;
-
-/**
- * Represents a tab within a {@link BS3TabGroup tab group}.
- *
- * <p>
- *     They simply contain one or more {@link BS3Row row}s.
- * </p>
- */
-@XmlType(
-        name = "tab"
-        , propOrder = {
-            "name",
-            "rows"
-        }
-)
-public class BS3Tab extends BS3ElementAbstract implements BS3RowOwner {
-
-    private static final long serialVersionUID = 1L;
-
-    private String name;
-    @XmlAttribute(required = true)
-    public String getName() {
-        return name;
-    }
-
-    public void setName(final String name) {
-        this.name = name;
-    }
-
-
-    private List<BS3Row> rows = Lists.newArrayList();
-
-    // no wrapper
-    @XmlElement(name = "row", required = true)
-    public List<BS3Row> getRows() {
-        return rows;
-    }
-
-    public void setRows(final List<BS3Row> rows) {
-        this.rows = rows;
-    }
-
-
-
-    private BS3TabOwner owner;
-
-    /**
-     * Owner.
-     *
-     * <p>
-     *     Set programmatically by framework after reading in from XML.
-     * </p>
-     */
-    @XmlTransient
-    public BS3TabOwner getOwner() {
-        return owner;
-    }
-
-    public void setOwner(final BS3TabOwner owner) {
-        this.owner = owner;
-    }
-
-
-    public static class Predicates {
-        public static Predicate<BS3Tab> notEmpty() {
-            final AtomicBoolean visitingTheNode = new AtomicBoolean(false);
-            final AtomicBoolean foundContent = new AtomicBoolean(false);
-
-            return new Predicate<BS3Tab>() {
-                @Override
-                public boolean apply(final BS3Tab thisBs3Tab) {
-                    final BS3Grid owningGrid = thisBs3Tab.getGrid();
-                    owningGrid.visit(new BS3Grid.VisitorAdapter() {
-
-                        /**
-                         * if found the tab, then reset 'foundContent' to false, and then use 'visitingTheNode' as
-                         * a marker to indicate that the visitor is now being passed to the nodes underneath the tab.
-                         * In those children, if visited (with the 'visitingTheNode' flag enabled), then simply set the
-                         * 'foundContent' flag.
-                         */
-                        @Override
-                        public void preVisit(final BS3Tab bs3Tab) {
-                            if(bs3Tab == thisBs3Tab) {
-                                foundContent.set(false);
-                                visitingTheNode.set(true);
-                            }
-                        }
-
-                        @Override public void postVisit(final BS3Tab bs3Tab) {
-                            if(bs3Tab == thisBs3Tab) {
-                                visitingTheNode.set(false);
-                            }
-                        }
-
-                        @Override
-                        public void visit(final DomainObjectLayoutData domainObjectLayoutData) {
-                            if(visitingTheNode.get()) {
-                                foundContent.set(true);
-                            }
-                        }
-
-                        @Override
-                        public void visit(final ActionLayoutData actionLayoutData) {
-                            if(visitingTheNode.get()) {
-                                foundContent.set(true);
-                            }
-                        }
-
-                        @Override
-                        public void visit(final PropertyLayoutData propertyLayoutData) {
-                            if(visitingTheNode.get()) {
-                                foundContent.set(true);
-                            }
-                        }
-
-                        @Override
-                        public void visit(final CollectionLayoutData collectionLayoutData) {
-                            if(visitingTheNode.get()) {
-                                foundContent.set(true);
-                            }
-                        }
-                    });
-                    return foundContent.get();
-                }
-            };
-        }
-    }
-
-    @Override
-    @XmlTransient
-    @Programmatic
-    public BS3Grid getGrid() {
-        return getOwner().getGrid();
-    }
-
-    @Override public String toString() {
-        return "BS3Tab{" +
-                "name='" + name + '\'' +
-                '}';
-    }
-}

http://git-wip-us.apache.org/repos/asf/isis/blob/67b6e05e/core/applib/src/main/java/org/apache/isis/applib/layout/bootstrap3/BS3TabGroup.java
----------------------------------------------------------------------
diff --git a/core/applib/src/main/java/org/apache/isis/applib/layout/bootstrap3/BS3TabGroup.java b/core/applib/src/main/java/org/apache/isis/applib/layout/bootstrap3/BS3TabGroup.java
deleted file mode 100644
index e10fa63..0000000
--- a/core/applib/src/main/java/org/apache/isis/applib/layout/bootstrap3/BS3TabGroup.java
+++ /dev/null
@@ -1,123 +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.applib.layout.bootstrap3;
-
-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.collect.Lists;
-
-import org.apache.isis.applib.annotation.Programmatic;
-
-/**
- * Represents a tab group containing one or more {@link BS3Tab tab}s.
- */
-@XmlType(
-        name = "tabGroup"
-        , propOrder = {
-            "tabs",
-            "metadataError"
-        }
-)
-public class BS3TabGroup extends BS3ElementAbstract implements BS3TabOwner {
-
-    private static final long serialVersionUID = 1L;
-
-
-
-    private Boolean unreferencedCollections;
-    /**
-     * Whether this tab group should be used to hold any unreferenced collections (contributed or &quot;native&quot;).
-     *
-     * <p>
-     *     Any layout must have precisely one tab group or {@link BS3Col col} that has this attribute set.
-     * </p>
-     */
-    @XmlAttribute(required = false)
-    public Boolean isUnreferencedCollections() {
-        return unreferencedCollections;
-    }
-
-    public void setUnreferencedCollections(final Boolean unreferencedCollections) {
-        this.unreferencedCollections = unreferencedCollections;
-    }
-
-
-
-
-    private List<BS3Tab> tabs = Lists.newArrayList();
-
-    // no wrapper; required=false because may be auto-generated
-    @XmlElement(name = "tab", required = false)
-    public List<BS3Tab> getTabs() {
-        return tabs;
-    }
-
-    public void setTabs(final List<BS3Tab> tabs) {
-        this.tabs = tabs;
-    }
-
-
-    private BS3TabGroupOwner owner;
-
-    /**
-     * Owner.
-     *
-     * <p>
-     *     Set programmatically by framework after reading in from XML.
-     * </p>
-     */
-    @XmlTransient
-    public BS3TabGroupOwner getOwner() {
-        return owner;
-    }
-
-    public void setOwner(final BS3TabGroupOwner owner) {
-        this.owner = owner;
-    }
-
-
-
-    private String metadataError;
-
-    /**
-     * For diagnostics; populated by the framework if and only if a metadata error.
-     */
-    @XmlElement(required = false)
-    public String getMetadataError() {
-        return metadataError;
-    }
-
-    public void setMetadataError(final String metadataError) {
-        this.metadataError = metadataError;
-    }
-
-    @Override
-    @XmlTransient
-    @Programmatic
-    public BS3Grid getGrid() {
-        return getOwner().getGrid();
-    }
-
-}
-

http://git-wip-us.apache.org/repos/asf/isis/blob/67b6e05e/core/applib/src/main/java/org/apache/isis/applib/layout/bootstrap3/BS3TabGroupOwner.java
----------------------------------------------------------------------
diff --git a/core/applib/src/main/java/org/apache/isis/applib/layout/bootstrap3/BS3TabGroupOwner.java b/core/applib/src/main/java/org/apache/isis/applib/layout/bootstrap3/BS3TabGroupOwner.java
deleted file mode 100644
index 24b6b0e..0000000
--- a/core/applib/src/main/java/org/apache/isis/applib/layout/bootstrap3/BS3TabGroupOwner.java
+++ /dev/null
@@ -1,28 +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.applib.layout.bootstrap3;
-
-import java.util.List;
-
-import org.apache.isis.applib.layout.common.Owner;
-
-public interface BS3TabGroupOwner extends Owner, WithinGrid {
-
-    List<BS3TabGroup> getTabGroups();
-}

http://git-wip-us.apache.org/repos/asf/isis/blob/67b6e05e/core/applib/src/main/java/org/apache/isis/applib/layout/bootstrap3/BS3TabOwner.java
----------------------------------------------------------------------
diff --git a/core/applib/src/main/java/org/apache/isis/applib/layout/bootstrap3/BS3TabOwner.java b/core/applib/src/main/java/org/apache/isis/applib/layout/bootstrap3/BS3TabOwner.java
deleted file mode 100644
index ebcb4ae..0000000
--- a/core/applib/src/main/java/org/apache/isis/applib/layout/bootstrap3/BS3TabOwner.java
+++ /dev/null
@@ -1,28 +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.applib.layout.bootstrap3;
-
-import java.util.List;
-
-import org.apache.isis.applib.layout.common.Owner;
-
-public interface BS3TabOwner extends Owner, WithinGrid {
-
-    List<BS3Tab> getTabs();
-}

http://git-wip-us.apache.org/repos/asf/isis/blob/67b6e05e/core/applib/src/main/java/org/apache/isis/applib/layout/bootstrap3/HasCssId.java
----------------------------------------------------------------------
diff --git a/core/applib/src/main/java/org/apache/isis/applib/layout/bootstrap3/HasCssId.java b/core/applib/src/main/java/org/apache/isis/applib/layout/bootstrap3/HasCssId.java
deleted file mode 100644
index e671d5b..0000000
--- a/core/applib/src/main/java/org/apache/isis/applib/layout/bootstrap3/HasCssId.java
+++ /dev/null
@@ -1,28 +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.applib.layout.bootstrap3;
-
-public interface HasCssId {
-
-    /**
-     * As per &lt;div id=&quot;...&quot;&gt;...&lt;/div&gt; : must be unique across entire page.
-     */
-    String getId();
-
-}

http://git-wip-us.apache.org/repos/asf/isis/blob/67b6e05e/core/applib/src/main/java/org/apache/isis/applib/layout/bootstrap3/WithinGrid.java
----------------------------------------------------------------------
diff --git a/core/applib/src/main/java/org/apache/isis/applib/layout/bootstrap3/WithinGrid.java b/core/applib/src/main/java/org/apache/isis/applib/layout/bootstrap3/WithinGrid.java
deleted file mode 100644
index ac3faa5..0000000
--- a/core/applib/src/main/java/org/apache/isis/applib/layout/bootstrap3/WithinGrid.java
+++ /dev/null
@@ -1,27 +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.applib.layout.bootstrap3;
-
-import org.apache.isis.applib.annotation.Programmatic;
-
-public interface WithinGrid {
-
-    @Programmatic
-    BS3Grid getGrid();
-}

http://git-wip-us.apache.org/repos/asf/isis/blob/67b6e05e/core/applib/src/main/java/org/apache/isis/applib/layout/bootstrap3/package-info.java
----------------------------------------------------------------------
diff --git a/core/applib/src/main/java/org/apache/isis/applib/layout/bootstrap3/package-info.java b/core/applib/src/main/java/org/apache/isis/applib/layout/bootstrap3/package-info.java
deleted file mode 100644
index 751f620..0000000
--- a/core/applib/src/main/java/org/apache/isis/applib/layout/bootstrap3/package-info.java
+++ /dev/null
@@ -1,34 +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.
- */
-
-/**
- * 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 modelled closely after <a href="http://getbootstrap.com/">Bootstrap</a>, and is intended to
- *     support the grid layouts implemented by that CSS framework.  This flexibility comes at the cost of some
- *     verbosity.
- * </p>
- */
-@javax.xml.bind.annotation.XmlSchema(
-        namespace = "http://isis.apache.org/schema/applib/layout/bootstrap3",
-        elementFormDefault = javax.xml.bind.annotation.XmlNsForm.QUALIFIED
-)
-package org.apache.isis.applib.layout.bootstrap3;
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/isis/blob/67b6e05e/core/applib/src/main/java/org/apache/isis/applib/layout/common/ActionLayoutData.java
----------------------------------------------------------------------
diff --git a/core/applib/src/main/java/org/apache/isis/applib/layout/common/ActionLayoutData.java b/core/applib/src/main/java/org/apache/isis/applib/layout/common/ActionLayoutData.java
deleted file mode 100644
index 6bd4113..0000000
--- a/core/applib/src/main/java/org/apache/isis/applib/layout/common/ActionLayoutData.java
+++ /dev/null
@@ -1,253 +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.applib.layout.common;
-
-import java.io.Serializable;
-
-import javax.xml.bind.annotation.XmlAttribute;
-import javax.xml.bind.annotation.XmlElement;
-import javax.xml.bind.annotation.XmlRootElement;
-import javax.xml.bind.annotation.XmlTransient;
-import javax.xml.bind.annotation.XmlType;
-
-import org.apache.isis.applib.annotation.BookmarkPolicy;
-import org.apache.isis.applib.annotation.Where;
-
-/**
- * Describes the layout of a single action, broadly corresponding to {@link org.apache.isis.applib.annotation.ActionLayout}.
- *
- * <p>
- *  Note that {@link org.apache.isis.applib.annotation.ActionLayout#contributed()} is omitted because this only applies
- *  to domain services.
- * </p>
- */
-@XmlRootElement(
-        name = "action"
-)
-@XmlType(
-    name = "action"
-    , propOrder = {
-        "named"
-        , "describedAs"
-        , "metadataError"
-    }
-)
-public class ActionLayoutData implements Serializable, Owned<ActionLayoutDataOwner>, HasCssClass, HasCssClassFa,
-        HasDescribedAs, HasHidden, HasNamed, HasBookmarking {
-
-    private static final long serialVersionUID = 1L;
-
-    public ActionLayoutData() {
-    }
-    public ActionLayoutData(final String id) {
-        setId(id);
-    }
-
-    private String id;
-    /**
-     * Method name.
-     *
-     * <p>
-     *     Overloaded methods are not supported.
-     * </p>
-     */
-    @XmlAttribute(name="id", required = true)
-    public String getId() {
-        return id;
-    }
-
-    public void setId(String id) {
-        this.id = id;
-    }
-
-
-
-    private BookmarkPolicy bookmarking;
-
-    @Override
-    @XmlAttribute(required = false)
-    public BookmarkPolicy getBookmarking() {
-        return bookmarking;
-    }
-
-    @Override
-    public void setBookmarking(BookmarkPolicy bookmarking) {
-        this.bookmarking = bookmarking;
-    }
-
-
-    private String cssClass;
-
-    @Override
-    @XmlAttribute(required = false)
-    public String getCssClass() {
-        return cssClass;
-    }
-
-    @Override
-    public void setCssClass(String cssClass) {
-        this.cssClass = cssClass;
-    }
-
-
-    private String cssClassFa;
-
-    @Override
-    @XmlAttribute(required = false)
-    public String getCssClassFa() {
-        return cssClassFa;
-    }
-
-    @Override
-    public void setCssClassFa(String cssClassFa) {
-        this.cssClassFa = cssClassFa;
-    }
-
-
-
-    private org.apache.isis.applib.annotation.ActionLayout.CssClassFaPosition cssClassFaPosition;
-
-    @Override
-    @XmlAttribute(required = false)
-    public org.apache.isis.applib.annotation.ActionLayout.CssClassFaPosition getCssClassFaPosition() {
-        return cssClassFaPosition;
-    }
-
-    @Override
-    public void setCssClassFaPosition(org.apache.isis.applib.annotation.ActionLayout.CssClassFaPosition cssClassFaPosition) {
-        this.cssClassFaPosition = cssClassFaPosition;
-    }
-
-
-    private String describedAs;
-
-    @Override
-    @XmlElement(required = false)
-    public String getDescribedAs() {
-        return describedAs;
-    }
-
-    @Override
-    public void setDescribedAs(String describedAs) {
-        this.describedAs = describedAs;
-    }
-
-
-
-    private Where hidden;
-
-    @Override
-    @XmlAttribute(required = false)
-    public Where getHidden() {
-        return hidden;
-    }
-
-    @Override
-    public void setHidden(Where hidden) {
-        this.hidden = hidden;
-    }
-
-
-
-    private String named;
-
-    @Override
-    @XmlElement(required = false)
-    public String getNamed() {
-        return named;
-    }
-
-    @Override
-    public void setNamed(String named) {
-        this.named = named;
-    }
-
-
-
-    private Boolean namedEscaped;
-
-    @Override
-    @XmlAttribute(required = false)
-    public Boolean getNamedEscaped() {
-        return namedEscaped;
-    }
-
-    @Override
-    public void setNamedEscaped(Boolean namedEscaped) {
-        this.namedEscaped = namedEscaped;
-    }
-
-
-
-    private org.apache.isis.applib.annotation.ActionLayout.Position position;
-
-    @XmlAttribute(required = false)
-    public org.apache.isis.applib.annotation.ActionLayout.Position getPosition() {
-        return position;
-    }
-
-    public void setPosition(org.apache.isis.applib.annotation.ActionLayout.Position position) {
-        this.position = position;
-    }
-
-
-
-
-    private ActionLayoutDataOwner owner;
-    /**
-     * Owner.
-     *
-     * <p>
-     *     Set programmatically by framework after reading in from XML.
-     * </p>
-     */
-    @XmlTransient
-    public ActionLayoutDataOwner getOwner() {
-        return owner;
-    }
-
-    public void setOwner(final ActionLayoutDataOwner owner) {
-        this.owner = owner;
-    }
-
-
-    private String metadataError;
-
-    /**
-     * For diagnostics; populated by the framework if and only if a metadata error.
-     */
-    @XmlElement(required = false)
-    public String getMetadataError() {
-        return metadataError;
-    }
-
-    public void setMetadataError(final String metadataError) {
-        this.metadataError = metadataError;
-    }
-
-
-
-    @Override public String toString() {
-        return "ActionLayoutData{" +
-                "id='" + id + '\'' +
-                '}';
-    }
-
-
-}

http://git-wip-us.apache.org/repos/asf/isis/blob/67b6e05e/core/applib/src/main/java/org/apache/isis/applib/layout/common/ActionLayoutDataOwner.java
----------------------------------------------------------------------
diff --git a/core/applib/src/main/java/org/apache/isis/applib/layout/common/ActionLayoutDataOwner.java b/core/applib/src/main/java/org/apache/isis/applib/layout/common/ActionLayoutDataOwner.java
deleted file mode 100644
index bf2c9ca..0000000
--- a/core/applib/src/main/java/org/apache/isis/applib/layout/common/ActionLayoutDataOwner.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.applib.layout.common;
-
-import java.util.List;
-
-public interface ActionLayoutDataOwner extends Owner {
-    List<ActionLayoutData> getActions();
-}

http://git-wip-us.apache.org/repos/asf/isis/blob/67b6e05e/core/applib/src/main/java/org/apache/isis/applib/layout/common/CollectionLayoutData.java
----------------------------------------------------------------------
diff --git a/core/applib/src/main/java/org/apache/isis/applib/layout/common/CollectionLayoutData.java b/core/applib/src/main/java/org/apache/isis/applib/layout/common/CollectionLayoutData.java
deleted file mode 100644
index 05a331f..0000000
--- a/core/applib/src/main/java/org/apache/isis/applib/layout/common/CollectionLayoutData.java
+++ /dev/null
@@ -1,268 +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.applib.layout.common;
-
-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.XmlRootElement;
-import javax.xml.bind.annotation.XmlTransient;
-import javax.xml.bind.annotation.XmlType;
-
-import com.google.common.base.Function;
-
-import org.apache.isis.applib.annotation.Where;
-
-/**
- * Describes the layout of a single collection, broadly corresponds to the {@link org.apache.isis.applib.annotation.CollectionLayout} annotation.
- *
- * <p>
- *     Note that {@link org.apache.isis.applib.annotation.CollectionLayout#render()} is omitted because
- *     {@link #defaultView} is its replacement.
- * </p>
- */
-@XmlRootElement(
-        name = "collection"
-)
-@XmlType(
-        name = "collection"
-        , propOrder = {
-                "named"
-                ,"describedAs"
-                ,"sortedBy"
-                , "actions"
-                , "metadataError"
-        }
-)
-public class CollectionLayoutData
-        implements MemberRegion<CollectionLayoutDataOwner>,
-                   ActionLayoutDataOwner,
-                   Serializable,
-                   HasCssClass, HasDescribedAs, HasHidden, HasNamed {
-
-    private static final long serialVersionUID = 1L;
-
-    public CollectionLayoutData() {
-    }
-    public CollectionLayoutData(final String id) {
-        setId(id);
-    }
-
-
-    private String id;
-
-    /**
-     * Collection identifier, being the getter method without "get" prefix, first letter lower cased.
-     */
-    @XmlAttribute(required = true)
-    public String getId() {
-        return id;
-    }
-
-    public void setId(String id) {
-        this.id = id;
-    }
-
-
-
-    private String cssClass;
-
-    @Override
-    @XmlAttribute(required = false)
-    public String getCssClass() {
-        return cssClass;
-    }
-
-    @Override
-    public void setCssClass(String cssClass) {
-        this.cssClass = cssClass;
-    }
-
-
-
-    private String describedAs;
-
-    @Override
-    @XmlElement(required = false)
-    public String getDescribedAs() {
-        return describedAs;
-    }
-
-    @Override
-    public void setDescribedAs(String describedAs) {
-        this.describedAs = describedAs;
-    }
-
-
-
-    private String defaultView;
-
-    /**
-     * Typically <code>table</code> or <code>hidden</code>, but could be any other named view that is configured and
-     * appropriate, eg <code>gmap3</code> or <code>fullcalendar2</code>.
-     */
-    @XmlAttribute(required = false)
-    public String getDefaultView() {
-        return defaultView;
-    }
-
-    public void setDefaultView(String defaultView) {
-        this.defaultView = defaultView;
-    }
-
-
-    private Where hidden;
-
-    @Override
-    @XmlAttribute(required = false)
-    public Where getHidden() {
-        return hidden;
-    }
-
-    @Override
-    public void setHidden(Where hidden) {
-        this.hidden = hidden;
-    }
-
-
-    private String named;
-
-    @Override
-    @XmlElement(required = false)
-    public String getNamed() {
-        return named;
-    }
-
-    @Override
-    public void setNamed(String named) {
-        this.named = named;
-    }
-
-
-    private Boolean namedEscaped;
-
-    @Override
-    @XmlAttribute(required = false)
-    public Boolean getNamedEscaped() {
-        return namedEscaped;
-    }
-
-    @Override
-    public void setNamedEscaped(Boolean namedEscaped) {
-        this.namedEscaped = namedEscaped;
-    }
-
-
-    private Integer paged;
-
-    @XmlAttribute(required = false)
-    public Integer getPaged() {
-        return paged;
-    }
-
-    public void setPaged(Integer paged) {
-        this.paged = paged;
-    }
-
-
-
-    private String sortedBy;
-
-    @XmlElement(required = false)
-    public String getSortedBy() {
-        return sortedBy;
-    }
-
-    public void setSortedBy(String sortedBy) {
-        this.sortedBy = sortedBy;
-    }
-
-
-
-    private List<ActionLayoutData> actions;
-
-    // no wrapper
-    @XmlElement(name = "action", required = false)
-    public List<ActionLayoutData> getActions() {
-        return actions;
-    }
-
-    public void setActions(List<ActionLayoutData> actionLayoutDatas) {
-        this.actions = actionLayoutDatas;
-    }
-
-
-
-    private CollectionLayoutDataOwner owner;
-    /**
-     * Owner.
-     *
-     * <p>
-     *     Set programmatically by framework after reading in from XML.
-     * </p>
-     */
-    @XmlTransient
-    public CollectionLayoutDataOwner getOwner() {
-        return owner;
-    }
-
-    public void setOwner(final CollectionLayoutDataOwner owner) {
-        this.owner = owner;
-    }
-
-
-    private String metadataError;
-
-    /**
-     * For diagnostics; populated by the framework if and only if a metadata error.
-     */
-    @XmlElement(required = false)
-    public String getMetadataError() {
-        return metadataError;
-    }
-
-    public void setMetadataError(final String metadataError) {
-        this.metadataError = metadataError;
-    }
-
-
-
-
-
-    public static class Functions {
-        private Functions(){}
-
-        public static Function<CollectionLayoutData, String> id() {
-            return new Function<CollectionLayoutData, String>() {
-                @Override
-                public String apply(final CollectionLayoutData metadata) {
-                    return metadata.getId();
-                }
-            };
-        }
-    }
-
-    @Override public String toString() {
-        return "CollectionLayoutData{" +
-                "id='" + id + '\'' +
-                '}';
-    }
-}

http://git-wip-us.apache.org/repos/asf/isis/blob/67b6e05e/core/applib/src/main/java/org/apache/isis/applib/layout/common/CollectionLayoutDataOwner.java
----------------------------------------------------------------------
diff --git a/core/applib/src/main/java/org/apache/isis/applib/layout/common/CollectionLayoutDataOwner.java b/core/applib/src/main/java/org/apache/isis/applib/layout/common/CollectionLayoutDataOwner.java
deleted file mode 100644
index 0eae2c7..0000000
--- a/core/applib/src/main/java/org/apache/isis/applib/layout/common/CollectionLayoutDataOwner.java
+++ /dev/null
@@ -1,26 +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.applib.layout.common;
-
-import java.util.List;
-
-public interface CollectionLayoutDataOwner extends MemberRegionOwner {
-
-    List<CollectionLayoutData> getCollections();
-}

http://git-wip-us.apache.org/repos/asf/isis/blob/67b6e05e/core/applib/src/main/java/org/apache/isis/applib/layout/common/DomainObjectLayoutData.java
----------------------------------------------------------------------
diff --git a/core/applib/src/main/java/org/apache/isis/applib/layout/common/DomainObjectLayoutData.java b/core/applib/src/main/java/org/apache/isis/applib/layout/common/DomainObjectLayoutData.java
deleted file mode 100644
index a0502e3..0000000
--- a/core/applib/src/main/java/org/apache/isis/applib/layout/common/DomainObjectLayoutData.java
+++ /dev/null
@@ -1,208 +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.applib.layout.common;
-
-import java.io.Serializable;
-
-import javax.xml.bind.annotation.XmlAttribute;
-import javax.xml.bind.annotation.XmlElement;
-import javax.xml.bind.annotation.XmlRootElement;
-import javax.xml.bind.annotation.XmlTransient;
-import javax.xml.bind.annotation.XmlType;
-
-import org.apache.isis.applib.annotation.BookmarkPolicy;
-
-/**
- * Describes the layout of the title and icon of a domain object, broadly corresponding to {@link org.apache.isis.applib.annotation.DomainObjectLayout}.
- */
-@XmlRootElement(
-        name = "domainObject"
-)
-@XmlType(
-        name = "domainObject"
-        , propOrder = {
-            "named"
-            , "describedAs"
-            , "plural"
-            , "metadataError"
-        }
-)
-public class DomainObjectLayoutData implements Serializable, Owned<DomainObjectLayoutDataOwner>,
-        HasBookmarking, HasCssClass, HasCssClassFa, HasDescribedAs, HasNamed {
-
-    private static final long serialVersionUID = 1L;
-
-    public DomainObjectLayoutData() {
-    }
-
-
-    private BookmarkPolicy bookmarking;
-
-    @Override
-    @XmlAttribute(required = false)
-    public BookmarkPolicy getBookmarking() {
-        return bookmarking;
-    }
-
-    @Override
-    public void setBookmarking(BookmarkPolicy bookmarking) {
-        this.bookmarking = bookmarking;
-    }
-
-
-
-    private String cssClass;
-
-    @Override
-    @XmlAttribute(required = false)
-    public String getCssClass() {
-        return cssClass;
-    }
-
-    @Override
-    public void setCssClass(String cssClass) {
-        this.cssClass = cssClass;
-    }
-
-
-    private String cssClassFa;
-
-    @Override
-    @XmlAttribute(required = false)
-    public String getCssClassFa() {
-        return cssClassFa;
-    }
-
-    @Override
-    public void setCssClassFa(String cssClassFa) {
-        this.cssClassFa = cssClassFa;
-    }
-
-
-
-    private org.apache.isis.applib.annotation.ActionLayout.CssClassFaPosition cssClassFaPosition;
-
-    @Override
-    @XmlAttribute(required = false)
-    public org.apache.isis.applib.annotation.ActionLayout.CssClassFaPosition getCssClassFaPosition() {
-        return cssClassFaPosition;
-    }
-
-    @Override
-    public void setCssClassFaPosition(org.apache.isis.applib.annotation.ActionLayout.CssClassFaPosition cssClassFaPosition) {
-        this.cssClassFaPosition = cssClassFaPosition;
-    }
-
-
-    private String describedAs;
-
-    @Override
-    @XmlElement(required = false)
-    public String getDescribedAs() {
-        return describedAs;
-    }
-
-    @Override
-    public void setDescribedAs(String describedAs) {
-        this.describedAs = describedAs;
-    }
-
-
-
-    private String named;
-
-    @Override
-    @XmlElement(required = false)
-    public String getNamed() {
-        return named;
-    }
-
-    @Override
-    public void setNamed(String named) {
-        this.named = named;
-    }
-
-
-    private Boolean namedEscaped;
-
-    @Override
-    @XmlAttribute(required = false)
-    public Boolean getNamedEscaped() {
-        return namedEscaped;
-    }
-
-    @Override
-    public void setNamedEscaped(Boolean namedEscaped) {
-        this.namedEscaped = namedEscaped;
-    }
-
-
-
-    private String plural;
-
-    @XmlElement(required = false)
-    public String getPlural() {
-        return plural;
-    }
-
-    public void setPlural(String plural) {
-        this.plural = plural;
-    }
-
-
-
-
-
-    private String metadataError;
-
-    /**
-     * For diagnostics; populated by the framework if and only if a metadata error.
-     */
-    @XmlElement(required = false)
-    public String getMetadataError() {
-        return metadataError;
-    }
-
-    public void setMetadataError(final String metadataError) {
-        this.metadataError = metadataError;
-    }
-
-
-
-    private DomainObjectLayoutDataOwner owner;
-    /**
-     * Owner.
-     *
-     * <p>
-     *     Set programmatically by framework after reading in from XML.
-     * </p>
-     */
-    @XmlTransient
-    public DomainObjectLayoutDataOwner getOwner() {
-        return owner;
-    }
-
-    public void setOwner(final DomainObjectLayoutDataOwner owner) {
-        this.owner = owner;
-    }
-
-
-
-
-}

http://git-wip-us.apache.org/repos/asf/isis/blob/67b6e05e/core/applib/src/main/java/org/apache/isis/applib/layout/common/DomainObjectLayoutDataOwner.java
----------------------------------------------------------------------
diff --git a/core/applib/src/main/java/org/apache/isis/applib/layout/common/DomainObjectLayoutDataOwner.java b/core/applib/src/main/java/org/apache/isis/applib/layout/common/DomainObjectLayoutDataOwner.java
deleted file mode 100644
index 77e9e8c..0000000
--- a/core/applib/src/main/java/org/apache/isis/applib/layout/common/DomainObjectLayoutDataOwner.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.applib.layout.common;
-
-public interface DomainObjectLayoutDataOwner extends Owner {
-
-    DomainObjectLayoutData getDomainObject();
-    void setDomainObject(DomainObjectLayoutData domainObjectLayoutData);
-}

http://git-wip-us.apache.org/repos/asf/isis/blob/67b6e05e/core/applib/src/main/java/org/apache/isis/applib/layout/common/FieldSet.java
----------------------------------------------------------------------
diff --git a/core/applib/src/main/java/org/apache/isis/applib/layout/common/FieldSet.java b/core/applib/src/main/java/org/apache/isis/applib/layout/common/FieldSet.java
deleted file mode 100644
index 7037135..0000000
--- a/core/applib/src/main/java/org/apache/isis/applib/layout/common/FieldSet.java
+++ /dev/null
@@ -1,223 +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.applib.layout.common;
-
-import java.io.Serializable;
-import java.util.List;
-
-import javax.annotation.Nullable;
-import javax.xml.bind.annotation.XmlAttribute;
-import javax.xml.bind.annotation.XmlElement;
-import javax.xml.bind.annotation.XmlRootElement;
-import javax.xml.bind.annotation.XmlTransient;
-import javax.xml.bind.annotation.XmlType;
-
-import com.google.common.base.Function;
-import com.google.common.collect.Lists;
-
-import org.apache.isis.applib.annotation.MemberOrder;
-import org.apache.isis.applib.layout.bootstrap3.BS3Col;
-
-/**
- * A {@link MemberRegion region} of the page containing a set of
- * related {@link PropertyLayoutData properties} and associated
- * {@link ActionLayoutData actions}.
- */
-@XmlRootElement(
-        name = "fieldSet"
-)
-@XmlType(
-        name = "fieldSet"
-        , propOrder = {
-                "name"
-                , "actions"
-                , "properties"
-                , "metadataError"
-        }
-)
-public class FieldSet
-        implements MemberRegion<FieldSetOwner>,
-                   ActionLayoutDataOwner,
-                   Serializable {
-
-    private static final long serialVersionUID = 1L;
-
-    public FieldSet() {
-    }
-
-    public FieldSet(final String name) {
-        setName(name);
-    }
-
-
-
-    private String id;
-
-    /**
-     * As per &lt;div id=&quot;...&quot;&gt;...&lt;/div&gt; : must be unique across entire page.
-     */
-    @XmlAttribute(required = false)
-    public String getId() {
-        return id;
-    }
-
-    public void setId(final String id) {
-        this.id = id;
-    }
-
-
-
-    private Boolean unreferencedActions;
-
-    /**
-     * Whether this fieldset should be used to hold any unreferenced actions (contributed or &quot;native&quot;).
-     *
-     * <p>
-     *     Any layout must have precisely one fieldset or {@link BS3Col col} that has this attribute set.
-     * </p>
-     */
-    @XmlAttribute(required = false)
-    public Boolean isUnreferencedActions() {
-        return unreferencedActions;
-    }
-
-    public void setUnreferencedActions(final Boolean unreferencedActions) {
-        this.unreferencedActions = unreferencedActions;
-    }
-
-
-    private Boolean unreferencedProperties;
-    /**
-     * Whether this fieldset should be used to hold any unreferenced properties (contributed or &quot;native&quot;).
-     *
-     * <p>
-     *     Any grid layout must have precisely one fieldset that has this attribute set.
-     * </p>
-     */
-    @XmlAttribute(required = false)
-    public Boolean isUnreferencedProperties() {
-        return unreferencedProperties;
-    }
-
-    public void setUnreferencedProperties(final Boolean unreferencedProperties) {
-        this.unreferencedProperties = unreferencedProperties;
-    }
-
-
-
-
-    private String name;
-
-    /**
-     * Corresponds to the {@link MemberOrder#name()} (when applied to properties).
-     */
-    @XmlAttribute(required = true)
-    public String getName() {
-        return name;
-    }
-
-    public void setName(String name) {
-        this.name = name;
-    }
-
-
-
-    private List<ActionLayoutData> actions = Lists.newArrayList();
-
-    // no wrapper
-    @XmlElement(name = "action", required = false)
-    public List<ActionLayoutData> getActions() {
-        return actions;
-    }
-
-    public void setActions(List<ActionLayoutData> actionLayoutDatas) {
-        this.actions = actionLayoutDatas;
-    }
-
-
-
-    private List<PropertyLayoutData> properties = Lists.newArrayList();
-
-    // no wrapper; required=false because may be auto-generated
-    @XmlElement(name = "property", required = false)
-    public List<PropertyLayoutData> getProperties() {
-        return properties;
-    }
-
-    public void setProperties(List<PropertyLayoutData> properties) {
-        this.properties = properties;
-    }
-
-
-    private FieldSetOwner owner;
-    /**
-     * Owner.
-     *
-     * <p>
-     *     Set programmatically by framework after reading in from XML.
-     * </p>
-     */
-    @XmlTransient
-    public FieldSetOwner getOwner() {
-        return owner;
-    }
-
-    public void setOwner(final FieldSetOwner owner) {
-        this.owner = owner;
-    }
-
-
-
-
-
-    private String metadataError;
-
-    /**
-     * For diagnostics; populated by the framework if and only if a metadata error.
-     */
-    @XmlElement(required = false)
-    public String getMetadataError() {
-        return metadataError;
-    }
-
-    public void setMetadataError(final String metadataError) {
-        this.metadataError = metadataError;
-    }
-
-
-
-    public static class Util {
-        private Util(){}
-        public static Function<? super FieldSet, String> nameOf() {
-            return new Function<FieldSet, String>() {
-                @Nullable @Override
-                public String apply(@Nullable final FieldSet fieldSet) {
-                    return fieldSet.getName();
-                }
-            };
-        }
-    }
-
-    @Override public String toString() {
-        return "FieldSet{" +
-                "id='" + id + '\'' +
-                '}';
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/isis/blob/67b6e05e/core/applib/src/main/java/org/apache/isis/applib/layout/common/FieldSetOwner.java
----------------------------------------------------------------------
diff --git a/core/applib/src/main/java/org/apache/isis/applib/layout/common/FieldSetOwner.java b/core/applib/src/main/java/org/apache/isis/applib/layout/common/FieldSetOwner.java
deleted file mode 100644
index f3e5fd0..0000000
--- a/core/applib/src/main/java/org/apache/isis/applib/layout/common/FieldSetOwner.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.applib.layout.common;
-
-import java.util.List;
-
-public interface FieldSetOwner extends MemberRegionOwner {
-    List<FieldSet> getFieldSets();
-}

http://git-wip-us.apache.org/repos/asf/isis/blob/67b6e05e/core/applib/src/main/java/org/apache/isis/applib/layout/common/Grid.java
----------------------------------------------------------------------
diff --git a/core/applib/src/main/java/org/apache/isis/applib/layout/common/Grid.java b/core/applib/src/main/java/org/apache/isis/applib/layout/common/Grid.java
deleted file mode 100644
index fd7b067..0000000
--- a/core/applib/src/main/java/org/apache/isis/applib/layout/common/Grid.java
+++ /dev/null
@@ -1,84 +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.applib.layout.common;
-
-import java.util.LinkedHashMap;
-
-import org.apache.isis.applib.annotation.Programmatic;
-import org.apache.isis.applib.services.layout.GridService;
-
-/**
- * All top-level page layout classes should implement this interface.
- *
- * <p>
- *     It is used by the {@link GridService} as a common based type for any layouts read in from XML.
- * </p>
- */
-public interface Grid {
-
-    @Programmatic
-    Class<?> getDomainClass();
-
-    @Programmatic
-    void setDomainClass(final Class<?> domainClass);
-
-    @Programmatic
-    boolean isNormalized();
-
-    @Programmatic
-    void setNormalized(final boolean normalized);
-
-    @Programmatic
-    LinkedHashMap<String, PropertyLayoutData> getAllPropertiesById();
-
-    @Programmatic
-    LinkedHashMap<String, CollectionLayoutData> getAllCollectionsById();
-
-    @Programmatic
-    LinkedHashMap<String, ActionLayoutData> getAllActionsById();
-
-    interface Visitor {
-        void visit(final DomainObjectLayoutData domainObjectLayoutData);
-
-        void visit(final ActionLayoutData actionLayoutData);
-
-        void visit(final PropertyLayoutData propertyLayoutData);
-
-        void visit(final CollectionLayoutData collectionLayoutData);
-
-        void visit(final FieldSet fieldSet);
-    }
-
-    class VisitorAdapter implements Visitor {
-        @Override public void visit(final DomainObjectLayoutData domainObjectLayoutData) {
-        }
-        @Override public void visit(final ActionLayoutData actionLayoutData) {
-        }
-        @Override public void visit(final PropertyLayoutData propertyLayoutData) {
-        }
-        @Override public void visit(final CollectionLayoutData collectionLayoutData) {
-        }
-        @Override public void visit(final FieldSet fieldSet) {
-        }
-    }
-
-    @Programmatic
-    void visit(final Grid.Visitor visitor);
-
-}

http://git-wip-us.apache.org/repos/asf/isis/blob/67b6e05e/core/applib/src/main/java/org/apache/isis/applib/layout/common/GridAbstract.java
----------------------------------------------------------------------
diff --git a/core/applib/src/main/java/org/apache/isis/applib/layout/common/GridAbstract.java b/core/applib/src/main/java/org/apache/isis/applib/layout/common/GridAbstract.java
deleted file mode 100644
index eac1588..0000000
--- a/core/applib/src/main/java/org/apache/isis/applib/layout/common/GridAbstract.java
+++ /dev/null
@@ -1,181 +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.applib.layout.common;
-
-import java.util.LinkedHashMap;
-import java.util.List;
-
-import javax.xml.bind.annotation.XmlTransient;
-
-import com.google.common.collect.Lists;
-import com.google.common.collect.Maps;
-
-import org.apache.isis.applib.annotation.Programmatic;
-import org.apache.isis.applib.layout.bootstrap3.BS3Grid;
-import org.apache.isis.applib.services.layout.GridService;
-
-/**
- * All top-level page layout classes should implement this interface.
- *
- * <p>
- *     It is used by the {@link GridService} as a common based type for any layouts read in from XML.
- * </p>
- */
-@XmlTransient // ignore this class
-public abstract class GridAbstract implements Grid {
-
-
-    private Class<?> domainClass;
-
-    @Programmatic
-    @XmlTransient
-    public Class<?> getDomainClass() {
-        return domainClass;
-    }
-
-    @Programmatic
-    public void setDomainClass(final Class<?> domainClass) {
-        this.domainClass = domainClass;
-    }
-
-
-
-    private boolean normalized;
-
-    @Programmatic
-    @XmlTransient
-    public boolean isNormalized() {
-        return normalized;
-    }
-
-    @Programmatic
-    public void setNormalized(final boolean normalized) {
-        this.normalized = normalized;
-    }
-
-
-    /**
-     * Convenience for subclasses.
-     */
-    protected void traverseActions(
-            final ActionLayoutDataOwner actionLayoutDataOwner,
-            final GridAbstract.Visitor visitor) {
-        final List<ActionLayoutData> actionLayoutDatas = actionLayoutDataOwner.getActions();
-        if(actionLayoutDatas == null) {
-            return;
-        }
-        for (final ActionLayoutData actionLayoutData : Lists.newArrayList(actionLayoutDatas)) {
-            actionLayoutData.setOwner(actionLayoutDataOwner);
-            visitor.visit(actionLayoutData);
-        }
-    }
-
-
-    /**
-     * Convenience for subclasses.
-     */
-    protected void traverseFieldSets(final FieldSetOwner fieldSetOwner, final GridAbstract.Visitor visitor) {
-        final List<FieldSet> fieldSets = fieldSetOwner.getFieldSets();
-        for (FieldSet fieldSet : Lists.newArrayList(fieldSets)) {
-            fieldSet.setOwner(fieldSetOwner);
-            visitor.visit(fieldSet);
-            traverseActions(fieldSet, visitor);
-            final List<PropertyLayoutData> properties = fieldSet.getProperties();
-            for (final PropertyLayoutData property : Lists.newArrayList(properties)) {
-                property.setOwner(fieldSet);
-                visitor.visit(property);
-                traverseActions(property, visitor);
-            }
-        }
-    }
-
-
-    /**
-     * Convenience for subclasses.
-     */
-    protected void traverseCollections(
-            final CollectionLayoutDataOwner owner, final GridAbstract.Visitor visitor) {
-        final List<CollectionLayoutData> collections = owner.getCollections();
-        for (CollectionLayoutData collection : Lists.newArrayList(collections)) {
-            collection.setOwner(owner);
-            visitor.visit(collection);
-            traverseActions(collection, visitor);
-        }
-    }
-
-
-    @Programmatic
-    @XmlTransient
-    public LinkedHashMap<String, PropertyLayoutData> getAllPropertiesById() {
-        final LinkedHashMap<String, PropertyLayoutData> propertiesById = Maps.newLinkedHashMap();
-        visit(new BS3Grid.VisitorAdapter() {
-            public void visit(final PropertyLayoutData propertyLayoutData) {
-                propertiesById.put(propertyLayoutData.getId(), propertyLayoutData);
-            }
-        });
-        return propertiesById;
-    }
-
-
-    @Programmatic
-    @XmlTransient
-    public LinkedHashMap<String, CollectionLayoutData> getAllCollectionsById() {
-        final LinkedHashMap<String, CollectionLayoutData> collectionsById = Maps.newLinkedHashMap();
-
-        visit(new BS3Grid.VisitorAdapter() {
-            @Override
-            public void visit(final CollectionLayoutData collectionLayoutData) {
-                collectionsById.put(collectionLayoutData.getId(), collectionLayoutData);
-            }
-        });
-        return collectionsById;
-    }
-
-
-    @Programmatic
-    @XmlTransient
-    public LinkedHashMap<String, ActionLayoutData> getAllActionsById() {
-        final LinkedHashMap<String, ActionLayoutData> actionsById = Maps.newLinkedHashMap();
-
-        visit(new BS3Grid.VisitorAdapter() {
-            @Override
-            public void visit(final ActionLayoutData actionLayoutData) {
-                actionsById.put(actionLayoutData.getId(), actionLayoutData);
-            }
-        });
-        return actionsById;
-    }
-
-
-    @Programmatic
-    @XmlTransient
-    public LinkedHashMap<String, FieldSet> getAllFieldSetsByName() {
-        final LinkedHashMap<String, FieldSet> fieldSetsByName = Maps.newLinkedHashMap();
-
-        visit(new BS3Grid.VisitorAdapter() {
-            @Override
-            public void visit(final FieldSet fieldSet) {
-                fieldSetsByName.put(fieldSet.getName(), fieldSet);
-            }
-        });
-        return fieldSetsByName;
-    }
-
-
-}

http://git-wip-us.apache.org/repos/asf/isis/blob/67b6e05e/core/applib/src/main/java/org/apache/isis/applib/layout/common/HasBookmarking.java
----------------------------------------------------------------------
diff --git a/core/applib/src/main/java/org/apache/isis/applib/layout/common/HasBookmarking.java b/core/applib/src/main/java/org/apache/isis/applib/layout/common/HasBookmarking.java
deleted file mode 100644
index ad841a2..0000000
--- a/core/applib/src/main/java/org/apache/isis/applib/layout/common/HasBookmarking.java
+++ /dev/null
@@ -1,14 +0,0 @@
-package org.apache.isis.applib.layout.common;
-
-import javax.xml.bind.annotation.XmlAttribute;
-
-import org.apache.isis.applib.annotation.BookmarkPolicy;
-
-/**
- * Created by Dan on 10/02/2016.
- */
-public interface HasBookmarking {
-    @XmlAttribute(required = false) BookmarkPolicy getBookmarking();
-
-    void setBookmarking(BookmarkPolicy bookmarking);
-}

http://git-wip-us.apache.org/repos/asf/isis/blob/67b6e05e/core/applib/src/main/java/org/apache/isis/applib/layout/common/HasCssClass.java
----------------------------------------------------------------------
diff --git a/core/applib/src/main/java/org/apache/isis/applib/layout/common/HasCssClass.java b/core/applib/src/main/java/org/apache/isis/applib/layout/common/HasCssClass.java
deleted file mode 100644
index e42dc09..0000000
--- a/core/applib/src/main/java/org/apache/isis/applib/layout/common/HasCssClass.java
+++ /dev/null
@@ -1,12 +0,0 @@
-package org.apache.isis.applib.layout.common;
-
-import javax.xml.bind.annotation.XmlAttribute;
-
-/**
- * Created by Dan on 10/02/2016.
- */
-public interface HasCssClass {
-    @XmlAttribute(required = false) String getCssClass();
-
-    void setCssClass(String cssClass);
-}

http://git-wip-us.apache.org/repos/asf/isis/blob/67b6e05e/core/applib/src/main/java/org/apache/isis/applib/layout/common/HasCssClassFa.java
----------------------------------------------------------------------
diff --git a/core/applib/src/main/java/org/apache/isis/applib/layout/common/HasCssClassFa.java b/core/applib/src/main/java/org/apache/isis/applib/layout/common/HasCssClassFa.java
deleted file mode 100644
index 763b8dd..0000000
--- a/core/applib/src/main/java/org/apache/isis/applib/layout/common/HasCssClassFa.java
+++ /dev/null
@@ -1,16 +0,0 @@
-package org.apache.isis.applib.layout.common;
-
-import javax.xml.bind.annotation.XmlAttribute;
-
-/**
- * Created by Dan on 10/02/2016.
- */
-public interface HasCssClassFa {
-    @XmlAttribute(required = false) String getCssClassFa();
-
-    void setCssClassFa(String cssClassFa);
-
-    @XmlAttribute(required = false) org.apache.isis.applib.annotation.ActionLayout.CssClassFaPosition getCssClassFaPosition();
-
-    void setCssClassFaPosition(org.apache.isis.applib.annotation.ActionLayout.CssClassFaPosition cssClassFaPosition);
-}

http://git-wip-us.apache.org/repos/asf/isis/blob/67b6e05e/core/applib/src/main/java/org/apache/isis/applib/layout/common/HasDescribedAs.java
----------------------------------------------------------------------
diff --git a/core/applib/src/main/java/org/apache/isis/applib/layout/common/HasDescribedAs.java b/core/applib/src/main/java/org/apache/isis/applib/layout/common/HasDescribedAs.java
deleted file mode 100644
index f19c95a..0000000
--- a/core/applib/src/main/java/org/apache/isis/applib/layout/common/HasDescribedAs.java
+++ /dev/null
@@ -1,12 +0,0 @@
-package org.apache.isis.applib.layout.common;
-
-import javax.xml.bind.annotation.XmlElement;
-
-/**
- * Created by Dan on 10/02/2016.
- */
-public interface HasDescribedAs {
-    @XmlElement(required = false) String getDescribedAs();
-
-    void setDescribedAs(String describedAs);
-}

http://git-wip-us.apache.org/repos/asf/isis/blob/67b6e05e/core/applib/src/main/java/org/apache/isis/applib/layout/common/HasHidden.java
----------------------------------------------------------------------
diff --git a/core/applib/src/main/java/org/apache/isis/applib/layout/common/HasHidden.java b/core/applib/src/main/java/org/apache/isis/applib/layout/common/HasHidden.java
deleted file mode 100644
index 7953141..0000000
--- a/core/applib/src/main/java/org/apache/isis/applib/layout/common/HasHidden.java
+++ /dev/null
@@ -1,14 +0,0 @@
-package org.apache.isis.applib.layout.common;
-
-import javax.xml.bind.annotation.XmlAttribute;
-
-import org.apache.isis.applib.annotation.Where;
-
-/**
- * Created by Dan on 10/02/2016.
- */
-public interface HasHidden {
-    @XmlAttribute(required = false) Where getHidden();
-
-    void setHidden(Where hidden);
-}

http://git-wip-us.apache.org/repos/asf/isis/blob/67b6e05e/core/applib/src/main/java/org/apache/isis/applib/layout/common/HasNamed.java
----------------------------------------------------------------------
diff --git a/core/applib/src/main/java/org/apache/isis/applib/layout/common/HasNamed.java b/core/applib/src/main/java/org/apache/isis/applib/layout/common/HasNamed.java
deleted file mode 100644
index 4a29ee9..0000000
--- a/core/applib/src/main/java/org/apache/isis/applib/layout/common/HasNamed.java
+++ /dev/null
@@ -1,17 +0,0 @@
-package org.apache.isis.applib.layout.common;
-
-import javax.xml.bind.annotation.XmlAttribute;
-import javax.xml.bind.annotation.XmlElement;
-
-/**
- * Created by Dan on 10/02/2016.
- */
-public interface HasNamed {
-    @XmlElement(required = false) String getNamed();
-
-    void setNamed(String named);
-
-    @XmlAttribute(required = false) Boolean getNamedEscaped();
-
-    void setNamedEscaped(Boolean namedEscaped);
-}

http://git-wip-us.apache.org/repos/asf/isis/blob/67b6e05e/core/applib/src/main/java/org/apache/isis/applib/layout/common/MemberRegion.java
----------------------------------------------------------------------
diff --git a/core/applib/src/main/java/org/apache/isis/applib/layout/common/MemberRegion.java b/core/applib/src/main/java/org/apache/isis/applib/layout/common/MemberRegion.java
deleted file mode 100644
index f335cde..0000000
--- a/core/applib/src/main/java/org/apache/isis/applib/layout/common/MemberRegion.java
+++ /dev/null
@@ -1,33 +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.applib.layout.common;
-
-/**
- * Represents an area on the page containing one or several related members.
- *
- * <p>
- *     Implementations include a <code>FieldSet</code> (containing a number
- *     of properties and their actions), and a <code>CollectionLayoutData</code>
- *     (containing a single collection and associated actions)
- * </p>
- */
-public interface MemberRegion<T extends MemberRegionOwner> extends Owned<T> {
-
-
-}

http://git-wip-us.apache.org/repos/asf/isis/blob/67b6e05e/core/applib/src/main/java/org/apache/isis/applib/layout/common/MemberRegionOwner.java
----------------------------------------------------------------------
diff --git a/core/applib/src/main/java/org/apache/isis/applib/layout/common/MemberRegionOwner.java b/core/applib/src/main/java/org/apache/isis/applib/layout/common/MemberRegionOwner.java
deleted file mode 100644
index 7bab3ef..0000000
--- a/core/applib/src/main/java/org/apache/isis/applib/layout/common/MemberRegionOwner.java
+++ /dev/null
@@ -1,23 +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.applib.layout.common;
-
-public interface MemberRegionOwner extends Owner {
-
-}

http://git-wip-us.apache.org/repos/asf/isis/blob/67b6e05e/core/applib/src/main/java/org/apache/isis/applib/layout/common/Owned.java
----------------------------------------------------------------------
diff --git a/core/applib/src/main/java/org/apache/isis/applib/layout/common/Owned.java b/core/applib/src/main/java/org/apache/isis/applib/layout/common/Owned.java
deleted file mode 100644
index c00d795..0000000
--- a/core/applib/src/main/java/org/apache/isis/applib/layout/common/Owned.java
+++ /dev/null
@@ -1,23 +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.applib.layout.common;
-
-public interface Owned<T extends Owner> {
-    T getOwner();
-}

http://git-wip-us.apache.org/repos/asf/isis/blob/67b6e05e/core/applib/src/main/java/org/apache/isis/applib/layout/common/Owner.java
----------------------------------------------------------------------
diff --git a/core/applib/src/main/java/org/apache/isis/applib/layout/common/Owner.java b/core/applib/src/main/java/org/apache/isis/applib/layout/common/Owner.java
deleted file mode 100644
index 239aa32..0000000
--- a/core/applib/src/main/java/org/apache/isis/applib/layout/common/Owner.java
+++ /dev/null
@@ -1,24 +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.applib.layout.common;
-
-public interface Owner {
-
-
-}

http://git-wip-us.apache.org/repos/asf/isis/blob/67b6e05e/core/applib/src/main/java/org/apache/isis/applib/layout/common/PropertyLayoutData.java
----------------------------------------------------------------------
diff --git a/core/applib/src/main/java/org/apache/isis/applib/layout/common/PropertyLayoutData.java b/core/applib/src/main/java/org/apache/isis/applib/layout/common/PropertyLayoutData.java
deleted file mode 100644
index 923833a..0000000
--- a/core/applib/src/main/java/org/apache/isis/applib/layout/common/PropertyLayoutData.java
+++ /dev/null
@@ -1,252 +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.applib.layout.common;
-
-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.XmlRootElement;
-import javax.xml.bind.annotation.XmlTransient;
-import javax.xml.bind.annotation.XmlType;
-
-import org.apache.isis.applib.annotation.LabelPosition;
-import org.apache.isis.applib.annotation.Where;
-
-/**
- * Describes the layout of a single property, broadly corresponds to the {@link org.apache.isis.applib.annotation.PropertyLayout} annotation.
- */
-@XmlRootElement(
-        name = "property"
-)
-@XmlType(
-        name = "property"
-        , propOrder = {
-                "named"
-                , "describedAs"
-                , "actions"
-                , "metadataError"
-        }
-)
-public class PropertyLayoutData
-        implements ActionLayoutDataOwner,
-                   Serializable,
-                   Owned<FieldSet>,
-                   HasCssClass, HasDescribedAs, HasHidden, HasNamed {
-
-    private static final long serialVersionUID = 1L;
-
-    public PropertyLayoutData() {
-    }
-
-    public PropertyLayoutData(final String id) {
-        this.id = id;
-    }
-
-    private String id;
-
-    /**
-     * Property identifier, being the getter method without "get" or "is" prefix, first letter lower cased.
-     */
-    @XmlAttribute(required = true)
-    public String getId() {
-        return id;
-    }
-
-    public void setId(String id) {
-        this.id = id;
-    }
-
-
-
-    private String cssClass;
-
-    @Override
-    @XmlAttribute(required = false)
-    public String getCssClass() {
-        return cssClass;
-    }
-
-    @Override
-    public void setCssClass(String cssClass) {
-        this.cssClass = cssClass;
-    }
-
-
-    private String describedAs;
-
-    @Override
-    @XmlElement(required = false)
-    public String getDescribedAs() {
-        return describedAs;
-    }
-
-    @Override
-    public void setDescribedAs(String describedAs) {
-        this.describedAs = describedAs;
-    }
-
-
-    private Where hidden;
-
-    @Override
-    @XmlAttribute(required = false)
-    public Where getHidden() {
-        return hidden;
-    }
-
-    @Override
-    public void setHidden(Where hidden) {
-        this.hidden = hidden;
-    }
-
-
-    private LabelPosition labelPosition;
-
-    @XmlAttribute(required = false)
-    public LabelPosition getLabelPosition() {
-        return labelPosition;
-    }
-
-    public void setLabelPosition(LabelPosition labelPosition) {
-        this.labelPosition = labelPosition;
-    }
-
-
-    private Integer multiLine;
-
-    @XmlAttribute(required = false)
-    public Integer getMultiLine() {
-        return multiLine;
-    }
-
-    public void setMultiLine(Integer multiLine) {
-        this.multiLine = multiLine;
-    }
-
-
-    private String named;
-
-    @Override
-    @XmlElement(required = false)
-    public String getNamed() {
-        return named;
-    }
-
-    @Override
-    public void setNamed(String named) {
-        this.named = named;
-    }
-
-
-    private Boolean namedEscaped;
-
-    @Override
-    @XmlAttribute(required = false)
-    public Boolean getNamedEscaped() {
-        return namedEscaped;
-    }
-
-    @Override
-    public void setNamedEscaped(Boolean namedEscaped) {
-        this.namedEscaped = namedEscaped;
-    }
-
-
-    private Boolean renderedAsDayBefore;
-
-    @XmlAttribute(required = false)
-    public Boolean getRenderedAsDayBefore() {
-        return renderedAsDayBefore;
-    }
-
-    public void setRenderedAsDayBefore(Boolean renderedAsDayBefore) {
-        this.renderedAsDayBefore = renderedAsDayBefore;
-    }
-
-
-    private Integer typicalLength;
-
-    @XmlAttribute(required = false)
-    public Integer getTypicalLength() {
-        return typicalLength;
-    }
-
-    public void setTypicalLength(Integer typicalLength) {
-        this.typicalLength = typicalLength;
-    }
-
-
-
-    private List<ActionLayoutData> actions;
-
-    // no wrapper
-    @XmlElement(name = "action", required = false)
-    public List<ActionLayoutData> getActions() {
-        return actions;
-    }
-
-    public void setActions(List<ActionLayoutData> actionLayoutDatas) {
-        this.actions = actionLayoutDatas;
-    }
-
-
-    private FieldSet owner;
-    /**
-     * Owner.
-     *
-     * <p>
-     *     Set programmatically by framework after reading in from XML.
-     * </p>
-     */
-    @XmlTransient
-    public FieldSet getOwner() {
-        return owner;
-    }
-
-    public void setOwner(final FieldSet owner) {
-        this.owner = owner;
-    }
-
-
-
-    private String metadataError;
-
-    /**
-     * For diagnostics; populated by the framework if and only if a metadata error.
-     */
-    @XmlElement(required = false)
-    public String getMetadataError() {
-        return metadataError;
-    }
-
-    public void setMetadataError(final String metadataError) {
-        this.metadataError = metadataError;
-    }
-
-
-    @Override
-    public String toString() {
-        return "PropertyLayoutData{" +
-                "id='" + id + '\'' +
-                '}';
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/isis/blob/67b6e05e/core/applib/src/main/java/org/apache/isis/applib/layout/common/package-info.java
----------------------------------------------------------------------
diff --git a/core/applib/src/main/java/org/apache/isis/applib/layout/common/package-info.java b/core/applib/src/main/java/org/apache/isis/applib/layout/common/package-info.java
deleted file mode 100644
index e5e02d9..0000000
--- a/core/applib/src/main/java/org/apache/isis/applib/layout/common/package-info.java
+++ /dev/null
@@ -1,36 +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.
- */
-
-/**
- * The classes in this package provide layout metadata for a domain object's properties, collections and actions - the
- * &quot;building blocks&quot; which then must be arranged into some sort of layout.
- *
- * <p>
- *     The <code>bootstrap3</code> and <code>fixedcols</code> packages both provide different ways of doing the layout,
- *     and both reference the classes in this package.
- * </p>
- *
- */
-@javax.xml.bind.annotation.XmlSchema(
-        namespace = "http://isis.apache.org/schema/applib/layout/common",
-        elementFormDefault = javax.xml.bind.annotation.XmlNsForm.QUALIFIED
-        // specifying the location seems to cause JaxbService#toXsd() to not generate the schema; not sure why...
-        //, location = ..."http://isis.apache.org/schema/metamodel/layout/common/common.xsd"
-)
-package org.apache.isis.applib.layout.common;
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/isis/blob/67b6e05e/core/applib/src/main/java/org/apache/isis/applib/layout/component/ActionLayoutData.java
----------------------------------------------------------------------
diff --git a/core/applib/src/main/java/org/apache/isis/applib/layout/component/ActionLayoutData.java b/core/applib/src/main/java/org/apache/isis/applib/layout/component/ActionLayoutData.java
new file mode 100644
index 0000000..a88229a
--- /dev/null
+++ b/core/applib/src/main/java/org/apache/isis/applib/layout/component/ActionLayoutData.java
@@ -0,0 +1,253 @@
+/*
+ *  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.applib.layout.component;
+
+import java.io.Serializable;
+
+import javax.xml.bind.annotation.XmlAttribute;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlTransient;
+import javax.xml.bind.annotation.XmlType;
+
+import org.apache.isis.applib.annotation.BookmarkPolicy;
+import org.apache.isis.applib.annotation.Where;
+
+/**
+ * Describes the layout of a single action, broadly corresponding to {@link org.apache.isis.applib.annotation.ActionLayout}.
+ *
+ * <p>
+ *  Note that {@link org.apache.isis.applib.annotation.ActionLayout#contributed()} is omitted because this only applies
+ *  to domain services.
+ * </p>
+ */
+@XmlRootElement(
+        name = "action"
+)
+@XmlType(
+    name = "action"
+    , propOrder = {
+        "named"
+        , "describedAs"
+        , "metadataError"
+    }
+)
+public class ActionLayoutData implements Serializable, Owned<ActionLayoutDataOwner>, HasCssClass, HasCssClassFa,
+        HasDescribedAs, HasHidden, HasNamed, HasBookmarking {
+
+    private static final long serialVersionUID = 1L;
+
+    public ActionLayoutData() {
+    }
+    public ActionLayoutData(final String id) {
+        setId(id);
+    }
+
+    private String id;
+    /**
+     * Method name.
+     *
+     * <p>
+     *     Overloaded methods are not supported.
+     * </p>
+     */
+    @XmlAttribute(name="id", required = true)
+    public String getId() {
+        return id;
+    }
+
+    public void setId(String id) {
+        this.id = id;
+    }
+
+
+
+    private BookmarkPolicy bookmarking;
+
+    @Override
+    @XmlAttribute(required = false)
+    public BookmarkPolicy getBookmarking() {
+        return bookmarking;
+    }
+
+    @Override
+    public void setBookmarking(BookmarkPolicy bookmarking) {
+        this.bookmarking = bookmarking;
+    }
+
+
+    private String cssClass;
+
+    @Override
+    @XmlAttribute(required = false)
+    public String getCssClass() {
+        return cssClass;
+    }
+
+    @Override
+    public void setCssClass(String cssClass) {
+        this.cssClass = cssClass;
+    }
+
+
+    private String cssClassFa;
+
+    @Override
+    @XmlAttribute(required = false)
+    public String getCssClassFa() {
+        return cssClassFa;
+    }
+
+    @Override
+    public void setCssClassFa(String cssClassFa) {
+        this.cssClassFa = cssClassFa;
+    }
+
+
+
+    private org.apache.isis.applib.annotation.ActionLayout.CssClassFaPosition cssClassFaPosition;
+
+    @Override
+    @XmlAttribute(required = false)
+    public org.apache.isis.applib.annotation.ActionLayout.CssClassFaPosition getCssClassFaPosition() {
+        return cssClassFaPosition;
+    }
+
+    @Override
+    public void setCssClassFaPosition(org.apache.isis.applib.annotation.ActionLayout.CssClassFaPosition cssClassFaPosition) {
+        this.cssClassFaPosition = cssClassFaPosition;
+    }
+
+
+    private String describedAs;
+
+    @Override
+    @XmlElement(required = false)
+    public String getDescribedAs() {
+        return describedAs;
+    }
+
+    @Override
+    public void setDescribedAs(String describedAs) {
+        this.describedAs = describedAs;
+    }
+
+
+
+    private Where hidden;
+
+    @Override
+    @XmlAttribute(required = false)
+    public Where getHidden() {
+        return hidden;
+    }
+
+    @Override
+    public void setHidden(Where hidden) {
+        this.hidden = hidden;
+    }
+
+
+
+    private String named;
+
+    @Override
+    @XmlElement(required = false)
+    public String getNamed() {
+        return named;
+    }
+
+    @Override
+    public void setNamed(String named) {
+        this.named = named;
+    }
+
+
+
+    private Boolean namedEscaped;
+
+    @Override
+    @XmlAttribute(required = false)
+    public Boolean getNamedEscaped() {
+        return namedEscaped;
+    }
+
+    @Override
+    public void setNamedEscaped(Boolean namedEscaped) {
+        this.namedEscaped = namedEscaped;
+    }
+
+
+
+    private org.apache.isis.applib.annotation.ActionLayout.Position position;
+
+    @XmlAttribute(required = false)
+    public org.apache.isis.applib.annotation.ActionLayout.Position getPosition() {
+        return position;
+    }
+
+    public void setPosition(org.apache.isis.applib.annotation.ActionLayout.Position position) {
+        this.position = position;
+    }
+
+
+
+
+    private ActionLayoutDataOwner owner;
+    /**
+     * Owner.
+     *
+     * <p>
+     *     Set programmatically by framework after reading in from XML.
+     * </p>
+     */
+    @XmlTransient
+    public ActionLayoutDataOwner getOwner() {
+        return owner;
+    }
+
+    public void setOwner(final ActionLayoutDataOwner owner) {
+        this.owner = owner;
+    }
+
+
+    private String metadataError;
+
+    /**
+     * For diagnostics; populated by the framework if and only if a metadata error.
+     */
+    @XmlElement(required = false)
+    public String getMetadataError() {
+        return metadataError;
+    }
+
+    public void setMetadataError(final String metadataError) {
+        this.metadataError = metadataError;
+    }
+
+
+
+    @Override public String toString() {
+        return "ActionLayoutData{" +
+                "id='" + id + '\'' +
+                '}';
+    }
+
+
+}