You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@isis.apache.org by da...@apache.org on 2016/01/25 15:40:25 UTC

[01/50] [abbrv] isis git commit: ISIS-1296: remove -Xdoclint flag for javadoc since not recognized if using Java8 for release [Forced Update!]

Repository: isis
Updated Branches:
  refs/heads/ISIS-993 e3b93b6ad -> b04c27ff3 (forced update)


ISIS-1296: remove -Xdoclint flag for javadoc since not recognized if using Java8 for release


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

Branch: refs/heads/ISIS-993
Commit: dad09086ea2dfb806bd65ead5f4b1b5a4a286589
Parents: 9d23232
Author: Dan Haywood <da...@haywood-associates.co.uk>
Authored: Sun Jan 10 13:41:53 2016 +0000
Committer: Dan Haywood <da...@haywood-associates.co.uk>
Committed: Sun Jan 10 13:41:53 2016 +0000

----------------------------------------------------------------------
 core/pom.xml | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/isis/blob/dad09086/core/pom.xml
----------------------------------------------------------------------
diff --git a/core/pom.xml b/core/pom.xml
index 624fc0b..5b7de63 100644
--- a/core/pom.xml
+++ b/core/pom.xml
@@ -662,8 +662,10 @@
                     <version>2.9.1</version>
                     <inherited>true</inherited>
                     <configuration>
-                        <!-- as per http://stackoverflow.com/a/16743137/56880 -->
+                        <!-- as per http://stackoverflow.com/a/16743137/56880; only if using java 8 to build -->
+<!--
                         <additionalparam>-Xdoclint:none</additionalparam>
+-->
                         <debug>true</debug>
                         <minmemory>128m</minmemory>      
                         <maxmemory>1024m</maxmemory>


[15/50] [abbrv] isis git commit: ISIS-1287: move toolchains under the apache-release profile so that is only enforced when a release is being cut.

Posted by da...@apache.org.
ISIS-1287: move toolchains under the apache-release profile so that is only enforced when a release is being cut.

also update the docs.


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

Branch: refs/heads/ISIS-993
Commit: bff1f71fdd0fa8b581b1d1bbd52c76bfb15216bf
Parents: 261f859
Author: Dan Haywood <da...@haywood-associates.co.uk>
Authored: Sun Jan 24 11:44:54 2016 +0000
Committer: Dan Haywood <da...@haywood-associates.co.uk>
Committed: Sun Jan 24 11:46:20 2016 +0000

----------------------------------------------------------------------
 adocs/documentation/pom.xml                     |  2 +-
 .../guides/_cgcom_release-process-prereqs.adoc  | 10 +++
 .../asciidoc/guides/_cgcon_building-isis.adoc   | 72 ++++++++++----------
 core/pom.xml                                    | 51 ++++++++------
 example/archetype/simpleapp/pom.xml             |  2 +-
 5 files changed, 77 insertions(+), 60 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/isis/blob/bff1f71f/adocs/documentation/pom.xml
----------------------------------------------------------------------
diff --git a/adocs/documentation/pom.xml b/adocs/documentation/pom.xml
index c43f20c..5982ca8 100644
--- a/adocs/documentation/pom.xml
+++ b/adocs/documentation/pom.xml
@@ -33,7 +33,7 @@
 
     <groupId>org.apache.isis.docs</groupId>
     <artifactId>isis-documentation</artifactId>
-    <version>1.11.0-SNAPSHOT</version>
+    <version>1.12.0-SNAPSHOT</version>
     <packaging>pom</packaging>
 
     <name>Apache Isis Docs</name>

http://git-wip-us.apache.org/repos/asf/isis/blob/bff1f71f/adocs/documentation/src/main/asciidoc/guides/_cgcom_release-process-prereqs.adoc
----------------------------------------------------------------------
diff --git a/adocs/documentation/src/main/asciidoc/guides/_cgcom_release-process-prereqs.adoc b/adocs/documentation/src/main/asciidoc/guides/_cgcom_release-process-prereqs.adoc
index bb798f1..bdfd565 100644
--- a/adocs/documentation/src/main/asciidoc/guides/_cgcom_release-process-prereqs.adoc
+++ b/adocs/documentation/src/main/asciidoc/guides/_cgcom_release-process-prereqs.adoc
@@ -11,6 +11,14 @@ This section (appendix) describes the prerequisites for the xref:cgcom.adoc#_cgc
 
 
 
+== Configure toolchains plugin
+
+Apache Isis releases are built using Java 7, enforced using the maven toolchains plugin.  Ensure that Java 7 is
+installed and the toolchains plugin is configured, as described in the
+xref:_cgcon_building-isis_configure-maven-toolchains-plugin[contributors' guide].
+
+
+
 == Public/private key
 
 The most important configuration you require is to set up public/private key pair. This is used by the `maven-release-plugin` to sign the code artifacts. See the page on xref:cgcom.adoc#_cgcom_key-generation[key generation] for more details.
@@ -76,3 +84,5 @@ Also, set up keyphrase for `gpg`; this avoids being prompted during release:
 ----
 
 
+
+

http://git-wip-us.apache.org/repos/asf/isis/blob/bff1f71f/adocs/documentation/src/main/asciidoc/guides/_cgcon_building-isis.adoc
----------------------------------------------------------------------
diff --git a/adocs/documentation/src/main/asciidoc/guides/_cgcon_building-isis.adoc b/adocs/documentation/src/main/asciidoc/guides/_cgcon_building-isis.adoc
index 3dd2675..c381709 100644
--- a/adocs/documentation/src/main/asciidoc/guides/_cgcon_building-isis.adoc
+++ b/adocs/documentation/src/main/asciidoc/guides/_cgcon_building-isis.adoc
@@ -136,53 +136,31 @@ For further reading, see:
 * http://git-scm.com/docs/gitattributes[.gitattributes git-scm.com docs]
 
 
-[[_cgcon_building-isis_installing-java-7]]
-== Installing Java 7
+[[_cgcon_building-isis_installing-java]]
+== Installing Java
 
-Apache Isis is compatible with Java 7 and Java 8.  To ensure backward compatibility with Java 7 the framework is built
-using Java 7, leveraging the link:http://maven.apache.org/plugins/maven-toolchains-plugin/[Maven toolchains plugin].
-(The discussion of toolchains itself is discussed xref:_cgcon_building-isis_configure-maven-toolchains-plugin[below]).
+Apache Isis is compatible with Java 7 and Java 8.  For every-day use, the framework is usually compiled against Java 8.
 
+Releases however are xref:_cgcom_cutting-a-release[cut] using Java 7, leveraging the link
+:http://maven.apache.org/plugins/maven-toolchains-plugin/[Maven toolchains plugin]).
 
-Therefore install Java 7 JDK (and optionally Java 8 JDK as well).  Note that the JRE is _not_ sufficient.
-
+Therefore install either/both of Java 7 JDK and Java 8 JDK.  Note that the JRE is _not_ sufficient.
 
 [TIP]
 ====
-If you intend to contribute back patches to Apache Isis, note that you can still use Java 8 within your IDE to
-make changes.  Just be sure not to use any Java 8 APIs.
-====
-
-
-
-
-[[_cgcon_building-isis_installing-maven]]
-== Installing Maven
-
-Install Maven 3.0.x, downloadable http://maven.apache.org/download.html[here].
-
-Set `MAVEN_OPTS` environment variable:
-
-[source,bash]
-----
-export MAVEN_OPTS="-Xms512m -Xmx1024m"
-----
-
-
-[NOTE]
-====
-Previously we suggested `-XX:MaxPermSize=256m`, but this option has been removed in Java 8.  (As of 1.9.0, Apache Isis is built using Java 8 but with source and target set to JDK 1.7).
+If you intend to contribute back patches to Apache Isis, note that while you can develop using Java 8 within your IDE,
+be sure not to use any Java 8 APIs.
 ====
 
-
 [[_cgcon_building-isis_configure-maven-toolchains-plugin]]
-== Configure Maven toolchains plugin
+=== Configure Maven toolchains plugin
 
-As noted xref:_cgcon_building-isis_installing-java-7[earlier], Apache Isis is built using Java 7, leveraging the
-link:http://maven.apache.org/plugins/maven-toolchains-plugin/[toolchains] plugin.  This is configured by placing the
-`toolchains.xml` file in `~/.m2` directory.
+If you are a committer that will be performing releases of Apache Isis, then you _must_ configure the
+link:http://maven.apache.org/plugins/maven-toolchains-plugin/[toolchains] plugin so that releases can be built using
+Java 7.
 
-You can use the following file as a template, adjusting paths for your platform:
+This is done by placing the `toolchains.xml` file in `~/.m2` directory.  Use the following file as a template,
+adjusting paths for your platform:
 
 [source,xml]
 ----
@@ -218,6 +196,28 @@ You can use the following file as a template, adjusting paths for your platform:
 ----
 <1> The Apache Isis build is configured to search for the (`1.7, oracle`) JDK toolchain.
 
+The Apache Isis parent `pom.xml` activates this plugin whenever the `apache-release` profile is enabled.
+
+
+
+
+[[_cgcon_building-isis_installing-maven]]
+== Installing Maven
+
+Install Maven 3.0.x, downloadable http://maven.apache.org/download.html[here].
+
+Set `MAVEN_OPTS` environment variable:
+
+[source,bash]
+----
+export MAVEN_OPTS="-Xms512m -Xmx1024m"
+----
+
+
+[NOTE]
+====
+Previously we suggested `-XX:MaxPermSize=256m`, but this option has been removed in Java 8.  (As of 1.9.0, Apache Isis is built using Java 8 but with source and target set to JDK 1.7).
+====
 
 
 [[_cgcon_building-isis_building-all-of-apache-isis]]

http://git-wip-us.apache.org/repos/asf/isis/blob/bff1f71f/core/pom.xml
----------------------------------------------------------------------
diff --git a/core/pom.xml b/core/pom.xml
index bdb7e32..d5873ab 100644
--- a/core/pom.xml
+++ b/core/pom.xml
@@ -963,34 +963,14 @@
             </plugins>
         </pluginManagement>
 
+
+
         <!-- build plugins; apply to all inheriting modules. Note that some 
             plugins also come from the "super-POM" for the default bindings. For example, 
             in the 'default' lifecycle, the resources, compiler, surefire, jar, install 
             and deploy plugins are automatically included because they provide the default 
             bindings. For the 'site' lifecycle, the site plugin is automatically included. -->
         <plugins>
-
-            <plugin>
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-toolchains-plugin</artifactId>
-                <version>1.1</version>
-                <executions>
-                    <execution>
-                        <goals>
-                            <goal>toolchain</goal>
-                        </goals>
-                    </execution>
-                </executions>
-                <configuration>
-                    <toolchains>
-                        <jdk>
-                            <version>1.7</version>
-                            <vendor>oracle</vendor>
-                        </jdk>
-                    </toolchains>
-                </configuration>
-            </plugin>
-
             <plugin>
                 <groupId>org.apache.maven.plugins</groupId>
                 <artifactId>maven-enforcer-plugin</artifactId>
@@ -1992,6 +1972,33 @@ ${license.additional-notes}
 
     <profiles>
         <profile>
+            <id>apache-release</id>
+            <build>
+                <plugins>
+                    <plugin>
+                        <groupId>org.apache.maven.plugins</groupId>
+                        <artifactId>maven-toolchains-plugin</artifactId>
+                        <version>1.1</version>
+                        <executions>
+                            <execution>
+                                <goals>
+                                    <goal>toolchain</goal>
+                                </goals>
+                            </execution>
+                        </executions>
+                        <configuration>
+                            <toolchains>
+                                <jdk>
+                                    <version>1.7</version>
+                                    <vendor>oracle</vendor>
+                                </jdk>
+                            </toolchains>
+                        </configuration>
+                    </plugin>
+                </plugins>
+            </build>
+        </profile>
+        <profile>
             <id>m2e</id>
             <activation>
                 <property>

http://git-wip-us.apache.org/repos/asf/isis/blob/bff1f71f/example/archetype/simpleapp/pom.xml
----------------------------------------------------------------------
diff --git a/example/archetype/simpleapp/pom.xml b/example/archetype/simpleapp/pom.xml
index e884eab..fa653ef 100644
--- a/example/archetype/simpleapp/pom.xml
+++ b/example/archetype/simpleapp/pom.xml
@@ -44,7 +44,7 @@
     <parent>
         <groupId>org.apache.isis.core</groupId>
         <artifactId>isis</artifactId>
-        <version>1.11.1</version>
+        <version>1.12.0-SNAPSHOT</version>
         <relativePath>../../../core/pom.xml</relativePath>
     </parent>
 </project>


[27/50] [abbrv] isis git commit: ISIS-993: add the ObjectLayoutMetadata#actions collection if null

Posted by da...@apache.org.
ISIS-993: add the ObjectLayoutMetadata#actions collection if null


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

Branch: refs/heads/ISIS-993
Commit: a1ed89036b46d00f7ed17a9ea19840e0704e8700
Parents: ea02966
Author: Dan Haywood <da...@haywood-associates.co.uk>
Authored: Sat Jan 9 07:46:49 2016 +0000
Committer: Dan Haywood <da...@haywood-associates.co.uk>
Committed: Mon Jan 25 14:38:24 2016 +0000

----------------------------------------------------------------------
 .../services/layout/ObjectLayoutMetadataServiceDefault.java   | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/isis/blob/a1ed8903/core/metamodel/src/main/java/org/apache/isis/core/metamodel/services/layout/ObjectLayoutMetadataServiceDefault.java
----------------------------------------------------------------------
diff --git a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/services/layout/ObjectLayoutMetadataServiceDefault.java b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/services/layout/ObjectLayoutMetadataServiceDefault.java
index e2a2e1d..3080769 100644
--- a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/services/layout/ObjectLayoutMetadataServiceDefault.java
+++ b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/services/layout/ObjectLayoutMetadataServiceDefault.java
@@ -272,7 +272,12 @@ public class ObjectLayoutMetadataServiceDefault
 
         if(!missingActionIds.isEmpty()) {
             for (String actionId : missingActionIds) {
-                metadata.getActions().add(new ActionLayoutMetadata(actionId));
+                List<ActionLayoutMetadata> actions = metadata.getActions();
+                if(actions == null) {
+                    actions = Lists.newArrayList();
+                    metadata.setActions(actions);
+                }
+                actions.add(new ActionLayoutMetadata(actionId));
             }
         }
     }


[29/50] [abbrv] isis git commit: ISIS-993: working towards getting dynamic reloading working smoothly - not there yet.

Posted by da...@apache.org.
http://git-wip-us.apache.org/repos/asf/isis/blob/47f4aea4/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/tabgroups/EntityTabGroupsPanel$EntityTabPanel.html
----------------------------------------------------------------------
diff --git a/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/tabgroups/EntityTabGroupsPanel$EntityTabPanel.html b/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/tabgroups/EntityTabGroupsPanel$EntityTabPanel.html
index 025253b..3578772 100644
--- a/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/tabgroups/EntityTabGroupsPanel$EntityTabPanel.html
+++ b/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/tabgroups/EntityTabGroupsPanel$EntityTabPanel.html
@@ -21,7 +21,10 @@
 <body>
 <wicket:panel>
 	<div class="tabPanel">
-        <div wicket:id="entityPropertiesAndCollections"></div>
+		<form class="inputForm" role="form">
+			<div wicket:id="entityPropertiesAndCollections">
+			</div>
+		</form>
 	</div>
 </wicket:panel>
 </body>

http://git-wip-us.apache.org/repos/asf/isis/blob/47f4aea4/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/tabgroups/EntityTabGroupsPanel.java
----------------------------------------------------------------------
diff --git a/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/tabgroups/EntityTabGroupsPanel.java b/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/tabgroups/EntityTabGroupsPanel.java
index 2667d05..0889e1a 100644
--- a/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/tabgroups/EntityTabGroupsPanel.java
+++ b/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/tabgroups/EntityTabGroupsPanel.java
@@ -21,7 +21,10 @@ package org.apache.isis.viewer.wicket.ui.components.entity.tabgroups;
 
 import java.util.List;
 
+import javax.xml.bind.Marshaller;
+
 import com.google.common.collect.FluentIterable;
+import com.google.common.collect.ImmutableMap;
 import com.google.common.collect.Lists;
 
 import org.apache.wicket.extensions.markup.html.tabs.AbstractTab;
@@ -35,6 +38,7 @@ import org.apache.isis.applib.layout.v1_0.ObjectLayoutMetadata;
 import org.apache.isis.applib.layout.v1_0.Tab;
 import org.apache.isis.applib.layout.v1_0.TabGroup;
 import org.apache.isis.applib.services.jaxb.JaxbService;
+import org.apache.isis.applib.services.layout.Object_downloadLayoutXml;
 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.layoutmetadata.ObjectLayoutMetadataFacet;
@@ -75,10 +79,16 @@ public class EntityTabGroupsPanel extends PanelAbstract<EntityModel> {
         final ObjectLayoutMetadataFacet objectLayoutMetadataFacet = model.getTypeOfSpecification().getFacet(ObjectLayoutMetadataFacet.class);
         final ObjectLayoutMetadata objectLayoutMetadata = objectLayoutMetadataFacet.getMetadata();
 
+
         // TODO: debugging, remove
-        final String xml = getServicesInjector().lookupService(JaxbService.class).toXml(objectLayoutMetadata);
+        final JaxbService jaxbService = getServicesInjector().lookupService(JaxbService.class);
+        final String xml = jaxbService.toXml(objectLayoutMetadata,
+                ImmutableMap.<String,Object>of(
+                        Marshaller.JAXB_SCHEMA_LOCATION,
+                        Object_downloadLayoutXml.TNS + " " + Object_downloadLayoutXml.SCHEMA_LOCATION));
         System.out.println(xml);
 
+
         addOrReplace(ComponentType.ENTITY_SUMMARY, model);
 
         final List<TabGroup> tabGroups = FluentIterable
@@ -122,8 +132,7 @@ public class EntityTabGroupsPanel extends PanelAbstract<EntityModel> {
         public EntityTabPanel(String id, final EntityModel model, final Tab tab) {
             super(id);
 
-            final EntityModel modelWithTabHints = new EntityModel(model.getPageParameters());
-            modelWithTabHints.withTabMetadata(tab);
+            final EntityModel modelWithTabHints = model.cloneWithTabMetadata(tab);
 
             getComponentFactoryRegistry().addOrReplaceComponent(this, ID_ENTITY_PROPERTIES_AND_COLLECTIONS, ComponentType.ENTITY_PROPERTIES, modelWithTabHints);
         }

http://git-wip-us.apache.org/repos/asf/isis/blob/47f4aea4/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/tabgroups/EntityTabGroupsPanelFactory.java
----------------------------------------------------------------------
diff --git a/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/tabgroups/EntityTabGroupsPanelFactory.java b/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/tabgroups/EntityTabGroupsPanelFactory.java
index 4171d89..d602730 100644
--- a/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/tabgroups/EntityTabGroupsPanelFactory.java
+++ b/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/tabgroups/EntityTabGroupsPanelFactory.java
@@ -28,6 +28,7 @@ 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.entity.combined.EntityCombinedPanel;
 
 /**
  * {@link ComponentFactory} for {@link EntityTabGroupsPanel}.
@@ -44,13 +45,20 @@ public class EntityTabGroupsPanelFactory extends EntityComponentFactoryAbstract
 
     @Override
     protected ApplicationAdvice doAppliesTo(final EntityModel entityModel) {
-        final ObjectSpecification specification = entityModel.getTypeOfSpecification();
-        return appliesIf(specification.containsDoOpFacet(ObjectLayoutMetadataFacet.class));
+        return super.doAppliesTo(entityModel); // TODO: remove this override
     }
 
     @Override
     public Component createComponent(final String id, final IModel<?> model) {
+
         final EntityModel entityModel = (EntityModel) model;
-        return new EntityTabGroupsPanel(id, entityModel);
+
+        final ObjectSpecification specification = entityModel.getTypeOfSpecification();
+        final ObjectLayoutMetadataFacet facet = specification.getFacet(ObjectLayoutMetadataFacet.class);
+        facet.reloadMetadata();
+        final boolean hasLayout = !facet.isNoop();
+        return hasLayout
+                ? new EntityTabGroupsPanel(id, entityModel)
+                : new EntityCombinedPanel(id, entityModel);
     }
 }

http://git-wip-us.apache.org/repos/asf/isis/blob/47f4aea4/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 e068168..d12a496 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
@@ -34,6 +34,7 @@ import org.apache.isis.core.metamodel.adapter.mgr.AdapterManager.ConcurrencyChec
 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.layoutmetadata.ObjectLayoutMetadataFacet;
 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;
@@ -134,20 +135,17 @@ public class EntityPage extends PageAbstract {
         //
         // invalidate the cache so that can do dynamic reloading of layout metadata etc.
         //
-        // Note that it's necessary to load the page twice.  (I think) that the first time is to load the new
-        // Java class files into the webapp (but too "late" to be used), the second then works.
-        // Moving this functionality earlier on in the web request pipeline (eg WebRequestCycleForIsis)
-        // made no difference.
-        //
-        // what might help is using some sort of daemon process to monitor when the class files change, and then
-        // reload (a la JRebel).  Don't think DCEVM by itself is enough, but possibly using
-        // https://github.com/fakereplace/fakereplace or https://github.com/spring-projects/spring-loaded
-        // might instead suffice since they provide a java agent similar to JRebel.
-        //
-        if(!getDeploymentType().isProduction()) {
-            getSpecificationLoader().invalidateCacheFor(objectAdapter.getObject());
+        final ObjectLayoutMetadataFacet facet = entityModel.getTypeOfSpecification()
+                .getFacet(ObjectLayoutMetadataFacet.class);
+        if(facet != null) {
+            // the facet should always exist
+            //
+            // it's sufficient to simply call reloadMetadata().
+            // The facet checks the ObjectLayoutMetadataService to determine if dynamic reloading is enabled.
+            facet.reloadMetadata();
         }
 
+
         if(titleString == null) {
             final String titleStr = objectAdapter.titleString(null);
             setTitle(titleStr);


[50/50] [abbrv] isis git commit: ISIS-993: started to add tab component

Posted by da...@apache.org.
ISIS-993: started to add tab component


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

Branch: refs/heads/ISIS-993
Commit: 0f3d01fda549b310f28a679af714bac95bbf6c74
Parents: 4a8ff11
Author: Dan Haywood <da...@haywood-associates.co.uk>
Authored: Thu Jan 7 08:20:40 2016 +0000
Committer: Dan Haywood <da...@haywood-associates.co.uk>
Committed: Mon Jan 25 14:38:24 2016 +0000

----------------------------------------------------------------------
 .../schema/applib/layout/layout-1.0.xsd         | 10 ++--
 .../asciidoc/schema/applib/layout/layout.xsd    | 10 ++--
 .../isis/applib/layout/v1_0/Collection.java     |  3 ++
 .../isis/applib/layout/v1_0/DomainObject.java   |  8 +++
 .../isis/applib/layout/v1_0/Property.java       | 26 +++++----
 .../isis/applib/layout/v1_0/PropertyGroup.java  |  3 ++
 .../org/apache/isis/applib/layout/v1_0/Tab.java |  3 +-
 .../layoutxml/v1_0/DomainObjectTest.java        |  1 +
 .../EntityTabbedPanel$EntityTabPanel.html       | 29 ++++++++++
 .../entity/tabbed/EntityTabbedPanel.html        |  4 +-
 .../entity/tabbed/EntityTabbedPanel.java        | 56 ++++++++++++++++++--
 .../dom/simple/SimpleObject.layout.xml          | 16 +++++-
 12 files changed, 140 insertions(+), 29 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/isis/blob/0f3d01fd/adocs/documentation/src/main/asciidoc/schema/applib/layout/layout-1.0.xsd
----------------------------------------------------------------------
diff --git a/adocs/documentation/src/main/asciidoc/schema/applib/layout/layout-1.0.xsd b/adocs/documentation/src/main/asciidoc/schema/applib/layout/layout-1.0.xsd
index 63fa0a5..221c807 100644
--- a/adocs/documentation/src/main/asciidoc/schema/applib/layout/layout-1.0.xsd
+++ b/adocs/documentation/src/main/asciidoc/schema/applib/layout/layout-1.0.xsd
@@ -1,9 +1,9 @@
 <?xml version="1.0" standalone="yes"?>
 <xs:schema elementFormDefault="qualified" version="1.0" targetNamespace="http://isis.apache.org/schema/applib/layout" xmlns:tns="http://isis.apache.org/schema/applib/layout" xmlns:xs="http://www.w3.org/2001/XMLSchema">
 
-  <xs:element name="domainObject" type="tns:domain-object"/>
+  <xs:element name="domainObject" type="tns:domainObject"/>
 
-  <xs:complexType name="domain-object">
+  <xs:complexType name="domainObject">
     <xs:sequence>
       <xs:element name="actions">
         <xs:complexType>
@@ -45,11 +45,11 @@
 
   <xs:complexType name="tab">
     <xs:sequence>
-      <xs:element name="name" type="xs:string" minOccurs="0"/>
       <xs:element name="left" type="tns:column"/>
       <xs:element name="middle" type="tns:column" minOccurs="0"/>
       <xs:element name="right" type="tns:column" minOccurs="0"/>
     </xs:sequence>
+    <xs:attribute name="name" type="xs:string" use="required"/>
   </xs:complexType>
 
   <xs:complexType name="column">
@@ -78,10 +78,10 @@
 
   <xs:complexType name="property">
     <xs:sequence>
-      <xs:element name="actions" minOccurs="0">
+      <xs:element name="actions">
         <xs:complexType>
           <xs:sequence>
-            <xs:element name="action" type="tns:action" maxOccurs="unbounded"/>
+            <xs:element name="action" type="tns:action" minOccurs="0" maxOccurs="unbounded"/>
           </xs:sequence>
         </xs:complexType>
       </xs:element>

http://git-wip-us.apache.org/repos/asf/isis/blob/0f3d01fd/adocs/documentation/src/main/asciidoc/schema/applib/layout/layout.xsd
----------------------------------------------------------------------
diff --git a/adocs/documentation/src/main/asciidoc/schema/applib/layout/layout.xsd b/adocs/documentation/src/main/asciidoc/schema/applib/layout/layout.xsd
index 63fa0a5..221c807 100644
--- a/adocs/documentation/src/main/asciidoc/schema/applib/layout/layout.xsd
+++ b/adocs/documentation/src/main/asciidoc/schema/applib/layout/layout.xsd
@@ -1,9 +1,9 @@
 <?xml version="1.0" standalone="yes"?>
 <xs:schema elementFormDefault="qualified" version="1.0" targetNamespace="http://isis.apache.org/schema/applib/layout" xmlns:tns="http://isis.apache.org/schema/applib/layout" xmlns:xs="http://www.w3.org/2001/XMLSchema">
 
-  <xs:element name="domainObject" type="tns:domain-object"/>
+  <xs:element name="domainObject" type="tns:domainObject"/>
 
-  <xs:complexType name="domain-object">
+  <xs:complexType name="domainObject">
     <xs:sequence>
       <xs:element name="actions">
         <xs:complexType>
@@ -45,11 +45,11 @@
 
   <xs:complexType name="tab">
     <xs:sequence>
-      <xs:element name="name" type="xs:string" minOccurs="0"/>
       <xs:element name="left" type="tns:column"/>
       <xs:element name="middle" type="tns:column" minOccurs="0"/>
       <xs:element name="right" type="tns:column" minOccurs="0"/>
     </xs:sequence>
+    <xs:attribute name="name" type="xs:string" use="required"/>
   </xs:complexType>
 
   <xs:complexType name="column">
@@ -78,10 +78,10 @@
 
   <xs:complexType name="property">
     <xs:sequence>
-      <xs:element name="actions" minOccurs="0">
+      <xs:element name="actions">
         <xs:complexType>
           <xs:sequence>
-            <xs:element name="action" type="tns:action" maxOccurs="unbounded"/>
+            <xs:element name="action" type="tns:action" minOccurs="0" maxOccurs="unbounded"/>
           </xs:sequence>
         </xs:complexType>
       </xs:element>

http://git-wip-us.apache.org/repos/asf/isis/blob/0f3d01fd/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/Collection.java
----------------------------------------------------------------------
diff --git a/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/Collection.java b/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/Collection.java
index 4c48c2a..cf2dc48 100644
--- a/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/Collection.java
+++ b/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/Collection.java
@@ -61,6 +61,9 @@ public class Collection implements ColumnContent, ActionHolder {
 
     private List<Action> actions = Lists.newArrayList();
 
+    /**
+     * The <code>&lt;actions&gt;</code> element must be present but can be empty.
+     */
     @XmlElementWrapper(name = "actions", required = true)
     @XmlElement(name = "action", required = false)
     public List<Action> getActions() {

http://git-wip-us.apache.org/repos/asf/isis/blob/0f3d01fd/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/DomainObject.java
----------------------------------------------------------------------
diff --git a/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/DomainObject.java b/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/DomainObject.java
index c1868fc..c5fa00d 100644
--- a/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/DomainObject.java
+++ b/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/DomainObject.java
@@ -45,6 +45,10 @@ public class DomainObject implements Dto, ActionHolder {
 
     private List<Action> actions = Lists.newArrayList();
 
+
+    /**
+     * The <code>&lt;actions&gt;</code> element must be present but can be empty.
+     */
     @XmlElementWrapper(name = "actions", required = true)
     @XmlElement(name = "action", required = false)
     public List<Action> getActions() {
@@ -62,6 +66,10 @@ public class DomainObject implements Dto, ActionHolder {
     }};
 
     // no wrapper
+
+    /**
+     * Must have at least one tab group; no wrapper.
+     */
     @XmlElement(name = "tabGroup", required = true)
     public List<TabGroup> getTabGroups() {
         return tabGroups;

http://git-wip-us.apache.org/repos/asf/isis/blob/0f3d01fd/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/Property.java
----------------------------------------------------------------------
diff --git a/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/Property.java b/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/Property.java
index d3ee9b2..5345d06 100644
--- a/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/Property.java
+++ b/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/Property.java
@@ -58,6 +58,21 @@ public class Property implements ActionHolder {
     }
 
 
+    private List<Action> actions = Lists.newArrayList();
+
+    /**
+     * The <code>&lt;actions&gt;</code> element must be present but can be empty.
+     */
+    @XmlElementWrapper(required = true)
+    @XmlElement(name = "action", required = false)
+    public List<Action> getActions() {
+        return actions;
+    }
+
+    public void setActions(List<Action> actions) {
+        this.actions = actions;
+    }
+
     private PropertyLayout layout = new PropertyLayout();
 
     @XmlElement(required = true)
@@ -70,15 +85,4 @@ public class Property implements ActionHolder {
     }
 
 
-    private List<Action> actions = Lists.newArrayList();
-
-    @XmlElementWrapper(required = false)
-    @XmlElement(name = "action", required = true)
-    public List<Action> getActions() {
-        return actions;
-    }
-
-    public void setActions(List<Action> actions) {
-        this.actions = actions;
-    }
 }

http://git-wip-us.apache.org/repos/asf/isis/blob/0f3d01fd/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/PropertyGroup.java
----------------------------------------------------------------------
diff --git a/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/PropertyGroup.java b/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/PropertyGroup.java
index 9d883fa..e7b169f 100644
--- a/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/PropertyGroup.java
+++ b/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/PropertyGroup.java
@@ -64,6 +64,9 @@ public class PropertyGroup implements ColumnContent, ActionHolder {
 
     private List<Action> actions = Lists.newArrayList();
 
+    /**
+     * The <code>&lt;actions&gt;</code> element must be present but can be empty.
+     */
     @XmlElementWrapper(required = true)
     @XmlElement(name = "action", required = false)
     public List<Action> getActions() {

http://git-wip-us.apache.org/repos/asf/isis/blob/0f3d01fd/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/Tab.java
----------------------------------------------------------------------
diff --git a/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/Tab.java b/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/Tab.java
index 43ea13f..988d1e8 100644
--- a/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/Tab.java
+++ b/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/Tab.java
@@ -18,6 +18,7 @@
  */
 package org.apache.isis.applib.layout.v1_0;
 
+import javax.xml.bind.annotation.XmlAttribute;
 import javax.xml.bind.annotation.XmlElement;
 import javax.xml.bind.annotation.XmlType;
 
@@ -34,7 +35,7 @@ public class Tab {
 
     private String name;
 
-    @XmlElement(required = false)
+    @XmlAttribute(required = true)
     public String getName() {
         return name;
     }

http://git-wip-us.apache.org/repos/asf/isis/blob/0f3d01fd/core/metamodel/src/test/java/org/apache/isis/core/metamodel/layoutxml/v1_0/DomainObjectTest.java
----------------------------------------------------------------------
diff --git a/core/metamodel/src/test/java/org/apache/isis/core/metamodel/layoutxml/v1_0/DomainObjectTest.java b/core/metamodel/src/test/java/org/apache/isis/core/metamodel/layoutxml/v1_0/DomainObjectTest.java
index 26f361c..51269c5 100644
--- a/core/metamodel/src/test/java/org/apache/isis/core/metamodel/layoutxml/v1_0/DomainObjectTest.java
+++ b/core/metamodel/src/test/java/org/apache/isis/core/metamodel/layoutxml/v1_0/DomainObjectTest.java
@@ -63,6 +63,7 @@ public class DomainObjectTest {
 
         TabGroup tabGroup = domainObject.getTabGroups().get(0);
         Tab tab = tabGroup.getTabs().get(0);
+        tab.setName("Common");
         Column left = tab.getLeft();
 
         PropertyGroup leftPropGroup = new PropertyGroup();

http://git-wip-us.apache.org/repos/asf/isis/blob/0f3d01fd/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/tabbed/EntityTabbedPanel$EntityTabPanel.html
----------------------------------------------------------------------
diff --git a/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/tabbed/EntityTabbedPanel$EntityTabPanel.html b/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/tabbed/EntityTabbedPanel$EntityTabPanel.html
new file mode 100644
index 0000000..94582b1
--- /dev/null
+++ b/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/tabbed/EntityTabbedPanel$EntityTabPanel.html
@@ -0,0 +1,29 @@
+<?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">
+        <div wicket:id="entityPropertiesAndCollections"></div>
+
+	</div>
+</wicket:panel>
+</body>
+</html>

http://git-wip-us.apache.org/repos/asf/isis/blob/0f3d01fd/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/tabbed/EntityTabbedPanel.html
----------------------------------------------------------------------
diff --git a/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/tabbed/EntityTabbedPanel.html b/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/tabbed/EntityTabbedPanel.html
index 8165722..999a22e 100644
--- a/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/tabbed/EntityTabbedPanel.html
+++ b/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/tabbed/EntityTabbedPanel.html
@@ -22,7 +22,9 @@
 <wicket:panel>
 	<div class="entityTabbed">
 		<div wicket:id="entitySummary"></div>
-		<div wicket:id="entityPropertiesAndCollections"></div>
+
+        <div wicket:id="tabs">[tabbed panel will be here]</div>
+
 	</div>
 </wicket:panel>
 </body>

http://git-wip-us.apache.org/repos/asf/isis/blob/0f3d01fd/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/tabbed/EntityTabbedPanel.java
----------------------------------------------------------------------
diff --git a/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/tabbed/EntityTabbedPanel.java b/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/tabbed/EntityTabbedPanel.java
index c1e37cd..c1c65ba 100644
--- a/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/tabbed/EntityTabbedPanel.java
+++ b/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/tabbed/EntityTabbedPanel.java
@@ -19,7 +19,18 @@
 
 package org.apache.isis.viewer.wicket.ui.components.entity.tabbed;
 
+import java.util.List;
+
+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.markup.html.panel.Panel;
+import org.apache.wicket.model.Model;
+
 import org.apache.isis.applib.layout.v1_0.DomainObject;
+import org.apache.isis.applib.layout.v1_0.Tab;
+import org.apache.isis.applib.layout.v1_0.TabGroup;
 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.layoutxml.LayoutXmlFacet;
@@ -28,6 +39,8 @@ 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;
 
+import de.agilecoders.wicket.core.markup.html.bootstrap.tabs.AjaxBootstrapTabbedPanel;
+
 /**
  * {@link PanelAbstract Panel} to represent an entity on a single page made up
  * of several &lt;div&gt; regions.
@@ -53,13 +66,48 @@ public class EntityTabbedPanel extends PanelAbstract<EntityModel> {
             CssClassAppender.appendCssClassTo(this, cssClass);
         }
 
-        LayoutXmlFacet layoutXmlFacet = model.getTypeOfSpecification().getFacet(LayoutXmlFacet.class);
-        // force metadata to be derived && synced
-        DomainObject currentlyUnused = layoutXmlFacet.getLayoutMetadata();
+        // forces metadata to be derived && synced
+        final LayoutXmlFacet layoutXmlFacet = model.getTypeOfSpecification().getFacet(LayoutXmlFacet.class);
+        final DomainObject domainObject = layoutXmlFacet.getLayoutMetadata();
+
 
         addOrReplace(ComponentType.ENTITY_SUMMARY, model);
 
-        getComponentFactoryRegistry().addOrReplaceComponent(this, ID_ENTITY_PROPERTIES_AND_COLLECTIONS, ComponentType.ENTITY_PROPERTIES, model);
+
+        List<TabGroup> tabGroups = domainObject.getTabGroups();
+        TabGroup tabGroup = tabGroups.get(0);
+
+        List<ITab> tabs = Lists.newArrayList();
+        List<Tab> tabList = tabGroup.getTabs();
+
+        for (Tab tab : tabList) {
+
+            tabs.add(new AbstractTab(Model.of(tab.getName())) {
+                private static final long serialVersionUID = 1L;
+
+                @Override
+                public Panel getPanel(String panelId) {
+                    return new EntityTabPanel(panelId, getModel());
+                }
+
+            });
+
+        }
+
+
+        addOrReplace(new AjaxBootstrapTabbedPanel("tabs", tabs));
+
+    }
+
+    private static class EntityTabPanel extends PanelAbstract {
+        private static final long serialVersionUID = 1L;
+
+        public EntityTabPanel(String id, final EntityModel model) {
+            super(id);
+            getComponentFactoryRegistry().addOrReplaceComponent(this, ID_ENTITY_PROPERTIES_AND_COLLECTIONS, ComponentType.ENTITY_PROPERTIES, model);
+
+        }
+
     }
 
 

http://git-wip-us.apache.org/repos/asf/isis/blob/0f3d01fd/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 b479d1c..036b99d 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
@@ -4,15 +4,27 @@
         <action id="delete"/>
     </actions>
     <tabGroup>
-        <tab>
+        <tab name="Common">
             <left span="4">
                 <propertyGroup name="General">
                     <actions/>
                     <property id="name">
                         <actions>
                             <action id="updateName"/>
-                            <action id="downloadJdoMetadata"/>
                         </actions>
+                        <layout/>
+                    </property>
+                </propertyGroup>
+            </left>
+        </tab>
+        <tab name="Other">
+            <left span="4">
+                <propertyGroup name="Metadata">
+                    <actions>
+                        <action id="downloadJdoMetadata"/>
+                    </actions>
+                    <property id="versionSequence">
+                        <actions/>
                         <layout labelPosition="TOP" multiLine="5" cssClass="abcde"/>
                     </property>
                 </propertyGroup>


[37/50] [abbrv] isis git commit: ISIS-993: optional left and right columns either side of tab groups; tweaks to CSS; HasPath for all elements of the layout metadata classes (working towards support for persistence of widget state and hints)

Posted by da...@apache.org.
ISIS-993: optional left and right columns either side of tab groups; tweaks to CSS; HasPath for all elements of the layout metadata classes (working towards support for persistence of widget state and hints)


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

Branch: refs/heads/ISIS-993
Commit: b04c27ff347ca314e5e68b78e8a9107dc96f3c4e
Parents: d83b2cf
Author: Dan Haywood <da...@haywood-associates.co.uk>
Authored: Thu Jan 14 07:16:00 2016 +0000
Committer: Dan Haywood <da...@haywood-associates.co.uk>
Committed: Mon Jan 25 14:38:24 2016 +0000

----------------------------------------------------------------------
 .../schema/applib/layout/layout-1.0.xsd         | 38 ++++-----
 .../asciidoc/schema/applib/layout/layout.xsd    | 38 ++++-----
 .../isis/applib/layout/v1_0/ActionHolder.java   | 25 ------
 .../layout/v1_0/ActionLayoutMetadata.java       | 26 +++++-
 .../isis/applib/layout/v1_0/ActionOwner.java    | 25 ++++++
 .../layout/v1_0/CollectionLayoutMetadata.java   | 20 ++++-
 .../apache/isis/applib/layout/v1_0/Column.java  | 27 ++++++-
 .../isis/applib/layout/v1_0/ColumnHolder.java   | 23 ------
 .../isis/applib/layout/v1_0/ColumnOwner.java    | 23 ++++++
 .../apache/isis/applib/layout/v1_0/HasPath.java | 32 ++++++++
 .../layout/v1_0/ObjectLayoutMetadata.java       | 67 +++++++++++----
 .../apache/isis/applib/layout/v1_0/Owned.java   | 23 ++++++
 .../apache/isis/applib/layout/v1_0/Owner.java   | 24 ++++++
 .../isis/applib/layout/v1_0/PropertyGroup.java  | 21 ++++-
 .../layout/v1_0/PropertyLayoutMetadata.java     | 20 ++++-
 .../org/apache/isis/applib/layout/v1_0/Tab.java | 20 ++++-
 .../isis/applib/layout/v1_0/TabGroup.java       | 45 +++++++----
 .../isis/applib/layout/v1_0/TabGroupOwner.java  | 23 ++++++
 .../ObjectLayoutMetadataFacetDefault.java       | 85 +++++++++++++++++---
 .../v1_0/ObjectLayoutMetadataTest.java          |  2 +
 .../properties/EntityPropertiesPanel.html       |  2 +-
 .../entity/tabgroups/EntityTabGroupsPanel.html  | 10 ++-
 .../entity/tabgroups/EntityTabGroupsPanel.java  | 51 ++++++++++--
 .../wicket/ui/pages/bootstrap-overrides.css     | 26 +++++-
 .../dom/simple/SimpleObject.layout.xml          | 30 +++----
 25 files changed, 558 insertions(+), 168 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/isis/blob/b04c27ff/adocs/documentation/src/main/asciidoc/schema/applib/layout/layout-1.0.xsd
----------------------------------------------------------------------
diff --git a/adocs/documentation/src/main/asciidoc/schema/applib/layout/layout-1.0.xsd b/adocs/documentation/src/main/asciidoc/schema/applib/layout/layout-1.0.xsd
index 7a3e949..9628c78 100644
--- a/adocs/documentation/src/main/asciidoc/schema/applib/layout/layout-1.0.xsd
+++ b/adocs/documentation/src/main/asciidoc/schema/applib/layout/layout-1.0.xsd
@@ -12,7 +12,9 @@
           </xs:sequence>
         </xs:complexType>
       </xs:element>
+      <xs:element name="left" type="tns:column" minOccurs="0"/>
       <xs:element name="tabGroup" type="tns:tabGroup" maxOccurs="unbounded"/>
+      <xs:element name="right" type="tns:column" minOccurs="0"/>
     </xs:sequence>
   </xs:complexType>
 
@@ -32,25 +34,10 @@
     <xs:attribute name="position" type="tns:position"/>
   </xs:complexType>
 
-  <xs:complexType name="tabGroup">
-    <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:column"/>
-      <xs:element name="middle" type="tns:column" minOccurs="0"/>
-      <xs:element name="right" type="tns:column" minOccurs="0"/>
-    </xs:sequence>
-    <xs:attribute name="name" type="xs:string" use="required"/>
-  </xs:complexType>
-
   <xs:complexType name="column">
     <xs:sequence>
       <xs:element name="propertyGroup" type="tns:propertyGroup" minOccurs="0" maxOccurs="unbounded"/>
-      <xs:element name="collection" type="tns:collectionLayoutXml" minOccurs="0" maxOccurs="unbounded"/>
+      <xs:element name="collection" type="tns:collectionLayoutMetadata" minOccurs="0" maxOccurs="unbounded"/>
     </xs:sequence>
     <xs:attribute name="span" type="xs:int" use="required"/>
   </xs:complexType>
@@ -92,7 +79,7 @@
     <xs:attribute name="typicalLength" type="xs:int"/>
   </xs:complexType>
 
-  <xs:complexType name="collectionLayoutXml">
+  <xs:complexType name="collectionLayoutMetadata">
     <xs:sequence>
       <xs:element name="named" type="xs:string" minOccurs="0"/>
       <xs:element name="describedAs" type="xs:string" minOccurs="0"/>
@@ -114,6 +101,21 @@
     <xs:attribute name="paged" type="xs:int"/>
   </xs:complexType>
 
+  <xs:complexType name="tabGroup">
+    <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:column"/>
+      <xs:element name="middle" type="tns:column" minOccurs="0"/>
+      <xs:element name="right" type="tns:column" minOccurs="0"/>
+    </xs:sequence>
+    <xs:attribute name="name" type="xs:string" use="required"/>
+  </xs:complexType>
+
   <xs:simpleType name="bookmarkPolicy">
     <xs:restriction base="xs:string">
       <xs:enumeration value="AS_ROOT"/>
@@ -162,4 +164,4 @@
       <xs:enumeration value="NONE"/>
     </xs:restriction>
   </xs:simpleType>
-</xs:schema>
+</xs:schema>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/isis/blob/b04c27ff/adocs/documentation/src/main/asciidoc/schema/applib/layout/layout.xsd
----------------------------------------------------------------------
diff --git a/adocs/documentation/src/main/asciidoc/schema/applib/layout/layout.xsd b/adocs/documentation/src/main/asciidoc/schema/applib/layout/layout.xsd
index 7a3e949..9628c78 100644
--- a/adocs/documentation/src/main/asciidoc/schema/applib/layout/layout.xsd
+++ b/adocs/documentation/src/main/asciidoc/schema/applib/layout/layout.xsd
@@ -12,7 +12,9 @@
           </xs:sequence>
         </xs:complexType>
       </xs:element>
+      <xs:element name="left" type="tns:column" minOccurs="0"/>
       <xs:element name="tabGroup" type="tns:tabGroup" maxOccurs="unbounded"/>
+      <xs:element name="right" type="tns:column" minOccurs="0"/>
     </xs:sequence>
   </xs:complexType>
 
@@ -32,25 +34,10 @@
     <xs:attribute name="position" type="tns:position"/>
   </xs:complexType>
 
-  <xs:complexType name="tabGroup">
-    <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:column"/>
-      <xs:element name="middle" type="tns:column" minOccurs="0"/>
-      <xs:element name="right" type="tns:column" minOccurs="0"/>
-    </xs:sequence>
-    <xs:attribute name="name" type="xs:string" use="required"/>
-  </xs:complexType>
-
   <xs:complexType name="column">
     <xs:sequence>
       <xs:element name="propertyGroup" type="tns:propertyGroup" minOccurs="0" maxOccurs="unbounded"/>
-      <xs:element name="collection" type="tns:collectionLayoutXml" minOccurs="0" maxOccurs="unbounded"/>
+      <xs:element name="collection" type="tns:collectionLayoutMetadata" minOccurs="0" maxOccurs="unbounded"/>
     </xs:sequence>
     <xs:attribute name="span" type="xs:int" use="required"/>
   </xs:complexType>
@@ -92,7 +79,7 @@
     <xs:attribute name="typicalLength" type="xs:int"/>
   </xs:complexType>
 
-  <xs:complexType name="collectionLayoutXml">
+  <xs:complexType name="collectionLayoutMetadata">
     <xs:sequence>
       <xs:element name="named" type="xs:string" minOccurs="0"/>
       <xs:element name="describedAs" type="xs:string" minOccurs="0"/>
@@ -114,6 +101,21 @@
     <xs:attribute name="paged" type="xs:int"/>
   </xs:complexType>
 
+  <xs:complexType name="tabGroup">
+    <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:column"/>
+      <xs:element name="middle" type="tns:column" minOccurs="0"/>
+      <xs:element name="right" type="tns:column" minOccurs="0"/>
+    </xs:sequence>
+    <xs:attribute name="name" type="xs:string" use="required"/>
+  </xs:complexType>
+
   <xs:simpleType name="bookmarkPolicy">
     <xs:restriction base="xs:string">
       <xs:enumeration value="AS_ROOT"/>
@@ -162,4 +164,4 @@
       <xs:enumeration value="NONE"/>
     </xs:restriction>
   </xs:simpleType>
-</xs:schema>
+</xs:schema>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/isis/blob/b04c27ff/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/ActionHolder.java
----------------------------------------------------------------------
diff --git a/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/ActionHolder.java b/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/ActionHolder.java
deleted file mode 100644
index d5a6b37..0000000
--- a/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/ActionHolder.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.v1_0;
-
-import java.util.List;
-
-public interface ActionHolder {
-    List<ActionLayoutMetadata> getActions();
-}

http://git-wip-us.apache.org/repos/asf/isis/blob/b04c27ff/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/ActionLayoutMetadata.java
----------------------------------------------------------------------
diff --git a/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/ActionLayoutMetadata.java b/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/ActionLayoutMetadata.java
index bf454d1..5c07ffa 100644
--- a/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/ActionLayoutMetadata.java
+++ b/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/ActionLayoutMetadata.java
@@ -26,6 +26,7 @@ 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.Programmatic;
 import org.apache.isis.applib.annotation.Where;
 
 /**
@@ -44,7 +45,7 @@ import org.apache.isis.applib.annotation.Where;
         , "metadataError"
     }
 )
-public class ActionLayoutMetadata implements Serializable {
+public class ActionLayoutMetadata implements Serializable, HasPath, Owned<ActionOwner> {
 
     private static final long serialVersionUID = 1L;
 
@@ -188,7 +189,7 @@ public class ActionLayoutMetadata implements Serializable {
 
 
 
-    private ActionHolder owner;
+    private ActionOwner owner;
     /**
      * Owner.
      *
@@ -197,11 +198,11 @@ public class ActionLayoutMetadata implements Serializable {
      * </p>
      */
     @XmlTransient
-    public ActionHolder getOwner() {
+    public ActionOwner getOwner() {
         return owner;
     }
 
-    public void setOwner(final ActionHolder owner) {
+    public void setOwner(final ActionOwner owner) {
         this.owner = owner;
     }
 
@@ -220,4 +221,21 @@ public class ActionLayoutMetadata implements Serializable {
         this.metadataError = metadataError;
     }
 
+
+
+    private String path;
+
+    @Programmatic
+    @XmlTransient
+    public String getPath() {
+        return path;
+    }
+
+    @Programmatic
+    public void setPath(final String path) {
+        this.path = path;
+    }
+
+
+
 }

http://git-wip-us.apache.org/repos/asf/isis/blob/b04c27ff/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/ActionOwner.java
----------------------------------------------------------------------
diff --git a/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/ActionOwner.java b/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/ActionOwner.java
new file mode 100644
index 0000000..4dde062
--- /dev/null
+++ b/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/ActionOwner.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.v1_0;
+
+import java.util.List;
+
+public interface ActionOwner extends Owner {
+    List<ActionLayoutMetadata> getActions();
+}

http://git-wip-us.apache.org/repos/asf/isis/blob/b04c27ff/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/CollectionLayoutMetadata.java
----------------------------------------------------------------------
diff --git a/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/CollectionLayoutMetadata.java b/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/CollectionLayoutMetadata.java
index 7aa17f6..e6ce973 100644
--- a/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/CollectionLayoutMetadata.java
+++ b/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/CollectionLayoutMetadata.java
@@ -29,6 +29,7 @@ import javax.xml.bind.annotation.XmlType;
 
 import com.google.common.base.Function;
 
+import org.apache.isis.applib.annotation.Programmatic;
 import org.apache.isis.applib.annotation.Where;
 
 /**
@@ -48,7 +49,7 @@ import org.apache.isis.applib.annotation.Where;
                 , "metadataError"
         }
 )
-public class CollectionLayoutMetadata implements ColumnContent, ActionHolder, Serializable {
+public class CollectionLayoutMetadata implements ColumnContent, ActionOwner, Serializable, HasPath, Owned<Column> {
 
     private static final long serialVersionUID = 1L;
 
@@ -226,6 +227,23 @@ public class CollectionLayoutMetadata implements ColumnContent, ActionHolder, Se
     }
 
 
+
+
+    private String path;
+
+    @Programmatic
+    @XmlTransient
+    public String getPath() {
+        return path;
+    }
+
+    @Programmatic
+    public void setPath(final String path) {
+        this.path = path;
+    }
+
+
+
     public static class Functions {
         private Functions(){}
 

http://git-wip-us.apache.org/repos/asf/isis/blob/b04c27ff/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/Column.java
----------------------------------------------------------------------
diff --git a/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/Column.java b/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/Column.java
index fc8ec6d..6ff7527 100644
--- a/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/Column.java
+++ b/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/Column.java
@@ -29,6 +29,7 @@ import javax.xml.bind.annotation.XmlType;
 import com.google.common.collect.Lists;
 
 import org.apache.isis.applib.annotation.MemberGroupLayout;
+import org.apache.isis.applib.annotation.Programmatic;
 
 @XmlType(
         propOrder = {
@@ -36,7 +37,7 @@ import org.apache.isis.applib.annotation.MemberGroupLayout;
                 , "collections"
         }
 )
-public class Column implements Serializable {
+public class Column implements Serializable, Owner, Owned<ColumnOwner> {
 
     private static final long serialVersionUID = 1L;
 
@@ -86,7 +87,7 @@ public class Column implements Serializable {
     }
 
 
-    private ColumnHolder owner;
+    private ColumnOwner owner;
     /**
      * Owner.
      *
@@ -95,14 +96,32 @@ public class Column implements Serializable {
      * </p>
      */
     @XmlTransient
-    public ColumnHolder getOwner() {
+    public ColumnOwner getOwner() {
         return owner;
     }
 
-    public void setOwner(final ColumnHolder owner) {
+    public void setOwner(final ColumnOwner owner) {
         this.owner = owner;
     }
 
+
+
+    private String path;
+
+    @Programmatic
+    @XmlTransient
+    public String getPath() {
+        return path;
+    }
+
+    @Programmatic
+    public void setPath(final String path) {
+        this.path = path;
+    }
+
+
+
+
     public enum Hint {
         LEFT,
         MIDDLE,

http://git-wip-us.apache.org/repos/asf/isis/blob/b04c27ff/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/ColumnHolder.java
----------------------------------------------------------------------
diff --git a/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/ColumnHolder.java b/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/ColumnHolder.java
deleted file mode 100644
index 8211750..0000000
--- a/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/ColumnHolder.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.v1_0;
-
-public interface ColumnHolder {
-
-}

http://git-wip-us.apache.org/repos/asf/isis/blob/b04c27ff/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/ColumnOwner.java
----------------------------------------------------------------------
diff --git a/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/ColumnOwner.java b/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/ColumnOwner.java
new file mode 100644
index 0000000..62f6007
--- /dev/null
+++ b/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/ColumnOwner.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.v1_0;
+
+public interface ColumnOwner extends Owner {
+
+}

http://git-wip-us.apache.org/repos/asf/isis/blob/b04c27ff/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/HasPath.java
----------------------------------------------------------------------
diff --git a/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/HasPath.java b/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/HasPath.java
new file mode 100644
index 0000000..39cdb85
--- /dev/null
+++ b/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/HasPath.java
@@ -0,0 +1,32 @@
+/*
+ *  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.v1_0;
+
+import javax.xml.bind.annotation.XmlTransient;
+
+import org.apache.isis.applib.annotation.Programmatic;
+
+public interface HasPath {
+
+    @Programmatic
+    @XmlTransient
+    String getPath();
+
+
+}

http://git-wip-us.apache.org/repos/asf/isis/blob/b04c27ff/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/ObjectLayoutMetadata.java
----------------------------------------------------------------------
diff --git a/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/ObjectLayoutMetadata.java b/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/ObjectLayoutMetadata.java
index 727bba2..6cbf901 100644
--- a/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/ObjectLayoutMetadata.java
+++ b/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/ObjectLayoutMetadata.java
@@ -19,7 +19,6 @@
 package org.apache.isis.applib.layout.v1_0;
 
 import java.io.Serializable;
-import java.util.ArrayList;
 import java.util.LinkedHashMap;
 import java.util.List;
 
@@ -41,10 +40,12 @@ import org.apache.isis.applib.services.dto.Dto;
         name = "objectLayout"
         , propOrder = {
                 "actions"
+                , "left"
                 , "tabGroups"
+                , "right"
         }
 )
-public class ObjectLayoutMetadata implements Dto, ActionHolder, Serializable {
+public class ObjectLayoutMetadata implements Dto, ActionOwner, Serializable, ColumnOwner, HasPath, TabGroupOwner {
 
     private static final long serialVersionUID = 1L;
 
@@ -61,16 +62,23 @@ public class ObjectLayoutMetadata implements Dto, ActionHolder, Serializable {
     }
 
 
-    // must have at least one tab group
-    private List<TabGroup> tabGroups = new ArrayList<TabGroup>() {{
-        add(new TabGroup());
-    }};
 
-    // no wrapper
+    private Column left;
 
-    /**
-     * Must have at least one tab group; no wrapper.
-     */
+    @XmlElement(required = false)
+    public Column getLeft() {
+        return left;
+    }
+
+    public void setLeft(final Column left) {
+        this.left = left;
+    }
+
+
+
+    private List<TabGroup> tabGroups;
+
+    // no wrapper
     @XmlElement(name = "tabGroup", required = true)
     public List<TabGroup> getTabGroups() {
         return tabGroups;
@@ -81,6 +89,19 @@ public class ObjectLayoutMetadata implements Dto, ActionHolder, Serializable {
     }
 
 
+
+    private Column right;
+
+    @XmlElement(required = false)
+    public Column getRight() {
+        return right;
+    }
+
+    public void setRight(final Column right) {
+        this.right = right;
+    }
+    
+
     public interface Visitor {
         void visit(final ObjectLayoutMetadata objectLayoutMetadata);
         void visit(final TabGroup tabGroup);
@@ -119,6 +140,7 @@ public class ObjectLayoutMetadata implements Dto, ActionHolder, Serializable {
     public void visit(final Visitor visitor) {
         visitor.visit(this);
         traverseActions(this, visitor);
+        traverseColumn(getLeft(), this, visitor);
         final List<TabGroup> tabGroups = getTabGroups();
         for (final TabGroup tabGroup : tabGroups) {
             tabGroup.setOwner(this);
@@ -132,13 +154,14 @@ public class ObjectLayoutMetadata implements Dto, ActionHolder, Serializable {
                 traverseColumn(tab.getRight(), tab, visitor);
             }
         }
+        traverseColumn(getRight(), this, visitor);
     }
 
-    private void traverseColumn(final Column column, final Tab tab, final Visitor visitor) {
+    private void traverseColumn(final Column column, final ColumnOwner columnOwner, final Visitor visitor) {
         if(column == null) {
             return;
         }
-        column.setOwner(tab);
+        column.setOwner(columnOwner);
         visitor.visit(column);
         traversePropertyGroups(column, visitor);
         traverseCollections(column, visitor);
@@ -166,13 +189,13 @@ public class ObjectLayoutMetadata implements Dto, ActionHolder, Serializable {
         }
     }
 
-    private void traverseActions(final ActionHolder actionHolder, final Visitor visitor) {
-        final List<ActionLayoutMetadata> actionLayoutMetadatas = actionHolder.getActions();
+    private void traverseActions(final ActionOwner actionOwner, final Visitor visitor) {
+        final List<ActionLayoutMetadata> actionLayoutMetadatas = actionOwner.getActions();
         if(actionLayoutMetadatas == null) {
             return;
         }
         for (final ActionLayoutMetadata actionLayoutMetadata : actionLayoutMetadatas) {
-            actionLayoutMetadata.setOwner(actionHolder);
+            actionLayoutMetadata.setOwner(actionOwner);
             visitor.visit(actionLayoutMetadata);
         }
     }
@@ -251,6 +274,20 @@ public class ObjectLayoutMetadata implements Dto, ActionHolder, Serializable {
     }
 
 
+    private String path;
+
+    @Programmatic
+    @XmlTransient
+    public String getPath() {
+        return path;
+    }
+
+    @Programmatic
+    public void setPath(final String path) {
+        this.path = path;
+    }
+
+
     private boolean normalized;
 
     @Programmatic

http://git-wip-us.apache.org/repos/asf/isis/blob/b04c27ff/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/Owned.java
----------------------------------------------------------------------
diff --git a/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/Owned.java b/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/Owned.java
new file mode 100644
index 0000000..a209293
--- /dev/null
+++ b/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/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.v1_0;
+
+public interface Owned<T extends Owner> {
+    T getOwner();
+}

http://git-wip-us.apache.org/repos/asf/isis/blob/b04c27ff/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/Owner.java
----------------------------------------------------------------------
diff --git a/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/Owner.java b/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/Owner.java
new file mode 100644
index 0000000..7b8940c
--- /dev/null
+++ b/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/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.v1_0;
+
+public interface Owner extends HasPath {
+
+
+}

http://git-wip-us.apache.org/repos/asf/isis/blob/b04c27ff/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/PropertyGroup.java
----------------------------------------------------------------------
diff --git a/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/PropertyGroup.java b/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/PropertyGroup.java
index 2fb52e3..a91deea 100644
--- a/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/PropertyGroup.java
+++ b/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/PropertyGroup.java
@@ -32,6 +32,7 @@ import com.google.common.base.Function;
 import com.google.common.collect.Lists;
 
 import org.apache.isis.applib.annotation.MemberOrder;
+import org.apache.isis.applib.annotation.Programmatic;
 
 @XmlType(
         propOrder = {
@@ -40,7 +41,7 @@ import org.apache.isis.applib.annotation.MemberOrder;
                 , "properties"
         }
 )
-public class PropertyGroup implements ColumnContent, ActionHolder, Serializable {
+public class PropertyGroup implements ColumnContent, ActionOwner, Serializable, HasPath, Owned<Column> {
 
     private static final long serialVersionUID = 1L;
 
@@ -111,6 +112,24 @@ public class PropertyGroup implements ColumnContent, ActionHolder, Serializable
     }
 
 
+
+
+    private String path;
+
+    @Programmatic
+    @XmlTransient
+    public String getPath() {
+        return path;
+    }
+
+    @Programmatic
+    public void setPath(final String path) {
+        this.path = path;
+    }
+
+
+
+
     public static class Util {
         private Util(){}
         public static Function<? super PropertyGroup, String> nameOf() {

http://git-wip-us.apache.org/repos/asf/isis/blob/b04c27ff/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/PropertyLayoutMetadata.java
----------------------------------------------------------------------
diff --git a/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/PropertyLayoutMetadata.java b/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/PropertyLayoutMetadata.java
index 5f6b3b1..dccf7b8 100644
--- a/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/PropertyLayoutMetadata.java
+++ b/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/PropertyLayoutMetadata.java
@@ -28,6 +28,7 @@ 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.Programmatic;
 import org.apache.isis.applib.annotation.Where;
 
 /**
@@ -42,7 +43,7 @@ import org.apache.isis.applib.annotation.Where;
                 , "metadataError"
         }
 )
-public class PropertyLayoutMetadata implements ActionHolder, Serializable {
+public class PropertyLayoutMetadata implements ActionOwner, Serializable, HasPath, Owned<PropertyGroup> {
 
     private static final long serialVersionUID = 1L;
 
@@ -224,4 +225,21 @@ public class PropertyLayoutMetadata implements ActionHolder, Serializable {
         this.metadataError = metadataError;
     }
 
+
+
+
+    private String path;
+
+    @Programmatic
+    @XmlTransient
+    public String getPath() {
+        return path;
+    }
+
+    @Programmatic
+    public void setPath(final String path) {
+        this.path = path;
+    }
+
+
 }

http://git-wip-us.apache.org/repos/asf/isis/blob/b04c27ff/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/Tab.java
----------------------------------------------------------------------
diff --git a/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/Tab.java b/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/Tab.java
index 4f0a5c3..1a8f652 100644
--- a/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/Tab.java
+++ b/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/Tab.java
@@ -40,7 +40,7 @@ import org.apache.isis.applib.annotation.Programmatic;
                 , "right"
         }
 )
-public class Tab implements ColumnHolder, Serializable {
+public class Tab implements ColumnOwner, Serializable, HasPath, Owned<TabGroup> {
 
     private static final long serialVersionUID = 1L;
 
@@ -123,6 +123,24 @@ public class Tab implements ColumnHolder, Serializable {
         return contents;
     }
 
+
+
+
+    private String path;
+
+    @Programmatic
+    @XmlTransient
+    public String getPath() {
+        return path;
+    }
+
+    @Programmatic
+    public void setPath(final String path) {
+        this.path = path;
+    }
+
+
+
     private static void appendContent(final List<ColumnContent> contents, final Column column) {
         if(column == null) {
             return;

http://git-wip-us.apache.org/repos/asf/isis/blob/b04c27ff/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/TabGroup.java
----------------------------------------------------------------------
diff --git a/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/TabGroup.java b/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/TabGroup.java
index 6fb93ee..acb91c3 100644
--- a/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/TabGroup.java
+++ b/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/TabGroup.java
@@ -29,8 +29,15 @@ import javax.xml.bind.annotation.XmlType;
 import com.google.common.base.Predicate;
 import com.google.common.collect.FluentIterable;
 
-@XmlType()
-public class TabGroup implements ColumnHolder, Serializable {
+import org.apache.isis.applib.annotation.Programmatic;
+
+@XmlType(
+        propOrder = {
+                "tabs"
+        }
+
+)
+public class TabGroup implements ColumnOwner, Serializable, HasPath, Owned<TabGroupOwner> {
 
     private static final long serialVersionUID = 1L;
 
@@ -53,18 +60,7 @@ public class TabGroup implements ColumnHolder, Serializable {
 
 
 
-    private Column fixed;
-
-    @XmlElement(required = false)
-    public Column getFixed() {
-        return fixed;
-    }
-
-    public void setFixed(final Column fixed) {
-        this.fixed = fixed;
-    }
-
-    private ObjectLayoutMetadata owner;
+    private TabGroupOwner owner;
 
     /**
      * Owner.
@@ -74,15 +70,32 @@ public class TabGroup implements ColumnHolder, Serializable {
      * </p>
      */
     @XmlTransient
-    public ObjectLayoutMetadata getOwner() {
+    public TabGroupOwner getOwner() {
         return owner;
     }
 
-    public void setOwner(final ObjectLayoutMetadata owner) {
+    public void setOwner(final TabGroupOwner owner) {
         this.owner = owner;
     }
 
 
+
+
+    private String path;
+
+    @Programmatic
+    @XmlTransient
+    public String getPath() {
+        return path;
+    }
+
+    @Programmatic
+    public void setPath(final String path) {
+        this.path = path;
+    }
+
+
+
     public static class Predicates {
         public static Predicate<TabGroup> notEmpty() {
             return new Predicate<TabGroup>() {

http://git-wip-us.apache.org/repos/asf/isis/blob/b04c27ff/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/TabGroupOwner.java
----------------------------------------------------------------------
diff --git a/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/TabGroupOwner.java b/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/TabGroupOwner.java
new file mode 100644
index 0000000..12dc645
--- /dev/null
+++ b/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/TabGroupOwner.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.v1_0;
+
+public interface TabGroupOwner extends Owner {
+
+}

http://git-wip-us.apache.org/repos/asf/isis/blob/b04c27ff/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/object/layoutmetadata/ObjectLayoutMetadataFacetDefault.java
----------------------------------------------------------------------
diff --git a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/object/layoutmetadata/ObjectLayoutMetadataFacetDefault.java b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/object/layoutmetadata/ObjectLayoutMetadataFacetDefault.java
index fdc12ef..6137a53 100644
--- a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/object/layoutmetadata/ObjectLayoutMetadataFacetDefault.java
+++ b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/object/layoutmetadata/ObjectLayoutMetadataFacetDefault.java
@@ -22,6 +22,7 @@ import java.util.Collection;
 import java.util.LinkedHashMap;
 import java.util.List;
 import java.util.Map;
+import java.util.concurrent.atomic.AtomicInteger;
 import java.util.concurrent.atomic.AtomicReference;
 
 import com.google.common.base.Strings;
@@ -31,12 +32,13 @@ import com.google.common.collect.Maps;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-import org.apache.isis.applib.layout.v1_0.ActionHolder;
 import org.apache.isis.applib.layout.v1_0.ActionLayoutMetadata;
+import org.apache.isis.applib.layout.v1_0.ActionOwner;
 import org.apache.isis.applib.layout.v1_0.CollectionLayoutMetadata;
 import org.apache.isis.applib.layout.v1_0.Column;
-import org.apache.isis.applib.layout.v1_0.ColumnHolder;
+import org.apache.isis.applib.layout.v1_0.ColumnOwner;
 import org.apache.isis.applib.layout.v1_0.ObjectLayoutMetadata;
+import org.apache.isis.applib.layout.v1_0.Owned;
 import org.apache.isis.applib.layout.v1_0.PropertyGroup;
 import org.apache.isis.applib.layout.v1_0.PropertyLayoutMetadata;
 import org.apache.isis.applib.layout.v1_0.Tab;
@@ -273,6 +275,65 @@ public class ObjectLayoutMetadataFacetDefault
                 actions.add(new ActionLayoutMetadata(actionId));
             }
         }
+
+        // set paths
+        metadata.visit(new ObjectLayoutMetadata.Visitor() {
+
+            private final Map<String,AtomicInteger> sequenceByPath = Maps.newHashMap();
+
+            @Override
+            public void visit(final ObjectLayoutMetadata objectLayoutMetadata) {
+                objectLayoutMetadata.setPath("/layout");
+            }
+
+            @Override
+            public void visit(final TabGroup tabGroup) {
+                tabGroup.setPath(pathFor(tabGroup, "tabGroup"));
+            }
+
+            @Override
+            public void visit(final Tab tab) {
+                tab.setPath(pathFor(tab, "tab"));
+            }
+
+            @Override
+            public void visit(final Column column) {
+                column.setPath(pathFor(column, "column"));
+            }
+
+            @Override
+            public void visit(final PropertyGroup propertyGroup) {
+                propertyGroup.setPath(pathFor(propertyGroup, "propertyGroup"));
+            }
+
+            @Override
+            public void visit(final PropertyLayoutMetadata propertyLayoutMetadata) {
+                propertyLayoutMetadata.setPath(pathFor(propertyLayoutMetadata, "property"));
+            }
+
+            @Override
+            public void visit(final CollectionLayoutMetadata collectionLayoutMetadata) {
+                collectionLayoutMetadata.setPath(pathFor(collectionLayoutMetadata, "collection"));
+            }
+
+            @Override
+            public void visit(final ActionLayoutMetadata actionLayoutMetadata) {
+                actionLayoutMetadata.setPath(pathFor(actionLayoutMetadata, "action"));
+            }
+
+            private String pathFor(final Owned<?> owned, final String type) {
+                final String ownerPath = owned.getOwner().getPath();
+                final String prefix = ownerPath + "/" + type;
+                AtomicInteger atomicInteger = sequenceByPath.get(prefix);
+                if(atomicInteger == null) {
+                    atomicInteger = new AtomicInteger(-1);
+                    sequenceByPath.put(prefix, atomicInteger);
+                }
+                final int seq = atomicInteger.incrementAndGet();
+                return prefix + seq;
+            }
+
+        });
     }
 
     static class Tuple<T> {
@@ -314,7 +375,7 @@ public class ObjectLayoutMetadataFacetDefault
 
             @Override
             public void visit(final ActionLayoutMetadata actionLayoutMetadata) {
-                final ActionHolder actionHolder = actionLayoutMetadata.getOwner();
+                final ActionOwner actionOwner = actionLayoutMetadata.getOwner();
                 final ObjectAction objectAction = objectActionById.get(actionLayoutMetadata.getId());
                 if(objectAction == null) {
                     return;
@@ -322,18 +383,18 @@ public class ObjectLayoutMetadataFacetDefault
 
                 final String memberOrderName;
                 final int memberOrderSequence;
-                if(actionHolder instanceof PropertyGroup) {
-                    final PropertyGroup propertyGroup = (PropertyGroup) actionHolder;
+                if(actionOwner instanceof PropertyGroup) {
+                    final PropertyGroup propertyGroup = (PropertyGroup) actionOwner;
                     final List<PropertyLayoutMetadata> properties = propertyGroup.getProperties();
                     final PropertyLayoutMetadata propertyLayoutMetadata = properties.get(0); // any will do
                     memberOrderName = propertyLayoutMetadata.getId();
                     memberOrderSequence = actionPropertyGroupSequence++;
-                } else if(actionHolder instanceof PropertyLayoutMetadata) {
-                    final PropertyLayoutMetadata propertyLayoutMetadata = (PropertyLayoutMetadata) actionHolder;
+                } else if(actionOwner instanceof PropertyLayoutMetadata) {
+                    final PropertyLayoutMetadata propertyLayoutMetadata = (PropertyLayoutMetadata) actionOwner;
                     memberOrderName = propertyLayoutMetadata.getId();
                     memberOrderSequence = actionPropertySequence++;
-                } else if(actionHolder instanceof CollectionLayoutMetadata) {
-                    final CollectionLayoutMetadata collectionLayoutMetadata = (CollectionLayoutMetadata) actionHolder;
+                } else if(actionOwner instanceof CollectionLayoutMetadata) {
+                    final CollectionLayoutMetadata collectionLayoutMetadata = (CollectionLayoutMetadata) actionOwner;
                     memberOrderName = collectionLayoutMetadata.getId();
                     memberOrderSequence = actionCollectionSequence++;
                 } else {
@@ -345,13 +406,13 @@ public class ObjectLayoutMetadataFacetDefault
                         new MemberOrderFacetXml(memberOrderName, ""+memberOrderSequence, translationService, objectAction));
 
 
-                if(actionHolder instanceof PropertyGroup) {
+                if(actionOwner instanceof PropertyGroup) {
                     if(actionLayoutMetadata.getPosition() == null ||
                             actionLayoutMetadata.getPosition() == org.apache.isis.applib.annotation.ActionLayout.Position.BELOW ||
                             actionLayoutMetadata.getPosition() == org.apache.isis.applib.annotation.ActionLayout.Position.RIGHT) {
                         actionLayoutMetadata.setPosition(org.apache.isis.applib.annotation.ActionLayout.Position.PANEL);
                     }
-                } else if(actionHolder instanceof PropertyLayoutMetadata) {
+                } else if(actionOwner instanceof PropertyLayoutMetadata) {
                     if(actionLayoutMetadata.getPosition() == null ||
                             actionLayoutMetadata.getPosition() == org.apache.isis.applib.annotation.ActionLayout.Position.PANEL_DROPDOWN ||
                             actionLayoutMetadata.getPosition() == org.apache.isis.applib.annotation.ActionLayout.Position.PANEL) {
@@ -421,7 +482,7 @@ public class ObjectLayoutMetadataFacetDefault
 
                 // if there is only a single column and no other contents, then copy the collection Id onto the tab'
                 final Column column = collectionLayoutMetadata.getOwner();
-                final ColumnHolder holder = column.getOwner();
+                final ColumnOwner holder = column.getOwner();
                 if(holder instanceof Tab) {
                     final Tab tab = (Tab) holder;
                     if(tab.getContents().size() == 1 && Strings.isNullOrEmpty(tab.getName()) ) {

http://git-wip-us.apache.org/repos/asf/isis/blob/b04c27ff/core/metamodel/src/test/java/org/apache/isis/core/metamodel/layoutxml/v1_0/ObjectLayoutMetadataTest.java
----------------------------------------------------------------------
diff --git a/core/metamodel/src/test/java/org/apache/isis/core/metamodel/layoutxml/v1_0/ObjectLayoutMetadataTest.java b/core/metamodel/src/test/java/org/apache/isis/core/metamodel/layoutxml/v1_0/ObjectLayoutMetadataTest.java
index c5e8c1b..7e72c7a 100644
--- a/core/metamodel/src/test/java/org/apache/isis/core/metamodel/layoutxml/v1_0/ObjectLayoutMetadataTest.java
+++ b/core/metamodel/src/test/java/org/apache/isis/core/metamodel/layoutxml/v1_0/ObjectLayoutMetadataTest.java
@@ -62,6 +62,8 @@ public class ObjectLayoutMetadataTest {
 
         final ObjectLayoutMetadata objectLayoutMetadata = new ObjectLayoutMetadata();
 
+        objectLayoutMetadata.setTabGroups(Lists.<TabGroup>newArrayList());
+        objectLayoutMetadata.getTabGroups().add(new TabGroup());
         TabGroup tabGroup = objectLayoutMetadata.getTabGroups().get(0);
         Tab tab = tabGroup.getTabs().get(0);
         tab.setName("Common");

http://git-wip-us.apache.org/repos/asf/isis/blob/b04c27ff/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/properties/EntityPropertiesPanel.html
----------------------------------------------------------------------
diff --git a/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/properties/EntityPropertiesPanel.html b/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/properties/EntityPropertiesPanel.html
index 8fbcfb4..e204c12 100644
--- a/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/properties/EntityPropertiesPanel.html
+++ b/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/properties/EntityPropertiesPanel.html
@@ -22,7 +22,7 @@
         <wicket:panel>
             <div class="entityPropertiesPanel entityPropertiesComponentType">
                 <form wicket:id="entityProperties" class="inputForm" role="form">
-                    <div class="row" style="padding-bottom: 20px">
+                    <div class="row">
                         <div wicket:id="leftColumn">
                             <div wicket:id="entityMembers"/>
                             <div class="feedbackPanel">

http://git-wip-us.apache.org/repos/asf/isis/blob/b04c27ff/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/tabgroups/EntityTabGroupsPanel.html
----------------------------------------------------------------------
diff --git a/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/tabgroups/EntityTabGroupsPanel.html b/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/tabgroups/EntityTabGroupsPanel.html
index 4e45e96..f954e5d 100644
--- a/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/tabgroups/EntityTabGroupsPanel.html
+++ b/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/tabgroups/EntityTabGroupsPanel.html
@@ -23,12 +23,14 @@
 	<div class="entityTabbed">
 		<div wicket:id="entitySummary"></div>
 
-        <div wicket:id="tabGroups">
-            <div class="row">
-                <div wicket:id="tabGroup" class="col-xs-12">[tabbed panel will be here]</div>
-                <div XXXXwicket:id="entityColumnMembers" class = "fixedColumn col-xs-4">
+        <div class="row">
+            <div wicket:id="leftColumn" class = "leftColumn"/>
+            <div wicket:id="tabGroupsContainer" class="tabGroups">
+                <div class="row" wicket:id="tabGroups">
+                    <div wicket:id="tabGroup" class="col-xs-12">[tabbed panel will be here]</div>
                 </div>
             </div>
+            <div wicket:id="rightColumn" class = "rightColumn"/>
         </div>
 	</div>
 </wicket:panel>

http://git-wip-us.apache.org/repos/asf/isis/blob/b04c27ff/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/tabgroups/EntityTabGroupsPanel.java
----------------------------------------------------------------------
diff --git a/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/tabgroups/EntityTabGroupsPanel.java b/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/tabgroups/EntityTabGroupsPanel.java
index 671ccd1..a729188 100644
--- a/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/tabgroups/EntityTabGroupsPanel.java
+++ b/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/tabgroups/EntityTabGroupsPanel.java
@@ -20,18 +20,22 @@
 package org.apache.isis.viewer.wicket.ui.components.entity.tabgroups;
 
 import java.util.List;
+import java.util.concurrent.atomic.AtomicInteger;
 
 import com.google.common.collect.FluentIterable;
 import com.google.common.collect.Lists;
 
+import org.apache.wicket.MarkupContainer;
 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.WebMarkupContainer;
 import org.apache.wicket.markup.html.list.ListItem;
 import org.apache.wicket.markup.html.list.ListView;
 import org.apache.wicket.markup.html.panel.Panel;
 import org.apache.wicket.model.Model;
 
+import org.apache.isis.applib.layout.v1_0.Column;
 import org.apache.isis.applib.layout.v1_0.ObjectLayoutMetadata;
 import org.apache.isis.applib.layout.v1_0.Tab;
 import org.apache.isis.applib.layout.v1_0.TabGroup;
@@ -44,6 +48,7 @@ import org.apache.isis.core.runtime.system.context.IsisContext;
 import org.apache.isis.viewer.wicket.model.mementos.ObjectAdapterMemento;
 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.entity.properties.EntityColumnMembers;
 import org.apache.isis.viewer.wicket.ui.panels.PanelAbstract;
 import org.apache.isis.viewer.wicket.ui.util.CssClassAppender;
 
@@ -60,6 +65,8 @@ public class EntityTabGroupsPanel extends PanelAbstract<EntityModel> {
     private static final String ID_ENTITY_PROPERTIES_AND_COLLECTIONS = "entityPropertiesAndCollections";
     private static final String ID_TAB_GROUPS = "tabGroups";
     private static final String ID_TAB_GROUP = "tabGroup";
+    private static final String ID_LEFT_COLUMN = "leftColumn";
+    private static final String ID_RIGHT_COLUMN = "rightColumn";
 
     public EntityTabGroupsPanel(final String id, final EntityModel entityModel) {
         super(id, entityModel);
@@ -82,11 +89,13 @@ public class EntityTabGroupsPanel extends PanelAbstract<EntityModel> {
 
         addOrReplace(ComponentType.ENTITY_SUMMARY, model);
 
+        final int leftSpan = addColumnIfRequired(ID_LEFT_COLUMN, objectLayoutMetadata.getLeft(), Column.Hint.LEFT);
+
         final List<TabGroup> tabGroups = FluentIterable
                 .from(objectLayoutMetadata.getTabGroups())
                 .filter(TabGroup.Predicates.notEmpty())
                 .toList();
-        final int[] tabGroupCount = new int[]{0};
+        final AtomicInteger tabGroupRef = new AtomicInteger(0);
         final ListView<TabGroup> tabGroupsList =
                 new ListView<TabGroup>(ID_TAB_GROUPS, tabGroups) {
 
@@ -110,11 +119,11 @@ public class EntityTabGroupsPanel extends PanelAbstract<EntityModel> {
                         }
                     });
                 }
-                final AjaxBootstrapTabbedPanel ajaxBootstrapTabbedPanel = newTabbedPanel(tabs, tabGroupCount[0]);
+                final AjaxBootstrapTabbedPanel ajaxBootstrapTabbedPanel = newTabbedPanel(tabs, tabGroupRef.get());
 
                 item.add(ajaxBootstrapTabbedPanel);
 
-                tabGroupCount[0]++;
+                tabGroupRef.incrementAndGet();
             }
 
             private AjaxBootstrapTabbedPanel newTabbedPanel(final List<ITab> tabs, final int tabGroupNumber) {
@@ -137,7 +146,11 @@ public class EntityTabGroupsPanel extends PanelAbstract<EntityModel> {
                 final String value = (String) getSession().getAttribute(key);
                 if(value != null) {
                     final int tabIndex = Integer.parseInt(value);
-                    ajaxBootstrapTabbedPanel.setSelectedTab(tabIndex);
+                    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);
+                    }
                 }
             }
 
@@ -157,11 +170,34 @@ public class EntityTabGroupsPanel extends PanelAbstract<EntityModel> {
 
         };
 
-        add(tabGroupsList);
+        final MarkupContainer tabGroupsContainer = new WebMarkupContainer("tabGroupsContainer");
+        add(tabGroupsContainer);
+
+        tabGroupsContainer.add(tabGroupsList);
+
+        final int rightSpan = addColumnIfRequired(ID_RIGHT_COLUMN, objectLayoutMetadata.getRight(), Column.Hint.RIGHT);
 
+        final int columnSpans = leftSpan + rightSpan;
+        int tabGroupSpan = columnSpans < 12 ? 12 - (columnSpans) : 12;
+        CssClassAppender.appendCssClassTo(tabGroupsContainer, "col-xs-" + tabGroupSpan);
 
     }
 
+    private int addColumnIfRequired(final String id, final Column col, final Column.Hint hint) {
+        if(col != null) {
+            final EntityModel entityModel =
+                    getModel().cloneWithColumnMetadata(col, hint);
+            final int span = entityModel.getColumnMetadata().getSpan();
+            if(span > 0) {
+                final EntityColumnMembers entityColumnMembers = new EntityColumnMembers(id, entityModel, this);
+                addOrReplace(entityColumnMembers);
+                CssClassAppender.appendCssClassTo(entityColumnMembers, "col-xs-" + span);
+                return span;
+            }
+        }
+        permanentlyHide(id);
+        return 0;
+    }
 
     private static class EntityTabPanel extends PanelAbstract {
         private static final long serialVersionUID = 1L;
@@ -171,7 +207,10 @@ public class EntityTabGroupsPanel extends PanelAbstract<EntityModel> {
 
             final EntityModel modelWithTabHints = model.cloneWithTabMetadata(tab);
 
-            getComponentFactoryRegistry().addOrReplaceComponent(this, ID_ENTITY_PROPERTIES_AND_COLLECTIONS, ComponentType.ENTITY_PROPERTIES, modelWithTabHints);
+            getComponentFactoryRegistry()
+                    .addOrReplaceComponent(this,
+                            ID_ENTITY_PROPERTIES_AND_COLLECTIONS, ComponentType.ENTITY_PROPERTIES, modelWithTabHints);
+
         }
     }
 }

http://git-wip-us.apache.org/repos/asf/isis/blob/b04c27ff/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 ace0e00..dd192d1 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
@@ -724,4 +724,28 @@ tr.headers th form input {
 
 #aboutLink {
     padding-right: 30px;
-}
\ No newline at end of file
+}
+
+/*
+.entityTabbed > .row > .leftColumn,
+.entityTabbed > .row > .rightColumn {
+    margin-top: 41px;
+}
+*/
+
+.tab-content {
+    border-left: 1px solid #ddd;
+    border-right: 1px solid #ddd;
+    border-bottom: 1px solid #ddd;
+    padding-top: 10px;
+    padding-left: 10px;
+    padding-right: 10px;
+}
+
+.nav-tabs {
+    margin-bottom: 0;
+}
+
+.tabGroups > .row {
+    padding-bottom: 10px;
+}

http://git-wip-us.apache.org/repos/asf/isis/blob/b04c27ff/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 1c56232..79bc6a5 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,19 +3,10 @@
     <actions>
         <action id="delete"/>
     </actions>
+    <left span="0">
+    </left>
     <tabGroup>
-        <tab name="Metadata">
-            <left span="6">
-                <propertyGroup name="Persistence">
-                    <actions>
-                        <action id="downloadJdoMetadata"/>
-                        <action id="downloadLayoutXml"/>
-                    </actions>
-                    <property id="versionSequence"/>
-                </propertyGroup>
-            </left>
-        </tab>
-        <tab name="Common">
+        <tab name="General">
             <left span="6">
                 <propertyGroup name="General">
                     <property id="name" labelPosition="TOP">
@@ -24,19 +15,24 @@
                         </actions>
                     </property>
                 </propertyGroup>
-                <collection id="similarTo" defaultView="table"/>
             </left>
             <right span="6">
-                <collection id="others" defaultView="hide"/>
+                <propertyGroup name="Metadata">
+                    <actions>
+                        <action id="downloadJdoMetadata" position="PANEL_DROPDOWN"/>
+                        <action id="downloadLayoutXml" position="PANEL_DROPDOWN"/>
+                    </actions>
+                    <property id="versionSequence"/>
+                </propertyGroup>
             </right>
         </tab>
     </tabGroup>
-<!--
     <tabGroup>
         <tab name="Collections">
-            <left span="6">
+            <left span="12">
+                <collection id="others" defaultView="table"/>
+                <collection id="similarTo" defaultView="hide"/>
             </left>
         </tab>
     </tabGroup>
--->
 </objectLayout>
\ No newline at end of file


[43/50] [abbrv] isis git commit: ISIS-993: now rendering properties and collections in tabs ok.

Posted by da...@apache.org.
ISIS-993: now rendering properties and collections in tabs ok.

Some stuff still to do:
- provide a far-right column that is not tabbed at all.
- better handling of column spans, to adjust if spans don't sum to 12 correctly.
- layout views don't render.
- allow layout views be edited and, perhaps, shared via settings.
- hints should be extended


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

Branch: refs/heads/ISIS-993
Commit: f80f273aa3a757c7808c8ba4dbd1adb6740d6768
Parents: c998c76
Author: Dan Haywood <da...@haywood-associates.co.uk>
Authored: Fri Jan 8 18:05:54 2016 +0000
Committer: Dan Haywood <da...@haywood-associates.co.uk>
Committed: Mon Jan 25 14:38:24 2016 +0000

----------------------------------------------------------------------
 .../layout/v1_0/CollectionLayoutMetadata.java   | 15 ++++
 .../services/layout/Object_viewLayout.java      |  1 +
 .../ObjectLayoutMetadataServiceDefault.java     | 21 +++---
 .../viewer/wicket/model/models/EntityModel.java | 22 ++++--
 .../collections/EntityCollectionsPanel.java     | 63 ++++++++++++++---
 .../entity/properties/EntityPropertiesForm.java | 74 ++++++++++++++------
 .../properties/EntityPropertiesPanel.html       |  3 +
 .../entity/tabgroups/EntityTabGroupsPanel.java  |  2 +-
 .../dom/simple/SimpleObject.layout.xml          | 17 ++---
 9 files changed, 162 insertions(+), 56 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/isis/blob/f80f273a/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/CollectionLayoutMetadata.java
----------------------------------------------------------------------
diff --git a/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/CollectionLayoutMetadata.java b/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/CollectionLayoutMetadata.java
index 4dc14cd..7aa17f6 100644
--- a/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/CollectionLayoutMetadata.java
+++ b/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/CollectionLayoutMetadata.java
@@ -27,6 +27,8 @@ import javax.xml.bind.annotation.XmlElementWrapper;
 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;
 
 /**
@@ -223,4 +225,17 @@ public class CollectionLayoutMetadata implements ColumnContent, ActionHolder, Se
         this.metadataError = metadataError;
     }
 
+
+    public static class Functions {
+        private Functions(){}
+
+        public static Function<CollectionLayoutMetadata, String> id() {
+            return new Function<CollectionLayoutMetadata, String>() {
+                @Override
+                public String apply(final CollectionLayoutMetadata metadata) {
+                    return metadata.getId();
+                }
+            };
+        }
+    }
 }

http://git-wip-us.apache.org/repos/asf/isis/blob/f80f273a/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 4957e9c..82d574c 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
@@ -54,6 +54,7 @@ public class Object_viewLayout {
         return getObjectLayoutMetadata();
     }
 
+    @Programmatic // TODO ... excluded for now (getting an Isis framework exception in the view model rendering).
     public boolean hide$$() {
         return getObjectLayoutMetadata() == null;
     }

http://git-wip-us.apache.org/repos/asf/isis/blob/f80f273a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/services/layout/ObjectLayoutMetadataServiceDefault.java
----------------------------------------------------------------------
diff --git a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/services/layout/ObjectLayoutMetadataServiceDefault.java b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/services/layout/ObjectLayoutMetadataServiceDefault.java
index 294531a..972999d 100644
--- a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/services/layout/ObjectLayoutMetadataServiceDefault.java
+++ b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/services/layout/ObjectLayoutMetadataServiceDefault.java
@@ -254,7 +254,9 @@ public class ObjectLayoutMetadataServiceDefault
                 lastTabGroup.getTabs().add(tab);
                 Column left = new Column(12);
                 tab.setLeft(left);
-                left.getCollections().add(new CollectionLayoutMetadata(collectionId));
+                final CollectionLayoutMetadata layoutMetadata = new CollectionLayoutMetadata(collectionId);
+                layoutMetadata.setDefaultView("table");
+                left.getCollections().add(layoutMetadata);
             }
         }
 
@@ -293,6 +295,7 @@ public class ObjectLayoutMetadataServiceDefault
 
         metadata.visit(new ObjectLayoutMetadata.VisitorAdapter() {
             private final Map<String, int[]> propertySequenceByGroup = Maps.newHashMap();
+            private int collectionSequence = 1;
             private int actionDomainObjectSequence = 1;
             private int actionPropertyGroupSequence = 1;
             private int actionPropertySequence = 1;
@@ -376,7 +379,7 @@ public class ObjectLayoutMetadataServiceDefault
                 // @MemberOrder#name based on owning property group, @MemberOrder#sequence monotonically increasing
                 final PropertyGroup propertyGroup = propertyLayoutMetadata.getOwner();
                 final String groupName = propertyGroup.getName();
-                final String sequence = nextInSequenceFor(groupName);
+                final String sequence = nextInSequenceFor(groupName, propertySequenceByGroup);
                 FacetUtil.addFacet(
                         new MemberOrderFacetXml(groupName, sequence, translationService, oneToOneAssociation));
             }
@@ -398,7 +401,7 @@ public class ObjectLayoutMetadataServiceDefault
 
                 // @MemberOrder#name based on the collection's id (so that each has a single "member group")
                 final String groupName = collectionLayoutMetadata.getId();
-                final String sequence = nextInSequenceFor(groupName);
+                final String sequence = "" + collectionSequence++;
                 FacetUtil.addFacet(
                         new MemberOrderFacetXml(groupName, sequence, translationService, oneToManyAssociation));
 
@@ -406,16 +409,18 @@ public class ObjectLayoutMetadataServiceDefault
                 final Column column = collectionLayoutMetadata.getOwner();
                 final Tab tab = column.getOwner();
                 if(tab.getContents().size() == 1) {
-                    tab.setName(collectionLayoutMetadata.getNamed());
+                    final String collectionName = oneToManyAssociation.getName();
+                    tab.setName(collectionName);
                 }
             }
 
-            private String nextInSequenceFor(final String propertyGroupName) {
-                synchronized (propertySequenceByGroup) {
-                    int[] holder = propertySequenceByGroup.get(propertyGroupName);
+            private String nextInSequenceFor(
+                    final String key, final Map<String, int[]> seqByKey) {
+                synchronized (seqByKey) {
+                    int[] holder = seqByKey.get(key);
                     if(holder == null) {
                         holder = new int[]{0};
-                        propertySequenceByGroup.put(propertyGroupName, holder);
+                        seqByKey.put(key, holder);
                     }
                     holder[0]++;
                     return ""+holder[0];

http://git-wip-us.apache.org/repos/asf/isis/blob/f80f273a/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 899f48e..9838163 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,6 +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.v1_0.Column;
 import org.apache.isis.applib.layout.v1_0.Tab;
 import org.apache.isis.applib.services.memento.MementoService.Memento;
 import org.apache.isis.core.metamodel.adapter.ObjectAdapter;
@@ -63,7 +64,6 @@ import org.apache.isis.viewer.wicket.model.mementos.PropertyMemento;
 public class EntityModel extends BookmarkableModel<ObjectAdapter> {
 
     private static final long serialVersionUID = 1L;
-    
 
     // //////////////////////////////////////////////////////////
     // factory methods for PageParameters
@@ -91,7 +91,6 @@ public class EntityModel extends BookmarkableModel<ObjectAdapter> {
         return pageParameters;
     }
 
-
     public enum RenderingHint {
         REGULAR,
         PROPERTY_COLUMN,
@@ -634,7 +633,7 @@ public class EntityModel extends BookmarkableModel<ObjectAdapter> {
 
 
     // //////////////////////////////////////////////////////////
-    // tab metadata (if any)
+    // tab and column metadata (if any)
     // //////////////////////////////////////////////////////////
 
     private Tab tabMetadata;
@@ -643,10 +642,25 @@ public class EntityModel extends BookmarkableModel<ObjectAdapter> {
         return tabMetadata;
     }
 
-    public void setTabMetadata(final Tab tabMetadata) {
+    public EntityModel withTabMetadata(final Tab tabMetadata) {
         this.tabMetadata = tabMetadata;
+        return this;
     }
 
+
+    private Column columnMetadata;
+
+    public EntityModel withColumnMetadata(final Column columnMetadata) {
+        this.columnMetadata = columnMetadata;
+        this.tabMetadata = columnMetadata.getOwner();
+        return this;
+    }
+
+    public Column getColumnMetadata() {
+        return columnMetadata;
+    }
+
+
     // //////////////////////////////////////////////////////////
     // equals, hashCode
     // //////////////////////////////////////////////////////////

http://git-wip-us.apache.org/repos/asf/isis/blob/f80f273a/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/collections/EntityCollectionsPanel.java
----------------------------------------------------------------------
diff --git a/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/collections/EntityCollectionsPanel.java b/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/collections/EntityCollectionsPanel.java
index b182b1f..81b83c4 100644
--- a/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/collections/EntityCollectionsPanel.java
+++ b/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/collections/EntityCollectionsPanel.java
@@ -19,23 +19,32 @@
 
 package org.apache.isis.viewer.wicket.ui.components.entity.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.behavior.AttributeAppender;
 import org.apache.wicket.markup.html.WebMarkupContainer;
 import org.apache.wicket.markup.html.basic.Label;
 import org.apache.wicket.markup.repeater.RepeatingView;
 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.v1_0.CollectionLayoutMetadata;
+import org.apache.isis.applib.layout.v1_0.Column;
 import org.apache.isis.core.metamodel.adapter.ObjectAdapter;
 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.ObjectSpecification;
+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.spec.feature.OneToManyAssociation;
+import org.apache.isis.core.runtime.services.DeweyOrderComparator;
 import org.apache.isis.viewer.wicket.model.links.LinkAndLabel;
 import org.apache.isis.viewer.wicket.model.models.EntityCollectionModel;
 import org.apache.isis.viewer.wicket.model.models.EntityModel;
@@ -89,8 +98,34 @@ public class EntityCollectionsPanel extends PanelAbstract<EntityModel> {
     private void addCollections() {
         final EntityModel entityModel = getModel();
         final ObjectAdapter adapter = entityModel.getObject();
-        final ObjectSpecification noSpec = adapter.getSpecification();
-        final List<ObjectAssociation> associations = visibleCollections(adapter, noSpec);
+
+        final Column columnMetadataIfAny = entityModel.getColumnMetadata();
+        final Filter<ObjectAssociation> filter;
+        if (columnMetadataIfAny != null) {
+            final ImmutableList<String> collectionIds = FluentIterable
+                    .from(columnMetadataIfAny.getCollections())
+                    .transform(CollectionLayoutMetadata.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 deweyOrderComparator.compare(o1Facet.sequence(), o2Facet.sequence());
+            }
+        });
 
         final RepeatingView collectionRv = new RepeatingView(ID_COLLECTIONS);
         add(collectionRv);
@@ -104,7 +139,8 @@ public class EntityCollectionsPanel extends PanelAbstract<EntityModel> {
         }
     }
 
-    private void addCollectionToForm(final EntityModel entityModel,
+    private void addCollectionToForm(
+            final EntityModel entityModel,
             final ObjectAssociation association,
             final WebMarkupContainer collectionRvContainer) {
 
@@ -163,15 +199,22 @@ public class EntityCollectionsPanel extends PanelAbstract<EntityModel> {
 
     }
 
-    private List<ObjectAssociation> visibleCollections(final ObjectAdapter adapter, final ObjectSpecification noSpec) {
-        return noSpec.getAssociations(Contributed.INCLUDED, visibleCollectionsFilter(adapter));
+    private static List<ObjectAssociation> visibleCollections(
+            final ObjectAdapter adapter,
+            final Filter<ObjectAssociation> filter) {
+        return adapter.getSpecification().getAssociations(
+                Contributed.INCLUDED, visibleCollectionsFilter(adapter, filter));
     }
 
     @SuppressWarnings("unchecked")
-    private Filter<ObjectAssociation> visibleCollectionsFilter(final ObjectAdapter adapter) {
-        return Filters.and(ObjectAssociation.Filters.COLLECTIONS, ObjectAssociation.Filters.dynamicallyVisible(adapter,
-                InteractionInitiatedBy.USER, Where.PARENTED_TABLES
-        ));
+    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/f80f273a/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/properties/EntityPropertiesForm.java
----------------------------------------------------------------------
diff --git a/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/properties/EntityPropertiesForm.java b/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/properties/EntityPropertiesForm.java
index 225dcdd..adc9262 100644
--- a/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/properties/EntityPropertiesForm.java
+++ b/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/properties/EntityPropertiesForm.java
@@ -176,7 +176,8 @@ public class EntityPropertiesForm extends FormAbstract<ObjectAdapter> implements
         
         boolean addedProperties;
         if(columnSpans.getLeft() > 0) {
-            addedProperties = addPropertiesInColumn(leftColumn, MemberGroupLayoutHint.LEFT, tabMetaDataIfAny, columnSpans);
+            addedProperties = addPropertiesAndCollections(
+                    leftColumn, MemberGroupLayoutHint.LEFT, entityModel, tabMetaDataIfAny, columnSpans);
             addButtons(leftColumn);
             addFeedbackGui(leftColumn);
         } else {
@@ -194,7 +195,8 @@ public class EntityPropertiesForm extends FormAbstract<ObjectAdapter> implements
         if(columnSpans.getMiddle() > 0) {
             MarkupContainer middleColumn = new WebMarkupContainer(ID_MIDDLE_COLUMN);
             add(middleColumn);
-            addPropertiesInColumn(middleColumn, MemberGroupLayoutHint.MIDDLE, tabMetaDataIfAny, columnSpans);
+            addPropertiesAndCollections(
+                    middleColumn, MemberGroupLayoutHint.MIDDLE, entityModel, tabMetaDataIfAny, columnSpans);
         } else {
             Components.permanentlyHide(this, ID_MIDDLE_COLUMN);
         }
@@ -203,7 +205,8 @@ public class EntityPropertiesForm extends FormAbstract<ObjectAdapter> implements
         if(columnSpans.getRight() > 0) {
             MarkupContainer rightColumn = new WebMarkupContainer(ID_RIGHT_COLUMN);
             add(rightColumn);
-            addPropertiesInColumn(rightColumn, MemberGroupLayoutHint.RIGHT, tabMetaDataIfAny, columnSpans);
+            addPropertiesAndCollections(
+                    rightColumn, MemberGroupLayoutHint.RIGHT, entityModel, tabMetaDataIfAny, columnSpans);
         } else {
             Components.permanentlyHide(this, ID_RIGHT_COLUMN);
         }
@@ -223,7 +226,9 @@ public class EntityPropertiesForm extends FormAbstract<ObjectAdapter> implements
                 collectionSpan = columnSpans.getCollections();
             }
 
-            final Component collectionsColumn = getComponentFactoryRegistry().addOrReplaceComponent(this, idCollectionsToShow, ComponentType.ENTITY_COLLECTIONS, entityModel);
+            final Component collectionsColumn =
+                    getComponentFactoryRegistry().addOrReplaceComponent(
+                            this, idCollectionsToShow, ComponentType.ENTITY_COLLECTIONS, entityModel);
             addClassForSpan(collectionsColumn, collectionSpan);
 
             Components.permanentlyHide(this, idCollectionsToHide);
@@ -233,20 +238,31 @@ public class EntityPropertiesForm extends FormAbstract<ObjectAdapter> implements
         }
     }
 
+    private boolean addPropertiesAndCollections(
+            final MarkupContainer col,
+            final MemberGroupLayoutHint hint,
+            final EntityModel entityModel,
+            final Tab tabMetaDataIfAny, final ColumnSpans columnSpans) {
+        final boolean addedProperties;
+        addedProperties = addPropertiesInColumn(col, hint, entityModel, tabMetaDataIfAny, columnSpans);
+        addCollectionsIfRequired(col, hint, entityModel, tabMetaDataIfAny);
+        return addedProperties;
+    }
+
     private boolean addPropertiesInColumn(
             final MarkupContainer markupContainer,
             final MemberGroupLayoutHint hint,
+            final EntityModel entityModel,
             final Tab tabMetaDataIfAny,
             final ColumnSpans columnSpans) {
         final int span = hint.from(columnSpans);
-        
-        final EntityModel entityModel = (EntityModel) getModel();
+
         final ObjectAdapter adapter = entityModel.getObject();
         final ObjectSpecification objSpec = adapter.getSpecification();
 
         final Column columnMetaDataIfAny = tabMetaDataIfAny != null ? hint.from(tabMetaDataIfAny) : null;
 
-        final List<ObjectAssociation> properties = visibleAssociations(adapter, ObjectAssociation.Filters.PROPERTIES);
+        final List<ObjectAssociation> properties = visibleProperties(adapter);
 
         final RepeatingView memberGroupRv = new RepeatingView(ID_MEMBER_GROUP);
         markupContainer.add(memberGroupRv);
@@ -299,13 +315,23 @@ public class EntityPropertiesForm extends FormAbstract<ObjectAdapter> implements
         
         addClassForSpan(markupContainer, span);
 
-        // if in a tab, then also render collections
-        if(columnMetaDataIfAny != null) {
-            final List<ObjectAssociation> collections = visibleAssociations(adapter, ObjectAssociation.Filters.COLLECTIONS);
+        return !groupNames.isEmpty();
+    }
 
-        }
+    private void addCollectionsIfRequired(
+            final MarkupContainer column,
+            final MemberGroupLayoutHint hint,
+            final EntityModel entityModel,
+            final Tab tabMetaDataIfAny) {
 
-        return !groupNames.isEmpty();
+        if(tabMetaDataIfAny != null) {
+            final Column columnMetadata = hint.from(tabMetaDataIfAny);
+            final EntityModel modelWithMetadata = new EntityModel(entityModel.getPageParameters()).withColumnMetadata(columnMetadata);
+            getComponentFactoryRegistry()
+                    .addOrReplaceComponent(column, "collections", ComponentType.ENTITY_COLLECTIONS, modelWithMetadata);
+        } else {
+            Components.permanentlyHide(column, "collections");
+        }
     }
 
     private void addPropertyToForm(
@@ -329,24 +355,28 @@ public class EntityPropertiesForm extends FormAbstract<ObjectAdapter> implements
         }
     }
 
+    private List<ObjectAssociation> visibleProperties(final ObjectAdapter adapter) {
+        return visibleProperties(adapter, Filters.<ObjectAssociation>any());
+    }
 
-    private List<ObjectAssociation> visibleAssociations(
+    private List<ObjectAssociation> visibleProperties(
             final ObjectAdapter adapter,
-            final Filter<ObjectAssociation> associationFilter) {
+            final Filter<ObjectAssociation> filter) {
         final ObjectSpecification objSpec = adapter.getSpecification();
 
-        return objSpec.getAssociations(Contributed.INCLUDED, visibleAssociationFilter(adapter, Where.OBJECT_FORMS,
-                associationFilter));
+        return objSpec.getAssociations(
+                Contributed.INCLUDED, visiblePropertiesFilter(adapter, filter));
     }
 
     @SuppressWarnings("unchecked")
-    private static Filter<ObjectAssociation> visibleAssociationFilter(
+    private static Filter<ObjectAssociation> visiblePropertiesFilter(
             final ObjectAdapter adapter,
-            final Where where,
-            final Filter<ObjectAssociation> associationFilter) {
-        return Filters.and(associationFilter, ObjectAssociation.Filters.dynamicallyVisible(adapter,
-                InteractionInitiatedBy.USER, where
-        ));
+            final Filter<ObjectAssociation> filter) {
+        return Filters.and(
+                ObjectAssociation.Filters.PROPERTIES,
+                ObjectAssociation.Filters.dynamicallyVisible(
+                        adapter, InteractionInitiatedBy.USER, Where.OBJECT_FORMS),
+                filter);
     }
 
     @Override

http://git-wip-us.apache.org/repos/asf/isis/blob/f80f273a/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/properties/EntityPropertiesPanel.html
----------------------------------------------------------------------
diff --git a/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/properties/EntityPropertiesPanel.html b/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/properties/EntityPropertiesPanel.html
index 4e917e2..ad8872a 100644
--- a/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/properties/EntityPropertiesPanel.html
+++ b/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/properties/EntityPropertiesPanel.html
@@ -42,6 +42,7 @@
                                     </div>
                                 </fieldset>
                             </div>
+                            <div wicket:id="collections"></div>
                             <div class="feedbackPanel">
                                 <span wicket:id="feedback"></span>
                             </div>
@@ -70,6 +71,7 @@
                                     </div>
                                 </fieldset>
                             </div>
+                            <div wicket:id="collections"></div>
                         </div>
                         <div wicket:id="rightColumn">
                             <div class="inputFormTable properties">
@@ -90,6 +92,7 @@
                                     </div>
                                 </fieldset>
                             </div>
+                            <div wicket:id="collections"></div>
                         </div>
                         <div wicket:id="entityCollections"></div>
                     </div>

http://git-wip-us.apache.org/repos/asf/isis/blob/f80f273a/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/tabgroups/EntityTabGroupsPanel.java
----------------------------------------------------------------------
diff --git a/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/tabgroups/EntityTabGroupsPanel.java b/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/tabgroups/EntityTabGroupsPanel.java
index 6f49a68..fec95d0 100644
--- a/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/tabgroups/EntityTabGroupsPanel.java
+++ b/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/tabgroups/EntityTabGroupsPanel.java
@@ -121,7 +121,7 @@ public class EntityTabGroupsPanel extends PanelAbstract<EntityModel> {
             super(id);
 
             final EntityModel modelWithTabHints = new EntityModel(model.getPageParameters());
-            modelWithTabHints.setTabMetadata(tab);
+            modelWithTabHints.withTabMetadata(tab);
 
             getComponentFactoryRegistry().addOrReplaceComponent(this, ID_ENTITY_PROPERTIES_AND_COLLECTIONS, ComponentType.ENTITY_PROPERTIES, modelWithTabHints);
         }

http://git-wip-us.apache.org/repos/asf/isis/blob/f80f273a/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 a50bdcf..c9e7ac8 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
@@ -5,7 +5,7 @@
     </actions>
     <tabGroup>
         <tab name="Common">
-            <left span="4">
+            <left span="6">
                 <propertyGroup name="General">
                     <property id="name" labelPosition="TOP">
                         <actions>
@@ -14,11 +14,13 @@
                     </property>
                 </propertyGroup>
             </left>
-            <middle span="4">
-            </middle>
+            <right span="6">
+                <collection id="similarTo" defaultView="table"/>
+                <collection id="others" defaultView="hide"/>
+            </right>
         </tab>
         <tab name="Metadata">
-            <left span="4">
+            <left span="6">
                 <propertyGroup name="Persistence">
                     <actions>
                         <action id="downloadJdoMetadata"/>
@@ -29,11 +31,4 @@
             </left>
         </tab>
     </tabGroup>
-    <tabGroup>
-        <tab name="Similar To">
-            <left span="12">
-                <collection id="similarTo"/>
-            </left>
-        </tab>
-    </tabGroup>
 </objectLayout>
\ No newline at end of file


[02/50] [abbrv] isis git commit: [maven-release-plugin] prepare release isis-1.11.1

Posted by da...@apache.org.
[maven-release-plugin] prepare release isis-1.11.1


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

Branch: refs/heads/ISIS-993
Commit: 7c2621ade86f7e03c5a1c115e7685c26f4e67393
Parents: dad0908
Author: Dan Haywood <da...@haywood-associates.co.uk>
Authored: Sun Jan 10 14:09:15 2016 +0000
Committer: Dan Haywood <da...@haywood-associates.co.uk>
Committed: Sun Jan 10 14:09:15 2016 +0000

----------------------------------------------------------------------
 core/applib/pom.xml                          |  2 +-
 core/integtestsupport/pom.xml                |  2 +-
 core/log4j/pom.xml                           |  2 +-
 core/maven-plugin/pom.xml                    |  2 +-
 core/metamodel/pom.xml                       |  2 +-
 core/pom.xml                                 | 66 +++++++++++------------
 core/runtime/pom.xml                         |  2 +-
 core/schema/pom.xml                          |  2 +-
 core/security-shiro/pom.xml                  |  6 +--
 core/security/pom.xml                        |  2 +-
 core/specsupport/pom.xml                     |  2 +-
 core/unittestsupport/pom.xml                 |  2 +-
 core/viewer-restfulobjects-applib/pom.xml    |  2 +-
 core/viewer-restfulobjects-rendering/pom.xml |  2 +-
 core/viewer-restfulobjects-server/pom.xml    |  2 +-
 core/viewer-wicket-applib/pom.xml            |  2 +-
 core/viewer-wicket-impl/pom.xml              |  2 +-
 core/viewer-wicket-model/pom.xml             |  2 +-
 core/viewer-wicket-ui/pom.xml                |  2 +-
 core/webserver/pom.xml                       |  2 +-
 core/wrapper/pom.xml                         |  2 +-
 21 files changed, 55 insertions(+), 55 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/isis/blob/7c2621ad/core/applib/pom.xml
----------------------------------------------------------------------
diff --git a/core/applib/pom.xml b/core/applib/pom.xml
index 757908c..0c7fc02 100644
--- a/core/applib/pom.xml
+++ b/core/applib/pom.xml
@@ -23,7 +23,7 @@
     <parent>
         <groupId>org.apache.isis.core</groupId>
         <artifactId>isis</artifactId>
-        <version>1.12.0-SNAPSHOT</version>
+        <version>1.11.1</version>
     </parent>
 
     <artifactId>isis-core-applib</artifactId>

http://git-wip-us.apache.org/repos/asf/isis/blob/7c2621ad/core/integtestsupport/pom.xml
----------------------------------------------------------------------
diff --git a/core/integtestsupport/pom.xml b/core/integtestsupport/pom.xml
index 8491f67..3da7ac6 100644
--- a/core/integtestsupport/pom.xml
+++ b/core/integtestsupport/pom.xml
@@ -23,7 +23,7 @@
 	<parent>
 		<groupId>org.apache.isis.core</groupId>
 		<artifactId>isis</artifactId>
-        <version>1.12.0-SNAPSHOT</version>
+        <version>1.11.1</version>
 	</parent>
 
 	<artifactId>isis-core-integtestsupport</artifactId>

http://git-wip-us.apache.org/repos/asf/isis/blob/7c2621ad/core/log4j/pom.xml
----------------------------------------------------------------------
diff --git a/core/log4j/pom.xml b/core/log4j/pom.xml
index 4a029c1..1ef669f 100644
--- a/core/log4j/pom.xml
+++ b/core/log4j/pom.xml
@@ -15,7 +15,7 @@
     <parent>
         <groupId>org.apache.isis.core</groupId>
         <artifactId>isis</artifactId>
-        <version>1.12.0-SNAPSHOT</version>
+        <version>1.11.1</version>
     </parent>
 
     <artifactId>isis-core-log4j</artifactId>

http://git-wip-us.apache.org/repos/asf/isis/blob/7c2621ad/core/maven-plugin/pom.xml
----------------------------------------------------------------------
diff --git a/core/maven-plugin/pom.xml b/core/maven-plugin/pom.xml
index 4456432..d0a38ce 100644
--- a/core/maven-plugin/pom.xml
+++ b/core/maven-plugin/pom.xml
@@ -23,7 +23,7 @@
     <parent>
         <groupId>org.apache.isis.core</groupId>
         <artifactId>isis</artifactId>
-        <version>1.12.0-SNAPSHOT</version>
+        <version>1.11.1</version>
     </parent>
 
     <groupId>org.apache.isis.tool</groupId>

http://git-wip-us.apache.org/repos/asf/isis/blob/7c2621ad/core/metamodel/pom.xml
----------------------------------------------------------------------
diff --git a/core/metamodel/pom.xml b/core/metamodel/pom.xml
index 493c298..b7e6b59 100644
--- a/core/metamodel/pom.xml
+++ b/core/metamodel/pom.xml
@@ -23,7 +23,7 @@
     <parent>
         <groupId>org.apache.isis.core</groupId>
         <artifactId>isis</artifactId>
-        <version>1.12.0-SNAPSHOT</version>
+        <version>1.11.1</version>
     </parent>
 
     <artifactId>isis-core-metamodel</artifactId>

http://git-wip-us.apache.org/repos/asf/isis/blob/7c2621ad/core/pom.xml
----------------------------------------------------------------------
diff --git a/core/pom.xml b/core/pom.xml
index 5b7de63..b54a9c5 100644
--- a/core/pom.xml
+++ b/core/pom.xml
@@ -29,7 +29,7 @@
 
     <groupId>org.apache.isis.core</groupId>
     <artifactId>isis</artifactId>
-    <version>1.12.0-SNAPSHOT</version>
+    <version>1.11.1</version>
     
     <packaging>pom</packaging>
 
@@ -162,7 +162,7 @@
         <connection>scm:git:http://git.apache.org/isis.git/core</connection>
         <developerConnection>scm:git:https://git-wip-us.apache.org/repos/asf/isis.git/trunk/framework/</developerConnection>
         <url>git://git.apache.org/isis.git/core</url>
-      <tag>HEAD</tag>
+      <tag>isis-1.11.1</tag>
   </scm>
 
     <url>http://isis.apache.org</url>
@@ -1061,13 +1061,13 @@ ${license.additional-notes}
             <dependency>
                 <groupId>org.apache.isis.core</groupId>
                 <artifactId>isis-core-unittestsupport</artifactId>
-                <version>1.12.0-SNAPSHOT</version>
+                <version>1.11.1</version>
                 <!-- not scope=test, because referenced by some sql-tests-common under compile scope -->
             </dependency>
             <dependency>
                 <groupId>org.apache.isis.core</groupId>
                 <artifactId>isis-core-unittestsupport</artifactId>
-                <version>1.12.0-SNAPSHOT</version>
+                <version>1.11.1</version>
                 <type>test-jar</type>
                 <scope>test</scope>
             </dependency>
@@ -1076,14 +1076,14 @@ ${license.additional-notes}
             <dependency>
                 <groupId>org.apache.isis.core</groupId>
                 <artifactId>isis-core-applib</artifactId>
-                <version>1.12.0-SNAPSHOT</version>
+                <version>1.11.1</version>
                 <type>jar</type>
                 <scope>compile</scope>
             </dependency>
             <dependency>
                 <groupId>org.apache.isis.core</groupId>
                 <artifactId>isis-core-applib</artifactId>
-                <version>1.12.0-SNAPSHOT</version>
+                <version>1.11.1</version>
                 <type>test-jar</type>
                 <scope>test</scope>
             </dependency>
@@ -1092,14 +1092,14 @@ ${license.additional-notes}
             <dependency>
                 <groupId>org.apache.isis.core</groupId>
                 <artifactId>isis-core-schema</artifactId>
-                <version>1.12.0-SNAPSHOT</version>
+                <version>1.11.1</version>
                 <type>jar</type>
                 <scope>compile</scope>
             </dependency>
             <dependency>
                 <groupId>org.apache.isis.core</groupId>
                 <artifactId>isis-core-schema</artifactId>
-                <version>1.12.0-SNAPSHOT</version>
+                <version>1.11.1</version>
                 <type>test-jar</type>
                 <scope>test</scope>
             </dependency>
@@ -1108,7 +1108,7 @@ ${license.additional-notes}
             <dependency>
                 <groupId>org.apache.isis.core</groupId>
                 <artifactId>isis-core-log4j</artifactId>
-                <version>1.12.0-SNAPSHOT</version>
+                <version>1.11.1</version>
                 <type>jar</type>
                 <scope>compile</scope>
             </dependency>
@@ -1117,14 +1117,14 @@ ${license.additional-notes}
             <dependency>
                 <groupId>org.apache.isis.core</groupId>
                 <artifactId>isis-core-metamodel</artifactId>
-                <version>1.12.0-SNAPSHOT</version>
+                <version>1.11.1</version>
                 <type>jar</type>
                 <scope>compile</scope>
             </dependency>
             <dependency>
                 <groupId>org.apache.isis.core</groupId>
                 <artifactId>isis-core-metamodel</artifactId>
-                <version>1.12.0-SNAPSHOT</version>
+                <version>1.11.1</version>
                 <type>test-jar</type>
                 <scope>test</scope>
             </dependency>
@@ -1133,40 +1133,40 @@ ${license.additional-notes}
             <dependency>
                 <groupId>org.apache.isis.core</groupId>
                 <artifactId>isis-core-runtime</artifactId>
-                <version>1.12.0-SNAPSHOT</version>
+                <version>1.11.1</version>
             </dependency>
             <dependency>
                 <groupId>org.apache.isis.core</groupId>
                 <artifactId>isis-core-runtime</artifactId>
-                <version>1.12.0-SNAPSHOT</version>
+                <version>1.11.1</version>
                 <type>test-jar</type>
                 <scope>test</scope>
             </dependency>
             <dependency>
                 <groupId>org.apache.isis.core</groupId>
                 <artifactId>isis-core-wrapper</artifactId>
-                <version>1.12.0-SNAPSHOT</version>
+                <version>1.11.1</version>
             </dependency>
 
             <!-- webserver -->
             <dependency>
                 <groupId>org.apache.isis.core</groupId>
                 <artifactId>isis-core-webserver</artifactId>
-                <version>1.12.0-SNAPSHOT</version>
+                <version>1.11.1</version>
             </dependency>
 
             <!-- specsupport -->
             <dependency>
                 <groupId>org.apache.isis.core</groupId>
                 <artifactId>isis-core-specsupport</artifactId>
-                <version>1.12.0-SNAPSHOT</version>
+                <version>1.11.1</version>
             </dependency>
 
             <!-- integtestsupport -->
             <dependency>
                 <groupId>org.apache.isis.core</groupId>
                 <artifactId>isis-core-integtestsupport</artifactId>
-                <version>1.12.0-SNAPSHOT</version>
+                <version>1.11.1</version>
                 <!-- not scope=test, because referenced by some sql-tests-common under compile scope -->
             </dependency>
 
@@ -1174,36 +1174,36 @@ ${license.additional-notes}
             <dependency>
                 <groupId>org.apache.isis.core</groupId>
                 <artifactId>isis-core-viewer-restfulobjects-applib</artifactId>
-                <version>1.12.0-SNAPSHOT</version>
+                <version>1.11.1</version>
             </dependency>
             <dependency>
                 <groupId>org.apache.isis.core</groupId>
                 <artifactId>isis-core-viewer-restfulobjects-applib</artifactId>
-                <version>1.12.0-SNAPSHOT</version>
+                <version>1.11.1</version>
                 <type>test-jar</type>
                 <scope>test</scope>
             </dependency>
             <dependency>
                 <groupId>org.apache.isis.core</groupId>
                 <artifactId>isis-core-viewer-restfulobjects-rendering</artifactId>
-                <version>1.12.0-SNAPSHOT</version>
+                <version>1.11.1</version>
             </dependency>
             <dependency>
                 <groupId>org.apache.isis.core</groupId>
                 <artifactId>isis-core-viewer-restfulobjects-rendering</artifactId>
-                <version>1.12.0-SNAPSHOT</version>
+                <version>1.11.1</version>
                 <type>test-jar</type>
                 <scope>test</scope>
             </dependency>
             <dependency>
                 <groupId>org.apache.isis.core</groupId>
                 <artifactId>isis-core-viewer-restfulobjects-server</artifactId>
-                <version>1.12.0-SNAPSHOT</version>
+                <version>1.11.1</version>
             </dependency>
             <dependency>
                 <groupId>org.apache.isis.core</groupId>
                 <artifactId>isis-core-viewer-restfulobjects-server</artifactId>
-                <version>1.12.0-SNAPSHOT</version>
+                <version>1.11.1</version>
                 <type>test-jar</type>
                 <scope>test</scope>
             </dependency>
@@ -1212,12 +1212,12 @@ ${license.additional-notes}
             <dependency>
                 <groupId>org.apache.isis.core</groupId>
                 <artifactId>isis-core-security</artifactId>
-                <version>1.12.0-SNAPSHOT</version>
+                <version>1.11.1</version>
             </dependency>
             <dependency>
                 <groupId>org.apache.isis.core</groupId>
                 <artifactId>isis-core-security-shiro</artifactId>
-                <version>1.12.0-SNAPSHOT</version>
+                <version>1.11.1</version>
             </dependency>
 
             
@@ -1225,41 +1225,41 @@ ${license.additional-notes}
             <dependency>
                 <groupId>org.apache.isis.viewer</groupId>
                 <artifactId>isis-viewer-wicket-applib</artifactId>
-                <version>1.12.0-SNAPSHOT</version>
+                <version>1.11.1</version>
             </dependency>
             <dependency>
                 <groupId>org.apache.isis.viewer</groupId>
                 <artifactId>isis-viewer-wicket-model</artifactId>
-                <version>1.12.0-SNAPSHOT</version>
+                <version>1.11.1</version>
             </dependency>
             <dependency>
                 <groupId>org.apache.isis.viewer</groupId>
                 <artifactId>isis-viewer-wicket-model</artifactId>
-                <version>1.12.0-SNAPSHOT</version>
+                <version>1.11.1</version>
                 <scope>test</scope>
                 <type>test-jar</type>
             </dependency>
             <dependency>
                 <groupId>org.apache.isis.viewer</groupId>
                 <artifactId>isis-viewer-wicket-ui</artifactId>
-                <version>1.12.0-SNAPSHOT</version>
+                <version>1.11.1</version>
             </dependency>
             <dependency>
                 <groupId>org.apache.isis.viewer</groupId>
                 <artifactId>isis-viewer-wicket-ui</artifactId>
-                <version>1.12.0-SNAPSHOT</version>
+                <version>1.11.1</version>
                 <scope>test</scope>
                 <type>test-jar</type>
             </dependency>
             <dependency>
                 <groupId>org.apache.isis.viewer</groupId>
                 <artifactId>isis-viewer-wicket-impl</artifactId>
-                <version>1.12.0-SNAPSHOT</version>
+                <version>1.11.1</version>
             </dependency>
             <dependency>
                 <groupId>org.apache.isis.viewer</groupId>
                 <artifactId>isis-viewer-wicket-impl</artifactId>
-                <version>1.12.0-SNAPSHOT</version>
+                <version>1.11.1</version>
                 <scope>test</scope>
                 <type>test-jar</type>
             </dependency>
@@ -1269,7 +1269,7 @@ ${license.additional-notes}
             <dependency>
                 <groupId>org.apache.isis.tool</groupId>
                 <artifactId>isis-maven-plugin</artifactId>
-                <version>1.12.0-SNAPSHOT</version>
+                <version>1.11.1</version>
             </dependency>
 
             <!-- JodaTime -->

http://git-wip-us.apache.org/repos/asf/isis/blob/7c2621ad/core/runtime/pom.xml
----------------------------------------------------------------------
diff --git a/core/runtime/pom.xml b/core/runtime/pom.xml
index cacb227..c950886 100644
--- a/core/runtime/pom.xml
+++ b/core/runtime/pom.xml
@@ -23,7 +23,7 @@
 	<parent>
 		<groupId>org.apache.isis.core</groupId>
 		<artifactId>isis</artifactId>
-        <version>1.12.0-SNAPSHOT</version>
+        <version>1.11.1</version>
 	</parent>
 
 	<artifactId>isis-core-runtime</artifactId>

http://git-wip-us.apache.org/repos/asf/isis/blob/7c2621ad/core/schema/pom.xml
----------------------------------------------------------------------
diff --git a/core/schema/pom.xml b/core/schema/pom.xml
index 9bcc078..e864307 100644
--- a/core/schema/pom.xml
+++ b/core/schema/pom.xml
@@ -23,7 +23,7 @@
     <parent>
         <groupId>org.apache.isis.core</groupId>
         <artifactId>isis</artifactId>
-        <version>1.12.0-SNAPSHOT</version>
+        <version>1.11.1</version>
     </parent>
 
     <artifactId>isis-core-schema</artifactId>

http://git-wip-us.apache.org/repos/asf/isis/blob/7c2621ad/core/security-shiro/pom.xml
----------------------------------------------------------------------
diff --git a/core/security-shiro/pom.xml b/core/security-shiro/pom.xml
index 206e8d5..bab1ea0 100644
--- a/core/security-shiro/pom.xml
+++ b/core/security-shiro/pom.xml
@@ -23,12 +23,12 @@
 	<parent>
 		<groupId>org.apache.isis.core</groupId>
 		<artifactId>isis</artifactId>
-        <version>1.12.0-SNAPSHOT</version>
+        <version>1.11.1</version>
 	</parent>
 
 	<groupId>org.apache.isis.core</groupId>
 	<artifactId>isis-core-security-shiro</artifactId>
-    <version>1.12.0-SNAPSHOT</version>
+    <version>1.11.1</version>
 
 	<name>Isis Security Shiro</name>
 
@@ -65,7 +65,7 @@
 			<dependency>
 			    <groupId>org.apache.isis.core</groupId>
 			    <artifactId>isis-core-security-shiro</artifactId>
-				<version>1.12.0-SNAPSHOT</version>
+				<version>1.11.1</version>
 			</dependency>
     	</dependencies>
     </dependencyManagement>

http://git-wip-us.apache.org/repos/asf/isis/blob/7c2621ad/core/security/pom.xml
----------------------------------------------------------------------
diff --git a/core/security/pom.xml b/core/security/pom.xml
index 5464258..5951a70 100644
--- a/core/security/pom.xml
+++ b/core/security/pom.xml
@@ -23,7 +23,7 @@
 	<parent>
 		<groupId>org.apache.isis.core</groupId>
 		<artifactId>isis</artifactId>
-        <version>1.12.0-SNAPSHOT</version>
+        <version>1.11.1</version>
 	</parent>
 
 	<artifactId>isis-core-security</artifactId>

http://git-wip-us.apache.org/repos/asf/isis/blob/7c2621ad/core/specsupport/pom.xml
----------------------------------------------------------------------
diff --git a/core/specsupport/pom.xml b/core/specsupport/pom.xml
index a70b1a7..f8492cf 100644
--- a/core/specsupport/pom.xml
+++ b/core/specsupport/pom.xml
@@ -15,7 +15,7 @@
     <parent>
         <groupId>org.apache.isis.core</groupId>
         <artifactId>isis</artifactId>
-        <version>1.12.0-SNAPSHOT</version>
+        <version>1.11.1</version>
     </parent>
 
     <artifactId>isis-core-specsupport</artifactId>

http://git-wip-us.apache.org/repos/asf/isis/blob/7c2621ad/core/unittestsupport/pom.xml
----------------------------------------------------------------------
diff --git a/core/unittestsupport/pom.xml b/core/unittestsupport/pom.xml
index c9dffa6..71ed875 100644
--- a/core/unittestsupport/pom.xml
+++ b/core/unittestsupport/pom.xml
@@ -23,7 +23,7 @@
 	<parent>
 		<groupId>org.apache.isis.core</groupId>
 		<artifactId>isis</artifactId>
-        <version>1.12.0-SNAPSHOT</version>
+        <version>1.11.1</version>
 	</parent>
 
 	<artifactId>isis-core-unittestsupport</artifactId>

http://git-wip-us.apache.org/repos/asf/isis/blob/7c2621ad/core/viewer-restfulobjects-applib/pom.xml
----------------------------------------------------------------------
diff --git a/core/viewer-restfulobjects-applib/pom.xml b/core/viewer-restfulobjects-applib/pom.xml
index e5d989d..7bdbdd8 100644
--- a/core/viewer-restfulobjects-applib/pom.xml
+++ b/core/viewer-restfulobjects-applib/pom.xml
@@ -23,7 +23,7 @@
     <parent>
         <groupId>org.apache.isis.core</groupId>
         <artifactId>isis</artifactId>
-        <version>1.12.0-SNAPSHOT</version>
+        <version>1.11.1</version>
     </parent>
 
 	<artifactId>isis-core-viewer-restfulobjects-applib</artifactId>

http://git-wip-us.apache.org/repos/asf/isis/blob/7c2621ad/core/viewer-restfulobjects-rendering/pom.xml
----------------------------------------------------------------------
diff --git a/core/viewer-restfulobjects-rendering/pom.xml b/core/viewer-restfulobjects-rendering/pom.xml
index 5184877..37f2cd2 100644
--- a/core/viewer-restfulobjects-rendering/pom.xml
+++ b/core/viewer-restfulobjects-rendering/pom.xml
@@ -23,7 +23,7 @@
     <parent>
         <groupId>org.apache.isis.core</groupId>
         <artifactId>isis</artifactId>
-        <version>1.12.0-SNAPSHOT</version>
+        <version>1.11.1</version>
     </parent>
 
     <artifactId>isis-core-viewer-restfulobjects-rendering</artifactId>

http://git-wip-us.apache.org/repos/asf/isis/blob/7c2621ad/core/viewer-restfulobjects-server/pom.xml
----------------------------------------------------------------------
diff --git a/core/viewer-restfulobjects-server/pom.xml b/core/viewer-restfulobjects-server/pom.xml
index a2bc140..9cdc9c6 100644
--- a/core/viewer-restfulobjects-server/pom.xml
+++ b/core/viewer-restfulobjects-server/pom.xml
@@ -23,7 +23,7 @@
     <parent>
         <groupId>org.apache.isis.core</groupId>
         <artifactId>isis</artifactId>
-        <version>1.12.0-SNAPSHOT</version>
+        <version>1.11.1</version>
     </parent>
 
     <artifactId>isis-core-viewer-restfulobjects-server</artifactId>

http://git-wip-us.apache.org/repos/asf/isis/blob/7c2621ad/core/viewer-wicket-applib/pom.xml
----------------------------------------------------------------------
diff --git a/core/viewer-wicket-applib/pom.xml b/core/viewer-wicket-applib/pom.xml
index 54cb73f..1a2d707 100644
--- a/core/viewer-wicket-applib/pom.xml
+++ b/core/viewer-wicket-applib/pom.xml
@@ -24,7 +24,7 @@
 	<parent>
 		<groupId>org.apache.isis.core</groupId>
 		<artifactId>isis</artifactId>
-		<version>1.12.0-SNAPSHOT</version>
+		<version>1.11.1</version>
     </parent>
 
     <groupId>org.apache.isis.viewer</groupId>

http://git-wip-us.apache.org/repos/asf/isis/blob/7c2621ad/core/viewer-wicket-impl/pom.xml
----------------------------------------------------------------------
diff --git a/core/viewer-wicket-impl/pom.xml b/core/viewer-wicket-impl/pom.xml
index 1190f01..a811bf5 100644
--- a/core/viewer-wicket-impl/pom.xml
+++ b/core/viewer-wicket-impl/pom.xml
@@ -24,7 +24,7 @@
 	<parent>
 		<groupId>org.apache.isis.core</groupId>
 		<artifactId>isis</artifactId>
-		<version>1.12.0-SNAPSHOT</version>
+		<version>1.11.1</version>
 	</parent>
 
 	<name>Isis Wicket Viewer Implementation</name>

http://git-wip-us.apache.org/repos/asf/isis/blob/7c2621ad/core/viewer-wicket-model/pom.xml
----------------------------------------------------------------------
diff --git a/core/viewer-wicket-model/pom.xml b/core/viewer-wicket-model/pom.xml
index e4ff14d..e690404 100644
--- a/core/viewer-wicket-model/pom.xml
+++ b/core/viewer-wicket-model/pom.xml
@@ -24,7 +24,7 @@
 	<parent>
 		<groupId>org.apache.isis.core</groupId>
 		<artifactId>isis</artifactId>
-		<version>1.12.0-SNAPSHOT</version>
+		<version>1.11.1</version>
 	</parent>
 
     <groupId>org.apache.isis.viewer</groupId>

http://git-wip-us.apache.org/repos/asf/isis/blob/7c2621ad/core/viewer-wicket-ui/pom.xml
----------------------------------------------------------------------
diff --git a/core/viewer-wicket-ui/pom.xml b/core/viewer-wicket-ui/pom.xml
index 5de324b..141510c 100644
--- a/core/viewer-wicket-ui/pom.xml
+++ b/core/viewer-wicket-ui/pom.xml
@@ -24,7 +24,7 @@
 	<parent>
 		<groupId>org.apache.isis.core</groupId>
 		<artifactId>isis</artifactId>
-		<version>1.12.0-SNAPSHOT</version>
+		<version>1.11.1</version>
 	</parent>
 
     <groupId>org.apache.isis.viewer</groupId>

http://git-wip-us.apache.org/repos/asf/isis/blob/7c2621ad/core/webserver/pom.xml
----------------------------------------------------------------------
diff --git a/core/webserver/pom.xml b/core/webserver/pom.xml
index 4f222fe..1cba08e 100644
--- a/core/webserver/pom.xml
+++ b/core/webserver/pom.xml
@@ -23,7 +23,7 @@
     <parent>
 		<groupId>org.apache.isis.core</groupId>
 		<artifactId>isis</artifactId>
-        <version>1.12.0-SNAPSHOT</version>
+        <version>1.11.1</version>
     </parent>
 
 	<artifactId>isis-core-webserver</artifactId>

http://git-wip-us.apache.org/repos/asf/isis/blob/7c2621ad/core/wrapper/pom.xml
----------------------------------------------------------------------
diff --git a/core/wrapper/pom.xml b/core/wrapper/pom.xml
index e4486a5..656658c 100644
--- a/core/wrapper/pom.xml
+++ b/core/wrapper/pom.xml
@@ -23,7 +23,7 @@
     <parent>
         <groupId>org.apache.isis.core</groupId>
         <artifactId>isis</artifactId>
-        <version>1.12.0-SNAPSHOT</version>
+        <version>1.11.1</version>
 	</parent>
 
 	<artifactId>isis-core-wrapper</artifactId>


[48/50] [abbrv] isis git commit: ISIS-993: metadata classes, facet factory, starting on the wicket component

Posted by da...@apache.org.
http://git-wip-us.apache.org/repos/asf/isis/blob/99f808c1/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/object/layoutxml/LayoutXmlFacet.java
----------------------------------------------------------------------
diff --git a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/object/layoutxml/LayoutXmlFacet.java b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/object/layoutxml/LayoutXmlFacet.java
new file mode 100644
index 0000000..608abbe
--- /dev/null
+++ b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/object/layoutxml/LayoutXmlFacet.java
@@ -0,0 +1,32 @@
+/*
+ *  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.facets.object.layoutxml;
+
+
+import org.apache.isis.core.metamodel.facetapi.Facet;
+import org.apache.isis.applib.layout.v1_0.DomainObject;
+
+/**
+ * Corresponds to providing a <code>.layout.xml</code> file for the domain object's class.
+ */
+public interface LayoutXmlFacet extends Facet {
+
+    public DomainObject getLayoutMetadata();
+
+}

http://git-wip-us.apache.org/repos/asf/isis/blob/99f808c1/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/object/layoutxml/LayoutXmlFacetDefault.java
----------------------------------------------------------------------
diff --git a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/object/layoutxml/LayoutXmlFacetDefault.java b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/object/layoutxml/LayoutXmlFacetDefault.java
new file mode 100644
index 0000000..3a391d7
--- /dev/null
+++ b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/object/layoutxml/LayoutXmlFacetDefault.java
@@ -0,0 +1,85 @@
+/*
+ *  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.facets.object.layoutxml;
+
+
+import java.util.List;
+
+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.applib.layout.v1_0.DomainObject;
+import org.apache.isis.applib.layout.v1_0.TabGroup;
+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.OneToOneAssociation;
+
+public class LayoutXmlFacetDefault
+            extends FacetAbstract
+            implements LayoutXmlFacet {
+
+    private final DomainObject metadata;
+
+    public static Class<? extends Facet> type() {
+        return LayoutXmlFacet.class;
+    }
+
+
+    public static LayoutXmlFacet create(
+            final FacetHolder facetHolder,
+            final DomainObject domainObject) {
+        if(domainObject == null) {
+            return null;
+        }
+        return new LayoutXmlFacetDefault(facetHolder, domainObject);
+    }
+
+    private LayoutXmlFacetDefault(
+            final FacetHolder facetHolder,
+            final DomainObject metadata) {
+        super(LayoutXmlFacetDefault.type(), facetHolder, Derivation.NOT_DERIVED);
+        this.metadata = metadata;
+    }
+
+
+    private boolean fleshedOut;
+
+    public DomainObject getLayoutMetadata() {
+        return fleshedOut? metadata : fleshOut(metadata);
+    }
+
+    private  DomainObject fleshOut(final DomainObject metadata) {
+        synchronized (metadata) {
+            doFleshOut(metadata);
+            fleshedOut = true;
+        }
+        return metadata;
+    }
+
+    private void doFleshOut(final DomainObject metadata) {
+        ObjectSpecification objectSpec = (ObjectSpecification) getFacetHolder();
+        List<OneToOneAssociation> properties = getProperties(objectSpec);
+        List<TabGroup> tabGroups = metadata.getTabGroups();
+    }
+
+    private List getProperties(final ObjectSpecification objectSpec) {
+        return objectSpec
+                .getAssociations(Contributed.INCLUDED, OneToOneAssociation.Filters.PROPERTIES);
+    }
+}

http://git-wip-us.apache.org/repos/asf/isis/blob/99f808c1/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/object/layoutxml/LayoutXmlFacetFactory.java
----------------------------------------------------------------------
diff --git a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/object/layoutxml/LayoutXmlFacetFactory.java b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/object/layoutxml/LayoutXmlFacetFactory.java
new file mode 100644
index 0000000..17d4063
--- /dev/null
+++ b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/object/layoutxml/LayoutXmlFacetFactory.java
@@ -0,0 +1,98 @@
+/* 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.facets.object.layoutxml;
+
+import java.io.IOException;
+import java.util.Set;
+
+import com.google.common.collect.Sets;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import org.apache.isis.applib.services.jaxb.JaxbService;
+import org.apache.isis.core.commons.lang.ClassExtensions;
+import org.apache.isis.core.metamodel.facetapi.FacetHolder;
+import org.apache.isis.core.metamodel.facetapi.FacetUtil;
+import org.apache.isis.core.metamodel.facetapi.FeatureType;
+import org.apache.isis.core.metamodel.facets.FacetFactoryAbstract;
+import org.apache.isis.applib.layout.v1_0.DomainObject;
+import org.apache.isis.core.metamodel.runtimecontext.ServicesInjector;
+import org.apache.isis.core.metamodel.runtimecontext.ServicesInjectorAware;
+
+public class LayoutXmlFacetFactory extends FacetFactoryAbstract implements ServicesInjectorAware {
+
+    private static final Logger LOG = LoggerFactory.getLogger(LayoutXmlFacetFactory.class);
+
+    public LayoutXmlFacetFactory() {
+        super(FeatureType.OBJECTS_ONLY);
+    }
+
+    @Override
+    public void process(final ProcessClassContext processClassContext) {
+        final Class<?> cls = processClassContext.getCls();
+        final FacetHolder facetHolder = processClassContext.getFacetHolder();
+
+        FacetUtil.addFacet(LayoutXmlFacetDefault.create(facetHolder, readMetadata(cls)));
+    }
+
+    private final Set<Class<?>> blacklisted = Sets.newConcurrentHashSet();
+
+    private DomainObject readMetadata(final Class<?> domainClass) {
+
+        if(blacklisted.contains(domainClass)) {
+            return null;
+        }
+        final String xml;
+
+        final String resourceName = domainClass.getSimpleName() + ".layout.xml";
+        try {
+            xml = ClassExtensions.resourceContentOf(domainClass, resourceName);
+        } catch (IOException | IllegalArgumentException ex) {
+
+            blacklisted.add(domainClass);
+            final String message = String .format(
+                    "Failed to locate file %s (relative to %s.class); ex: %s)",
+                    resourceName, domainClass.getName(), ex.getMessage());
+
+            LOG.debug(message);
+            return null;
+        }
+
+        try {
+            final JaxbService jaxbService = servicesInjector.lookupService(JaxbService.class);
+            final DomainObject metadata = jaxbService.fromXml(DomainObject.class, xml);
+            return metadata;
+        } catch(Exception ex) {
+
+            // note that we don't blacklist if the file exists but couldn't be parsed;
+            // the developer might fix so we will want to retry.
+            final String message = "Failed to parse " + resourceName + " file (" + ex.getMessage() + ")";
+            LOG.warn(message);
+
+            return null;
+        }
+    }
+
+    private ServicesInjector servicesInjector;
+
+    @Override
+    public void setServicesInjector(final ServicesInjector servicesInjector) {
+        this.servicesInjector = servicesInjector;
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/isis/blob/99f808c1/core/metamodel/src/main/java/org/apache/isis/progmodels/dflt/ProgrammingModelFacetsJava5.java
----------------------------------------------------------------------
diff --git a/core/metamodel/src/main/java/org/apache/isis/progmodels/dflt/ProgrammingModelFacetsJava5.java b/core/metamodel/src/main/java/org/apache/isis/progmodels/dflt/ProgrammingModelFacetsJava5.java
index 621b75b..9fc19be 100644
--- a/core/metamodel/src/main/java/org/apache/isis/progmodels/dflt/ProgrammingModelFacetsJava5.java
+++ b/core/metamodel/src/main/java/org/apache/isis/progmodels/dflt/ProgrammingModelFacetsJava5.java
@@ -82,7 +82,7 @@ import org.apache.isis.core.metamodel.facets.object.disabled.method.DisabledObje
 import org.apache.isis.core.metamodel.facets.object.domainobject.DomainObjectAnnotationFacetFactory;
 import org.apache.isis.core.metamodel.facets.object.domainobjectlayout.DomainObjectLayoutFacetFactory;
 import org.apache.isis.core.metamodel.facets.object.domainservice.annotation.DomainServiceFacetAnnotationFactory;
-import org.apache.isis.core.metamodel.facets.object.domainservicelayout.DomainServiceLayoutFactory;
+import org.apache.isis.core.metamodel.facets.object.domainservicelayout.DomainServiceLayoutFacetFactory;
 import org.apache.isis.core.metamodel.facets.object.encodeable.annotcfg.EncodableFacetAnnotationElseConfigurationFactory;
 import org.apache.isis.core.metamodel.facets.object.facets.annotation.FacetsFacetAnnotationFactory;
 import org.apache.isis.core.metamodel.facets.object.fieldorder.annotation.FieldOrderFacetAnnotationFactory;
@@ -108,6 +108,7 @@ import org.apache.isis.core.metamodel.facets.object.ignore.jdo.RemoveJdoEnhancem
 import org.apache.isis.core.metamodel.facets.object.ignore.jdo.RemoveJdoPrefixedMethodsFacetFactory;
 import org.apache.isis.core.metamodel.facets.object.immutable.immutableannot.CopyImmutableFacetOntoMembersFactory;
 import org.apache.isis.core.metamodel.facets.object.immutable.immutablemarkerifc.ImmutableFacetMarkerInterfaceFactory;
+import org.apache.isis.core.metamodel.facets.object.layoutxml.LayoutXmlFacetFactory;
 import org.apache.isis.core.metamodel.facets.object.mask.annotation.MaskFacetOnTypeAnnotationFactory;
 import org.apache.isis.core.metamodel.facets.object.maxlen.annotation.MaxLengthFacetOnTypeAnnotationFactory;
 import org.apache.isis.core.metamodel.facets.object.membergroups.annotprop.MemberGroupLayoutFacetFactory;
@@ -390,7 +391,9 @@ public final class ProgrammingModelFacetsJava5 extends ProgrammingModelAbstract
         // must come after DomainObjectAnnotationFacetFactory & MixinFacetFactory
         addFactory(NotContributedFacetDerivedFromMixinFacetFactory.class);
 
-        addFactory(DomainServiceLayoutFactory.class);
+        addFactory(LayoutXmlFacetFactory.class);
+
+        addFactory(DomainServiceLayoutFacetFactory.class);
         addFactory(DomainObjectLayoutFacetFactory.class);
         // must come after MultiLine
         addFactory(PropertyLayoutFacetFactory.class);

http://git-wip-us.apache.org/repos/asf/isis/blob/99f808c1/core/metamodel/src/test/java/org/apache/isis/core/metamodel/facets/object/domainservicelayout/annotation/DomainServiceLayoutFacetFactoryTest.java
----------------------------------------------------------------------
diff --git a/core/metamodel/src/test/java/org/apache/isis/core/metamodel/facets/object/domainservicelayout/annotation/DomainServiceLayoutFacetFactoryTest.java b/core/metamodel/src/test/java/org/apache/isis/core/metamodel/facets/object/domainservicelayout/annotation/DomainServiceLayoutFacetFactoryTest.java
new file mode 100644
index 0000000..4460313
--- /dev/null
+++ b/core/metamodel/src/test/java/org/apache/isis/core/metamodel/facets/object/domainservicelayout/annotation/DomainServiceLayoutFacetFactoryTest.java
@@ -0,0 +1,129 @@
+/*
+ *  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.facets.object.domainservicelayout.annotation;
+
+import org.junit.Assert;
+import org.apache.isis.applib.annotation.DomainService;
+import org.apache.isis.applib.annotation.DomainServiceLayout;
+import org.apache.isis.core.metamodel.facetapi.Facet;
+import org.apache.isis.core.metamodel.facets.AbstractFacetFactoryTest;
+import org.apache.isis.core.metamodel.facets.FacetFactory.ProcessClassContext;
+import org.apache.isis.core.metamodel.facets.object.domainservicelayout.DomainServiceLayoutFacet;
+import org.apache.isis.core.metamodel.facets.object.domainservicelayout.DomainServiceLayoutFacetFactory;
+
+import static org.hamcrest.Matchers.is;
+
+public class DomainServiceLayoutFacetFactoryTest extends AbstractFacetFactoryTest {
+
+    private DomainServiceLayoutFacetFactory facetFactory;
+
+    @Override
+    protected void setUp() throws Exception {
+        super.setUp();
+
+        facetFactory = new DomainServiceLayoutFacetFactory();
+    }
+
+    @Override
+    protected void tearDown() throws Exception {
+        facetFactory = null;
+        super.tearDown();
+    }
+
+    public void testAnnotationPickedUpOnClass() {
+        class Customer {
+        }
+        @DomainServiceLayout(menuOrder = "123" ,menuBar = DomainServiceLayout.MenuBar.SECONDARY)
+        class Customers {
+        }
+
+        facetFactory.process(new ProcessClassContext(Customers.class, null, methodRemover, facetHolder));
+
+        final Facet facet = facetHolder.getFacet(DomainServiceLayoutFacet.class);
+        assertNotNull(facet);
+        assertTrue(facet instanceof DomainServiceLayoutFacetAnnotation);
+        DomainServiceLayoutFacetAnnotation domainServiceLayoutFacet = (DomainServiceLayoutFacetAnnotation) facet;
+        Assert.assertThat(domainServiceLayoutFacet.getMenuOrder(), is("123"));
+        Assert.assertThat(domainServiceLayoutFacet.getMenuBar(), is(DomainServiceLayout.MenuBar.SECONDARY));
+
+        assertNoMethodsRemoved();
+    }
+
+
+    public void testDomainServiceMenuOrderAnnotationPickedUpOnClass() {
+        class Customer {
+        }
+        @DomainService(menuOrder = "123")
+        class Customers {
+        }
+
+        facetFactory.process(new ProcessClassContext(Customers.class, null, methodRemover, facetHolder));
+
+        final Facet facet = facetHolder.getFacet(DomainServiceLayoutFacet.class);
+        assertNotNull(facet);
+        assertTrue(facet instanceof DomainServiceLayoutFacetAnnotation);
+        DomainServiceLayoutFacetAnnotation domainServiceLayoutFacet = (DomainServiceLayoutFacetAnnotation) facet;
+        Assert.assertThat(domainServiceLayoutFacet.getMenuOrder(), is("123"));
+
+        assertNoMethodsRemoved();
+    }
+
+    public void testDomainServiceAndDomainServiceLayoutAnnotationWhenCompatiblePickedUpOnClass() {
+        class Customer {
+        }
+        @DomainService(menuOrder = "123")
+        @DomainServiceLayout(menuBar = DomainServiceLayout.MenuBar.SECONDARY)
+        class Customers {
+        }
+
+        facetFactory.process(new ProcessClassContext(Customers.class, null, methodRemover, facetHolder));
+
+        final Facet facet = facetHolder.getFacet(DomainServiceLayoutFacet.class);
+        assertNotNull(facet);
+        assertTrue(facet instanceof DomainServiceLayoutFacetAnnotation);
+        DomainServiceLayoutFacetAnnotation domainServiceLayoutFacet = (DomainServiceLayoutFacetAnnotation) facet;
+        Assert.assertThat(domainServiceLayoutFacet.getMenuOrder(), is("123"));
+        Assert.assertThat(domainServiceLayoutFacet.getMenuBar(), is(DomainServiceLayout.MenuBar.SECONDARY));
+
+        assertNoMethodsRemoved();
+    }
+
+    public void testDomainServiceAndDomainServiceLayoutAnnotationWhenIncompatiblePickedUpOnClass() {
+        class Customer {
+        }
+        @DomainService(menuOrder = "1")
+        @DomainServiceLayout(menuOrder = "123", menuBar = DomainServiceLayout.MenuBar.SECONDARY)
+        class Customers {
+        }
+
+        facetFactory.process(new ProcessClassContext(Customers.class, null, methodRemover, facetHolder));
+
+        final Facet facet = facetHolder.getFacet(DomainServiceLayoutFacet.class);
+        assertNotNull(facet);
+        assertTrue(facet instanceof DomainServiceLayoutFacetAnnotation);
+        DomainServiceLayoutFacetAnnotation domainServiceLayoutFacet = (DomainServiceLayoutFacetAnnotation) facet;
+        Assert.assertThat(domainServiceLayoutFacet.getMenuOrder(), is("123"));
+        Assert.assertThat(domainServiceLayoutFacet.getMenuBar(), is(DomainServiceLayout.MenuBar.SECONDARY));
+
+        assertNoMethodsRemoved();
+    }
+
+
+}

http://git-wip-us.apache.org/repos/asf/isis/blob/99f808c1/core/metamodel/src/test/java/org/apache/isis/core/metamodel/facets/object/domainservicelayout/annotation/DomainServiceLayoutFactoryTest.java
----------------------------------------------------------------------
diff --git a/core/metamodel/src/test/java/org/apache/isis/core/metamodel/facets/object/domainservicelayout/annotation/DomainServiceLayoutFactoryTest.java b/core/metamodel/src/test/java/org/apache/isis/core/metamodel/facets/object/domainservicelayout/annotation/DomainServiceLayoutFactoryTest.java
deleted file mode 100644
index 6a65145..0000000
--- a/core/metamodel/src/test/java/org/apache/isis/core/metamodel/facets/object/domainservicelayout/annotation/DomainServiceLayoutFactoryTest.java
+++ /dev/null
@@ -1,129 +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.facets.object.domainservicelayout.annotation;
-
-import org.junit.Assert;
-import org.apache.isis.applib.annotation.DomainService;
-import org.apache.isis.applib.annotation.DomainServiceLayout;
-import org.apache.isis.core.metamodel.facetapi.Facet;
-import org.apache.isis.core.metamodel.facets.AbstractFacetFactoryTest;
-import org.apache.isis.core.metamodel.facets.FacetFactory.ProcessClassContext;
-import org.apache.isis.core.metamodel.facets.object.domainservicelayout.DomainServiceLayoutFacet;
-import org.apache.isis.core.metamodel.facets.object.domainservicelayout.DomainServiceLayoutFactory;
-
-import static org.hamcrest.Matchers.is;
-
-public class DomainServiceLayoutFactoryTest extends AbstractFacetFactoryTest {
-
-    private DomainServiceLayoutFactory facetFactory;
-
-    @Override
-    protected void setUp() throws Exception {
-        super.setUp();
-
-        facetFactory = new DomainServiceLayoutFactory();
-    }
-
-    @Override
-    protected void tearDown() throws Exception {
-        facetFactory = null;
-        super.tearDown();
-    }
-
-    public void testAnnotationPickedUpOnClass() {
-        class Customer {
-        }
-        @DomainServiceLayout(menuOrder = "123" ,menuBar = DomainServiceLayout.MenuBar.SECONDARY)
-        class Customers {
-        }
-
-        facetFactory.process(new ProcessClassContext(Customers.class, null, methodRemover, facetHolder));
-
-        final Facet facet = facetHolder.getFacet(DomainServiceLayoutFacet.class);
-        assertNotNull(facet);
-        assertTrue(facet instanceof DomainServiceLayoutFacetAnnotation);
-        DomainServiceLayoutFacetAnnotation domainServiceLayoutFacet = (DomainServiceLayoutFacetAnnotation) facet;
-        Assert.assertThat(domainServiceLayoutFacet.getMenuOrder(), is("123"));
-        Assert.assertThat(domainServiceLayoutFacet.getMenuBar(), is(DomainServiceLayout.MenuBar.SECONDARY));
-
-        assertNoMethodsRemoved();
-    }
-
-
-    public void testDomainServiceMenuOrderAnnotationPickedUpOnClass() {
-        class Customer {
-        }
-        @DomainService(menuOrder = "123")
-        class Customers {
-        }
-
-        facetFactory.process(new ProcessClassContext(Customers.class, null, methodRemover, facetHolder));
-
-        final Facet facet = facetHolder.getFacet(DomainServiceLayoutFacet.class);
-        assertNotNull(facet);
-        assertTrue(facet instanceof DomainServiceLayoutFacetAnnotation);
-        DomainServiceLayoutFacetAnnotation domainServiceLayoutFacet = (DomainServiceLayoutFacetAnnotation) facet;
-        Assert.assertThat(domainServiceLayoutFacet.getMenuOrder(), is("123"));
-
-        assertNoMethodsRemoved();
-    }
-
-    public void testDomainServiceAndDomainServiceLayoutAnnotationWhenCompatiblePickedUpOnClass() {
-        class Customer {
-        }
-        @DomainService(menuOrder = "123")
-        @DomainServiceLayout(menuBar = DomainServiceLayout.MenuBar.SECONDARY)
-        class Customers {
-        }
-
-        facetFactory.process(new ProcessClassContext(Customers.class, null, methodRemover, facetHolder));
-
-        final Facet facet = facetHolder.getFacet(DomainServiceLayoutFacet.class);
-        assertNotNull(facet);
-        assertTrue(facet instanceof DomainServiceLayoutFacetAnnotation);
-        DomainServiceLayoutFacetAnnotation domainServiceLayoutFacet = (DomainServiceLayoutFacetAnnotation) facet;
-        Assert.assertThat(domainServiceLayoutFacet.getMenuOrder(), is("123"));
-        Assert.assertThat(domainServiceLayoutFacet.getMenuBar(), is(DomainServiceLayout.MenuBar.SECONDARY));
-
-        assertNoMethodsRemoved();
-    }
-
-    public void testDomainServiceAndDomainServiceLayoutAnnotationWhenIncompatiblePickedUpOnClass() {
-        class Customer {
-        }
-        @DomainService(menuOrder = "1")
-        @DomainServiceLayout(menuOrder = "123", menuBar = DomainServiceLayout.MenuBar.SECONDARY)
-        class Customers {
-        }
-
-        facetFactory.process(new ProcessClassContext(Customers.class, null, methodRemover, facetHolder));
-
-        final Facet facet = facetHolder.getFacet(DomainServiceLayoutFacet.class);
-        assertNotNull(facet);
-        assertTrue(facet instanceof DomainServiceLayoutFacetAnnotation);
-        DomainServiceLayoutFacetAnnotation domainServiceLayoutFacet = (DomainServiceLayoutFacetAnnotation) facet;
-        Assert.assertThat(domainServiceLayoutFacet.getMenuOrder(), is("123"));
-        Assert.assertThat(domainServiceLayoutFacet.getMenuBar(), is(DomainServiceLayout.MenuBar.SECONDARY));
-
-        assertNoMethodsRemoved();
-    }
-
-
-}

http://git-wip-us.apache.org/repos/asf/isis/blob/99f808c1/core/metamodel/src/test/java/org/apache/isis/core/metamodel/layoutxml/v1_0/DomainObjectTest.java
----------------------------------------------------------------------
diff --git a/core/metamodel/src/test/java/org/apache/isis/core/metamodel/layoutxml/v1_0/DomainObjectTest.java b/core/metamodel/src/test/java/org/apache/isis/core/metamodel/layoutxml/v1_0/DomainObjectTest.java
new file mode 100644
index 0000000..070f094
--- /dev/null
+++ b/core/metamodel/src/test/java/org/apache/isis/core/metamodel/layoutxml/v1_0/DomainObjectTest.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.core.metamodel.layoutxml.v1_0;
+
+import java.util.Map;
+
+import javax.xml.bind.Marshaller;
+
+import com.google.common.collect.ImmutableMap;
+
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+
+import org.apache.isis.applib.layout.v1_0.Action;
+import org.apache.isis.applib.layout.v1_0.Column;
+import org.apache.isis.applib.layout.v1_0.DomainObject;
+import org.apache.isis.applib.layout.v1_0.Property;
+import org.apache.isis.applib.layout.v1_0.PropertyGroup;
+import org.apache.isis.applib.layout.v1_0.Tab;
+import org.apache.isis.applib.layout.v1_0.TabGroup;
+import org.apache.isis.applib.services.jaxb.JaxbService;
+
+public class DomainObjectTest {
+
+    private JaxbService jaxbService;
+
+    @Before
+    public void setUp() throws Exception {
+        jaxbService = new JaxbService.Simple();
+    }
+
+    @After
+    public void tearDown() throws Exception {
+
+    }
+
+    @Test
+    public void xxx() throws Exception {
+
+        final DomainObject domainObject = new DomainObject();
+
+        TabGroup tabGroup = domainObject.getTabGroups().get(0);
+        Tab tab = tabGroup.getTabs().get(0);
+        Column left = tab.getLeft();
+
+        PropertyGroup leftPropGroup = new PropertyGroup();
+        left.getPropertyGroups().add(leftPropGroup);
+
+        leftPropGroup.setName("General");
+
+        Property nameProperty = leftPropGroup.getProperties().get(0);
+
+        nameProperty.setIdentifier("name");
+
+        Action updateNameAction = new Action();
+        updateNameAction.setIdentifier("updateName");
+        nameProperty.getActions().add(updateNameAction);
+
+        Action deleteAction = new Action();
+        deleteAction.setIdentifier("delete");
+        domainObject.getActions().add(deleteAction);
+
+        String xml = jaxbService.toXml(domainObject,
+                ImmutableMap.<String,Object>of(
+                        Marshaller.JAXB_SCHEMA_LOCATION,
+                        "http://isis.apache.org/schema/applib/layout http://isis.apache.org/schema/applib/layout/layout-1.0.xsd"
+                ));
+        System.out.println(xml);
+
+        jaxbService.fromXml(DomainObject.class, xml);
+
+        System.out.println("==========");
+
+        dumpXsd(domainObject);
+    }
+
+    protected void dumpXsd(final DomainObject domainObject) {
+        Map<String, String> schemas = jaxbService.toXsd(domainObject, 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/99f808c1/core/schema/src/main/java/org/apache/isis/schema/services/jaxb/CatalogingSchemaOutputResolver.java
----------------------------------------------------------------------
diff --git a/core/schema/src/main/java/org/apache/isis/schema/services/jaxb/CatalogingSchemaOutputResolver.java b/core/schema/src/main/java/org/apache/isis/schema/services/jaxb/CatalogingSchemaOutputResolver.java
deleted file mode 100644
index aac43d7..0000000
--- a/core/schema/src/main/java/org/apache/isis/schema/services/jaxb/CatalogingSchemaOutputResolver.java
+++ /dev/null
@@ -1,85 +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.schema.services.jaxb;
-
-import java.io.IOException;
-import java.util.Collections;
-import java.util.List;
-import java.util.Map;
-
-import javax.xml.bind.SchemaOutputResolver;
-import javax.xml.transform.Result;
-import javax.xml.transform.stream.StreamResult;
-
-import com.google.common.collect.Lists;
-import com.google.common.collect.Maps;
-
-import org.apache.isis.applib.services.jaxb.JaxbService;
-
-/**
- * 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
-{
-    private final JaxbService.IsisSchemas isisSchemas;
-    private 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;
-    }
-
-    @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);
-    }
-}

http://git-wip-us.apache.org/repos/asf/isis/blob/99f808c1/core/schema/src/main/java/org/apache/isis/schema/services/jaxb/JaxbServiceDefault.java
----------------------------------------------------------------------
diff --git a/core/schema/src/main/java/org/apache/isis/schema/services/jaxb/JaxbServiceDefault.java b/core/schema/src/main/java/org/apache/isis/schema/services/jaxb/JaxbServiceDefault.java
index 2d2bf79..3679fdb 100644
--- a/core/schema/src/main/java/org/apache/isis/schema/services/jaxb/JaxbServiceDefault.java
+++ b/core/schema/src/main/java/org/apache/isis/schema/services/jaxb/JaxbServiceDefault.java
@@ -16,26 +16,11 @@
  */
 package org.apache.isis.schema.services.jaxb;
 
-import java.io.IOException;
-import java.io.StringReader;
-import java.io.StringWriter;
-import java.lang.reflect.Method;
-import java.util.List;
-import java.util.Map;
-
 import javax.inject.Inject;
-import javax.xml.bind.JAXBContext;
-import javax.xml.bind.JAXBException;
 import javax.xml.bind.Marshaller;
 import javax.xml.bind.Unmarshaller;
 
-import com.google.common.base.Function;
-import com.google.common.base.Joiner;
-import com.google.common.collect.Iterables;
-
-import org.apache.isis.applib.ApplicationException;
 import org.apache.isis.applib.DomainObjectContainer;
-import org.apache.isis.applib.NonRecoverableException;
 import org.apache.isis.applib.annotation.DomainService;
 import org.apache.isis.applib.annotation.NatureOfService;
 import org.apache.isis.applib.services.jaxb.JaxbService;
@@ -44,98 +29,20 @@ import org.apache.isis.schema.utils.jaxbadapters.PersistentEntityAdapter;
 @DomainService(
         nature = NatureOfService.DOMAIN
 )
-public class JaxbServiceDefault implements JaxbService {
-
-    @Override
-    public <T> T fromXml(final Class<T> domainClass, final String xml) {
-        try {
-            final JAXBContext context = JAXBContext.newInstance(domainClass);
-
-            final PersistentEntityAdapter adapter = new PersistentEntityAdapter();
-            container.injectServicesInto(adapter);
-
-            final Unmarshaller unmarshaller = context.createUnmarshaller();
-            unmarshaller.setAdapter(PersistentEntityAdapter.class, adapter);
-
-            final Object unmarshal = unmarshaller.unmarshal(new StringReader(xml));
-            return (T) unmarshal;
-
-        } catch (final JAXBException ex) {
-            throw new NonRecoverableException("Error unmarshalling domain object from XML; domain object class is '" + domainClass.getName() + "'", ex);
-        }
-    }
-
-    @Override
-    public String toXml(final Object domainObject)  {
-
-        final Class<?> domainClass = domainObject.getClass();
-        try {
-            final JAXBContext context = JAXBContext.newInstance(domainClass);
+public class JaxbServiceDefault extends JaxbService.Simple {
 
-            final PersistentEntityAdapter adapter = new PersistentEntityAdapter();
-            container.injectServicesInto(adapter);
-
-            final Marshaller marshaller = context.createMarshaller();
-            marshaller.setAdapter(PersistentEntityAdapter.class, adapter);
-            marshaller.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, true);
-
-            final StringWriter sw = new StringWriter();
-            marshaller.marshal(domainObject, sw);
-            final String xml = sw.toString();
-
-            return xml;
-
-        } catch (final JAXBException ex) {
-            final Class<? extends JAXBException> exClass = ex.getClass();
-
-            final String name = exClass.getName();
-            if(name.equals("com.sun.xml.bind.v2.runtime.IllegalAnnotationsException")) {
-                // report a better error if possible
-                // this is done reflectively so as to not have to bring in a new Maven dependency
-                List<? extends Exception> errors = null;
-                String annotationExceptionMessages = null;
-                try {
-                    final Method getErrorsMethod = exClass.getMethod("getErrors");
-                    errors = (List<? extends Exception>) getErrorsMethod.invoke(ex);
-                    annotationExceptionMessages = ": " + Joiner.on("; ").join(
-                            Iterables.transform(errors, new Function<Exception, String>() {
-                                @Override public String apply(final Exception e) {
-                                    return e.getMessage();
-                                }
-                            }));
-                } catch (Exception e) {
-                    // fall through if we hit any snags, and instead throw the more generic error message.
-                }
-                if(errors != null) {
-                    throw new NonRecoverableException(
-                            "Error marshalling domain object to XML, due to illegal annotations on domain object class '"
-                                    + domainClass.getName() + "'; " + errors.size() + " error"
-                                    + (errors.size() == 1? "": "s")
-                                    + " reported" + (!errors
-                                    .isEmpty() ? annotationExceptionMessages : ""), ex);
-                }
-            }
-
-            throw new NonRecoverableException("Error marshalling domain object to XML; domain object class is '" + domainClass.getName() + "'", ex);
-        }
+    protected void configure(final Unmarshaller unmarshaller) {
+        final PersistentEntityAdapter adapter = new PersistentEntityAdapter();
+        container.injectServicesInto(adapter);
+        unmarshaller.setAdapter(PersistentEntityAdapter.class, adapter);
     }
 
-    public Map<String,String> toXsd(final Object domainObject, final IsisSchemas isisSchemas) {
-
-        try {
-            final Class<?> domainClass = domainObject.getClass();
-            final JAXBContext context = JAXBContext.newInstance(domainClass);
-
-            final CatalogingSchemaOutputResolver outputResolver = new CatalogingSchemaOutputResolver(isisSchemas);
-            context.generateSchema(outputResolver);
-
-            return outputResolver.asMap();
-        } catch (final JAXBException | IOException ex) {
-            throw new ApplicationException(ex);
-        }
+    protected void configure(final Marshaller marshaller) {
+        final PersistentEntityAdapter adapter = new PersistentEntityAdapter();
+        container.injectServicesInto(adapter);
+        marshaller.setAdapter(PersistentEntityAdapter.class, adapter);
     }
 
-
     @Inject
     DomainObjectContainer container;
 }

http://git-wip-us.apache.org/repos/asf/isis/blob/99f808c1/core/schema/src/main/java/org/apache/isis/schema/services/jaxb/StreamResultWithWriter.java
----------------------------------------------------------------------
diff --git a/core/schema/src/main/java/org/apache/isis/schema/services/jaxb/StreamResultWithWriter.java b/core/schema/src/main/java/org/apache/isis/schema/services/jaxb/StreamResultWithWriter.java
deleted file mode 100644
index c07b49b..0000000
--- a/core/schema/src/main/java/org/apache/isis/schema/services/jaxb/StreamResultWithWriter.java
+++ /dev/null
@@ -1,45 +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.schema.services.jaxb;
-
-import java.io.StringWriter;
-
-import javax.xml.transform.stream.StreamResult;
-
-/**
- * A {@link StreamResult} that contains its own writer.
- *
- * <p>
- *     The point is that the writer is only ever queried lazily AFTER the result has been generated.
- * </p>
- */
-class StreamResultWithWriter extends StreamResult {
-    private final StringWriter writer;
-
-    public StreamResultWithWriter() {
-        this(new StringWriter());
-    }
-
-    private StreamResultWithWriter(StringWriter writer) {
-        super(writer);
-        this.writer = writer;
-    }
-
-    public String asString() {
-        return writer.toString();
-    }
-}

http://git-wip-us.apache.org/repos/asf/isis/blob/99f808c1/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 479b474..f82698f 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
@@ -20,16 +20,18 @@
 package org.apache.isis.viewer.wicket.viewer.registries.components;
 
 import java.util.ServiceLoader;
+
 import com.google.inject.Singleton;
+
 import org.apache.isis.viewer.wicket.ui.ComponentFactory;
 import org.apache.isis.viewer.wicket.ui.app.registry.ComponentFactoryRegistrar;
 import org.apache.isis.viewer.wicket.ui.components.about.AboutPanelFactory;
 import org.apache.isis.viewer.wicket.ui.components.actionlink.ActionLinkPanelFactory;
+import org.apache.isis.viewer.wicket.ui.components.actionmenu.serviceactions.ServiceActionsPanelFactory;
 import org.apache.isis.viewer.wicket.ui.components.actionmenu.serviceactions.TertiaryMenuPanelFactory;
 import org.apache.isis.viewer.wicket.ui.components.actions.ActionInfoPanelFactory;
 import org.apache.isis.viewer.wicket.ui.components.actions.ActionPanelFactory;
 import org.apache.isis.viewer.wicket.ui.components.actions.ActionParametersFormPanelFactory;
-import org.apache.isis.viewer.wicket.ui.components.actionmenu.serviceactions.ServiceActionsPanelFactory;
 import org.apache.isis.viewer.wicket.ui.components.bookmarkedpages.BookmarkedPagesPanelFactory;
 import org.apache.isis.viewer.wicket.ui.components.collection.CollectionPanelFactory;
 import org.apache.isis.viewer.wicket.ui.components.collectioncontents.ajaxtable.CollectionContentsAsAjaxTablePanelFactory;
@@ -44,9 +46,19 @@ import org.apache.isis.viewer.wicket.ui.components.entity.icontitle.EntityIconAn
 import org.apache.isis.viewer.wicket.ui.components.entity.icontitle.EntityIconTitleAndCopyLinkPanelFactory;
 import org.apache.isis.viewer.wicket.ui.components.entity.properties.EntityPropertiesPanelFactory;
 import org.apache.isis.viewer.wicket.ui.components.entity.selector.links.EntityLinksSelectorPanelFactory;
+import org.apache.isis.viewer.wicket.ui.components.entity.tabbed.EntityTabbedPanelFactory;
 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.scalars.isisapplib.*;
+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;
+import org.apache.isis.viewer.wicket.ui.components.scalars.isisapplib.IsisDatePanelFactory;
+import org.apache.isis.viewer.wicket.ui.components.scalars.isisapplib.IsisDateTimePanelFactory;
+import org.apache.isis.viewer.wicket.ui.components.scalars.isisapplib.IsisMoneyPanelFactory;
+import org.apache.isis.viewer.wicket.ui.components.scalars.isisapplib.IsisPasswordPanelFactory;
+import org.apache.isis.viewer.wicket.ui.components.scalars.isisapplib.IsisPercentagePanelFactory;
+import org.apache.isis.viewer.wicket.ui.components.scalars.isisapplib.IsisTimePanelFactory;
+import org.apache.isis.viewer.wicket.ui.components.scalars.isisapplib.IsisTimeStampPanelFactory;
 import org.apache.isis.viewer.wicket.ui.components.scalars.jdkdates.JavaSqlDatePanelFactory;
 import org.apache.isis.viewer.wicket.ui.components.scalars.jdkdates.JavaSqlTimePanelFactory;
 import org.apache.isis.viewer.wicket.ui.components.scalars.jdkdates.JavaSqlTimestampPanelFactory;
@@ -56,7 +68,14 @@ import org.apache.isis.viewer.wicket.ui.components.scalars.jdkmath.JavaMathBigIn
 import org.apache.isis.viewer.wicket.ui.components.scalars.jodatime.JodaDateTimePanelFactory;
 import org.apache.isis.viewer.wicket.ui.components.scalars.jodatime.JodaLocalDatePanelFactory;
 import org.apache.isis.viewer.wicket.ui.components.scalars.jodatime.JodaLocalDateTimePanelFactory;
-import org.apache.isis.viewer.wicket.ui.components.scalars.primitive.*;
+import org.apache.isis.viewer.wicket.ui.components.scalars.primitive.BooleanPanelFactory;
+import org.apache.isis.viewer.wicket.ui.components.scalars.primitive.BytePanelFactory;
+import org.apache.isis.viewer.wicket.ui.components.scalars.primitive.CharacterPanelFactory;
+import org.apache.isis.viewer.wicket.ui.components.scalars.primitive.DoublePanelFactory;
+import org.apache.isis.viewer.wicket.ui.components.scalars.primitive.FloatPanelFactory;
+import org.apache.isis.viewer.wicket.ui.components.scalars.primitive.IntegerPanelFactory;
+import org.apache.isis.viewer.wicket.ui.components.scalars.primitive.LongPanelFactory;
+import org.apache.isis.viewer.wicket.ui.components.scalars.primitive.ShortPanelFactory;
 import org.apache.isis.viewer.wicket.ui.components.scalars.reference.ReferencePanelFactory;
 import org.apache.isis.viewer.wicket.ui.components.scalars.string.StringPanelFactory;
 import org.apache.isis.viewer.wicket.ui.components.scalars.value.ValuePanelFactory;
@@ -149,7 +168,8 @@ public class ComponentFactoryRegistrarDefault implements ComponentFactoryRegistr
 
         // top-level
         componentFactories.add(new EntityCombinedPanelFactory());
-        
+        componentFactories.add(new EntityTabbedPanelFactory()); // last one wins, apparently.
+
         // lower-level
         componentFactories.add(new EntityIconAndTitlePanelFactory());
         componentFactories.add(new EntityIconTitleAndCopyLinkPanelFactory());

http://git-wip-us.apache.org/repos/asf/isis/blob/99f808c1/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/EntityComponentFactoryAbstract.java
----------------------------------------------------------------------
diff --git a/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/EntityComponentFactoryAbstract.java b/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/EntityComponentFactoryAbstract.java
index 6f7fa36..53ed51d 100644
--- a/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/EntityComponentFactoryAbstract.java
+++ b/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/EntityComponentFactoryAbstract.java
@@ -65,7 +65,19 @@ public abstract class EntityComponentFactoryAbstract extends ComponentFactoryAbs
         final ObjectSpecification specification = entityModel.getTypeOfSpecification();
         final boolean isObject = specification.isNotCollection();
         final boolean isValue = specification.containsFacet(ValueFacet.class);
-        return appliesIf(isObject && !isValue);
+        boolean b = isObject && !isValue;
+        if (!b) {
+            return ApplicationAdvice.DOES_NOT_APPLY;
+        }
+
+        return doAppliesTo(entityModel);
+    }
+
+    /**
+     * optional hook.
+     */
+    protected ApplicationAdvice doAppliesTo(final EntityModel entityModel) {
+        return ApplicationAdvice.APPLIES;
     }
 
 }

http://git-wip-us.apache.org/repos/asf/isis/blob/99f808c1/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/tabbed/EntityTabbedPanel.html
----------------------------------------------------------------------
diff --git a/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/tabbed/EntityTabbedPanel.html b/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/tabbed/EntityTabbedPanel.html
new file mode 100644
index 0000000..add01ab
--- /dev/null
+++ b/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/tabbed/EntityTabbedPanel.html
@@ -0,0 +1,27 @@
+<?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:panel>
+</body>
+</html>

http://git-wip-us.apache.org/repos/asf/isis/blob/99f808c1/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/tabbed/EntityTabbedPanel.java
----------------------------------------------------------------------
diff --git a/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/tabbed/EntityTabbedPanel.java b/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/tabbed/EntityTabbedPanel.java
new file mode 100644
index 0000000..0f23e3b
--- /dev/null
+++ b/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/tabbed/EntityTabbedPanel.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.viewer.wicket.ui.components.entity.tabbed;
+
+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.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 EntityTabbedPanel extends PanelAbstract<EntityModel> {
+
+    private static final long serialVersionUID = 1L;
+
+    private static final String ID_ENTITY_PROPERTIES_AND_COLLECTIONS = "entityPropertiesAndCollections";
+
+    
+    public EntityTabbedPanel(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/99f808c1/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/tabbed/EntityTabbedPanelFactory.java
----------------------------------------------------------------------
diff --git a/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/tabbed/EntityTabbedPanelFactory.java b/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/tabbed/EntityTabbedPanelFactory.java
new file mode 100644
index 0000000..db69e65
--- /dev/null
+++ b/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/tabbed/EntityTabbedPanelFactory.java
@@ -0,0 +1,56 @@
+/*
+ *  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.entity.tabbed;
+
+import org.apache.wicket.Component;
+import org.apache.wicket.model.IModel;
+
+import org.apache.isis.core.metamodel.facets.object.layoutxml.LayoutXmlFacet;
+import org.apache.isis.core.metamodel.spec.ObjectSpecification;
+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 EntityTabbedPanel}.
+ */
+public class EntityTabbedPanelFactory extends EntityComponentFactoryAbstract {
+
+    private static final long serialVersionUID = 1L;
+
+    private static final String NAME = "combined";
+
+    public EntityTabbedPanelFactory() {
+        super(ComponentType.ENTITY, NAME, EntityTabbedPanel.class);
+    }
+
+    @Override
+    protected ApplicationAdvice doAppliesTo(final EntityModel entityModel) {
+        final ObjectSpecification specification = entityModel.getTypeOfSpecification();
+        return appliesExclusivelyIf(specification.containsDoOpFacet(LayoutXmlFacet.class));
+    }
+
+    @Override
+    public Component createComponent(final String id, final IModel<?> model) {
+        final EntityModel entityModel = (EntityModel) model;
+        return new EntityTabbedPanel(id, entityModel);
+    }
+}

http://git-wip-us.apache.org/repos/asf/isis/blob/99f808c1/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
new file mode 100644
index 0000000..6cf4984
--- /dev/null
+++ b/example/application/simpleapp/dom/src/main/java/domainapp/dom/simple/SimpleObject.layout.xml
@@ -0,0 +1,44 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<domainObject xsi:schemaLocation="http://isis.apache.org/schema/applib/layout http://isis.apache.org/schema/applib/layout/layout-1.0.xsd" xmlns="http://isis.apache.org/schema/applib/layout" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+    <actions>
+        <action identifier="delete">
+            <layout>
+                <bookmarking>NEVER</bookmarking>
+                <position>BELOW</position>
+            </layout>
+        </action>
+    </actions>
+    <tabGroups>
+        <tabGroup>
+            <tabs>
+                <tab>
+                    <left>
+                        <span>4</span>
+                        <propertyGroups>
+                            <propertyGroup name="General">
+                                <actions/>
+                                <properties>
+                                    <property identifier="name">
+                                        <layout>
+                                            <labelPosition>LEFT</labelPosition>
+                                            <typicalLength>-1</typicalLength>
+                                        </layout>
+                                        <actions>
+                                            <action identifier="updateName">
+                                                <layout>
+                                                    <bookmarking>NEVER</bookmarking>
+                                                    <position>BELOW</position>
+                                                </layout>
+                                            </action>
+                                        </actions>
+                                    </property>
+                                </properties>
+                            </propertyGroup>
+                        </propertyGroups>
+                        <collections/>
+                    </left>
+                </tab>
+            </tabs>
+        </tabGroup>
+    </tabGroups>
+</domainObject>


[33/50] [abbrv] isis git commit: ISIS-993: metadata has back owners. Wicket component broken at this point

Posted by da...@apache.org.
ISIS-993: metadata has back owners.  Wicket component broken at this point


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

Branch: refs/heads/ISIS-993
Commit: f5c3b10444114fc02124f9e6cfb5eaf103a422e9
Parents: 0f3d01f
Author: Dan Haywood <da...@haywood-associates.co.uk>
Authored: Fri Jan 8 08:50:03 2016 +0000
Committer: Dan Haywood <da...@haywood-associates.co.uk>
Committed: Mon Jan 25 14:38:24 2016 +0000

----------------------------------------------------------------------
 .../src/main/asciidoc/guides/cg.adoc            |  31 ++++
 .../src/main/asciidoc/guides/rg.adoc            |  14 +-
 .../src/main/asciidoc/guides/ug.adoc            |   4 +-
 .../apache/isis/applib/layout/v1_0/Action.java  |  29 +++-
 .../isis/applib/layout/v1_0/ActionLayout.java   |  26 +++-
 .../isis/applib/layout/v1_0/Collection.java     |  23 ++-
 .../applib/layout/v1_0/CollectionLayout.java    |  27 +++-
 .../apache/isis/applib/layout/v1_0/Column.java  |  40 ++++-
 .../isis/applib/layout/v1_0/DomainObject.java   | 111 +++++++-------
 .../isis/applib/layout/v1_0/Property.java       |  25 +++-
 .../isis/applib/layout/v1_0/PropertyGroup.java  |  26 +++-
 .../isis/applib/layout/v1_0/PropertyLayout.java |  28 +++-
 .../org/apache/isis/applib/layout/v1_0/Tab.java |  29 +++-
 .../isis/applib/layout/v1_0/TabGroup.java       |  33 ++++-
 .../apache/isis/applib/layout/v1_0/Util.java    |  49 ++++++
 .../object/layoutxml/LayoutXmlFacetDefault.java | 148 ++++++++++++-------
 .../metamodel/spec/ObjectSpecifications.java    |  17 ++-
 .../spec/feature/ObjectAssociation.java         |   3 +-
 .../ComponentFactoryRegistrarDefault.java       |   4 +-
 .../viewer/wicket/model/models/EntityModel.java |  17 ++-
 .../collections/EntityCollectionsPanel.html     |   2 +-
 .../entity/properties/EntityPropertiesForm.java |  48 ++++--
 .../properties/EntityPropertiesPanel.html       |   6 +-
 .../EntityTabbedPanel$EntityTabPanel.html       |  29 ----
 .../entity/tabbed/EntityTabbedPanel.html        |  31 ----
 .../entity/tabbed/EntityTabbedPanel.java        | 114 --------------
 .../entity/tabbed/EntityTabbedPanelFactory.java |  56 -------
 .../EntityTabGroupsPanel$EntityTabPanel.html    |  29 ++++
 .../entity/tabgroups/EntityTabGroupsPanel.html  |  33 +++++
 .../entity/tabgroups/EntityTabGroupsPanel.java  | 119 +++++++++++++++
 .../tabgroups/EntityTabGroupsPanelFactory.java  |  56 +++++++
 .../dom/simple/SimpleObject.layout.xml          |  10 ++
 32 files changed, 833 insertions(+), 384 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/isis/blob/f5c3b104/adocs/documentation/src/main/asciidoc/guides/cg.adoc
----------------------------------------------------------------------
diff --git a/adocs/documentation/src/main/asciidoc/guides/cg.adoc b/adocs/documentation/src/main/asciidoc/guides/cg.adoc
new file mode 100644
index 0000000..9437dc7
--- /dev/null
+++ b/adocs/documentation/src/main/asciidoc/guides/cg.adoc
@@ -0,0 +1,31 @@
+[[cg]]
+= "Supporting Procedures" Guides
+: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/
+:numbered:
+
+
+Apache Isis documentation is broken out into a number of user, reference and "supporting procedures" guides.
+
+The user guides available are:
+
+* xref:ugfun.adoc#[Fundamentals]
+* xref:ugvw.adoc#[Wicket viewer]
+* xref:ugvro.adoc#[Restful Objects viewer]
+* xref:ugsec.adoc#[Security]
+* xref:ugtst.adoc#[Testing]
+* xref:ugbtb.adoc#[Beyond the Basics]
+
+The reference guides are:
+
+* xref:rgant.adoc#[Annotations]
+* xref:rgsvc.adoc#[Domain Services]
+* xref:rgcfg.adoc#[Configuration Properties]
+* xref:rgcms.adoc#[Classes, Methods and Schema]
+
+The *supporting procedures* guides are:
+
+* xref:cgcon.adoc#[Contributors' Guide] (how to set up a development environment
+for Apache Isis and contribute back to the project)
+* xref:cgcon.adoc#[Committers' Guide] (release procedures and related practices)

http://git-wip-us.apache.org/repos/asf/isis/blob/f5c3b104/adocs/documentation/src/main/asciidoc/guides/rg.adoc
----------------------------------------------------------------------
diff --git a/adocs/documentation/src/main/asciidoc/guides/rg.adoc b/adocs/documentation/src/main/asciidoc/guides/rg.adoc
index fceaed5..f5f702f 100644
--- a/adocs/documentation/src/main/asciidoc/guides/rg.adoc
+++ b/adocs/documentation/src/main/asciidoc/guides/rg.adoc
@@ -6,16 +6,16 @@
 :numbered:
 
 
-Apache Isis documentation is broken out into a number of user and reference guides.
+Apache Isis documentation is broken out into a number of user, reference and "supporting procedures" guides.
 
-The user guides available are:
+The *user guides* available are:
 
 * xref:ugfun.adoc#[Fundamentals]
 * xref:ugvw.adoc#[Wicket viewer]
 * xref:ugvro.adoc#[Restful Objects viewer]
 * xref:ugsec.adoc#[Security]
 * xref:ugtst.adoc#[Testing]
-* xref:ugbtb.adoc#[Beyond the Basics] (this guide)
+* xref:ugbtb.adoc#[Beyond the Basics]
 
 The reference guides are:
 
@@ -24,6 +24,8 @@ The reference guides are:
 * xref:rgcfg.adoc#[Configuration Properties]
 * xref:rgcms.adoc#[Classes, Methods and Schema]
 
-In addition, there is a xref:cgcon.adoc#[Contributors' Guide] (that describes how to set up a development environment
-for Apache Isis and contribute back to the project), and a xref:cgcon.adoc#[Committers' Guide] (that describes release
-procedures and related practices).
+The "supporting procedures" guides are:
+
+* xref:cgcon.adoc#[Contributors' Guide] (how to set up a development environment
+for Apache Isis and contribute back to the project)
+* xref:cgcon.adoc#[Committers' Guide] (release procedures and related practices)

http://git-wip-us.apache.org/repos/asf/isis/blob/f5c3b104/adocs/documentation/src/main/asciidoc/guides/ug.adoc
----------------------------------------------------------------------
diff --git a/adocs/documentation/src/main/asciidoc/guides/ug.adoc b/adocs/documentation/src/main/asciidoc/guides/ug.adoc
index c988cfa..4b91f60 100644
--- a/adocs/documentation/src/main/asciidoc/guides/ug.adoc
+++ b/adocs/documentation/src/main/asciidoc/guides/ug.adoc
@@ -8,14 +8,14 @@
 
 Apache Isis documentation is broken out into a number of user, reference and "supporting procedures" guides.
 
-The user guides available are:
+The *user guides* available are:
 
 * xref:ugfun.adoc#[Fundamentals]
 * xref:ugvw.adoc#[Wicket viewer]
 * xref:ugvro.adoc#[Restful Objects viewer]
 * xref:ugsec.adoc#[Security]
 * xref:ugtst.adoc#[Testing]
-* xref:ugbtb.adoc#[Beyond the Basics] (this guide)
+* xref:ugbtb.adoc#[Beyond the Basics]
 
 The reference guides are:
 

http://git-wip-us.apache.org/repos/asf/isis/blob/f5c3b104/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/Action.java
----------------------------------------------------------------------
diff --git a/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/Action.java b/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/Action.java
index 05aa54f..61c6443 100644
--- a/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/Action.java
+++ b/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/Action.java
@@ -18,8 +18,11 @@
  */
 package org.apache.isis.applib.layout.v1_0;
 
+import java.io.Serializable;
+
 import javax.xml.bind.annotation.XmlAttribute;
 import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlTransient;
 import javax.xml.bind.annotation.XmlType;
 
 @XmlType(
@@ -29,7 +32,9 @@ import javax.xml.bind.annotation.XmlType;
                 , "layout"
         }
 )
-public class Action {
+public class Action implements Serializable {
+
+    private static final long serialVersionUID = 1L;
 
     public Action() {
     }
@@ -57,7 +62,8 @@ public class Action {
 
 
     private ActionLayout layout;
-    @XmlElement(name="layout", required = false)
+
+    @XmlElement(name="layout", required = true)
     public ActionLayout getLayout() {
         return layout;
     }
@@ -65,4 +71,23 @@ public class Action {
     public void setLayout(ActionLayout layout) {
         this.layout = layout;
     }
+
+
+    private ActionHolder owner;
+    /**
+     * Owner.
+     *
+     * <p>
+     *     Set programmatically by framework after reading in from XML.
+     * </p>
+     */
+    @XmlTransient
+    public ActionHolder getOwner() {
+        return owner;
+    }
+
+    public void setOwner(final ActionHolder owner) {
+        this.owner = owner;
+    }
+
 }

http://git-wip-us.apache.org/repos/asf/isis/blob/f5c3b104/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/ActionLayout.java
----------------------------------------------------------------------
diff --git a/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/ActionLayout.java b/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/ActionLayout.java
index 0e12158..9068d91 100644
--- a/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/ActionLayout.java
+++ b/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/ActionLayout.java
@@ -16,8 +16,11 @@
  */
 package org.apache.isis.applib.layout.v1_0;
 
+import java.io.Serializable;
+
 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 org.apache.isis.applib.annotation.BookmarkPolicy;
@@ -37,7 +40,9 @@ import org.apache.isis.applib.annotation.Where;
                 , "describedAs"
         }
 )
-public class ActionLayout {
+public class ActionLayout implements Serializable {
+
+    private static final long serialVersionUID = 1L;
 
     private BookmarkPolicy bookmarking;
 
@@ -151,4 +156,23 @@ public class ActionLayout {
         this.position = position;
     }
 
+
+
+    private Action owner;
+    /**
+     * Owner.
+     *
+     * <p>
+     *     Set programmatically by framework after reading in from XML.
+     * </p>
+     */
+    @XmlTransient
+    public Action getOwner() {
+        return owner;
+    }
+
+    public void setOwner(final Action owner) {
+        this.owner = owner;
+    }
+
 }

http://git-wip-us.apache.org/repos/asf/isis/blob/f5c3b104/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/Collection.java
----------------------------------------------------------------------
diff --git a/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/Collection.java b/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/Collection.java
index cf2dc48..db7d92b 100644
--- a/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/Collection.java
+++ b/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/Collection.java
@@ -18,11 +18,13 @@
  */
 package org.apache.isis.applib.layout.v1_0;
 
+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.XmlElementWrapper;
+import javax.xml.bind.annotation.XmlTransient;
 import javax.xml.bind.annotation.XmlType;
 
 import com.google.common.collect.Lists;
@@ -34,8 +36,9 @@ import com.google.common.collect.Lists;
                 , "layout"
         }
 )
-public class Collection implements ColumnContent, ActionHolder {
+public class Collection implements ColumnContent, ActionHolder, Serializable {
 
+    private static final long serialVersionUID = 1L;
 
     public Collection() {
     }
@@ -87,5 +90,23 @@ public class Collection implements ColumnContent, ActionHolder {
     }
 
 
+    private Column owner;
+    /**
+     * Owner.
+     *
+     * <p>
+     *     Set programmatically by framework after reading in from XML.
+     * </p>
+     */
+    @XmlTransient
+    public Column getOwner() {
+        return owner;
+    }
+
+    public void setOwner(final Column owner) {
+        this.owner = owner;
+    }
+
+
 
 }

http://git-wip-us.apache.org/repos/asf/isis/blob/f5c3b104/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/CollectionLayout.java
----------------------------------------------------------------------
diff --git a/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/CollectionLayout.java b/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/CollectionLayout.java
index 4769b61..08f89fc 100644
--- a/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/CollectionLayout.java
+++ b/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/CollectionLayout.java
@@ -17,8 +17,11 @@
 package org.apache.isis.applib.layout.v1_0;
 
 
+import java.io.Serializable;
+
 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 org.apache.isis.applib.annotation.Where;
@@ -38,7 +41,9 @@ import org.apache.isis.applib.annotation.Where;
                 ,"sortedBy"
         }
 )
-public class CollectionLayout {
+public class CollectionLayout implements Serializable {
+
+    private static final long serialVersionUID = 1L;
 
     private String cssClass;
 
@@ -141,4 +146,24 @@ public class CollectionLayout {
     public void setSortedBy(String sortedBy) {
         this.sortedBy = sortedBy;
     }
+
+
+
+    private Collection owner;
+    /**
+     * Owner.
+     *
+     * <p>
+     *     Set programmatically by framework after reading in from XML.
+     * </p>
+     */
+    @XmlTransient
+    public Collection getOwner() {
+        return owner;
+    }
+
+    public void setOwner(final Collection owner) {
+        this.owner = owner;
+    }
+
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/isis/blob/f5c3b104/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/Column.java
----------------------------------------------------------------------
diff --git a/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/Column.java b/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/Column.java
index 3ac724e..7e7129c 100644
--- a/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/Column.java
+++ b/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/Column.java
@@ -18,13 +18,16 @@
  */
 package org.apache.isis.applib.layout.v1_0;
 
+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.XmlElements;
+import javax.xml.bind.annotation.XmlTransient;
 import javax.xml.bind.annotation.XmlType;
 
+import com.google.common.collect.Iterables;
 import com.google.common.collect.Lists;
 
 @XmlType(
@@ -33,8 +36,9 @@ import com.google.common.collect.Lists;
                 , "content"
         }
 )
-public class Column {
+public class Column implements Serializable {
 
+    private static final long serialVersionUID = 1L;
 
     public Column() {
     }
@@ -71,4 +75,38 @@ public class Column {
         this.content = content;
     }
 
+    @XmlTransient
+    public Iterable<PropertyGroup> getPropertyGroups() {
+        return Iterables.transform(
+                        Iterables.filter(getContent(), Util.is(PropertyGroup.class)),
+                        Util.cast(PropertyGroup.class));
+    }
+    @XmlTransient
+    public Iterable<Collection> getCollections() {
+        return Iterables.transform(
+                        Iterables.filter(getContent(), Util.is(Collection.class)),
+                        Util.cast(Collection.class));
+    }
+
+
+
+
+    private Tab owner;
+    /**
+     * Owner.
+     *
+     * <p>
+     *     Set programmatically by framework after reading in from XML.
+     * </p>
+     */
+    @XmlTransient
+    public Tab getOwner() {
+        return owner;
+    }
+
+    public void setOwner(final Tab owner) {
+        this.owner = owner;
+    }
+
+
 }

http://git-wip-us.apache.org/repos/asf/isis/blob/f5c3b104/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/DomainObject.java
----------------------------------------------------------------------
diff --git a/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/DomainObject.java b/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/DomainObject.java
index c5fa00d..4d89b47 100644
--- a/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/DomainObject.java
+++ b/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/DomainObject.java
@@ -18,6 +18,7 @@
  */
 package org.apache.isis.applib.layout.v1_0;
 
+import java.io.Serializable;
 import java.util.ArrayList;
 import java.util.List;
 
@@ -27,9 +28,6 @@ import javax.xml.bind.annotation.XmlElementWrapper;
 import javax.xml.bind.annotation.XmlRootElement;
 import javax.xml.bind.annotation.XmlType;
 
-import com.google.common.base.Function;
-import com.google.common.base.Predicate;
-import com.google.common.collect.Iterables;
 import com.google.common.collect.Lists;
 
 import org.apache.isis.applib.services.dto.Dto;
@@ -41,7 +39,9 @@ import org.apache.isis.applib.services.dto.Dto;
                 , "tabGroups"
         }
 )
-public class DomainObject implements Dto, ActionHolder {
+public class DomainObject implements Dto, ActionHolder, Serializable {
+
+    private static final long serialVersionUID = 1L;
 
     private List<Action> actions = Lists.newArrayList();
 
@@ -81,17 +81,17 @@ public class DomainObject implements Dto, ActionHolder {
 
 
     public interface Visitor {
-        void visit(DomainObject domainObject);
-        void visit(TabGroup tabGroup);
-        void visit(Tab tab);
-        void visit(Column column);
-        void visit(PropertyGroup propertyGroup);
-        void visit(Property property);
-        void visit(@Nullable PropertyLayout propertyLayout, Property forProperty);
-        void visit(Collection collection);
-        void visit(@Nullable CollectionLayout collectionLayout, Collection forCollection);
-        void visit(Action action, ActionHolder holder);
-        void visit(@Nullable ActionLayout actionLayout, Action forAction);
+        void visit(final DomainObject domainObject);
+        void visit(final TabGroup tabGroup);
+        void visit(final Tab tab);
+        void visit(final Column column);
+        void visit(final PropertyGroup propertyGroup);
+        void visit(final Property property);
+        void visit(final PropertyLayout propertyLayout);
+        void visit(final Collection collection);
+        void visit(final CollectionLayout collectionLayout);
+        void visit(final Action action);
+        void visit(@Nullable final ActionLayout actionLayout);
     }
 
     public static class VisitorAdapter implements Visitor {
@@ -104,73 +104,80 @@ public class DomainObject implements Dto, ActionHolder {
         @Override
         public void visit(final Column column) { }
         @Override
-        public void visit(PropertyGroup propertyGroup) {}
+        public void visit(final PropertyGroup propertyGroup) {}
         @Override
-        public void visit(Property property) {}
+        public void visit(final Property property) {}
         @Override
-        public void visit(@Nullable final PropertyLayout propertyLayout, final Property forProperty) { }
+        public void visit(final PropertyLayout propertyLayout) { }
         @Override
-        public void visit(Collection collection) {}
+        public void visit(final Collection collection) {}
         @Override
-        public void visit(@Nullable final CollectionLayout collectionLayout, final Collection forCollection) { }
+        public void visit(final CollectionLayout collectionLayout) { }
         @Override
-        public void visit(final Action action, final ActionHolder actionHolder) { }
+        public void visit(final Action action) { }
         @Override
-        public void visit(@Nullable final ActionLayout actionLayout, final Action forAction) { }
+        public void visit(final ActionLayout actionLayout) { }
     }
 
+    /**
+     * Initializes all "owner" references across the graph, eg {@link TabGroup#setOwner(DomainObject)} and {@link Tab#setOwner(TabGroup)} .
+     */
+    public void init() {
+        visit(new VisitorAdapter());
+    }
 
     public void visit(final Visitor visitor) {
         visitor.visit(this);
         traverseActions(this, visitor);
         final List<TabGroup> tabGroups = getTabGroups();
         for (final TabGroup tabGroup : tabGroups) {
+            tabGroup.setOwner(this);
             visitor.visit(tabGroup);
             final List<Tab> tabs = tabGroup.getTabs();
             for (final Tab tab : tabs) {
+                tab.setOwner(tabGroup);
                 visitor.visit(tab);
-                traverseColumn(tab.getLeft(), visitor);
-                traverseColumn(tab.getMiddle(), visitor);
-                traverseColumn(tab.getRight(), visitor);
+                traverseColumn(tab.getLeft(), tab, visitor);
+                traverseColumn(tab.getMiddle(), tab, visitor);
+                traverseColumn(tab.getRight(), tab, visitor);
             }
         }
     }
 
-    private void traverseColumn(final Column column, final Visitor visitor) {
+    private void traverseColumn(final Column column, final Tab tab, final Visitor visitor) {
         if(column == null) {
             return;
         }
+        column.setOwner(tab);
         visitor.visit(column);
         traversePropertyGroups(column, visitor);
         traverseCollections(column, visitor);
     }
 
     private void traversePropertyGroups(final Column column, final Visitor visitor) {
-        List<ColumnContent> content = column.getContent();
-        final Iterable<PropertyGroup> propertyGroups =
-                Iterables.transform(
-                        Iterables.filter(content, is(PropertyGroup.class)),
-                        cast(PropertyGroup.class));
-        for (final PropertyGroup propertyGroup : propertyGroups) {
+        for (final PropertyGroup propertyGroup : column.getPropertyGroups()) {
+            propertyGroup.setOwner(column);
             visitor.visit(propertyGroup);
             traverseActions(propertyGroup, visitor);
             final List<Property> properties = propertyGroup.getProperties();
             for (final Property property : properties) {
+                property.setOwner(propertyGroup);
                 visitor.visit(property);
-                visitor.visit(property.getLayout(), property);
+                final PropertyLayout layout = property.getLayout();
+                layout.setOwner(property);
+                visitor.visit(layout);
                 traverseActions(property, visitor);
             }
         }
     }
 
     private void traverseCollections(final Column column, final Visitor visitor) {
-        final Iterable<Collection> collections =
-                Iterables.transform(
-                        Iterables.filter(column.getContent(), is(Collection.class)),
-                        cast(Collection.class));
-        for (final Collection collection : collections) {
+        for (final Collection collection : column.getCollections()) {
+            collection.setOwner(column);
             visitor.visit(collection);
-            visitor.visit(collection.getLayout(), collection);
+            final CollectionLayout layout = collection.getLayout();
+            layout.setOwner(collection);
+            visitor.visit(layout);
             traverseActions(collection, visitor);
         }
     }
@@ -178,27 +185,11 @@ public class DomainObject implements Dto, ActionHolder {
     private void traverseActions(final ActionHolder actionHolder, final Visitor visitor) {
         final List<Action> actions = actionHolder.getActions();
         for (final Action action : actions) {
-            visitor.visit(action, actionHolder);
-            visitor.visit(action.getLayout(), action);
-        }
-    }
-
-    private <F, T extends F> CastFunction<F, T> cast(final Class<T> cls) {
-        return new CastFunction<>();
-    }
-
-    private <F,T> Predicate<F> is(final Class<T> cls) {
-        return new Predicate<F>() {
-            @Override public boolean apply(@Nullable final F from) {
-                return cls.isAssignableFrom(from.getClass());
-            }
-        };
-    }
-
-    private static class CastFunction<F, T extends F> implements Function<F, T> {
-        @Override
-        public final T apply(final F from) {
-            return (T) from;
+            action.setOwner(actionHolder);
+            visitor.visit(action);
+            final ActionLayout layout = action.getLayout();
+            layout.setOwner(action);
+            visitor.visit(layout);
         }
     }
 

http://git-wip-us.apache.org/repos/asf/isis/blob/f5c3b104/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/Property.java
----------------------------------------------------------------------
diff --git a/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/Property.java b/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/Property.java
index 5345d06..6f98d07 100644
--- a/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/Property.java
+++ b/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/Property.java
@@ -18,11 +18,13 @@
  */
 package org.apache.isis.applib.layout.v1_0;
 
+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.XmlElementWrapper;
+import javax.xml.bind.annotation.XmlTransient;
 import javax.xml.bind.annotation.XmlType;
 
 import com.google.common.collect.Lists;
@@ -34,7 +36,9 @@ import com.google.common.collect.Lists;
                 , "layout"
         }
 )
-public class Property implements ActionHolder {
+public class Property implements ActionHolder, Serializable {
+
+    private static final long serialVersionUID = 1L;
 
     public Property() {
     }
@@ -85,4 +89,23 @@ public class Property implements ActionHolder {
     }
 
 
+
+
+    private PropertyGroup owner;
+    /**
+     * Owner.
+     *
+     * <p>
+     *     Set programmatically by framework after reading in from XML.
+     * </p>
+     */
+    @XmlTransient
+    public PropertyGroup getOwner() {
+        return owner;
+    }
+
+    public void setOwner(final PropertyGroup owner) {
+        this.owner = owner;
+    }
+
 }

http://git-wip-us.apache.org/repos/asf/isis/blob/f5c3b104/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/PropertyGroup.java
----------------------------------------------------------------------
diff --git a/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/PropertyGroup.java b/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/PropertyGroup.java
index e7b169f..f249071 100644
--- a/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/PropertyGroup.java
+++ b/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/PropertyGroup.java
@@ -18,12 +18,14 @@
  */
 package org.apache.isis.applib.layout.v1_0;
 
+import java.io.Serializable;
 import java.util.ArrayList;
 import java.util.List;
 
 import javax.xml.bind.annotation.XmlAttribute;
 import javax.xml.bind.annotation.XmlElement;
 import javax.xml.bind.annotation.XmlElementWrapper;
+import javax.xml.bind.annotation.XmlTransient;
 import javax.xml.bind.annotation.XmlType;
 
 import com.google.common.collect.Lists;
@@ -37,7 +39,9 @@ import org.apache.isis.applib.annotation.MemberOrder;
                 , "properties"
         }
 )
-public class PropertyGroup implements ColumnContent, ActionHolder {
+public class PropertyGroup implements ColumnContent, ActionHolder, Serializable {
+
+    private static final long serialVersionUID = 1L;
 
     public PropertyGroup() {
     }
@@ -92,4 +96,24 @@ public class PropertyGroup implements ColumnContent, ActionHolder {
     public void setProperties(List<Property> properties) {
         this.properties = properties;
     }
+
+
+    private Column owner;
+    /**
+     * Owner.
+     *
+     * <p>
+     *     Set programmatically by framework after reading in from XML.
+     * </p>
+     */
+    @XmlTransient
+    public Column getOwner() {
+        return owner;
+    }
+
+    public void setOwner(final Column owner) {
+        this.owner = owner;
+    }
+
+
 }

http://git-wip-us.apache.org/repos/asf/isis/blob/f5c3b104/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/PropertyLayout.java
----------------------------------------------------------------------
diff --git a/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/PropertyLayout.java b/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/PropertyLayout.java
index fff5086..7e67acf 100644
--- a/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/PropertyLayout.java
+++ b/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/PropertyLayout.java
@@ -16,8 +16,11 @@
  */
 package org.apache.isis.applib.layout.v1_0;
 
+import java.io.Serializable;
+
 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 org.apache.isis.applib.annotation.LabelPosition;
@@ -29,7 +32,9 @@ import org.apache.isis.applib.annotation.Where;
                 , "describedAs"
         }
 )
-public class PropertyLayout {
+public class PropertyLayout implements Serializable {
+
+    private static final long serialVersionUID = 1L;
 
     private String cssClass;
 
@@ -137,4 +142,25 @@ public class PropertyLayout {
     public void setTypicalLength(Integer typicalLength) {
         this.typicalLength = typicalLength;
     }
+
+
+
+
+    private Property owner;
+    /**
+     * Owner.
+     *
+     * <p>
+     *     Set programmatically by framework after reading in from XML.
+     * </p>
+     */
+    @XmlTransient
+    public Property getOwner() {
+        return owner;
+    }
+
+    public void setOwner(final Property owner) {
+        this.owner = owner;
+    }
+
 }

http://git-wip-us.apache.org/repos/asf/isis/blob/f5c3b104/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/Tab.java
----------------------------------------------------------------------
diff --git a/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/Tab.java b/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/Tab.java
index 988d1e8..4a07dca 100644
--- a/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/Tab.java
+++ b/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/Tab.java
@@ -18,8 +18,11 @@
  */
 package org.apache.isis.applib.layout.v1_0;
 
+import java.io.Serializable;
+
 import javax.xml.bind.annotation.XmlAttribute;
 import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlTransient;
 import javax.xml.bind.annotation.XmlType;
 
 @XmlType(
@@ -31,7 +34,9 @@ import javax.xml.bind.annotation.XmlType;
                 , "right"
         }
 )
-public class Tab {
+public class Tab implements Serializable {
+
+    private static final long serialVersionUID = 1L;
 
     private String name;
 
@@ -80,4 +85,26 @@ public class Tab {
     public void setRight(final Column right) {
         this.right = right;
     }
+
+
+
+    private TabGroup owner;
+    /**
+     * Owner.
+     *
+     * <p>
+     *     Set programmatically by framework after reading in from XML.
+     * </p>
+     */
+    @XmlTransient
+    public TabGroup getOwner() {
+        return owner;
+    }
+
+    public void setOwner(final TabGroup owner) {
+        this.owner = owner;
+    }
+
+
+
 }

http://git-wip-us.apache.org/repos/asf/isis/blob/f5c3b104/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/TabGroup.java
----------------------------------------------------------------------
diff --git a/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/TabGroup.java b/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/TabGroup.java
index 2280ad6..60f39b8 100644
--- a/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/TabGroup.java
+++ b/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/TabGroup.java
@@ -18,22 +18,26 @@
  */
 package org.apache.isis.applib.layout.v1_0;
 
+import java.io.Serializable;
 import java.util.ArrayList;
 import java.util.List;
 
 import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlTransient;
 import javax.xml.bind.annotation.XmlType;
 
-@XmlType(
-        //propOrder = {"tabs"}
-)
-public class TabGroup {
+@XmlType()
+public class TabGroup implements Serializable {
+
+    private static final long serialVersionUID = 1L;
 
     // must be at least one tab.
     private List<Tab> tabs = new ArrayList<Tab>(){{
         add(new Tab());
     }};
 
+
+
     // no wrapper
     @XmlElement(name = "tab", required = true)
     public List<Tab> getTabs() {
@@ -43,4 +47,25 @@ public class TabGroup {
     public void setTabs(List<Tab> tabs) {
         this.tabs = tabs;
     }
+
+
+
+    private DomainObject owner;
+
+    /**
+     * Owner.
+     *
+     * <p>
+     *     Set programmatically by framework after reading in from XML.
+     * </p>
+     */
+    @XmlTransient
+    public DomainObject getOwner() {
+        return owner;
+    }
+
+    public void setOwner(final DomainObject owner) {
+        this.owner = owner;
+    }
+
 }

http://git-wip-us.apache.org/repos/asf/isis/blob/f5c3b104/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/Util.java
----------------------------------------------------------------------
diff --git a/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/Util.java b/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/Util.java
new file mode 100644
index 0000000..6007850
--- /dev/null
+++ b/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/Util.java
@@ -0,0 +1,49 @@
+/*
+ *  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.v1_0;
+
+import javax.annotation.Nullable;
+
+import com.google.common.base.Function;
+import com.google.common.base.Predicate;
+
+class Util {
+
+    private Util(){}
+
+    static <F,T> Predicate<F> is(final Class<T> cls) {
+        return new Predicate<F>() {
+            @Override public boolean apply(@Nullable final F from) {
+                return cls.isAssignableFrom(from.getClass());
+            }
+        };
+    }
+
+    static <F, T extends F> CastFunction<F, T> cast(final Class<T> cls) {
+        return new CastFunction<>();
+    }
+
+    private static class CastFunction<F, T extends F> implements Function<F, T> {
+        @Override
+        public final T apply(final F from) {
+            return (T) from;
+        }
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/isis/blob/f5c3b104/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/object/layoutxml/LayoutXmlFacetDefault.java
----------------------------------------------------------------------
diff --git a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/object/layoutxml/LayoutXmlFacetDefault.java b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/object/layoutxml/LayoutXmlFacetDefault.java
index e0b81d6..ad617e8 100644
--- a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/object/layoutxml/LayoutXmlFacetDefault.java
+++ b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/object/layoutxml/LayoutXmlFacetDefault.java
@@ -58,6 +58,7 @@ import org.apache.isis.core.metamodel.facets.collections.layout.NamedFacetForCol
 import org.apache.isis.core.metamodel.facets.collections.layout.PagedFacetForCollectionLayoutXml;
 import org.apache.isis.core.metamodel.facets.collections.layout.SortedByFacetForCollectionLayoutXml;
 import org.apache.isis.core.metamodel.facets.members.order.annotprop.MemberOrderFacetXml;
+import org.apache.isis.core.metamodel.facets.object.membergroups.MemberGroupLayoutFacet;
 import org.apache.isis.core.metamodel.facets.properties.propertylayout.CssClassFacetForPropertyLayoutXml;
 import org.apache.isis.core.metamodel.facets.properties.propertylayout.DescribedAsFacetForPropertyLayoutXml;
 import org.apache.isis.core.metamodel.facets.properties.propertylayout.HiddenFacetForPropertyLayoutXml;
@@ -106,22 +107,22 @@ public class LayoutXmlFacetDefault
     }
 
 
-    private boolean derivedAndSynced;
+    private boolean derived;
 
     public DomainObject getLayoutMetadata() {
-        //return derivedAndSynced ? metadata : deriveAndSync(metadata);
-        return deriveAndSync(metadata);
+        //return derived ? metadata : deriveAndOverwrite(metadata);
+        return deriveAndOverwrite(metadata);
     }
 
-    private  DomainObject deriveAndSync(final DomainObject metadata) {
+    private  DomainObject deriveAndOverwrite(final DomainObject metadata) {
         synchronized (metadata) {
-            doDeriveAndSync(metadata);
-            derivedAndSynced = true;
+            doDeriveAndOverwrite(metadata);
+            derived = true;
         }
         return metadata;
     }
 
-    private void doDeriveAndSync(final DomainObject metadata) {
+    private void doDeriveAndOverwrite(final DomainObject metadata) {
 
         final ObjectSpecification objectSpec = (ObjectSpecification) getFacetHolder();
         final Map<String, OneToOneAssociation> oneToOneAssociationById =
@@ -132,11 +133,17 @@ public class LayoutXmlFacetDefault
                 ObjectMember.Util.mapById(objectSpec.getObjectActions(Contributed.INCLUDED));
 
         derive(metadata, oneToOneAssociationById, oneToManyAssociationById, objectActionById);
-
-        sync(metadata, oneToOneAssociationById, oneToManyAssociationById, objectActionById);
+        overwrite(metadata, oneToOneAssociationById, oneToManyAssociationById, objectActionById);
     }
 
-    private void derive(
+    /**
+     * 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>
+     */
+    private static void derive(
             final DomainObject metadata,
             final Map<String, OneToOneAssociation> oneToOneAssociationById,
             final Map<String, OneToManyAssociation> oneToManyAssociationById,
@@ -144,10 +151,11 @@ public class LayoutXmlFacetDefault
         final List<String> propertyIds = Lists.newArrayList();
         final List<String> collectionIds = Lists.newArrayList();
         final List<String> actionIds = Lists.newArrayList();
-        final AtomicReference<PropertyGroup> generalPropertyGroupRef = new AtomicReference<>();
+        final AtomicReference<PropertyGroup> defaultPropertyGroupRef = new AtomicReference<>();
         final AtomicReference<Column> firstColumnRef = new AtomicReference<>();
         final AtomicReference<TabGroup> lastTabGroupRef = new AtomicReference<>();
 
+        // catalog which property, collection and action Ids appear (anywhere) in the metadata
         metadata.visit(new DomainObject.VisitorAdapter() {
             @Override
             public void visit(final Property property) {
@@ -158,17 +166,22 @@ public class LayoutXmlFacetDefault
                 collectionIds.add(collection.getId());
             }
             @Override
-            public void visit(final Action action, final ActionHolder holder) {
+            public void visit(final Action action) {
                 actionIds.add(action.getId());
             }
+        });
+
+        // capture the first column, and also
+        // capture the first property group (if any) with the default name ('General')
+        metadata.visit(new DomainObject.VisitorAdapter() {
             @Override
             public void visit(final Column column) {
                 firstColumnRef.compareAndSet(null, column);
             }
             @Override
             public void visit(final PropertyGroup propertyGroup) {
-                if(propertyGroup.getName().equals("General")) {
-                    generalPropertyGroupRef.compareAndSet(null, propertyGroup);
+                if(MemberGroupLayoutFacet.DEFAULT_GROUP.equals(propertyGroup.getName())) {
+                    defaultPropertyGroupRef.compareAndSet(null, propertyGroup);
                 }
             }
             @Override
@@ -178,20 +191,21 @@ public class LayoutXmlFacetDefault
         });
 
         // any missing properties will be added to the (first) 'General' property group found
-        // if there is no 'General' property group then one will be added to the first Column of the first Tab.
+        // if there is no default ('General') property group
+        // then one will be added to the first Column of the first Tab.
         final List<String> missingPropertyIds = Lists.newArrayList(oneToOneAssociationById.keySet());
         missingPropertyIds.removeAll(propertyIds);
 
         if(!missingPropertyIds.isEmpty()) {
             // ensure that there is a property group to use
-            boolean wasSet = generalPropertyGroupRef.compareAndSet(null, new PropertyGroup("General"));
-            final PropertyGroup generalPropertyGroup = generalPropertyGroupRef.get();
+            boolean wasSet = defaultPropertyGroupRef.compareAndSet(null, new PropertyGroup(MemberGroupLayoutFacet.DEFAULT_GROUP));
+            final PropertyGroup defaultPropertyGroup = defaultPropertyGroupRef.get();
             if(wasSet) {
-                firstColumnRef.get().getContent().add(generalPropertyGroup);
+                firstColumnRef.get().getContent().add(defaultPropertyGroup);
             }
             Iterables.removeAll(propertyIds, oneToOneAssociationById.keySet());
             for (final String propertyId : missingPropertyIds) {
-                generalPropertyGroup.getProperties().add(new Property(propertyId));
+                defaultPropertyGroup.getProperties().add(new Property(propertyId));
             }
         }
 
@@ -227,21 +241,22 @@ public class LayoutXmlFacetDefault
         }
     }
 
-    private void sync(
+    private void overwrite(
             final DomainObject metadata,
             final Map<String, OneToOneAssociation> oneToOneAssociationById,
             final Map<String, OneToManyAssociation> oneToManyAssociationById,
             final Map<String, ObjectAction> objectActionById) {
 
         metadata.visit(new DomainObject.VisitorAdapter() {
-            private int domainObjectSequence = 1;
-            private int propertyGroupSequence = 1;
-            private int propertySequence = 1;
-            private int collectionSequence = 1;
-            private Map<Action, ActionHolder> actionHolderByAction = Maps.newHashMap();
+            private final Map<String, int[]> propertySequenceByGroup = Maps.newHashMap();
+            private int actionDomainObjectSequence = 1;
+            private int actionPropertyGroupSequence = 1;
+            private int actionPropertySequence = 1;
+            private int actionCollectionSequence = 1;
+
             @Override
-            public void visit(final Action action, final ActionHolder actionHolder) {
-                actionHolderByAction.put(action, actionHolder);
+            public void visit(final Action action) {
+                final ActionHolder actionHolder = action.getOwner();
                 final ObjectAction objectAction = objectActionById.get(action.getId());
                 final String memberOrderName;
                 final int memberOrderSequence;
@@ -250,51 +265,48 @@ public class LayoutXmlFacetDefault
                     final List<Property> properties = propertyGroup.getProperties();
                     final Property property = properties.get(0); // any will do
                     memberOrderName = property.getId();
-                    memberOrderSequence = propertyGroupSequence++;
+                    memberOrderSequence = actionPropertyGroupSequence++;
                 } else if(actionHolder instanceof Property) {
                     final Property property = (Property) actionHolder;
                     memberOrderName = property.getId();
-                    memberOrderSequence = propertySequence++;
+                    memberOrderSequence = actionPropertySequence++;
                 } else if(actionHolder instanceof Collection) {
                     final Collection collection = (Collection) actionHolder;
                     memberOrderName = collection.getId();
-                    memberOrderSequence = collectionSequence++;
+                    memberOrderSequence = actionCollectionSequence++;
                 } else {
                     // DomainObject
                     memberOrderName = null;
-                    memberOrderSequence = domainObjectSequence++;
+                    memberOrderSequence = actionDomainObjectSequence++;
                 }
                 FacetUtil.addFacet(
                     new MemberOrderFacetXml(memberOrderName, ""+memberOrderSequence, translationService, objectAction));
             }
+
             @Override
-            public void visit(final ActionLayout actionLayout, final Action action) {
-                final ObjectAction objectAction = objectActionById.get(action.getId());
-                final ActionHolder actionHolder = actionHolderByAction.get(action);
+            public void visit(final ActionLayout actionLayout) {
+                final Action action = actionLayout.getOwner();
+                final ActionHolder actionHolder = action.getOwner();
 
-                final ActionLayout actionLayoutForPosition;
                 if(actionHolder instanceof PropertyGroup) {
-                    // ensure that there is a non-null valid ActionLayout#position()
-                    actionLayoutForPosition = actionLayout != null ? actionLayout : new ActionLayout();
-                    if(     actionLayoutForPosition.getPosition() == null ||
-                            actionLayoutForPosition.getPosition() == org.apache.isis.applib.annotation.ActionLayout.Position.BELOW ||
-                            actionLayoutForPosition.getPosition() == org.apache.isis.applib.annotation.ActionLayout.Position.RIGHT) {
-                        actionLayoutForPosition.setPosition(org.apache.isis.applib.annotation.ActionLayout.Position.PANEL);
+                    if(actionLayout.getPosition() == null ||
+                       actionLayout.getPosition() == org.apache.isis.applib.annotation.ActionLayout.Position.BELOW ||
+                       actionLayout.getPosition() == org.apache.isis.applib.annotation.ActionLayout.Position.RIGHT) {
+                       actionLayout.setPosition(org.apache.isis.applib.annotation.ActionLayout.Position.PANEL);
                     }
                 } else if(actionHolder instanceof Property) {
-                    // ensure that there is a non-null valid ActionLayout#position()
-                    actionLayoutForPosition = actionLayout != null ? actionLayout : new ActionLayout();
-                    if(     actionLayoutForPosition.getPosition() == null ||
-                            actionLayoutForPosition.getPosition() == org.apache.isis.applib.annotation.ActionLayout.Position.PANEL_DROPDOWN ||
-                            actionLayoutForPosition.getPosition() == org.apache.isis.applib.annotation.ActionLayout.Position.PANEL) {
-                        actionLayoutForPosition.setPosition(org.apache.isis.applib.annotation.ActionLayout.Position.BELOW);
+                    if(actionLayout.getPosition() == null ||
+                       actionLayout.getPosition() == org.apache.isis.applib.annotation.ActionLayout.Position.PANEL_DROPDOWN ||
+                       actionLayout.getPosition() == org.apache.isis.applib.annotation.ActionLayout.Position.PANEL) {
+                       actionLayout.setPosition(org.apache.isis.applib.annotation.ActionLayout.Position.BELOW);
                     }
                 } else {
                     // doesn't do anything for DomainObject or Collection
-                    actionLayoutForPosition = null;
+                    actionLayout.setPosition(null);
                 }
-                FacetUtil.addFacet(ActionPositionFacetForActionLayoutXml.create(actionLayoutForPosition, objectAction));
 
+                final ObjectAction objectAction = objectActionById.get(action.getId());
+                FacetUtil.addFacet(ActionPositionFacetForActionLayoutXml.create(actionLayout, objectAction));
                 FacetUtil.addFacet(BookmarkPolicyFacetForActionLayoutXml.create(actionLayout, objectAction));
                 FacetUtil.addFacet(CssClassFacetForActionLayoutXml.create(actionLayout, objectAction));
                 FacetUtil.addFacet(CssClassFaFacetForActionLayoutXml.create(actionLayout, objectAction));
@@ -302,8 +314,11 @@ public class LayoutXmlFacetDefault
                 FacetUtil.addFacet(HiddenFacetForActionLayoutXml.create(actionLayout, objectAction));
                 FacetUtil.addFacet(NamedFacetForActionLayoutXml.create(actionLayout, objectAction));
             }
+
             @Override
-            public void visit(final PropertyLayout propertyLayout, final Property property) {
+            public void visit(final PropertyLayout propertyLayout) {
+                final Property property = propertyLayout.getOwner();
+
                 final OneToOneAssociation oneToOneAssociation = oneToOneAssociationById.get(property.getId());
                 FacetUtil.addFacet(CssClassFacetForPropertyLayoutXml.create(propertyLayout, oneToOneAssociation));
                 FacetUtil.addFacet(DescribedAsFacetForPropertyLayoutXml.create(propertyLayout, oneToOneAssociation));
@@ -313,10 +328,20 @@ public class LayoutXmlFacetDefault
                 FacetUtil.addFacet(NamedFacetForPropertyLayoutXml.create(propertyLayout, oneToOneAssociation));
                 FacetUtil.addFacet(RenderedAdjustedFacetForPropertyLayoutXml.create(propertyLayout, oneToOneAssociation));
                 FacetUtil.addFacet(TypicalLengthFacetForPropertyLayoutXml.create(propertyLayout, oneToOneAssociation));
+
+                // @MemberOrder#name based on owning property group, @MemberOrder#sequence monotonically increasing
+                final PropertyGroup propertyGroup = property.getOwner();
+                final String groupName = propertyGroup.getName();
+                final String sequence = nextInSequenceFor(groupName);
+                FacetUtil.addFacet(
+                        new MemberOrderFacetXml(groupName, sequence, translationService, oneToOneAssociation));
             }
+
             @Override
-            public void visit(final CollectionLayout collectionLayout, final Collection collection) {
+            public void visit(final CollectionLayout collectionLayout) {
+                final Collection collection = collectionLayout.getOwner();
                 final OneToManyAssociation oneToManyAssociation = oneToManyAssociationById.get(collection.getId());
+
                 FacetUtil.addFacet(CssClassFacetForCollectionLayoutXml.create(collectionLayout, oneToManyAssociation));
                 FacetUtil.addFacet(DefaultViewFacetForCollectionLayoutXml.create(collectionLayout, oneToManyAssociation));
                 FacetUtil.addFacet(DescribedAsFacetForCollectionLayoutXml.create(collectionLayout, oneToManyAssociation));
@@ -324,17 +349,34 @@ public class LayoutXmlFacetDefault
                 FacetUtil.addFacet(NamedFacetForCollectionLayoutXml.create(collectionLayout, oneToManyAssociation));
                 FacetUtil.addFacet(PagedFacetForCollectionLayoutXml.create(collectionLayout, oneToManyAssociation));
                 FacetUtil.addFacet(SortedByFacetForCollectionLayoutXml.create(collectionLayout, oneToManyAssociation));
+
+                // copy the collection name onto the tab
+                final Column column = collection.getOwner();
+                final Tab tab = column.getOwner();
+                tab.setName(collection.getId());
+            }
+
+            private String nextInSequenceFor(final String propertyGroupName) {
+                synchronized (propertySequenceByGroup) {
+                    int[] holder = propertySequenceByGroup.get(propertyGroupName);
+                    if(holder == null) {
+                        holder = new int[]{0};
+                        propertySequenceByGroup.put(propertyGroupName, holder);
+                    }
+                    holder[0]++;
+                    return ""+holder[0];
+                }
             }
         });
 
     }
 
-    private List<OneToOneAssociation> getOneToOneAssociations(final ObjectSpecification objectSpec) {
+    private static List<OneToOneAssociation> getOneToOneAssociations(final ObjectSpecification objectSpec) {
         List associations = objectSpec
                 .getAssociations(Contributed.INCLUDED, ObjectAssociation.Filters.PROPERTIES);
         return associations;
     }
-    private List<OneToManyAssociation> getOneToManyAssociations(final ObjectSpecification objectSpec) {
+    private static List<OneToManyAssociation> getOneToManyAssociations(final ObjectSpecification objectSpec) {
         List associations = objectSpec
                 .getAssociations(Contributed.INCLUDED, ObjectAssociation.Filters.COLLECTIONS);
         return associations;

http://git-wip-us.apache.org/repos/asf/isis/blob/f5c3b104/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 9a7cc67..7fee60b 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
@@ -26,6 +26,8 @@ import java.util.Set;
 import com.google.common.collect.Lists;
 
 import org.apache.isis.applib.annotation.MemberGroupLayout.ColumnSpans;
+import org.apache.isis.applib.layout.v1_0.Column;
+import org.apache.isis.applib.layout.v1_0.Tab;
 import org.apache.isis.core.metamodel.facets.object.membergroups.MemberGroupLayoutFacet;
 
 
@@ -43,11 +45,22 @@ public final class ObjectSpecifications {
             if(this == LEFT) return columnSpans.getLeft();
             if(this == MIDDLE) return columnSpans.getMiddle();
             if(this == RIGHT) return columnSpans.getRight();
-            return 0;
+            throw new IllegalStateException();
+        }
+
+        public Column from(final Tab tab) {
+            if(this == LEFT) {return tab.getLeft();}
+            if(this == MIDDLE) return tab.getMiddle();
+            if(this == RIGHT) return tab.getRight();
+            throw new IllegalStateException();
         }
     }
 
-    public static List<String> orderByMemberGroups(ObjectSpecification objSpec, Set<String> groupNamesToOrder, MemberGroupLayoutHint memberGroupLayoutHint) {
+    public static List<String> orderByMemberGroups(
+            final ObjectSpecification objSpec,
+            final Set<String> groupNamesToOrder,
+            final MemberGroupLayoutHint memberGroupLayoutHint) {
+
         final MemberGroupLayoutFacet facet = objSpec.getFacet(MemberGroupLayoutFacet.class);
         final List<String> leftColumnGroupNames = Lists.newArrayList(groupNamesToOrder);
         

http://git-wip-us.apache.org/repos/asf/isis/blob/f5c3b104/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 5e74780..8837916 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,7 @@ 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.facets.object.membergroups.MemberGroupLayoutFacet;
 import org.apache.isis.core.metamodel.facets.object.value.ValueFacet;
 import org.apache.isis.core.metamodel.specloader.specimpl.ContributeeMember;
 
@@ -418,7 +419,7 @@ public interface ObjectAssociation extends ObjectMember, CurrentHolder {
                     return;
                 }
             }
-            getFrom(associationsByGroup, "General").add(association);
+            getFrom(associationsByGroup, MemberGroupLayoutFacet.DEFAULT_GROUP).add(association);
         }
 
         private static List<ObjectAssociation> getFrom(Map<String, List<ObjectAssociation>> associationsByGroup, final String groupName) {

http://git-wip-us.apache.org/repos/asf/isis/blob/f5c3b104/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 75b0e71..befd252 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,7 +46,7 @@ import org.apache.isis.viewer.wicket.ui.components.entity.icontitle.EntityIconAn
 import org.apache.isis.viewer.wicket.ui.components.entity.icontitle.EntityIconTitleAndCopyLinkPanelFactory;
 import org.apache.isis.viewer.wicket.ui.components.entity.properties.EntityPropertiesPanelFactory;
 import org.apache.isis.viewer.wicket.ui.components.entity.selector.links.EntityLinksSelectorPanelFactory;
-import org.apache.isis.viewer.wicket.ui.components.entity.tabbed.EntityTabbedPanelFactory;
+import org.apache.isis.viewer.wicket.ui.components.entity.tabgroups.EntityTabGroupsPanelFactory;
 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.scalars.isisapplib.IsisBlobPanelFactory;
@@ -167,7 +167,7 @@ public class ComponentFactoryRegistrarDefault implements ComponentFactoryRegistr
     protected void addComponentFactoriesForEntity(final ComponentFactoryList componentFactories) {
 
         // top-level
-        componentFactories.add(new EntityTabbedPanelFactory());
+        componentFactories.add(new EntityTabGroupsPanelFactory());
         componentFactories.add(new EntityCombinedPanelFactory());
 
         // lower-level

http://git-wip-us.apache.org/repos/asf/isis/blob/f5c3b104/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 fde03d7..97ef07c 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,6 +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.v1_0.Tab;
 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;
@@ -633,9 +634,23 @@ public class EntityModel extends BookmarkableModel<ObjectAdapter> {
 
 
     // //////////////////////////////////////////////////////////
+    // tab (if any)
+    // //////////////////////////////////////////////////////////
+
+    private Tab tab;
+
+    public Tab getTab() {
+        return tab;
+    }
+
+    public void setTab(final Tab tab) {
+        this.tab = tab;
+    }
+
+    // //////////////////////////////////////////////////////////
     // equals, hashCode
     // //////////////////////////////////////////////////////////
-    
+
     @Override
     public int hashCode() {
         final int prime = 31;

http://git-wip-us.apache.org/repos/asf/isis/blob/f5c3b104/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/collections/EntityCollectionsPanel.html
----------------------------------------------------------------------
diff --git a/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/collections/EntityCollectionsPanel.html b/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/collections/EntityCollectionsPanel.html
index 2d39517..f46ec4a 100644
--- a/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/collections/EntityCollectionsPanel.html
+++ b/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/collections/EntityCollectionsPanel.html
@@ -38,7 +38,7 @@
                             </div>
                         </div>
 
-                        <div wicket:id="collection" class="collection panel-body">
+                        <div wicket:id="owner" class="collection panel-body">
                             [collection]
                         </div>
                     </div>

http://git-wip-us.apache.org/repos/asf/isis/blob/f5c3b104/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/properties/EntityPropertiesForm.java
----------------------------------------------------------------------
diff --git a/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/properties/EntityPropertiesForm.java b/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/properties/EntityPropertiesForm.java
index 1f7f638..8339981 100644
--- a/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/properties/EntityPropertiesForm.java
+++ b/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/properties/EntityPropertiesForm.java
@@ -21,6 +21,10 @@ package org.apache.isis.viewer.wicket.ui.components.entity.properties;
 import java.util.List;
 import java.util.Map;
 
+import javax.annotation.Nullable;
+
+import com.google.common.base.Function;
+import com.google.common.collect.Iterables;
 import com.google.common.collect.Lists;
 
 import org.apache.wicket.Component;
@@ -49,6 +53,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.v1_0.Column;
+import org.apache.isis.applib.layout.v1_0.PropertyGroup;
+import org.apache.isis.applib.layout.v1_0.Tab;
 import org.apache.isis.applib.services.exceprecog.ExceptionRecognizer;
 import org.apache.isis.applib.services.exceprecog.ExceptionRecognizerComposite;
 import org.apache.isis.core.commons.authentication.MessageBroker;
@@ -147,9 +154,17 @@ public class EntityPropertiesForm extends FormAbstract<ObjectAdapter> implements
     private void buildGui() {
 
         final EntityModel entityModel = (EntityModel) getModel();
-        MemberGroupLayoutFacet memberGroupLayoutFacet =
-                entityModel.getObject().getSpecification().getFacet(MemberGroupLayoutFacet.class);
-        final ColumnSpans columnSpans = memberGroupLayoutFacet.getColumnSpans();
+
+        final Tab tabIfAny = entityModel.getTab();
+
+        final ColumnSpans columnSpans;
+        if(tabIfAny != null) {
+            columnSpans = ColumnSpans.asSpans(tabIfAny.getLeft().getSpan(), tabIfAny.getMiddle().getSpan(), tabIfAny.getRight().getSpan());
+        } else {
+            final MemberGroupLayoutFacet memberGroupLayoutFacet =
+                    entityModel.getObject().getSpecification().getFacet(MemberGroupLayoutFacet.class);
+            columnSpans = memberGroupLayoutFacet.getColumnSpans();
+        }
 
         renderedFirstField = false;
         
@@ -159,7 +174,7 @@ public class EntityPropertiesForm extends FormAbstract<ObjectAdapter> implements
         
         boolean addedProperties;
         if(columnSpans.getLeft() > 0) {
-            addedProperties = addPropertiesInColumn(leftColumn, MemberGroupLayoutHint.LEFT, columnSpans);
+            addedProperties = addPropertiesInColumn(leftColumn, MemberGroupLayoutHint.LEFT, tabIfAny, columnSpans);
             addButtons(leftColumn);
             addFeedbackGui(leftColumn);
         } else {
@@ -177,7 +192,7 @@ public class EntityPropertiesForm extends FormAbstract<ObjectAdapter> implements
         if(columnSpans.getMiddle() > 0) {
             MarkupContainer middleColumn = new WebMarkupContainer(ID_MIDDLE_COLUMN);
             add(middleColumn);
-            addPropertiesInColumn(middleColumn, MemberGroupLayoutHint.MIDDLE, columnSpans);
+            addPropertiesInColumn(middleColumn, MemberGroupLayoutHint.MIDDLE, tabIfAny, columnSpans);
         } else {
             Components.permanentlyHide(this, ID_MIDDLE_COLUMN);
         }
@@ -186,7 +201,7 @@ public class EntityPropertiesForm extends FormAbstract<ObjectAdapter> implements
         if(columnSpans.getRight() > 0) {
             MarkupContainer rightColumn = new WebMarkupContainer(ID_RIGHT_COLUMN);
             add(rightColumn);
-            addPropertiesInColumn(rightColumn, MemberGroupLayoutHint.RIGHT, columnSpans);
+            addPropertiesInColumn(rightColumn, MemberGroupLayoutHint.RIGHT, tabIfAny, columnSpans);
         } else {
             Components.permanentlyHide(this, ID_RIGHT_COLUMN);
         }
@@ -220,6 +235,7 @@ public class EntityPropertiesForm extends FormAbstract<ObjectAdapter> implements
     private boolean addPropertiesInColumn(
             final MarkupContainer markupContainer,
             final MemberGroupLayoutHint hint,
+            final Tab tabIfAny,
             final ColumnSpans columnSpans) {
         final int span = hint.from(columnSpans);
         
@@ -234,10 +250,15 @@ public class EntityPropertiesForm extends FormAbstract<ObjectAdapter> implements
 
         final Map<String, List<ObjectAssociation>> associationsByGroup = ObjectAssociation.Util.groupByMemberOrderName(associations);
         
-        final List<String> groupNames = ObjectSpecifications.orderByMemberGroups(objSpec, associationsByGroup.keySet(), hint);
-
+        final List<String> groupNames;
+        if(tabIfAny != null) {
+            final Column column = hint.from(tabIfAny);
+            groupNames = Lists.newArrayList(Iterables.transform(column.getPropertyGroups(), propertyGroupName()));
+        } else {
+            groupNames = ObjectSpecifications.orderByMemberGroups(objSpec, associationsByGroup.keySet(), hint);
+        }
 
-        for(String groupName: groupNames) {
+        for(final String groupName: groupNames) {
             final List<ObjectAssociation> associationsInGroup = associationsByGroup.get(groupName);
             if(associationsInGroup==null) {
                 continue;
@@ -278,6 +299,15 @@ public class EntityPropertiesForm extends FormAbstract<ObjectAdapter> implements
         return !groupNames.isEmpty();
     }
 
+    private static Function<? super PropertyGroup, String> propertyGroupName() {
+        return new Function<PropertyGroup, String>() {
+            @Nullable @Override
+            public String apply(@Nullable final PropertyGroup propertyGroup) {
+                return propertyGroup.getName();
+            }
+        };
+    }
+
     private void addPropertyToForm(
             final EntityModel entityModel,
             final OneToOneAssociation otoa,

http://git-wip-us.apache.org/repos/asf/isis/blob/f5c3b104/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/properties/EntityPropertiesPanel.html
----------------------------------------------------------------------
diff --git a/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/properties/EntityPropertiesPanel.html b/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/properties/EntityPropertiesPanel.html
index e65c157..afff1d6 100644
--- a/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/properties/EntityPropertiesPanel.html
+++ b/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/properties/EntityPropertiesPanel.html
@@ -36,7 +36,7 @@
                                         </div>
                                         <div class="properties panel-body">
                                             <div wicket:id="properties">
-                                                <div wicket:id="property" class="property">[property]</div>
+                                                <div wicket:id="owner" class="property">[property]</div>
                                             </div>
                                         </div>
                                     </div>
@@ -64,7 +64,7 @@
                                         </div>
                                         <div class="properties panel-body">
                                             <div wicket:id="properties">
-                                                <div wicket:id="property" class="property">[property]</div>
+                                                <div wicket:id="owner" class="property">[property]</div>
                                             </div>
                                         </div>
                                     </div>
@@ -84,7 +84,7 @@
                                         </div>
                                         <div class="properties panel-body">
                                             <div wicket:id="properties">
-                                                <div wicket:id="property" class="property">[property]</div>
+                                                <div wicket:id="owner" class="property">[property]</div>
                                             </div>
                                         </div>
                                     </div>

http://git-wip-us.apache.org/repos/asf/isis/blob/f5c3b104/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/tabbed/EntityTabbedPanel$EntityTabPanel.html
----------------------------------------------------------------------
diff --git a/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/tabbed/EntityTabbedPanel$EntityTabPanel.html b/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/tabbed/EntityTabbedPanel$EntityTabPanel.html
deleted file mode 100644
index 94582b1..0000000
--- a/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/tabbed/EntityTabbedPanel$EntityTabPanel.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="tabPanel">
-        <div wicket:id="entityPropertiesAndCollections"></div>
-
-	</div>
-</wicket:panel>
-</body>
-</html>

http://git-wip-us.apache.org/repos/asf/isis/blob/f5c3b104/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/tabbed/EntityTabbedPanel.html
----------------------------------------------------------------------
diff --git a/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/tabbed/EntityTabbedPanel.html b/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/tabbed/EntityTabbedPanel.html
deleted file mode 100644
index 999a22e..0000000
--- a/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/tabbed/EntityTabbedPanel.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="entityTabbed">
-		<div wicket:id="entitySummary"></div>
-
-        <div wicket:id="tabs">[tabbed panel will be here]</div>
-
-	</div>
-</wicket:panel>
-</body>
-</html>

http://git-wip-us.apache.org/repos/asf/isis/blob/f5c3b104/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/tabbed/EntityTabbedPanel.java
----------------------------------------------------------------------
diff --git a/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/tabbed/EntityTabbedPanel.java b/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/tabbed/EntityTabbedPanel.java
deleted file mode 100644
index c1c65ba..0000000
--- a/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/tabbed/EntityTabbedPanel.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.entity.tabbed;
-
-import java.util.List;
-
-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.markup.html.panel.Panel;
-import org.apache.wicket.model.Model;
-
-import org.apache.isis.applib.layout.v1_0.DomainObject;
-import org.apache.isis.applib.layout.v1_0.Tab;
-import org.apache.isis.applib.layout.v1_0.TabGroup;
-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.layoutxml.LayoutXmlFacet;
-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;
-
-import de.agilecoders.wicket.core.markup.html.bootstrap.tabs.AjaxBootstrapTabbedPanel;
-
-/**
- * {@link PanelAbstract Panel} to represent an entity on a single page made up
- * of several &lt;div&gt; regions.
- */
-public class EntityTabbedPanel extends PanelAbstract<EntityModel> {
-
-    private static final long serialVersionUID = 1L;
-
-    private static final String ID_ENTITY_PROPERTIES_AND_COLLECTIONS = "entityPropertiesAndCollections";
-
-    
-    public EntityTabbedPanel(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 LayoutXmlFacet layoutXmlFacet = model.getTypeOfSpecification().getFacet(LayoutXmlFacet.class);
-        final DomainObject domainObject = layoutXmlFacet.getLayoutMetadata();
-
-
-        addOrReplace(ComponentType.ENTITY_SUMMARY, model);
-
-
-        List<TabGroup> tabGroups = domainObject.getTabGroups();
-        TabGroup tabGroup = tabGroups.get(0);
-
-        List<ITab> tabs = Lists.newArrayList();
-        List<Tab> tabList = tabGroup.getTabs();
-
-        for (Tab tab : tabList) {
-
-            tabs.add(new AbstractTab(Model.of(tab.getName())) {
-                private static final long serialVersionUID = 1L;
-
-                @Override
-                public Panel getPanel(String panelId) {
-                    return new EntityTabPanel(panelId, getModel());
-                }
-
-            });
-
-        }
-
-
-        addOrReplace(new AjaxBootstrapTabbedPanel("tabs", tabs));
-
-    }
-
-    private static class EntityTabPanel extends PanelAbstract {
-        private static final long serialVersionUID = 1L;
-
-        public EntityTabPanel(String id, final EntityModel model) {
-            super(id);
-            getComponentFactoryRegistry().addOrReplaceComponent(this, ID_ENTITY_PROPERTIES_AND_COLLECTIONS, ComponentType.ENTITY_PROPERTIES, model);
-
-        }
-
-    }
-
-
-}

http://git-wip-us.apache.org/repos/asf/isis/blob/f5c3b104/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/tabbed/EntityTabbedPanelFactory.java
----------------------------------------------------------------------
diff --git a/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/tabbed/EntityTabbedPanelFactory.java b/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/tabbed/EntityTabbedPanelFactory.java
deleted file mode 100644
index 04c3496..0000000
--- a/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/tabbed/EntityTabbedPanelFactory.java
+++ /dev/null
@@ -1,56 +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.entity.tabbed;
-
-import org.apache.wicket.Component;
-import org.apache.wicket.model.IModel;
-
-import org.apache.isis.core.metamodel.facets.object.layoutxml.LayoutXmlFacet;
-import org.apache.isis.core.metamodel.spec.ObjectSpecification;
-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 EntityTabbedPanel}.
- */
-public class EntityTabbedPanelFactory extends EntityComponentFactoryAbstract {
-
-    private static final long serialVersionUID = 1L;
-
-    private static final String NAME = "tabbed";
-
-    public EntityTabbedPanelFactory() {
-        super(ComponentType.ENTITY, NAME, EntityTabbedPanel.class);
-    }
-
-    @Override
-    protected ApplicationAdvice doAppliesTo(final EntityModel entityModel) {
-        final ObjectSpecification specification = entityModel.getTypeOfSpecification();
-        return appliesIf(specification.containsDoOpFacet(LayoutXmlFacet.class));
-    }
-
-    @Override
-    public Component createComponent(final String id, final IModel<?> model) {
-        final EntityModel entityModel = (EntityModel) model;
-        return new EntityTabbedPanel(id, entityModel);
-    }
-}

http://git-wip-us.apache.org/repos/asf/isis/blob/f5c3b104/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/tabgroups/EntityTabGroupsPanel$EntityTabPanel.html
----------------------------------------------------------------------
diff --git a/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/tabgroups/EntityTabGroupsPanel$EntityTabPanel.html b/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/tabgroups/EntityTabGroupsPanel$EntityTabPanel.html
new file mode 100644
index 0000000..94582b1
--- /dev/null
+++ b/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/tabgroups/EntityTabGroupsPanel$EntityTabPanel.html
@@ -0,0 +1,29 @@
+<?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">
+        <div wicket:id="entityPropertiesAndCollections"></div>
+
+	</div>
+</wicket:panel>
+</body>
+</html>

http://git-wip-us.apache.org/repos/asf/isis/blob/f5c3b104/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/tabgroups/EntityTabGroupsPanel.html
----------------------------------------------------------------------
diff --git a/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/tabgroups/EntityTabGroupsPanel.html b/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/tabgroups/EntityTabGroupsPanel.html
new file mode 100644
index 0000000..ebe6c63
--- /dev/null
+++ b/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/tabgroups/EntityTabGroupsPanel.html
@@ -0,0 +1,33 @@
+<?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 wicket:id="tabGroups">
+            <div wicket:id="tabGroup">[tabbed panel will be here]</div>
+        </div>
+
+	</div>
+</wicket:panel>
+</body>
+</html>


[20/50] [abbrv] isis git commit: ISIS-993: factored out LayoutMetadataService, renamed the metadata classes

Posted by da...@apache.org.
http://git-wip-us.apache.org/repos/asf/isis/blob/fb0f1273/core/metamodel/src/test/java/org/apache/isis/core/metamodel/facets/actions/layout/ActionLayoutAnnotationFacetFactoryTest.java
----------------------------------------------------------------------
diff --git a/core/metamodel/src/test/java/org/apache/isis/core/metamodel/facets/actions/layout/ActionLayoutAnnotationFacetFactoryTest.java b/core/metamodel/src/test/java/org/apache/isis/core/metamodel/facets/actions/layout/ActionLayoutAnnotationFacetFactoryTest.java
deleted file mode 100644
index 8d4ce10..0000000
--- a/core/metamodel/src/test/java/org/apache/isis/core/metamodel/facets/actions/layout/ActionLayoutAnnotationFacetFactoryTest.java
+++ /dev/null
@@ -1,192 +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.facets.actions.layout;
-
-import java.lang.reflect.Method;
-
-import org.jmock.Expectations;
-import org.junit.Assert;
-import org.junit.Before;
-import org.junit.Test;
-
-import org.apache.isis.applib.annotation.ActionLayout;
-import org.apache.isis.core.metamodel.facetapi.Facet;
-import org.apache.isis.core.metamodel.facets.AbstractFacetFactoryJUnit4TestCase;
-import org.apache.isis.core.metamodel.facets.FacetFactory.ProcessMethodContext;
-import org.apache.isis.core.metamodel.facets.actions.position.ActionPositionFacet;
-import org.apache.isis.core.metamodel.facets.actions.position.ActionPositionFacetFallback;
-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.object.domainservice.DomainServiceFacet;
-import org.apache.isis.core.metamodel.facets.object.mixin.MixinFacet;
-
-import static org.hamcrest.Matchers.equalTo;
-import static org.hamcrest.Matchers.instanceOf;
-import static org.hamcrest.Matchers.is;
-import static org.hamcrest.Matchers.notNullValue;
-import static org.junit.Assert.assertThat;
-
-public class ActionLayoutAnnotationFacetFactoryTest extends AbstractFacetFactoryJUnit4TestCase {
-
-    ActionLayoutFacetFactory facetFactory;
-
-    @Before
-    public void setUp() throws Exception {
-        facetFactory = new ActionLayoutFacetFactory();
-        facetFactory.setSpecificationLoader(mockSpecificationLoaderSpi);
-    }
-
-    @Test
-    public void testActionLayoutAnnotationPickedUp() {
-
-        class Customer {
-            @SuppressWarnings("unused")
-            @ActionLayout(position = ActionLayout.Position.PANEL)
-            public String foz() {
-                return null;
-            }
-        }
-        final Method method = findMethod(Customer.class, "foz");
-
-        context.checking(new Expectations() {
-            {
-                allowing(mockSpecificationLoaderSpi).loadSpecification(Customer.class);
-                will(returnValue(mockObjSpec));
-
-                allowing(mockObjSpec).getFacet(MixinFacet.class);
-                will(returnValue(null));
-
-                allowing(mockObjSpec).getFacet(DomainServiceFacet.class);
-                will(returnValue(null));
-            }
-        });
-
-        facetFactory.process(new ProcessMethodContext(Customer.class, null, null, method, mockMethodRemover,
-                facetedMethod));
-
-        final Facet facet = facetedMethod.getFacet(ActionPositionFacet.class);
-        Assert.assertNotNull(facet);
-        Assert.assertTrue(facet instanceof ActionPositionFacetForActionLayoutAnnotation);
-        final ActionPositionFacetForActionLayoutAnnotation actionLayoutFacetAnnotation = (ActionPositionFacetForActionLayoutAnnotation) facet;
-        Assert.assertEquals(ActionLayout.Position.PANEL, actionLayoutFacetAnnotation.position());
-    }
-
-    @Test
-    public void testActionLayoutFallbackPickedUp() {
-
-        class Customer {
-            @SuppressWarnings("unused")
-            // no @ActionLayout
-            public String foo() {
-                return null;
-            }
-        }
-        final Method method = findMethod(Customer.class, "foo");
-
-        context.checking(new Expectations() {
-            {
-                allowing(mockSpecificationLoaderSpi).loadSpecification(Customer.class);
-                will(returnValue(mockObjSpec));
-
-                allowing(mockObjSpec).getFacet(MixinFacet.class);
-                will(returnValue(null));
-
-                allowing(mockObjSpec).getFacet(DomainServiceFacet.class);
-                will(returnValue(null));
-            }
-        });
-
-        facetFactory.process(new ProcessMethodContext(Customer.class, null, null, method, mockMethodRemover,
-                facetedMethod));
-
-        final Facet facet = facetedMethod.getFacet(ActionPositionFacet.class);
-        Assert.assertNotNull(facet);
-        Assert.assertTrue(facet instanceof ActionPositionFacetFallback);
-    }
-
-    public static class CssClassFa extends ActionLayoutAnnotationFacetFactoryTest {
-
-        @Test
-        public void testDefaultPosition() {
-
-            class Customer {
-                @SuppressWarnings("unused")
-                @ActionLayout(cssClassFa = "font-awesome")
-                public String foz() {
-                    return null;
-                }
-            }
-            final Method method = findMethod(Customer.class, "foz");
-
-            context.checking(new Expectations() {
-                {
-                    allowing(mockSpecificationLoaderSpi).loadSpecification(Customer.class);
-                    will(returnValue(mockObjSpec));
-
-                    allowing(mockObjSpec).getFacet(DomainServiceFacet.class);
-                    will(returnValue(null));
-                }
-            });
-
-            facetFactory.process(new ProcessMethodContext(Customer.class, null, null, method, mockMethodRemover,
-                    facetedMethod));
-
-            Facet facet = facetedMethod.getFacet(CssClassFaFacet.class);
-            assertThat(facet, is(notNullValue()));
-            assertThat(facet, is(instanceOf(CssClassFaFacetForActionLayoutAnnotation.class)));
-            CssClassFaFacetForActionLayoutAnnotation classFaFacetForActionLayoutAnnotation = (CssClassFaFacetForActionLayoutAnnotation) facet;
-            assertThat(classFaFacetForActionLayoutAnnotation.value(), is(equalTo("fa fa-fw fa-font-awesome")));
-            assertThat(classFaFacetForActionLayoutAnnotation.getPosition(), is(CssClassFaPosition.LEFT));
-        }
-
-        @Test
-        public void testRightPosition() {
-
-            class Customer {
-                @SuppressWarnings("unused")
-                @ActionLayout(cssClassFa = "font-awesome", cssClassFaPosition = ActionLayout.CssClassFaPosition.RIGHT)
-                public String foz() {
-                    return null;
-                }
-            }
-            final Method method = findMethod(Customer.class, "foz");
-
-            context.checking(new Expectations() {
-                {
-                    allowing(mockSpecificationLoaderSpi).loadSpecification(Customer.class);
-                    will(returnValue(mockObjSpec));
-
-                    allowing(mockObjSpec).getFacet(DomainServiceFacet.class);
-                    will(returnValue(null));
-                }
-            });
-
-            facetFactory.process(new ProcessMethodContext(Customer.class, null, null, method, mockMethodRemover,
-                    facetedMethod));
-
-            Facet facet = facetedMethod.getFacet(CssClassFaFacet.class);
-            assertThat(facet, is(notNullValue()));
-            assertThat(facet, is(instanceOf(CssClassFaFacetForActionLayoutAnnotation.class)));
-            CssClassFaFacetForActionLayoutAnnotation classFaFacetForActionLayoutAnnotation = (CssClassFaFacetForActionLayoutAnnotation) facet;
-            assertThat(classFaFacetForActionLayoutAnnotation.value(), is(equalTo("fa fa-fw fa-font-awesome")));
-            assertThat(classFaFacetForActionLayoutAnnotation.getPosition(), is(CssClassFaPosition.RIGHT));
-        }
-
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/isis/blob/fb0f1273/core/metamodel/src/test/java/org/apache/isis/core/metamodel/facets/actions/layout/ActionLayoutXmlLayoutAnnotationFacetFactoryTest.java
----------------------------------------------------------------------
diff --git a/core/metamodel/src/test/java/org/apache/isis/core/metamodel/facets/actions/layout/ActionLayoutXmlLayoutAnnotationFacetFactoryTest.java b/core/metamodel/src/test/java/org/apache/isis/core/metamodel/facets/actions/layout/ActionLayoutXmlLayoutAnnotationFacetFactoryTest.java
new file mode 100644
index 0000000..18f4a69
--- /dev/null
+++ b/core/metamodel/src/test/java/org/apache/isis/core/metamodel/facets/actions/layout/ActionLayoutXmlLayoutAnnotationFacetFactoryTest.java
@@ -0,0 +1,192 @@
+/* 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.facets.actions.layout;
+
+import java.lang.reflect.Method;
+
+import org.jmock.Expectations;
+import org.junit.Assert;
+import org.junit.Before;
+import org.junit.Test;
+
+import org.apache.isis.applib.annotation.ActionLayout;
+import org.apache.isis.core.metamodel.facetapi.Facet;
+import org.apache.isis.core.metamodel.facets.AbstractFacetFactoryJUnit4TestCase;
+import org.apache.isis.core.metamodel.facets.FacetFactory.ProcessMethodContext;
+import org.apache.isis.core.metamodel.facets.actions.position.ActionPositionFacet;
+import org.apache.isis.core.metamodel.facets.actions.position.ActionPositionFacetFallback;
+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.object.domainservice.DomainServiceFacet;
+import org.apache.isis.core.metamodel.facets.object.mixin.MixinFacet;
+
+import static org.hamcrest.Matchers.equalTo;
+import static org.hamcrest.Matchers.instanceOf;
+import static org.hamcrest.Matchers.is;
+import static org.hamcrest.Matchers.notNullValue;
+import static org.junit.Assert.assertThat;
+
+public class ActionLayoutXmlLayoutAnnotationFacetFactoryTest extends AbstractFacetFactoryJUnit4TestCase {
+
+    ActionLayoutFacetFactory facetFactory;
+
+    @Before
+    public void setUp() throws Exception {
+        facetFactory = new ActionLayoutFacetFactory();
+        facetFactory.setSpecificationLoader(mockSpecificationLoaderSpi);
+    }
+
+    @Test
+    public void testActionLayoutAnnotationPickedUp() {
+
+        class Customer {
+            @SuppressWarnings("unused")
+            @ActionLayout(position = ActionLayout.Position.PANEL)
+            public String foz() {
+                return null;
+            }
+        }
+        final Method method = findMethod(Customer.class, "foz");
+
+        context.checking(new Expectations() {
+            {
+                allowing(mockSpecificationLoaderSpi).loadSpecification(Customer.class);
+                will(returnValue(mockObjSpec));
+
+                allowing(mockObjSpec).getFacet(MixinFacet.class);
+                will(returnValue(null));
+
+                allowing(mockObjSpec).getFacet(DomainServiceFacet.class);
+                will(returnValue(null));
+            }
+        });
+
+        facetFactory.process(new ProcessMethodContext(Customer.class, null, null, method, mockMethodRemover,
+                facetedMethod));
+
+        final Facet facet = facetedMethod.getFacet(ActionPositionFacet.class);
+        Assert.assertNotNull(facet);
+        Assert.assertTrue(facet instanceof ActionPositionFacetForActionLayoutAnnotation);
+        final ActionPositionFacetForActionLayoutAnnotation actionLayoutFacetAnnotation = (ActionPositionFacetForActionLayoutAnnotation) facet;
+        Assert.assertEquals(ActionLayout.Position.PANEL, actionLayoutFacetAnnotation.position());
+    }
+
+    @Test
+    public void testActionLayoutFallbackPickedUp() {
+
+        class Customer {
+            @SuppressWarnings("unused")
+            // no @ActionLayout
+            public String foo() {
+                return null;
+            }
+        }
+        final Method method = findMethod(Customer.class, "foo");
+
+        context.checking(new Expectations() {
+            {
+                allowing(mockSpecificationLoaderSpi).loadSpecification(Customer.class);
+                will(returnValue(mockObjSpec));
+
+                allowing(mockObjSpec).getFacet(MixinFacet.class);
+                will(returnValue(null));
+
+                allowing(mockObjSpec).getFacet(DomainServiceFacet.class);
+                will(returnValue(null));
+            }
+        });
+
+        facetFactory.process(new ProcessMethodContext(Customer.class, null, null, method, mockMethodRemover,
+                facetedMethod));
+
+        final Facet facet = facetedMethod.getFacet(ActionPositionFacet.class);
+        Assert.assertNotNull(facet);
+        Assert.assertTrue(facet instanceof ActionPositionFacetFallback);
+    }
+
+    public static class CssClassFa extends ActionLayoutXmlLayoutAnnotationFacetFactoryTest {
+
+        @Test
+        public void testDefaultPosition() {
+
+            class Customer {
+                @SuppressWarnings("unused")
+                @ActionLayout(cssClassFa = "font-awesome")
+                public String foz() {
+                    return null;
+                }
+            }
+            final Method method = findMethod(Customer.class, "foz");
+
+            context.checking(new Expectations() {
+                {
+                    allowing(mockSpecificationLoaderSpi).loadSpecification(Customer.class);
+                    will(returnValue(mockObjSpec));
+
+                    allowing(mockObjSpec).getFacet(DomainServiceFacet.class);
+                    will(returnValue(null));
+                }
+            });
+
+            facetFactory.process(new ProcessMethodContext(Customer.class, null, null, method, mockMethodRemover,
+                    facetedMethod));
+
+            Facet facet = facetedMethod.getFacet(CssClassFaFacet.class);
+            assertThat(facet, is(notNullValue()));
+            assertThat(facet, is(instanceOf(CssClassFaFacetForActionLayoutAnnotation.class)));
+            CssClassFaFacetForActionLayoutAnnotation classFaFacetForActionLayoutAnnotation = (CssClassFaFacetForActionLayoutAnnotation) facet;
+            assertThat(classFaFacetForActionLayoutAnnotation.value(), is(equalTo("fa fa-fw fa-font-awesome")));
+            assertThat(classFaFacetForActionLayoutAnnotation.getPosition(), is(CssClassFaPosition.LEFT));
+        }
+
+        @Test
+        public void testRightPosition() {
+
+            class Customer {
+                @SuppressWarnings("unused")
+                @ActionLayout(cssClassFa = "font-awesome", cssClassFaPosition = ActionLayout.CssClassFaPosition.RIGHT)
+                public String foz() {
+                    return null;
+                }
+            }
+            final Method method = findMethod(Customer.class, "foz");
+
+            context.checking(new Expectations() {
+                {
+                    allowing(mockSpecificationLoaderSpi).loadSpecification(Customer.class);
+                    will(returnValue(mockObjSpec));
+
+                    allowing(mockObjSpec).getFacet(DomainServiceFacet.class);
+                    will(returnValue(null));
+                }
+            });
+
+            facetFactory.process(new ProcessMethodContext(Customer.class, null, null, method, mockMethodRemover,
+                    facetedMethod));
+
+            Facet facet = facetedMethod.getFacet(CssClassFaFacet.class);
+            assertThat(facet, is(notNullValue()));
+            assertThat(facet, is(instanceOf(CssClassFaFacetForActionLayoutAnnotation.class)));
+            CssClassFaFacetForActionLayoutAnnotation classFaFacetForActionLayoutAnnotation = (CssClassFaFacetForActionLayoutAnnotation) facet;
+            assertThat(classFaFacetForActionLayoutAnnotation.value(), is(equalTo("fa fa-fw fa-font-awesome")));
+            assertThat(classFaFacetForActionLayoutAnnotation.getPosition(), is(CssClassFaPosition.RIGHT));
+        }
+
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/isis/blob/fb0f1273/core/metamodel/src/test/java/org/apache/isis/core/metamodel/facets/object/layoutxml/LayoutXmlFacetDefaultTest.java
----------------------------------------------------------------------
diff --git a/core/metamodel/src/test/java/org/apache/isis/core/metamodel/facets/object/layoutxml/LayoutXmlFacetDefaultTest.java b/core/metamodel/src/test/java/org/apache/isis/core/metamodel/facets/object/layoutxml/LayoutXmlFacetDefaultTest.java
deleted file mode 100644
index 4a843bd..0000000
--- a/core/metamodel/src/test/java/org/apache/isis/core/metamodel/facets/object/layoutxml/LayoutXmlFacetDefaultTest.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.core.metamodel.facets.object.layoutxml;
-
-import java.util.concurrent.atomic.AtomicReference;
-
-import org.junit.Test;
-
-import org.apache.isis.applib.layout.v1_0.PropertyGroup;
-
-import static org.hamcrest.CoreMatchers.is;
-import static org.hamcrest.CoreMatchers.nullValue;
-import static org.junit.Assert.assertThat;
-
-public class LayoutXmlFacetDefaultTest {
-
-    @Test
-    public void xxx() throws Exception {
-
-        final AtomicReference<PropertyGroup> x = new AtomicReference<>();
-
-        PropertyGroup firstValue = new PropertyGroup();
-        PropertyGroup otherValue = new PropertyGroup();
-
-        assertThat(x.get(), is(nullValue()));
-
-        boolean b = x.compareAndSet(null, firstValue);
-        assertThat(b, is(true));
-        assertThat(x.get(), is(firstValue));
-
-        boolean b2 = x.compareAndSet(null, firstValue);
-        assertThat(b2, is(false));
-        assertThat(x.get(), is(firstValue));
-
-        boolean b3 = x.compareAndSet(null, otherValue);
-        assertThat(b3, is(false));
-        assertThat(x.get(), is(firstValue));
-
-        boolean b4 = x.compareAndSet(firstValue, otherValue);
-        assertThat(b4, is(true));
-        assertThat(x.get(), is(otherValue));
-
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/isis/blob/fb0f1273/core/metamodel/src/test/java/org/apache/isis/core/metamodel/facets/object/layoutxml/ObjectLayoutMetadataFacetDefaultTest.java
----------------------------------------------------------------------
diff --git a/core/metamodel/src/test/java/org/apache/isis/core/metamodel/facets/object/layoutxml/ObjectLayoutMetadataFacetDefaultTest.java b/core/metamodel/src/test/java/org/apache/isis/core/metamodel/facets/object/layoutxml/ObjectLayoutMetadataFacetDefaultTest.java
new file mode 100644
index 0000000..5ff3426
--- /dev/null
+++ b/core/metamodel/src/test/java/org/apache/isis/core/metamodel/facets/object/layoutxml/ObjectLayoutMetadataFacetDefaultTest.java
@@ -0,0 +1,60 @@
+/*
+ *  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.facets.object.layoutxml;
+
+import java.util.concurrent.atomic.AtomicReference;
+
+import org.junit.Test;
+
+import org.apache.isis.applib.layout.v1_0.PropertyGroup;
+
+import static org.hamcrest.CoreMatchers.is;
+import static org.hamcrest.CoreMatchers.nullValue;
+import static org.junit.Assert.assertThat;
+
+public class ObjectLayoutMetadataFacetDefaultTest {
+
+    @Test
+    public void xxx() throws Exception {
+
+        final AtomicReference<PropertyGroup> x = new AtomicReference<>();
+
+        PropertyGroup firstValue = new PropertyGroup();
+        PropertyGroup otherValue = new PropertyGroup();
+
+        assertThat(x.get(), is(nullValue()));
+
+        boolean b = x.compareAndSet(null, firstValue);
+        assertThat(b, is(true));
+        assertThat(x.get(), is(firstValue));
+
+        boolean b2 = x.compareAndSet(null, firstValue);
+        assertThat(b2, is(false));
+        assertThat(x.get(), is(firstValue));
+
+        boolean b3 = x.compareAndSet(null, otherValue);
+        assertThat(b3, is(false));
+        assertThat(x.get(), is(firstValue));
+
+        boolean b4 = x.compareAndSet(firstValue, otherValue);
+        assertThat(b4, is(true));
+        assertThat(x.get(), is(otherValue));
+
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/isis/blob/fb0f1273/core/metamodel/src/test/java/org/apache/isis/core/metamodel/layoutxml/v1_0/DomainObjectTest.java
----------------------------------------------------------------------
diff --git a/core/metamodel/src/test/java/org/apache/isis/core/metamodel/layoutxml/v1_0/DomainObjectTest.java b/core/metamodel/src/test/java/org/apache/isis/core/metamodel/layoutxml/v1_0/DomainObjectTest.java
deleted file mode 100644
index a8d06c0..0000000
--- a/core/metamodel/src/test/java/org/apache/isis/core/metamodel/layoutxml/v1_0/DomainObjectTest.java
+++ /dev/null
@@ -1,121 +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.layoutxml.v1_0;
-
-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.layout.v1_0.Action;
-import org.apache.isis.applib.layout.v1_0.Collection;
-import org.apache.isis.applib.layout.v1_0.Column;
-import org.apache.isis.applib.layout.v1_0.DomainObject;
-import org.apache.isis.applib.layout.v1_0.Property;
-import org.apache.isis.applib.layout.v1_0.PropertyGroup;
-import org.apache.isis.applib.layout.v1_0.Tab;
-import org.apache.isis.applib.layout.v1_0.TabGroup;
-import org.apache.isis.applib.services.jaxb.JaxbService;
-
-import static org.hamcrest.CoreMatchers.equalTo;
-import static org.hamcrest.CoreMatchers.is;
-import static org.junit.Assert.assertThat;
-
-public class DomainObjectTest {
-
-    private JaxbService jaxbService;
-
-    @Before
-    public void setUp() throws Exception {
-        jaxbService = new JaxbService.Simple();
-    }
-
-    @After
-    public void tearDown() throws Exception {
-
-    }
-
-    @Test
-    public void xxx() throws Exception {
-
-        final DomainObject domainObject = new DomainObject();
-
-        TabGroup tabGroup = domainObject.getTabGroups().get(0);
-        Tab tab = tabGroup.getTabs().get(0);
-        tab.setName("Common");
-        Column left = tab.getLeft();
-
-        PropertyGroup leftPropGroup = new PropertyGroup();
-        left.setPropertyGroups(Lists.<PropertyGroup>newArrayList());
-        left.getPropertyGroups().add(leftPropGroup);
-        leftPropGroup.setName("General");
-
-        Collection similarToColl = new Collection();
-        left.setCollections(Lists.<Collection>newArrayList());
-        left.getCollections().add(similarToColl);
-        similarToColl.setId("similarTo");
-
-        Property nameProperty = leftPropGroup.getProperties().get(0);
-        nameProperty.setId("name");
-
-        Action updateNameAction = new Action();
-        updateNameAction.setId("updateName");
-        nameProperty.setActions(Lists.<Action>newArrayList());
-        nameProperty.getActions().add(updateNameAction);
-
-        Action deleteAction = new Action();
-        deleteAction.setId("delete");
-        domainObject.setActions(Lists.<Action>newArrayList());
-        domainObject.getActions().add(deleteAction);
-
-        String xml = jaxbService.toXml(domainObject,
-                ImmutableMap.<String,Object>of(
-                        Marshaller.JAXB_SCHEMA_LOCATION,
-                        "http://isis.apache.org/schema/applib/layout http://isis.apache.org/schema/applib/layout/layout-1.0.xsd"
-                ));
-        System.out.println(xml);
-
-        DomainObject domainObjectRoundtripped = jaxbService.fromXml(DomainObject.class, xml);
-        String xmlRoundtripped = jaxbService.toXml(domainObjectRoundtripped,
-                ImmutableMap.<String,Object>of(
-                        Marshaller.JAXB_SCHEMA_LOCATION,
-                        "http://isis.apache.org/schema/applib/layout http://isis.apache.org/schema/applib/layout/layout-1.0.xsd"
-                ));
-        assertThat(xml, is(equalTo(xmlRoundtripped)));
-
-
-        System.out.println("==========");
-
-        dumpXsd(domainObject);
-    }
-
-    protected void dumpXsd(final DomainObject domainObject) {
-        Map<String, String> schemas = jaxbService.toXsd(domainObject, 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/fb0f1273/core/metamodel/src/test/java/org/apache/isis/core/metamodel/layoutxml/v1_0/ObjectLayoutMetadataTest.java
----------------------------------------------------------------------
diff --git a/core/metamodel/src/test/java/org/apache/isis/core/metamodel/layoutxml/v1_0/ObjectLayoutMetadataTest.java b/core/metamodel/src/test/java/org/apache/isis/core/metamodel/layoutxml/v1_0/ObjectLayoutMetadataTest.java
new file mode 100644
index 0000000..73df1fb
--- /dev/null
+++ b/core/metamodel/src/test/java/org/apache/isis/core/metamodel/layoutxml/v1_0/ObjectLayoutMetadataTest.java
@@ -0,0 +1,121 @@
+/*
+ *  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.layoutxml.v1_0;
+
+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.layout.v1_0.ActionLayoutMetadata;
+import org.apache.isis.applib.layout.v1_0.CollectionLayoutMetadata;
+import org.apache.isis.applib.layout.v1_0.Column;
+import org.apache.isis.applib.layout.v1_0.ObjectLayoutMetadata;
+import org.apache.isis.applib.layout.v1_0.PropertyLayoutMetadata;
+import org.apache.isis.applib.layout.v1_0.PropertyGroup;
+import org.apache.isis.applib.layout.v1_0.Tab;
+import org.apache.isis.applib.layout.v1_0.TabGroup;
+import org.apache.isis.applib.services.jaxb.JaxbService;
+
+import static org.hamcrest.CoreMatchers.equalTo;
+import static org.hamcrest.CoreMatchers.is;
+import static org.junit.Assert.assertThat;
+
+public class ObjectLayoutMetadataTest {
+
+    private JaxbService jaxbService;
+
+    @Before
+    public void setUp() throws Exception {
+        jaxbService = new JaxbService.Simple();
+    }
+
+    @After
+    public void tearDown() throws Exception {
+
+    }
+
+    @Test
+    public void xxx() throws Exception {
+
+        final ObjectLayoutMetadata objectLayoutMetadata = new ObjectLayoutMetadata();
+
+        TabGroup tabGroup = objectLayoutMetadata.getTabGroups().get(0);
+        Tab tab = tabGroup.getTabs().get(0);
+        tab.setName("Common");
+        Column left = tab.getLeft();
+
+        PropertyGroup leftPropGroup = new PropertyGroup();
+        left.setPropertyGroups(Lists.<PropertyGroup>newArrayList());
+        left.getPropertyGroups().add(leftPropGroup);
+        leftPropGroup.setName("General");
+
+        CollectionLayoutMetadata similarToColl = new CollectionLayoutMetadata();
+        left.setCollections(Lists.<CollectionLayoutMetadata>newArrayList());
+        left.getCollections().add(similarToColl);
+        similarToColl.setId("similarTo");
+
+        PropertyLayoutMetadata namePropertyLayoutMetadata = leftPropGroup.getProperties().get(0);
+        namePropertyLayoutMetadata.setId("name");
+
+        ActionLayoutMetadata updateNameActionLayoutMetadata = new ActionLayoutMetadata();
+        updateNameActionLayoutMetadata.setId("updateName");
+        namePropertyLayoutMetadata.setActions(Lists.<ActionLayoutMetadata>newArrayList());
+        namePropertyLayoutMetadata.getActions().add(updateNameActionLayoutMetadata);
+
+        ActionLayoutMetadata deleteActionLayoutMetadata = new ActionLayoutMetadata();
+        deleteActionLayoutMetadata.setId("delete");
+        objectLayoutMetadata.setActions(Lists.<ActionLayoutMetadata>newArrayList());
+        objectLayoutMetadata.getActions().add(deleteActionLayoutMetadata);
+
+        String xml = jaxbService.toXml(objectLayoutMetadata,
+                ImmutableMap.<String,Object>of(
+                        Marshaller.JAXB_SCHEMA_LOCATION,
+                        "http://isis.apache.org/schema/applib/layout http://isis.apache.org/schema/applib/layout/layout-1.0.xsd"
+                ));
+        System.out.println(xml);
+
+        ObjectLayoutMetadata objectLayoutMetadataRoundtripped = jaxbService.fromXml(ObjectLayoutMetadata.class, xml);
+        String xmlRoundtripped = jaxbService.toXml(objectLayoutMetadataRoundtripped,
+                ImmutableMap.<String,Object>of(
+                        Marshaller.JAXB_SCHEMA_LOCATION,
+                        "http://isis.apache.org/schema/applib/layout http://isis.apache.org/schema/applib/layout/layout-1.0.xsd"
+                ));
+        assertThat(xml, is(equalTo(xmlRoundtripped)));
+
+
+        System.out.println("==========");
+
+        dumpXsd(objectLayoutMetadata);
+    }
+
+    protected void dumpXsd(final ObjectLayoutMetadata objectLayoutMetadata) {
+        Map<String, String> schemas = jaxbService.toXsd(objectLayoutMetadata, 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/fb0f1273/core/runtime/src/test/java/org/apache/isis/core/runtime/system/ObjectActionDefaultTest.java
----------------------------------------------------------------------
diff --git a/core/runtime/src/test/java/org/apache/isis/core/runtime/system/ObjectActionDefaultTest.java b/core/runtime/src/test/java/org/apache/isis/core/runtime/system/ObjectActionDefaultTest.java
deleted file mode 100644
index 7e446c1..0000000
--- a/core/runtime/src/test/java/org/apache/isis/core/runtime/system/ObjectActionDefaultTest.java
+++ /dev/null
@@ -1,107 +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.system;
-
-import org.jmock.Expectations;
-import org.jmock.auto.Mock;
-import org.junit.Before;
-import org.junit.Rule;
-import org.junit.Test;
-
-import org.apache.isis.applib.Identifier;
-import org.apache.isis.core.commons.authentication.AuthenticationSessionProvider;
-import org.apache.isis.core.metamodel.runtimecontext.PersistenceSessionService;
-import org.apache.isis.core.metamodel.runtimecontext.MessageBrokerService;
-import org.apache.isis.core.metamodel.adapter.mgr.AdapterManager;
-import org.apache.isis.core.metamodel.facets.FacetedMethod;
-import org.apache.isis.core.metamodel.facets.all.named.NamedFacet;
-import org.apache.isis.core.metamodel.facets.all.named.NamedFacetAbstract;
-import org.apache.isis.core.metamodel.runtimecontext.ServicesInjector;
-import org.apache.isis.core.metamodel.spec.SpecificationLoader;
-import org.apache.isis.core.metamodel.spec.feature.ObjectMemberDependencies;
-import org.apache.isis.core.metamodel.specloader.specimpl.ObjectActionDefault;
-import org.apache.isis.core.unittestsupport.jmocking.JUnitRuleMockery2;
-import org.apache.isis.core.unittestsupport.jmocking.JUnitRuleMockery2.Mode;
-
-import static org.hamcrest.Matchers.equalTo;
-import static org.hamcrest.Matchers.is;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertThat;
-
-public class ObjectActionDefaultTest {
-
-    @Rule
-    public JUnitRuleMockery2 context = JUnitRuleMockery2.createFor(Mode.INTERFACES_AND_CLASSES);
-    
-    
-    private ObjectActionDefault action;
-    
-    @Mock
-    private FacetedMethod mockFacetedMethod;
-
-    @Mock
-    private AuthenticationSessionProvider mockAuthenticationSessionProvider;
-    @Mock
-    private SpecificationLoader mockSpecificationLookup;
-    @Mock
-    private AdapterManager mockAdapterManager;
-    @Mock
-    private ServicesInjector mockServicesInjector;
-    @Mock
-    private MessageBrokerService mockMessageBrokerService;
-    @Mock
-    private PersistenceSessionService mockPersistenceSessionService;
-
-    @Before
-    public void setUp() throws Exception {
-
-        context.checking(new Expectations() {
-            {
-                one(mockFacetedMethod).getIdentifier();
-                will(returnValue(Identifier.actionIdentifier("Customer", "reduceheadcount")));
-            }
-        });
-
-        action = new ObjectActionDefault(mockFacetedMethod, new ObjectMemberDependencies(
-                mockSpecificationLookup, mockServicesInjector,
-                mockPersistenceSessionService));
-    }
-
-
-    @Test
-    public void testNameDefaultsToActionsMethodName() {
-        final String name = "Reduceheadcount";
-        final NamedFacet facet = new NamedFacetAbstract(name, true, mockFacetedMethod) {
-        };
-        context.checking(new Expectations() {
-            {
-                one(mockFacetedMethod).getFacet(NamedFacet.class);
-                will(returnValue(facet));
-            }
-        });
-        assertThat(action.getName(), is(equalTo(name)));
-    }
-
-    @Test
-    public void testId() {
-        assertEquals("reduceheadcount", action.getId());
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/isis/blob/fb0f1273/core/runtime/src/test/java/org/apache/isis/core/runtime/system/ObjectActionLayoutXmlDefaultTest.java
----------------------------------------------------------------------
diff --git a/core/runtime/src/test/java/org/apache/isis/core/runtime/system/ObjectActionLayoutXmlDefaultTest.java b/core/runtime/src/test/java/org/apache/isis/core/runtime/system/ObjectActionLayoutXmlDefaultTest.java
new file mode 100644
index 0000000..3bdb185
--- /dev/null
+++ b/core/runtime/src/test/java/org/apache/isis/core/runtime/system/ObjectActionLayoutXmlDefaultTest.java
@@ -0,0 +1,107 @@
+/*
+ *  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.system;
+
+import org.jmock.Expectations;
+import org.jmock.auto.Mock;
+import org.junit.Before;
+import org.junit.Rule;
+import org.junit.Test;
+
+import org.apache.isis.applib.Identifier;
+import org.apache.isis.core.commons.authentication.AuthenticationSessionProvider;
+import org.apache.isis.core.metamodel.runtimecontext.PersistenceSessionService;
+import org.apache.isis.core.metamodel.runtimecontext.MessageBrokerService;
+import org.apache.isis.core.metamodel.adapter.mgr.AdapterManager;
+import org.apache.isis.core.metamodel.facets.FacetedMethod;
+import org.apache.isis.core.metamodel.facets.all.named.NamedFacet;
+import org.apache.isis.core.metamodel.facets.all.named.NamedFacetAbstract;
+import org.apache.isis.core.metamodel.runtimecontext.ServicesInjector;
+import org.apache.isis.core.metamodel.spec.SpecificationLoader;
+import org.apache.isis.core.metamodel.spec.feature.ObjectMemberDependencies;
+import org.apache.isis.core.metamodel.specloader.specimpl.ObjectActionDefault;
+import org.apache.isis.core.unittestsupport.jmocking.JUnitRuleMockery2;
+import org.apache.isis.core.unittestsupport.jmocking.JUnitRuleMockery2.Mode;
+
+import static org.hamcrest.Matchers.equalTo;
+import static org.hamcrest.Matchers.is;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertThat;
+
+public class ObjectActionLayoutXmlDefaultTest {
+
+    @Rule
+    public JUnitRuleMockery2 context = JUnitRuleMockery2.createFor(Mode.INTERFACES_AND_CLASSES);
+    
+    
+    private ObjectActionDefault action;
+    
+    @Mock
+    private FacetedMethod mockFacetedMethod;
+
+    @Mock
+    private AuthenticationSessionProvider mockAuthenticationSessionProvider;
+    @Mock
+    private SpecificationLoader mockSpecificationLookup;
+    @Mock
+    private AdapterManager mockAdapterManager;
+    @Mock
+    private ServicesInjector mockServicesInjector;
+    @Mock
+    private MessageBrokerService mockMessageBrokerService;
+    @Mock
+    private PersistenceSessionService mockPersistenceSessionService;
+
+    @Before
+    public void setUp() throws Exception {
+
+        context.checking(new Expectations() {
+            {
+                one(mockFacetedMethod).getIdentifier();
+                will(returnValue(Identifier.actionIdentifier("Customer", "reduceheadcount")));
+            }
+        });
+
+        action = new ObjectActionDefault(mockFacetedMethod, new ObjectMemberDependencies(
+                mockSpecificationLookup, mockServicesInjector,
+                mockPersistenceSessionService));
+    }
+
+
+    @Test
+    public void testNameDefaultsToActionsMethodName() {
+        final String name = "Reduceheadcount";
+        final NamedFacet facet = new NamedFacetAbstract(name, true, mockFacetedMethod) {
+        };
+        context.checking(new Expectations() {
+            {
+                one(mockFacetedMethod).getFacet(NamedFacet.class);
+                will(returnValue(facet));
+            }
+        });
+        assertThat(action.getName(), is(equalTo(name)));
+    }
+
+    @Test
+    public void testId() {
+        assertEquals("reduceheadcount", action.getId());
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/isis/blob/fb0f1273/core/viewer-wicket-impl/src/main/java/org/apache/isis/viewer/wicket/viewer/integration/wicket/WebRequestCycleForIsis.java
----------------------------------------------------------------------
diff --git a/core/viewer-wicket-impl/src/main/java/org/apache/isis/viewer/wicket/viewer/integration/wicket/WebRequestCycleForIsis.java b/core/viewer-wicket-impl/src/main/java/org/apache/isis/viewer/wicket/viewer/integration/wicket/WebRequestCycleForIsis.java
index 603d1e9..64d239d 100644
--- a/core/viewer-wicket-impl/src/main/java/org/apache/isis/viewer/wicket/viewer/integration/wicket/WebRequestCycleForIsis.java
+++ b/core/viewer-wicket-impl/src/main/java/org/apache/isis/viewer/wicket/viewer/integration/wicket/WebRequestCycleForIsis.java
@@ -206,7 +206,7 @@ public class WebRequestCycleForIsis extends AbstractRequestCycleListener {
         try {
             Constructor<? extends Page> constructor = signInPageClass.getConstructor(PageParameters.class, ExceptionModel.class);
             signInPage = constructor.newInstance(parameters, exceptionModel);
-        } catch (Exception _) {
+        } catch (Exception ex) {
             try {
                 IPageFactory pageFactory = Application.get().getPageFactory();
                 signInPage = pageFactory.newPage(signInPageClass, parameters);

http://git-wip-us.apache.org/repos/asf/isis/blob/fb0f1273/core/viewer-wicket-model/src/test/java/org/apache/isis/viewer/wicket/model/models/ActionModelTest.java
----------------------------------------------------------------------
diff --git a/core/viewer-wicket-model/src/test/java/org/apache/isis/viewer/wicket/model/models/ActionModelTest.java b/core/viewer-wicket-model/src/test/java/org/apache/isis/viewer/wicket/model/models/ActionModelTest.java
index f7b5baa..d9741f1 100644
--- a/core/viewer-wicket-model/src/test/java/org/apache/isis/viewer/wicket/model/models/ActionModelTest.java
+++ b/core/viewer-wicket-model/src/test/java/org/apache/isis/viewer/wicket/model/models/ActionModelTest.java
@@ -19,15 +19,15 @@
 
 package org.apache.isis.viewer.wicket.model.models;
 
+import java.util.Map;
+
+import org.junit.Test;
+
 import static org.hamcrest.Matchers.is;
 import static org.hamcrest.Matchers.not;
 import static org.hamcrest.Matchers.nullValue;
 import static org.junit.Assert.assertThat;
 
-import java.util.Map;
-
-import org.junit.Test;
-
 public class ActionModelTest {
 
     @Test

http://git-wip-us.apache.org/repos/asf/isis/blob/fb0f1273/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/combined/EntityCombinedPanelFactory.java
----------------------------------------------------------------------
diff --git a/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/combined/EntityCombinedPanelFactory.java b/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/combined/EntityCombinedPanelFactory.java
index 14c1473..1602ff0 100644
--- a/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/combined/EntityCombinedPanelFactory.java
+++ b/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/combined/EntityCombinedPanelFactory.java
@@ -22,7 +22,7 @@ package org.apache.isis.viewer.wicket.ui.components.entity.combined;
 import org.apache.wicket.Component;
 import org.apache.wicket.model.IModel;
 
-import org.apache.isis.core.metamodel.facets.object.layoutxml.LayoutXmlFacet;
+import org.apache.isis.core.metamodel.facets.object.layoutxml.ObjectLayoutMetadataFacet;
 import org.apache.isis.core.metamodel.spec.ObjectSpecification;
 import org.apache.isis.viewer.wicket.model.models.EntityModel;
 import org.apache.isis.viewer.wicket.ui.ComponentFactory;
@@ -46,7 +46,7 @@ public class EntityCombinedPanelFactory extends EntityComponentFactoryAbstract {
     protected ApplicationAdvice doAppliesTo(final EntityModel entityModel) {
         final ObjectSpecification specification = entityModel.getTypeOfSpecification();
         // opposite to the EntityTabbedPanelFactory
-        return appliesIf(!specification.containsDoOpFacet(LayoutXmlFacet.class));
+        return appliesIf(!specification.containsDoOpFacet(ObjectLayoutMetadataFacet.class));
     }
 
     @Override

http://git-wip-us.apache.org/repos/asf/isis/blob/fb0f1273/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/properties/EntityPropertiesForm.java
----------------------------------------------------------------------
diff --git a/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/properties/EntityPropertiesForm.java b/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/properties/EntityPropertiesForm.java
index 5901d08..225dcdd 100644
--- a/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/properties/EntityPropertiesForm.java
+++ b/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/properties/EntityPropertiesForm.java
@@ -21,10 +21,7 @@ package org.apache.isis.viewer.wicket.ui.components.entity.properties;
 import java.util.List;
 import java.util.Map;
 
-import javax.annotation.Nullable;
-
-import com.google.common.base.Function;
-import com.google.common.collect.Iterables;
+import com.google.common.collect.FluentIterable;
 import com.google.common.collect.Lists;
 
 import org.apache.wicket.Component;
@@ -159,10 +156,12 @@ public class EntityPropertiesForm extends FormAbstract<ObjectAdapter> implements
 
         final ColumnSpans columnSpans;
         if(tabMetaDataIfAny != null) {
+            final Column middle = tabMetaDataIfAny.getMiddle();
+            final Column right = tabMetaDataIfAny.getRight();
             columnSpans = ColumnSpans.asSpans(
                     tabMetaDataIfAny.getLeft().getSpan(),
-                    tabMetaDataIfAny.getMiddle().getSpan(),
-                    tabMetaDataIfAny.getRight().getSpan());
+                    middle != null? middle.getSpan(): 0,
+                    right != null? right.getSpan(): 0);
         } else {
             final MemberGroupLayoutFacet memberGroupLayoutFacet =
                     entityModel.getObject().getSpecification().getFacet(MemberGroupLayoutFacet.class);
@@ -177,7 +176,7 @@ public class EntityPropertiesForm extends FormAbstract<ObjectAdapter> implements
         
         boolean addedProperties;
         if(columnSpans.getLeft() > 0) {
-            addedProperties = addMembersInColumn(leftColumn, MemberGroupLayoutHint.LEFT, tabMetaDataIfAny, columnSpans);
+            addedProperties = addPropertiesInColumn(leftColumn, MemberGroupLayoutHint.LEFT, tabMetaDataIfAny, columnSpans);
             addButtons(leftColumn);
             addFeedbackGui(leftColumn);
         } else {
@@ -195,7 +194,7 @@ public class EntityPropertiesForm extends FormAbstract<ObjectAdapter> implements
         if(columnSpans.getMiddle() > 0) {
             MarkupContainer middleColumn = new WebMarkupContainer(ID_MIDDLE_COLUMN);
             add(middleColumn);
-            addMembersInColumn(middleColumn, MemberGroupLayoutHint.MIDDLE, tabMetaDataIfAny, columnSpans);
+            addPropertiesInColumn(middleColumn, MemberGroupLayoutHint.MIDDLE, tabMetaDataIfAny, columnSpans);
         } else {
             Components.permanentlyHide(this, ID_MIDDLE_COLUMN);
         }
@@ -204,7 +203,7 @@ public class EntityPropertiesForm extends FormAbstract<ObjectAdapter> implements
         if(columnSpans.getRight() > 0) {
             MarkupContainer rightColumn = new WebMarkupContainer(ID_RIGHT_COLUMN);
             add(rightColumn);
-            addMembersInColumn(rightColumn, MemberGroupLayoutHint.RIGHT, tabMetaDataIfAny, columnSpans);
+            addPropertiesInColumn(rightColumn, MemberGroupLayoutHint.RIGHT, tabMetaDataIfAny, columnSpans);
         } else {
             Components.permanentlyHide(this, ID_RIGHT_COLUMN);
         }
@@ -234,7 +233,7 @@ public class EntityPropertiesForm extends FormAbstract<ObjectAdapter> implements
         }
     }
 
-    private boolean addMembersInColumn(
+    private boolean addPropertiesInColumn(
             final MarkupContainer markupContainer,
             final MemberGroupLayoutHint hint,
             final Tab tabMetaDataIfAny,
@@ -247,17 +246,18 @@ public class EntityPropertiesForm extends FormAbstract<ObjectAdapter> implements
 
         final Column columnMetaDataIfAny = tabMetaDataIfAny != null ? hint.from(tabMetaDataIfAny) : null;
 
-        // if in a tab, then collections are also rendered.
         final List<ObjectAssociation> properties = visibleAssociations(adapter, ObjectAssociation.Filters.PROPERTIES);
 
         final RepeatingView memberGroupRv = new RepeatingView(ID_MEMBER_GROUP);
         markupContainer.add(memberGroupRv);
 
-        final Map<String, List<ObjectAssociation>> associationsByGroup =
-                ObjectAssociation.Util.groupByMemberOrderName(properties);
+        final Map<String, List<ObjectAssociation>> associationsByGroup = ObjectAssociation.Util.groupByMemberOrderName(properties);
 
         final List<String> groupNames = tabMetaDataIfAny != null
-                ? Lists.newArrayList(Iterables.transform(columnMetaDataIfAny.getPropertyGroups(), propertyGroupName()))
+                ? FluentIterable
+                    .from(columnMetaDataIfAny.getPropertyGroups())
+                    .transform(PropertyGroup.Util.nameOf())
+                    .toList()
                 : ObjectSpecifications.orderByMemberGroups(objSpec, associationsByGroup.keySet(), hint);
 
         for(final String groupName: groupNames) {
@@ -308,15 +308,6 @@ public class EntityPropertiesForm extends FormAbstract<ObjectAdapter> implements
         return !groupNames.isEmpty();
     }
 
-    private static Function<? super PropertyGroup, String> propertyGroupName() {
-        return new Function<PropertyGroup, String>() {
-            @Nullable @Override
-            public String apply(@Nullable final PropertyGroup propertyGroup) {
-                return propertyGroup.getName();
-            }
-        };
-    }
-
     private void addPropertyToForm(
             final EntityModel entityModel,
             final OneToOneAssociation otoa,

http://git-wip-us.apache.org/repos/asf/isis/blob/fb0f1273/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/tabgroups/EntityTabGroupsPanel.java
----------------------------------------------------------------------
diff --git a/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/tabgroups/EntityTabGroupsPanel.java b/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/tabgroups/EntityTabGroupsPanel.java
index e8438e1..cce3292 100644
--- a/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/tabgroups/EntityTabGroupsPanel.java
+++ b/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/tabgroups/EntityTabGroupsPanel.java
@@ -21,6 +21,7 @@ package org.apache.isis.viewer.wicket.ui.components.entity.tabgroups;
 
 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;
@@ -30,13 +31,13 @@ import org.apache.wicket.markup.html.list.ListView;
 import org.apache.wicket.markup.html.panel.Panel;
 import org.apache.wicket.model.Model;
 
-import org.apache.isis.applib.layout.v1_0.DomainObject;
+import org.apache.isis.applib.layout.v1_0.ObjectLayoutMetadata;
 import org.apache.isis.applib.layout.v1_0.Tab;
 import org.apache.isis.applib.layout.v1_0.TabGroup;
 import org.apache.isis.applib.services.jaxb.JaxbService;
 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.layoutxml.LayoutXmlFacet;
+import org.apache.isis.core.metamodel.facets.object.layoutxml.ObjectLayoutMetadataFacet;
 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;
@@ -71,16 +72,19 @@ public class EntityTabGroupsPanel extends PanelAbstract<EntityModel> {
         }
 
         // forces metadata to be derived && synced
-        final LayoutXmlFacet layoutXmlFacet = model.getTypeOfSpecification().getFacet(LayoutXmlFacet.class);
-        final DomainObject domainObject = layoutXmlFacet.getLayoutMetadata();
+        final ObjectLayoutMetadataFacet objectLayoutMetadataFacet = model.getTypeOfSpecification().getFacet(ObjectLayoutMetadataFacet.class);
+        final ObjectLayoutMetadata objectLayoutMetadata = objectLayoutMetadataFacet.getMetadata();
 
         // TODO: debugging, remove
-        final String xml = getServicesInjector().lookupService(JaxbService.class).toXml(domainObject);
+        final String xml = getServicesInjector().lookupService(JaxbService.class).toXml(objectLayoutMetadata);
         System.out.println(xml);
 
         addOrReplace(ComponentType.ENTITY_SUMMARY, model);
 
-        final List<TabGroup> tabGroups = domainObject.getTabGroups();
+        final List<TabGroup> tabGroups = FluentIterable
+                .from(objectLayoutMetadata.getTabGroups())
+                .filter(TabGroup.Predicates.notEmpty())
+                .toList();
         final ListView<TabGroup> tabGroupsList =
                 new ListView<TabGroup>(ID_TAB_GROUPS, tabGroups) {
 
@@ -89,10 +93,12 @@ public class EntityTabGroupsPanel extends PanelAbstract<EntityModel> {
 
                 final List<ITab> tabs = Lists.newArrayList();
                 final TabGroup tabGroup = item.getModelObject();
-                final List<Tab> tabList = tabGroup.getTabs();
+                final List<Tab> tabList = FluentIterable
+                        .from(tabGroup.getTabs())
+                        .filter(Tab.Predicates.notEmpty())
+                        .toList();
 
                 for (final Tab tab : tabList) {
-
                     tabs.add(new AbstractTab(Model.of(tab.getName())) {
                         private static final long serialVersionUID = 1L;
 
@@ -115,10 +121,9 @@ public class EntityTabGroupsPanel extends PanelAbstract<EntityModel> {
             super(id);
 
             final EntityModel modelWithTabHints = new EntityModel(model.getPageParameters());
-            model.setTabMetadata(tab);
+            modelWithTabHints.setTabMetadata(tab);
 
             getComponentFactoryRegistry().addOrReplaceComponent(this, ID_ENTITY_PROPERTIES_AND_COLLECTIONS, ComponentType.ENTITY_PROPERTIES, modelWithTabHints);
-
         }
     }
 }

http://git-wip-us.apache.org/repos/asf/isis/blob/fb0f1273/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/tabgroups/EntityTabGroupsPanelFactory.java
----------------------------------------------------------------------
diff --git a/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/tabgroups/EntityTabGroupsPanelFactory.java b/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/tabgroups/EntityTabGroupsPanelFactory.java
index 825ea59..05e3b68 100644
--- a/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/tabgroups/EntityTabGroupsPanelFactory.java
+++ b/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/tabgroups/EntityTabGroupsPanelFactory.java
@@ -22,7 +22,7 @@ package org.apache.isis.viewer.wicket.ui.components.entity.tabgroups;
 import org.apache.wicket.Component;
 import org.apache.wicket.model.IModel;
 
-import org.apache.isis.core.metamodel.facets.object.layoutxml.LayoutXmlFacet;
+import org.apache.isis.core.metamodel.facets.object.layoutxml.ObjectLayoutMetadataFacet;
 import org.apache.isis.core.metamodel.spec.ObjectSpecification;
 import org.apache.isis.viewer.wicket.model.models.EntityModel;
 import org.apache.isis.viewer.wicket.ui.ComponentFactory;
@@ -45,7 +45,7 @@ public class EntityTabGroupsPanelFactory extends EntityComponentFactoryAbstract
     @Override
     protected ApplicationAdvice doAppliesTo(final EntityModel entityModel) {
         final ObjectSpecification specification = entityModel.getTypeOfSpecification();
-        return appliesIf(specification.containsDoOpFacet(LayoutXmlFacet.class));
+        return appliesIf(specification.containsDoOpFacet(ObjectLayoutMetadataFacet.class));
     }
 
     @Override

http://git-wip-us.apache.org/repos/asf/isis/blob/fb0f1273/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 acc3a36..e068168 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
@@ -131,10 +131,19 @@ public class EntityPage extends PageAbstract {
 
 
 
-        // the next bit is a work-around for JRebel integration...
-        // ... even though the IsisJRebelPlugin calls invalidateCache, it seems that there is 
-        // some caching elsewhere in the Wicket viewer meaning that stale metadata is referenced.
-        // doing an additional call here seems to be sufficient, though not exactly sure why... :-(
+        //
+        // invalidate the cache so that can do dynamic reloading of layout metadata etc.
+        //
+        // Note that it's necessary to load the page twice.  (I think) that the first time is to load the new
+        // Java class files into the webapp (but too "late" to be used), the second then works.
+        // Moving this functionality earlier on in the web request pipeline (eg WebRequestCycleForIsis)
+        // made no difference.
+        //
+        // what might help is using some sort of daemon process to monitor when the class files change, and then
+        // reload (a la JRebel).  Don't think DCEVM by itself is enough, but possibly using
+        // https://github.com/fakereplace/fakereplace or https://github.com/spring-projects/spring-loaded
+        // might instead suffice since they provide a java agent similar to JRebel.
+        //
         if(!getDeploymentType().isProduction()) {
             getSpecificationLoader().invalidateCacheFor(objectAdapter.getObject());
         }

http://git-wip-us.apache.org/repos/asf/isis/blob/fb0f1273/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 d367269..8d69476 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,7 +1,5 @@
-DELIBERATE SYNTAX ERROR TO DISABLE NEW RENDERING
-
 <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
-<domainObject xsi:schemaLocation="http://isis.apache.org/schema/applib/layout http://isis.apache.org/schema/applib/layout/layout-1.0.xsd" xmlns="http://isis.apache.org/schema/applib/layout" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+<objectLayout xsi:schemaLocation="http://isis.apache.org/schema/applib/layout http://isis.apache.org/schema/applib/layout/layout-1.0.xsd" xmlns="http://isis.apache.org/schema/applib/layout" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
     <actions>
         <action id="delete"/>
     </actions>
@@ -16,23 +14,27 @@ DELIBERATE SYNTAX ERROR TO DISABLE NEW RENDERING
                     </property>
                 </propertyGroup>
             </left>
-        </tab>
-        <tab name="Other">
-            <left span="4">
+            <middle span="4">
+            </middle>
+            <right span="4">
                 <propertyGroup name="Metadata">
                     <actions>
                         <action id="downloadJdoMetadata"/>
                     </actions>
                     <property id="versionSequence"/>
                 </propertyGroup>
+            </right>
+        </tab>
+        <tab name="Other">
+            <left span="4">
             </left>
         </tab>
     </tabGroup>
     <tabGroup>
         <tab name="Similar To">
             <left span="12">
-                <collection id="similarTo"/>
+                <collection id="similarTox"/>
             </left>
         </tab>
     </tabGroup>
-</domainObject>
\ No newline at end of file
+</objectLayout>
\ No newline at end of file


[30/50] [abbrv] isis git commit: ISIS-993: working towards getting dynamic reloading working smoothly - not there yet.

Posted by da...@apache.org.
ISIS-993: working towards getting dynamic reloading working smoothly - not there yet.

* moved responsibility for reading the XML to ObjectLayoutMetadataFacet (not certain if that was a good idea).
* Update to MedataMenu to switch on/off dynamic layouts.  Don't invalidate entire spec, instead just reload the metadata.
* EntityModel cloning now shares the assocated ScalarModel map (a shallow clone), needed for edit form
* ObjectReflectorDefault only eagerly loads specs for contributed services and mixins, in an attempt to reduce startup time
* EntityTabGroupsPanelFactory now created ether the EntityTabGroupsPanel or the original EntityCombinedPanel, depending on whether there is layout.xml metadata
* added some further convenience methods to ObjectLayoutMetadata.

What I would like to do is to eagerly load up the layout.xml up front rather than lazily.  However, attempting to do that caused a stackoverflow, and not sure why.  As things stand I also have an issue with edit failing for the todoapp if no layout data at all, not sure why.


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

Branch: refs/heads/ISIS-993
Commit: 47f4aea4b39e688ab0f9b750c2419976b7958a30
Parents: aacec3b
Author: Dan Haywood <da...@haywood-associates.co.uk>
Authored: Tue Jan 12 18:23:47 2016 +0000
Committer: Dan Haywood <da...@haywood-associates.co.uk>
Committed: Mon Jan 25 14:38:24 2016 +0000

----------------------------------------------------------------------
 .../layout/v1_0/ObjectLayoutMetadata.java       |  53 ++-
 .../isis/applib/layout/v1_0/PropertyGroup.java  |   9 +-
 .../layout/ObjectLayoutMetadataService.java     |  17 +-
 .../layout/Object_downloadLayoutXml.java        |  13 +-
 .../facetdecorator/FacetDecoratorSet.java       |  11 +-
 .../ObjectLayoutMetadataFacet.java              |  11 +-
 .../ObjectLayoutMetadataFacetDefault.java       | 423 ++++++++++++++++++-
 .../ObjectLayoutMetadataFacetFactory.java       |  12 +-
 .../ObjectLayoutMetadataServiceDefault.java     | 378 +----------------
 .../services/metamodel/MetadataMenu.java        |  45 +-
 .../specloader/ObjectReflectorDefault.java      |  10 +-
 .../specimpl/FacetedMethodsBuilder.java         |   6 +-
 .../specimpl/ObjectActionContributee.java       |   3 +
 .../dflt/ObjectSpecificationDefault.java        |   2 +
 .../v1_0/ObjectLayoutMetadataTest.java          |   5 +-
 .../viewer/wicket/model/models/EntityModel.java |  36 +-
 .../combined/EntityCombinedPanelFactory.java    |   9 +-
 .../entity/properties/EntityColumnMembers.java  |   5 +-
 .../entity/properties/EntityPropertiesForm.java |   4 +-
 .../EntityTabGroupsPanel$EntityTabPanel.html    |   5 +-
 .../entity/tabgroups/EntityTabGroupsPanel.java  |  15 +-
 .../tabgroups/EntityTabGroupsPanelFactory.java  |  14 +-
 .../wicket/ui/pages/entity/EntityPage.java      |  22 +-
 23 files changed, 626 insertions(+), 482 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/isis/blob/47f4aea4/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/ObjectLayoutMetadata.java
----------------------------------------------------------------------
diff --git a/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/ObjectLayoutMetadata.java b/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/ObjectLayoutMetadata.java
index 2f056a8..4af327c 100644
--- a/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/ObjectLayoutMetadata.java
+++ b/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/ObjectLayoutMetadata.java
@@ -33,7 +33,6 @@ import com.google.common.collect.Maps;
 
 import org.apache.isis.applib.annotation.Programmatic;
 import org.apache.isis.applib.services.dto.Dto;
-import org.apache.isis.applib.services.layout.ObjectLayoutMetadataService;
 
 @XmlRootElement(
         name = "objectLayout"
@@ -182,62 +181,74 @@ public class ObjectLayoutMetadata implements Dto, ActionHolder, Serializable {
     @Programmatic
     @XmlTransient
     public LinkedHashMap<String, PropertyLayoutMetadata> getAllPropertiesById() {
-        final LinkedHashMap<String, PropertyLayoutMetadata> propertyIds = Maps.newLinkedHashMap();
+        final LinkedHashMap<String, PropertyLayoutMetadata> propertiesById = Maps.newLinkedHashMap();
         visit(new ObjectLayoutMetadata.VisitorAdapter() {
             public void visit(final PropertyLayoutMetadata propertyLayoutMetadata) {
-                propertyIds.put(propertyLayoutMetadata.getId(), propertyLayoutMetadata);
+                propertiesById.put(propertyLayoutMetadata.getId(), propertyLayoutMetadata);
             }
         });
-        return propertyIds;
+        return propertiesById;
     }
 
 
     @Programmatic
     @XmlTransient
     public LinkedHashMap<String, CollectionLayoutMetadata> getAllCollectionsById() {
-        final LinkedHashMap<String, CollectionLayoutMetadata> collectionIds = Maps.newLinkedHashMap();
-        final LinkedHashMap<String, ActionLayoutMetadata> actionIds = Maps.newLinkedHashMap();
+        final LinkedHashMap<String, CollectionLayoutMetadata> collectionsById = Maps.newLinkedHashMap();
 
         visit(new ObjectLayoutMetadata.VisitorAdapter() {
             @Override
             public void visit(final CollectionLayoutMetadata collectionLayoutMetadata) {
-                collectionIds.put(collectionLayoutMetadata.getId(), collectionLayoutMetadata);
+                collectionsById.put(collectionLayoutMetadata.getId(), collectionLayoutMetadata);
             }
         });
-        return collectionIds;
+        return collectionsById;
     }
 
 
     @Programmatic
     @XmlTransient
     public LinkedHashMap<String, ActionLayoutMetadata> getAllActionsById() {
-        final LinkedHashMap<String, ActionLayoutMetadata> actionIds = Maps.newLinkedHashMap();
+        final LinkedHashMap<String, ActionLayoutMetadata> actionsById = Maps.newLinkedHashMap();
 
         visit(new ObjectLayoutMetadata.VisitorAdapter() {
             @Override
             public void visit(final ActionLayoutMetadata actionLayoutMetadata) {
-                actionIds.put(actionLayoutMetadata.getId(), actionLayoutMetadata);
+                actionsById.put(actionLayoutMetadata.getId(), actionLayoutMetadata);
             }
         });
-        return actionIds;
+        return actionsById;
     }
 
 
+    @Programmatic
+    @XmlTransient
+    public LinkedHashMap<String, Tab> getAllTabsByName() {
+        final LinkedHashMap<String, Tab> tabsByName = Maps.newLinkedHashMap();
+
+        visit(new ObjectLayoutMetadata.VisitorAdapter() {
+            @Override
+            public void visit(final Tab tab) {
+                tabsByName.put(tab.getName(), tab);
+            }
+        });
+        return tabsByName;
+    }
 
-    private boolean normalized;
 
-    /**
-     * Whether {@link ObjectLayoutMetadataService#normalize(ObjectLayoutMetadata, Class)}
-     * has been called on this instance.
-     */
     @Programmatic
     @XmlTransient
-    public boolean isNormalized() {
-        return normalized;
-    }
+    public LinkedHashMap<String, PropertyGroup> getAllPropertyGroupsByName() {
+        final LinkedHashMap<String, PropertyGroup> propertyGroupsByName = Maps.newLinkedHashMap();
 
-    public void setNormalized(final boolean normalized) {
-        this.normalized = normalized;
+        visit(new ObjectLayoutMetadata.VisitorAdapter() {
+            @Override
+            public void visit(final PropertyGroup propertyGroup) {
+                propertyGroupsByName.put(propertyGroup.getName(), propertyGroup);
+            }
+        });
+        return propertyGroupsByName;
     }
 
+
 }

http://git-wip-us.apache.org/repos/asf/isis/blob/47f4aea4/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/PropertyGroup.java
----------------------------------------------------------------------
diff --git a/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/PropertyGroup.java b/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/PropertyGroup.java
index fd7f3c7..2fb52e3 100644
--- a/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/PropertyGroup.java
+++ b/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/PropertyGroup.java
@@ -19,7 +19,6 @@
 package org.apache.isis.applib.layout.v1_0;
 
 import java.io.Serializable;
-import java.util.ArrayList;
 import java.util.List;
 
 import javax.annotation.Nullable;
@@ -30,6 +29,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.MemberOrder;
 
@@ -67,7 +67,7 @@ public class PropertyGroup implements ColumnContent, ActionHolder, Serializable
 
 
 
-    private List<ActionLayoutMetadata> actions;
+    private List<ActionLayoutMetadata> actions = Lists.newArrayList();
 
     @XmlElementWrapper(required = false)
     @XmlElement(name = "action", required = false)
@@ -81,10 +81,7 @@ public class PropertyGroup implements ColumnContent, ActionHolder, Serializable
 
 
 
-    // must be at least one property in the property group
-    private List<PropertyLayoutMetadata> properties = new ArrayList<PropertyLayoutMetadata>() {{
-        add(new PropertyLayoutMetadata());
-    }};
+    private List<PropertyLayoutMetadata> properties = Lists.newArrayList();
 
     @XmlElement(name = "property", required = true)
     public List<PropertyLayoutMetadata> getProperties() {

http://git-wip-us.apache.org/repos/asf/isis/blob/47f4aea4/core/applib/src/main/java/org/apache/isis/applib/services/layout/ObjectLayoutMetadataService.java
----------------------------------------------------------------------
diff --git a/core/applib/src/main/java/org/apache/isis/applib/services/layout/ObjectLayoutMetadataService.java b/core/applib/src/main/java/org/apache/isis/applib/services/layout/ObjectLayoutMetadataService.java
index f0da669..e29ff47 100644
--- a/core/applib/src/main/java/org/apache/isis/applib/services/layout/ObjectLayoutMetadataService.java
+++ b/core/applib/src/main/java/org/apache/isis/applib/services/layout/ObjectLayoutMetadataService.java
@@ -28,22 +28,21 @@ public interface ObjectLayoutMetadataService {
     ObjectLayoutMetadata fromXml(Class<?> domainClass);
 
     /**
-     *  @param objectLayoutMetadata - the layout to be validated.
-     * @param domainClass - as per domain class.
-     */
-    @Programmatic
-    ObjectLayoutMetadata normalize(final ObjectLayoutMetadata objectLayoutMetadata, final Class<?> domainClass);
-
-    /**
-     * Obtains the layout metadata for the specified domain object.  It will have been {@link #normalize(ObjectLayoutMetadata, Class) normalized} already.
+     * Obtains the layout metadata, if any, for the (domain class of the) specified domain object.
      */
     @Programmatic
     ObjectLayoutMetadata toMetadata(Object domainObject);
 
     /**
-     * Obtains the layout metadata for the specified domain class.  It will have been {@link #normalize(ObjectLayoutMetadata, Class) normalized} already.
+     * Obtains the layout metadata, if any, for the specified domain class.
      */
     @Programmatic
     ObjectLayoutMetadata toMetadata(Class<?> domainClass);
 
+    @Programmatic
+    void toggleDynamicReloading();
+
+    @Programmatic
+    boolean isDynamicReloading();
+
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/isis/blob/47f4aea4/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 aca104c..726becf 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
@@ -17,6 +17,9 @@
 package org.apache.isis.applib.services.layout;
 
 import javax.inject.Inject;
+import javax.xml.bind.Marshaller;
+
+import com.google.common.collect.ImmutableMap;
 
 import org.apache.isis.applib.annotation.Action;
 import org.apache.isis.applib.annotation.ActionLayout;
@@ -32,6 +35,9 @@ import org.apache.isis.applib.value.Clob;
 @Mixin
 public class Object_downloadLayoutXml {
 
+    public static final String TNS = "http://isis.apache.org/schema/applib/layout";
+    public static final String SCHEMA_LOCATION = "http://isis.apache.org/schema/applib/layout/layout-1.0.xsd";
+
     private final Object object;
 
     public Object_downloadLayoutXml(final Object object) {
@@ -53,7 +59,12 @@ public class Object_downloadLayoutXml {
             @ParameterLayout(named = "File name")
             final String fileName) {
         final ObjectLayoutMetadata metadata = getObjectLayoutMetadata();
-        final String xml = jaxbService.toXml(metadata);
+        final String xml = jaxbService.toXml(metadata,
+                ImmutableMap.<String,Object>of(
+                        Marshaller.JAXB_SCHEMA_LOCATION,
+                        TNS + " " + SCHEMA_LOCATION
+                ));
+
         return new Clob(Util.withSuffix(fileName, "xml"), "text/xml", xml);
     }
 

http://git-wip-us.apache.org/repos/asf/isis/blob/47f4aea4/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facetdecorator/FacetDecoratorSet.java
----------------------------------------------------------------------
diff --git a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facetdecorator/FacetDecoratorSet.java b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facetdecorator/FacetDecoratorSet.java
index c540e30..38eb045 100644
--- a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facetdecorator/FacetDecoratorSet.java
+++ b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facetdecorator/FacetDecoratorSet.java
@@ -21,7 +21,6 @@ package org.apache.isis.core.metamodel.facetdecorator;
 
 import java.text.MessageFormat;
 import java.util.ArrayList;
-import java.util.Collections;
 import java.util.HashMap;
 import java.util.LinkedHashSet;
 import java.util.List;
@@ -81,10 +80,6 @@ public class FacetDecoratorSet implements ApplicationScopedComponent {
         }
     }
 
-    public Set<FacetDecorator> getFacetDecorators() {
-        return Collections.unmodifiableSet(facetDecoratorSet);
-    }
-
     public boolean isEmpty() {
         return facetDecoratorByFacetType.isEmpty();
     }
@@ -114,10 +109,12 @@ public class FacetDecoratorSet implements ApplicationScopedComponent {
         if (isEmpty()) {
             return;
         }
-        final Class<? extends Facet>[] facetTypes = holder.getFacetTypes();
+        final Set<Class<? extends Facet>> facetTypes = facetDecoratorByFacetType.keySet();
         for (final Class<? extends Facet> facetType : facetTypes) {
             final Facet facet = holder.getFacet(facetType);
-            decorateFacet(facet, holder);
+            if(facet != null) {
+                decorateFacet(facet, holder);
+            }
         }
     }
 

http://git-wip-us.apache.org/repos/asf/isis/blob/47f4aea4/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/object/layoutmetadata/ObjectLayoutMetadataFacet.java
----------------------------------------------------------------------
diff --git a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/object/layoutmetadata/ObjectLayoutMetadataFacet.java b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/object/layoutmetadata/ObjectLayoutMetadataFacet.java
index 4d8db93..2a63428 100644
--- a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/object/layoutmetadata/ObjectLayoutMetadataFacet.java
+++ b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/object/layoutmetadata/ObjectLayoutMetadataFacet.java
@@ -19,8 +19,8 @@
 package org.apache.isis.core.metamodel.facets.object.layoutmetadata;
 
 
-import org.apache.isis.core.metamodel.facetapi.Facet;
 import org.apache.isis.applib.layout.v1_0.ObjectLayoutMetadata;
+import org.apache.isis.core.metamodel.facetapi.Facet;
 
 /**
  * Corresponds to providing a <code>.layout.xml</code> file for the domain object's class.
@@ -28,8 +28,13 @@ import org.apache.isis.applib.layout.v1_0.ObjectLayoutMetadata;
 public interface ObjectLayoutMetadataFacet extends Facet {
 
     /**
-     * Will have been {@link org.apache.isis.applib.services.layout.ObjectLayoutMetadataService#normalize(ObjectLayoutMetadata, Class) normalized}.
+     * Will have been normalized by framework earlier.
      */
     ObjectLayoutMetadata getMetadata();
 
-}
+    /**
+     * (Re)load, in support of dynamic layout reloading.
+     */
+    void reloadMetadata();
+
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/isis/blob/47f4aea4/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/object/layoutmetadata/ObjectLayoutMetadataFacetDefault.java
----------------------------------------------------------------------
diff --git a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/object/layoutmetadata/ObjectLayoutMetadataFacetDefault.java b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/object/layoutmetadata/ObjectLayoutMetadataFacetDefault.java
index 95e3712..9538e72 100644
--- a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/object/layoutmetadata/ObjectLayoutMetadataFacetDefault.java
+++ b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/object/layoutmetadata/ObjectLayoutMetadataFacetDefault.java
@@ -18,19 +18,72 @@
  */
 package org.apache.isis.core.metamodel.facets.object.layoutmetadata;
 
+import java.util.Collection;
+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 com.google.common.collect.Maps;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import org.apache.isis.applib.layout.v1_0.ActionHolder;
+import org.apache.isis.applib.layout.v1_0.ActionLayoutMetadata;
+import org.apache.isis.applib.layout.v1_0.CollectionLayoutMetadata;
+import org.apache.isis.applib.layout.v1_0.Column;
+import org.apache.isis.applib.layout.v1_0.ColumnHolder;
 import org.apache.isis.applib.layout.v1_0.ObjectLayoutMetadata;
+import org.apache.isis.applib.layout.v1_0.PropertyGroup;
+import org.apache.isis.applib.layout.v1_0.PropertyLayoutMetadata;
+import org.apache.isis.applib.layout.v1_0.Tab;
+import org.apache.isis.applib.layout.v1_0.TabGroup;
+import org.apache.isis.applib.services.i18n.TranslationService;
 import org.apache.isis.applib.services.layout.ObjectLayoutMetadataService;
 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.facetapi.FacetUtil;
+import org.apache.isis.core.metamodel.facets.actions.layout.ActionPositionFacetForActionXml;
+import org.apache.isis.core.metamodel.facets.actions.layout.BookmarkPolicyFacetForActionXml;
+import org.apache.isis.core.metamodel.facets.actions.layout.CssClassFaFacetForActionXml;
+import org.apache.isis.core.metamodel.facets.actions.layout.CssClassFacetForActionXml;
+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.collections.layout.CssClassFacetForCollectionXml;
+import org.apache.isis.core.metamodel.facets.collections.layout.DefaultViewFacetForCollectionXml;
+import org.apache.isis.core.metamodel.facets.collections.layout.DescribedAsFacetForCollectionXml;
+import org.apache.isis.core.metamodel.facets.collections.layout.HiddenFacetForCollectionXml;
+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.members.order.annotprop.MemberOrderFacetXml;
+import org.apache.isis.core.metamodel.facets.object.membergroups.MemberGroupLayoutFacet;
+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;
+import org.apache.isis.core.metamodel.facets.properties.propertylayout.LabelAtFacetForPropertyXml;
+import org.apache.isis.core.metamodel.facets.properties.propertylayout.MultiLineFacetForPropertyXml;
+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.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;
 
 public class ObjectLayoutMetadataFacetDefault
             extends FacetAbstract
             implements ObjectLayoutMetadataFacet {
 
-    private final ObjectLayoutMetadata metadata;
-    private final ObjectLayoutMetadataService objectLayoutMetadataService;
+    private static final Logger LOG = LoggerFactory.getLogger(ObjectLayoutMetadataFacetDefault.class);
+
 
     public static Class<? extends Facet> type() {
         return ObjectLayoutMetadataFacet.class;
@@ -39,27 +92,375 @@ public class ObjectLayoutMetadataFacetDefault
 
     public static ObjectLayoutMetadataFacet create(
             final FacetHolder facetHolder,
-            final ObjectLayoutMetadata objectLayoutMetadata,
+            final TranslationService translationService,
             final ObjectLayoutMetadataService objectLayoutMetadataService) {
-        if(objectLayoutMetadata == null) {
-            return null;
-        }
-        return new ObjectLayoutMetadataFacetDefault(facetHolder, objectLayoutMetadata, objectLayoutMetadataService);
+        return new ObjectLayoutMetadataFacetDefault(facetHolder, translationService, objectLayoutMetadataService);
     }
 
+    private final TranslationService translationService;
+    private final ObjectLayoutMetadataService objectLayoutMetadataService;
+
+    private boolean blacklisted;
+    private ObjectLayoutMetadata metadata;
+
     private ObjectLayoutMetadataFacetDefault(
             final FacetHolder facetHolder,
-            final ObjectLayoutMetadata metadata,
+            final TranslationService translationService,
             final ObjectLayoutMetadataService objectLayoutMetadataService) {
         super(ObjectLayoutMetadataFacetDefault.type(), facetHolder, Derivation.NOT_DERIVED);
-        this.metadata = metadata;
         this.objectLayoutMetadataService = objectLayoutMetadataService;
+        this.translationService = translationService;
     }
 
+    @Override
+    public boolean isNoop() {
+        getMetadata();
+        return blacklisted;
+    }
 
+    @Override
     public ObjectLayoutMetadata getMetadata() {
-        final ObjectSpecification objectSpecification = (ObjectSpecification) getFacetHolder();
-        return objectLayoutMetadataService.normalize(metadata, objectSpecification.getCorrespondingClass());
+        if(blacklisted) {
+            return null;
+        }
+        reloadMetadata();
+        return this.metadata;
+    }
+
+    @Override
+    public void reloadMetadata() {
+        if (metadata != null && !objectLayoutMetadataService.isDynamicReloading()) {
+            return;
+        }
+        final Class<?> domainClass = getSpecification().getCorrespondingClass();
+        final ObjectLayoutMetadata metadata = objectLayoutMetadataService.fromXml(domainClass);
+        this.metadata = normalize(metadata);
+        blacklisted = this.metadata == null;
+    }
+
+    private ObjectLayoutMetadata normalize(final ObjectLayoutMetadata metadata) {
+        if(metadata == null) {
+            return null;
+        }
+        if(LOG.isInfoEnabled()) {
+            LOG.info("Normalizing layout metadata for " + getSpecification().getCorrespondingClass().getName());
+        }
+        doNormalize(metadata, getSpecification());
+        return metadata;
+    }
+
+    private void doNormalize(final ObjectLayoutMetadata metadata, final ObjectSpecification objectSpec) {
+
+        final Map<String, OneToOneAssociation> oneToOneAssociationById =
+                ObjectMember.Util.mapById(getOneToOneAssociations(objectSpec));
+        final Map<String, OneToManyAssociation> oneToManyAssociationById =
+                ObjectMember.Util.mapById(getOneToManyAssociations(objectSpec));
+        final Map<String, ObjectAction> objectActionById =
+                ObjectMember.Util.mapById(objectSpec.getObjectActions(Contributed.INCLUDED));
+
+        derive(metadata, oneToOneAssociationById, oneToManyAssociationById, objectActionById);
+        overwrite(metadata, oneToOneAssociationById, oneToManyAssociationById, objectActionById);
+    }
+
+    /**
+     * 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>
+     */
+    private static void derive(
+            final ObjectLayoutMetadata metadata,
+            final Map<String, OneToOneAssociation> oneToOneAssociationById,
+            final Map<String, OneToManyAssociation> oneToManyAssociationById,
+            final Map<String, ObjectAction> objectActionById) {
+
+        final LinkedHashMap<String, PropertyLayoutMetadata> propertyIds = metadata.getAllPropertiesById();
+        final LinkedHashMap<String, CollectionLayoutMetadata> collectionIds = metadata.getAllCollectionsById();
+        final LinkedHashMap<String, ActionLayoutMetadata> actionIds = metadata.getAllActionsById();
+
+        final AtomicReference<PropertyGroup> defaultPropertyGroupRef = new AtomicReference<>();
+        final AtomicReference<Column> firstColumnRef = new AtomicReference<>();
+        final AtomicReference<TabGroup> lastTabGroupRef = new AtomicReference<>();
+
+        // capture the first column, and also
+        // capture the first property group (if any) with the default name ('General')
+        metadata.visit(new ObjectLayoutMetadata.VisitorAdapter() {
+            @Override
+            public void visit(final Column column) {
+                firstColumnRef.compareAndSet(null, column);
+            }
+            @Override
+            public void visit(final PropertyGroup propertyGroup) {
+                if(MemberGroupLayoutFacet.DEFAULT_GROUP.equals(propertyGroup.getName())) {
+                    defaultPropertyGroupRef.compareAndSet(null, propertyGroup);
+                }
+            }
+            @Override
+            public void visit(final TabGroup tabGroup) {
+                lastTabGroupRef.set(tabGroup);
+            }
+        });
+
+        // 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 = defaultPropertyGroupRef.compareAndSet(null, new PropertyGroup(MemberGroupLayoutFacet.DEFAULT_GROUP));
+            final PropertyGroup defaultPropertyGroup = defaultPropertyGroupRef.get();
+            if(wasSet) {
+                firstColumnRef.get().getPropertyGroups().add(defaultPropertyGroup);
+            }
+            for (final String propertyId : missingPropertyIds) {
+                defaultPropertyGroup.getProperties().add(new PropertyLayoutMetadata(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(metadata.getTabGroups().size() < 2) {
+                final TabGroup tabGroup = new TabGroup();
+                metadata.getTabGroups().add(tabGroup);
+                lastTabGroupRef.set(tabGroup);
+            }
+            final TabGroup lastTabGroup = lastTabGroupRef.get();
+            for (final String collectionId : missingCollectionIds) {
+                final Tab tab = new Tab();
+                lastTabGroup.getTabs().add(tab);
+                Column left = new Column(12);
+                tab.setLeft(left);
+                final CollectionLayoutMetadata layoutMetadata = new CollectionLayoutMetadata(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<ActionLayoutMetadata> actions = metadata.getActions();
+                if(actions == null) {
+                    actions = Lists.newArrayList();
+                    metadata.setActions(actions);
+                }
+                actions.add(new ActionLayoutMetadata(actionId));
+            }
+        }
+    }
+
+    static class Tuple<T> {
+        final T first;
+        final T second;
+        private Tuple(final T first, final T second) {
+            this.first = first;
+            this.second = second;
+        }
+        public static <T> Tuple<T> of(final T first, final T second) {
+            return new Tuple<>(first, second);
+        }
+    }
+    /**
+     * Returns a 2-element tuple of [first-second, second-first]
+     */
+    static <T> Tuple<List<T>> surplusAndMissing(final Collection<T> first, final Collection<T> second){
+        final List<T> firstNotSecond = Lists.newArrayList(first);
+        firstNotSecond.removeAll(second);
+        final List<T> secondNotFirst = Lists.newArrayList(second);
+        secondNotFirst.removeAll(first);
+        return Tuple.of(firstNotSecond, secondNotFirst);
+    }
+
+    private void overwrite(
+            final ObjectLayoutMetadata metadata,
+            final Map<String, OneToOneAssociation> oneToOneAssociationById,
+            final Map<String, OneToManyAssociation> oneToManyAssociationById,
+            final Map<String, ObjectAction> objectActionById) {
+
+        final Map<String, int[]> propertySequenceByGroup = Maps.newHashMap();
+
+        metadata.visit(new ObjectLayoutMetadata.VisitorAdapter() {
+            private int collectionSequence = 1;
+            private int actionDomainObjectSequence = 1;
+            private int actionPropertyGroupSequence = 1;
+            private int actionPropertySequence = 1;
+            private int actionCollectionSequence = 1;
+
+            @Override
+            public void visit(final ActionLayoutMetadata actionLayoutMetadata) {
+                final ActionHolder actionHolder = actionLayoutMetadata.getOwner();
+                final ObjectAction objectAction = objectActionById.get(actionLayoutMetadata.getId());
+                if(objectAction == null) {
+                    return;
+                }
+
+                final String memberOrderName;
+                final int memberOrderSequence;
+                if(actionHolder instanceof PropertyGroup) {
+                    final PropertyGroup propertyGroup = (PropertyGroup) actionHolder;
+                    final List<PropertyLayoutMetadata> properties = propertyGroup.getProperties();
+                    final PropertyLayoutMetadata propertyLayoutMetadata = properties.get(0); // any will do
+                    memberOrderName = propertyLayoutMetadata.getId();
+                    memberOrderSequence = actionPropertyGroupSequence++;
+                } else if(actionHolder instanceof PropertyLayoutMetadata) {
+                    final PropertyLayoutMetadata propertyLayoutMetadata = (PropertyLayoutMetadata) actionHolder;
+                    memberOrderName = propertyLayoutMetadata.getId();
+                    memberOrderSequence = actionPropertySequence++;
+                } else if(actionHolder instanceof CollectionLayoutMetadata) {
+                    final CollectionLayoutMetadata collectionLayoutMetadata = (CollectionLayoutMetadata) actionHolder;
+                    memberOrderName = collectionLayoutMetadata.getId();
+                    memberOrderSequence = actionCollectionSequence++;
+                } else {
+                    // DomainObject
+                    memberOrderName = null;
+                    memberOrderSequence = actionDomainObjectSequence++;
+                }
+                FacetUtil.addFacet(
+                        new MemberOrderFacetXml(memberOrderName, ""+memberOrderSequence, translationService, objectAction));
+
+
+                if(actionHolder instanceof PropertyGroup) {
+                    if(actionLayoutMetadata.getPosition() == null ||
+                            actionLayoutMetadata.getPosition() == org.apache.isis.applib.annotation.ActionLayout.Position.BELOW ||
+                            actionLayoutMetadata.getPosition() == org.apache.isis.applib.annotation.ActionLayout.Position.RIGHT) {
+                        actionLayoutMetadata.setPosition(org.apache.isis.applib.annotation.ActionLayout.Position.PANEL);
+                    }
+                } else if(actionHolder instanceof PropertyLayoutMetadata) {
+                    if(actionLayoutMetadata.getPosition() == null ||
+                            actionLayoutMetadata.getPosition() == org.apache.isis.applib.annotation.ActionLayout.Position.PANEL_DROPDOWN ||
+                            actionLayoutMetadata.getPosition() == org.apache.isis.applib.annotation.ActionLayout.Position.PANEL) {
+                        actionLayoutMetadata.setPosition(org.apache.isis.applib.annotation.ActionLayout.Position.BELOW);
+                    }
+                } else {
+                    // doesn't do anything for DomainObject or Collection
+                    actionLayoutMetadata.setPosition(null);
+                }
+
+                FacetUtil.addFacet(ActionPositionFacetForActionXml.create(actionLayoutMetadata, objectAction));
+                FacetUtil.addFacet(BookmarkPolicyFacetForActionXml.create(actionLayoutMetadata, objectAction));
+                FacetUtil.addFacet(CssClassFacetForActionXml.create(actionLayoutMetadata, objectAction));
+                FacetUtil.addFacet(CssClassFaFacetForActionXml.create(actionLayoutMetadata, objectAction));
+                FacetUtil.addFacet(DescribedAsFacetForActionXml.create(actionLayoutMetadata, objectAction));
+                FacetUtil.addFacet(HiddenFacetForActionLayoutXml.create(actionLayoutMetadata, objectAction));
+                FacetUtil.addFacet(NamedFacetForActionXml.create(actionLayoutMetadata, objectAction));
+            }
+
+            @Override
+            public void visit(final PropertyLayoutMetadata propertyLayoutMetadata) {
+                final OneToOneAssociation oneToOneAssociation = oneToOneAssociationById.get(propertyLayoutMetadata.getId());
+                if(oneToOneAssociation == null) {
+                    return;
+                }
+
+                FacetUtil.addFacet(CssClassFacetForPropertyXml.create(propertyLayoutMetadata, oneToOneAssociation));
+                FacetUtil.addFacet(DescribedAsFacetForPropertyXml.create(propertyLayoutMetadata, oneToOneAssociation));
+                FacetUtil.addFacet(HiddenFacetForPropertyXml.create(propertyLayoutMetadata, oneToOneAssociation));
+                FacetUtil.addFacet(LabelAtFacetForPropertyXml.create(propertyLayoutMetadata, oneToOneAssociation));
+                FacetUtil.addFacet(MultiLineFacetForPropertyXml.create(propertyLayoutMetadata, oneToOneAssociation));
+                FacetUtil.addFacet(NamedFacetForPropertyXml.create(propertyLayoutMetadata, oneToOneAssociation));
+                FacetUtil.addFacet(
+                        RenderedAdjustedFacetForPropertyXml.create(propertyLayoutMetadata, oneToOneAssociation));
+                FacetUtil.addFacet(TypicalLengthFacetForPropertyXml.create(propertyLayoutMetadata, oneToOneAssociation));
+
+                // @MemberOrder#name based on owning property group, @MemberOrder#sequence monotonically increasing
+                final PropertyGroup propertyGroup = propertyLayoutMetadata.getOwner();
+                final String groupName = propertyGroup.getName();
+                final String sequence = nextInSequenceFor(groupName, propertySequenceByGroup);
+                FacetUtil.addFacet(
+                        new MemberOrderFacetXml(groupName, sequence, translationService, oneToOneAssociation));
+            }
+
+            @Override
+            public void visit(final CollectionLayoutMetadata collectionLayoutMetadata) {
+                final OneToManyAssociation oneToManyAssociation = oneToManyAssociationById.get(collectionLayoutMetadata.getId());
+                if(oneToManyAssociation == null) {
+                    return;
+                }
+
+                FacetUtil.addFacet(CssClassFacetForCollectionXml.create(collectionLayoutMetadata, oneToManyAssociation));
+                FacetUtil.addFacet(
+                        DefaultViewFacetForCollectionXml.create(collectionLayoutMetadata, oneToManyAssociation));
+                FacetUtil.addFacet(
+                        DescribedAsFacetForCollectionXml.create(collectionLayoutMetadata, oneToManyAssociation));
+                FacetUtil.addFacet(HiddenFacetForCollectionXml.create(collectionLayoutMetadata, oneToManyAssociation));
+                FacetUtil.addFacet(NamedFacetForCollectionXml.create(collectionLayoutMetadata, oneToManyAssociation));
+                FacetUtil.addFacet(PagedFacetForCollectionXml.create(collectionLayoutMetadata, oneToManyAssociation));
+                FacetUtil.addFacet(SortedByFacetForCollectionXml.create(collectionLayoutMetadata, oneToManyAssociation));
+
+                // @MemberOrder#name based on the collection's id (so that each has a single "member group")
+                final String groupName = collectionLayoutMetadata.getId();
+                final String sequence = "" + collectionSequence++;
+                FacetUtil.addFacet(
+                        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 Column column = collectionLayoutMetadata.getOwner();
+                final ColumnHolder holder = column.getOwner();
+                if(holder instanceof Tab) {
+                    final Tab tab = (Tab) holder;
+                    if(tab.getContents().size() == 1) {
+                        final String collectionName = oneToManyAssociation.getName();
+                        tab.setName(collectionName);
+                    }
+                }
+            }
+        });
     }
 
+    private 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];
+        }
+    }
+
+    private static List<OneToOneAssociation> getOneToOneAssociations(final ObjectSpecification objectSpec) {
+        List associations = objectSpec
+                .getAssociations(Contributed.INCLUDED, ObjectAssociation.Filters.PROPERTIES);
+        return associations;
+    }
+    private static List<OneToManyAssociation> getOneToManyAssociations(final ObjectSpecification objectSpec) {
+        List associations = objectSpec
+                .getAssociations(Contributed.INCLUDED, ObjectAssociation.Filters.COLLECTIONS);
+        return associations;
+    }
+
+    private ObjectSpecification getSpecification() {
+        return (ObjectSpecification)getFacetHolder();
+    }
+
+
+
 }

http://git-wip-us.apache.org/repos/asf/isis/blob/47f4aea4/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/object/layoutmetadata/ObjectLayoutMetadataFacetFactory.java
----------------------------------------------------------------------
diff --git a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/object/layoutmetadata/ObjectLayoutMetadataFacetFactory.java b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/object/layoutmetadata/ObjectLayoutMetadataFacetFactory.java
index 0f1b4e8..479849c 100644
--- a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/object/layoutmetadata/ObjectLayoutMetadataFacetFactory.java
+++ b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/object/layoutmetadata/ObjectLayoutMetadataFacetFactory.java
@@ -19,7 +19,7 @@ package org.apache.isis.core.metamodel.facets.object.layoutmetadata;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-import org.apache.isis.applib.layout.v1_0.ObjectLayoutMetadata;
+import org.apache.isis.applib.services.i18n.TranslationService;
 import org.apache.isis.applib.services.layout.ObjectLayoutMetadataService;
 import org.apache.isis.core.metamodel.facetapi.FacetHolder;
 import org.apache.isis.core.metamodel.facetapi.FacetUtil;
@@ -38,17 +38,13 @@ public class ObjectLayoutMetadataFacetFactory extends FacetFactoryAbstract imple
 
     @Override
     public void process(final ProcessClassContext processClassContext) {
-        final Class<?> cls = processClassContext.getCls();
         final FacetHolder facetHolder = processClassContext.getFacetHolder();
 
+        final TranslationService translationService = servicesInjector.lookupService(TranslationService.class);
         final ObjectLayoutMetadataService objectLayoutMetadataService = servicesInjector.lookupService(ObjectLayoutMetadataService.class);
         FacetUtil.addFacet(
-                ObjectLayoutMetadataFacetDefault.create(facetHolder, readMetadata(cls), objectLayoutMetadataService));
-    }
-
-    private ObjectLayoutMetadata readMetadata(final Class<?> domainClass) {
-        final ObjectLayoutMetadataService objectLayoutMetadataService = servicesInjector.lookupService(ObjectLayoutMetadataService.class);
-        return objectLayoutMetadataService.fromXml(domainClass);
+                ObjectLayoutMetadataFacetDefault.create(facetHolder,
+                        translationService, objectLayoutMetadataService));
     }
 
     private ServicesInjector servicesInjector;

http://git-wip-us.apache.org/repos/asf/isis/blob/47f4aea4/core/metamodel/src/main/java/org/apache/isis/core/metamodel/services/layout/ObjectLayoutMetadataServiceDefault.java
----------------------------------------------------------------------
diff --git a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/services/layout/ObjectLayoutMetadataServiceDefault.java b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/services/layout/ObjectLayoutMetadataServiceDefault.java
index 3080769..6431486 100644
--- a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/services/layout/ObjectLayoutMetadataServiceDefault.java
+++ b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/services/layout/ObjectLayoutMetadataServiceDefault.java
@@ -19,16 +19,10 @@ package org.apache.isis.core.metamodel.services.layout;
 import java.io.IOException;
 import java.net.URL;
 import java.nio.charset.Charset;
-import java.util.LinkedHashMap;
-import java.util.List;
-import java.util.Map;
 import java.util.Set;
-import java.util.concurrent.atomic.AtomicReference;
 
 import javax.inject.Inject;
 
-import com.google.common.collect.Lists;
-import com.google.common.collect.Maps;
 import com.google.common.collect.Sets;
 import com.google.common.io.Resources;
 
@@ -38,60 +32,17 @@ 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.layout.v1_0.ActionHolder;
-import org.apache.isis.applib.layout.v1_0.ActionLayoutMetadata;
-import org.apache.isis.applib.layout.v1_0.CollectionLayoutMetadata;
-import org.apache.isis.applib.layout.v1_0.Column;
-import org.apache.isis.applib.layout.v1_0.ColumnHolder;
 import org.apache.isis.applib.layout.v1_0.ObjectLayoutMetadata;
-import org.apache.isis.applib.layout.v1_0.PropertyGroup;
-import org.apache.isis.applib.layout.v1_0.PropertyLayoutMetadata;
-import org.apache.isis.applib.layout.v1_0.Tab;
-import org.apache.isis.applib.layout.v1_0.TabGroup;
-import org.apache.isis.applib.services.i18n.TranslationService;
 import org.apache.isis.applib.services.jaxb.JaxbService;
 import org.apache.isis.applib.services.layout.ObjectLayoutMetadataService;
-import org.apache.isis.core.metamodel.deployment.DeploymentCategory;
-import org.apache.isis.core.metamodel.deployment.DeploymentCategoryAware;
-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;
-import org.apache.isis.core.metamodel.facets.actions.layout.CssClassFaFacetForActionXml;
-import org.apache.isis.core.metamodel.facets.actions.layout.CssClassFacetForActionXml;
-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.collections.layout.CssClassFacetForCollectionXml;
-import org.apache.isis.core.metamodel.facets.collections.layout.DefaultViewFacetForCollectionXml;
-import org.apache.isis.core.metamodel.facets.collections.layout.DescribedAsFacetForCollectionXml;
-import org.apache.isis.core.metamodel.facets.collections.layout.HiddenFacetForCollectionXml;
-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.members.order.annotprop.MemberOrderFacetXml;
 import org.apache.isis.core.metamodel.facets.object.layoutmetadata.ObjectLayoutMetadataFacet;
-import org.apache.isis.core.metamodel.facets.object.membergroups.MemberGroupLayoutFacet;
-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;
-import org.apache.isis.core.metamodel.facets.properties.propertylayout.LabelAtFacetForPropertyXml;
-import org.apache.isis.core.metamodel.facets.properties.propertylayout.MultiLineFacetForPropertyXml;
-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.spec.ObjectSpecification;
 import org.apache.isis.core.metamodel.spec.SpecificationLoader;
 import org.apache.isis.core.metamodel.spec.SpecificationLoaderAware;
-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;
 
 @DomainService(nature = NatureOfService.DOMAIN)
 public class ObjectLayoutMetadataServiceDefault
-        implements ObjectLayoutMetadataService, DeploymentCategoryAware , SpecificationLoaderAware {
+        implements ObjectLayoutMetadataService, SpecificationLoaderAware {
 
     private static final Logger LOG = LoggerFactory.getLogger(ObjectLayoutMetadataServiceDefault.class);
 
@@ -139,316 +90,6 @@ public class ObjectLayoutMetadataServiceDefault
     }
 
 
-    @Override
-    public ObjectLayoutMetadata normalize(final ObjectLayoutMetadata objectLayoutMetadata, final Class<?> domainClass) {
-        // caching (of whether validated) is enabled only in production.
-        return objectLayoutMetadata.isNormalized() && deploymentCategory.isProduction()
-                ? objectLayoutMetadata
-                : deriveAndOverwrite(objectLayoutMetadata, domainClass);
-    }
-
-    private ObjectLayoutMetadata deriveAndOverwrite(final ObjectLayoutMetadata objectLayoutMetadata, final Class<?> domainClass) {
-        synchronized (objectLayoutMetadata) {
-            final ObjectSpecification objectSpec = specificationLookup.loadSpecification(domainClass);
-            doDeriveAndOverwrite(objectLayoutMetadata, objectSpec);
-            objectLayoutMetadata.setNormalized(true);
-        }
-        return objectLayoutMetadata;
-    }
-
-    private void doDeriveAndOverwrite(final ObjectLayoutMetadata metadata, final ObjectSpecification objectSpec) {
-
-        final Map<String, OneToOneAssociation> oneToOneAssociationById =
-                ObjectMember.Util.mapById(getOneToOneAssociations(objectSpec));
-        final Map<String, OneToManyAssociation> oneToManyAssociationById =
-                ObjectMember.Util.mapById(getOneToManyAssociations(objectSpec));
-        final Map<String, ObjectAction> objectActionById =
-                ObjectMember.Util.mapById(objectSpec.getObjectActions(Contributed.INCLUDED));
-
-        derive(metadata, oneToOneAssociationById, oneToManyAssociationById, objectActionById);
-        overwrite(metadata, oneToOneAssociationById, oneToManyAssociationById, objectActionById);
-    }
-
-    /**
-     * 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>
-     */
-    private static void derive(
-            final ObjectLayoutMetadata metadata,
-            final Map<String, OneToOneAssociation> oneToOneAssociationById,
-            final Map<String, OneToManyAssociation> oneToManyAssociationById,
-            final Map<String, ObjectAction> objectActionById) {
-
-        final LinkedHashMap<String, PropertyLayoutMetadata> propertyIds = metadata.getAllPropertiesById();
-        final LinkedHashMap<String, CollectionLayoutMetadata> collectionIds = metadata.getAllCollectionsById();
-        final LinkedHashMap<String, ActionLayoutMetadata> actionIds = metadata.getAllActionsById();
-
-        final AtomicReference<PropertyGroup> defaultPropertyGroupRef = new AtomicReference<>();
-        final AtomicReference<Column> firstColumnRef = new AtomicReference<>();
-        final AtomicReference<TabGroup> lastTabGroupRef = new AtomicReference<>();
-
-        // capture the first column, and also
-        // capture the first property group (if any) with the default name ('General')
-        metadata.visit(new ObjectLayoutMetadata.VisitorAdapter() {
-            @Override
-            public void visit(final Column column) {
-                firstColumnRef.compareAndSet(null, column);
-            }
-            @Override
-            public void visit(final PropertyGroup propertyGroup) {
-                if(MemberGroupLayoutFacet.DEFAULT_GROUP.equals(propertyGroup.getName())) {
-                    defaultPropertyGroupRef.compareAndSet(null, propertyGroup);
-                }
-            }
-            @Override
-            public void visit(final TabGroup tabGroup) {
-                lastTabGroupRef.set(tabGroup);
-            }
-        });
-
-        // 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 List<String>[] propertyIdTuple = surplusAndMissing(propertyIds.keySet(), oneToOneAssociationById.keySet());
-        final List<String> surplusPropertyIds = propertyIdTuple[0];
-        final List<String> missingPropertyIds = propertyIdTuple[1];
-
-        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 = defaultPropertyGroupRef.compareAndSet(null, new PropertyGroup(MemberGroupLayoutFacet.DEFAULT_GROUP));
-            final PropertyGroup defaultPropertyGroup = defaultPropertyGroupRef.get();
-            if(wasSet) {
-                firstColumnRef.get().getPropertyGroups().add(defaultPropertyGroup);
-            }
-            for (final String propertyId : missingPropertyIds) {
-                defaultPropertyGroup.getProperties().add(new PropertyLayoutMetadata(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 List<String>[] collectionIdTuple = surplusAndMissing(collectionIds.keySet(), oneToManyAssociationById.keySet());
-        final List<String> surplusCollectionIds = collectionIdTuple[0];
-        final List<String> missingCollectionIds = collectionIdTuple[1];
-
-        for (String surplusCollectionId : surplusCollectionIds) {
-            collectionIds.get(surplusCollectionId).setMetadataError("No such collection");
-        }
-
-        if(!missingCollectionIds.isEmpty()) {
-            while(metadata.getTabGroups().size() < 2) {
-                final TabGroup tabGroup = new TabGroup();
-                metadata.getTabGroups().add(tabGroup);
-                lastTabGroupRef.set(tabGroup);
-            }
-            final TabGroup lastTabGroup = lastTabGroupRef.get();
-            for (final String collectionId : missingCollectionIds) {
-                final Tab tab = new Tab();
-                lastTabGroup.getTabs().add(tab);
-                Column left = new Column(12);
-                tab.setLeft(left);
-                final CollectionLayoutMetadata layoutMetadata = new CollectionLayoutMetadata(collectionId);
-                layoutMetadata.setDefaultView("table");
-                left.getCollections().add(layoutMetadata);
-            }
-        }
-
-        // any missing actions will be added as domain object actions (in the header)
-        final List<String>[] actionIdTuple = surplusAndMissing(actionIds.keySet(), objectActionById.keySet());
-        final List<String> surplusActionIds = actionIdTuple[0];
-        final List<String> missingActionIds = actionIdTuple[1];
-
-        for (String surplusActionId : surplusActionIds) {
-            actionIds.get(surplusActionId).setMetadataError("No such action");
-        }
-
-        if(!missingActionIds.isEmpty()) {
-            for (String actionId : missingActionIds) {
-                List<ActionLayoutMetadata> actions = metadata.getActions();
-                if(actions == null) {
-                    actions = Lists.newArrayList();
-                    metadata.setActions(actions);
-                }
-                actions.add(new ActionLayoutMetadata(actionId));
-            }
-        }
-    }
-
-    /**
-     * Returns a 2-element array (a tuple) of [first-second, second-first]
-     */
-    static <T> List<T>[] surplusAndMissing(final java.util.Collection<T> first, final java.util.Collection<T> second){
-        final List<T> firstNotSecond = Lists.newArrayList(first);
-        firstNotSecond.removeAll(second);
-        final List<T> secondNotFirst = Lists.newArrayList(second);
-        secondNotFirst.removeAll(first);
-        return new List[]{ firstNotSecond, secondNotFirst };
-    }
-
-    private void overwrite(
-            final ObjectLayoutMetadata metadata,
-            final Map<String, OneToOneAssociation> oneToOneAssociationById,
-            final Map<String, OneToManyAssociation> oneToManyAssociationById,
-            final Map<String, ObjectAction> objectActionById) {
-
-        metadata.visit(new ObjectLayoutMetadata.VisitorAdapter() {
-            private final Map<String, int[]> propertySequenceByGroup = Maps.newHashMap();
-            private int collectionSequence = 1;
-            private int actionDomainObjectSequence = 1;
-            private int actionPropertyGroupSequence = 1;
-            private int actionPropertySequence = 1;
-            private int actionCollectionSequence = 1;
-
-            @Override
-            public void visit(final ActionLayoutMetadata actionLayoutMetadata) {
-                final ActionHolder actionHolder = actionLayoutMetadata.getOwner();
-                final ObjectAction objectAction = objectActionById.get(actionLayoutMetadata.getId());
-                if(objectAction == null) {
-                    return;
-                }
-
-                final String memberOrderName;
-                final int memberOrderSequence;
-                if(actionHolder instanceof PropertyGroup) {
-                    final PropertyGroup propertyGroup = (PropertyGroup) actionHolder;
-                    final List<PropertyLayoutMetadata> properties = propertyGroup.getProperties();
-                    final PropertyLayoutMetadata propertyLayoutMetadata = properties.get(0); // any will do
-                    memberOrderName = propertyLayoutMetadata.getId();
-                    memberOrderSequence = actionPropertyGroupSequence++;
-                } else if(actionHolder instanceof PropertyLayoutMetadata) {
-                    final PropertyLayoutMetadata propertyLayoutMetadata = (PropertyLayoutMetadata) actionHolder;
-                    memberOrderName = propertyLayoutMetadata.getId();
-                    memberOrderSequence = actionPropertySequence++;
-                } else if(actionHolder instanceof CollectionLayoutMetadata) {
-                    final CollectionLayoutMetadata collectionLayoutMetadata = (CollectionLayoutMetadata) actionHolder;
-                    memberOrderName = collectionLayoutMetadata.getId();
-                    memberOrderSequence = actionCollectionSequence++;
-                } else {
-                    // DomainObject
-                    memberOrderName = null;
-                    memberOrderSequence = actionDomainObjectSequence++;
-                }
-                FacetUtil.addFacet(
-                        new MemberOrderFacetXml(memberOrderName, ""+memberOrderSequence, translationService, objectAction));
-
-
-                if(actionHolder instanceof PropertyGroup) {
-                    if(actionLayoutMetadata.getPosition() == null ||
-                            actionLayoutMetadata.getPosition() == org.apache.isis.applib.annotation.ActionLayout.Position.BELOW ||
-                            actionLayoutMetadata.getPosition() == org.apache.isis.applib.annotation.ActionLayout.Position.RIGHT) {
-                        actionLayoutMetadata.setPosition(org.apache.isis.applib.annotation.ActionLayout.Position.PANEL);
-                    }
-                } else if(actionHolder instanceof PropertyLayoutMetadata) {
-                    if(actionLayoutMetadata.getPosition() == null ||
-                            actionLayoutMetadata.getPosition() == org.apache.isis.applib.annotation.ActionLayout.Position.PANEL_DROPDOWN ||
-                            actionLayoutMetadata.getPosition() == org.apache.isis.applib.annotation.ActionLayout.Position.PANEL) {
-                        actionLayoutMetadata.setPosition(org.apache.isis.applib.annotation.ActionLayout.Position.BELOW);
-                    }
-                } else {
-                    // doesn't do anything for DomainObject or Collection
-                    actionLayoutMetadata.setPosition(null);
-                }
-
-                FacetUtil.addFacet(ActionPositionFacetForActionXml.create(actionLayoutMetadata, objectAction));
-                FacetUtil.addFacet(BookmarkPolicyFacetForActionXml.create(actionLayoutMetadata, objectAction));
-                FacetUtil.addFacet(CssClassFacetForActionXml.create(actionLayoutMetadata, objectAction));
-                FacetUtil.addFacet(CssClassFaFacetForActionXml.create(actionLayoutMetadata, objectAction));
-                FacetUtil.addFacet(DescribedAsFacetForActionXml.create(actionLayoutMetadata, objectAction));
-                FacetUtil.addFacet(HiddenFacetForActionLayoutXml.create(actionLayoutMetadata, objectAction));
-                FacetUtil.addFacet(NamedFacetForActionXml.create(actionLayoutMetadata, objectAction));
-            }
-
-            @Override
-            public void visit(final PropertyLayoutMetadata propertyLayoutMetadata) {
-                final OneToOneAssociation oneToOneAssociation = oneToOneAssociationById.get(propertyLayoutMetadata.getId());
-                if(oneToOneAssociation == null) {
-                    return;
-                }
-
-                FacetUtil.addFacet(CssClassFacetForPropertyXml.create(propertyLayoutMetadata, oneToOneAssociation));
-                FacetUtil.addFacet(DescribedAsFacetForPropertyXml.create(propertyLayoutMetadata, oneToOneAssociation));
-                FacetUtil.addFacet(HiddenFacetForPropertyXml.create(propertyLayoutMetadata, oneToOneAssociation));
-                FacetUtil.addFacet(LabelAtFacetForPropertyXml.create(propertyLayoutMetadata, oneToOneAssociation));
-                FacetUtil.addFacet(MultiLineFacetForPropertyXml.create(propertyLayoutMetadata, oneToOneAssociation));
-                FacetUtil.addFacet(NamedFacetForPropertyXml.create(propertyLayoutMetadata, oneToOneAssociation));
-                FacetUtil.addFacet(RenderedAdjustedFacetForPropertyXml.create(propertyLayoutMetadata, oneToOneAssociation));
-                FacetUtil.addFacet(TypicalLengthFacetForPropertyXml.create(propertyLayoutMetadata, oneToOneAssociation));
-
-                // @MemberOrder#name based on owning property group, @MemberOrder#sequence monotonically increasing
-                final PropertyGroup propertyGroup = propertyLayoutMetadata.getOwner();
-                final String groupName = propertyGroup.getName();
-                final String sequence = nextInSequenceFor(groupName, propertySequenceByGroup);
-                FacetUtil.addFacet(
-                        new MemberOrderFacetXml(groupName, sequence, translationService, oneToOneAssociation));
-            }
-
-            @Override
-            public void visit(final CollectionLayoutMetadata collectionLayoutMetadata) {
-                final OneToManyAssociation oneToManyAssociation = oneToManyAssociationById.get(collectionLayoutMetadata.getId());
-                if(oneToManyAssociation == null) {
-                    return;
-                }
-
-                FacetUtil.addFacet(CssClassFacetForCollectionXml.create(collectionLayoutMetadata, oneToManyAssociation));
-                FacetUtil.addFacet(DefaultViewFacetForCollectionXml.create(collectionLayoutMetadata, oneToManyAssociation));
-                FacetUtil.addFacet(DescribedAsFacetForCollectionXml.create(collectionLayoutMetadata, oneToManyAssociation));
-                FacetUtil.addFacet(HiddenFacetForCollectionXml.create(collectionLayoutMetadata, oneToManyAssociation));
-                FacetUtil.addFacet(NamedFacetForCollectionXml.create(collectionLayoutMetadata, oneToManyAssociation));
-                FacetUtil.addFacet(PagedFacetForCollectionXml.create(collectionLayoutMetadata, oneToManyAssociation));
-                FacetUtil.addFacet(SortedByFacetForCollectionXml.create(collectionLayoutMetadata, oneToManyAssociation));
-
-                // @MemberOrder#name based on the collection's id (so that each has a single "member group")
-                final String groupName = collectionLayoutMetadata.getId();
-                final String sequence = "" + collectionSequence++;
-                FacetUtil.addFacet(
-                        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 Column column = collectionLayoutMetadata.getOwner();
-                final ColumnHolder holder = column.getOwner();
-                if(holder instanceof Tab) {
-                    final Tab tab = (Tab) holder;
-                    if(tab.getContents().size() == 1) {
-                        final String collectionName = oneToManyAssociation.getName();
-                        tab.setName(collectionName);
-                    }
-                }
-            }
-
-            private 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];
-                }
-            }
-        });
-    }
-
-    private static List<OneToOneAssociation> getOneToOneAssociations(final ObjectSpecification objectSpec) {
-        List associations = objectSpec
-                .getAssociations(Contributed.INCLUDED, ObjectAssociation.Filters.PROPERTIES);
-        return associations;
-    }
-    private static List<OneToManyAssociation> getOneToManyAssociations(final ObjectSpecification objectSpec) {
-        List associations = objectSpec
-                .getAssociations(Contributed.INCLUDED, ObjectAssociation.Filters.COLLECTIONS);
-        return associations;
-    }
-
 
     @Override
     public ObjectLayoutMetadata toMetadata(final Object domainObject) {
@@ -462,16 +103,22 @@ public class ObjectLayoutMetadataServiceDefault
         return facet != null? facet.getMetadata(): null;
     }
 
+    ////////////////////////////////////////////////////////
 
+    private boolean dynamicReloading;
 
-    //region > injected dependencies
-    private DeploymentCategory deploymentCategory;
+    @Override
+    public void toggleDynamicReloading() {
+        this.dynamicReloading = !this.dynamicReloading;
+    }
 
     @Override
-    public void setDeploymentCategory(final DeploymentCategory deploymentCategory) {
-        this.deploymentCategory = deploymentCategory;
+    public boolean isDynamicReloading() {
+        return this.dynamicReloading;
     }
 
+    //region > injected dependencies
+
     private SpecificationLoader specificationLookup;
 
     @Override
@@ -479,12 +126,9 @@ public class ObjectLayoutMetadataServiceDefault
         this.specificationLookup = specificationLookup;
     }
 
-
     @Inject
     JaxbService jaxbService;
 
-    @Inject
-    TranslationService translationService;
 
     //endregion
 

http://git-wip-us.apache.org/repos/asf/isis/blob/47f4aea4/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 fadfae2..900ecc3 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
@@ -132,6 +132,50 @@ public class MetadataMenu implements SpecificationLoaderSpiAware {
 
     // //////////////////////////////////////
 
+    public static class SwitchOnDynamicReloadingOfLayoutsDomainEvent extends ActionDomainEvent {
+    }
+
+    @Action(
+            domainEvent = SwitchOnDynamicReloadingOfLayoutsDomainEvent.class,
+            semantics = SemanticsOf.SAFE,
+            restrictTo = RestrictTo.PROTOTYPING
+    )
+    @ActionLayout(
+            cssClassFa = "fa-check"
+    )
+    @MemberOrder(sequence="500.400.2")
+    public void switchOnDynamicReloadingOfLayouts() {
+        objectLayoutMetadataService.toggleDynamicReloading();
+    }
+    public boolean hideSwitchOnDynamicReloadingOfLayouts() {
+        return objectLayoutMetadataService.isDynamicReloading();
+    }
+
+    // //////////////////////////////////////
+
+    public static class SwitchOffDynamicReloadingOfLayoutsDomainEvent extends ActionDomainEvent {
+    }
+
+    @Action(
+            domainEvent = SwitchOffDynamicReloadingOfLayoutsDomainEvent.class,
+            semantics = SemanticsOf.SAFE,
+            restrictTo = RestrictTo.PROTOTYPING
+    )
+    @ActionLayout(
+            cssClassFa = "fa-times"
+    )
+    @MemberOrder(sequence="500.400.3")
+    public void switchOffDynamicReloadingOfLayouts() {
+        objectLayoutMetadataService.toggleDynamicReloading();
+    }
+    public boolean hideSwitchOffDynamicReloadingOfLayouts() {
+        return !objectLayoutMetadataService.isDynamicReloading();
+    }
+
+
+
+    // //////////////////////////////////////
+
     @Inject
     ObjectLayoutMetadataService objectLayoutMetadataService;
 
@@ -146,5 +190,4 @@ public class MetadataMenu implements SpecificationLoaderSpiAware {
         this.specificationLoader = specificationLoader;
     }
 
-
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/isis/blob/47f4aea4/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 e4abde8..5f4c0d1 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
@@ -33,6 +33,8 @@ import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
 import org.apache.isis.applib.AppManifest;
+import org.apache.isis.applib.annotation.DomainService;
+import org.apache.isis.applib.annotation.NatureOfService;
 import org.apache.isis.core.commons.components.ApplicationScopedComponent;
 import org.apache.isis.core.commons.config.IsisConfiguration;
 import org.apache.isis.core.commons.debug.DebugBuilder;
@@ -256,7 +258,12 @@ public final class ObjectReflectorDefault
 
     private void loadSpecificationsForServices() {
         for (final Class<?> serviceClass : getServiceClasses()) {
-            internalLoadSpecification(serviceClass);
+            final DomainService domainService = serviceClass.getAnnotation(DomainService.class);
+            if(domainService != null) {
+                if(domainService.nature() == NatureOfService.VIEW || domainService.nature() == NatureOfService.VIEW_CONTRIBUTIONS_ONLY) {
+                    internalLoadSpecification(serviceClass);
+                }
+            }
         }
     }
 
@@ -515,6 +522,7 @@ public final class ObjectReflectorDefault
         facetDecoratorSet.decorate(specSpi);
         specSpi.updateFromFacetValues();
         specSpi.setIntrospectionState(IntrospectionState.INTROSPECTED);
+
     }
 
     @Override

http://git-wip-us.apache.org/repos/asf/isis/blob/47f4aea4/core/metamodel/src/main/java/org/apache/isis/core/metamodel/specloader/specimpl/FacetedMethodsBuilder.java
----------------------------------------------------------------------
diff --git a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/specloader/specimpl/FacetedMethodsBuilder.java b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/specloader/specimpl/FacetedMethodsBuilder.java
index 9628a34..a6e71df 100644
--- a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/specloader/specimpl/FacetedMethodsBuilder.java
+++ b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/specloader/specimpl/FacetedMethodsBuilder.java
@@ -49,6 +49,7 @@ import org.apache.isis.core.metamodel.facets.FacetedMethod;
 import org.apache.isis.core.metamodel.facets.FacetedMethodParameter;
 import org.apache.isis.core.metamodel.facets.actcoll.typeof.TypeOfFacet;
 import org.apache.isis.core.metamodel.facets.object.facets.FacetsFacet;
+import org.apache.isis.core.metamodel.facets.object.layoutmetadata.ObjectLayoutMetadataFacet;
 import org.apache.isis.core.metamodel.layoutmetadata.LayoutMetadataReader;
 import org.apache.isis.core.metamodel.layoutmetadata.LayoutMetadataReader.ReaderException;
 import org.apache.isis.core.metamodel.layoutmetadata.LayoutMetadataReader2;
@@ -189,13 +190,14 @@ public class FacetedMethodsBuilder {
 
 
     public Properties introspectClass() {
-        if (LOG.isDebugEnabled()) {
-            LOG.debug("introspecting " + getClassName() + ": class-level details");
+        if (LOG.isInfoEnabled()) {
+            LOG.info("introspecting " + getClassName() + ": class-level details");
         }
 
         // process facets at object level
         // this will also remove some methods, such as the superclass methods.
 
+        final ObjectLayoutMetadataFacet facet = spec.getFacet(ObjectLayoutMetadataFacet.class);
         final Properties metadataProperties = readMetadataProperties(introspectedClass);
 
         getFacetProcessor().process(introspectedClass, metadataProperties, methodRemover, spec);

http://git-wip-us.apache.org/repos/asf/isis/blob/47f4aea4/core/metamodel/src/main/java/org/apache/isis/core/metamodel/specloader/specimpl/ObjectActionContributee.java
----------------------------------------------------------------------
diff --git a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/specloader/specimpl/ObjectActionContributee.java b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/specloader/specimpl/ObjectActionContributee.java
index 5aa6444..070a88d 100644
--- a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/specloader/specimpl/ObjectActionContributee.java
+++ b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/specloader/specimpl/ObjectActionContributee.java
@@ -22,6 +22,9 @@ import java.util.List;
 
 import com.google.common.collect.Lists;
 
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
 import org.apache.isis.applib.Identifier;
 import org.apache.isis.applib.annotation.Bulk;
 import org.apache.isis.applib.annotation.InvokedOn;

http://git-wip-us.apache.org/repos/asf/isis/blob/47f4aea4/core/metamodel/src/main/java/org/apache/isis/core/metamodel/specloader/specimpl/dflt/ObjectSpecificationDefault.java
----------------------------------------------------------------------
diff --git a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/specloader/specimpl/dflt/ObjectSpecificationDefault.java b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/specloader/specimpl/dflt/ObjectSpecificationDefault.java
index 071f760..afd556e 100644
--- a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/specloader/specimpl/dflt/ObjectSpecificationDefault.java
+++ b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/specloader/specimpl/dflt/ObjectSpecificationDefault.java
@@ -176,6 +176,8 @@ public class ObjectSpecificationDefault extends ObjectSpecificationAbstract impl
             sortCacheAndUpdateActions(actions);
         }
 
+
+
         if(isNotIntrospected()) {
             facetedMethodsBuilder.introspectClassPostProcessing(metadataProperties);    
         }

http://git-wip-us.apache.org/repos/asf/isis/blob/47f4aea4/core/metamodel/src/test/java/org/apache/isis/core/metamodel/layoutxml/v1_0/ObjectLayoutMetadataTest.java
----------------------------------------------------------------------
diff --git a/core/metamodel/src/test/java/org/apache/isis/core/metamodel/layoutxml/v1_0/ObjectLayoutMetadataTest.java b/core/metamodel/src/test/java/org/apache/isis/core/metamodel/layoutxml/v1_0/ObjectLayoutMetadataTest.java
index 73df1fb..c5e8c1b 100644
--- a/core/metamodel/src/test/java/org/apache/isis/core/metamodel/layoutxml/v1_0/ObjectLayoutMetadataTest.java
+++ b/core/metamodel/src/test/java/org/apache/isis/core/metamodel/layoutxml/v1_0/ObjectLayoutMetadataTest.java
@@ -77,8 +77,9 @@ public class ObjectLayoutMetadataTest {
         left.getCollections().add(similarToColl);
         similarToColl.setId("similarTo");
 
-        PropertyLayoutMetadata namePropertyLayoutMetadata = leftPropGroup.getProperties().get(0);
-        namePropertyLayoutMetadata.setId("name");
+        left.getPropertyGroups().add(new PropertyGroup("General"));
+        PropertyLayoutMetadata namePropertyLayoutMetadata = new PropertyLayoutMetadata("name");
+        left.getPropertyGroups().get(0).getProperties().add(namePropertyLayoutMetadata);
 
         ActionLayoutMetadata updateNameActionLayoutMetadata = new ActionLayoutMetadata();
         updateNameActionLayoutMetadata.setId("updateName");

http://git-wip-us.apache.org/repos/asf/isis/blob/47f4aea4/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 bebb67c..559e110 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
@@ -126,11 +126,14 @@ public class EntityModel extends BookmarkableModel<ObjectAdapter> {
         VIEW, EDIT;
     }
 
+    private final Map<PropertyMemento, ScalarModel> propertyScalarModels;
     private ObjectAdapterMemento adapterMemento;
+    private ObjectAdapterMemento contextAdapterIfAny;
+
     private Mode mode = Mode.VIEW;
     private RenderingHint renderingHint = RenderingHint.REGULAR;
-    private final Map<PropertyMemento, ScalarModel> propertyScalarModels = Maps.newHashMap();
     private Hint hint;
+    private final PendingModel pendingModel;
 
     /**
      * Toggled by 'entityDetailsButton'.
@@ -149,7 +152,7 @@ public class EntityModel extends BookmarkableModel<ObjectAdapter> {
     // //////////////////////////////////////////////////////////
 
     public EntityModel() {
-        pendingModel = new PendingModel(this);
+        this((ObjectAdapterMemento)null);
     }
 
     public EntityModel(final PageParameters pageParameters) {
@@ -162,8 +165,13 @@ public class EntityModel extends BookmarkableModel<ObjectAdapter> {
     }
 
     public EntityModel(final ObjectAdapterMemento adapterMemento) {
+        this(adapterMemento, Maps.<PropertyMemento, ScalarModel>newHashMap());
+    }
+
+    public EntityModel(final ObjectAdapterMemento adapterMemento, final Map<PropertyMemento, ScalarModel> propertyScalarModels) {
         this.adapterMemento = adapterMemento;
         this.pendingModel = new PendingModel(this);
+        this.propertyScalarModels = propertyScalarModels;
     }
 
     public static String oidStr(final PageParameters pageParameters) {
@@ -608,8 +616,6 @@ public class EntityModel extends BookmarkableModel<ObjectAdapter> {
         }
     }
     
-    private final PendingModel pendingModel;
-    private ObjectAdapterMemento contextAdapterIfAny;
 
     public ObjectAdapter getPendingElseCurrentAdapter() {
         return pendingModel.getPendingElseCurrentAdapter();
@@ -642,19 +648,27 @@ public class EntityModel extends BookmarkableModel<ObjectAdapter> {
         return tabMetadata;
     }
 
-    public EntityModel withTabMetadata(final Tab tabMetadata) {
-        this.tabMetadata = tabMetadata;
-        return this;
+    /**
+     * Returns a new copy that SHARES the property scalar models (for edit form).
+     */
+    public EntityModel cloneWithTabMetadata(final Tab tabMetadata) {
+        final EntityModel entityModel = new EntityModel(this.adapterMemento, this.propertyScalarModels);
+        entityModel.tabMetadata = tabMetadata;
+        return entityModel;
     }
 
 
     private Column columnMetadata;
     private Column.Hint columnHint;
 
-    public EntityModel withColumnMetadata(final Column columnMetadata, final Column.Hint columnHint) {
-        this.columnMetadata = columnMetadata;
-        this.columnHint = columnHint;
-        return this;
+    /**
+     * Returns a new copy that SHARES the property scalar models (for edit form).
+     */
+    public EntityModel cloneWithColumnMetadata(final Column columnMetadata, final Column.Hint columnHint) {
+        final EntityModel entityModel = new EntityModel(this.adapterMemento, this.propertyScalarModels);
+        entityModel.columnMetadata = columnMetadata;
+        entityModel.columnHint = columnHint;
+        return entityModel;
     }
 
     public Column getColumnMetadata() {

http://git-wip-us.apache.org/repos/asf/isis/blob/47f4aea4/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/combined/EntityCombinedPanelFactory.java
----------------------------------------------------------------------
diff --git a/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/combined/EntityCombinedPanelFactory.java b/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/combined/EntityCombinedPanelFactory.java
index 32c0900..004ba23 100644
--- a/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/combined/EntityCombinedPanelFactory.java
+++ b/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/combined/EntityCombinedPanelFactory.java
@@ -22,8 +22,6 @@ package org.apache.isis.viewer.wicket.ui.components.entity.combined;
 import org.apache.wicket.Component;
 import org.apache.wicket.model.IModel;
 
-import org.apache.isis.core.metamodel.facets.object.layoutmetadata.ObjectLayoutMetadataFacet;
-import org.apache.isis.core.metamodel.spec.ObjectSpecification;
 import org.apache.isis.viewer.wicket.model.models.EntityModel;
 import org.apache.isis.viewer.wicket.ui.ComponentFactory;
 import org.apache.isis.viewer.wicket.ui.ComponentType;
@@ -44,14 +42,11 @@ public class EntityCombinedPanelFactory extends EntityComponentFactoryAbstract {
 
     @Override
     protected ApplicationAdvice doAppliesTo(final EntityModel entityModel) {
-        final ObjectSpecification specification = entityModel.getTypeOfSpecification();
-        // opposite to the EntityTabbedPanelFactory
-        return appliesIf(!specification.containsDoOpFacet(ObjectLayoutMetadataFacet.class));
+        return appliesIf(false); // TODO: remove
     }
 
     @Override
     public Component createComponent(final String id, final IModel<?> model) {
-        final EntityModel entityModel = (EntityModel) model;
-        return new EntityCombinedPanel(id, entityModel);
+        throw new IllegalStateException("shouldn't be called"); // TODO: remove
     }
 }

http://git-wip-us.apache.org/repos/asf/isis/blob/47f4aea4/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/properties/EntityColumnMembers.java
----------------------------------------------------------------------
diff --git a/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/properties/EntityColumnMembers.java b/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/properties/EntityColumnMembers.java
index 3e0cd3f..a294969 100644
--- a/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/properties/EntityColumnMembers.java
+++ b/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/properties/EntityColumnMembers.java
@@ -73,14 +73,13 @@ public class EntityColumnMembers extends PanelAbstract<EntityModel> {
             final Component owningPanel) {
 
         super(id, entityModel);
-        this.owningPanel = owningPanel; // for repainting
+        this.owningPanel = owningPanel; // for repainting, perhaps
 
         buildGui();
     }
 
     private void buildGui() {
-        final EntityModel entityModel = (EntityModel) getModel();
-        addPropertiesAndCollections(this, entityModel);
+        addPropertiesAndCollections(this, getModel());
     }
 
     private void addPropertiesAndCollections(

http://git-wip-us.apache.org/repos/asf/isis/blob/47f4aea4/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/properties/EntityPropertiesForm.java
----------------------------------------------------------------------
diff --git a/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/properties/EntityPropertiesForm.java b/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/properties/EntityPropertiesForm.java
index 24837b6..31c54a1 100644
--- a/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/properties/EntityPropertiesForm.java
+++ b/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/properties/EntityPropertiesForm.java
@@ -238,9 +238,7 @@ public class EntityPropertiesForm extends FormAbstract<ObjectAdapter> implements
             final Hint hint) {
         final Column columnMetaDataIfAny = hint.from(tabMetaDataIfAny);
 
-        final EntityModel entityModelWithHints =
-                new EntityModel(entityModel.getPageParameters())
-                        .withColumnMetadata(columnMetaDataIfAny, hint);
+        final EntityModel entityModelWithHints = entityModel.cloneWithColumnMetadata(columnMetaDataIfAny, hint);
 
         final EntityColumnMembers columnMembers =
                 new EntityColumnMembers("entityMembers", entityModelWithHints, markupContainer);


[39/50] [abbrv] isis git commit: ISIS-993: pretty much there on deriving and syncing the metamodel with the layout.xml info;

Posted by da...@apache.org.
http://git-wip-us.apache.org/repos/asf/isis/blob/4a8ff11b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/properties/propertylayout/DescribedAsFacetForPropertyLayoutXml.java
----------------------------------------------------------------------
diff --git a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/properties/propertylayout/DescribedAsFacetForPropertyLayoutXml.java b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/properties/propertylayout/DescribedAsFacetForPropertyLayoutXml.java
new file mode 100644
index 0000000..d36dfa9
--- /dev/null
+++ b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/properties/propertylayout/DescribedAsFacetForPropertyLayoutXml.java
@@ -0,0 +1,43 @@
+/*
+ *  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.facets.properties.propertylayout;
+
+import com.google.common.base.Strings;
+
+import org.apache.isis.applib.layout.v1_0.PropertyLayout;
+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;
+
+public class DescribedAsFacetForPropertyLayoutXml extends DescribedAsFacetAbstract {
+
+    public static DescribedAsFacet create(PropertyLayout propertyLayout, FacetHolder holder) {
+        if(propertyLayout == null) {
+            return null;
+        }
+        final String describedAs = Strings.emptyToNull(propertyLayout.getDescribedAs());
+        return describedAs != null ? new DescribedAsFacetForPropertyLayoutXml(describedAs, holder) : null;
+    }
+
+    private DescribedAsFacetForPropertyLayoutXml(String value, FacetHolder holder) {
+        super(value, holder);
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/isis/blob/4a8ff11b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/properties/propertylayout/HiddenFacetForPropertyLayoutXml.java
----------------------------------------------------------------------
diff --git a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/properties/propertylayout/HiddenFacetForPropertyLayoutXml.java b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/properties/propertylayout/HiddenFacetForPropertyLayoutXml.java
new file mode 100644
index 0000000..7a93898
--- /dev/null
+++ b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/properties/propertylayout/HiddenFacetForPropertyLayoutXml.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.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.v1_0.PropertyLayout;
+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;
+import org.apache.isis.core.metamodel.facets.members.hidden.HiddenFacetAbstract;
+
+public class HiddenFacetForPropertyLayoutXml extends HiddenFacetAbstract {
+
+    public static HiddenFacet create(final PropertyLayout propertyLayout, final FacetHolder holder) {
+        if (propertyLayout == null) {
+            return null;
+        }
+        final Where where = propertyLayout.getHidden();
+        return where != null && where != Where.NOT_SPECIFIED ? new HiddenFacetForPropertyLayoutXml(where, holder) : null;
+    }
+
+    private HiddenFacetForPropertyLayoutXml(final Where where, final FacetHolder holder) {
+        super(HiddenFacetForPropertyLayoutXml.class, When.ALWAYS, where, holder);
+    }
+
+    @Override
+    public String hiddenReason(final ObjectAdapter targetAdapter, final Where whereContext) {
+        if(!where().includes(whereContext)) {
+            return null;
+        }
+        return "Hidden on " + where().getFriendlyName();
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/isis/blob/4a8ff11b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/properties/propertylayout/LabelAtFacetForPropertyLayoutXml.java
----------------------------------------------------------------------
diff --git a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/properties/propertylayout/LabelAtFacetForPropertyLayoutXml.java b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/properties/propertylayout/LabelAtFacetForPropertyLayoutXml.java
new file mode 100644
index 0000000..c8a84d0
--- /dev/null
+++ b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/properties/propertylayout/LabelAtFacetForPropertyLayoutXml.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.core.metamodel.facets.properties.propertylayout;
+
+import org.apache.isis.applib.annotation.LabelPosition;
+import org.apache.isis.applib.layout.v1_0.PropertyLayout;
+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;
+
+public class LabelAtFacetForPropertyLayoutXml extends LabelAtFacetAbstract {
+
+    public static LabelAtFacet create(final PropertyLayout propertyLayout, FacetHolder holder) {
+        if (propertyLayout == null) {
+            return null;
+        }
+        final LabelPosition labelPosition = propertyLayout.getLabelPosition();
+        return labelPosition != null ? new LabelAtFacetForPropertyLayoutXml(labelPosition, holder) : null;
+    }
+
+    private LabelAtFacetForPropertyLayoutXml(final LabelPosition value, final FacetHolder holder) {
+        super(value, holder);
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/isis/blob/4a8ff11b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/properties/propertylayout/MultiLineFacetForPropertyLayoutXml.java
----------------------------------------------------------------------
diff --git a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/properties/propertylayout/MultiLineFacetForPropertyLayoutXml.java b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/properties/propertylayout/MultiLineFacetForPropertyLayoutXml.java
new file mode 100644
index 0000000..072f287
--- /dev/null
+++ b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/properties/propertylayout/MultiLineFacetForPropertyLayoutXml.java
@@ -0,0 +1,41 @@
+/*
+ *  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.facets.properties.propertylayout;
+
+import org.apache.isis.applib.layout.v1_0.PropertyLayout;
+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;
+
+public class MultiLineFacetForPropertyLayoutXml extends MultiLineFacetAbstract {
+
+    public static MultiLineFacet create(PropertyLayout propertyLayout, FacetHolder holder) {
+        if(propertyLayout == null) {
+            return null;
+        }
+        final Integer multiLine = propertyLayout.getMultiLine();
+        return multiLine != null && multiLine > 1 ? new MultiLineFacetForPropertyLayoutXml(multiLine, false, holder) : null;
+    }
+
+    private MultiLineFacetForPropertyLayoutXml(int numberOfLines, boolean preventWrapping, FacetHolder holder) {
+        super(numberOfLines, preventWrapping, holder);
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/isis/blob/4a8ff11b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/properties/propertylayout/NamedFacetForPropertyLayoutXml.java
----------------------------------------------------------------------
diff --git a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/properties/propertylayout/NamedFacetForPropertyLayoutXml.java b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/properties/propertylayout/NamedFacetForPropertyLayoutXml.java
new file mode 100644
index 0000000..0f0e9b7
--- /dev/null
+++ b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/properties/propertylayout/NamedFacetForPropertyLayoutXml.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.core.metamodel.facets.properties.propertylayout;
+
+import com.google.common.base.Strings;
+
+import org.apache.isis.applib.layout.v1_0.PropertyLayout;
+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;
+
+public class NamedFacetForPropertyLayoutXml extends NamedFacetAbstract {
+
+    public static NamedFacet create(PropertyLayout propertyLayout, FacetHolder holder) {
+        if(propertyLayout == null) {
+            return null;
+        }
+        final String named = Strings.emptyToNull(propertyLayout.getNamed());
+        final Boolean escaped = propertyLayout.getNamedEscaped();
+        return named != null ? new NamedFacetForPropertyLayoutXml(named, (escaped == null || escaped), holder) : null;
+    }
+
+    private NamedFacetForPropertyLayoutXml(
+        final String value,
+        final boolean escaped,
+        final FacetHolder holder) {
+
+        super(value, escaped, holder);
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/isis/blob/4a8ff11b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/properties/propertylayout/RenderedAdjustedFacetForPropertyLayoutXml.java
----------------------------------------------------------------------
diff --git a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/properties/propertylayout/RenderedAdjustedFacetForPropertyLayoutXml.java b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/properties/propertylayout/RenderedAdjustedFacetForPropertyLayoutXml.java
new file mode 100644
index 0000000..0ceab99
--- /dev/null
+++ b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/properties/propertylayout/RenderedAdjustedFacetForPropertyLayoutXml.java
@@ -0,0 +1,43 @@
+/*
+ *  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.facets.properties.propertylayout;
+
+import org.apache.isis.applib.layout.v1_0.PropertyLayout;
+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;
+
+public class RenderedAdjustedFacetForPropertyLayoutXml extends RenderedAdjustedFacetAbstract {
+
+    public static RenderedAdjustedFacet create(final PropertyLayout propertyLayout, FacetHolder holder) {
+        if(propertyLayout == null) {
+            return null;
+        }
+        final Boolean renderedAsDayBefore = propertyLayout.getRenderedAsDayBefore();
+        return renderedAsDayBefore != null && renderedAsDayBefore ? new RenderedAdjustedFacetForPropertyLayoutXml(holder) : null;
+    }
+
+    public static final int ADJUST_BY = -1;
+
+    private RenderedAdjustedFacetForPropertyLayoutXml(FacetHolder holder) {
+        super(ADJUST_BY, holder);
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/isis/blob/4a8ff11b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/properties/propertylayout/TypicalLengthFacetForPropertyLayoutXml.java
----------------------------------------------------------------------
diff --git a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/properties/propertylayout/TypicalLengthFacetForPropertyLayoutXml.java b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/properties/propertylayout/TypicalLengthFacetForPropertyLayoutXml.java
new file mode 100644
index 0000000..5d51ce9
--- /dev/null
+++ b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/properties/propertylayout/TypicalLengthFacetForPropertyLayoutXml.java
@@ -0,0 +1,49 @@
+/*
+ *  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.facets.properties.propertylayout;
+
+import org.apache.isis.applib.layout.v1_0.PropertyLayout;
+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;
+
+public class TypicalLengthFacetForPropertyLayoutXml extends TypicalLengthFacetAbstract {
+
+    public static TypicalLengthFacet create(PropertyLayout propertyLayout, FacetHolder holder) {
+        if(propertyLayout == null) {
+            return null;
+        }
+        final Integer typicalLength = propertyLayout.getTypicalLength();
+        return typicalLength != null && typicalLength != -1 ? new TypicalLengthFacetForPropertyLayoutXml(typicalLength, holder) : null;
+    }
+
+    private final int typicalLength;
+
+    private TypicalLengthFacetForPropertyLayoutXml(int typicalLength, FacetHolder holder) {
+        super(holder, Derivation.NOT_DERIVED);
+        this.typicalLength = typicalLength;
+    }
+
+    @Override
+    public int value() {
+        return typicalLength;
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/isis/blob/4a8ff11b/core/metamodel/src/test/java/org/apache/isis/core/metamodel/facets/object/layoutxml/LayoutXmlFacetDefaultTest.java
----------------------------------------------------------------------
diff --git a/core/metamodel/src/test/java/org/apache/isis/core/metamodel/facets/object/layoutxml/LayoutXmlFacetDefaultTest.java b/core/metamodel/src/test/java/org/apache/isis/core/metamodel/facets/object/layoutxml/LayoutXmlFacetDefaultTest.java
new file mode 100644
index 0000000..4a843bd
--- /dev/null
+++ b/core/metamodel/src/test/java/org/apache/isis/core/metamodel/facets/object/layoutxml/LayoutXmlFacetDefaultTest.java
@@ -0,0 +1,60 @@
+/*
+ *  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.facets.object.layoutxml;
+
+import java.util.concurrent.atomic.AtomicReference;
+
+import org.junit.Test;
+
+import org.apache.isis.applib.layout.v1_0.PropertyGroup;
+
+import static org.hamcrest.CoreMatchers.is;
+import static org.hamcrest.CoreMatchers.nullValue;
+import static org.junit.Assert.assertThat;
+
+public class LayoutXmlFacetDefaultTest {
+
+    @Test
+    public void xxx() throws Exception {
+
+        final AtomicReference<PropertyGroup> x = new AtomicReference<>();
+
+        PropertyGroup firstValue = new PropertyGroup();
+        PropertyGroup otherValue = new PropertyGroup();
+
+        assertThat(x.get(), is(nullValue()));
+
+        boolean b = x.compareAndSet(null, firstValue);
+        assertThat(b, is(true));
+        assertThat(x.get(), is(firstValue));
+
+        boolean b2 = x.compareAndSet(null, firstValue);
+        assertThat(b2, is(false));
+        assertThat(x.get(), is(firstValue));
+
+        boolean b3 = x.compareAndSet(null, otherValue);
+        assertThat(b3, is(false));
+        assertThat(x.get(), is(firstValue));
+
+        boolean b4 = x.compareAndSet(firstValue, otherValue);
+        assertThat(b4, is(true));
+        assertThat(x.get(), is(otherValue));
+
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/isis/blob/4a8ff11b/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/tabbed/EntityTabbedPanel.html
----------------------------------------------------------------------
diff --git a/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/tabbed/EntityTabbedPanel.html b/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/tabbed/EntityTabbedPanel.html
index add01ab..8165722 100644
--- a/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/tabbed/EntityTabbedPanel.html
+++ b/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/tabbed/EntityTabbedPanel.html
@@ -21,6 +21,8 @@
 <body>
 <wicket:panel>
 	<div class="entityTabbed">
+		<div wicket:id="entitySummary"></div>
+		<div wicket:id="entityPropertiesAndCollections"></div>
 	</div>
 </wicket:panel>
 </body>

http://git-wip-us.apache.org/repos/asf/isis/blob/4a8ff11b/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/tabbed/EntityTabbedPanel.java
----------------------------------------------------------------------
diff --git a/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/tabbed/EntityTabbedPanel.java b/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/tabbed/EntityTabbedPanel.java
index 0f23e3b..c1e37cd 100644
--- a/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/tabbed/EntityTabbedPanel.java
+++ b/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/tabbed/EntityTabbedPanel.java
@@ -19,9 +19,12 @@
 
 package org.apache.isis.viewer.wicket.ui.components.entity.tabbed;
 
+import org.apache.isis.applib.layout.v1_0.DomainObject;
 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.layoutxml.LayoutXmlFacet;
 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;
 
@@ -50,9 +53,13 @@ public class EntityTabbedPanel extends PanelAbstract<EntityModel> {
             CssClassAppender.appendCssClassTo(this, cssClass);
         }
 
-//        addOrReplace(ComponentType.ENTITY_SUMMARY, model);
-//
-//        getComponentFactoryRegistry().addOrReplaceComponent(this, ID_ENTITY_PROPERTIES_AND_COLLECTIONS, ComponentType.ENTITY_PROPERTIES, model);
+        LayoutXmlFacet layoutXmlFacet = model.getTypeOfSpecification().getFacet(LayoutXmlFacet.class);
+        // force metadata to be derived && synced
+        DomainObject currentlyUnused = layoutXmlFacet.getLayoutMetadata();
+
+        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/4a8ff11b/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 a78df60..b479d1c 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
@@ -11,8 +11,9 @@
                     <property id="name">
                         <actions>
                             <action id="updateName"/>
+                            <action id="downloadJdoMetadata"/>
                         </actions>
-                        <layout/>
+                        <layout labelPosition="TOP" multiLine="5" cssClass="abcde"/>
                     </property>
                 </propertyGroup>
             </left>


[08/50] [abbrv] isis git commit: [maven-release-plugin] prepare release simpleapp-archetype-1.11.1

Posted by da...@apache.org.
[maven-release-plugin] prepare release simpleapp-archetype-1.11.1


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

Branch: refs/heads/ISIS-993
Commit: 54f7ec13c2a8588d974792a43f58df46d86572c2
Parents: b06d913
Author: Dan Haywood <da...@haywood-associates.co.uk>
Authored: Sun Jan 10 15:28:17 2016 +0000
Committer: Dan Haywood <da...@haywood-associates.co.uk>
Committed: Sun Jan 10 15:28:17 2016 +0000

----------------------------------------------------------------------
 example/archetype/simpleapp/pom.xml | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/isis/blob/54f7ec13/example/archetype/simpleapp/pom.xml
----------------------------------------------------------------------
diff --git a/example/archetype/simpleapp/pom.xml b/example/archetype/simpleapp/pom.xml
index 0a92bc9..4d52c33 100644
--- a/example/archetype/simpleapp/pom.xml
+++ b/example/archetype/simpleapp/pom.xml
@@ -17,11 +17,11 @@
   specific language governing permissions and limitations
   under the License.
 -->
-<project xmlns="http://maven.apache.org/POM/4.0.0" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
     <modelVersion>4.0.0</modelVersion>
     <groupId>org.apache.isis.archetype</groupId>
     <artifactId>simpleapp-archetype</artifactId>
-    <version>1.11.0-SNAPSHOT</version>
+    <version>1.11.1</version>
     <packaging>maven-archetype</packaging>
     <name>simpleapp-archetype</name>
     <build>
@@ -47,4 +47,8 @@
         <version>1.11.1</version>
         <relativePath>../../../core/pom.xml</relativePath>
     </parent>
+
+  <scm>
+    <tag>simpleapp-archetype-1.11.1</tag>
+  </scm>
 </project>


[14/50] [abbrv] isis git commit: ISIS-1287: improving logging

Posted by da...@apache.org.
ISIS-1287: improving logging


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

Branch: refs/heads/ISIS-993
Commit: 261f859965384ef6c9d2dc1f22d6175626043702
Parents: e0e5585
Author: Dan Haywood <da...@haywood-associates.co.uk>
Authored: Wed Jan 20 12:56:52 2016 +0000
Committer: Dan Haywood <da...@haywood-associates.co.uk>
Committed: Sat Jan 23 17:34:45 2016 +0000

----------------------------------------------------------------------
 .../wicket/viewer/integration/wicket/WebRequestCycleForIsis.java   | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/isis/blob/261f8599/core/viewer-wicket-impl/src/main/java/org/apache/isis/viewer/wicket/viewer/integration/wicket/WebRequestCycleForIsis.java
----------------------------------------------------------------------
diff --git a/core/viewer-wicket-impl/src/main/java/org/apache/isis/viewer/wicket/viewer/integration/wicket/WebRequestCycleForIsis.java b/core/viewer-wicket-impl/src/main/java/org/apache/isis/viewer/wicket/viewer/integration/wicket/WebRequestCycleForIsis.java
index 5d3c735..603d1e9 100644
--- a/core/viewer-wicket-impl/src/main/java/org/apache/isis/viewer/wicket/viewer/integration/wicket/WebRequestCycleForIsis.java
+++ b/core/viewer-wicket-impl/src/main/java/org/apache/isis/viewer/wicket/viewer/integration/wicket/WebRequestCycleForIsis.java
@@ -179,7 +179,7 @@ public class WebRequestCycleForIsis extends AbstractRequestCycleListener {
                 return new MmvErrorPage(Model.ofList(validationErrors));
             }
             // not sure whether this can ever happen now...
-            LOG.warn("Unable to obtain exceptionRecognizers (no session), will be treated as unrecognized exception");
+            LOG.warn("Unable to obtain exceptionRecognizers (no session), will be treated as unrecognized exception", ex);
         }
         String recognizedMessageIfAny = new ExceptionRecognizerComposite(exceptionRecognizers).recognize(ex);
         ExceptionModel exceptionModel = ExceptionModel.create(recognizedMessageIfAny, ex);


[10/50] [abbrv] isis git commit: ISIS-1287: adding docs to set up toolchains.xml

Posted by da...@apache.org.
ISIS-1287: adding docs to set up toolchains.xml


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

Branch: refs/heads/ISIS-993
Commit: 86a787b64f3a078ee6ce847f78be0426695da495
Parents: dab4fca
Author: Dan Haywood <da...@haywood-associates.co.uk>
Authored: Fri Jan 15 12:09:46 2016 +0000
Committer: Dan Haywood <da...@haywood-associates.co.uk>
Committed: Fri Jan 15 12:09:46 2016 +0000

----------------------------------------------------------------------
 .../asciidoc/guides/_cgcon_building-isis.adoc   | 78 +++++++++++++++++++-
 1 file changed, 75 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/isis/blob/86a787b6/adocs/documentation/src/main/asciidoc/guides/_cgcon_building-isis.adoc
----------------------------------------------------------------------
diff --git a/adocs/documentation/src/main/asciidoc/guides/_cgcon_building-isis.adoc b/adocs/documentation/src/main/asciidoc/guides/_cgcon_building-isis.adoc
index 69ec333..3dd2675 100644
--- a/adocs/documentation/src/main/asciidoc/guides/_cgcon_building-isis.adoc
+++ b/adocs/documentation/src/main/asciidoc/guides/_cgcon_building-isis.adoc
@@ -8,12 +8,13 @@
 
 
 
-
+[[_cgcon_building-isis_git]]
 == Git
 
 The Apache Isis source code lives in a git repo.
 
 
+[[_cgcon_building-isis_git_installation]]
 === Installation
 
 The easiest place to get hold of command-line git is probably the http://git-scm.com/downloads[github download page].
@@ -33,7 +34,7 @@ If using Mac, you might also want to check out Atlassian's http://www.atlassian.
 
 
 
-
+[[_cgcon_building-isis_git_installation_cloning-the-apache-isis-repo]]
 ==== Cloning the Apache Isis repo
 
 First, clone the Apache Isis repo.
@@ -48,6 +49,8 @@ git clone https://git-wip-us.apache.org/repos/asf/isis.git
 
 If you are *not a committer*, please see the xref:cgcon.adoc#_cgcon_contributing[contributing] page for details on which repo to clone from.
 
+
+[[_cgcon_building-isis_git_installation_configuring-git]]
 ==== Configuring Git
 
 Next up is to configure your user name and password; see also https://git-wip-us.apache.org/[Apache's git] docs:
@@ -107,6 +110,7 @@ If you don't use git outside of Apache, you can add the `--global` flag so that
 
 
 
+[[_cgcon_building-isis_git_getting-help]]
 === Getting help
 
 Three commands of git that in particular worth knowing:
@@ -132,8 +136,27 @@ For further reading, see:
 * http://git-scm.com/docs/gitattributes[.gitattributes git-scm.com docs]
 
 
+[[_cgcon_building-isis_installing-java-7]]
+== Installing Java 7
+
+Apache Isis is compatible with Java 7 and Java 8.  To ensure backward compatibility with Java 7 the framework is built
+using Java 7, leveraging the link:http://maven.apache.org/plugins/maven-toolchains-plugin/[Maven toolchains plugin].
+(The discussion of toolchains itself is discussed xref:_cgcon_building-isis_configure-maven-toolchains-plugin[below]).
+
+
+Therefore install Java 7 JDK (and optionally Java 8 JDK as well).  Note that the JRE is _not_ sufficient.
+
+
+[TIP]
+====
+If you intend to contribute back patches to Apache Isis, note that you can still use Java 8 within your IDE to
+make changes.  Just be sure not to use any Java 8 APIs.
+====
+
+
 
 
+[[_cgcon_building-isis_installing-maven]]
 == Installing Maven
 
 Install Maven 3.0.x, downloadable http://maven.apache.org/download.html[here].
@@ -152,6 +175,52 @@ Previously we suggested `-XX:MaxPermSize=256m`, but this option has been removed
 ====
 
 
+[[_cgcon_building-isis_configure-maven-toolchains-plugin]]
+== Configure Maven toolchains plugin
+
+As noted xref:_cgcon_building-isis_installing-java-7[earlier], Apache Isis is built using Java 7, leveraging the
+link:http://maven.apache.org/plugins/maven-toolchains-plugin/[toolchains] plugin.  This is configured by placing the
+`toolchains.xml` file in `~/.m2` directory.
+
+You can use the following file as a template, adjusting paths for your platform:
+
+[source,xml]
+----
+<?xml version="1.0" encoding="UTF8"?>
+<toolchains>
+    <toolchain>
+        <type>jdk</type>
+        <provides>
+            <version>1.8</version>
+            <vendor>oracle</vendor>
+        </provides>
+        <configuration>
+            <jdkHome>/usr/lib64/jvm/jdk1.8.0_65</jdkHome>
+            <!--
+            <jdkHome>c:\Program Files\Java\jdk1.8.0_65</jdkHome>
+            -->
+        </configuration>
+    </toolchain>
+    <toolchain>
+        <type>jdk</type>
+        <provides>
+            <version>1.7</version>   <!--1-->
+            <vendor>oracle</vendor>
+        </provides>
+        <configuration>
+            <jdkHome>/usr/lib64/jvm/jdk1.7.0_79</jdkHome>
+            <!--
+            <jdkHome>c:\Program Files\Java\jdk1.7.0_79</jdkHome>
+            -->
+        </configuration>
+    </toolchain>
+</toolchains>
+----
+<1> The Apache Isis build is configured to search for the (`1.7, oracle`) JDK toolchain.
+
+
+
+[[_cgcon_building-isis_building-all-of-apache-isis]]
 == Building all of Apache Isis
 
 To build the source code from the command line, simply go to the root directory and type:
@@ -178,6 +247,7 @@ When using Eclipse, a Maven profile is configured such that Eclipse compiles to
 
 
 
+[[_cgcon_building-isis_checking-for-vulnerabilities]]
 == Checking for Vulnerabilities
 
 Apache Isis configures the link:https://www.owasp.org/index.php/Main_Page[OWASP] link:https://www.owasp.org/index.php/OWASP_Dependency_Check[dependency check] link:http://jeremylong.github.io/DependencyCheck/dependency-check-maven/index.html[Maven plugin] to determine whether the framework uses libraries that are known to have security vulnerabilities.
@@ -201,6 +271,7 @@ To disable, either run in offline mode (add `-o` or `--offline`) or omit the `ow
 
 
 
+[[_cgcon_building-isis_checking-for-use-of-internal-jdk-apis]]
 == Checking for use of internal JDK APIs
 
 Apache Isis configures the link:https://maven.apache.org/plugins-archives/maven-jdeps-plugin-3.0.0/[jdeps maven plugin] to check for any usage of internal JDK APIs.  This is in preparation for Java 9 module system (Jigsaw) which will prevent such usage of APIs.
@@ -215,8 +286,9 @@ mvn clean install -Djdeps
 This will fail the build on any module that currently uses an internal JDK API.
 
 
-[NOTE]
+[WARNING]
 ====
 At the time of writing the `isis-core-schema` module fails the build.
 ====
 
+


[24/50] [abbrv] isis git commit: ISIS-993: factored out EntityColumnMembers

Posted by da...@apache.org.
ISIS-993: factored out EntityColumnMembers


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

Branch: refs/heads/ISIS-993
Commit: aacec3b49a2a918a14d2136c0e447118ee24d4f4
Parents: f9f43c2
Author: Dan Haywood <da...@haywood-associates.co.uk>
Authored: Sun Jan 10 14:35:34 2016 +0000
Committer: Dan Haywood <da...@haywood-associates.co.uk>
Committed: Mon Jan 25 14:38:24 2016 +0000

----------------------------------------------------------------------
 .../entity/properties/EntityColumnMembers.html  |   2 +-
 .../entity/properties/EntityColumnMembers.java  | 148 ++++++++++++++++++-
 .../entity/properties/EntityPropertiesForm.java | 132 +----------------
 .../properties/EntityPropertiesPanel.html       |  66 +--------
 4 files changed, 154 insertions(+), 194 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/isis/blob/aacec3b4/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/properties/EntityColumnMembers.html
----------------------------------------------------------------------
diff --git a/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/properties/EntityColumnMembers.html b/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/properties/EntityColumnMembers.html
index 07ca0f3..43c76da 100644
--- a/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/properties/EntityColumnMembers.html
+++ b/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/properties/EntityColumnMembers.html
@@ -20,7 +20,7 @@
 <html xmlns:wicket="http://wicket.apache.org">
     <body>
         <wicket:panel>
-            <div wicket:id="columnMembers" class="columnMembers">
+            <div class="columnMembers">
                 <div class="inputFormTable properties">
                     <fieldset wicket:id="memberGroup" class="memberGroup myBlockContainer">
                         <div class="panel panel-default">

http://git-wip-us.apache.org/repos/asf/isis/blob/aacec3b4/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/properties/EntityColumnMembers.java
----------------------------------------------------------------------
diff --git a/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/properties/EntityColumnMembers.java b/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/properties/EntityColumnMembers.java
index 805a904..3e0cd3f 100644
--- a/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/properties/EntityColumnMembers.java
+++ b/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/properties/EntityColumnMembers.java
@@ -18,16 +18,52 @@
  */
 package org.apache.isis.viewer.wicket.ui.components.entity.properties;
 
+import java.util.List;
+import java.util.Map;
+
+import com.google.common.collect.FluentIterable;
+import com.google.common.collect.Lists;
+
 import org.apache.wicket.Component;
+import org.apache.wicket.MarkupContainer;
+import org.apache.wicket.markup.html.WebMarkupContainer;
+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.v1_0.Column;
+import org.apache.isis.applib.layout.v1_0.PropertyGroup;
 import org.apache.isis.core.metamodel.adapter.ObjectAdapter;
+import org.apache.isis.core.metamodel.spec.ObjectSpecification;
+import org.apache.isis.core.metamodel.spec.ObjectSpecifications;
+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;
+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.mementos.PropertyMemento;
 import org.apache.isis.viewer.wicket.model.models.EntityModel;
-import org.apache.isis.viewer.wicket.ui.panels.FormAbstract;
+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.components.widgets.containers.UiHintPathSignificantWebMarkupContainer;
+import org.apache.isis.viewer.wicket.ui.panels.PanelAbstract;
+import org.apache.isis.viewer.wicket.ui.util.Components;
 
-public class EntityColumnMembers extends FormAbstract<ObjectAdapter> {
+public class EntityColumnMembers extends PanelAbstract<EntityModel> {
 
     private static final long serialVersionUID = 1L;
 
+    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";
+    private static final String ID_ASSOCIATED_ACTION_LINKS_PANEL_DROPDOWN = "associatedActionLinksPanelDropDown";
+
+    private static final String ID_PROPERTIES = "properties";
+    private static final String ID_PROPERTY = "property";
 
     private final Component owningPanel;
 
@@ -43,8 +79,114 @@ public class EntityColumnMembers extends FormAbstract<ObjectAdapter> {
     }
 
     private void buildGui() {
-
         final EntityModel entityModel = (EntityModel) getModel();
+        addPropertiesAndCollections(this, entityModel);
+    }
 
+    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 Column columnMetaDataIfAny = entityModel.getColumnMetadata();
+        final Column.Hint hint = entityModel.getColumnHint();
+        final ObjectAdapter adapter = entityModel.getObject();
+        final ObjectSpecification objSpec = adapter.getSpecification();
+
+        final Map<String, List<ObjectAssociation>> associationsByGroup = PropUtil
+                .propertiesByMemberOrder(adapter);
+        final List<String> groupNames = columnMetaDataIfAny != null
+                ? FluentIterable
+                .from(columnMetaDataIfAny.getPropertyGroups())
+                .transform(PropertyGroup.Util.nameOf())
+                .toList()
+                : ObjectSpecifications.orderByMemberGroups(objSpec, associationsByGroup.keySet(), hint);
+
+        final RepeatingView memberGroupRv = new RepeatingView(ID_MEMBER_GROUP);
+        markupContainer.add(memberGroupRv);
+
+        for(final String groupName: groupNames) {
+            final List<ObjectAssociation> associationsInGroup = associationsByGroup.get(groupName);
+            if(associationsInGroup==null) {
+                continue;
+            }
+
+            final WebMarkupContainer memberGroupRvContainer = new WebMarkupContainer(memberGroupRv.newChildId());
+            memberGroupRv.add(memberGroupRvContainer);
+            memberGroupRvContainer.add(new Label(ID_MEMBER_GROUP_NAME, groupName));
+
+            final List<LinkAndLabel> memberGroupActions = Lists.newArrayList();
+
+            final RepeatingView propertyRv = new RepeatingView(ID_PROPERTIES);
+            memberGroupRvContainer.add(propertyRv);
+
+            @SuppressWarnings("unused")
+            Component component;
+            for (final ObjectAssociation association : associationsInGroup) {
+                final WebMarkupContainer propertyRvContainer = new UiHintPathSignificantWebMarkupContainer(propertyRv.newChildId());
+                propertyRv.add(propertyRvContainer);
+
+                addPropertyToForm(entityModel, (OneToOneAssociation) association, propertyRvContainer, memberGroupActions);
+            }
+
+            final List<LinkAndLabel> actionsPanel = LinkAndLabel.positioned(memberGroupActions, ActionLayout.Position.PANEL);
+            final List<LinkAndLabel> actionsPanelDropDown = LinkAndLabel.positioned(memberGroupActions, ActionLayout.Position.PANEL_DROPDOWN);
+
+            AdditionalLinksPanel.addAdditionalLinks(
+                    memberGroupRvContainer, ID_ASSOCIATED_ACTION_LINKS_PANEL,
+                    actionsPanel,
+                    AdditionalLinksPanel.Style.INLINE_LIST);
+            AdditionalLinksPanel.addAdditionalLinks(
+                    memberGroupRvContainer, ID_ASSOCIATED_ACTION_LINKS_PANEL_DROPDOWN,
+                    actionsPanelDropDown,
+                    AdditionalLinksPanel.Style.DROPDOWN);
+        }
+    }
+
+    private void addCollectionsIfRequired(
+            final MarkupContainer column,
+            final EntityModel entityModel) {
+
+        final Column columnMetaDataIfAny = entityModel.getColumnMetadata();
+
+        if(columnMetaDataIfAny != null) {
+            getComponentFactoryRegistry()
+                    .addOrReplaceComponent(column, "collections", ComponentType.ENTITY_COLLECTIONS, entityModel);
+        } else {
+            Components.permanentlyHide(column, "collections");
+        }
+    }
+
+    private void addPropertyToForm(
+            final EntityModel entityModel,
+            final OneToOneAssociation otoa,
+            final WebMarkupContainer container,
+            final List<LinkAndLabel> entityActions) {
+        final PropertyMemento pm = new PropertyMemento(otoa);
+
+        final ScalarModel scalarModel = entityModel.getPropertyModel(pm);
+        final Component component = getComponentFactoryRegistry().addOrReplaceComponent(container, ID_PROPERTY, ComponentType.SCALAR_NAME_AND_VALUE, scalarModel);
+
+        final List<ObjectAction> associatedActions = EntityActionUtil.getObjectActionsForAssociation(entityModel,
+                otoa, getDeploymentType());
+
+        entityActions.addAll(EntityActionUtil.asLinkAndLabelsForAdditionalLinksPanel(entityModel, associatedActions));
+    }
+
+
+
+    ///////////////////////////////////////////////////////
+    // Dependencies (from context)
+    ///////////////////////////////////////////////////////
+
+    protected DeploymentType getDeploymentType() {
+        return IsisContext.getDeploymentType();
+    }
+
 }

http://git-wip-us.apache.org/repos/asf/isis/blob/aacec3b4/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/properties/EntityPropertiesForm.java
----------------------------------------------------------------------
diff --git a/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/properties/EntityPropertiesForm.java b/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/properties/EntityPropertiesForm.java
index 02230e9..24837b6 100644
--- a/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/properties/EntityPropertiesForm.java
+++ b/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/properties/EntityPropertiesForm.java
@@ -19,10 +19,6 @@
 package org.apache.isis.viewer.wicket.ui.components.entity.properties;
 
 import java.util.List;
-import java.util.Map;
-
-import com.google.common.collect.FluentIterable;
-import com.google.common.collect.Lists;
 
 import org.apache.wicket.Component;
 import org.apache.wicket.MarkupContainer;
@@ -37,7 +33,6 @@ 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.markup.repeater.RepeatingView;
 import org.apache.wicket.model.IModel;
 import org.apache.wicket.model.ResourceModel;
 import org.apache.wicket.request.Response;
@@ -45,13 +40,12 @@ 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.ActionLayout;
 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.v1_0.Column;
-import org.apache.isis.applib.layout.v1_0.PropertyGroup;
+import org.apache.isis.applib.layout.v1_0.Column.Hint;
 import org.apache.isis.applib.layout.v1_0.Tab;
 import org.apache.isis.applib.services.exceprecog.ExceptionRecognizer;
 import org.apache.isis.applib.services.exceprecog.ExceptionRecognizerComposite;
@@ -63,26 +57,15 @@ 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.ObjectSpecifications;
-import org.apache.isis.applib.layout.v1_0.Column.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;
-import org.apache.isis.core.metamodel.spec.feature.OneToOneAssociation;
 import org.apache.isis.core.runtime.memento.Memento;
-import org.apache.isis.core.runtime.system.DeploymentType;
 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.links.LinkAndLabel;
-import org.apache.isis.viewer.wicket.model.mementos.PropertyMemento;
 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.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.components.widgets.containers.UiHintPathSignificantWebMarkupContainer;
 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;
@@ -98,21 +81,12 @@ public class EntityPropertiesForm extends FormAbstract<ObjectAdapter> implements
 
     private static final long serialVersionUID = 1L;
 
-    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";
-    private static final String ID_ASSOCIATED_ACTION_LINKS_PANEL_DROPDOWN = "associatedActionLinksPanelDropDown";
-
     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_COLLECTIONS = "entityCollections";
     private static final String ID_ENTITY_COLLECTIONS_OVERFLOW = "entityCollectionsOverflow";
-    
-    private static final String ID_PROPERTIES = "properties";
-    private static final String ID_PROPERTY = "property";
 
     private static final String ID_EDIT_BUTTON = "edit";
     private static final String ID_OK_BUTTON = "ok";
@@ -258,7 +232,7 @@ public class EntityPropertiesForm extends FormAbstract<ObjectAdapter> implements
     }
 
     private void addPropertiesAndCollections(
-            final MarkupContainer middleColumn,
+            final MarkupContainer markupContainer,
             final EntityModel entityModel,
             final Tab tabMetaDataIfAny,
             final Hint hint) {
@@ -268,104 +242,11 @@ public class EntityPropertiesForm extends FormAbstract<ObjectAdapter> implements
                 new EntityModel(entityModel.getPageParameters())
                         .withColumnMetadata(columnMetaDataIfAny, hint);
 
-        addPropertiesAndCollections(middleColumn, entityModelWithHints);
-    }
-
-    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 Column columnMetaDataIfAny = entityModel.getColumnMetadata();
-        final Hint hint = entityModel.getColumnHint();
-        final ObjectAdapter adapter = entityModel.getObject();
-        final ObjectSpecification objSpec = adapter.getSpecification();
-
-        final Map<String, List<ObjectAssociation>> associationsByGroup = PropUtil
-                .propertiesByMemberOrder(adapter);
-        final List<String> groupNames = columnMetaDataIfAny != null
-                ? FluentIterable
-                    .from(columnMetaDataIfAny.getPropertyGroups())
-                    .transform(PropertyGroup.Util.nameOf())
-                    .toList()
-                : ObjectSpecifications.orderByMemberGroups(objSpec, associationsByGroup.keySet(), hint);
-
-        final RepeatingView memberGroupRv = new RepeatingView(ID_MEMBER_GROUP);
-        markupContainer.add(memberGroupRv);
-
-        for(final String groupName: groupNames) {
-            final List<ObjectAssociation> associationsInGroup = associationsByGroup.get(groupName);
-            if(associationsInGroup==null) {
-                continue;
-            }
-
-            final WebMarkupContainer memberGroupRvContainer = new WebMarkupContainer(memberGroupRv.newChildId());
-            memberGroupRv.add(memberGroupRvContainer);
-            memberGroupRvContainer.add(new Label(ID_MEMBER_GROUP_NAME, groupName));
-
-            final List<LinkAndLabel> memberGroupActions = Lists.newArrayList();
-
-            final RepeatingView propertyRv = new RepeatingView(ID_PROPERTIES);
-            memberGroupRvContainer.add(propertyRv);
-
-            @SuppressWarnings("unused")
-            Component component;
-            for (final ObjectAssociation association : associationsInGroup) {
-                final WebMarkupContainer propertyRvContainer = new UiHintPathSignificantWebMarkupContainer(propertyRv.newChildId());
-                propertyRv.add(propertyRvContainer);
-
-                addPropertyToForm(entityModel, (OneToOneAssociation) association, propertyRvContainer, memberGroupActions);
-            }
-
-            final List<LinkAndLabel> actionsPanel = LinkAndLabel.positioned(memberGroupActions, ActionLayout.Position.PANEL);
-            final List<LinkAndLabel> actionsPanelDropDown = LinkAndLabel.positioned(memberGroupActions, ActionLayout.Position.PANEL_DROPDOWN);
-
-            AdditionalLinksPanel.addAdditionalLinks(
-                    memberGroupRvContainer, ID_ASSOCIATED_ACTION_LINKS_PANEL,
-                    actionsPanel,
-                    AdditionalLinksPanel.Style.INLINE_LIST);
-            AdditionalLinksPanel.addAdditionalLinks(
-                    memberGroupRvContainer, ID_ASSOCIATED_ACTION_LINKS_PANEL_DROPDOWN,
-                    actionsPanelDropDown,
-                    AdditionalLinksPanel.Style.DROPDOWN);
-        }
-    }
-
-    private void addCollectionsIfRequired(
-            final MarkupContainer column,
-            final EntityModel entityModel) {
-
-        final Column columnMetaDataIfAny = entityModel.getColumnMetadata();
-
-        if(columnMetaDataIfAny != null) {
-            getComponentFactoryRegistry()
-                    .addOrReplaceComponent(column, "collections", ComponentType.ENTITY_COLLECTIONS, entityModel);
-        } else {
-            Components.permanentlyHide(column, "collections");
-        }
+        final EntityColumnMembers columnMembers =
+                new EntityColumnMembers("entityMembers", entityModelWithHints, markupContainer);
+        markupContainer.add(columnMembers);
     }
 
-    private void addPropertyToForm(
-            final EntityModel entityModel,
-            final OneToOneAssociation otoa,
-            final WebMarkupContainer container,
-            final List<LinkAndLabel> entityActions) {
-        final PropertyMemento pm = new PropertyMemento(otoa);
-
-        final ScalarModel scalarModel = entityModel.getPropertyModel(pm);
-        final Component component = getComponentFactoryRegistry().addOrReplaceComponent(container, ID_PROPERTY, ComponentType.SCALAR_NAME_AND_VALUE, scalarModel);
-
-        final List<ObjectAction> associatedActions = EntityActionUtil.getObjectActionsForAssociation(entityModel,
-                otoa, getDeploymentType());
-
-        entityActions.addAll(EntityActionUtil.asLinkAndLabelsForAdditionalLinksPanel(entityModel, associatedActions));
-    }
 
     @Override
     protected void onComponentTag(ComponentTag tag) {
@@ -828,8 +709,5 @@ public class EntityPropertiesForm extends FormAbstract<ObjectAdapter> implements
         return getAuthenticationSession().getMessageBroker();
     }
 
-    protected DeploymentType getDeploymentType() {
-        return IsisContext.getDeploymentType();
-    }
 
 }

http://git-wip-us.apache.org/repos/asf/isis/blob/aacec3b4/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/properties/EntityPropertiesPanel.html
----------------------------------------------------------------------
diff --git a/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/properties/EntityPropertiesPanel.html b/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/properties/EntityPropertiesPanel.html
index 9b8a582..8fbcfb4 100644
--- a/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/properties/EntityPropertiesPanel.html
+++ b/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/properties/EntityPropertiesPanel.html
@@ -24,27 +24,7 @@
                 <form wicket:id="entityProperties" class="inputForm" role="form">
                     <div class="row" style="padding-bottom: 20px">
                         <div wicket:id="leftColumn">
-                            <div class="columnMembers">
-                                <div class="inputFormTable properties">
-                                    <fieldset wicket:id="memberGroup" class="memberGroup myBlockContainer">
-                                        <div class="panel panel-default">
-                                            <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>
-                                            </div>
-                                            <div class="properties panel-body">
-                                                <div wicket:id="properties">
-                                                    <div wicket:id="property" class="property">[property]</div>
-                                                </div>
-                                            </div>
-                                        </div>
-                                    </fieldset>
-                                </div>
-                                <div wicket:id="collections"></div>
-                            </div>
+                            <div wicket:id="entityMembers"/>
                             <div class="feedbackPanel">
                                 <span wicket:id="feedback"></span>
                             </div>
@@ -55,50 +35,10 @@
                             </div>
                         </div>
                         <div wicket:id="middleColumn">
-                            <div class="columnMembers">
-                                <div class="inputFormTable properties">
-                                    <fieldset wicket:id="memberGroup" class="memberGroup myBlockContainer">
-                                        <div class="panel panel-default">
-                                            <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>
-                                            </div>
-                                            <div class="properties panel-body">
-                                                <div wicket:id="properties">
-                                                    <div wicket:id="property" class="property">[property]</div>
-                                                </div>
-                                            </div>
-                                        </div>
-                                    </fieldset>
-                                </div>
-                                <div wicket:id="collections"></div>
-                            </div>
+                            <div wicket:id="entityMembers"/>
                         </div>
                         <div wicket:id="rightColumn">
-                            <div class="columnMembers">
-                                <div class="inputFormTable properties">
-                                    <fieldset wicket:id="memberGroup" class="memberGroup myBlockContainer">
-                                        <div class="panel panel-default">
-                                            <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>
-                                            </div>
-                                            <div class="properties panel-body">
-                                                <div wicket:id="properties">
-                                                    <div wicket:id="property" class="property">[property]</div>
-                                                </div>
-                                            </div>
-                                        </div>
-                                    </fieldset>
-                                </div>
-                                <div wicket:id="collections"></div>
-                            </div>
+                            <div wicket:id="entityMembers"/>
                         </div>
                         <div wicket:id="entityCollections"></div>
                     </div>


[07/50] [abbrv] isis git commit: ISIS-1296: recreating simpleapp archetype

Posted by da...@apache.org.
ISIS-1296: recreating simpleapp archetype


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

Branch: refs/heads/ISIS-993
Commit: b06d913e750de0d6404b3fca51c3b0d328f2653a
Parents: 5d3d14b
Author: Dan Haywood <da...@haywood-associates.co.uk>
Authored: Sun Jan 10 15:25:00 2016 +0000
Committer: Dan Haywood <da...@haywood-associates.co.uk>
Committed: Sun Jan 10 15:25:00 2016 +0000

----------------------------------------------------------------------
 example/archetype/simpleapp/pom.xml             |   6 ++--
 .../java/domainapp/dom/simple/SimpleObject.java |   4 +--
 .../main/resources/archetype-resources/pom.xml  |   2 +-
 .../webapp/ide/eclipse/launch/.gitignore        |   8 +----
 ...OTOTYPE-with-fixtures-bypass-security.launch |  22 +++++++++++++
 .../SimpleApp-PROTOTYPE-with-fixtures.launch    |  22 +++++++++++++
 .../eclipse/launch/SimpleApp-PROTOTYPE.launch   |  22 +++++++++++++
 .../ide/eclipse/launch/SimpleApp-SERVER.launch  |  22 +++++++++++++
 ..._PROTOTYPE_with_fixtures-bypass-security.xml |  31 +++++++++++++++++++
 .../SimpleApp_PROTOTYPE_with_fixtures.xml       |  31 +++++++++++++++++++
 .../ide/intellij/launch/SimpleApp_SERVER.xml    |  31 +++++++++++++++++++
 .../launch/SimpleApp__enhance_only_.xml         |   2 +-
 .../src/main/jettyconsole/isis-banner.pdn       | Bin 69658 -> 64162 bytes
 .../src/main/jettyconsole/isis-banner.png       | Bin 30776 -> 27310 bytes
 .../projects/basic/archetype.properties         |   2 +-
 15 files changed, 190 insertions(+), 15 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/isis/blob/b06d913e/example/archetype/simpleapp/pom.xml
----------------------------------------------------------------------
diff --git a/example/archetype/simpleapp/pom.xml b/example/archetype/simpleapp/pom.xml
index aec882a..0a92bc9 100644
--- a/example/archetype/simpleapp/pom.xml
+++ b/example/archetype/simpleapp/pom.xml
@@ -17,11 +17,11 @@
   specific language governing permissions and limitations
   under the License.
 -->
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+<project xmlns="http://maven.apache.org/POM/4.0.0" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
     <modelVersion>4.0.0</modelVersion>
     <groupId>org.apache.isis.archetype</groupId>
     <artifactId>simpleapp-archetype</artifactId>
-    <version>1.12.0-SNAPSHOT</version>
+    <version>1.11.0-SNAPSHOT</version>
     <packaging>maven-archetype</packaging>
     <name>simpleapp-archetype</name>
     <build>
@@ -44,7 +44,7 @@
     <parent>
         <groupId>org.apache.isis.core</groupId>
         <artifactId>isis</artifactId>
-        <version>1.11.0</version>
+        <version>1.11.1</version>
         <relativePath>../../../core/pom.xml</relativePath>
     </parent>
 </project>

http://git-wip-us.apache.org/repos/asf/isis/blob/b06d913e/example/archetype/simpleapp/src/main/resources/archetype-resources/dom/src/main/java/domainapp/dom/simple/SimpleObject.java
----------------------------------------------------------------------
diff --git a/example/archetype/simpleapp/src/main/resources/archetype-resources/dom/src/main/java/domainapp/dom/simple/SimpleObject.java b/example/archetype/simpleapp/src/main/resources/archetype-resources/dom/src/main/java/domainapp/dom/simple/SimpleObject.java
index a5131bc..5137b73 100644
--- a/example/archetype/simpleapp/src/main/resources/archetype-resources/dom/src/main/java/domainapp/dom/simple/SimpleObject.java
+++ b/example/archetype/simpleapp/src/main/resources/archetype-resources/dom/src/main/java/domainapp/dom/simple/SimpleObject.java
@@ -57,11 +57,11 @@ import org.apache.isis.applib.util.ObjectContracts;
         @javax.jdo.annotations.Query(
                 name = "find", language = "JDOQL",
                 value = "SELECT "
-                        + "FROM domainapp.dom.modules.simple.SimpleObject "),
+                        + "FROM domainapp.dom.simple.SimpleObject "),
         @javax.jdo.annotations.Query(
                 name = "findByName", language = "JDOQL",
                 value = "SELECT "
-                        + "FROM domainapp.dom.modules.simple.SimpleObject "
+                        + "FROM domainapp.dom.simple.SimpleObject "
                         + "WHERE name.indexOf(:name) >= 0 ")
 })
 @javax.jdo.annotations.Unique(name="SimpleObject_name_UNQ", members = {"name"})

http://git-wip-us.apache.org/repos/asf/isis/blob/b06d913e/example/archetype/simpleapp/src/main/resources/archetype-resources/pom.xml
----------------------------------------------------------------------
diff --git a/example/archetype/simpleapp/src/main/resources/archetype-resources/pom.xml b/example/archetype/simpleapp/src/main/resources/archetype-resources/pom.xml
index 2de4361..f6c9980 100644
--- a/example/archetype/simpleapp/src/main/resources/archetype-resources/pom.xml
+++ b/example/archetype/simpleapp/src/main/resources/archetype-resources/pom.xml
@@ -32,7 +32,7 @@
     </prerequisites>
 
     <properties>
-        <isis.version>1.11.0</isis.version>
+        <isis.version>1.11.1</isis.version>
 
         <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
         <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>

http://git-wip-us.apache.org/repos/asf/isis/blob/b06d913e/example/archetype/simpleapp/src/main/resources/archetype-resources/webapp/ide/eclipse/launch/.gitignore
----------------------------------------------------------------------
diff --git a/example/archetype/simpleapp/src/main/resources/archetype-resources/webapp/ide/eclipse/launch/.gitignore b/example/archetype/simpleapp/src/main/resources/archetype-resources/webapp/ide/eclipse/launch/.gitignore
index 3d97345..1d44fd4 100644
--- a/example/archetype/simpleapp/src/main/resources/archetype-resources/webapp/ide/eclipse/launch/.gitignore
+++ b/example/archetype/simpleapp/src/main/resources/archetype-resources/webapp/ide/eclipse/launch/.gitignore
@@ -1,8 +1,2 @@
 /SimpleApp-PROTOTYPE-jrebel.launch
-/SimpleApp-PROTOTYPE-no-fixtures.launch
-/SimpleApp-PROTOTYPE-with-fixtures.launch
-/SimpleApp-SERVER-no-fixtures.launch
-/SimpleApp-PROTOTYPE-jrebel.launch
-/SimpleApp-PROTOTYPE-no-fixtures.launch
-/SimpleApp-PROTOTYPE-with-fixtures.launch
-/SimpleApp-SERVER-no-fixtures.launch
+/SimpleApp-jrebel.launch

http://git-wip-us.apache.org/repos/asf/isis/blob/b06d913e/example/archetype/simpleapp/src/main/resources/archetype-resources/webapp/ide/eclipse/launch/SimpleApp-PROTOTYPE-with-fixtures-bypass-security.launch
----------------------------------------------------------------------
diff --git a/example/archetype/simpleapp/src/main/resources/archetype-resources/webapp/ide/eclipse/launch/SimpleApp-PROTOTYPE-with-fixtures-bypass-security.launch b/example/archetype/simpleapp/src/main/resources/archetype-resources/webapp/ide/eclipse/launch/SimpleApp-PROTOTYPE-with-fixtures-bypass-security.launch
new file mode 100644
index 0000000..8c3762b
--- /dev/null
+++ b/example/archetype/simpleapp/src/main/resources/archetype-resources/webapp/ide/eclipse/launch/SimpleApp-PROTOTYPE-with-fixtures-bypass-security.launch
@@ -0,0 +1,22 @@
+#set( $symbol_pound = '#' )
+#set( $symbol_dollar = '$' )
+#set( $symbol_escape = '\' )
+<?xml version="1.0" encoding="UTF-8"?><launchConfiguration type="org.eclipse.jdt.launching.localJavaApplication">
+  <listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
+    <listEntry value="/isis-core-webserver/src/main/java/org/apache/isis/WebServer.java"/>
+  </listAttribute>
+  <listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
+    <listEntry value="1"/>
+  </listAttribute>
+  <mapAttribute key="org.eclipse.debug.core.preferred_launchers">
+    <mapEntry value="org.eclipse.jdt.launching.localJavaApplication" key="[debug]"/>
+    <mapEntry value="org.eclipse.jdt.launching.localJavaApplication" key="[run]"/>
+  </mapAttribute>
+  <stringAttribute value="org.eclipse.jdt.launching.sourceLocator.JavaSourceLookupDirector" key="org.eclipse.debug.core.source_locator_id"/>
+  <booleanAttribute value="true" key="org.eclipse.jdt.debug.ui.INCLUDE_EXTERNAL_JARS"/>
+  <stringAttribute value="org.eclipse.m2e.launchconfig.classpathProvider" key="org.eclipse.jdt.launching.CLASSPATH_PROVIDER"/>
+  <stringAttribute value="org.apache.isis.WebServer" key="org.eclipse.jdt.launching.MAIN_TYPE"/>
+  <stringAttribute value="--type SERVER_PROTOTYPE --port 8080 --manifest domainapp.app.DomainAppAppManifestWithFixturesBypassSecurity" key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS"/>
+  <stringAttribute value="${rootArtifactId}-webapp" key="org.eclipse.jdt.launching.PROJECT_ATTR"/>
+  <stringAttribute value="org.eclipse.m2e.launchconfig.sourcepathProvider" key="org.eclipse.jdt.launching.SOURCE_PATH_PROVIDER"/>
+</launchConfiguration>

http://git-wip-us.apache.org/repos/asf/isis/blob/b06d913e/example/archetype/simpleapp/src/main/resources/archetype-resources/webapp/ide/eclipse/launch/SimpleApp-PROTOTYPE-with-fixtures.launch
----------------------------------------------------------------------
diff --git a/example/archetype/simpleapp/src/main/resources/archetype-resources/webapp/ide/eclipse/launch/SimpleApp-PROTOTYPE-with-fixtures.launch b/example/archetype/simpleapp/src/main/resources/archetype-resources/webapp/ide/eclipse/launch/SimpleApp-PROTOTYPE-with-fixtures.launch
new file mode 100644
index 0000000..21c8952
--- /dev/null
+++ b/example/archetype/simpleapp/src/main/resources/archetype-resources/webapp/ide/eclipse/launch/SimpleApp-PROTOTYPE-with-fixtures.launch
@@ -0,0 +1,22 @@
+#set( $symbol_pound = '#' )
+#set( $symbol_dollar = '$' )
+#set( $symbol_escape = '\' )
+<?xml version="1.0" encoding="UTF-8"?><launchConfiguration type="org.eclipse.jdt.launching.localJavaApplication">
+  <listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
+    <listEntry value="/isis-core-webserver/src/main/java/org/apache/isis/WebServer.java"/>
+  </listAttribute>
+  <listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
+    <listEntry value="1"/>
+  </listAttribute>
+  <mapAttribute key="org.eclipse.debug.core.preferred_launchers">
+    <mapEntry value="org.eclipse.jdt.launching.localJavaApplication" key="[debug]"/>
+    <mapEntry value="org.eclipse.jdt.launching.localJavaApplication" key="[run]"/>
+  </mapAttribute>
+  <stringAttribute value="org.eclipse.jdt.launching.sourceLocator.JavaSourceLookupDirector" key="org.eclipse.debug.core.source_locator_id"/>
+  <booleanAttribute value="true" key="org.eclipse.jdt.debug.ui.INCLUDE_EXTERNAL_JARS"/>
+  <stringAttribute value="org.eclipse.m2e.launchconfig.classpathProvider" key="org.eclipse.jdt.launching.CLASSPATH_PROVIDER"/>
+  <stringAttribute value="org.apache.isis.WebServer" key="org.eclipse.jdt.launching.MAIN_TYPE"/>
+  <stringAttribute value="--type SERVER_PROTOTYPE --port 8080 --manifest domainapp.app.DomainAppAppManifestWithFixtures" key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS"/>
+  <stringAttribute value="${rootArtifactId}-webapp" key="org.eclipse.jdt.launching.PROJECT_ATTR"/>
+  <stringAttribute value="org.eclipse.m2e.launchconfig.sourcepathProvider" key="org.eclipse.jdt.launching.SOURCE_PATH_PROVIDER"/>
+</launchConfiguration>

http://git-wip-us.apache.org/repos/asf/isis/blob/b06d913e/example/archetype/simpleapp/src/main/resources/archetype-resources/webapp/ide/eclipse/launch/SimpleApp-PROTOTYPE.launch
----------------------------------------------------------------------
diff --git a/example/archetype/simpleapp/src/main/resources/archetype-resources/webapp/ide/eclipse/launch/SimpleApp-PROTOTYPE.launch b/example/archetype/simpleapp/src/main/resources/archetype-resources/webapp/ide/eclipse/launch/SimpleApp-PROTOTYPE.launch
new file mode 100644
index 0000000..4afaada
--- /dev/null
+++ b/example/archetype/simpleapp/src/main/resources/archetype-resources/webapp/ide/eclipse/launch/SimpleApp-PROTOTYPE.launch
@@ -0,0 +1,22 @@
+#set( $symbol_pound = '#' )
+#set( $symbol_dollar = '$' )
+#set( $symbol_escape = '\' )
+<?xml version="1.0" encoding="UTF-8"?><launchConfiguration type="org.eclipse.jdt.launching.localJavaApplication">
+  <listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
+    <listEntry value="/isis-core-webserver/src/main/java/org/apache/isis/WebServer.java"/>
+  </listAttribute>
+  <listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
+    <listEntry value="1"/>
+  </listAttribute>
+  <mapAttribute key="org.eclipse.debug.core.preferred_launchers">
+    <mapEntry value="org.eclipse.jdt.launching.localJavaApplication" key="[debug]"/>
+    <mapEntry value="org.eclipse.jdt.launching.localJavaApplication" key="[run]"/>
+  </mapAttribute>
+  <stringAttribute value="org.eclipse.jdt.launching.sourceLocator.JavaSourceLookupDirector" key="org.eclipse.debug.core.source_locator_id"/>
+  <booleanAttribute value="true" key="org.eclipse.jdt.debug.ui.INCLUDE_EXTERNAL_JARS"/>
+  <stringAttribute value="org.eclipse.m2e.launchconfig.classpathProvider" key="org.eclipse.jdt.launching.CLASSPATH_PROVIDER"/>
+  <stringAttribute value="org.apache.isis.WebServer" key="org.eclipse.jdt.launching.MAIN_TYPE"/>
+  <stringAttribute value="--type SERVER_PROTOTYPE --port 8080" key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS"/>
+  <stringAttribute value="${rootArtifactId}-webapp" key="org.eclipse.jdt.launching.PROJECT_ATTR"/>
+  <stringAttribute value="org.eclipse.m2e.launchconfig.sourcepathProvider" key="org.eclipse.jdt.launching.SOURCE_PATH_PROVIDER"/>
+</launchConfiguration>

http://git-wip-us.apache.org/repos/asf/isis/blob/b06d913e/example/archetype/simpleapp/src/main/resources/archetype-resources/webapp/ide/eclipse/launch/SimpleApp-SERVER.launch
----------------------------------------------------------------------
diff --git a/example/archetype/simpleapp/src/main/resources/archetype-resources/webapp/ide/eclipse/launch/SimpleApp-SERVER.launch b/example/archetype/simpleapp/src/main/resources/archetype-resources/webapp/ide/eclipse/launch/SimpleApp-SERVER.launch
new file mode 100644
index 0000000..8473bf3
--- /dev/null
+++ b/example/archetype/simpleapp/src/main/resources/archetype-resources/webapp/ide/eclipse/launch/SimpleApp-SERVER.launch
@@ -0,0 +1,22 @@
+#set( $symbol_pound = '#' )
+#set( $symbol_dollar = '$' )
+#set( $symbol_escape = '\' )
+<?xml version="1.0" encoding="UTF-8"?><launchConfiguration type="org.eclipse.jdt.launching.localJavaApplication">
+  <listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
+    <listEntry value="/isis-core-webserver/src/main/java/org/apache/isis/WebServer.java"/>
+  </listAttribute>
+  <listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
+    <listEntry value="1"/>
+  </listAttribute>
+  <mapAttribute key="org.eclipse.debug.core.preferred_launchers">
+    <mapEntry value="org.eclipse.jdt.launching.localJavaApplication" key="[debug]"/>
+    <mapEntry value="org.eclipse.jdt.launching.localJavaApplication" key="[run]"/>
+  </mapAttribute>
+  <stringAttribute value="org.eclipse.jdt.launching.sourceLocator.JavaSourceLookupDirector" key="org.eclipse.debug.core.source_locator_id"/>
+  <booleanAttribute value="true" key="org.eclipse.jdt.debug.ui.INCLUDE_EXTERNAL_JARS"/>
+  <stringAttribute value="org.eclipse.m2e.launchconfig.classpathProvider" key="org.eclipse.jdt.launching.CLASSPATH_PROVIDER"/>
+  <stringAttribute value="org.apache.isis.WebServer" key="org.eclipse.jdt.launching.MAIN_TYPE"/>
+  <stringAttribute value="--type SERVER --port 8080" key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS"/>
+  <stringAttribute value="${rootArtifactId}-webapp" key="org.eclipse.jdt.launching.PROJECT_ATTR"/>
+  <stringAttribute value="org.eclipse.m2e.launchconfig.sourcepathProvider" key="org.eclipse.jdt.launching.SOURCE_PATH_PROVIDER"/>
+</launchConfiguration>

http://git-wip-us.apache.org/repos/asf/isis/blob/b06d913e/example/archetype/simpleapp/src/main/resources/archetype-resources/webapp/ide/intellij/launch/SimpleApp_PROTOTYPE_with_fixtures-bypass-security.xml
----------------------------------------------------------------------
diff --git a/example/archetype/simpleapp/src/main/resources/archetype-resources/webapp/ide/intellij/launch/SimpleApp_PROTOTYPE_with_fixtures-bypass-security.xml b/example/archetype/simpleapp/src/main/resources/archetype-resources/webapp/ide/intellij/launch/SimpleApp_PROTOTYPE_with_fixtures-bypass-security.xml
new file mode 100644
index 0000000..ad2c12e
--- /dev/null
+++ b/example/archetype/simpleapp/src/main/resources/archetype-resources/webapp/ide/intellij/launch/SimpleApp_PROTOTYPE_with_fixtures-bypass-security.xml
@@ -0,0 +1,31 @@
+#set( $symbol_pound = '#' )
+#set( $symbol_dollar = '$' )
+#set( $symbol_escape = '\' )
+<component name="ProjectRunConfigurationManager">
+  <configuration default="false" name="SimpleApp-PROTOTYPE (domainapp.app.DomainAppAppManifestWithFixturesBypassSecurity)" type="Application" factoryName="Application" singleton="true">
+    <extension name="coverage" enabled="false" merge="false" sample_coverage="true" runner="idea" />
+    <option name="MAIN_CLASS_NAME" value="org.apache.isis.WebServer" />
+    <option name="VM_PARAMETERS" value="" />
+    <option name="PROGRAM_PARAMETERS" value="--type SERVER_PROTOTYPE --port 8080 --manifest domainapp.app.DomainAppAppManifestWithFixturesBypassSecurity" />
+    <option name="WORKING_DIRECTORY" value="file://${symbol_dollar}MODULE_DIR${symbol_dollar}" />
+    <option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" />
+    <option name="ALTERNATIVE_JRE_PATH" value="" />
+    <option name="ENABLE_SWING_INSPECTOR" value="false" />
+    <option name="ENV_VARIABLES" />
+    <option name="PASS_PARENT_ENVS" value="true" />
+    <module name="${parentArtifactId}-webapp" />
+    <envs />
+    <RunnerSettings RunnerId="Debug">
+      <option name="DEBUG_PORT" value="" />
+      <option name="TRANSPORT" value="0" />
+      <option name="LOCAL" value="true" />
+    </RunnerSettings>
+    <RunnerSettings RunnerId="Run" />
+    <ConfigurationWrapper RunnerId="Debug" />
+    <ConfigurationWrapper RunnerId="Run" />
+    <method>
+      <option name="Make" enabled="false" />
+      <option name="Maven.BeforeRunTask" enabled="true" file="C:/Apache/Isis/example/application/${parentArtifactId}/dom/pom.xml" goal="datanucleus:enhance -o" />
+    </method>
+  </configuration>
+</component>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/isis/blob/b06d913e/example/archetype/simpleapp/src/main/resources/archetype-resources/webapp/ide/intellij/launch/SimpleApp_PROTOTYPE_with_fixtures.xml
----------------------------------------------------------------------
diff --git a/example/archetype/simpleapp/src/main/resources/archetype-resources/webapp/ide/intellij/launch/SimpleApp_PROTOTYPE_with_fixtures.xml b/example/archetype/simpleapp/src/main/resources/archetype-resources/webapp/ide/intellij/launch/SimpleApp_PROTOTYPE_with_fixtures.xml
new file mode 100644
index 0000000..fce6a52
--- /dev/null
+++ b/example/archetype/simpleapp/src/main/resources/archetype-resources/webapp/ide/intellij/launch/SimpleApp_PROTOTYPE_with_fixtures.xml
@@ -0,0 +1,31 @@
+#set( $symbol_pound = '#' )
+#set( $symbol_dollar = '$' )
+#set( $symbol_escape = '\' )
+<component name="ProjectRunConfigurationManager">
+  <configuration default="false" name="SimpleApp-PROTOTYPE (domainapp.app.DomainAppAppManifestWithFixtures)" type="Application" factoryName="Application" singleton="true">
+    <extension name="coverage" enabled="false" merge="false" sample_coverage="true" runner="idea" />
+    <option name="MAIN_CLASS_NAME" value="org.apache.isis.WebServer" />
+    <option name="VM_PARAMETERS" value="" />
+    <option name="PROGRAM_PARAMETERS" value="--type SERVER_PROTOTYPE --port 8080 --manifest domainapp.app.DomainAppAppManifestWithFixtures" />
+    <option name="WORKING_DIRECTORY" value="file://${symbol_dollar}MODULE_DIR${symbol_dollar}" />
+    <option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" />
+    <option name="ALTERNATIVE_JRE_PATH" value="" />
+    <option name="ENABLE_SWING_INSPECTOR" value="false" />
+    <option name="ENV_VARIABLES" />
+    <option name="PASS_PARENT_ENVS" value="true" />
+    <module name="${parentArtifactId}-webapp" />
+    <envs />
+    <RunnerSettings RunnerId="Debug">
+      <option name="DEBUG_PORT" value="" />
+      <option name="TRANSPORT" value="0" />
+      <option name="LOCAL" value="true" />
+    </RunnerSettings>
+    <RunnerSettings RunnerId="Run" />
+    <ConfigurationWrapper RunnerId="Debug" />
+    <ConfigurationWrapper RunnerId="Run" />
+    <method>
+      <option name="Make" enabled="false" />
+      <option name="Maven.BeforeRunTask" enabled="true" file="C:/Apache/Isis/example/application/${parentArtifactId}/dom/pom.xml" goal="datanucleus:enhance -o" />
+    </method>
+  </configuration>
+</component>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/isis/blob/b06d913e/example/archetype/simpleapp/src/main/resources/archetype-resources/webapp/ide/intellij/launch/SimpleApp_SERVER.xml
----------------------------------------------------------------------
diff --git a/example/archetype/simpleapp/src/main/resources/archetype-resources/webapp/ide/intellij/launch/SimpleApp_SERVER.xml b/example/archetype/simpleapp/src/main/resources/archetype-resources/webapp/ide/intellij/launch/SimpleApp_SERVER.xml
new file mode 100644
index 0000000..d2bb8d2
--- /dev/null
+++ b/example/archetype/simpleapp/src/main/resources/archetype-resources/webapp/ide/intellij/launch/SimpleApp_SERVER.xml
@@ -0,0 +1,31 @@
+#set( $symbol_pound = '#' )
+#set( $symbol_dollar = '$' )
+#set( $symbol_escape = '\' )
+<component name="ProjectRunConfigurationManager">
+  <configuration default="false" name="SimpleApp-SERVER" type="Application" factoryName="Application" singleton="true">
+    <extension name="coverage" enabled="false" merge="false" sample_coverage="true" runner="idea" />
+    <option name="MAIN_CLASS_NAME" value="org.apache.isis.WebServer" />
+    <option name="VM_PARAMETERS" value="" />
+    <option name="PROGRAM_PARAMETERS" value="--type SERVER --port 8080" />
+    <option name="WORKING_DIRECTORY" value="file://${symbol_dollar}MODULE_DIR${symbol_dollar}" />
+    <option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" />
+    <option name="ALTERNATIVE_JRE_PATH" value="" />
+    <option name="ENABLE_SWING_INSPECTOR" value="false" />
+    <option name="ENV_VARIABLES" />
+    <option name="PASS_PARENT_ENVS" value="true" />
+    <module name="${parentArtifactId}-webapp" />
+    <envs />
+    <RunnerSettings RunnerId="Debug">
+      <option name="DEBUG_PORT" value="" />
+      <option name="TRANSPORT" value="0" />
+      <option name="LOCAL" value="true" />
+    </RunnerSettings>
+    <RunnerSettings RunnerId="Run" />
+    <ConfigurationWrapper RunnerId="Debug" />
+    <ConfigurationWrapper RunnerId="Run" />
+    <method>
+      <option name="Make" enabled="false" />
+      <option name="Maven.BeforeRunTask" enabled="true" file="C:/Apache/Isis/example/application/${parentArtifactId}/dom/pom.xml" goal="datanucleus:enhance -o" />
+    </method>
+  </configuration>
+</component>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/isis/blob/b06d913e/example/archetype/simpleapp/src/main/resources/archetype-resources/webapp/ide/intellij/launch/SimpleApp__enhance_only_.xml
----------------------------------------------------------------------
diff --git a/example/archetype/simpleapp/src/main/resources/archetype-resources/webapp/ide/intellij/launch/SimpleApp__enhance_only_.xml b/example/archetype/simpleapp/src/main/resources/archetype-resources/webapp/ide/intellij/launch/SimpleApp__enhance_only_.xml
index cc13dea..38d337c 100644
--- a/example/archetype/simpleapp/src/main/resources/archetype-resources/webapp/ide/intellij/launch/SimpleApp__enhance_only_.xml
+++ b/example/archetype/simpleapp/src/main/resources/archetype-resources/webapp/ide/intellij/launch/SimpleApp__enhance_only_.xml
@@ -2,7 +2,7 @@
 #set( $symbol_dollar = '$' )
 #set( $symbol_escape = '\' )
 <component name="ProjectRunConfigurationManager">
-s  <configuration default="false" name="SimpleApp (enhance only)" type="Application" factoryName="Application">
+  <configuration default="false" name="SimpleApp (enhance only)" type="Application" factoryName="Application">
     <extension name="coverage" enabled="false" merge="false" sample_coverage="true" runner="idea" />
     <option name="MAIN_CLASS_NAME" value="org.apache.isis.Dummy" />
     <option name="VM_PARAMETERS" value="" />

http://git-wip-us.apache.org/repos/asf/isis/blob/b06d913e/example/archetype/simpleapp/src/main/resources/archetype-resources/webapp/src/main/jettyconsole/isis-banner.pdn
----------------------------------------------------------------------
diff --git a/example/archetype/simpleapp/src/main/resources/archetype-resources/webapp/src/main/jettyconsole/isis-banner.pdn b/example/archetype/simpleapp/src/main/resources/archetype-resources/webapp/src/main/jettyconsole/isis-banner.pdn
index 37543c9..43a53e6 100644
Binary files a/example/archetype/simpleapp/src/main/resources/archetype-resources/webapp/src/main/jettyconsole/isis-banner.pdn and b/example/archetype/simpleapp/src/main/resources/archetype-resources/webapp/src/main/jettyconsole/isis-banner.pdn differ

http://git-wip-us.apache.org/repos/asf/isis/blob/b06d913e/example/archetype/simpleapp/src/main/resources/archetype-resources/webapp/src/main/jettyconsole/isis-banner.png
----------------------------------------------------------------------
diff --git a/example/archetype/simpleapp/src/main/resources/archetype-resources/webapp/src/main/jettyconsole/isis-banner.png b/example/archetype/simpleapp/src/main/resources/archetype-resources/webapp/src/main/jettyconsole/isis-banner.png
index cd9ecfe..cf10bef 100644
Binary files a/example/archetype/simpleapp/src/main/resources/archetype-resources/webapp/src/main/jettyconsole/isis-banner.png and b/example/archetype/simpleapp/src/main/resources/archetype-resources/webapp/src/main/jettyconsole/isis-banner.png differ

http://git-wip-us.apache.org/repos/asf/isis/blob/b06d913e/example/archetype/simpleapp/src/test/resources/projects/basic/archetype.properties
----------------------------------------------------------------------
diff --git a/example/archetype/simpleapp/src/test/resources/projects/basic/archetype.properties b/example/archetype/simpleapp/src/test/resources/projects/basic/archetype.properties
index 24a32b3..dd5ee5c 100644
--- a/example/archetype/simpleapp/src/test/resources/projects/basic/archetype.properties
+++ b/example/archetype/simpleapp/src/test/resources/projects/basic/archetype.properties
@@ -1,4 +1,4 @@
-#Tue Dec 29 13:00:20 GMT 2015
+#Sun Jan 10 15:24:45 GMT 2016
 package=it.pkg
 version=0.1-SNAPSHOT
 groupId=archetype.it


[49/50] [abbrv] isis git commit: ISIS-993: metadata classes, facet factory, starting on the wicket component

Posted by da...@apache.org.
ISIS-993: metadata classes, facet factory, starting on the wicket component


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

Branch: refs/heads/ISIS-993
Commit: 99f808c1ddae5eeff63a57f8a2616d6e92b78957
Parents: 3fc1eb2
Author: Dan Haywood <da...@haywood-associates.co.uk>
Authored: Wed Jan 6 08:59:52 2016 +0000
Committer: Dan Haywood <da...@haywood-associates.co.uk>
Committed: Mon Jan 25 14:38:24 2016 +0000

----------------------------------------------------------------------
 .../schema/applib/layout/layout-1.0.xsd         | 210 +++++++++++++++++++
 .../asciidoc/schema/applib/layout/layout.xsd    | 210 +++++++++++++++++++
 .../isis/applib/annotation/ActionLayout.java    |   8 +
 .../isis/applib/annotation/BookmarkPolicy.java  |   5 +
 .../applib/annotation/CollectionLayout.java     |   4 +-
 .../isis/applib/annotation/Contributed.java     |   5 +
 .../isis/applib/annotation/LabelPosition.java   |   5 +
 .../isis/applib/annotation/RenderType.java      |   5 +
 .../apache/isis/applib/annotation/Where.java    |   5 +
 .../isis/applib/annotation/package-info.java    |  31 ---
 .../apache/isis/applib/layout/v1_0/Action.java  |  62 ++++++
 .../isis/applib/layout/v1_0/ActionLayout.java   | 161 ++++++++++++++
 .../isis/applib/layout/v1_0/Collection.java     |  79 +++++++
 .../applib/layout/v1_0/CollectionLayout.java    | 148 +++++++++++++
 .../apache/isis/applib/layout/v1_0/Column.java  |  76 +++++++
 .../isis/applib/layout/v1_0/DomainObject.java   |  69 ++++++
 .../isis/applib/layout/v1_0/Property.java       |  77 +++++++
 .../isis/applib/layout/v1_0/PropertyGroup.java  |  86 ++++++++
 .../isis/applib/layout/v1_0/PropertyLayout.java | 147 +++++++++++++
 .../org/apache/isis/applib/layout/v1_0/Tab.java |  81 +++++++
 .../isis/applib/layout/v1_0/TabGroup.java       |  46 ++++
 .../isis/applib/layout/v1_0/package-info.java   |  25 +++
 .../jaxb/CatalogingSchemaOutputResolver.java    |  83 ++++++++
 .../isis/applib/services/jaxb/JaxbService.java  | 152 +++++++++++++-
 .../services/jaxb/StreamResultWithWriter.java   |  45 ++++
 .../DomainServiceLayoutFacetFactory.java        |  84 ++++++++
 .../DomainServiceLayoutFactory.java             |  84 --------
 .../facets/object/layoutxml/LayoutXmlFacet.java |  32 +++
 .../object/layoutxml/LayoutXmlFacetDefault.java |  85 ++++++++
 .../object/layoutxml/LayoutXmlFacetFactory.java |  98 +++++++++
 .../dflt/ProgrammingModelFacetsJava5.java       |   7 +-
 .../DomainServiceLayoutFacetFactoryTest.java    | 129 ++++++++++++
 .../DomainServiceLayoutFactoryTest.java         | 129 ------------
 .../layoutxml/v1_0/DomainObjectTest.java        | 101 +++++++++
 .../jaxb/CatalogingSchemaOutputResolver.java    |  85 --------
 .../services/jaxb/JaxbServiceDefault.java       | 111 +---------
 .../services/jaxb/StreamResultWithWriter.java   |  45 ----
 .../ComponentFactoryRegistrarDefault.java       |  28 ++-
 .../entity/EntityComponentFactoryAbstract.java  |  14 +-
 .../entity/tabbed/EntityTabbedPanel.html        |  27 +++
 .../entity/tabbed/EntityTabbedPanel.java        |  59 ++++++
 .../entity/tabbed/EntityTabbedPanelFactory.java |  56 +++++
 .../dom/simple/SimpleObject.layout.xml          |  44 ++++
 43 files changed, 2557 insertions(+), 486 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/isis/blob/99f808c1/adocs/documentation/src/main/asciidoc/schema/applib/layout/layout-1.0.xsd
----------------------------------------------------------------------
diff --git a/adocs/documentation/src/main/asciidoc/schema/applib/layout/layout-1.0.xsd b/adocs/documentation/src/main/asciidoc/schema/applib/layout/layout-1.0.xsd
new file mode 100644
index 0000000..97ab131
--- /dev/null
+++ b/adocs/documentation/src/main/asciidoc/schema/applib/layout/layout-1.0.xsd
@@ -0,0 +1,210 @@
+<?xml version="1.0" standalone="yes"?>
+<xs:schema elementFormDefault="qualified" version="1.0" targetNamespace="http://isis.apache.org/schema/applib/layout" xmlns:tns="http://isis.apache.org/schema/applib/layout" xmlns:xs="http://www.w3.org/2001/XMLSchema">
+
+  <xs:element name="domainObject" type="tns:domainObject"/>
+
+  <xs:complexType name="domainObject">
+    <xs:sequence>
+      <xs:element name="actions">
+        <xs:complexType>
+          <xs:sequence>
+            <xs:element name="action" type="tns:action" minOccurs="0" maxOccurs="unbounded"/>
+          </xs:sequence>
+        </xs:complexType>
+      </xs:element>
+      <xs:element name="tabGroups">
+        <xs:complexType>
+          <xs:sequence>
+            <xs:element name="tabGroup" type="tns:tabGroup" maxOccurs="unbounded"/>
+          </xs:sequence>
+        </xs:complexType>
+      </xs:element>
+    </xs:sequence>
+  </xs:complexType>
+
+  <xs:complexType name="action">
+    <xs:sequence>
+      <xs:element name="layout" type="tns:actionLayout"/>
+    </xs:sequence>
+    <xs:attribute name="identifier" type="xs:string" use="required"/>
+  </xs:complexType>
+
+  <xs:complexType name="actionLayout">
+    <xs:sequence>
+      <xs:element name="bookmarking" type="tns:bookmarkPolicy" default="NEVER" minOccurs="0"/>
+      <xs:element name="cssClass" type="xs:string" minOccurs="0"/>
+      <xs:element name="cssClassFa" type="xs:string" minOccurs="0"/>
+      <xs:element name="cssClassFaPosition" type="tns:cssClassFaPosition" minOccurs="0"/>
+      <xs:element name="describedAs" type="xs:string" minOccurs="0"/>
+      <xs:element name="hidden" type="tns:where" minOccurs="0"/>
+      <xs:element name="named" type="xs:string" minOccurs="0"/>
+      <xs:element name="namedEscaped" type="xs:boolean" minOccurs="0"/>
+      <xs:element name="position" type="tns:position" default="BELOW"/>
+    </xs:sequence>
+  </xs:complexType>
+
+  <xs:complexType name="tabGroup">
+    <xs:sequence>
+      <xs:element name="tabs">
+        <xs:complexType>
+          <xs:sequence>
+            <xs:element name="tab" type="tns:tab" maxOccurs="unbounded"/>
+          </xs:sequence>
+        </xs:complexType>
+      </xs:element>
+    </xs:sequence>
+  </xs:complexType>
+
+  <xs:complexType name="tab">
+    <xs:sequence>
+      <xs:element name="name" type="xs:string" minOccurs="0"/>
+      <xs:element name="left" type="tns:column"/>
+      <xs:element name="middle" type="tns:column" minOccurs="0"/>
+      <xs:element name="right" type="tns:column" minOccurs="0"/>
+    </xs:sequence>
+  </xs:complexType>
+
+  <xs:complexType name="column">
+    <xs:sequence>
+      <xs:element name="span" type="xs:int" default="4"/>
+      <xs:element name="propertyGroups">
+        <xs:complexType>
+          <xs:sequence>
+            <xs:element name="propertyGroup" type="tns:propertyGroup" minOccurs="0" maxOccurs="unbounded"/>
+          </xs:sequence>
+        </xs:complexType>
+      </xs:element>
+      <xs:element name="collections">
+        <xs:complexType>
+          <xs:sequence>
+            <xs:element name="collection" type="tns:collection" minOccurs="0" maxOccurs="unbounded"/>
+          </xs:sequence>
+        </xs:complexType>
+      </xs:element>
+    </xs:sequence>
+  </xs:complexType>
+
+  <xs:complexType name="propertyGroup">
+    <xs:sequence>
+      <xs:element name="actions">
+        <xs:complexType>
+          <xs:sequence>
+            <xs:element name="action" type="tns:action" minOccurs="0" maxOccurs="unbounded"/>
+          </xs:sequence>
+        </xs:complexType>
+      </xs:element>
+      <xs:element name="properties">
+        <xs:complexType>
+          <xs:sequence>
+            <xs:element name="property" type="tns:property" maxOccurs="unbounded"/>
+          </xs:sequence>
+        </xs:complexType>
+      </xs:element>
+    </xs:sequence>
+    <xs:attribute name="name" type="xs:string" use="required"/>
+  </xs:complexType>
+
+  <xs:complexType name="property">
+    <xs:sequence>
+      <xs:element name="layout" type="tns:propertyLayout"/>
+      <xs:element name="actions" minOccurs="0">
+        <xs:complexType>
+          <xs:sequence>
+            <xs:element name="action" type="tns:action" maxOccurs="unbounded"/>
+          </xs:sequence>
+        </xs:complexType>
+      </xs:element>
+    </xs:sequence>
+    <xs:attribute name="identifier" type="xs:string" use="required"/>
+  </xs:complexType>
+
+  <xs:complexType name="propertyLayout">
+    <xs:sequence>
+      <xs:element name="cssClass" type="xs:string" minOccurs="0"/>
+      <xs:element name="describedAs" type="xs:string" minOccurs="0"/>
+      <xs:element name="hidden" type="tns:where" minOccurs="0"/>
+      <xs:element name="labelPosition" type="tns:labelPosition" default="LEFT"/>
+      <xs:element name="multiLine" type="xs:int" minOccurs="0"/>
+      <xs:element name="named" type="xs:string" minOccurs="0"/>
+      <xs:element name="namedEscaped" type="xs:boolean" minOccurs="0"/>
+      <xs:element name="renderedAsDayBefore" type="xs:boolean" minOccurs="0"/>
+      <xs:element name="typicalLength" type="xs:int" default="-1"/>
+    </xs:sequence>
+  </xs:complexType>
+
+  <xs:complexType name="collection">
+    <xs:sequence>
+      <xs:element name="layout" type="tns:collectionLayout"/>
+      <xs:element name="actions">
+        <xs:complexType>
+          <xs:sequence>
+            <xs:element name="action" type="tns:action" minOccurs="0" maxOccurs="unbounded"/>
+          </xs:sequence>
+        </xs:complexType>
+      </xs:element>
+    </xs:sequence>
+    <xs:attribute name="identifier" type="xs:string" use="required"/>
+  </xs:complexType>
+
+  <xs:complexType name="collectionLayout">
+    <xs:sequence>
+      <xs:element name="cssClass" type="xs:string" minOccurs="0"/>
+      <xs:element name="describedAs" type="xs:string" minOccurs="0"/>
+      <xs:element name="defaultView" type="xs:string" default="table"/>
+      <xs:element name="hidden" type="tns:where" minOccurs="0"/>
+      <xs:element name="named" type="xs:string" minOccurs="0"/>
+      <xs:element name="namedEscaped" type="xs:boolean" minOccurs="0"/>
+      <xs:element name="paged" type="xs:int" minOccurs="0"/>
+      <xs:element name="sortedBy" type="xs:string" minOccurs="0"/>
+    </xs:sequence>
+  </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>

http://git-wip-us.apache.org/repos/asf/isis/blob/99f808c1/adocs/documentation/src/main/asciidoc/schema/applib/layout/layout.xsd
----------------------------------------------------------------------
diff --git a/adocs/documentation/src/main/asciidoc/schema/applib/layout/layout.xsd b/adocs/documentation/src/main/asciidoc/schema/applib/layout/layout.xsd
new file mode 100644
index 0000000..97ab131
--- /dev/null
+++ b/adocs/documentation/src/main/asciidoc/schema/applib/layout/layout.xsd
@@ -0,0 +1,210 @@
+<?xml version="1.0" standalone="yes"?>
+<xs:schema elementFormDefault="qualified" version="1.0" targetNamespace="http://isis.apache.org/schema/applib/layout" xmlns:tns="http://isis.apache.org/schema/applib/layout" xmlns:xs="http://www.w3.org/2001/XMLSchema">
+
+  <xs:element name="domainObject" type="tns:domainObject"/>
+
+  <xs:complexType name="domainObject">
+    <xs:sequence>
+      <xs:element name="actions">
+        <xs:complexType>
+          <xs:sequence>
+            <xs:element name="action" type="tns:action" minOccurs="0" maxOccurs="unbounded"/>
+          </xs:sequence>
+        </xs:complexType>
+      </xs:element>
+      <xs:element name="tabGroups">
+        <xs:complexType>
+          <xs:sequence>
+            <xs:element name="tabGroup" type="tns:tabGroup" maxOccurs="unbounded"/>
+          </xs:sequence>
+        </xs:complexType>
+      </xs:element>
+    </xs:sequence>
+  </xs:complexType>
+
+  <xs:complexType name="action">
+    <xs:sequence>
+      <xs:element name="layout" type="tns:actionLayout"/>
+    </xs:sequence>
+    <xs:attribute name="identifier" type="xs:string" use="required"/>
+  </xs:complexType>
+
+  <xs:complexType name="actionLayout">
+    <xs:sequence>
+      <xs:element name="bookmarking" type="tns:bookmarkPolicy" default="NEVER" minOccurs="0"/>
+      <xs:element name="cssClass" type="xs:string" minOccurs="0"/>
+      <xs:element name="cssClassFa" type="xs:string" minOccurs="0"/>
+      <xs:element name="cssClassFaPosition" type="tns:cssClassFaPosition" minOccurs="0"/>
+      <xs:element name="describedAs" type="xs:string" minOccurs="0"/>
+      <xs:element name="hidden" type="tns:where" minOccurs="0"/>
+      <xs:element name="named" type="xs:string" minOccurs="0"/>
+      <xs:element name="namedEscaped" type="xs:boolean" minOccurs="0"/>
+      <xs:element name="position" type="tns:position" default="BELOW"/>
+    </xs:sequence>
+  </xs:complexType>
+
+  <xs:complexType name="tabGroup">
+    <xs:sequence>
+      <xs:element name="tabs">
+        <xs:complexType>
+          <xs:sequence>
+            <xs:element name="tab" type="tns:tab" maxOccurs="unbounded"/>
+          </xs:sequence>
+        </xs:complexType>
+      </xs:element>
+    </xs:sequence>
+  </xs:complexType>
+
+  <xs:complexType name="tab">
+    <xs:sequence>
+      <xs:element name="name" type="xs:string" minOccurs="0"/>
+      <xs:element name="left" type="tns:column"/>
+      <xs:element name="middle" type="tns:column" minOccurs="0"/>
+      <xs:element name="right" type="tns:column" minOccurs="0"/>
+    </xs:sequence>
+  </xs:complexType>
+
+  <xs:complexType name="column">
+    <xs:sequence>
+      <xs:element name="span" type="xs:int" default="4"/>
+      <xs:element name="propertyGroups">
+        <xs:complexType>
+          <xs:sequence>
+            <xs:element name="propertyGroup" type="tns:propertyGroup" minOccurs="0" maxOccurs="unbounded"/>
+          </xs:sequence>
+        </xs:complexType>
+      </xs:element>
+      <xs:element name="collections">
+        <xs:complexType>
+          <xs:sequence>
+            <xs:element name="collection" type="tns:collection" minOccurs="0" maxOccurs="unbounded"/>
+          </xs:sequence>
+        </xs:complexType>
+      </xs:element>
+    </xs:sequence>
+  </xs:complexType>
+
+  <xs:complexType name="propertyGroup">
+    <xs:sequence>
+      <xs:element name="actions">
+        <xs:complexType>
+          <xs:sequence>
+            <xs:element name="action" type="tns:action" minOccurs="0" maxOccurs="unbounded"/>
+          </xs:sequence>
+        </xs:complexType>
+      </xs:element>
+      <xs:element name="properties">
+        <xs:complexType>
+          <xs:sequence>
+            <xs:element name="property" type="tns:property" maxOccurs="unbounded"/>
+          </xs:sequence>
+        </xs:complexType>
+      </xs:element>
+    </xs:sequence>
+    <xs:attribute name="name" type="xs:string" use="required"/>
+  </xs:complexType>
+
+  <xs:complexType name="property">
+    <xs:sequence>
+      <xs:element name="layout" type="tns:propertyLayout"/>
+      <xs:element name="actions" minOccurs="0">
+        <xs:complexType>
+          <xs:sequence>
+            <xs:element name="action" type="tns:action" maxOccurs="unbounded"/>
+          </xs:sequence>
+        </xs:complexType>
+      </xs:element>
+    </xs:sequence>
+    <xs:attribute name="identifier" type="xs:string" use="required"/>
+  </xs:complexType>
+
+  <xs:complexType name="propertyLayout">
+    <xs:sequence>
+      <xs:element name="cssClass" type="xs:string" minOccurs="0"/>
+      <xs:element name="describedAs" type="xs:string" minOccurs="0"/>
+      <xs:element name="hidden" type="tns:where" minOccurs="0"/>
+      <xs:element name="labelPosition" type="tns:labelPosition" default="LEFT"/>
+      <xs:element name="multiLine" type="xs:int" minOccurs="0"/>
+      <xs:element name="named" type="xs:string" minOccurs="0"/>
+      <xs:element name="namedEscaped" type="xs:boolean" minOccurs="0"/>
+      <xs:element name="renderedAsDayBefore" type="xs:boolean" minOccurs="0"/>
+      <xs:element name="typicalLength" type="xs:int" default="-1"/>
+    </xs:sequence>
+  </xs:complexType>
+
+  <xs:complexType name="collection">
+    <xs:sequence>
+      <xs:element name="layout" type="tns:collectionLayout"/>
+      <xs:element name="actions">
+        <xs:complexType>
+          <xs:sequence>
+            <xs:element name="action" type="tns:action" minOccurs="0" maxOccurs="unbounded"/>
+          </xs:sequence>
+        </xs:complexType>
+      </xs:element>
+    </xs:sequence>
+    <xs:attribute name="identifier" type="xs:string" use="required"/>
+  </xs:complexType>
+
+  <xs:complexType name="collectionLayout">
+    <xs:sequence>
+      <xs:element name="cssClass" type="xs:string" minOccurs="0"/>
+      <xs:element name="describedAs" type="xs:string" minOccurs="0"/>
+      <xs:element name="defaultView" type="xs:string" default="table"/>
+      <xs:element name="hidden" type="tns:where" minOccurs="0"/>
+      <xs:element name="named" type="xs:string" minOccurs="0"/>
+      <xs:element name="namedEscaped" type="xs:boolean" minOccurs="0"/>
+      <xs:element name="paged" type="xs:int" minOccurs="0"/>
+      <xs:element name="sortedBy" type="xs:string" minOccurs="0"/>
+    </xs:sequence>
+  </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>

http://git-wip-us.apache.org/repos/asf/isis/blob/99f808c1/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 52a652f..d8255c5 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
@@ -25,6 +25,8 @@ import java.lang.annotation.Retention;
 import java.lang.annotation.RetentionPolicy;
 import java.lang.annotation.Target;
 
+import javax.xml.bind.annotation.XmlType;
+
 /**
  * Layout hints for actions.
  */
@@ -72,6 +74,9 @@ public @interface ActionLayout {
      */
     CssClassFaPosition cssClassFaPosition() default CssClassFaPosition.LEFT;
 
+    @XmlType(
+            namespace = "http://isis.apache.org/schema/applib/layout"
+    )
     enum CssClassFaPosition {
         LEFT, RIGHT
     }
@@ -109,6 +114,9 @@ public @interface ActionLayout {
      */
     Position position() default Position.BELOW;
 
+    @XmlType(
+            namespace = "http://isis.apache.org/schema/applib/layout"
+    )
     enum Position {
         BELOW,
         RIGHT,

http://git-wip-us.apache.org/repos/asf/isis/blob/99f808c1/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 83a90f3..b6b1fb3 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
@@ -19,6 +19,11 @@
 
 package org.apache.isis.applib.annotation;
 
+import javax.xml.bind.annotation.XmlType;
+
+@XmlType(
+        namespace = "http://isis.apache.org/schema/applib/layout"
+)
 public enum BookmarkPolicy {
     /**
      * Can be bookmarked, and is a top-level 'root' (or parent) bookmark.

http://git-wip-us.apache.org/repos/asf/isis/blob/99f808c1/core/applib/src/main/java/org/apache/isis/applib/annotation/CollectionLayout.java
----------------------------------------------------------------------
diff --git a/core/applib/src/main/java/org/apache/isis/applib/annotation/CollectionLayout.java b/core/applib/src/main/java/org/apache/isis/applib/annotation/CollectionLayout.java
index 8216c66..d73f3c6 100644
--- a/core/applib/src/main/java/org/apache/isis/applib/annotation/CollectionLayout.java
+++ b/core/applib/src/main/java/org/apache/isis/applib/annotation/CollectionLayout.java
@@ -103,7 +103,7 @@ public @interface CollectionLayout {
      * If annotated on a type, then the page size refers to standalone
      * collections (eg as returned from a repository query).
      */
-    public int paged() default -1;
+    int paged() default -1;
 
 
     // //////////////////////////////////////
@@ -124,7 +124,7 @@ public @interface CollectionLayout {
      * There is some similarity between this concept and that of eager-loading as supported by some object stores.
      * </p>
      */
-    public RenderType render() default RenderType.LAZILY;
+    RenderType render() default RenderType.LAZILY;
 
 
     // //////////////////////////////////////

http://git-wip-us.apache.org/repos/asf/isis/blob/99f808c1/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 88c46ea..81821bb 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
@@ -19,9 +19,14 @@
 
 package org.apache.isis.applib.annotation;
 
+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"
+)
 public enum Contributed {
     /**
      * Default: contributed as both an action and also (if takes a single argument and has safe semantics) as an association

http://git-wip-us.apache.org/repos/asf/isis/blob/99f808c1/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 c4cdc10..a91d280 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
@@ -18,12 +18,17 @@
  */
 package org.apache.isis.applib.annotation;
 
+import javax.xml.bind.annotation.XmlType;
+
 /**
  * The positioning of a label for a property or action parameter.
  *
  * @see org.apache.isis.applib.annotation.PropertyLayout
  * @see org.apache.isis.applib.annotation.ParameterLayout
  */
+@XmlType(
+        namespace = "http://isis.apache.org/schema/applib/layout"
+)
 public enum LabelPosition {
     DEFAULT,
     LEFT,

http://git-wip-us.apache.org/repos/asf/isis/blob/99f808c1/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 776f8f6..5363b38 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
@@ -18,6 +18,11 @@
  */
 package org.apache.isis.applib.annotation;
 
+import javax.xml.bind.annotation.XmlType;
+
+@XmlType(
+        namespace = "http://isis.apache.org/schema/applib/layout"
+)
 public enum RenderType {
     EAGERLY,
     LAZILY;

http://git-wip-us.apache.org/repos/asf/isis/blob/99f808c1/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 5dbbded..e89403d 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
@@ -19,6 +19,8 @@
 
 package org.apache.isis.applib.annotation;
 
+import javax.xml.bind.annotation.XmlType;
+
 import org.apache.isis.applib.util.Enums;
 
 /**
@@ -38,6 +40,9 @@ import org.apache.isis.applib.util.Enums;
  * This enum is also used internally within the framework.  When rendering an element,
  * the framework developer should only use those values that represent concrete locations.  
  */
+@XmlType(
+        namespace = "http://isis.apache.org/schema/applib/layout"
+)
 public enum Where {
     /**
      * The member should be disabled/hidden everywhere.

http://git-wip-us.apache.org/repos/asf/isis/blob/99f808c1/core/applib/src/main/java/org/apache/isis/applib/annotation/package-info.java
----------------------------------------------------------------------
diff --git a/core/applib/src/main/java/org/apache/isis/applib/annotation/package-info.java b/core/applib/src/main/java/org/apache/isis/applib/annotation/package-info.java
deleted file mode 100644
index fbea3bc..0000000
--- a/core/applib/src/main/java/org/apache/isis/applib/annotation/package-info.java
+++ /dev/null
@@ -1,31 +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 package defines all of the annotations that are recognized within
- * the default Isis programming model.
- * 
- * <p>
- * For example, {@link org.apache.isis.applib.annotation.Optional} is used to
- * indicate that a property or a parameter is optional rather than mandatory.
- * The {@link org.apache.isis.applib.annotation.MaxLength} annotation is used
- * to indicate the maximum length allowable for a (string) property or
- * parameter, or to indicate the maximum length of a (string-based) value type.
- */
-package org.apache.isis.applib.annotation;
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/isis/blob/99f808c1/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/Action.java
----------------------------------------------------------------------
diff --git a/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/Action.java b/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/Action.java
new file mode 100644
index 0000000..9037c04
--- /dev/null
+++ b/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/Action.java
@@ -0,0 +1,62 @@
+/*
+ *  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.v1_0;
+
+import javax.xml.bind.annotation.XmlAttribute;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlType;
+
+@XmlType(
+        propOrder = {
+                "identifier"
+                , "layout"
+        }
+)
+public class Action {
+
+
+    private String identifier;
+    /**
+     * Method name.
+     *
+     * <p>
+     *     Overloaded methods are not supported.
+     * </p>
+     */
+    @XmlAttribute(required = true)
+    public String getIdentifier() {
+        return identifier;
+    }
+
+    public void setIdentifier(String identifier) {
+        this.identifier = identifier;
+    }
+
+
+
+    private ActionLayout layout = new ActionLayout();
+    @XmlElement(required = true)
+    public ActionLayout getLayout() {
+        return layout;
+    }
+
+    public void setLayout(ActionLayout layout) {
+        this.layout = layout;
+    }
+}

http://git-wip-us.apache.org/repos/asf/isis/blob/99f808c1/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/ActionLayout.java
----------------------------------------------------------------------
diff --git a/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/ActionLayout.java b/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/ActionLayout.java
new file mode 100644
index 0000000..4fb4934
--- /dev/null
+++ b/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/ActionLayout.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.applib.layout.v1_0;
+
+
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlType;
+
+import org.apache.isis.applib.annotation.BookmarkPolicy;
+import org.apache.isis.applib.annotation.Where;
+
+/**
+ * Broadly corresponds 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>
+ */
+@XmlType(
+        propOrder = {
+                "bookmarking"
+                , "cssClass"
+                , "cssClassFa"
+                , "cssClassFaPosition"
+                , "describedAs"
+                , "hidden"
+                , "named"
+                , "namedEscaped"
+                , "position"
+        }
+)
+public class ActionLayout {
+
+    private BookmarkPolicy bookmarking = BookmarkPolicy.NEVER;
+
+    @XmlElement(required = false, defaultValue = "NEVER")
+    public BookmarkPolicy getBookmarking() {
+        return bookmarking;
+    }
+
+    public void setBookmarking(BookmarkPolicy bookmarking) {
+        this.bookmarking = bookmarking;
+    }
+
+
+    private String cssClass;
+
+    @XmlElement(required = false)
+    public String getCssClass() {
+        return cssClass;
+    }
+
+    public void setCssClass(String cssClass) {
+        this.cssClass = cssClass;
+    }
+
+
+    private String cssClassFa;
+
+    @XmlElement(required = false)
+    public String getCssClassFa() {
+        return cssClassFa;
+    }
+
+    public void setCssClassFa(String cssClassFa) {
+        this.cssClassFa = cssClassFa;
+    }
+
+
+
+    private org.apache.isis.applib.annotation.ActionLayout.CssClassFaPosition cssClassFaPosition;
+
+    @XmlElement(required = false)
+    public org.apache.isis.applib.annotation.ActionLayout.CssClassFaPosition getCssClassFaPosition() {
+        return cssClassFaPosition;
+    }
+
+    public void setCssClassFaPosition(org.apache.isis.applib.annotation.ActionLayout.CssClassFaPosition cssClassFaPosition) {
+        this.cssClassFaPosition = cssClassFaPosition;
+    }
+
+
+    private String describedAs;
+
+    @XmlElement(required = false)
+    public String getDescribedAs() {
+        return describedAs;
+    }
+
+    public void setDescribedAs(String describedAs) {
+        this.describedAs = describedAs;
+    }
+
+
+
+    private Where hidden;
+
+    @XmlElement(required = false)
+    public Where getHidden() {
+        return hidden;
+    }
+
+    public void setHidden(Where hidden) {
+        this.hidden = hidden;
+    }
+
+
+
+    private String named;
+
+    @XmlElement(required = false)
+    public String getNamed() {
+        return named;
+    }
+
+    public void setNamed(String named) {
+        this.named = named;
+    }
+
+
+
+    private Boolean namedEscaped;
+
+    @XmlElement(required = false)
+    public Boolean getNamedEscaped() {
+        return namedEscaped;
+    }
+
+    public void setNamedEscaped(Boolean namedEscaped) {
+        this.namedEscaped = namedEscaped;
+    }
+
+
+
+    private org.apache.isis.applib.annotation.ActionLayout.Position position = org.apache.isis.applib.annotation.ActionLayout.Position.BELOW;
+
+    @XmlElement(required = true, defaultValue = "BELOW")
+    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;
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/isis/blob/99f808c1/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/Collection.java
----------------------------------------------------------------------
diff --git a/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/Collection.java b/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/Collection.java
new file mode 100644
index 0000000..3796f5f
--- /dev/null
+++ b/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/Collection.java
@@ -0,0 +1,79 @@
+/*
+ *  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.v1_0;
+
+import java.util.List;
+
+import javax.xml.bind.annotation.XmlAttribute;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlElementWrapper;
+import javax.xml.bind.annotation.XmlType;
+
+import com.google.common.collect.Lists;
+
+@XmlType(
+        propOrder = {
+                "identifier"
+                , "layout"
+                , "actions"
+        }
+)
+public class Collection {
+
+    private String identifier;
+
+    /**
+     * Collection identifier, being the getter method without "get" prefix, first letter lower cased.
+     */
+    @XmlAttribute(required = true)
+    public String getIdentifier() {
+        return identifier;
+    }
+
+    public void setIdentifier(String identifier) {
+        this.identifier = identifier;
+    }
+
+
+
+    private CollectionLayout layout = new CollectionLayout();
+
+    @XmlElement(required = true)
+    public CollectionLayout getLayout() {
+        return layout;
+    }
+
+    public void setLayout(CollectionLayout layout) {
+        this.layout = layout;
+    }
+
+
+
+    private List<Action> actions = Lists.newArrayList();
+
+    @XmlElementWrapper(required = true)
+    @XmlElement(name = "action", required = false)
+    public List<Action> getActions() {
+        return actions;
+    }
+
+    public void setActions(List<Action> actions) {
+        this.actions = actions;
+    }
+}

http://git-wip-us.apache.org/repos/asf/isis/blob/99f808c1/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/CollectionLayout.java
----------------------------------------------------------------------
diff --git a/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/CollectionLayout.java b/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/CollectionLayout.java
new file mode 100644
index 0000000..21c9273
--- /dev/null
+++ b/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/CollectionLayout.java
@@ -0,0 +1,148 @@
+/**
+ *  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.v1_0;
+
+
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlType;
+
+import org.apache.isis.applib.annotation.Where;
+
+/**
+ * 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>
+ */
+@XmlType(
+        propOrder = {
+                "cssClass"
+                ,"describedAs"
+                ,"defaultView"
+                ,"hidden"
+                ,"named"
+                ,"namedEscaped"
+                ,"paged"
+                ,"sortedBy"
+        }
+)
+public class CollectionLayout {
+
+    private String cssClass;
+
+    @XmlElement(required = false)
+    public String getCssClass() {
+        return cssClass;
+    }
+
+    public void setCssClass(String cssClass) {
+        this.cssClass = cssClass;
+    }
+
+
+
+    private String describedAs;
+
+    @XmlElement(required = false)
+    public String getDescribedAs() {
+        return describedAs;
+    }
+
+    public void setDescribedAs(String describedAs) {
+        this.describedAs = describedAs;
+    }
+
+
+
+    private String defaultView = "table";
+
+    /**
+     * 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>.
+     */
+    @XmlElement(required = true, defaultValue = "table")
+    public String getDefaultView() {
+        return defaultView;
+    }
+
+    public void setDefaultView(String defaultView) {
+        this.defaultView = defaultView;
+    }
+
+
+    private Where hidden;
+
+    @XmlElement(required = false)
+    public Where getHidden() {
+        return hidden;
+    }
+
+    public void setHidden(Where hidden) {
+        this.hidden = hidden;
+    }
+
+
+    private String named;
+
+    @XmlElement(required = false)
+    public String getNamed() {
+        return named;
+    }
+
+    public void setNamed(String named) {
+        this.named = named;
+    }
+
+
+    private Boolean namedEscaped;
+
+    @XmlElement(required = false)
+    public Boolean getNamedEscaped() {
+        return namedEscaped;
+    }
+
+    public void setNamedEscaped(Boolean namedEscaped) {
+        this.namedEscaped = namedEscaped;
+    }
+
+
+    private Integer paged;
+
+    @XmlElement(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;
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/isis/blob/99f808c1/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/Column.java
----------------------------------------------------------------------
diff --git a/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/Column.java b/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/Column.java
new file mode 100644
index 0000000..84534c0
--- /dev/null
+++ b/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/Column.java
@@ -0,0 +1,76 @@
+/*
+ *  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.v1_0;
+
+import java.util.List;
+
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlElementWrapper;
+import javax.xml.bind.annotation.XmlType;
+
+import com.google.common.collect.Lists;
+
+@XmlType(
+        propOrder = {
+                "span"
+                , "propertyGroups"
+                , "collections"
+        }
+)
+public class Column {
+
+    private int span = 4;
+
+    @XmlElement(required = true, defaultValue = "4")
+    public int getSpan() {
+        return span;
+    }
+
+    public void setSpan(final int span) {
+        this.span = span;
+    }
+
+
+
+    private List<PropertyGroup> propertyGroups = Lists.newArrayList();
+
+    @XmlElementWrapper(required = true)
+    @XmlElement(name = "propertyGroup", required = false)
+    public List<PropertyGroup> getPropertyGroups() {
+        return propertyGroups;
+    }
+
+    public void setPropertyGroups(List<PropertyGroup> propertyGroups) {
+        this.propertyGroups = propertyGroups;
+    }
+
+
+
+    private List<Collection> collections = Lists.newArrayList();
+
+    @XmlElementWrapper(required = true)
+    @XmlElement(name = "collection", required = false)
+    public List<Collection> getCollections() {
+        return collections;
+    }
+
+    public void setCollections(List<Collection> collections) {
+        this.collections = collections;
+    }
+}

http://git-wip-us.apache.org/repos/asf/isis/blob/99f808c1/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/DomainObject.java
----------------------------------------------------------------------
diff --git a/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/DomainObject.java b/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/DomainObject.java
new file mode 100644
index 0000000..2ac2e54
--- /dev/null
+++ b/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/DomainObject.java
@@ -0,0 +1,69 @@
+/*
+ *  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.v1_0;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlElementWrapper;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlType;
+
+import com.google.common.collect.Lists;
+
+import org.apache.isis.applib.services.dto.Dto;
+
+@XmlRootElement
+@XmlType(
+        propOrder = {
+                "actions"
+                , "tabGroups"
+        }
+)
+public class DomainObject implements Dto {
+
+    private List<Action> actions = Lists.newArrayList();
+
+    @XmlElementWrapper(required = true)
+    @XmlElement(name = "action", required = false)
+    public List<Action> getActions() {
+        return actions;
+    }
+
+    public void setActions(List<Action> actions) {
+        this.actions = actions;
+    }
+
+
+    // must have at least one tab group
+    private List<TabGroup> tabGroups = new ArrayList<TabGroup>() {{
+        add(new TabGroup());
+    }};
+
+    @XmlElementWrapper(required = true)
+    @XmlElement(name = "tabGroup", required = true)
+    public List<TabGroup> getTabGroups() {
+        return tabGroups;
+    }
+
+    public void setTabGroups(List<TabGroup> tabGroups) {
+        this.tabGroups = tabGroups;
+    }
+}

http://git-wip-us.apache.org/repos/asf/isis/blob/99f808c1/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/Property.java
----------------------------------------------------------------------
diff --git a/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/Property.java b/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/Property.java
new file mode 100644
index 0000000..ed08541
--- /dev/null
+++ b/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/Property.java
@@ -0,0 +1,77 @@
+/*
+ *  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.v1_0;
+
+import java.util.List;
+
+import javax.xml.bind.annotation.XmlAttribute;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlElementWrapper;
+import javax.xml.bind.annotation.XmlType;
+
+import com.google.common.collect.Lists;
+
+@XmlType(
+        propOrder = {
+                "identifier"
+                , "layout"
+                , "actions"
+        }
+)
+public class Property  {
+
+    private String identifier;
+
+    /**
+     * Property identifier, being the getter method without "get" or "is" prefix, first letter lower cased.
+     */
+    @XmlAttribute(required = true)
+    public String getIdentifier() {
+        return identifier;
+    }
+
+    public void setIdentifier(String identifier) {
+        this.identifier = identifier;
+    }
+
+
+    private PropertyLayout layout = new PropertyLayout();
+
+    @XmlElement(required = true)
+    public PropertyLayout getLayout() {
+        return layout;
+    }
+
+    public void setLayout(PropertyLayout layout) {
+        this.layout = layout;
+    }
+
+
+    private List<Action> actions = Lists.newArrayList();
+
+    @XmlElementWrapper(required = false)
+    @XmlElement(name = "action", required = true)
+    public List<Action> getActions() {
+        return actions;
+    }
+
+    public void setActions(List<Action> actions) {
+        this.actions = actions;
+    }
+}

http://git-wip-us.apache.org/repos/asf/isis/blob/99f808c1/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/PropertyGroup.java
----------------------------------------------------------------------
diff --git a/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/PropertyGroup.java b/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/PropertyGroup.java
new file mode 100644
index 0000000..f62c316
--- /dev/null
+++ b/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/PropertyGroup.java
@@ -0,0 +1,86 @@
+/*
+ *  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.v1_0;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import javax.xml.bind.annotation.XmlAttribute;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlElementWrapper;
+import javax.xml.bind.annotation.XmlType;
+
+import com.google.common.collect.Lists;
+
+import org.apache.isis.applib.annotation.MemberOrder;
+
+@XmlType(
+        propOrder = {
+                "name"
+                , "actions"
+                , "properties"
+        }
+)
+public class PropertyGroup {
+
+    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<Action> actions = Lists.newArrayList();
+
+    @XmlElementWrapper(required = true)
+    @XmlElement(name = "action", required = false)
+    public List<Action> getActions() {
+        return actions;
+    }
+
+    public void setActions(List<Action> actions) {
+        this.actions = actions;
+    }
+
+
+
+    // must be at least one property in the property group
+    private List<Property> properties = new ArrayList<Property>() {{
+        add(new Property());
+    }};
+
+    @XmlElementWrapper(required = true)
+    @XmlElement(name = "property", required = true)
+    public List<Property> getProperties() {
+        return properties;
+    }
+
+    public void setProperties(List<Property> properties) {
+        this.properties = properties;
+    }
+}

http://git-wip-us.apache.org/repos/asf/isis/blob/99f808c1/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/PropertyLayout.java
----------------------------------------------------------------------
diff --git a/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/PropertyLayout.java b/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/PropertyLayout.java
new file mode 100644
index 0000000..0728c1f
--- /dev/null
+++ b/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/PropertyLayout.java
@@ -0,0 +1,147 @@
+/**
+ *  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.v1_0;
+
+
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlType;
+
+import org.apache.isis.applib.annotation.LabelPosition;
+import org.apache.isis.applib.annotation.Where;
+
+@XmlType(
+        propOrder = {
+                "cssClass"
+                , "describedAs"
+                , "hidden"
+                , "labelPosition"
+                , "multiLine"
+                , "named"
+                , "namedEscaped"
+                , "renderedAsDayBefore"
+                , "typicalLength"
+        }
+)
+public class PropertyLayout {
+
+    private String cssClass;
+
+    @XmlElement(required = false)
+    public String getCssClass() {
+        return cssClass;
+    }
+
+    public void setCssClass(String cssClass) {
+        this.cssClass = cssClass;
+    }
+
+
+    private String describedAs;
+
+    @XmlElement(required = false)
+    public String getDescribedAs() {
+        return describedAs;
+    }
+
+    public void setDescribedAs(String describedAs) {
+        this.describedAs = describedAs;
+    }
+
+
+    private Where hidden;
+
+    @XmlElement(required = false)
+    public Where getHidden() {
+        return hidden;
+    }
+
+    public void setHidden(Where hidden) {
+        this.hidden = hidden;
+    }
+
+
+    private LabelPosition labelPosition = LabelPosition.LEFT;
+
+    @XmlElement(required = true, defaultValue = "LEFT")
+    public LabelPosition getLabelPosition() {
+        return labelPosition;
+    }
+
+    public void setLabelPosition(LabelPosition labelPosition) {
+        this.labelPosition = labelPosition;
+    }
+
+
+    private Integer multiLine;
+
+    @XmlElement(required = false)
+    public Integer getMultiLine() {
+        return multiLine;
+    }
+
+    public void setMultiLine(Integer multiLine) {
+        this.multiLine = multiLine;
+    }
+
+
+    private String named;
+
+    @XmlElement(required = false)
+    public String getNamed() {
+        return named;
+    }
+
+    public void setNamed(String named) {
+        this.named = named;
+    }
+
+
+    private Boolean namedEscaped;
+
+    @XmlElement(required = false)
+    public Boolean getNamedEscaped() {
+        return namedEscaped;
+    }
+
+    public void setNamedEscaped(Boolean namedEscaped) {
+        this.namedEscaped = namedEscaped;
+    }
+
+
+    private Boolean renderedAsDayBefore;
+
+    @XmlElement(required = false)
+    public Boolean getRenderedAsDayBefore() {
+        return renderedAsDayBefore;
+    }
+
+    public void setRenderedAsDayBefore(Boolean renderedAsDayBefore) {
+        this.renderedAsDayBefore = renderedAsDayBefore;
+    }
+
+
+    private Integer typicalLength = -1;
+
+    @XmlElement(required = true, defaultValue = "-1")
+    public Integer getTypicalLength() {
+        return typicalLength;
+    }
+
+    public void setTypicalLength(Integer typicalLength) {
+        this.typicalLength = typicalLength;
+    }
+}

http://git-wip-us.apache.org/repos/asf/isis/blob/99f808c1/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/Tab.java
----------------------------------------------------------------------
diff --git a/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/Tab.java b/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/Tab.java
new file mode 100644
index 0000000..b8b311a
--- /dev/null
+++ b/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/Tab.java
@@ -0,0 +1,81 @@
+/*
+ *  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.v1_0;
+
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlType;
+
+@XmlType(
+        propOrder = {
+                "name"
+                , "left"
+                , "middle"
+                , "right"
+        }
+)
+public class Tab {
+
+    private String name;
+
+    @XmlElement(required = false)
+    public String getName() {
+        return name;
+    }
+
+    public void setName(String name) {
+        this.name = name;
+    }
+
+
+
+    private Column left = new Column();
+
+    @XmlElement(required = true)
+    public Column getLeft() {
+        return left;
+    }
+
+    public void setLeft(final Column left) {
+        this.left = left;
+    }
+
+
+    private Column middle;
+
+    @XmlElement(required = false)
+    public Column getMiddle() {
+        return middle;
+    }
+
+    public void setMiddle(final Column middle) {
+        this.middle = middle;
+    }
+
+
+    private Column right;
+
+    @XmlElement(required = false)
+    public Column getRight() {
+        return right;
+    }
+
+    public void setRight(final Column right) {
+        this.right = right;
+    }
+}

http://git-wip-us.apache.org/repos/asf/isis/blob/99f808c1/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/TabGroup.java
----------------------------------------------------------------------
diff --git a/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/TabGroup.java b/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/TabGroup.java
new file mode 100644
index 0000000..3d57c19
--- /dev/null
+++ b/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/TabGroup.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.v1_0;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlElementWrapper;
+import javax.xml.bind.annotation.XmlType;
+
+@XmlType(
+        propOrder = {"tabs"}
+) public class TabGroup  {
+
+    // must be at least one tab.
+    private List<Tab> tabs = new ArrayList<Tab>(){{
+        add(new Tab());
+    }};
+
+    @XmlElementWrapper(required = true)
+    @XmlElement(name = "tab", required = true)
+    public List<Tab> getTabs() {
+        return tabs;
+    }
+
+    public void setTabs(List<Tab> tabs) {
+        this.tabs = tabs;
+    }
+}

http://git-wip-us.apache.org/repos/asf/isis/blob/99f808c1/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/package-info.java
----------------------------------------------------------------------
diff --git a/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/package-info.java b/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/package-info.java
new file mode 100644
index 0000000..f187ff2
--- /dev/null
+++ b/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/package-info.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.
+ */
+@javax.xml.bind.annotation.XmlSchema(
+        namespace = "http://isis.apache.org/schema/applib/layout",
+        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/layout-1.0.xsd"
+)
+package org.apache.isis.applib.layout.v1_0;
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/isis/blob/99f808c1/core/applib/src/main/java/org/apache/isis/applib/services/jaxb/CatalogingSchemaOutputResolver.java
----------------------------------------------------------------------
diff --git 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
new file mode 100644
index 0000000..5d16c95
--- /dev/null
+++ b/core/applib/src/main/java/org/apache/isis/applib/services/jaxb/CatalogingSchemaOutputResolver.java
@@ -0,0 +1,83 @@
+/**
+ *  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.util.Collections;
+import java.util.List;
+import java.util.Map;
+
+import javax.xml.bind.SchemaOutputResolver;
+import javax.xml.transform.Result;
+import javax.xml.transform.stream.StreamResult;
+
+import com.google.common.collect.Lists;
+import com.google.common.collect.Maps;
+
+/**
+ * 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
+{
+    private final JaxbService.IsisSchemas isisSchemas;
+    private 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;
+    }
+
+    @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);
+    }
+}

http://git-wip-us.apache.org/repos/asf/isis/blob/99f808c1/core/applib/src/main/java/org/apache/isis/applib/services/jaxb/JaxbService.java
----------------------------------------------------------------------
diff --git a/core/applib/src/main/java/org/apache/isis/applib/services/jaxb/JaxbService.java b/core/applib/src/main/java/org/apache/isis/applib/services/jaxb/JaxbService.java
index ed42609..ae0be24 100644
--- a/core/applib/src/main/java/org/apache/isis/applib/services/jaxb/JaxbService.java
+++ b/core/applib/src/main/java/org/apache/isis/applib/services/jaxb/JaxbService.java
@@ -16,8 +16,27 @@
  */
 package org.apache.isis.applib.services.jaxb;
 
+import java.io.IOException;
+import java.io.StringReader;
+import java.io.StringWriter;
+import java.lang.reflect.Method;
+import java.util.List;
 import java.util.Map;
 
+import javax.inject.Inject;
+import javax.xml.bind.JAXBContext;
+import javax.xml.bind.JAXBException;
+import javax.xml.bind.Marshaller;
+import javax.xml.bind.Unmarshaller;
+
+import com.google.common.base.Function;
+import com.google.common.base.Joiner;
+import com.google.common.collect.Iterables;
+import com.google.common.collect.Maps;
+
+import org.apache.isis.applib.ApplicationException;
+import org.apache.isis.applib.DomainObjectContainer;
+import org.apache.isis.applib.NonRecoverableException;
 import org.apache.isis.applib.annotation.Programmatic;
 import org.apache.isis.applib.services.dto.Dto_downloadXsd;
 
@@ -26,7 +45,14 @@ public interface JaxbService {
     @Programmatic
     <T> T fromXml(Class<T> domainClass, String xml);
 
-    @Programmatic String toXml(final Object domainObject);
+    @Programmatic
+    <T> T fromXml(Class<T> domainClass, String xml, Map<String,Object> unmarshallerProperties);
+
+    @Programmatic
+    String toXml(final Object domainObject);
+
+    @Programmatic
+    String toXml(final Object domainObject, Map<String,Object> marshallerProperties);
 
 
     /**
@@ -60,4 +86,128 @@ public interface JaxbService {
 
     @Programmatic
     Map<String, String> toXsd(final Object domainObject, final IsisSchemas isisSchemas);
+
+
+    public static class Simple implements JaxbService {
+
+        @Override
+        public <T> T fromXml(final Class<T> domainClass, final String xml) {
+            return fromXml(domainClass, xml, Maps.<String,Object>newHashMap());
+        }
+        @Override
+        public <T> T fromXml(final Class<T> domainClass, final String xml, final Map<String, Object> unmarshallerProperties) {
+            try {
+                final JAXBContext context = JAXBContext.newInstance(domainClass);
+
+                final Unmarshaller unmarshaller = context.createUnmarshaller();
+
+                for (Map.Entry<String, Object> entry : unmarshallerProperties.entrySet()) {
+                    unmarshaller.setProperty(entry.getKey(), entry.getValue());
+                }
+
+                configure(unmarshaller);
+
+                final Object unmarshal = unmarshaller.unmarshal(new StringReader(xml));
+                return (T) unmarshal;
+
+            } catch (final JAXBException ex) {
+                throw new NonRecoverableException("Error unmarshalling domain object from XML; domain object class is '" + domainClass.getName() + "'", ex);
+            }
+        }
+
+        @Override
+        public String toXml(final Object domainObject) {
+            return toXml(domainObject, Maps.<String,Object>newHashMap());
+        }
+
+        @Override
+        public String toXml(final Object domainObject, final Map<String, Object> marshallerProperties)  {
+
+            final Class<?> domainClass = domainObject.getClass();
+            try {
+                final JAXBContext context = JAXBContext.newInstance(domainClass);
+
+                final Marshaller marshaller = context.createMarshaller();
+
+                marshaller.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, true);
+                for (Map.Entry<String, Object> entry : marshallerProperties.entrySet()) {
+                    marshaller.setProperty(entry.getKey(), entry.getValue());
+                }
+
+                configure(marshaller);
+
+                final StringWriter sw = new StringWriter();
+                marshaller.marshal(domainObject, sw);
+                final String xml = sw.toString();
+
+                return xml;
+
+            } catch (final JAXBException ex) {
+                final Class<? extends JAXBException> exClass = ex.getClass();
+
+                final String name = exClass.getName();
+                if(name.equals("com.sun.xml.bind.v2.runtime.IllegalAnnotationsException")) {
+                    // report a better error if possible
+                    // this is done reflectively so as to not have to bring in a new Maven dependency
+                    List<? extends Exception> errors = null;
+                    String annotationExceptionMessages = null;
+                    try {
+                        final Method getErrorsMethod = exClass.getMethod("getErrors");
+                        errors = (List<? extends Exception>) getErrorsMethod.invoke(ex);
+                        annotationExceptionMessages = ": " + Joiner.on("; ").join(
+                                Iterables.transform(errors, new Function<Exception, String>() {
+                                    @Override public String apply(final Exception e) {
+                                        return e.getMessage();
+                                    }
+                                }));
+                    } catch (Exception e) {
+                        // fall through if we hit any snags, and instead throw the more generic error message.
+                    }
+                    if(errors != null) {
+                        throw new NonRecoverableException(
+                                "Error marshalling domain object to XML, due to illegal annotations on domain object class '"
+                                        + domainClass.getName() + "'; " + errors.size() + " error"
+                                        + (errors.size() == 1? "": "s")
+                                        + " reported" + (!errors
+                                        .isEmpty() ? annotationExceptionMessages : ""), ex);
+                    }
+                }
+
+                throw new NonRecoverableException("Error marshalling domain object to XML; domain object class is '" + domainClass.getName() + "'", ex);
+            }
+        }
+
+        /**
+         * Optional hook
+         */
+        protected void configure(final Unmarshaller unmarshaller) {
+        }
+
+        /**
+         * Optional hook
+         */
+        protected void configure(final Marshaller marshaller) {
+        }
+
+        public Map<String,String> toXsd(final Object domainObject, final IsisSchemas isisSchemas) {
+
+            try {
+                final Class<?> domainClass = domainObject.getClass();
+                final JAXBContext context = JAXBContext.newInstance(domainClass);
+
+                final CatalogingSchemaOutputResolver outputResolver = new CatalogingSchemaOutputResolver(isisSchemas);
+                context.generateSchema(outputResolver);
+
+                return outputResolver.asMap();
+            } catch (final JAXBException | IOException ex) {
+                throw new ApplicationException(ex);
+            }
+        }
+
+
+        @Inject
+        DomainObjectContainer container;
+    }
+
+
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/isis/blob/99f808c1/core/applib/src/main/java/org/apache/isis/applib/services/jaxb/StreamResultWithWriter.java
----------------------------------------------------------------------
diff --git a/core/applib/src/main/java/org/apache/isis/applib/services/jaxb/StreamResultWithWriter.java b/core/applib/src/main/java/org/apache/isis/applib/services/jaxb/StreamResultWithWriter.java
new file mode 100644
index 0000000..40db209
--- /dev/null
+++ b/core/applib/src/main/java/org/apache/isis/applib/services/jaxb/StreamResultWithWriter.java
@@ -0,0 +1,45 @@
+/**
+ *  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.StringWriter;
+
+import javax.xml.transform.stream.StreamResult;
+
+/**
+ * A {@link StreamResult} that contains its own writer.
+ *
+ * <p>
+ *     The point is that the writer is only ever queried lazily AFTER the result has been generated.
+ * </p>
+ */
+class StreamResultWithWriter extends StreamResult {
+    private final StringWriter writer;
+
+    public StreamResultWithWriter() {
+        this(new StringWriter());
+    }
+
+    private StreamResultWithWriter(StringWriter writer) {
+        super(writer);
+        this.writer = writer;
+    }
+
+    public String asString() {
+        return writer.toString();
+    }
+}

http://git-wip-us.apache.org/repos/asf/isis/blob/99f808c1/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/object/domainservicelayout/DomainServiceLayoutFacetFactory.java
----------------------------------------------------------------------
diff --git a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/object/domainservicelayout/DomainServiceLayoutFacetFactory.java b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/object/domainservicelayout/DomainServiceLayoutFacetFactory.java
new file mode 100644
index 0000000..f9d75a4
--- /dev/null
+++ b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/object/domainservicelayout/DomainServiceLayoutFacetFactory.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.core.metamodel.facets.object.domainservicelayout;
+
+
+import org.apache.isis.applib.annotation.DomainService;
+import org.apache.isis.applib.annotation.DomainServiceLayout;
+import org.apache.isis.core.metamodel.facetapi.FacetHolder;
+import org.apache.isis.core.metamodel.facetapi.FacetUtil;
+import org.apache.isis.core.metamodel.facetapi.FeatureType;
+import org.apache.isis.core.metamodel.facets.Annotations;
+import org.apache.isis.core.metamodel.facets.FacetFactoryAbstract;
+import org.apache.isis.core.metamodel.facets.object.domainservicelayout.annotation.DomainServiceLayoutFacetAnnotation;
+
+
+public class DomainServiceLayoutFacetFactory extends FacetFactoryAbstract {
+
+    public DomainServiceLayoutFacetFactory() {
+        super(FeatureType.OBJECTS_ONLY);
+    }
+
+    @Override
+    public void process(ProcessClassContext processClassContext) {
+        final Class<?> cls = processClassContext.getCls();
+
+        final FacetHolder facetHolder = processClassContext.getFacetHolder();
+
+        final DomainService domainService = Annotations.getAnnotation(cls, DomainService.class);
+        final DomainServiceLayout domainServiceLayout = Annotations.getAnnotation(cls, DomainServiceLayout.class);
+
+        if (domainService == null && domainServiceLayout == null) {
+            return;
+        }
+
+        final String domainServiceMenuOrder =
+                domainService != null && !domainService.menuOrder().equals("" + Integer.MAX_VALUE)
+                        ? domainService.menuOrder()
+                        : null;
+        final String domainServiceLayoutMenuOrder =
+                domainServiceLayout != null && !domainServiceLayout.menuOrder().equals("" + Integer.MAX_VALUE)
+                        ? domainServiceLayout.menuOrder()
+                        : null;
+        final String menuOrder = coalesce(domainServiceLayoutMenuOrder, domainServiceMenuOrder);
+
+        DomainServiceLayout.MenuBar menuBar =
+                domainServiceLayout != null
+                        ? domainServiceLayout.menuBar()
+                        : DomainServiceLayout.MenuBar.PRIMARY;
+
+        FacetUtil.addFacet(
+                new DomainServiceLayoutFacetAnnotation(
+                        facetHolder,
+                        menuBar, menuOrder));
+
+        FacetUtil.addFacet(NamedFacetForDomainServiceLayoutAnnotation.create(domainServiceLayout, facetHolder));
+    }
+
+
+    private static String coalesce(final String... reasons) {
+        for (final String reason : reasons) {
+            if(reason != null) {
+                return reason;
+            }
+        }
+        return null;
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/isis/blob/99f808c1/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/object/domainservicelayout/DomainServiceLayoutFactory.java
----------------------------------------------------------------------
diff --git a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/object/domainservicelayout/DomainServiceLayoutFactory.java b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/object/domainservicelayout/DomainServiceLayoutFactory.java
deleted file mode 100644
index 9803198..0000000
--- a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/object/domainservicelayout/DomainServiceLayoutFactory.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.core.metamodel.facets.object.domainservicelayout;
-
-
-import org.apache.isis.applib.annotation.DomainService;
-import org.apache.isis.applib.annotation.DomainServiceLayout;
-import org.apache.isis.core.metamodel.facetapi.FacetHolder;
-import org.apache.isis.core.metamodel.facetapi.FacetUtil;
-import org.apache.isis.core.metamodel.facetapi.FeatureType;
-import org.apache.isis.core.metamodel.facets.Annotations;
-import org.apache.isis.core.metamodel.facets.FacetFactoryAbstract;
-import org.apache.isis.core.metamodel.facets.object.domainservicelayout.annotation.DomainServiceLayoutFacetAnnotation;
-
-
-public class DomainServiceLayoutFactory extends FacetFactoryAbstract {
-
-    public DomainServiceLayoutFactory() {
-        super(FeatureType.OBJECTS_ONLY);
-    }
-
-    @Override
-    public void process(ProcessClassContext processClassContext) {
-        final Class<?> cls = processClassContext.getCls();
-
-        final FacetHolder facetHolder = processClassContext.getFacetHolder();
-
-        final DomainService domainService = Annotations.getAnnotation(cls, DomainService.class);
-        final DomainServiceLayout domainServiceLayout = Annotations.getAnnotation(cls, DomainServiceLayout.class);
-
-        if (domainService == null && domainServiceLayout == null) {
-            return;
-        }
-
-        final String domainServiceMenuOrder =
-                domainService != null && !domainService.menuOrder().equals("" + Integer.MAX_VALUE)
-                        ? domainService.menuOrder()
-                        : null;
-        final String domainServiceLayoutMenuOrder =
-                domainServiceLayout != null && !domainServiceLayout.menuOrder().equals("" + Integer.MAX_VALUE)
-                        ? domainServiceLayout.menuOrder()
-                        : null;
-        final String menuOrder = coalesce(domainServiceLayoutMenuOrder, domainServiceMenuOrder);
-
-        DomainServiceLayout.MenuBar menuBar =
-                domainServiceLayout != null
-                        ? domainServiceLayout.menuBar()
-                        : DomainServiceLayout.MenuBar.PRIMARY;
-
-        FacetUtil.addFacet(
-                new DomainServiceLayoutFacetAnnotation(
-                        facetHolder,
-                        menuBar, menuOrder));
-
-        FacetUtil.addFacet(NamedFacetForDomainServiceLayoutAnnotation.create(domainServiceLayout, facetHolder));
-    }
-
-
-    private static String coalesce(final String... reasons) {
-        for (final String reason : reasons) {
-            if(reason != null) {
-                return reason;
-            }
-        }
-        return null;
-    }
-
-}


[16/50] [abbrv] isis git commit: ISIS-1287: fixing bad link in security docs

Posted by da...@apache.org.
ISIS-1287: fixing bad link in security docs


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

Branch: refs/heads/ISIS-993
Commit: 0c17f546a19d0357cec46ff0da3b178ecd6a7331
Parents: bff1f71
Author: Dan Haywood <da...@haywood-associates.co.uk>
Authored: Sun Jan 24 12:10:56 2016 +0000
Committer: Dan Haywood <da...@haywood-associates.co.uk>
Committed: Sun Jan 24 12:10:56 2016 +0000

----------------------------------------------------------------------
 .../asciidoc/guides/_ugsec_configuring-isis-to-use-bypass.adoc     | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/isis/blob/0c17f546/adocs/documentation/src/main/asciidoc/guides/_ugsec_configuring-isis-to-use-bypass.adoc
----------------------------------------------------------------------
diff --git a/adocs/documentation/src/main/asciidoc/guides/_ugsec_configuring-isis-to-use-bypass.adoc b/adocs/documentation/src/main/asciidoc/guides/_ugsec_configuring-isis-to-use-bypass.adoc
index 7f2d362..59ae68a 100644
--- a/adocs/documentation/src/main/asciidoc/guides/_ugsec_configuring-isis-to-use-bypass.adoc
+++ b/adocs/documentation/src/main/asciidoc/guides/_ugsec_configuring-isis-to-use-bypass.adoc
@@ -20,4 +20,4 @@ isis.authorization=bypass
 
 This installs the appropriate no-op implementations for both authentication and authorization:
 
-image::{_imagesdir}security/security-apis-impl/configure-isis-to-use-bypass.png[width="600px"]
+image::{_imagesdir}security/security-apis-impl/configure-isis-to-use-bypass.PNG[width="600px"]


[13/50] [abbrv] isis git commit: ISIS-1296: updating website front page for 1.11.1

Posted by da...@apache.org.
ISIS-1296: updating website front page for 1.11.1


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

Branch: refs/heads/ISIS-993
Commit: e0e55852607612ac2cf32d3c7d7adb17e6c8927d
Parents: 8812424
Author: Dan Haywood <da...@haywood-associates.co.uk>
Authored: Sun Jan 17 16:06:20 2016 +0000
Committer: Dan Haywood <da...@haywood-associates.co.uk>
Committed: Sun Jan 17 16:06:20 2016 +0000

----------------------------------------------------------------------
 adocs/documentation/src/main/asciidoc/index.html | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/isis/blob/e0e55852/adocs/documentation/src/main/asciidoc/index.html
----------------------------------------------------------------------
diff --git a/adocs/documentation/src/main/asciidoc/index.html b/adocs/documentation/src/main/asciidoc/index.html
index c6f0ca8..9a5b95a 100644
--- a/adocs/documentation/src/main/asciidoc/index.html
+++ b/adocs/documentation/src/main/asciidoc/index.html
@@ -664,7 +664,7 @@
 mvn archetype:generate  \
     -D archetypeGroupId=org.apache.isis.archetype \
     -D archetypeArtifactId=simpleapp-archetype \
-    -D archetypeVersion=1.11.0 \
+    -D archetypeVersion=1.11.1 \
     -D groupId=com.mycompany \
     -D artifactId=myapp \
     -D version=1.0-SNAPSHOT \


[03/50] [abbrv] isis git commit: [maven-release-plugin] prepare for next development iteration

Posted by da...@apache.org.
[maven-release-plugin] prepare for next development iteration


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

Branch: refs/heads/ISIS-993
Commit: 277f4cb3cb6a0283e87844614fb33d0a1ebc7d11
Parents: 7c2621a
Author: Dan Haywood <da...@haywood-associates.co.uk>
Authored: Sun Jan 10 14:09:17 2016 +0000
Committer: Dan Haywood <da...@haywood-associates.co.uk>
Committed: Sun Jan 10 14:09:17 2016 +0000

----------------------------------------------------------------------
 core/applib/pom.xml                          |  2 +-
 core/integtestsupport/pom.xml                |  2 +-
 core/log4j/pom.xml                           |  2 +-
 core/maven-plugin/pom.xml                    |  2 +-
 core/metamodel/pom.xml                       |  2 +-
 core/pom.xml                                 | 66 +++++++++++------------
 core/runtime/pom.xml                         |  2 +-
 core/schema/pom.xml                          |  2 +-
 core/security-shiro/pom.xml                  |  6 +--
 core/security/pom.xml                        |  2 +-
 core/specsupport/pom.xml                     |  2 +-
 core/unittestsupport/pom.xml                 |  2 +-
 core/viewer-restfulobjects-applib/pom.xml    |  2 +-
 core/viewer-restfulobjects-rendering/pom.xml |  2 +-
 core/viewer-restfulobjects-server/pom.xml    |  2 +-
 core/viewer-wicket-applib/pom.xml            |  2 +-
 core/viewer-wicket-impl/pom.xml              |  2 +-
 core/viewer-wicket-model/pom.xml             |  2 +-
 core/viewer-wicket-ui/pom.xml                |  2 +-
 core/webserver/pom.xml                       |  2 +-
 core/wrapper/pom.xml                         |  2 +-
 21 files changed, 55 insertions(+), 55 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/isis/blob/277f4cb3/core/applib/pom.xml
----------------------------------------------------------------------
diff --git a/core/applib/pom.xml b/core/applib/pom.xml
index 0c7fc02..757908c 100644
--- a/core/applib/pom.xml
+++ b/core/applib/pom.xml
@@ -23,7 +23,7 @@
     <parent>
         <groupId>org.apache.isis.core</groupId>
         <artifactId>isis</artifactId>
-        <version>1.11.1</version>
+        <version>1.12.0-SNAPSHOT</version>
     </parent>
 
     <artifactId>isis-core-applib</artifactId>

http://git-wip-us.apache.org/repos/asf/isis/blob/277f4cb3/core/integtestsupport/pom.xml
----------------------------------------------------------------------
diff --git a/core/integtestsupport/pom.xml b/core/integtestsupport/pom.xml
index 3da7ac6..8491f67 100644
--- a/core/integtestsupport/pom.xml
+++ b/core/integtestsupport/pom.xml
@@ -23,7 +23,7 @@
 	<parent>
 		<groupId>org.apache.isis.core</groupId>
 		<artifactId>isis</artifactId>
-        <version>1.11.1</version>
+        <version>1.12.0-SNAPSHOT</version>
 	</parent>
 
 	<artifactId>isis-core-integtestsupport</artifactId>

http://git-wip-us.apache.org/repos/asf/isis/blob/277f4cb3/core/log4j/pom.xml
----------------------------------------------------------------------
diff --git a/core/log4j/pom.xml b/core/log4j/pom.xml
index 1ef669f..4a029c1 100644
--- a/core/log4j/pom.xml
+++ b/core/log4j/pom.xml
@@ -15,7 +15,7 @@
     <parent>
         <groupId>org.apache.isis.core</groupId>
         <artifactId>isis</artifactId>
-        <version>1.11.1</version>
+        <version>1.12.0-SNAPSHOT</version>
     </parent>
 
     <artifactId>isis-core-log4j</artifactId>

http://git-wip-us.apache.org/repos/asf/isis/blob/277f4cb3/core/maven-plugin/pom.xml
----------------------------------------------------------------------
diff --git a/core/maven-plugin/pom.xml b/core/maven-plugin/pom.xml
index d0a38ce..4456432 100644
--- a/core/maven-plugin/pom.xml
+++ b/core/maven-plugin/pom.xml
@@ -23,7 +23,7 @@
     <parent>
         <groupId>org.apache.isis.core</groupId>
         <artifactId>isis</artifactId>
-        <version>1.11.1</version>
+        <version>1.12.0-SNAPSHOT</version>
     </parent>
 
     <groupId>org.apache.isis.tool</groupId>

http://git-wip-us.apache.org/repos/asf/isis/blob/277f4cb3/core/metamodel/pom.xml
----------------------------------------------------------------------
diff --git a/core/metamodel/pom.xml b/core/metamodel/pom.xml
index b7e6b59..493c298 100644
--- a/core/metamodel/pom.xml
+++ b/core/metamodel/pom.xml
@@ -23,7 +23,7 @@
     <parent>
         <groupId>org.apache.isis.core</groupId>
         <artifactId>isis</artifactId>
-        <version>1.11.1</version>
+        <version>1.12.0-SNAPSHOT</version>
     </parent>
 
     <artifactId>isis-core-metamodel</artifactId>

http://git-wip-us.apache.org/repos/asf/isis/blob/277f4cb3/core/pom.xml
----------------------------------------------------------------------
diff --git a/core/pom.xml b/core/pom.xml
index b54a9c5..5b7de63 100644
--- a/core/pom.xml
+++ b/core/pom.xml
@@ -29,7 +29,7 @@
 
     <groupId>org.apache.isis.core</groupId>
     <artifactId>isis</artifactId>
-    <version>1.11.1</version>
+    <version>1.12.0-SNAPSHOT</version>
     
     <packaging>pom</packaging>
 
@@ -162,7 +162,7 @@
         <connection>scm:git:http://git.apache.org/isis.git/core</connection>
         <developerConnection>scm:git:https://git-wip-us.apache.org/repos/asf/isis.git/trunk/framework/</developerConnection>
         <url>git://git.apache.org/isis.git/core</url>
-      <tag>isis-1.11.1</tag>
+      <tag>HEAD</tag>
   </scm>
 
     <url>http://isis.apache.org</url>
@@ -1061,13 +1061,13 @@ ${license.additional-notes}
             <dependency>
                 <groupId>org.apache.isis.core</groupId>
                 <artifactId>isis-core-unittestsupport</artifactId>
-                <version>1.11.1</version>
+                <version>1.12.0-SNAPSHOT</version>
                 <!-- not scope=test, because referenced by some sql-tests-common under compile scope -->
             </dependency>
             <dependency>
                 <groupId>org.apache.isis.core</groupId>
                 <artifactId>isis-core-unittestsupport</artifactId>
-                <version>1.11.1</version>
+                <version>1.12.0-SNAPSHOT</version>
                 <type>test-jar</type>
                 <scope>test</scope>
             </dependency>
@@ -1076,14 +1076,14 @@ ${license.additional-notes}
             <dependency>
                 <groupId>org.apache.isis.core</groupId>
                 <artifactId>isis-core-applib</artifactId>
-                <version>1.11.1</version>
+                <version>1.12.0-SNAPSHOT</version>
                 <type>jar</type>
                 <scope>compile</scope>
             </dependency>
             <dependency>
                 <groupId>org.apache.isis.core</groupId>
                 <artifactId>isis-core-applib</artifactId>
-                <version>1.11.1</version>
+                <version>1.12.0-SNAPSHOT</version>
                 <type>test-jar</type>
                 <scope>test</scope>
             </dependency>
@@ -1092,14 +1092,14 @@ ${license.additional-notes}
             <dependency>
                 <groupId>org.apache.isis.core</groupId>
                 <artifactId>isis-core-schema</artifactId>
-                <version>1.11.1</version>
+                <version>1.12.0-SNAPSHOT</version>
                 <type>jar</type>
                 <scope>compile</scope>
             </dependency>
             <dependency>
                 <groupId>org.apache.isis.core</groupId>
                 <artifactId>isis-core-schema</artifactId>
-                <version>1.11.1</version>
+                <version>1.12.0-SNAPSHOT</version>
                 <type>test-jar</type>
                 <scope>test</scope>
             </dependency>
@@ -1108,7 +1108,7 @@ ${license.additional-notes}
             <dependency>
                 <groupId>org.apache.isis.core</groupId>
                 <artifactId>isis-core-log4j</artifactId>
-                <version>1.11.1</version>
+                <version>1.12.0-SNAPSHOT</version>
                 <type>jar</type>
                 <scope>compile</scope>
             </dependency>
@@ -1117,14 +1117,14 @@ ${license.additional-notes}
             <dependency>
                 <groupId>org.apache.isis.core</groupId>
                 <artifactId>isis-core-metamodel</artifactId>
-                <version>1.11.1</version>
+                <version>1.12.0-SNAPSHOT</version>
                 <type>jar</type>
                 <scope>compile</scope>
             </dependency>
             <dependency>
                 <groupId>org.apache.isis.core</groupId>
                 <artifactId>isis-core-metamodel</artifactId>
-                <version>1.11.1</version>
+                <version>1.12.0-SNAPSHOT</version>
                 <type>test-jar</type>
                 <scope>test</scope>
             </dependency>
@@ -1133,40 +1133,40 @@ ${license.additional-notes}
             <dependency>
                 <groupId>org.apache.isis.core</groupId>
                 <artifactId>isis-core-runtime</artifactId>
-                <version>1.11.1</version>
+                <version>1.12.0-SNAPSHOT</version>
             </dependency>
             <dependency>
                 <groupId>org.apache.isis.core</groupId>
                 <artifactId>isis-core-runtime</artifactId>
-                <version>1.11.1</version>
+                <version>1.12.0-SNAPSHOT</version>
                 <type>test-jar</type>
                 <scope>test</scope>
             </dependency>
             <dependency>
                 <groupId>org.apache.isis.core</groupId>
                 <artifactId>isis-core-wrapper</artifactId>
-                <version>1.11.1</version>
+                <version>1.12.0-SNAPSHOT</version>
             </dependency>
 
             <!-- webserver -->
             <dependency>
                 <groupId>org.apache.isis.core</groupId>
                 <artifactId>isis-core-webserver</artifactId>
-                <version>1.11.1</version>
+                <version>1.12.0-SNAPSHOT</version>
             </dependency>
 
             <!-- specsupport -->
             <dependency>
                 <groupId>org.apache.isis.core</groupId>
                 <artifactId>isis-core-specsupport</artifactId>
-                <version>1.11.1</version>
+                <version>1.12.0-SNAPSHOT</version>
             </dependency>
 
             <!-- integtestsupport -->
             <dependency>
                 <groupId>org.apache.isis.core</groupId>
                 <artifactId>isis-core-integtestsupport</artifactId>
-                <version>1.11.1</version>
+                <version>1.12.0-SNAPSHOT</version>
                 <!-- not scope=test, because referenced by some sql-tests-common under compile scope -->
             </dependency>
 
@@ -1174,36 +1174,36 @@ ${license.additional-notes}
             <dependency>
                 <groupId>org.apache.isis.core</groupId>
                 <artifactId>isis-core-viewer-restfulobjects-applib</artifactId>
-                <version>1.11.1</version>
+                <version>1.12.0-SNAPSHOT</version>
             </dependency>
             <dependency>
                 <groupId>org.apache.isis.core</groupId>
                 <artifactId>isis-core-viewer-restfulobjects-applib</artifactId>
-                <version>1.11.1</version>
+                <version>1.12.0-SNAPSHOT</version>
                 <type>test-jar</type>
                 <scope>test</scope>
             </dependency>
             <dependency>
                 <groupId>org.apache.isis.core</groupId>
                 <artifactId>isis-core-viewer-restfulobjects-rendering</artifactId>
-                <version>1.11.1</version>
+                <version>1.12.0-SNAPSHOT</version>
             </dependency>
             <dependency>
                 <groupId>org.apache.isis.core</groupId>
                 <artifactId>isis-core-viewer-restfulobjects-rendering</artifactId>
-                <version>1.11.1</version>
+                <version>1.12.0-SNAPSHOT</version>
                 <type>test-jar</type>
                 <scope>test</scope>
             </dependency>
             <dependency>
                 <groupId>org.apache.isis.core</groupId>
                 <artifactId>isis-core-viewer-restfulobjects-server</artifactId>
-                <version>1.11.1</version>
+                <version>1.12.0-SNAPSHOT</version>
             </dependency>
             <dependency>
                 <groupId>org.apache.isis.core</groupId>
                 <artifactId>isis-core-viewer-restfulobjects-server</artifactId>
-                <version>1.11.1</version>
+                <version>1.12.0-SNAPSHOT</version>
                 <type>test-jar</type>
                 <scope>test</scope>
             </dependency>
@@ -1212,12 +1212,12 @@ ${license.additional-notes}
             <dependency>
                 <groupId>org.apache.isis.core</groupId>
                 <artifactId>isis-core-security</artifactId>
-                <version>1.11.1</version>
+                <version>1.12.0-SNAPSHOT</version>
             </dependency>
             <dependency>
                 <groupId>org.apache.isis.core</groupId>
                 <artifactId>isis-core-security-shiro</artifactId>
-                <version>1.11.1</version>
+                <version>1.12.0-SNAPSHOT</version>
             </dependency>
 
             
@@ -1225,41 +1225,41 @@ ${license.additional-notes}
             <dependency>
                 <groupId>org.apache.isis.viewer</groupId>
                 <artifactId>isis-viewer-wicket-applib</artifactId>
-                <version>1.11.1</version>
+                <version>1.12.0-SNAPSHOT</version>
             </dependency>
             <dependency>
                 <groupId>org.apache.isis.viewer</groupId>
                 <artifactId>isis-viewer-wicket-model</artifactId>
-                <version>1.11.1</version>
+                <version>1.12.0-SNAPSHOT</version>
             </dependency>
             <dependency>
                 <groupId>org.apache.isis.viewer</groupId>
                 <artifactId>isis-viewer-wicket-model</artifactId>
-                <version>1.11.1</version>
+                <version>1.12.0-SNAPSHOT</version>
                 <scope>test</scope>
                 <type>test-jar</type>
             </dependency>
             <dependency>
                 <groupId>org.apache.isis.viewer</groupId>
                 <artifactId>isis-viewer-wicket-ui</artifactId>
-                <version>1.11.1</version>
+                <version>1.12.0-SNAPSHOT</version>
             </dependency>
             <dependency>
                 <groupId>org.apache.isis.viewer</groupId>
                 <artifactId>isis-viewer-wicket-ui</artifactId>
-                <version>1.11.1</version>
+                <version>1.12.0-SNAPSHOT</version>
                 <scope>test</scope>
                 <type>test-jar</type>
             </dependency>
             <dependency>
                 <groupId>org.apache.isis.viewer</groupId>
                 <artifactId>isis-viewer-wicket-impl</artifactId>
-                <version>1.11.1</version>
+                <version>1.12.0-SNAPSHOT</version>
             </dependency>
             <dependency>
                 <groupId>org.apache.isis.viewer</groupId>
                 <artifactId>isis-viewer-wicket-impl</artifactId>
-                <version>1.11.1</version>
+                <version>1.12.0-SNAPSHOT</version>
                 <scope>test</scope>
                 <type>test-jar</type>
             </dependency>
@@ -1269,7 +1269,7 @@ ${license.additional-notes}
             <dependency>
                 <groupId>org.apache.isis.tool</groupId>
                 <artifactId>isis-maven-plugin</artifactId>
-                <version>1.11.1</version>
+                <version>1.12.0-SNAPSHOT</version>
             </dependency>
 
             <!-- JodaTime -->

http://git-wip-us.apache.org/repos/asf/isis/blob/277f4cb3/core/runtime/pom.xml
----------------------------------------------------------------------
diff --git a/core/runtime/pom.xml b/core/runtime/pom.xml
index c950886..cacb227 100644
--- a/core/runtime/pom.xml
+++ b/core/runtime/pom.xml
@@ -23,7 +23,7 @@
 	<parent>
 		<groupId>org.apache.isis.core</groupId>
 		<artifactId>isis</artifactId>
-        <version>1.11.1</version>
+        <version>1.12.0-SNAPSHOT</version>
 	</parent>
 
 	<artifactId>isis-core-runtime</artifactId>

http://git-wip-us.apache.org/repos/asf/isis/blob/277f4cb3/core/schema/pom.xml
----------------------------------------------------------------------
diff --git a/core/schema/pom.xml b/core/schema/pom.xml
index e864307..9bcc078 100644
--- a/core/schema/pom.xml
+++ b/core/schema/pom.xml
@@ -23,7 +23,7 @@
     <parent>
         <groupId>org.apache.isis.core</groupId>
         <artifactId>isis</artifactId>
-        <version>1.11.1</version>
+        <version>1.12.0-SNAPSHOT</version>
     </parent>
 
     <artifactId>isis-core-schema</artifactId>

http://git-wip-us.apache.org/repos/asf/isis/blob/277f4cb3/core/security-shiro/pom.xml
----------------------------------------------------------------------
diff --git a/core/security-shiro/pom.xml b/core/security-shiro/pom.xml
index bab1ea0..206e8d5 100644
--- a/core/security-shiro/pom.xml
+++ b/core/security-shiro/pom.xml
@@ -23,12 +23,12 @@
 	<parent>
 		<groupId>org.apache.isis.core</groupId>
 		<artifactId>isis</artifactId>
-        <version>1.11.1</version>
+        <version>1.12.0-SNAPSHOT</version>
 	</parent>
 
 	<groupId>org.apache.isis.core</groupId>
 	<artifactId>isis-core-security-shiro</artifactId>
-    <version>1.11.1</version>
+    <version>1.12.0-SNAPSHOT</version>
 
 	<name>Isis Security Shiro</name>
 
@@ -65,7 +65,7 @@
 			<dependency>
 			    <groupId>org.apache.isis.core</groupId>
 			    <artifactId>isis-core-security-shiro</artifactId>
-				<version>1.11.1</version>
+				<version>1.12.0-SNAPSHOT</version>
 			</dependency>
     	</dependencies>
     </dependencyManagement>

http://git-wip-us.apache.org/repos/asf/isis/blob/277f4cb3/core/security/pom.xml
----------------------------------------------------------------------
diff --git a/core/security/pom.xml b/core/security/pom.xml
index 5951a70..5464258 100644
--- a/core/security/pom.xml
+++ b/core/security/pom.xml
@@ -23,7 +23,7 @@
 	<parent>
 		<groupId>org.apache.isis.core</groupId>
 		<artifactId>isis</artifactId>
-        <version>1.11.1</version>
+        <version>1.12.0-SNAPSHOT</version>
 	</parent>
 
 	<artifactId>isis-core-security</artifactId>

http://git-wip-us.apache.org/repos/asf/isis/blob/277f4cb3/core/specsupport/pom.xml
----------------------------------------------------------------------
diff --git a/core/specsupport/pom.xml b/core/specsupport/pom.xml
index f8492cf..a70b1a7 100644
--- a/core/specsupport/pom.xml
+++ b/core/specsupport/pom.xml
@@ -15,7 +15,7 @@
     <parent>
         <groupId>org.apache.isis.core</groupId>
         <artifactId>isis</artifactId>
-        <version>1.11.1</version>
+        <version>1.12.0-SNAPSHOT</version>
     </parent>
 
     <artifactId>isis-core-specsupport</artifactId>

http://git-wip-us.apache.org/repos/asf/isis/blob/277f4cb3/core/unittestsupport/pom.xml
----------------------------------------------------------------------
diff --git a/core/unittestsupport/pom.xml b/core/unittestsupport/pom.xml
index 71ed875..c9dffa6 100644
--- a/core/unittestsupport/pom.xml
+++ b/core/unittestsupport/pom.xml
@@ -23,7 +23,7 @@
 	<parent>
 		<groupId>org.apache.isis.core</groupId>
 		<artifactId>isis</artifactId>
-        <version>1.11.1</version>
+        <version>1.12.0-SNAPSHOT</version>
 	</parent>
 
 	<artifactId>isis-core-unittestsupport</artifactId>

http://git-wip-us.apache.org/repos/asf/isis/blob/277f4cb3/core/viewer-restfulobjects-applib/pom.xml
----------------------------------------------------------------------
diff --git a/core/viewer-restfulobjects-applib/pom.xml b/core/viewer-restfulobjects-applib/pom.xml
index 7bdbdd8..e5d989d 100644
--- a/core/viewer-restfulobjects-applib/pom.xml
+++ b/core/viewer-restfulobjects-applib/pom.xml
@@ -23,7 +23,7 @@
     <parent>
         <groupId>org.apache.isis.core</groupId>
         <artifactId>isis</artifactId>
-        <version>1.11.1</version>
+        <version>1.12.0-SNAPSHOT</version>
     </parent>
 
 	<artifactId>isis-core-viewer-restfulobjects-applib</artifactId>

http://git-wip-us.apache.org/repos/asf/isis/blob/277f4cb3/core/viewer-restfulobjects-rendering/pom.xml
----------------------------------------------------------------------
diff --git a/core/viewer-restfulobjects-rendering/pom.xml b/core/viewer-restfulobjects-rendering/pom.xml
index 37f2cd2..5184877 100644
--- a/core/viewer-restfulobjects-rendering/pom.xml
+++ b/core/viewer-restfulobjects-rendering/pom.xml
@@ -23,7 +23,7 @@
     <parent>
         <groupId>org.apache.isis.core</groupId>
         <artifactId>isis</artifactId>
-        <version>1.11.1</version>
+        <version>1.12.0-SNAPSHOT</version>
     </parent>
 
     <artifactId>isis-core-viewer-restfulobjects-rendering</artifactId>

http://git-wip-us.apache.org/repos/asf/isis/blob/277f4cb3/core/viewer-restfulobjects-server/pom.xml
----------------------------------------------------------------------
diff --git a/core/viewer-restfulobjects-server/pom.xml b/core/viewer-restfulobjects-server/pom.xml
index 9cdc9c6..a2bc140 100644
--- a/core/viewer-restfulobjects-server/pom.xml
+++ b/core/viewer-restfulobjects-server/pom.xml
@@ -23,7 +23,7 @@
     <parent>
         <groupId>org.apache.isis.core</groupId>
         <artifactId>isis</artifactId>
-        <version>1.11.1</version>
+        <version>1.12.0-SNAPSHOT</version>
     </parent>
 
     <artifactId>isis-core-viewer-restfulobjects-server</artifactId>

http://git-wip-us.apache.org/repos/asf/isis/blob/277f4cb3/core/viewer-wicket-applib/pom.xml
----------------------------------------------------------------------
diff --git a/core/viewer-wicket-applib/pom.xml b/core/viewer-wicket-applib/pom.xml
index 1a2d707..54cb73f 100644
--- a/core/viewer-wicket-applib/pom.xml
+++ b/core/viewer-wicket-applib/pom.xml
@@ -24,7 +24,7 @@
 	<parent>
 		<groupId>org.apache.isis.core</groupId>
 		<artifactId>isis</artifactId>
-		<version>1.11.1</version>
+		<version>1.12.0-SNAPSHOT</version>
     </parent>
 
     <groupId>org.apache.isis.viewer</groupId>

http://git-wip-us.apache.org/repos/asf/isis/blob/277f4cb3/core/viewer-wicket-impl/pom.xml
----------------------------------------------------------------------
diff --git a/core/viewer-wicket-impl/pom.xml b/core/viewer-wicket-impl/pom.xml
index a811bf5..1190f01 100644
--- a/core/viewer-wicket-impl/pom.xml
+++ b/core/viewer-wicket-impl/pom.xml
@@ -24,7 +24,7 @@
 	<parent>
 		<groupId>org.apache.isis.core</groupId>
 		<artifactId>isis</artifactId>
-		<version>1.11.1</version>
+		<version>1.12.0-SNAPSHOT</version>
 	</parent>
 
 	<name>Isis Wicket Viewer Implementation</name>

http://git-wip-us.apache.org/repos/asf/isis/blob/277f4cb3/core/viewer-wicket-model/pom.xml
----------------------------------------------------------------------
diff --git a/core/viewer-wicket-model/pom.xml b/core/viewer-wicket-model/pom.xml
index e690404..e4ff14d 100644
--- a/core/viewer-wicket-model/pom.xml
+++ b/core/viewer-wicket-model/pom.xml
@@ -24,7 +24,7 @@
 	<parent>
 		<groupId>org.apache.isis.core</groupId>
 		<artifactId>isis</artifactId>
-		<version>1.11.1</version>
+		<version>1.12.0-SNAPSHOT</version>
 	</parent>
 
     <groupId>org.apache.isis.viewer</groupId>

http://git-wip-us.apache.org/repos/asf/isis/blob/277f4cb3/core/viewer-wicket-ui/pom.xml
----------------------------------------------------------------------
diff --git a/core/viewer-wicket-ui/pom.xml b/core/viewer-wicket-ui/pom.xml
index 141510c..5de324b 100644
--- a/core/viewer-wicket-ui/pom.xml
+++ b/core/viewer-wicket-ui/pom.xml
@@ -24,7 +24,7 @@
 	<parent>
 		<groupId>org.apache.isis.core</groupId>
 		<artifactId>isis</artifactId>
-		<version>1.11.1</version>
+		<version>1.12.0-SNAPSHOT</version>
 	</parent>
 
     <groupId>org.apache.isis.viewer</groupId>

http://git-wip-us.apache.org/repos/asf/isis/blob/277f4cb3/core/webserver/pom.xml
----------------------------------------------------------------------
diff --git a/core/webserver/pom.xml b/core/webserver/pom.xml
index 1cba08e..4f222fe 100644
--- a/core/webserver/pom.xml
+++ b/core/webserver/pom.xml
@@ -23,7 +23,7 @@
     <parent>
 		<groupId>org.apache.isis.core</groupId>
 		<artifactId>isis</artifactId>
-        <version>1.11.1</version>
+        <version>1.12.0-SNAPSHOT</version>
     </parent>
 
 	<artifactId>isis-core-webserver</artifactId>

http://git-wip-us.apache.org/repos/asf/isis/blob/277f4cb3/core/wrapper/pom.xml
----------------------------------------------------------------------
diff --git a/core/wrapper/pom.xml b/core/wrapper/pom.xml
index 656658c..e4486a5 100644
--- a/core/wrapper/pom.xml
+++ b/core/wrapper/pom.xml
@@ -23,7 +23,7 @@
     <parent>
         <groupId>org.apache.isis.core</groupId>
         <artifactId>isis</artifactId>
-        <version>1.11.1</version>
+        <version>1.12.0-SNAPSHOT</version>
 	</parent>
 
 	<artifactId>isis-core-wrapper</artifactId>


[34/50] [abbrv] isis git commit: ISIS-993: entity page now remembers the selected tab (in session) on a per-object basis

Posted by da...@apache.org.
ISIS-993: entity page now remembers the selected tab (in session) on a per-object basis


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

Branch: refs/heads/ISIS-993
Commit: d83b2cfed6e9d437d77e0f4e4edd0a7756509f72
Parents: c3b614c
Author: Dan Haywood <da...@haywood-associates.co.uk>
Authored: Wed Jan 13 09:01:18 2016 +0000
Committer: Dan Haywood <da...@haywood-associates.co.uk>
Committed: Mon Jan 25 14:38:24 2016 +0000

----------------------------------------------------------------------
 .../entity/tabgroups/EntityTabGroupsPanel.java  | 55 +++++++++++++++++++-
 .../dom/simple/SimpleObject.layout.xml          | 22 ++++----
 2 files changed, 64 insertions(+), 13 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/isis/blob/d83b2cfe/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/tabgroups/EntityTabGroupsPanel.java
----------------------------------------------------------------------
diff --git a/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/tabgroups/EntityTabGroupsPanel.java b/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/tabgroups/EntityTabGroupsPanel.java
index 6b274a5..671ccd1 100644
--- a/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/tabgroups/EntityTabGroupsPanel.java
+++ b/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/tabgroups/EntityTabGroupsPanel.java
@@ -26,6 +26,7 @@ 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.list.ListItem;
 import org.apache.wicket.markup.html.list.ListView;
 import org.apache.wicket.markup.html.panel.Panel;
@@ -35,8 +36,12 @@ import org.apache.isis.applib.layout.v1_0.ObjectLayoutMetadata;
 import org.apache.isis.applib.layout.v1_0.Tab;
 import org.apache.isis.applib.layout.v1_0.TabGroup;
 import org.apache.isis.core.metamodel.adapter.ObjectAdapter;
+import org.apache.isis.core.metamodel.adapter.mgr.AdapterManager;
+import org.apache.isis.core.metamodel.adapter.oid.RootOid;
 import org.apache.isis.core.metamodel.facets.members.cssclass.CssClassFacet;
 import org.apache.isis.core.metamodel.facets.object.layoutmetadata.ObjectLayoutMetadataFacet;
+import org.apache.isis.core.runtime.system.context.IsisContext;
+import org.apache.isis.viewer.wicket.model.mementos.ObjectAdapterMemento;
 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;
@@ -81,6 +86,7 @@ public class EntityTabGroupsPanel extends PanelAbstract<EntityModel> {
                 .from(objectLayoutMetadata.getTabGroups())
                 .filter(TabGroup.Predicates.notEmpty())
                 .toList();
+        final int[] tabGroupCount = new int[]{0};
         final ListView<TabGroup> tabGroupsList =
                 new ListView<TabGroup>(ID_TAB_GROUPS, tabGroups) {
 
@@ -104,14 +110,59 @@ public class EntityTabGroupsPanel extends PanelAbstract<EntityModel> {
                         }
                     });
                 }
-                item.add(new AjaxBootstrapTabbedPanel(ID_TAB_GROUP, tabs));
+                final AjaxBootstrapTabbedPanel ajaxBootstrapTabbedPanel = newTabbedPanel(tabs, tabGroupCount[0]);
+
+                item.add(ajaxBootstrapTabbedPanel);
+
+                tabGroupCount[0]++;
+            }
+
+            private AjaxBootstrapTabbedPanel newTabbedPanel(final List<ITab> tabs, final int tabGroupNumber) {
+                final AjaxBootstrapTabbedPanel tabbedPanel = new AjaxBootstrapTabbedPanel(ID_TAB_GROUP, tabs) {
+                    @Override
+                    public TabbedPanel setSelectedTab(final int index) {
+                        saveSelectedTabInSession(tabGroupNumber, index);
+                        return super.setSelectedTab(index);
+                    }
+                };
+                setSelectedTabFromSessionIfAny(tabbedPanel, tabGroupNumber);
+                return tabbedPanel;
+
+            }
+
+            private void setSelectedTabFromSessionIfAny(
+                    final AjaxBootstrapTabbedPanel ajaxBootstrapTabbedPanel,
+                    final int tabGroupNumber) {
+                final String key = buildKey(tabGroupNumber);
+                final String value = (String) getSession().getAttribute(key);
+                if(value != null) {
+                    final int tabIndex = Integer.parseInt(value);
+                    ajaxBootstrapTabbedPanel.setSelectedTab(tabIndex);
+                }
             }
+
+            private void saveSelectedTabInSession(final int tabGroupNumber, final int tabIndex) {
+                final String key = buildKey(tabGroupNumber);
+                getSession().setAttribute(key, "" + tabIndex);
+            }
+
+            private String buildKey(final int tabGroupNumber) {
+                final ObjectAdapterMemento objectAdapterMemento = EntityTabGroupsPanel.this.getModel().getObjectAdapterMemento();
+                final RootOid oid = (RootOid) objectAdapterMemento.getObjectAdapter(
+                        AdapterManager.ConcurrencyChecking.NO_CHECK).getOid();
+                final String key =
+                        IsisContext.getOidMarshaller().marshalNoVersion(oid) + "." + tabGroupNumber + ".selectedTab";
+                return key;
+            }
+
         };
+
         add(tabGroupsList);
 
-        
+
     }
 
+
     private static class EntityTabPanel extends PanelAbstract {
         private static final long serialVersionUID = 1L;
 

http://git-wip-us.apache.org/repos/asf/isis/blob/d83b2cfe/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 e49e937..1c56232 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
@@ -4,6 +4,17 @@
         <action id="delete"/>
     </actions>
     <tabGroup>
+        <tab name="Metadata">
+            <left span="6">
+                <propertyGroup name="Persistence">
+                    <actions>
+                        <action id="downloadJdoMetadata"/>
+                        <action id="downloadLayoutXml"/>
+                    </actions>
+                    <property id="versionSequence"/>
+                </propertyGroup>
+            </left>
+        </tab>
         <tab name="Common">
             <left span="6">
                 <propertyGroup name="General">
@@ -19,17 +30,6 @@
                 <collection id="others" defaultView="hide"/>
             </right>
         </tab>
-        <tab name="Metadata">
-            <left span="6">
-                <propertyGroup name="Persistence">
-                    <actions>
-                        <action id="downloadJdoMetadata"/>
-                        <action id="downloadLayoutXml"/>
-                    </actions>
-                    <property id="versionSequence"/>
-                </propertyGroup>
-            </left>
-        </tab>
     </tabGroup>
 <!--
     <tabGroup>


[46/50] [abbrv] isis git commit: ISIS-993: simplifying the metadata. the wicket components still broken at this point

Posted by da...@apache.org.
ISIS-993: simplifying the metadata.  the wicket components still broken at this point


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

Branch: refs/heads/ISIS-993
Commit: 79248dc58c9e7e83af26e78c4e07df20079498e5
Parents: f5c3b10
Author: Dan Haywood <da...@haywood-associates.co.uk>
Authored: Fri Jan 8 09:17:04 2016 +0000
Committer: Dan Haywood <da...@haywood-associates.co.uk>
Committed: Mon Jan 25 14:38:24 2016 +0000

----------------------------------------------------------------------
 .../schema/applib/layout/layout-1.0.xsd         |  42 ++---
 .../asciidoc/schema/applib/layout/layout.xsd    |  42 ++---
 .../apache/isis/applib/layout/v1_0/Action.java  | 133 ++++++++++++--
 .../isis/applib/layout/v1_0/ActionLayout.java   | 178 -------------------
 .../isis/applib/layout/v1_0/Collection.java     | 134 ++++++++++++--
 .../applib/layout/v1_0/CollectionLayout.java    | 169 ------------------
 .../isis/applib/layout/v1_0/DomainObject.java   |  32 +---
 .../isis/applib/layout/v1_0/Property.java       | 136 ++++++++++++--
 .../isis/applib/layout/v1_0/PropertyLayout.java | 166 -----------------
 .../ActionPositionFacetForActionLayoutXml.java  |  41 -----
 .../layout/ActionPositionFacetForActionXml.java |  41 +++++
 .../BookmarkPolicyFacetForActionLayoutXml.java  |  42 -----
 .../layout/BookmarkPolicyFacetForActionXml.java |  42 +++++
 .../CssClassFaFacetForActionLayoutXml.java      |  45 -----
 .../layout/CssClassFaFacetForActionXml.java     |  45 +++++
 .../layout/CssClassFacetForActionLayoutXml.java |  43 -----
 .../layout/CssClassFacetForActionXml.java       |  43 +++++
 .../DescribedAsFacetForActionLayoutXml.java     |  43 -----
 .../layout/DescribedAsFacetForActionXml.java    |  43 +++++
 .../layout/HiddenFacetForActionLayoutXml.java   |   4 +-
 .../layout/NamedFacetForActionLayoutXml.java    |  45 -----
 .../actions/layout/NamedFacetForActionXml.java  |  45 +++++
 .../CssClassFacetForCollectionLayoutXml.java    |  43 -----
 .../layout/CssClassFacetForCollectionXml.java   |  43 +++++
 .../DefaultViewFacetForCollectionLayoutXml.java |  43 -----
 .../DefaultViewFacetForCollectionXml.java       |  43 +++++
 .../DescribedAsFacetForCollectionLayoutXml.java |  43 -----
 .../DescribedAsFacetForCollectionXml.java       |  43 +++++
 .../HiddenFacetForCollectionLayoutXml.java      |  52 ------
 .../layout/HiddenFacetForCollectionXml.java     |  52 ++++++
 .../NamedFacetForCollectionLayoutXml.java       |  48 -----
 .../layout/NamedFacetForCollectionXml.java      |  48 +++++
 .../PagedFacetForCollectionLayoutXml.java       |  41 -----
 .../layout/PagedFacetForCollectionXml.java      |  41 +++++
 .../SortedByFacetForCollectionLayoutXml.java    |  52 ------
 .../layout/SortedByFacetForCollectionXml.java   |  52 ++++++
 .../object/layoutxml/LayoutXmlFacetDefault.java | 119 ++++++-------
 .../CssClassFacetForPropertyLayoutXml.java      |  43 -----
 .../CssClassFacetForPropertyXml.java            |  43 +++++
 .../DescribedAsFacetForPropertyLayoutXml.java   |  43 -----
 .../DescribedAsFacetForPropertyXml.java         |  43 +++++
 .../HiddenFacetForPropertyLayoutXml.java        |  52 ------
 .../HiddenFacetForPropertyXml.java              |  52 ++++++
 .../LabelAtFacetForPropertyLayoutXml.java       |  42 -----
 .../LabelAtFacetForPropertyXml.java             |  42 +++++
 .../MultiLineFacetForPropertyLayoutXml.java     |  41 -----
 .../MultiLineFacetForPropertyXml.java           |  41 +++++
 .../NamedFacetForPropertyLayoutXml.java         |  48 -----
 .../NamedFacetForPropertyXml.java               |  48 +++++
 ...nderedAdjustedFacetForPropertyLayoutXml.java |  43 -----
 .../RenderedAdjustedFacetForPropertyXml.java    |  43 +++++
 .../TypicalLengthFacetForPropertyLayoutXml.java |  49 -----
 .../TypicalLengthFacetForPropertyXml.java       |  49 +++++
 .../layoutxml/v1_0/DomainObjectTest.java        |   6 +
 .../entity/tabgroups/EntityTabGroupsPanel.java  |   5 +
 .../java/domainapp/dom/simple/SimpleObject.java |  17 +-
 .../dom/simple/SimpleObject.layout.xml          |  13 +-
 57 files changed, 1413 insertions(+), 1667 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/isis/blob/79248dc5/adocs/documentation/src/main/asciidoc/schema/applib/layout/layout-1.0.xsd
----------------------------------------------------------------------
diff --git a/adocs/documentation/src/main/asciidoc/schema/applib/layout/layout-1.0.xsd b/adocs/documentation/src/main/asciidoc/schema/applib/layout/layout-1.0.xsd
index 221c807..ba275c2 100644
--- a/adocs/documentation/src/main/asciidoc/schema/applib/layout/layout-1.0.xsd
+++ b/adocs/documentation/src/main/asciidoc/schema/applib/layout/layout-1.0.xsd
@@ -5,7 +5,7 @@
 
   <xs:complexType name="domainObject">
     <xs:sequence>
-      <xs:element name="actions">
+      <xs:element name="actions" minOccurs="0">
         <xs:complexType>
           <xs:sequence>
             <xs:element name="action" type="tns:action" minOccurs="0" maxOccurs="unbounded"/>
@@ -18,13 +18,6 @@
 
   <xs:complexType name="action">
     <xs:sequence>
-      <xs:element name="layout" type="tns:actionLayout" minOccurs="0"/>
-    </xs:sequence>
-    <xs:attribute name="id" type="xs:string" use="required"/>
-  </xs:complexType>
-
-  <xs:complexType name="actionLayout">
-    <xs:sequence>
       <xs:element name="named" type="xs:string" minOccurs="0"/>
       <xs:element name="describedAs" type="xs:string" minOccurs="0"/>
     </xs:sequence>
@@ -33,8 +26,9 @@
     <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" use="required"/>
+    <xs:attribute name="position" type="tns:position"/>
   </xs:complexType>
 
   <xs:complexType name="tabGroup">
@@ -78,25 +72,19 @@
 
   <xs:complexType name="property">
     <xs:sequence>
-      <xs:element name="actions">
+      <xs:element name="named" type="xs:string" minOccurs="0"/>
+      <xs:element name="describedAs" type="xs:string" minOccurs="0"/>
+      <xs:element name="actions" minOccurs="0">
         <xs:complexType>
           <xs:sequence>
             <xs:element name="action" type="tns:action" minOccurs="0" maxOccurs="unbounded"/>
           </xs:sequence>
         </xs:complexType>
       </xs:element>
-      <xs:element name="layout" type="tns:propertyLayout"/>
-    </xs:sequence>
-    <xs:attribute name="id" type="xs:string" use="required"/>
-  </xs:complexType>
-
-  <xs:complexType name="propertyLayout">
-    <xs:sequence>
-      <xs:element name="named" type="xs:string" minOccurs="0"/>
-      <xs:element name="describedAs" 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"/>
@@ -106,27 +94,21 @@
 
   <xs:complexType name="collection">
     <xs:sequence>
-      <xs:element name="actions">
+      <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 name="actions" minOccurs="0">
         <xs:complexType>
           <xs:sequence>
             <xs:element name="action" type="tns:action" minOccurs="0" maxOccurs="unbounded"/>
           </xs:sequence>
         </xs:complexType>
       </xs:element>
-      <xs:element name="layout" type="tns:collectionLayout"/>
-    </xs:sequence>
-    <xs:attribute name="id" type="xs:string" use="required"/>
-  </xs:complexType>
-
-  <xs:complexType name="collectionLayout">
-    <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: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>

http://git-wip-us.apache.org/repos/asf/isis/blob/79248dc5/adocs/documentation/src/main/asciidoc/schema/applib/layout/layout.xsd
----------------------------------------------------------------------
diff --git a/adocs/documentation/src/main/asciidoc/schema/applib/layout/layout.xsd b/adocs/documentation/src/main/asciidoc/schema/applib/layout/layout.xsd
index 221c807..ba275c2 100644
--- a/adocs/documentation/src/main/asciidoc/schema/applib/layout/layout.xsd
+++ b/adocs/documentation/src/main/asciidoc/schema/applib/layout/layout.xsd
@@ -5,7 +5,7 @@
 
   <xs:complexType name="domainObject">
     <xs:sequence>
-      <xs:element name="actions">
+      <xs:element name="actions" minOccurs="0">
         <xs:complexType>
           <xs:sequence>
             <xs:element name="action" type="tns:action" minOccurs="0" maxOccurs="unbounded"/>
@@ -18,13 +18,6 @@
 
   <xs:complexType name="action">
     <xs:sequence>
-      <xs:element name="layout" type="tns:actionLayout" minOccurs="0"/>
-    </xs:sequence>
-    <xs:attribute name="id" type="xs:string" use="required"/>
-  </xs:complexType>
-
-  <xs:complexType name="actionLayout">
-    <xs:sequence>
       <xs:element name="named" type="xs:string" minOccurs="0"/>
       <xs:element name="describedAs" type="xs:string" minOccurs="0"/>
     </xs:sequence>
@@ -33,8 +26,9 @@
     <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" use="required"/>
+    <xs:attribute name="position" type="tns:position"/>
   </xs:complexType>
 
   <xs:complexType name="tabGroup">
@@ -78,25 +72,19 @@
 
   <xs:complexType name="property">
     <xs:sequence>
-      <xs:element name="actions">
+      <xs:element name="named" type="xs:string" minOccurs="0"/>
+      <xs:element name="describedAs" type="xs:string" minOccurs="0"/>
+      <xs:element name="actions" minOccurs="0">
         <xs:complexType>
           <xs:sequence>
             <xs:element name="action" type="tns:action" minOccurs="0" maxOccurs="unbounded"/>
           </xs:sequence>
         </xs:complexType>
       </xs:element>
-      <xs:element name="layout" type="tns:propertyLayout"/>
-    </xs:sequence>
-    <xs:attribute name="id" type="xs:string" use="required"/>
-  </xs:complexType>
-
-  <xs:complexType name="propertyLayout">
-    <xs:sequence>
-      <xs:element name="named" type="xs:string" minOccurs="0"/>
-      <xs:element name="describedAs" 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"/>
@@ -106,27 +94,21 @@
 
   <xs:complexType name="collection">
     <xs:sequence>
-      <xs:element name="actions">
+      <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 name="actions" minOccurs="0">
         <xs:complexType>
           <xs:sequence>
             <xs:element name="action" type="tns:action" minOccurs="0" maxOccurs="unbounded"/>
           </xs:sequence>
         </xs:complexType>
       </xs:element>
-      <xs:element name="layout" type="tns:collectionLayout"/>
-    </xs:sequence>
-    <xs:attribute name="id" type="xs:string" use="required"/>
-  </xs:complexType>
-
-  <xs:complexType name="collectionLayout">
-    <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: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>

http://git-wip-us.apache.org/repos/asf/isis/blob/79248dc5/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/Action.java
----------------------------------------------------------------------
diff --git a/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/Action.java b/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/Action.java
index 61c6443..7dd00de 100644
--- a/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/Action.java
+++ b/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/Action.java
@@ -25,12 +25,22 @@ import javax.xml.bind.annotation.XmlElement;
 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;
+
+/**
+ * Broadly corresponds 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>
+ */
 @XmlType(
-        name="action"
-        , propOrder = {
-                "id"
-                , "layout"
-        }
+    propOrder = {
+        "named"
+        , "describedAs"
+    }
 )
 public class Action implements Serializable {
 
@@ -61,15 +71,116 @@ public class Action implements Serializable {
 
 
 
-    private ActionLayout layout;
+    private BookmarkPolicy bookmarking;
+
+    @XmlAttribute(required = false)
+    public BookmarkPolicy getBookmarking() {
+        return bookmarking;
+    }
+
+    public void setBookmarking(BookmarkPolicy bookmarking) {
+        this.bookmarking = bookmarking;
+    }
+
+
+    private String cssClass;
+
+    @XmlAttribute(required = false)
+    public String getCssClass() {
+        return cssClass;
+    }
+
+    public void setCssClass(String cssClass) {
+        this.cssClass = cssClass;
+    }
+
+
+    private String cssClassFa;
+
+    @XmlAttribute(required = false)
+    public String getCssClassFa() {
+        return cssClassFa;
+    }
+
+    public void setCssClassFa(String cssClassFa) {
+        this.cssClassFa = cssClassFa;
+    }
+
+
+
+    private org.apache.isis.applib.annotation.ActionLayout.CssClassFaPosition cssClassFaPosition;
+
+    @XmlAttribute(required = false)
+    public org.apache.isis.applib.annotation.ActionLayout.CssClassFaPosition getCssClassFaPosition() {
+        return cssClassFaPosition;
+    }
+
+    public void setCssClassFaPosition(org.apache.isis.applib.annotation.ActionLayout.CssClassFaPosition cssClassFaPosition) {
+        this.cssClassFaPosition = cssClassFaPosition;
+    }
+
+
+    private String describedAs;
+
+    @XmlElement(required = false)
+    public String getDescribedAs() {
+        return describedAs;
+    }
+
+    public void setDescribedAs(String describedAs) {
+        this.describedAs = describedAs;
+    }
+
+
+
+    private Where hidden;
+
+    @XmlAttribute(required = false)
+    public Where getHidden() {
+        return hidden;
+    }
+
+    public void setHidden(Where hidden) {
+        this.hidden = hidden;
+    }
+
+
+
+    private String named;
+
+    @XmlElement(required = false)
+    public String getNamed() {
+        return named;
+    }
+
+    public void setNamed(String named) {
+        this.named = named;
+    }
+
+
+
+    private Boolean namedEscaped;
+
+    @XmlAttribute(required = false)
+    public Boolean getNamedEscaped() {
+        return namedEscaped;
+    }
+
+    public void setNamedEscaped(Boolean namedEscaped) {
+        this.namedEscaped = namedEscaped;
+    }
+
+
+
+    private org.apache.isis.applib.annotation.ActionLayout.Position position;
 
-    @XmlElement(name="layout", required = true)
-    public ActionLayout getLayout() {
-        return layout;
+    @XmlAttribute(required = false)
+    public org.apache.isis.applib.annotation.ActionLayout.Position getPosition() {
+        return position;
     }
 
-    public void setLayout(ActionLayout layout) {
-        this.layout = layout;
+    public void setPosition(org.apache.isis.applib.annotation.ActionLayout.Position position) {
+        this.position = position;
     }
 
 

http://git-wip-us.apache.org/repos/asf/isis/blob/79248dc5/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/ActionLayout.java
----------------------------------------------------------------------
diff --git a/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/ActionLayout.java b/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/ActionLayout.java
deleted file mode 100644
index 9068d91..0000000
--- a/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/ActionLayout.java
+++ /dev/null
@@ -1,178 +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.v1_0;
-
-import java.io.Serializable;
-
-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 org.apache.isis.applib.annotation.BookmarkPolicy;
-import org.apache.isis.applib.annotation.Where;
-
-/**
- * Broadly corresponds 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>
- */
-@XmlType(
-        propOrder = {
-                "named"
-                , "describedAs"
-        }
-)
-public class ActionLayout implements Serializable {
-
-    private static final long serialVersionUID = 1L;
-
-    private BookmarkPolicy bookmarking;
-
-    @XmlAttribute(required = false)
-    public BookmarkPolicy getBookmarking() {
-        return bookmarking;
-    }
-
-    public void setBookmarking(BookmarkPolicy bookmarking) {
-        this.bookmarking = bookmarking;
-    }
-
-
-    private String cssClass;
-
-    @XmlAttribute(required = false)
-    public String getCssClass() {
-        return cssClass;
-    }
-
-    public void setCssClass(String cssClass) {
-        this.cssClass = cssClass;
-    }
-
-
-    private String cssClassFa;
-
-    @XmlAttribute(required = false)
-    public String getCssClassFa() {
-        return cssClassFa;
-    }
-
-    public void setCssClassFa(String cssClassFa) {
-        this.cssClassFa = cssClassFa;
-    }
-
-
-
-    private org.apache.isis.applib.annotation.ActionLayout.CssClassFaPosition cssClassFaPosition;
-
-    @XmlAttribute(required = false)
-    public org.apache.isis.applib.annotation.ActionLayout.CssClassFaPosition getCssClassFaPosition() {
-        return cssClassFaPosition;
-    }
-
-    public void setCssClassFaPosition(org.apache.isis.applib.annotation.ActionLayout.CssClassFaPosition cssClassFaPosition) {
-        this.cssClassFaPosition = cssClassFaPosition;
-    }
-
-
-    private String describedAs;
-
-    @XmlElement(required = false)
-    public String getDescribedAs() {
-        return describedAs;
-    }
-
-    public void setDescribedAs(String describedAs) {
-        this.describedAs = describedAs;
-    }
-
-
-
-    private Where hidden;
-
-    @XmlAttribute(required = false)
-    public Where getHidden() {
-        return hidden;
-    }
-
-    public void setHidden(Where hidden) {
-        this.hidden = hidden;
-    }
-
-
-
-    private String named;
-
-    @XmlElement(required = false)
-    public String getNamed() {
-        return named;
-    }
-
-    public void setNamed(String named) {
-        this.named = named;
-    }
-
-
-
-    private Boolean namedEscaped;
-
-    @XmlAttribute(required = false)
-    public Boolean getNamedEscaped() {
-        return namedEscaped;
-    }
-
-    public void setNamedEscaped(Boolean namedEscaped) {
-        this.namedEscaped = namedEscaped;
-    }
-
-
-
-    private org.apache.isis.applib.annotation.ActionLayout.Position position;
-
-    @XmlAttribute(required = true)
-    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 Action owner;
-    /**
-     * Owner.
-     *
-     * <p>
-     *     Set programmatically by framework after reading in from XML.
-     * </p>
-     */
-    @XmlTransient
-    public Action getOwner() {
-        return owner;
-    }
-
-    public void setOwner(final Action owner) {
-        this.owner = owner;
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/isis/blob/79248dc5/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/Collection.java
----------------------------------------------------------------------
diff --git a/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/Collection.java b/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/Collection.java
index db7d92b..371db40 100644
--- a/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/Collection.java
+++ b/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/Collection.java
@@ -27,13 +27,22 @@ import javax.xml.bind.annotation.XmlElementWrapper;
 import javax.xml.bind.annotation.XmlTransient;
 import javax.xml.bind.annotation.XmlType;
 
-import com.google.common.collect.Lists;
+import org.apache.isis.applib.annotation.Where;
 
+/**
+ * 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>
+ */
 @XmlType(
         propOrder = {
-                "id"
+                "named"
+                ,"describedAs"
+                ,"sortedBy"
                 , "actions"
-                , "layout"
         }
 )
 public class Collection implements ColumnContent, ActionHolder, Serializable {
@@ -62,34 +71,125 @@ public class Collection implements ColumnContent, ActionHolder, Serializable {
     }
 
 
-    private List<Action> actions = Lists.newArrayList();
+
+    private String cssClass;
+
+    @XmlAttribute(required = false)
+    public String getCssClass() {
+        return cssClass;
+    }
+
+    public void setCssClass(String cssClass) {
+        this.cssClass = cssClass;
+    }
+
+
+
+    private String describedAs;
+
+    @XmlElement(required = false)
+    public String getDescribedAs() {
+        return describedAs;
+    }
+
+    public void setDescribedAs(String describedAs) {
+        this.describedAs = describedAs;
+    }
+
+
+
+    private String defaultView;
 
     /**
-     * The <code>&lt;actions&gt;</code> element must be present but can be empty.
+     * 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>.
      */
-    @XmlElementWrapper(name = "actions", required = true)
-    @XmlElement(name = "action", required = false)
-    public List<Action> getActions() {
-        return actions;
+    @XmlAttribute(required = false)
+    public String getDefaultView() {
+        return defaultView;
     }
 
-    public void setActions(List<Action> actions) {
-        this.actions = actions;
+    public void setDefaultView(String defaultView) {
+        this.defaultView = defaultView;
+    }
+
+
+    private Where hidden;
+
+    @XmlAttribute(required = false)
+    public Where getHidden() {
+        return hidden;
+    }
+
+    public void setHidden(Where hidden) {
+        this.hidden = hidden;
+    }
+
+
+    private String named;
+
+    @XmlElement(required = false)
+    public String getNamed() {
+        return named;
+    }
+
+    public void setNamed(String named) {
+        this.named = named;
+    }
+
+
+    private Boolean namedEscaped;
+
+    @XmlAttribute(required = false)
+    public Boolean getNamedEscaped() {
+        return namedEscaped;
+    }
+
+    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 CollectionLayout layout = new CollectionLayout();
 
-    @XmlElement(name = "layout", required = true)
-    public CollectionLayout getLayout() {
-        return layout;
+    private String sortedBy;
+
+    @XmlElement(required = false)
+    public String getSortedBy() {
+        return sortedBy;
     }
 
-    public void setLayout(CollectionLayout layout) {
-        this.layout = layout;
+    public void setSortedBy(String sortedBy) {
+        this.sortedBy = sortedBy;
     }
 
 
+
+    private List<Action> actions;
+
+    @XmlElementWrapper(name = "actions", required = false)
+    @XmlElement(name = "action", required = false)
+    public List<Action> getActions() {
+        return actions;
+    }
+
+    public void setActions(List<Action> actions) {
+        this.actions = actions;
+    }
+
+
+
     private Column owner;
     /**
      * Owner.

http://git-wip-us.apache.org/repos/asf/isis/blob/79248dc5/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/CollectionLayout.java
----------------------------------------------------------------------
diff --git a/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/CollectionLayout.java b/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/CollectionLayout.java
deleted file mode 100644
index 08f89fc..0000000
--- a/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/CollectionLayout.java
+++ /dev/null
@@ -1,169 +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.v1_0;
-
-
-import java.io.Serializable;
-
-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 org.apache.isis.applib.annotation.Where;
-
-/**
- * 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>
- */
-@XmlType(
-        propOrder = {
-                "named"
-                ,"describedAs"
-                ,"sortedBy"
-        }
-)
-public class CollectionLayout implements Serializable {
-
-    private static final long serialVersionUID = 1L;
-
-    private String cssClass;
-
-    @XmlAttribute(required = false)
-    public String getCssClass() {
-        return cssClass;
-    }
-
-    public void setCssClass(String cssClass) {
-        this.cssClass = cssClass;
-    }
-
-
-
-    private String describedAs;
-
-    @XmlElement(required = false)
-    public String getDescribedAs() {
-        return describedAs;
-    }
-
-    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;
-
-    @XmlAttribute(required = false)
-    public Where getHidden() {
-        return hidden;
-    }
-
-    public void setHidden(Where hidden) {
-        this.hidden = hidden;
-    }
-
-
-    private String named;
-
-    @XmlElement(required = false)
-    public String getNamed() {
-        return named;
-    }
-
-    public void setNamed(String named) {
-        this.named = named;
-    }
-
-
-    private Boolean namedEscaped;
-
-    @XmlAttribute(required = false)
-    public Boolean getNamedEscaped() {
-        return namedEscaped;
-    }
-
-    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 Collection owner;
-    /**
-     * Owner.
-     *
-     * <p>
-     *     Set programmatically by framework after reading in from XML.
-     * </p>
-     */
-    @XmlTransient
-    public Collection getOwner() {
-        return owner;
-    }
-
-    public void setOwner(final Collection owner) {
-        this.owner = owner;
-    }
-
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/isis/blob/79248dc5/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/DomainObject.java
----------------------------------------------------------------------
diff --git a/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/DomainObject.java b/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/DomainObject.java
index 4d89b47..99388eb 100644
--- a/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/DomainObject.java
+++ b/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/DomainObject.java
@@ -22,14 +22,11 @@ import java.io.Serializable;
 import java.util.ArrayList;
 import java.util.List;
 
-import javax.annotation.Nullable;
 import javax.xml.bind.annotation.XmlElement;
 import javax.xml.bind.annotation.XmlElementWrapper;
 import javax.xml.bind.annotation.XmlRootElement;
 import javax.xml.bind.annotation.XmlType;
 
-import com.google.common.collect.Lists;
-
 import org.apache.isis.applib.services.dto.Dto;
 
 @XmlRootElement
@@ -43,13 +40,9 @@ public class DomainObject implements Dto, ActionHolder, Serializable {
 
     private static final long serialVersionUID = 1L;
 
-    private List<Action> actions = Lists.newArrayList();
-
+    private List<Action> actions;
 
-    /**
-     * The <code>&lt;actions&gt;</code> element must be present but can be empty.
-     */
-    @XmlElementWrapper(name = "actions", required = true)
+    @XmlElementWrapper(name = "actions", required = false)
     @XmlElement(name = "action", required = false)
     public List<Action> getActions() {
         return actions;
@@ -87,11 +80,8 @@ public class DomainObject implements Dto, ActionHolder, Serializable {
         void visit(final Column column);
         void visit(final PropertyGroup propertyGroup);
         void visit(final Property property);
-        void visit(final PropertyLayout propertyLayout);
         void visit(final Collection collection);
-        void visit(final CollectionLayout collectionLayout);
         void visit(final Action action);
-        void visit(@Nullable final ActionLayout actionLayout);
     }
 
     public static class VisitorAdapter implements Visitor {
@@ -108,15 +98,9 @@ public class DomainObject implements Dto, ActionHolder, Serializable {
         @Override
         public void visit(final Property property) {}
         @Override
-        public void visit(final PropertyLayout propertyLayout) { }
-        @Override
         public void visit(final Collection collection) {}
         @Override
-        public void visit(final CollectionLayout collectionLayout) { }
-        @Override
         public void visit(final Action action) { }
-        @Override
-        public void visit(final ActionLayout actionLayout) { }
     }
 
     /**
@@ -163,9 +147,6 @@ public class DomainObject implements Dto, ActionHolder, Serializable {
             for (final Property property : properties) {
                 property.setOwner(propertyGroup);
                 visitor.visit(property);
-                final PropertyLayout layout = property.getLayout();
-                layout.setOwner(property);
-                visitor.visit(layout);
                 traverseActions(property, visitor);
             }
         }
@@ -175,21 +156,18 @@ public class DomainObject implements Dto, ActionHolder, Serializable {
         for (final Collection collection : column.getCollections()) {
             collection.setOwner(column);
             visitor.visit(collection);
-            final CollectionLayout layout = collection.getLayout();
-            layout.setOwner(collection);
-            visitor.visit(layout);
             traverseActions(collection, visitor);
         }
     }
 
     private void traverseActions(final ActionHolder actionHolder, final Visitor visitor) {
         final List<Action> actions = actionHolder.getActions();
+        if(actions == null) {
+            return;
+        }
         for (final Action action : actions) {
             action.setOwner(actionHolder);
             visitor.visit(action);
-            final ActionLayout layout = action.getLayout();
-            layout.setOwner(action);
-            visitor.visit(layout);
         }
     }
 

http://git-wip-us.apache.org/repos/asf/isis/blob/79248dc5/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/Property.java
----------------------------------------------------------------------
diff --git a/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/Property.java b/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/Property.java
index 6f98d07..e01e47c 100644
--- a/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/Property.java
+++ b/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/Property.java
@@ -27,13 +27,17 @@ import javax.xml.bind.annotation.XmlElementWrapper;
 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;
 
+/**
+ * Broadly corresponds to the {@link org.apache.isis.applib.annotation.PropertyLayout} annotation.
+ */
 @XmlType(
         propOrder = {
-                "id"
+                "named"
+                , "describedAs"
                 , "actions"
-                , "layout"
         }
 )
 public class Property implements ActionHolder, Serializable {
@@ -62,33 +66,127 @@ public class Property implements ActionHolder, Serializable {
     }
 
 
-    private List<Action> actions = Lists.newArrayList();
 
-    /**
-     * The <code>&lt;actions&gt;</code> element must be present but can be empty.
-     */
-    @XmlElementWrapper(required = true)
-    @XmlElement(name = "action", required = false)
-    public List<Action> getActions() {
-        return actions;
+    private String cssClass;
+
+    @XmlAttribute(required = false)
+    public String getCssClass() {
+        return cssClass;
     }
 
-    public void setActions(List<Action> actions) {
-        this.actions = actions;
+    public void setCssClass(String cssClass) {
+        this.cssClass = cssClass;
+    }
+
+
+    private String describedAs;
+
+    @XmlElement(required = false)
+    public String getDescribedAs() {
+        return describedAs;
+    }
+
+    public void setDescribedAs(String describedAs) {
+        this.describedAs = describedAs;
+    }
+
+
+    private Where hidden;
+
+    @XmlAttribute(required = false)
+    public Where getHidden() {
+        return hidden;
+    }
+
+    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;
+
+    @XmlElement(required = false)
+    public String getNamed() {
+        return named;
+    }
+
+    public void setNamed(String named) {
+        this.named = named;
     }
 
-    private PropertyLayout layout = new PropertyLayout();
 
-    @XmlElement(required = true)
-    public PropertyLayout getLayout() {
-        return layout;
+    private Boolean namedEscaped;
+
+    @XmlAttribute(required = false)
+    public Boolean getNamedEscaped() {
+        return namedEscaped;
+    }
+
+    public void setNamedEscaped(Boolean namedEscaped) {
+        this.namedEscaped = namedEscaped;
+    }
+
+
+    private Boolean renderedAsDayBefore;
+
+    @XmlAttribute(required = false)
+    public Boolean getRenderedAsDayBefore() {
+        return renderedAsDayBefore;
     }
 
-    public void setLayout(PropertyLayout layout) {
-        this.layout = layout;
+    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<Action> actions;
+
+    @XmlElementWrapper(required = false)
+    @XmlElement(name = "action", required = false)
+    public List<Action> getActions() {
+        return actions;
+    }
+
+    public void setActions(List<Action> actions) {
+        this.actions = actions;
+    }
 
 
     private PropertyGroup owner;

http://git-wip-us.apache.org/repos/asf/isis/blob/79248dc5/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/PropertyLayout.java
----------------------------------------------------------------------
diff --git a/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/PropertyLayout.java b/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/PropertyLayout.java
deleted file mode 100644
index 7e67acf..0000000
--- a/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/PropertyLayout.java
+++ /dev/null
@@ -1,166 +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.v1_0;
-
-import java.io.Serializable;
-
-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 org.apache.isis.applib.annotation.LabelPosition;
-import org.apache.isis.applib.annotation.Where;
-
-@XmlType(
-        propOrder = {
-                "named"
-                , "describedAs"
-        }
-)
-public class PropertyLayout implements Serializable {
-
-    private static final long serialVersionUID = 1L;
-
-    private String cssClass;
-
-    @XmlAttribute(required = false)
-    public String getCssClass() {
-        return cssClass;
-    }
-
-    public void setCssClass(String cssClass) {
-        this.cssClass = cssClass;
-    }
-
-
-    private String describedAs;
-
-    @XmlElement(required = false)
-    public String getDescribedAs() {
-        return describedAs;
-    }
-
-    public void setDescribedAs(String describedAs) {
-        this.describedAs = describedAs;
-    }
-
-
-    private Where hidden;
-
-    @XmlAttribute(required = false)
-    public Where getHidden() {
-        return hidden;
-    }
-
-    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;
-
-    @XmlElement(required = false)
-    public String getNamed() {
-        return named;
-    }
-
-    public void setNamed(String named) {
-        this.named = named;
-    }
-
-
-    private Boolean namedEscaped;
-
-    @XmlAttribute(required = false)
-    public Boolean getNamedEscaped() {
-        return namedEscaped;
-    }
-
-    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 Property owner;
-    /**
-     * Owner.
-     *
-     * <p>
-     *     Set programmatically by framework after reading in from XML.
-     * </p>
-     */
-    @XmlTransient
-    public Property getOwner() {
-        return owner;
-    }
-
-    public void setOwner(final Property owner) {
-        this.owner = owner;
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/isis/blob/79248dc5/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/actions/layout/ActionPositionFacetForActionLayoutXml.java
----------------------------------------------------------------------
diff --git a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/actions/layout/ActionPositionFacetForActionLayoutXml.java b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/actions/layout/ActionPositionFacetForActionLayoutXml.java
deleted file mode 100644
index c585b6b..0000000
--- a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/actions/layout/ActionPositionFacetForActionLayoutXml.java
+++ /dev/null
@@ -1,41 +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.facets.actions.layout;
-
-import org.apache.isis.applib.layout.v1_0.ActionLayout;
-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;
-
-public class ActionPositionFacetForActionLayoutXml extends ActionPositionFacetAbstract {
-
-    public static ActionPositionFacet create(ActionLayout actionLayout, FacetHolder holder) {
-        if(actionLayout == null) {
-            return null;
-        }
-        final org.apache.isis.applib.annotation.ActionLayout.Position position = actionLayout.getPosition();
-        return position != null ? new ActionPositionFacetForActionLayoutXml(position, holder) : null;
-    }
-
-    private ActionPositionFacetForActionLayoutXml(final org.apache.isis.applib.annotation.ActionLayout.Position position, final FacetHolder holder) {
-        super(position, holder);
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/isis/blob/79248dc5/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
new file mode 100644
index 0000000..d19bf9d
--- /dev/null
+++ b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/actions/layout/ActionPositionFacetForActionXml.java
@@ -0,0 +1,41 @@
+/*
+ *  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.facets.actions.layout;
+
+import org.apache.isis.applib.layout.v1_0.Action;
+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;
+
+public class ActionPositionFacetForActionXml extends ActionPositionFacetAbstract {
+
+    public static ActionPositionFacet create(Action actionLayout, FacetHolder holder) {
+        if(actionLayout == null) {
+            return null;
+        }
+        final org.apache.isis.applib.annotation.ActionLayout.Position position = actionLayout.getPosition();
+        return position != null ? new ActionPositionFacetForActionXml(position, holder) : null;
+    }
+
+    private ActionPositionFacetForActionXml(final org.apache.isis.applib.annotation.ActionLayout.Position position, final FacetHolder holder) {
+        super(position, holder);
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/isis/blob/79248dc5/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/actions/layout/BookmarkPolicyFacetForActionLayoutXml.java
----------------------------------------------------------------------
diff --git a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/actions/layout/BookmarkPolicyFacetForActionLayoutXml.java b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/actions/layout/BookmarkPolicyFacetForActionLayoutXml.java
deleted file mode 100644
index f273e9a..0000000
--- a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/actions/layout/BookmarkPolicyFacetForActionLayoutXml.java
+++ /dev/null
@@ -1,42 +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.facets.actions.layout;
-
-import org.apache.isis.applib.annotation.BookmarkPolicy;
-import org.apache.isis.applib.layout.v1_0.ActionLayout;
-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;
-
-public class BookmarkPolicyFacetForActionLayoutXml extends BookmarkPolicyFacetAbstract {
-
-    public static BookmarkPolicyFacet create(final ActionLayout actionLayout, final FacetHolder holder) {
-        if (actionLayout == null) {
-            return null;
-        }
-        final BookmarkPolicy bookmarkPolicy = actionLayout.getBookmarking();
-        return bookmarkPolicy != null && bookmarkPolicy != BookmarkPolicy.NEVER ? new BookmarkPolicyFacetForActionLayoutXml(bookmarkPolicy, holder) : null;
-    }
-
-    private BookmarkPolicyFacetForActionLayoutXml(final BookmarkPolicy bookmarkPolicy, final FacetHolder holder) {
-        super(bookmarkPolicy, holder);
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/isis/blob/79248dc5/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
new file mode 100644
index 0000000..b3a9623
--- /dev/null
+++ b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/actions/layout/BookmarkPolicyFacetForActionXml.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.core.metamodel.facets.actions.layout;
+
+import org.apache.isis.applib.annotation.BookmarkPolicy;
+import org.apache.isis.applib.layout.v1_0.Action;
+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;
+
+public class BookmarkPolicyFacetForActionXml extends BookmarkPolicyFacetAbstract {
+
+    public static BookmarkPolicyFacet create(final Action actionLayout, final FacetHolder holder) {
+        if (actionLayout == null) {
+            return null;
+        }
+        final BookmarkPolicy bookmarkPolicy = actionLayout.getBookmarking();
+        return bookmarkPolicy != null && bookmarkPolicy != BookmarkPolicy.NEVER ? new BookmarkPolicyFacetForActionXml(bookmarkPolicy, holder) : null;
+    }
+
+    private BookmarkPolicyFacetForActionXml(final BookmarkPolicy bookmarkPolicy, final FacetHolder holder) {
+        super(bookmarkPolicy, holder);
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/isis/blob/79248dc5/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/actions/layout/CssClassFaFacetForActionLayoutXml.java
----------------------------------------------------------------------
diff --git a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/actions/layout/CssClassFaFacetForActionLayoutXml.java b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/actions/layout/CssClassFaFacetForActionLayoutXml.java
deleted file mode 100644
index 285d705..0000000
--- a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/actions/layout/CssClassFaFacetForActionLayoutXml.java
+++ /dev/null
@@ -1,45 +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.facets.actions.layout;
-
-import com.google.common.base.Strings;
-
-import org.apache.isis.applib.layout.v1_0.ActionLayout;
-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;
-import org.apache.isis.core.metamodel.facets.members.cssclassfa.CssClassFaPosition;
-
-public class CssClassFaFacetForActionLayoutXml extends CssClassFaFacetAbstract {
-
-    public static CssClassFaFacet create(final ActionLayout actionLayout, final FacetHolder holder) {
-        if(actionLayout == null) {
-            return null;
-        }
-        final String cssClassFa = Strings.emptyToNull(actionLayout.getCssClassFa());
-        CssClassFaPosition cssClassFaPosition = CssClassFaPosition.from(actionLayout.getCssClassFaPosition());
-        return cssClassFa != null ? new CssClassFaFacetForActionLayoutXml(cssClassFa, cssClassFaPosition, holder) : null;
-    }
-
-    private CssClassFaFacetForActionLayoutXml(final String value, final CssClassFaPosition position, final FacetHolder holder) {
-        super(value, position, holder);
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/isis/blob/79248dc5/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
new file mode 100644
index 0000000..d0258d4
--- /dev/null
+++ b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/actions/layout/CssClassFaFacetForActionXml.java
@@ -0,0 +1,45 @@
+/*
+ *  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.facets.actions.layout;
+
+import com.google.common.base.Strings;
+
+import org.apache.isis.applib.layout.v1_0.Action;
+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;
+import org.apache.isis.core.metamodel.facets.members.cssclassfa.CssClassFaPosition;
+
+public class CssClassFaFacetForActionXml extends CssClassFaFacetAbstract {
+
+    public static CssClassFaFacet create(final Action actionLayout, final FacetHolder holder) {
+        if(actionLayout == null) {
+            return null;
+        }
+        final String cssClassFa = Strings.emptyToNull(actionLayout.getCssClassFa());
+        CssClassFaPosition cssClassFaPosition = CssClassFaPosition.from(actionLayout.getCssClassFaPosition());
+        return cssClassFa != null ? new CssClassFaFacetForActionXml(cssClassFa, cssClassFaPosition, holder) : null;
+    }
+
+    private CssClassFaFacetForActionXml(final String value, final CssClassFaPosition position, final FacetHolder holder) {
+        super(value, position, holder);
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/isis/blob/79248dc5/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/actions/layout/CssClassFacetForActionLayoutXml.java
----------------------------------------------------------------------
diff --git a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/actions/layout/CssClassFacetForActionLayoutXml.java b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/actions/layout/CssClassFacetForActionLayoutXml.java
deleted file mode 100644
index c242091..0000000
--- a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/actions/layout/CssClassFacetForActionLayoutXml.java
+++ /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.
- */
-
-package org.apache.isis.core.metamodel.facets.actions.layout;
-
-import com.google.common.base.Strings;
-
-import org.apache.isis.applib.layout.v1_0.ActionLayout;
-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;
-
-public class CssClassFacetForActionLayoutXml extends CssClassFacetAbstract {
-
-    public static CssClassFacet create(ActionLayout actionLayout, FacetHolder holder) {
-        if(actionLayout == null) {
-            return null;
-        }
-        final String cssClass = Strings.emptyToNull(actionLayout.getCssClass());
-        return cssClass != null ? new CssClassFacetForActionLayoutXml(cssClass, holder) : null;
-    }
-
-    private CssClassFacetForActionLayoutXml(String value, FacetHolder holder) {
-        super(value, holder);
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/isis/blob/79248dc5/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
new file mode 100644
index 0000000..9ba1431
--- /dev/null
+++ b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/actions/layout/CssClassFacetForActionXml.java
@@ -0,0 +1,43 @@
+/*
+ *  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.facets.actions.layout;
+
+import com.google.common.base.Strings;
+
+import org.apache.isis.applib.layout.v1_0.Action;
+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;
+
+public class CssClassFacetForActionXml extends CssClassFacetAbstract {
+
+    public static CssClassFacet create(Action actionLayout, FacetHolder holder) {
+        if(actionLayout == null) {
+            return null;
+        }
+        final String cssClass = Strings.emptyToNull(actionLayout.getCssClass());
+        return cssClass != null ? new CssClassFacetForActionXml(cssClass, holder) : null;
+    }
+
+    private CssClassFacetForActionXml(String value, FacetHolder holder) {
+        super(value, holder);
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/isis/blob/79248dc5/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/actions/layout/DescribedAsFacetForActionLayoutXml.java
----------------------------------------------------------------------
diff --git a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/actions/layout/DescribedAsFacetForActionLayoutXml.java b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/actions/layout/DescribedAsFacetForActionLayoutXml.java
deleted file mode 100644
index 493cd7f..0000000
--- a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/actions/layout/DescribedAsFacetForActionLayoutXml.java
+++ /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.
- */
-
-package org.apache.isis.core.metamodel.facets.actions.layout;
-
-import com.google.common.base.Strings;
-
-import org.apache.isis.applib.layout.v1_0.ActionLayout;
-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;
-
-public class DescribedAsFacetForActionLayoutXml extends DescribedAsFacetAbstract {
-
-    public static DescribedAsFacet create(ActionLayout actionLayout, FacetHolder holder) {
-        if(actionLayout == null) {
-            return null;
-        }
-        final String describedAs = Strings.emptyToNull(actionLayout.getDescribedAs());
-        return describedAs != null ? new DescribedAsFacetForActionLayoutXml(describedAs, holder) : null;
-    }
-
-    private DescribedAsFacetForActionLayoutXml(String value, FacetHolder holder) {
-        super(value, holder);
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/isis/blob/79248dc5/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
new file mode 100644
index 0000000..a33dd7c
--- /dev/null
+++ b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/actions/layout/DescribedAsFacetForActionXml.java
@@ -0,0 +1,43 @@
+/*
+ *  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.facets.actions.layout;
+
+import com.google.common.base.Strings;
+
+import org.apache.isis.applib.layout.v1_0.Action;
+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;
+
+public class DescribedAsFacetForActionXml extends DescribedAsFacetAbstract {
+
+    public static DescribedAsFacet create(Action actionLayout, FacetHolder holder) {
+        if(actionLayout == null) {
+            return null;
+        }
+        final String describedAs = Strings.emptyToNull(actionLayout.getDescribedAs());
+        return describedAs != null ? new DescribedAsFacetForActionXml(describedAs, holder) : null;
+    }
+
+    private DescribedAsFacetForActionXml(String value, FacetHolder holder) {
+        super(value, holder);
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/isis/blob/79248dc5/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 821083a..c0b98da1 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.v1_0.ActionLayout;
+import org.apache.isis.applib.layout.v1_0.Action;
 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;
@@ -29,7 +29,7 @@ import org.apache.isis.core.metamodel.facets.members.hidden.HiddenFacetAbstract;
 
 public class HiddenFacetForActionLayoutXml extends HiddenFacetAbstract {
 
-    public static HiddenFacet create(final ActionLayout actionLayout, final FacetHolder holder) {
+    public static HiddenFacet create(final Action actionLayout, final FacetHolder holder) {
         if (actionLayout == null) {
             return null;
         }

http://git-wip-us.apache.org/repos/asf/isis/blob/79248dc5/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/actions/layout/NamedFacetForActionLayoutXml.java
----------------------------------------------------------------------
diff --git a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/actions/layout/NamedFacetForActionLayoutXml.java b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/actions/layout/NamedFacetForActionLayoutXml.java
deleted file mode 100644
index a8917d6..0000000
--- a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/actions/layout/NamedFacetForActionLayoutXml.java
+++ /dev/null
@@ -1,45 +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.facets.actions.layout;
-
-import com.google.common.base.Strings;
-
-import org.apache.isis.applib.layout.v1_0.ActionLayout;
-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;
-
-public class NamedFacetForActionLayoutXml extends NamedFacetAbstract {
-
-    public static NamedFacet create(final ActionLayout actionLayout, final FacetHolder holder) {
-        if(actionLayout == null) {
-            return null;
-        }
-        final String named = Strings.emptyToNull(actionLayout.getNamed());
-        Boolean escaped = actionLayout.getNamedEscaped();
-        return named != null ? new NamedFacetForActionLayoutXml(named, (escaped == null || escaped), holder) : null;
-    }
-
-    private NamedFacetForActionLayoutXml(final String value, final boolean escaped, final FacetHolder holder) {
-
-        super(value, escaped, holder);
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/isis/blob/79248dc5/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
new file mode 100644
index 0000000..c96fa2a
--- /dev/null
+++ b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/actions/layout/NamedFacetForActionXml.java
@@ -0,0 +1,45 @@
+/*
+ *  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.facets.actions.layout;
+
+import com.google.common.base.Strings;
+
+import org.apache.isis.applib.layout.v1_0.Action;
+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;
+
+public class NamedFacetForActionXml extends NamedFacetAbstract {
+
+    public static NamedFacet create(final Action actionLayout, final FacetHolder holder) {
+        if(actionLayout == null) {
+            return null;
+        }
+        final String named = Strings.emptyToNull(actionLayout.getNamed());
+        Boolean escaped = actionLayout.getNamedEscaped();
+        return named != null ? new NamedFacetForActionXml(named, (escaped == null || escaped), holder) : null;
+    }
+
+    private NamedFacetForActionXml(final String value, final boolean escaped, final FacetHolder holder) {
+
+        super(value, escaped, holder);
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/isis/blob/79248dc5/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/collections/layout/CssClassFacetForCollectionLayoutXml.java
----------------------------------------------------------------------
diff --git a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/collections/layout/CssClassFacetForCollectionLayoutXml.java b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/collections/layout/CssClassFacetForCollectionLayoutXml.java
deleted file mode 100644
index 80f6132..0000000
--- a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/collections/layout/CssClassFacetForCollectionLayoutXml.java
+++ /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.
- */
-
-package org.apache.isis.core.metamodel.facets.collections.layout;
-
-import com.google.common.base.Strings;
-
-import org.apache.isis.applib.layout.v1_0.CollectionLayout;
-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;
-
-public class CssClassFacetForCollectionLayoutXml extends CssClassFacetAbstract {
-
-    public static CssClassFacet create(CollectionLayout collectionLayout, FacetHolder holder) {
-        if(collectionLayout == null) {
-            return null;
-        }
-        final String cssClass = Strings.emptyToNull(collectionLayout.getCssClass());
-        return cssClass != null ? new CssClassFacetForCollectionLayoutXml(cssClass, holder) : null;
-    }
-
-    private CssClassFacetForCollectionLayoutXml(String value, FacetHolder holder) {
-        super(value, holder);
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/isis/blob/79248dc5/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
new file mode 100644
index 0000000..c75d5a7
--- /dev/null
+++ b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/collections/layout/CssClassFacetForCollectionXml.java
@@ -0,0 +1,43 @@
+/*
+ *  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.facets.collections.layout;
+
+import com.google.common.base.Strings;
+
+import org.apache.isis.applib.layout.v1_0.Collection;
+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;
+
+public class CssClassFacetForCollectionXml extends CssClassFacetAbstract {
+
+    public static CssClassFacet create(Collection collectionLayout, FacetHolder holder) {
+        if(collectionLayout == null) {
+            return null;
+        }
+        final String cssClass = Strings.emptyToNull(collectionLayout.getCssClass());
+        return cssClass != null ? new CssClassFacetForCollectionXml(cssClass, holder) : null;
+    }
+
+    private CssClassFacetForCollectionXml(String value, FacetHolder holder) {
+        super(value, holder);
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/isis/blob/79248dc5/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/collections/layout/DefaultViewFacetForCollectionLayoutXml.java
----------------------------------------------------------------------
diff --git a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/collections/layout/DefaultViewFacetForCollectionLayoutXml.java b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/collections/layout/DefaultViewFacetForCollectionLayoutXml.java
deleted file mode 100644
index b8d9056..0000000
--- a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/collections/layout/DefaultViewFacetForCollectionLayoutXml.java
+++ /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.
- */
-
-package org.apache.isis.core.metamodel.facets.collections.layout;
-
-import com.google.common.base.Strings;
-
-import org.apache.isis.applib.layout.v1_0.CollectionLayout;
-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;
-
-public class DefaultViewFacetForCollectionLayoutXml extends DefaultViewFacetAbstract {
-
-    private DefaultViewFacetForCollectionLayoutXml(String value, FacetHolder holder) {
-        super(value, holder);
-    }
-
-    public static DefaultViewFacet create(CollectionLayout collectionLayout, FacetHolder holder) {
-        if (collectionLayout == null) {
-            return null;
-        }
-
-        final String defaultView = Strings.emptyToNull(collectionLayout.getDefaultView());
-        return defaultView != null ? new DefaultViewFacetForCollectionLayoutXml(defaultView, holder) : null;
-    }
-}

http://git-wip-us.apache.org/repos/asf/isis/blob/79248dc5/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
new file mode 100644
index 0000000..594bca0
--- /dev/null
+++ b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/collections/layout/DefaultViewFacetForCollectionXml.java
@@ -0,0 +1,43 @@
+/*
+ *  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.facets.collections.layout;
+
+import com.google.common.base.Strings;
+
+import org.apache.isis.applib.layout.v1_0.Collection;
+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;
+
+public class DefaultViewFacetForCollectionXml extends DefaultViewFacetAbstract {
+
+    private DefaultViewFacetForCollectionXml(String value, FacetHolder holder) {
+        super(value, holder);
+    }
+
+    public static DefaultViewFacet create(Collection collectionLayout, FacetHolder holder) {
+        if (collectionLayout == null) {
+            return null;
+        }
+
+        final String defaultView = Strings.emptyToNull(collectionLayout.getDefaultView());
+        return defaultView != null ? new DefaultViewFacetForCollectionXml(defaultView, holder) : null;
+    }
+}


[38/50] [abbrv] isis git commit: ISIS-993: simplifying and finetuning.

Posted by da...@apache.org.
ISIS-993: simplifying and finetuning.

- layout.json disabled completely if a layout.xml is discovered
- got rid of the enable/disable dynamic reloading, went back to checking deployment category for isProduction mode or not
- ObjectLayoutMetadataService caches bad XML and also maintains xml -> metadata map (non-prod mode only)
- blacklisting only applies if in non-prod mode
- combined getMetadata() and reloadMetadata()
- ensure that members are sorted correctly when in property groups (within their col / tab)
- set up service specifications as being markAsService eagerly, rather than later on.
- removing EntityCombinedPanelFactory, now use EntityTabGroupsPanelFactory for both cases.


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

Branch: refs/heads/ISIS-993
Commit: c3b614c28fa7f630f0f5834180fa4923bb0d2ab0
Parents: 2b17046
Author: Dan Haywood <da...@haywood-associates.co.uk>
Authored: Wed Jan 13 01:50:17 2016 +0000
Committer: Dan Haywood <da...@haywood-associates.co.uk>
Committed: Mon Jan 25 14:38:24 2016 +0000

----------------------------------------------------------------------
 .../layout/v1_0/ObjectLayoutMetadata.java       | 13 ++++
 .../layout/ObjectLayoutMetadataService.java     | 13 ++--
 .../isis/core/commons/lang/ClassExtensions.java |  5 ++
 .../ObjectLayoutMetadataFacet.java              |  7 --
 .../ObjectLayoutMetadataFacetDefault.java       | 52 +++++++-------
 .../ObjectLayoutMetadataFacetFactory.java       |  2 +-
 .../layoutmetadata/LayoutMetadataReader2.java   |  2 +-
 .../json/LayoutMetadataReaderFromJson.java      | 30 +++++++-
 .../ObjectLayoutMetadataServiceDefault.java     | 76 +++++++++++++++-----
 .../services/metamodel/MetadataMenu.java        | 43 -----------
 .../spec/feature/ObjectAssociation.java         |  5 ++
 .../specloader/ObjectReflectorDefault.java      | 18 ++++-
 .../specimpl/FacetedMethodsBuilder.java         |  5 +-
 .../dflt/ObjectSpecificationDefault.java        | 11 ---
 .../ComponentFactoryRegistrarDefault.java       |  2 -
 .../combined/EntityCombinedPanelFactory.java    | 52 --------------
 .../entity/tabgroups/EntityTabGroupsPanel.java  | 14 ----
 .../tabgroups/EntityTabGroupsPanelFactory.java  | 10 +--
 .../wicket/ui/pages/entity/EntityPage.java      | 20 +++---
 19 files changed, 176 insertions(+), 204 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/isis/blob/c3b614c2/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/ObjectLayoutMetadata.java
----------------------------------------------------------------------
diff --git a/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/ObjectLayoutMetadata.java b/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/ObjectLayoutMetadata.java
index 4af327c..727bba2 100644
--- a/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/ObjectLayoutMetadata.java
+++ b/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/ObjectLayoutMetadata.java
@@ -251,4 +251,17 @@ public class ObjectLayoutMetadata implements Dto, ActionHolder, Serializable {
     }
 
 
+    private boolean normalized;
+
+    @Programmatic
+    @XmlTransient
+    public boolean isNormalized() {
+        return normalized;
+    }
+
+    @Programmatic
+    public void setNormalized(final boolean normalized) {
+        this.normalized = normalized;
+    }
+
 }

http://git-wip-us.apache.org/repos/asf/isis/blob/c3b614c2/core/applib/src/main/java/org/apache/isis/applib/services/layout/ObjectLayoutMetadataService.java
----------------------------------------------------------------------
diff --git a/core/applib/src/main/java/org/apache/isis/applib/services/layout/ObjectLayoutMetadataService.java b/core/applib/src/main/java/org/apache/isis/applib/services/layout/ObjectLayoutMetadataService.java
index e29ff47..1de0147 100644
--- a/core/applib/src/main/java/org/apache/isis/applib/services/layout/ObjectLayoutMetadataService.java
+++ b/core/applib/src/main/java/org/apache/isis/applib/services/layout/ObjectLayoutMetadataService.java
@@ -22,7 +22,13 @@ import org.apache.isis.applib.layout.v1_0.ObjectLayoutMetadata;
 public interface ObjectLayoutMetadataService {
 
     /**
-     * Returns raw (unnormalized) metadata, per the <code>.layout.xml</code> file.
+     * Whether any metadata exists for this domain class, and if so then whether it is valid or invalid.
+     */
+    @Programmatic
+    boolean exists(Class<?> domainClass);
+
+    /**
+     * Returns raw (unnormalized) metadata, eg per the <code>.layout.xml</code> file.
      */
     @Programmatic
     ObjectLayoutMetadata fromXml(Class<?> domainClass);
@@ -39,10 +45,5 @@ public interface ObjectLayoutMetadataService {
     @Programmatic
     ObjectLayoutMetadata toMetadata(Class<?> domainClass);
 
-    @Programmatic
-    void toggleDynamicReloading();
-
-    @Programmatic
-    boolean isDynamicReloading();
 
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/isis/blob/c3b614c2/core/metamodel/src/main/java/org/apache/isis/core/commons/lang/ClassExtensions.java
----------------------------------------------------------------------
diff --git a/core/metamodel/src/main/java/org/apache/isis/core/commons/lang/ClassExtensions.java b/core/metamodel/src/main/java/org/apache/isis/core/commons/lang/ClassExtensions.java
index 5f6983d..01ce5ca 100644
--- a/core/metamodel/src/main/java/org/apache/isis/core/commons/lang/ClassExtensions.java
+++ b/core/metamodel/src/main/java/org/apache/isis/core/commons/lang/ClassExtensions.java
@@ -174,6 +174,11 @@ public final class ClassExtensions {
         return Resources.toString(url, Charset.defaultCharset());
     }
 
+    public static boolean exists(final Class<?> cls, final String resourceName) {
+        final URL url = Resources.getResource(cls, resourceName);
+        return url != null;
+    }
+
     public static Class<?> asWrapped(final Class<?> primitiveClassExtendee) {
         return ClassUtil.wrapperClasses.get(primitiveClassExtendee);
     }

http://git-wip-us.apache.org/repos/asf/isis/blob/c3b614c2/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/object/layoutmetadata/ObjectLayoutMetadataFacet.java
----------------------------------------------------------------------
diff --git a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/object/layoutmetadata/ObjectLayoutMetadataFacet.java b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/object/layoutmetadata/ObjectLayoutMetadataFacet.java
index 2a63428..eb7efcd 100644
--- a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/object/layoutmetadata/ObjectLayoutMetadataFacet.java
+++ b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/object/layoutmetadata/ObjectLayoutMetadataFacet.java
@@ -27,14 +27,7 @@ import org.apache.isis.core.metamodel.facetapi.Facet;
  */
 public interface ObjectLayoutMetadataFacet extends Facet {
 
-    /**
-     * Will have been normalized by framework earlier.
-     */
     ObjectLayoutMetadata getMetadata();
 
-    /**
-     * (Re)load, in support of dynamic layout reloading.
-     */
-    void reloadMetadata();
 
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/isis/blob/c3b614c2/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/object/layoutmetadata/ObjectLayoutMetadataFacetDefault.java
----------------------------------------------------------------------
diff --git a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/object/layoutmetadata/ObjectLayoutMetadataFacetDefault.java b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/object/layoutmetadata/ObjectLayoutMetadataFacetDefault.java
index 9538e72..fdc12ef 100644
--- a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/object/layoutmetadata/ObjectLayoutMetadataFacetDefault.java
+++ b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/object/layoutmetadata/ObjectLayoutMetadataFacetDefault.java
@@ -24,6 +24,7 @@ import java.util.List;
 import java.util.Map;
 import java.util.concurrent.atomic.AtomicReference;
 
+import com.google.common.base.Strings;
 import com.google.common.collect.Lists;
 import com.google.common.collect.Maps;
 
@@ -42,6 +43,7 @@ import org.apache.isis.applib.layout.v1_0.Tab;
 import org.apache.isis.applib.layout.v1_0.TabGroup;
 import org.apache.isis.applib.services.i18n.TranslationService;
 import org.apache.isis.applib.services.layout.ObjectLayoutMetadataService;
+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;
@@ -93,59 +95,57 @@ public class ObjectLayoutMetadataFacetDefault
     public static ObjectLayoutMetadataFacet create(
             final FacetHolder facetHolder,
             final TranslationService translationService,
-            final ObjectLayoutMetadataService objectLayoutMetadataService) {
-        return new ObjectLayoutMetadataFacetDefault(facetHolder, translationService, objectLayoutMetadataService);
+            final ObjectLayoutMetadataService objectLayoutMetadataService,
+            final DeploymentCategory deploymentCategory) {
+        return new ObjectLayoutMetadataFacetDefault(facetHolder, translationService, objectLayoutMetadataService, deploymentCategory);
     }
 
     private final TranslationService translationService;
+    private final DeploymentCategory deploymentCategory;
     private final ObjectLayoutMetadataService objectLayoutMetadataService;
 
-    private boolean blacklisted;
     private ObjectLayoutMetadata metadata;
+    private boolean blacklisted;
 
     private ObjectLayoutMetadataFacetDefault(
             final FacetHolder facetHolder,
             final TranslationService translationService,
-            final ObjectLayoutMetadataService objectLayoutMetadataService) {
+            final ObjectLayoutMetadataService objectLayoutMetadataService,
+            final DeploymentCategory deploymentCategory) {
         super(ObjectLayoutMetadataFacetDefault.type(), facetHolder, Derivation.NOT_DERIVED);
         this.objectLayoutMetadataService = objectLayoutMetadataService;
         this.translationService = translationService;
+        this.deploymentCategory = deploymentCategory;
     }
 
-    @Override
-    public boolean isNoop() {
-        getMetadata();
-        return blacklisted;
-    }
-
+    /**
+     * Blacklisting only occurs if running in production mode.
+     */
     @Override
     public ObjectLayoutMetadata getMetadata() {
-        if(blacklisted) {
-            return null;
-        }
-        reloadMetadata();
-        return this.metadata;
-    }
-
-    @Override
-    public void reloadMetadata() {
-        if (metadata != null && !objectLayoutMetadataService.isDynamicReloading()) {
-            return;
+        if (deploymentCategory.isProduction() || blacklisted) {
+            return metadata;
         }
         final Class<?> domainClass = getSpecification().getCorrespondingClass();
         final ObjectLayoutMetadata metadata = objectLayoutMetadataService.fromXml(domainClass);
+        if(deploymentCategory.isProduction() && metadata == null) {
+            blacklisted = true;
+        }
         this.metadata = normalize(metadata);
-        blacklisted = this.metadata == null;
+        return this.metadata;
     }
 
     private ObjectLayoutMetadata normalize(final ObjectLayoutMetadata metadata) {
         if(metadata == null) {
             return null;
         }
-        if(LOG.isInfoEnabled()) {
-            LOG.info("Normalizing layout metadata for " + getSpecification().getCorrespondingClass().getName());
-        }
+        // if have .layout.json and then add a .layout.xml without restarting, then the normalizing is required
+        // in order to trample over the .layout.json's original facets.
+        // if(metadata.isNormalized()) {
+        //     return metadata;
+        // }
         doNormalize(metadata, getSpecification());
+        metadata.setNormalized(true);
         return metadata;
     }
 
@@ -424,7 +424,7 @@ public class ObjectLayoutMetadataFacetDefault
                 final ColumnHolder holder = column.getOwner();
                 if(holder instanceof Tab) {
                     final Tab tab = (Tab) holder;
-                    if(tab.getContents().size() == 1) {
+                    if(tab.getContents().size() == 1 && Strings.isNullOrEmpty(tab.getName()) ) {
                         final String collectionName = oneToManyAssociation.getName();
                         tab.setName(collectionName);
                     }

http://git-wip-us.apache.org/repos/asf/isis/blob/c3b614c2/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/object/layoutmetadata/ObjectLayoutMetadataFacetFactory.java
----------------------------------------------------------------------
diff --git a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/object/layoutmetadata/ObjectLayoutMetadataFacetFactory.java b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/object/layoutmetadata/ObjectLayoutMetadataFacetFactory.java
index 479849c..28c69e6 100644
--- a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/object/layoutmetadata/ObjectLayoutMetadataFacetFactory.java
+++ b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/object/layoutmetadata/ObjectLayoutMetadataFacetFactory.java
@@ -44,7 +44,7 @@ public class ObjectLayoutMetadataFacetFactory extends FacetFactoryAbstract imple
         final ObjectLayoutMetadataService objectLayoutMetadataService = servicesInjector.lookupService(ObjectLayoutMetadataService.class);
         FacetUtil.addFacet(
                 ObjectLayoutMetadataFacetDefault.create(facetHolder,
-                        translationService, objectLayoutMetadataService));
+                        translationService, objectLayoutMetadataService, getDeploymentCategory()));
     }
 
     private ServicesInjector servicesInjector;

http://git-wip-us.apache.org/repos/asf/isis/blob/c3b614c2/core/metamodel/src/main/java/org/apache/isis/core/metamodel/layoutmetadata/LayoutMetadataReader2.java
----------------------------------------------------------------------
diff --git a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/layoutmetadata/LayoutMetadataReader2.java b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/layoutmetadata/LayoutMetadataReader2.java
index 533d13a..0df1fea 100644
--- a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/layoutmetadata/LayoutMetadataReader2.java
+++ b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/layoutmetadata/LayoutMetadataReader2.java
@@ -18,7 +18,7 @@ package org.apache.isis.core.metamodel.layoutmetadata;
 
 public interface LayoutMetadataReader2 extends LayoutMetadataReader {
 
-    public static class Support {
+    class Support {
 
         public static Support entitiesOnly() {
             return new Support(false,false,false,false,false,false,false);

http://git-wip-us.apache.org/repos/asf/isis/blob/c3b614c2/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 0a29c6f..5c5c039 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
@@ -43,6 +43,7 @@ import org.apache.isis.applib.annotation.Render.Type;
 import org.apache.isis.applib.annotation.When;
 import org.apache.isis.applib.annotation.Where;
 import org.apache.isis.applib.filter.Filter;
+import org.apache.isis.applib.services.layout.ObjectLayoutMetadataService;
 import org.apache.isis.core.commons.lang.ClassExtensions;
 import org.apache.isis.core.metamodel.facets.all.describedas.DescribedAsFacet;
 import org.apache.isis.core.metamodel.facets.all.hide.HiddenFacet;
@@ -78,6 +79,8 @@ import org.apache.isis.core.metamodel.layoutmetadata.PagedFacetRepr;
 import org.apache.isis.core.metamodel.layoutmetadata.PropertyLayoutFacetRepr;
 import org.apache.isis.core.metamodel.layoutmetadata.RenderFacetRepr;
 import org.apache.isis.core.metamodel.layoutmetadata.TypicalLengthFacetRepr;
+import org.apache.isis.core.metamodel.runtimecontext.ServicesInjector;
+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;
@@ -86,7 +89,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.ObjectAssociation;
 
-public class LayoutMetadataReaderFromJson implements LayoutMetadataReader2 {
+public class LayoutMetadataReaderFromJson implements LayoutMetadataReader2, ServicesInjectorAware {
 
     private static final Logger LOG = LoggerFactory.getLogger(LayoutMetadataReaderFromJson.class);
 
@@ -411,6 +414,17 @@ public class LayoutMetadataReaderFromJson implements LayoutMetadataReader2 {
             return null;
         }
 
+        try {
+            final ObjectLayoutMetadataService objectLayoutMetadataService = getObjectLayoutMetadataService();
+            if(objectLayoutMetadataService.exists(domainClass)) {
+                blacklisted.add(domainClass);
+                return null;
+            }
+        } catch (IllegalArgumentException ex) {
+            // ignore
+        }
+
+
         final String resourceName = domainClass.getSimpleName() + ".layout.json";
         try {
             content = ClassExtensions.resourceContentOf(domainClass, resourceName);
@@ -683,4 +697,18 @@ public class LayoutMetadataReaderFromJson implements LayoutMetadataReader2 {
         return getClass().getName();
     }
 
+
+
+    private ObjectLayoutMetadataService getObjectLayoutMetadataService() {
+        return servicesInjector.lookupService(ObjectLayoutMetadataService.class);
+    }
+
+
+    private ServicesInjector servicesInjector;
+
+    @Override
+    public void setServicesInjector(final ServicesInjector servicesInjector) {
+        this.servicesInjector = servicesInjector;
+    }
+
 }

http://git-wip-us.apache.org/repos/asf/isis/blob/c3b614c2/core/metamodel/src/main/java/org/apache/isis/core/metamodel/services/layout/ObjectLayoutMetadataServiceDefault.java
----------------------------------------------------------------------
diff --git a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/services/layout/ObjectLayoutMetadataServiceDefault.java b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/services/layout/ObjectLayoutMetadataServiceDefault.java
index 35010c2..f2861b8 100644
--- a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/services/layout/ObjectLayoutMetadataServiceDefault.java
+++ b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/services/layout/ObjectLayoutMetadataServiceDefault.java
@@ -19,11 +19,12 @@ package org.apache.isis.core.metamodel.services.layout;
 import java.io.IOException;
 import java.net.URL;
 import java.nio.charset.Charset;
-import java.util.Set;
+import java.util.Map;
+import java.util.Objects;
 
 import javax.inject.Inject;
 
-import com.google.common.collect.Sets;
+import com.google.common.collect.Maps;
 import com.google.common.io.Resources;
 
 import org.slf4j.Logger;
@@ -35,6 +36,8 @@ import org.apache.isis.applib.annotation.Programmatic;
 import org.apache.isis.applib.layout.v1_0.ObjectLayoutMetadata;
 import org.apache.isis.applib.services.jaxb.JaxbService;
 import org.apache.isis.applib.services.layout.ObjectLayoutMetadataService;
+import org.apache.isis.core.metamodel.deployment.DeploymentCategory;
+import org.apache.isis.core.metamodel.deployment.DeploymentCategoryAware;
 import org.apache.isis.core.metamodel.facets.object.layoutmetadata.ObjectLayoutMetadataFacet;
 import org.apache.isis.core.metamodel.spec.ObjectSpecification;
 import org.apache.isis.core.metamodel.spec.SpecificationLoader;
@@ -42,15 +45,29 @@ import org.apache.isis.core.metamodel.spec.SpecificationLoaderAware;
 
 @DomainService(nature = NatureOfService.DOMAIN)
 public class ObjectLayoutMetadataServiceDefault
-        implements ObjectLayoutMetadataService, SpecificationLoaderAware {
+        implements ObjectLayoutMetadataService, SpecificationLoaderAware, DeploymentCategoryAware {
 
     private static final Logger LOG = LoggerFactory.getLogger(ObjectLayoutMetadataServiceDefault.class);
 
+    // for better logging messages (used only in prototyping mode)
+    private final Map<Class<?>, String> badXmlByClass = Maps.newHashMap();
+
+    // cache (used only in prototyping mode)
+    private final Map<String, ObjectLayoutMetadata> metadataByXml = Maps.newHashMap();
+
+    @Override
+    @Programmatic
+    public boolean exists(final Class<?> domainClass) {
+        final URL resource = Resources.getResource(domainClass, resourceNameFor(domainClass));
+        return resource != null;
+    }
+
+    @Override
     @Programmatic
     public ObjectLayoutMetadata fromXml(Class<?> domainClass) {
 
+        final String resourceName = resourceNameFor(domainClass);
         final String xml;
-        final String resourceName = domainClass.getSimpleName() + ".layout.xml";
         try {
             xml = resourceContentOf(domainClass, resourceName);
         } catch (IOException | IllegalArgumentException ex) {
@@ -63,11 +80,39 @@ public class ObjectLayoutMetadataServiceDefault
             return null;
         }
 
+
+        if(!deploymentCategory.isProduction()) {
+            final ObjectLayoutMetadata objectLayoutMetadata = metadataByXml.get(xml);
+            if(objectLayoutMetadata != null) {
+                return objectLayoutMetadata;
+            }
+
+            final String badXml = badXmlByClass.get(domainClass);
+            if(badXml != null) {
+                if(Objects.equals(xml, badXml)) {
+                    // seen this before and already logged; just quit
+                    return null;
+                } else {
+                    // this different XML might be good
+                    badXmlByClass.remove(domainClass);
+                }
+            }
+
+        }
+
         try {
             final ObjectLayoutMetadata metadata = jaxbService.fromXml(ObjectLayoutMetadata.class, xml);
+            if(!deploymentCategory.isProduction()) {
+                metadataByXml.put(xml, metadata);
+            }
             return metadata;
         } catch(Exception ex) {
 
+            if(!deploymentCategory.isProduction()) {
+                // save fact that this was bad XML, so that we don't log again if called next time
+                badXmlByClass.put(domainClass, xml);
+            }
+
             // note that we don't blacklist if the file exists but couldn't be parsed;
             // the developer might fix so we will want to retry.
             final String message = "Failed to parse " + resourceName + " file (" + ex.getMessage() + ")";
@@ -82,9 +127,13 @@ public class ObjectLayoutMetadataServiceDefault
         return Resources.toString(url, Charset.defaultCharset());
     }
 
+    private String resourceNameFor(final Class<?> domainClass) {
+        return domainClass.getSimpleName() + ".layout.xml";
+    }
 
 
     @Override
+    @Programmatic
     public ObjectLayoutMetadata toMetadata(final Object domainObject) {
         return toMetadata(domainObject.getClass());
     }
@@ -98,17 +147,6 @@ public class ObjectLayoutMetadataServiceDefault
 
     ////////////////////////////////////////////////////////
 
-    private boolean dynamicReloading;
-
-    @Override
-    public void toggleDynamicReloading() {
-        this.dynamicReloading = !this.dynamicReloading;
-    }
-
-    @Override
-    public boolean isDynamicReloading() {
-        return this.dynamicReloading;
-    }
 
     //region > injected dependencies
 
@@ -119,10 +157,16 @@ public class ObjectLayoutMetadataServiceDefault
         this.specificationLookup = specificationLookup;
     }
 
+    private DeploymentCategory deploymentCategory;
+
+    @Override
+    public void setDeploymentCategory(final DeploymentCategory deploymentCategory) {
+        this.deploymentCategory = deploymentCategory;
+    }
+
     @Inject
     JaxbService jaxbService;
 
-
     //endregion
 
 }

http://git-wip-us.apache.org/repos/asf/isis/blob/c3b614c2/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 900ecc3..cc05eca 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
@@ -130,49 +130,6 @@ public class MetadataMenu implements SpecificationLoaderSpiAware {
     }
 
 
-    // //////////////////////////////////////
-
-    public static class SwitchOnDynamicReloadingOfLayoutsDomainEvent extends ActionDomainEvent {
-    }
-
-    @Action(
-            domainEvent = SwitchOnDynamicReloadingOfLayoutsDomainEvent.class,
-            semantics = SemanticsOf.SAFE,
-            restrictTo = RestrictTo.PROTOTYPING
-    )
-    @ActionLayout(
-            cssClassFa = "fa-check"
-    )
-    @MemberOrder(sequence="500.400.2")
-    public void switchOnDynamicReloadingOfLayouts() {
-        objectLayoutMetadataService.toggleDynamicReloading();
-    }
-    public boolean hideSwitchOnDynamicReloadingOfLayouts() {
-        return objectLayoutMetadataService.isDynamicReloading();
-    }
-
-    // //////////////////////////////////////
-
-    public static class SwitchOffDynamicReloadingOfLayoutsDomainEvent extends ActionDomainEvent {
-    }
-
-    @Action(
-            domainEvent = SwitchOffDynamicReloadingOfLayoutsDomainEvent.class,
-            semantics = SemanticsOf.SAFE,
-            restrictTo = RestrictTo.PROTOTYPING
-    )
-    @ActionLayout(
-            cssClassFa = "fa-times"
-    )
-    @MemberOrder(sequence="500.400.3")
-    public void switchOffDynamicReloadingOfLayouts() {
-        objectLayoutMetadataService.toggleDynamicReloading();
-    }
-    public boolean hideSwitchOffDynamicReloadingOfLayouts() {
-        return !objectLayoutMetadataService.isDynamicReloading();
-    }
-
-
 
     // //////////////////////////////////////
 

http://git-wip-us.apache.org/repos/asf/isis/blob/c3b614c2/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 8837916..9c87476 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
@@ -19,6 +19,7 @@
 
 package org.apache.isis.core.metamodel.spec.feature;
 
+import java.util.Collections;
 import java.util.List;
 import java.util.Map;
 
@@ -38,6 +39,7 @@ 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;
 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;
 
 /**
@@ -405,6 +407,9 @@ public interface ObjectAssociation extends ObjectMember, CurrentHolder {
             for(ObjectAssociation association: associations) {
                 addAssociationIntoGroup(associationsByGroup, association);
             }
+            for (Map.Entry<String, List<ObjectAssociation>> objectAssociations : associationsByGroup.entrySet()) {
+                Collections.sort(objectAssociations.getValue(), new MemberOrderComparator(true));
+            }
             return associationsByGroup;
         }
 

http://git-wip-us.apache.org/repos/asf/isis/blob/c3b614c2/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 5f4c0d1..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
@@ -245,6 +245,9 @@ public final class ObjectReflectorDefault
 
         // wire subcomponents into each other
         this.runtimeContext.injectInto(facetProcessor);
+        for (final LayoutMetadataReader layoutMetadataReader : layoutMetadataReaders) {
+            this.runtimeContext.injectInto(layoutMetadataReader);
+        }
 
         // initialize subcomponents
         facetDecoratorSet.init();
@@ -261,12 +264,13 @@ public final class ObjectReflectorDefault
             final DomainService domainService = serviceClass.getAnnotation(DomainService.class);
             if(domainService != null) {
                 if(domainService.nature() == NatureOfService.VIEW || domainService.nature() == NatureOfService.VIEW_CONTRIBUTIONS_ONLY) {
-                    internalLoadSpecification(serviceClass);
+                    internalLoadSpecification(serviceClass, domainService.nature());
                 }
             }
         }
     }
 
+
     private void loadSpecificationsForMixins() {
         final Set<Class<?>> mixinTypes = AppManifest.Registry.instance().getMixinTypes();
         if(mixinTypes == null) {
@@ -390,11 +394,16 @@ public final class ObjectReflectorDefault
     }
 
     private ObjectSpecification internalLoadSpecification(final Class<?> type) {
+        return internalLoadSpecification(type, null);
+    }
+
+    private ObjectSpecification internalLoadSpecification(final Class<?> type, final NatureOfService nature) {
         final Class<?> substitutedType = classSubstitutor.getClass(type);
-        return substitutedType != null ? loadSpecificationForSubstitutedClass(substitutedType) : null;
+        return substitutedType != null ? loadSpecificationForSubstitutedClass(substitutedType, nature) : null;
     }
 
-    private ObjectSpecification loadSpecificationForSubstitutedClass(final Class<?> type) {
+
+    private ObjectSpecification loadSpecificationForSubstitutedClass(final Class<?> type, final NatureOfService nature) {
         Assert.assertNotNull(type);
         final String typeName = type.getName();
 
@@ -405,6 +414,9 @@ public final class ObjectReflectorDefault
                 return spec;
             }
             final ObjectSpecification specification = createSpecification(type);
+            if(nature != null) {
+                specification.markAsService();
+            }
             if (specification == null) {
                 throw new IsisException("Failed to create specification for class " + typeName);
             }

http://git-wip-us.apache.org/repos/asf/isis/blob/c3b614c2/core/metamodel/src/main/java/org/apache/isis/core/metamodel/specloader/specimpl/FacetedMethodsBuilder.java
----------------------------------------------------------------------
diff --git a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/specloader/specimpl/FacetedMethodsBuilder.java b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/specloader/specimpl/FacetedMethodsBuilder.java
index a6e71df..b5a1605 100644
--- a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/specloader/specimpl/FacetedMethodsBuilder.java
+++ b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/specloader/specimpl/FacetedMethodsBuilder.java
@@ -40,7 +40,6 @@ import org.apache.isis.core.commons.lang.ListExtensions;
 import org.apache.isis.core.commons.lang.MethodUtil;
 import org.apache.isis.core.commons.util.ToString;
 import org.apache.isis.core.metamodel.exceptions.MetaModelException;
-import org.apache.isis.core.metamodel.facetapi.FacetHolder;
 import org.apache.isis.core.metamodel.facetapi.FeatureType;
 import org.apache.isis.core.metamodel.facetapi.MethodRemover;
 import org.apache.isis.core.metamodel.facets.FacetFactory;
@@ -49,7 +48,6 @@ import org.apache.isis.core.metamodel.facets.FacetedMethod;
 import org.apache.isis.core.metamodel.facets.FacetedMethodParameter;
 import org.apache.isis.core.metamodel.facets.actcoll.typeof.TypeOfFacet;
 import org.apache.isis.core.metamodel.facets.object.facets.FacetsFacet;
-import org.apache.isis.core.metamodel.facets.object.layoutmetadata.ObjectLayoutMetadataFacet;
 import org.apache.isis.core.metamodel.layoutmetadata.LayoutMetadataReader;
 import org.apache.isis.core.metamodel.layoutmetadata.LayoutMetadataReader.ReaderException;
 import org.apache.isis.core.metamodel.layoutmetadata.LayoutMetadataReader2;
@@ -116,7 +114,7 @@ public class FacetedMethodsBuilder {
         }
     }
 
-    private final FacetHolder spec;
+    private final ObjectSpecificationAbstract spec;
 
     private final Class<?> introspectedClass;
     private final List<Method> methods;
@@ -197,7 +195,6 @@ public class FacetedMethodsBuilder {
         // process facets at object level
         // this will also remove some methods, such as the superclass methods.
 
-        final ObjectLayoutMetadataFacet facet = spec.getFacet(ObjectLayoutMetadataFacet.class);
         final Properties metadataProperties = readMetadataProperties(introspectedClass);
 
         getFacetProcessor().process(introspectedClass, metadataProperties, methodRemover, spec);

http://git-wip-us.apache.org/repos/asf/isis/blob/c3b614c2/core/metamodel/src/main/java/org/apache/isis/core/metamodel/specloader/specimpl/dflt/ObjectSpecificationDefault.java
----------------------------------------------------------------------
diff --git a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/specloader/specimpl/dflt/ObjectSpecificationDefault.java b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/specloader/specimpl/dflt/ObjectSpecificationDefault.java
index afd556e..65448e9 100644
--- a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/specloader/specimpl/dflt/ObjectSpecificationDefault.java
+++ b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/specloader/specimpl/dflt/ObjectSpecificationDefault.java
@@ -264,19 +264,8 @@ public class ObjectSpecificationDefault extends ObjectSpecificationAbstract impl
         return isService;
     }
 
-    /**
-     * TODO: should ensure that service has at least one user action; fix when
-     * specification knows of its hidden methods.
-     * 
-     * <pre>
-     * if (objectActions != null &amp;&amp; objectActions.length == 0) {
-     *     throw new ObjectSpecificationException(&quot;Service object &quot; + getFullName() + &quot; should have at least one user action&quot;);
-     * }
-     * </pre>
-     */
     @Override
     public void markAsService() {
-        ensureServiceHasNoAssociations();
         isService = true;
     }
 

http://git-wip-us.apache.org/repos/asf/isis/blob/c3b614c2/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 befd252..3cf6308 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
@@ -40,7 +40,6 @@ import org.apache.isis.viewer.wicket.ui.components.collectioncontents.summary.Co
 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.entity.collections.EntityCollectionsPanelFactory;
-import org.apache.isis.viewer.wicket.ui.components.entity.combined.EntityCombinedPanelFactory;
 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;
@@ -168,7 +167,6 @@ public class ComponentFactoryRegistrarDefault implements ComponentFactoryRegistr
 
         // top-level
         componentFactories.add(new EntityTabGroupsPanelFactory());
-        componentFactories.add(new EntityCombinedPanelFactory());
 
         // lower-level
         componentFactories.add(new EntityIconAndTitlePanelFactory());

http://git-wip-us.apache.org/repos/asf/isis/blob/c3b614c2/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/combined/EntityCombinedPanelFactory.java
----------------------------------------------------------------------
diff --git a/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/combined/EntityCombinedPanelFactory.java b/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/combined/EntityCombinedPanelFactory.java
deleted file mode 100644
index 004ba23..0000000
--- a/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/combined/EntityCombinedPanelFactory.java
+++ /dev/null
@@ -1,52 +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.entity.combined;
-
-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 EntityCombinedPanel}.
- */
-public class EntityCombinedPanelFactory extends EntityComponentFactoryAbstract {
-
-    private static final long serialVersionUID = 1L;
-
-    private static final String NAME = "combined";
-
-    public EntityCombinedPanelFactory() {
-        super(ComponentType.ENTITY, NAME, EntityCombinedPanel.class);
-    }
-
-    @Override
-    protected ApplicationAdvice doAppliesTo(final EntityModel entityModel) {
-        return appliesIf(false); // TODO: remove
-    }
-
-    @Override
-    public Component createComponent(final String id, final IModel<?> model) {
-        throw new IllegalStateException("shouldn't be called"); // TODO: remove
-    }
-}

http://git-wip-us.apache.org/repos/asf/isis/blob/c3b614c2/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/tabgroups/EntityTabGroupsPanel.java
----------------------------------------------------------------------
diff --git a/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/tabgroups/EntityTabGroupsPanel.java b/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/tabgroups/EntityTabGroupsPanel.java
index 0889e1a..6b274a5 100644
--- a/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/tabgroups/EntityTabGroupsPanel.java
+++ b/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/tabgroups/EntityTabGroupsPanel.java
@@ -21,10 +21,7 @@ package org.apache.isis.viewer.wicket.ui.components.entity.tabgroups;
 
 import java.util.List;
 
-import javax.xml.bind.Marshaller;
-
 import com.google.common.collect.FluentIterable;
-import com.google.common.collect.ImmutableMap;
 import com.google.common.collect.Lists;
 
 import org.apache.wicket.extensions.markup.html.tabs.AbstractTab;
@@ -37,8 +34,6 @@ import org.apache.wicket.model.Model;
 import org.apache.isis.applib.layout.v1_0.ObjectLayoutMetadata;
 import org.apache.isis.applib.layout.v1_0.Tab;
 import org.apache.isis.applib.layout.v1_0.TabGroup;
-import org.apache.isis.applib.services.jaxb.JaxbService;
-import org.apache.isis.applib.services.layout.Object_downloadLayoutXml;
 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.layoutmetadata.ObjectLayoutMetadataFacet;
@@ -80,15 +75,6 @@ public class EntityTabGroupsPanel extends PanelAbstract<EntityModel> {
         final ObjectLayoutMetadata objectLayoutMetadata = objectLayoutMetadataFacet.getMetadata();
 
 
-        // TODO: debugging, remove
-        final JaxbService jaxbService = getServicesInjector().lookupService(JaxbService.class);
-        final String xml = jaxbService.toXml(objectLayoutMetadata,
-                ImmutableMap.<String,Object>of(
-                        Marshaller.JAXB_SCHEMA_LOCATION,
-                        Object_downloadLayoutXml.TNS + " " + Object_downloadLayoutXml.SCHEMA_LOCATION));
-        System.out.println(xml);
-
-
         addOrReplace(ComponentType.ENTITY_SUMMARY, model);
 
         final List<TabGroup> tabGroups = FluentIterable

http://git-wip-us.apache.org/repos/asf/isis/blob/c3b614c2/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/tabgroups/EntityTabGroupsPanelFactory.java
----------------------------------------------------------------------
diff --git a/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/tabgroups/EntityTabGroupsPanelFactory.java b/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/tabgroups/EntityTabGroupsPanelFactory.java
index d602730..722f98b 100644
--- a/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/tabgroups/EntityTabGroupsPanelFactory.java
+++ b/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/tabgroups/EntityTabGroupsPanelFactory.java
@@ -22,6 +22,7 @@ package org.apache.isis.viewer.wicket.ui.components.entity.tabgroups;
 import org.apache.wicket.Component;
 import org.apache.wicket.model.IModel;
 
+import org.apache.isis.applib.layout.v1_0.ObjectLayoutMetadata;
 import org.apache.isis.core.metamodel.facets.object.layoutmetadata.ObjectLayoutMetadataFacet;
 import org.apache.isis.core.metamodel.spec.ObjectSpecification;
 import org.apache.isis.viewer.wicket.model.models.EntityModel;
@@ -44,19 +45,14 @@ public class EntityTabGroupsPanelFactory extends EntityComponentFactoryAbstract
     }
 
     @Override
-    protected ApplicationAdvice doAppliesTo(final EntityModel entityModel) {
-        return super.doAppliesTo(entityModel); // TODO: remove this override
-    }
-
-    @Override
     public Component createComponent(final String id, final IModel<?> model) {
 
         final EntityModel entityModel = (EntityModel) model;
 
         final ObjectSpecification specification = entityModel.getTypeOfSpecification();
         final ObjectLayoutMetadataFacet facet = specification.getFacet(ObjectLayoutMetadataFacet.class);
-        facet.reloadMetadata();
-        final boolean hasLayout = !facet.isNoop();
+        final ObjectLayoutMetadata layoutMetadata = facet.getMetadata();
+        final boolean hasLayout = layoutMetadata != null;
         return hasLayout
                 ? new EntityTabGroupsPanel(id, entityModel)
                 : new EntityCombinedPanel(id, entityModel);

http://git-wip-us.apache.org/repos/asf/isis/blob/c3b614c2/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 609be99..b104ac3 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,6 +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.v1_0.ObjectLayoutMetadata;
 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;
@@ -138,16 +139,15 @@ public class EntityPage extends PageAbstract {
         final ObjectLayoutMetadataFacet facet = entityModel.getTypeOfSpecification()
                 .getFacet(ObjectLayoutMetadataFacet.class);
         if(facet != null) {
-            // the facet should always exist
-            //
-            // it's sufficient to simply call reloadMetadata().
-            // The facet checks the ObjectLayoutMetadataService to determine if dynamic reloading is enabled.
-            facet.reloadMetadata();
-            if(facet.getMetadata() == null) {
-                // fallback to invalidating entire cache
-                if(!getDeploymentType().isProduction()) {
-                    getSpecificationLoader().invalidateCacheFor(objectAdapter.getObject());
-                }
+            // 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 ObjectLayoutMetadata metadata = facet.getMetadata();
+
+            // if none, then fallback to invalidating entire cache
+            // (this is the original LayoutMetadataFromJson behaviour)
+            if(metadata == null && !getDeploymentType().isProduction()) {
+                getSpecificationLoader().invalidateCacheFor(objectAdapter.getObject());
             }
         }
 


[47/50] [abbrv] isis git commit: ISIS-993: improving the usability of the schema; minor stuff for wicket components

Posted by da...@apache.org.
ISIS-993: improving the usability of the schema; minor stuff for wicket components


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

Branch: refs/heads/ISIS-993
Commit: 8ff81a7e33baeb5a5ee26782b01e0e23f2e16709
Parents: 99f808c
Author: Dan Haywood <da...@haywood-associates.co.uk>
Authored: Wed Jan 6 20:28:44 2016 +0000
Committer: Dan Haywood <da...@haywood-associates.co.uk>
Committed: Mon Jan 25 14:38:24 2016 +0000

----------------------------------------------------------------------
 .../schema/applib/layout/layout-1.0.xsd         | 106 +++++++------------
 .../asciidoc/schema/applib/layout/layout.xsd    | 106 +++++++------------
 .../apache/isis/applib/layout/v1_0/Action.java  |  21 ++--
 .../isis/applib/layout/v1_0/ActionLayout.java   |  29 ++---
 .../isis/applib/layout/v1_0/Collection.java     |  41 +++----
 .../applib/layout/v1_0/CollectionLayout.java    |  20 ++--
 .../apache/isis/applib/layout/v1_0/Column.java  |  36 +++----
 .../isis/applib/layout/v1_0/ColumnContent.java  |  23 ++++
 .../isis/applib/layout/v1_0/DomainObject.java   |   7 +-
 .../isis/applib/layout/v1_0/Property.java       |  16 +--
 .../isis/applib/layout/v1_0/PropertyGroup.java  |   3 +-
 .../isis/applib/layout/v1_0/PropertyLayout.java |  29 ++---
 .../org/apache/isis/applib/layout/v1_0/Tab.java |   3 +-
 .../isis/applib/layout/v1_0/TabGroup.java       |   8 +-
 .../object/layoutxml/LayoutXmlFacetDefault.java |   2 +-
 .../layoutxml/v1_0/DomainObjectTest.java        |  28 +++--
 .../ComponentFactoryRegistrarDefault.java       |   2 +-
 .../combined/EntityCombinedPanelFactory.java    |   9 ++
 .../entity/tabbed/EntityTabbedPanelFactory.java |   4 +-
 .../dom/simple/SimpleObject.layout.xml          |  57 +++-------
 .../src/main/webapp/WEB-INF/translations-en.po  |   2 +-
 .../src/main/webapp/WEB-INF/translations-es.po  |   2 +-
 .../src/main/webapp/WEB-INF/translations-nl.po  |   2 +-
 .../src/main/webapp/WEB-INF/translations.po     |   2 +-
 24 files changed, 250 insertions(+), 308 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/isis/blob/8ff81a7e/adocs/documentation/src/main/asciidoc/schema/applib/layout/layout-1.0.xsd
----------------------------------------------------------------------
diff --git a/adocs/documentation/src/main/asciidoc/schema/applib/layout/layout-1.0.xsd b/adocs/documentation/src/main/asciidoc/schema/applib/layout/layout-1.0.xsd
index 97ab131..63fa0a5 100644
--- a/adocs/documentation/src/main/asciidoc/schema/applib/layout/layout-1.0.xsd
+++ b/adocs/documentation/src/main/asciidoc/schema/applib/layout/layout-1.0.xsd
@@ -1,9 +1,9 @@
 <?xml version="1.0" standalone="yes"?>
 <xs:schema elementFormDefault="qualified" version="1.0" targetNamespace="http://isis.apache.org/schema/applib/layout" xmlns:tns="http://isis.apache.org/schema/applib/layout" xmlns:xs="http://www.w3.org/2001/XMLSchema">
 
-  <xs:element name="domainObject" type="tns:domainObject"/>
+  <xs:element name="domainObject" type="tns:domain-object"/>
 
-  <xs:complexType name="domainObject">
+  <xs:complexType name="domain-object">
     <xs:sequence>
       <xs:element name="actions">
         <xs:complexType>
@@ -12,46 +12,34 @@
           </xs:sequence>
         </xs:complexType>
       </xs:element>
-      <xs:element name="tabGroups">
-        <xs:complexType>
-          <xs:sequence>
-            <xs:element name="tabGroup" type="tns:tabGroup" maxOccurs="unbounded"/>
-          </xs:sequence>
-        </xs:complexType>
-      </xs:element>
+      <xs:element name="tabGroup" type="tns:tabGroup" maxOccurs="unbounded"/>
     </xs:sequence>
   </xs:complexType>
 
   <xs:complexType name="action">
     <xs:sequence>
-      <xs:element name="layout" type="tns:actionLayout"/>
+      <xs:element name="layout" type="tns:actionLayout" minOccurs="0"/>
     </xs:sequence>
-    <xs:attribute name="identifier" type="xs:string" use="required"/>
+    <xs:attribute name="id" type="xs:string" use="required"/>
   </xs:complexType>
 
   <xs:complexType name="actionLayout">
     <xs:sequence>
-      <xs:element name="bookmarking" type="tns:bookmarkPolicy" default="NEVER" minOccurs="0"/>
-      <xs:element name="cssClass" type="xs:string" minOccurs="0"/>
-      <xs:element name="cssClassFa" type="xs:string" minOccurs="0"/>
-      <xs:element name="cssClassFaPosition" type="tns:cssClassFaPosition" minOccurs="0"/>
-      <xs:element name="describedAs" type="xs:string" minOccurs="0"/>
-      <xs:element name="hidden" type="tns:where" minOccurs="0"/>
       <xs:element name="named" type="xs:string" minOccurs="0"/>
-      <xs:element name="namedEscaped" type="xs:boolean" minOccurs="0"/>
-      <xs:element name="position" type="tns:position" default="BELOW"/>
+      <xs:element name="describedAs" 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="namedEscaped" type="xs:boolean"/>
+    <xs:attribute name="position" type="tns:position" use="required"/>
   </xs:complexType>
 
   <xs:complexType name="tabGroup">
     <xs:sequence>
-      <xs:element name="tabs">
-        <xs:complexType>
-          <xs:sequence>
-            <xs:element name="tab" type="tns:tab" maxOccurs="unbounded"/>
-          </xs:sequence>
-        </xs:complexType>
-      </xs:element>
+      <xs:element name="tab" type="tns:tab" maxOccurs="unbounded"/>
     </xs:sequence>
   </xs:complexType>
 
@@ -66,22 +54,12 @@
 
   <xs:complexType name="column">
     <xs:sequence>
-      <xs:element name="span" type="xs:int" default="4"/>
-      <xs:element name="propertyGroups">
-        <xs:complexType>
-          <xs:sequence>
-            <xs:element name="propertyGroup" type="tns:propertyGroup" minOccurs="0" maxOccurs="unbounded"/>
-          </xs:sequence>
-        </xs:complexType>
-      </xs:element>
-      <xs:element name="collections">
-        <xs:complexType>
-          <xs:sequence>
-            <xs:element name="collection" type="tns:collection" minOccurs="0" maxOccurs="unbounded"/>
-          </xs:sequence>
-        </xs:complexType>
-      </xs:element>
+      <xs:choice minOccurs="0" maxOccurs="unbounded">
+        <xs:element name="propertyGroup" type="tns:propertyGroup"/>
+        <xs:element name="collection" type="tns:collection"/>
+      </xs:choice>
     </xs:sequence>
+    <xs:attribute name="span" type="xs:int" use="required"/>
   </xs:complexType>
 
   <xs:complexType name="propertyGroup">
@@ -93,20 +71,13 @@
           </xs:sequence>
         </xs:complexType>
       </xs:element>
-      <xs:element name="properties">
-        <xs:complexType>
-          <xs:sequence>
-            <xs:element name="property" type="tns:property" maxOccurs="unbounded"/>
-          </xs:sequence>
-        </xs:complexType>
-      </xs:element>
+      <xs:element name="property" type="tns:property" maxOccurs="unbounded"/>
     </xs:sequence>
     <xs:attribute name="name" type="xs:string" use="required"/>
   </xs:complexType>
 
   <xs:complexType name="property">
     <xs:sequence>
-      <xs:element name="layout" type="tns:propertyLayout"/>
       <xs:element name="actions" minOccurs="0">
         <xs:complexType>
           <xs:sequence>
@@ -114,27 +85,27 @@
           </xs:sequence>
         </xs:complexType>
       </xs:element>
+      <xs:element name="layout" type="tns:propertyLayout"/>
     </xs:sequence>
-    <xs:attribute name="identifier" type="xs:string" use="required"/>
+    <xs:attribute name="id" type="xs:string" use="required"/>
   </xs:complexType>
 
   <xs:complexType name="propertyLayout">
     <xs:sequence>
-      <xs:element name="cssClass" type="xs:string" minOccurs="0"/>
-      <xs:element name="describedAs" type="xs:string" minOccurs="0"/>
-      <xs:element name="hidden" type="tns:where" minOccurs="0"/>
-      <xs:element name="labelPosition" type="tns:labelPosition" default="LEFT"/>
-      <xs:element name="multiLine" type="xs:int" minOccurs="0"/>
       <xs:element name="named" type="xs:string" minOccurs="0"/>
-      <xs:element name="namedEscaped" type="xs:boolean" minOccurs="0"/>
-      <xs:element name="renderedAsDayBefore" type="xs:boolean" minOccurs="0"/>
-      <xs:element name="typicalLength" type="xs:int" default="-1"/>
+      <xs:element name="describedAs" type="xs:string" minOccurs="0"/>
     </xs:sequence>
+    <xs:attribute name="cssClass" type="xs:string"/>
+    <xs:attribute name="hidden" type="tns:where"/>
+    <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="layout" type="tns:collectionLayout"/>
       <xs:element name="actions">
         <xs:complexType>
           <xs:sequence>
@@ -142,21 +113,22 @@
           </xs:sequence>
         </xs:complexType>
       </xs:element>
+      <xs:element name="layout" type="tns:collectionLayout"/>
     </xs:sequence>
-    <xs:attribute name="identifier" type="xs:string" use="required"/>
+    <xs:attribute name="id" type="xs:string" use="required"/>
   </xs:complexType>
 
   <xs:complexType name="collectionLayout">
     <xs:sequence>
-      <xs:element name="cssClass" type="xs:string" minOccurs="0"/>
-      <xs:element name="describedAs" type="xs:string" minOccurs="0"/>
-      <xs:element name="defaultView" type="xs:string" default="table"/>
-      <xs:element name="hidden" type="tns:where" minOccurs="0"/>
       <xs:element name="named" type="xs:string" minOccurs="0"/>
-      <xs:element name="namedEscaped" type="xs:boolean" minOccurs="0"/>
-      <xs:element name="paged" type="xs:int" minOccurs="0"/>
+      <xs:element name="describedAs" type="xs:string" minOccurs="0"/>
       <xs:element name="sortedBy" 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="namedEscaped" type="xs:boolean"/>
+    <xs:attribute name="paged" type="xs:int"/>
   </xs:complexType>
 
   <xs:simpleType name="bookmarkPolicy">
@@ -207,4 +179,4 @@
       <xs:enumeration value="NONE"/>
     </xs:restriction>
   </xs:simpleType>
-</xs:schema>
+</xs:schema>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/isis/blob/8ff81a7e/adocs/documentation/src/main/asciidoc/schema/applib/layout/layout.xsd
----------------------------------------------------------------------
diff --git a/adocs/documentation/src/main/asciidoc/schema/applib/layout/layout.xsd b/adocs/documentation/src/main/asciidoc/schema/applib/layout/layout.xsd
index 97ab131..63fa0a5 100644
--- a/adocs/documentation/src/main/asciidoc/schema/applib/layout/layout.xsd
+++ b/adocs/documentation/src/main/asciidoc/schema/applib/layout/layout.xsd
@@ -1,9 +1,9 @@
 <?xml version="1.0" standalone="yes"?>
 <xs:schema elementFormDefault="qualified" version="1.0" targetNamespace="http://isis.apache.org/schema/applib/layout" xmlns:tns="http://isis.apache.org/schema/applib/layout" xmlns:xs="http://www.w3.org/2001/XMLSchema">
 
-  <xs:element name="domainObject" type="tns:domainObject"/>
+  <xs:element name="domainObject" type="tns:domain-object"/>
 
-  <xs:complexType name="domainObject">
+  <xs:complexType name="domain-object">
     <xs:sequence>
       <xs:element name="actions">
         <xs:complexType>
@@ -12,46 +12,34 @@
           </xs:sequence>
         </xs:complexType>
       </xs:element>
-      <xs:element name="tabGroups">
-        <xs:complexType>
-          <xs:sequence>
-            <xs:element name="tabGroup" type="tns:tabGroup" maxOccurs="unbounded"/>
-          </xs:sequence>
-        </xs:complexType>
-      </xs:element>
+      <xs:element name="tabGroup" type="tns:tabGroup" maxOccurs="unbounded"/>
     </xs:sequence>
   </xs:complexType>
 
   <xs:complexType name="action">
     <xs:sequence>
-      <xs:element name="layout" type="tns:actionLayout"/>
+      <xs:element name="layout" type="tns:actionLayout" minOccurs="0"/>
     </xs:sequence>
-    <xs:attribute name="identifier" type="xs:string" use="required"/>
+    <xs:attribute name="id" type="xs:string" use="required"/>
   </xs:complexType>
 
   <xs:complexType name="actionLayout">
     <xs:sequence>
-      <xs:element name="bookmarking" type="tns:bookmarkPolicy" default="NEVER" minOccurs="0"/>
-      <xs:element name="cssClass" type="xs:string" minOccurs="0"/>
-      <xs:element name="cssClassFa" type="xs:string" minOccurs="0"/>
-      <xs:element name="cssClassFaPosition" type="tns:cssClassFaPosition" minOccurs="0"/>
-      <xs:element name="describedAs" type="xs:string" minOccurs="0"/>
-      <xs:element name="hidden" type="tns:where" minOccurs="0"/>
       <xs:element name="named" type="xs:string" minOccurs="0"/>
-      <xs:element name="namedEscaped" type="xs:boolean" minOccurs="0"/>
-      <xs:element name="position" type="tns:position" default="BELOW"/>
+      <xs:element name="describedAs" 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="namedEscaped" type="xs:boolean"/>
+    <xs:attribute name="position" type="tns:position" use="required"/>
   </xs:complexType>
 
   <xs:complexType name="tabGroup">
     <xs:sequence>
-      <xs:element name="tabs">
-        <xs:complexType>
-          <xs:sequence>
-            <xs:element name="tab" type="tns:tab" maxOccurs="unbounded"/>
-          </xs:sequence>
-        </xs:complexType>
-      </xs:element>
+      <xs:element name="tab" type="tns:tab" maxOccurs="unbounded"/>
     </xs:sequence>
   </xs:complexType>
 
@@ -66,22 +54,12 @@
 
   <xs:complexType name="column">
     <xs:sequence>
-      <xs:element name="span" type="xs:int" default="4"/>
-      <xs:element name="propertyGroups">
-        <xs:complexType>
-          <xs:sequence>
-            <xs:element name="propertyGroup" type="tns:propertyGroup" minOccurs="0" maxOccurs="unbounded"/>
-          </xs:sequence>
-        </xs:complexType>
-      </xs:element>
-      <xs:element name="collections">
-        <xs:complexType>
-          <xs:sequence>
-            <xs:element name="collection" type="tns:collection" minOccurs="0" maxOccurs="unbounded"/>
-          </xs:sequence>
-        </xs:complexType>
-      </xs:element>
+      <xs:choice minOccurs="0" maxOccurs="unbounded">
+        <xs:element name="propertyGroup" type="tns:propertyGroup"/>
+        <xs:element name="collection" type="tns:collection"/>
+      </xs:choice>
     </xs:sequence>
+    <xs:attribute name="span" type="xs:int" use="required"/>
   </xs:complexType>
 
   <xs:complexType name="propertyGroup">
@@ -93,20 +71,13 @@
           </xs:sequence>
         </xs:complexType>
       </xs:element>
-      <xs:element name="properties">
-        <xs:complexType>
-          <xs:sequence>
-            <xs:element name="property" type="tns:property" maxOccurs="unbounded"/>
-          </xs:sequence>
-        </xs:complexType>
-      </xs:element>
+      <xs:element name="property" type="tns:property" maxOccurs="unbounded"/>
     </xs:sequence>
     <xs:attribute name="name" type="xs:string" use="required"/>
   </xs:complexType>
 
   <xs:complexType name="property">
     <xs:sequence>
-      <xs:element name="layout" type="tns:propertyLayout"/>
       <xs:element name="actions" minOccurs="0">
         <xs:complexType>
           <xs:sequence>
@@ -114,27 +85,27 @@
           </xs:sequence>
         </xs:complexType>
       </xs:element>
+      <xs:element name="layout" type="tns:propertyLayout"/>
     </xs:sequence>
-    <xs:attribute name="identifier" type="xs:string" use="required"/>
+    <xs:attribute name="id" type="xs:string" use="required"/>
   </xs:complexType>
 
   <xs:complexType name="propertyLayout">
     <xs:sequence>
-      <xs:element name="cssClass" type="xs:string" minOccurs="0"/>
-      <xs:element name="describedAs" type="xs:string" minOccurs="0"/>
-      <xs:element name="hidden" type="tns:where" minOccurs="0"/>
-      <xs:element name="labelPosition" type="tns:labelPosition" default="LEFT"/>
-      <xs:element name="multiLine" type="xs:int" minOccurs="0"/>
       <xs:element name="named" type="xs:string" minOccurs="0"/>
-      <xs:element name="namedEscaped" type="xs:boolean" minOccurs="0"/>
-      <xs:element name="renderedAsDayBefore" type="xs:boolean" minOccurs="0"/>
-      <xs:element name="typicalLength" type="xs:int" default="-1"/>
+      <xs:element name="describedAs" type="xs:string" minOccurs="0"/>
     </xs:sequence>
+    <xs:attribute name="cssClass" type="xs:string"/>
+    <xs:attribute name="hidden" type="tns:where"/>
+    <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="layout" type="tns:collectionLayout"/>
       <xs:element name="actions">
         <xs:complexType>
           <xs:sequence>
@@ -142,21 +113,22 @@
           </xs:sequence>
         </xs:complexType>
       </xs:element>
+      <xs:element name="layout" type="tns:collectionLayout"/>
     </xs:sequence>
-    <xs:attribute name="identifier" type="xs:string" use="required"/>
+    <xs:attribute name="id" type="xs:string" use="required"/>
   </xs:complexType>
 
   <xs:complexType name="collectionLayout">
     <xs:sequence>
-      <xs:element name="cssClass" type="xs:string" minOccurs="0"/>
-      <xs:element name="describedAs" type="xs:string" minOccurs="0"/>
-      <xs:element name="defaultView" type="xs:string" default="table"/>
-      <xs:element name="hidden" type="tns:where" minOccurs="0"/>
       <xs:element name="named" type="xs:string" minOccurs="0"/>
-      <xs:element name="namedEscaped" type="xs:boolean" minOccurs="0"/>
-      <xs:element name="paged" type="xs:int" minOccurs="0"/>
+      <xs:element name="describedAs" type="xs:string" minOccurs="0"/>
       <xs:element name="sortedBy" 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="namedEscaped" type="xs:boolean"/>
+    <xs:attribute name="paged" type="xs:int"/>
   </xs:complexType>
 
   <xs:simpleType name="bookmarkPolicy">
@@ -207,4 +179,4 @@
       <xs:enumeration value="NONE"/>
     </xs:restriction>
   </xs:simpleType>
-</xs:schema>
+</xs:schema>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/isis/blob/8ff81a7e/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/Action.java
----------------------------------------------------------------------
diff --git a/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/Action.java b/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/Action.java
index 9037c04..d3ab3b3 100644
--- a/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/Action.java
+++ b/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/Action.java
@@ -23,15 +23,16 @@ import javax.xml.bind.annotation.XmlElement;
 import javax.xml.bind.annotation.XmlType;
 
 @XmlType(
-        propOrder = {
-                "identifier"
+        name="action"
+        , propOrder = {
+                "id"
                 , "layout"
         }
 )
 public class Action {
 
 
-    private String identifier;
+    private String id;
     /**
      * Method name.
      *
@@ -39,19 +40,19 @@ public class Action {
      *     Overloaded methods are not supported.
      * </p>
      */
-    @XmlAttribute(required = true)
-    public String getIdentifier() {
-        return identifier;
+    @XmlAttribute(name="id", required = true)
+    public String getId() {
+        return id;
     }
 
-    public void setIdentifier(String identifier) {
-        this.identifier = identifier;
+    public void setId(String id) {
+        this.id = id;
     }
 
 
 
-    private ActionLayout layout = new ActionLayout();
-    @XmlElement(required = true)
+    private ActionLayout layout;
+    @XmlElement(name="layout", required = false)
     public ActionLayout getLayout() {
         return layout;
     }

http://git-wip-us.apache.org/repos/asf/isis/blob/8ff81a7e/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/ActionLayout.java
----------------------------------------------------------------------
diff --git a/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/ActionLayout.java b/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/ActionLayout.java
index 4fb4934..0e12158 100644
--- a/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/ActionLayout.java
+++ b/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/ActionLayout.java
@@ -16,7 +16,7 @@
  */
 package org.apache.isis.applib.layout.v1_0;
 
-
+import javax.xml.bind.annotation.XmlAttribute;
 import javax.xml.bind.annotation.XmlElement;
 import javax.xml.bind.annotation.XmlType;
 
@@ -33,22 +33,15 @@ import org.apache.isis.applib.annotation.Where;
  */
 @XmlType(
         propOrder = {
-                "bookmarking"
-                , "cssClass"
-                , "cssClassFa"
-                , "cssClassFaPosition"
+                "named"
                 , "describedAs"
-                , "hidden"
-                , "named"
-                , "namedEscaped"
-                , "position"
         }
 )
 public class ActionLayout {
 
-    private BookmarkPolicy bookmarking = BookmarkPolicy.NEVER;
+    private BookmarkPolicy bookmarking;
 
-    @XmlElement(required = false, defaultValue = "NEVER")
+    @XmlAttribute(required = false)
     public BookmarkPolicy getBookmarking() {
         return bookmarking;
     }
@@ -60,7 +53,7 @@ public class ActionLayout {
 
     private String cssClass;
 
-    @XmlElement(required = false)
+    @XmlAttribute(required = false)
     public String getCssClass() {
         return cssClass;
     }
@@ -72,7 +65,7 @@ public class ActionLayout {
 
     private String cssClassFa;
 
-    @XmlElement(required = false)
+    @XmlAttribute(required = false)
     public String getCssClassFa() {
         return cssClassFa;
     }
@@ -85,7 +78,7 @@ public class ActionLayout {
 
     private org.apache.isis.applib.annotation.ActionLayout.CssClassFaPosition cssClassFaPosition;
 
-    @XmlElement(required = false)
+    @XmlAttribute(required = false)
     public org.apache.isis.applib.annotation.ActionLayout.CssClassFaPosition getCssClassFaPosition() {
         return cssClassFaPosition;
     }
@@ -110,7 +103,7 @@ public class ActionLayout {
 
     private Where hidden;
 
-    @XmlElement(required = false)
+    @XmlAttribute(required = false)
     public Where getHidden() {
         return hidden;
     }
@@ -136,7 +129,7 @@ public class ActionLayout {
 
     private Boolean namedEscaped;
 
-    @XmlElement(required = false)
+    @XmlAttribute(required = false)
     public Boolean getNamedEscaped() {
         return namedEscaped;
     }
@@ -147,9 +140,9 @@ public class ActionLayout {
 
 
 
-    private org.apache.isis.applib.annotation.ActionLayout.Position position = org.apache.isis.applib.annotation.ActionLayout.Position.BELOW;
+    private org.apache.isis.applib.annotation.ActionLayout.Position position;
 
-    @XmlElement(required = true, defaultValue = "BELOW")
+    @XmlAttribute(required = true)
     public org.apache.isis.applib.annotation.ActionLayout.Position getPosition() {
         return position;
     }

http://git-wip-us.apache.org/repos/asf/isis/blob/8ff81a7e/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/Collection.java
----------------------------------------------------------------------
diff --git a/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/Collection.java b/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/Collection.java
index 3796f5f..f7de5d8 100644
--- a/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/Collection.java
+++ b/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/Collection.java
@@ -29,32 +29,44 @@ import com.google.common.collect.Lists;
 
 @XmlType(
         propOrder = {
-                "identifier"
-                , "layout"
+                "id"
                 , "actions"
+                , "layout"
         }
 )
-public class Collection {
+public class Collection implements ColumnContent {
 
-    private String identifier;
+    private String id;
 
     /**
      * Collection identifier, being the getter method without "get" prefix, first letter lower cased.
      */
     @XmlAttribute(required = true)
-    public String getIdentifier() {
-        return identifier;
+    public String getId() {
+        return id;
     }
 
-    public void setIdentifier(String identifier) {
-        this.identifier = identifier;
+    public void setId(String id) {
+        this.id = id;
     }
 
 
+    private List<Action> actions = Lists.newArrayList();
+
+    @XmlElementWrapper(name = "actions", required = true)
+    @XmlElement(name = "action", required = false)
+    public List<Action> getActions() {
+        return actions;
+    }
+
+    public void setActions(List<Action> actions) {
+        this.actions = actions;
+    }
+
 
     private CollectionLayout layout = new CollectionLayout();
 
-    @XmlElement(required = true)
+    @XmlElement(name = "layout", required = true)
     public CollectionLayout getLayout() {
         return layout;
     }
@@ -65,15 +77,4 @@ public class Collection {
 
 
 
-    private List<Action> actions = Lists.newArrayList();
-
-    @XmlElementWrapper(required = true)
-    @XmlElement(name = "action", required = false)
-    public List<Action> getActions() {
-        return actions;
-    }
-
-    public void setActions(List<Action> actions) {
-        this.actions = actions;
-    }
 }

http://git-wip-us.apache.org/repos/asf/isis/blob/8ff81a7e/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/CollectionLayout.java
----------------------------------------------------------------------
diff --git a/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/CollectionLayout.java b/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/CollectionLayout.java
index 21c9273..4769b61 100644
--- a/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/CollectionLayout.java
+++ b/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/CollectionLayout.java
@@ -17,6 +17,7 @@
 package org.apache.isis.applib.layout.v1_0;
 
 
+import javax.xml.bind.annotation.XmlAttribute;
 import javax.xml.bind.annotation.XmlElement;
 import javax.xml.bind.annotation.XmlType;
 
@@ -32,13 +33,8 @@ import org.apache.isis.applib.annotation.Where;
  */
 @XmlType(
         propOrder = {
-                "cssClass"
+                "named"
                 ,"describedAs"
-                ,"defaultView"
-                ,"hidden"
-                ,"named"
-                ,"namedEscaped"
-                ,"paged"
                 ,"sortedBy"
         }
 )
@@ -46,7 +42,7 @@ public class CollectionLayout {
 
     private String cssClass;
 
-    @XmlElement(required = false)
+    @XmlAttribute(required = false)
     public String getCssClass() {
         return cssClass;
     }
@@ -70,13 +66,13 @@ public class CollectionLayout {
 
 
 
-    private String defaultView = "table";
+    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>.
      */
-    @XmlElement(required = true, defaultValue = "table")
+    @XmlAttribute(required = false)
     public String getDefaultView() {
         return defaultView;
     }
@@ -88,7 +84,7 @@ public class CollectionLayout {
 
     private Where hidden;
 
-    @XmlElement(required = false)
+    @XmlAttribute(required = false)
     public Where getHidden() {
         return hidden;
     }
@@ -112,7 +108,7 @@ public class CollectionLayout {
 
     private Boolean namedEscaped;
 
-    @XmlElement(required = false)
+    @XmlAttribute(required = false)
     public Boolean getNamedEscaped() {
         return namedEscaped;
     }
@@ -124,7 +120,7 @@ public class CollectionLayout {
 
     private Integer paged;
 
-    @XmlElement(required = false)
+    @XmlAttribute(required = false)
     public Integer getPaged() {
         return paged;
     }

http://git-wip-us.apache.org/repos/asf/isis/blob/8ff81a7e/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/Column.java
----------------------------------------------------------------------
diff --git a/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/Column.java b/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/Column.java
index 84534c0..e751c21 100644
--- a/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/Column.java
+++ b/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/Column.java
@@ -20,8 +20,9 @@ package org.apache.isis.applib.layout.v1_0;
 
 import java.util.List;
 
+import javax.xml.bind.annotation.XmlAttribute;
 import javax.xml.bind.annotation.XmlElement;
-import javax.xml.bind.annotation.XmlElementWrapper;
+import javax.xml.bind.annotation.XmlElements;
 import javax.xml.bind.annotation.XmlType;
 
 import com.google.common.collect.Lists;
@@ -29,15 +30,14 @@ import com.google.common.collect.Lists;
 @XmlType(
         propOrder = {
                 "span"
-                , "propertyGroups"
-                , "collections"
+                , "content"
         }
 )
 public class Column {
 
     private int span = 4;
 
-    @XmlElement(required = true, defaultValue = "4")
+    @XmlAttribute(required = true)
     public int getSpan() {
         return span;
     }
@@ -48,29 +48,19 @@ public class Column {
 
 
 
-    private List<PropertyGroup> propertyGroups = Lists.newArrayList();
+    private List<ColumnContent> content = Lists.newArrayList();
 
-    @XmlElementWrapper(required = true)
-    @XmlElement(name = "propertyGroup", required = false)
-    public List<PropertyGroup> getPropertyGroups() {
-        return propertyGroups;
-    }
+    @XmlElements({
+        @XmlElement(name = "propertyGroup", required = false, type = PropertyGroup.class),
+        @XmlElement(name = "collection", required = false, type = Collection.class)
 
-    public void setPropertyGroups(List<PropertyGroup> propertyGroups) {
-        this.propertyGroups = propertyGroups;
+    })
+    public List<ColumnContent> getContent() {
+        return content;
     }
 
-
-
-    private List<Collection> collections = Lists.newArrayList();
-
-    @XmlElementWrapper(required = true)
-    @XmlElement(name = "collection", required = false)
-    public List<Collection> getCollections() {
-        return collections;
+    public void setContent(List<ColumnContent> content) {
+        this.content = content;
     }
 
-    public void setCollections(List<Collection> collections) {
-        this.collections = collections;
-    }
 }

http://git-wip-us.apache.org/repos/asf/isis/blob/8ff81a7e/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/ColumnContent.java
----------------------------------------------------------------------
diff --git a/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/ColumnContent.java b/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/ColumnContent.java
new file mode 100644
index 0000000..ccd0e3f
--- /dev/null
+++ b/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/ColumnContent.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.v1_0;
+
+public interface ColumnContent {
+
+}

http://git-wip-us.apache.org/repos/asf/isis/blob/8ff81a7e/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/DomainObject.java
----------------------------------------------------------------------
diff --git a/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/DomainObject.java b/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/DomainObject.java
index 2ac2e54..052eb22 100644
--- a/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/DomainObject.java
+++ b/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/DomainObject.java
@@ -32,7 +32,8 @@ import org.apache.isis.applib.services.dto.Dto;
 
 @XmlRootElement
 @XmlType(
-        propOrder = {
+        name="domain-object"
+        , propOrder = {
                 "actions"
                 , "tabGroups"
         }
@@ -41,7 +42,7 @@ public class DomainObject implements Dto {
 
     private List<Action> actions = Lists.newArrayList();
 
-    @XmlElementWrapper(required = true)
+    @XmlElementWrapper(name = "actions", required = true)
     @XmlElement(name = "action", required = false)
     public List<Action> getActions() {
         return actions;
@@ -57,7 +58,7 @@ public class DomainObject implements Dto {
         add(new TabGroup());
     }};
 
-    @XmlElementWrapper(required = true)
+    // no wrapper
     @XmlElement(name = "tabGroup", required = true)
     public List<TabGroup> getTabGroups() {
         return tabGroups;

http://git-wip-us.apache.org/repos/asf/isis/blob/8ff81a7e/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/Property.java
----------------------------------------------------------------------
diff --git a/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/Property.java b/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/Property.java
index ed08541..ad29288 100644
--- a/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/Property.java
+++ b/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/Property.java
@@ -29,25 +29,25 @@ import com.google.common.collect.Lists;
 
 @XmlType(
         propOrder = {
-                "identifier"
-                , "layout"
+                "id"
                 , "actions"
+                , "layout"
         }
 )
-public class Property  {
+public class Property {
 
-    private String identifier;
+    private String id;
 
     /**
      * Property identifier, being the getter method without "get" or "is" prefix, first letter lower cased.
      */
     @XmlAttribute(required = true)
-    public String getIdentifier() {
-        return identifier;
+    public String getId() {
+        return id;
     }
 
-    public void setIdentifier(String identifier) {
-        this.identifier = identifier;
+    public void setId(String id) {
+        this.id = id;
     }
 
 

http://git-wip-us.apache.org/repos/asf/isis/blob/8ff81a7e/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/PropertyGroup.java
----------------------------------------------------------------------
diff --git a/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/PropertyGroup.java b/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/PropertyGroup.java
index f62c316..4aeebba 100644
--- a/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/PropertyGroup.java
+++ b/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/PropertyGroup.java
@@ -37,7 +37,7 @@ import org.apache.isis.applib.annotation.MemberOrder;
                 , "properties"
         }
 )
-public class PropertyGroup {
+public class PropertyGroup implements ColumnContent {
 
     private String name;
 
@@ -74,7 +74,6 @@ public class PropertyGroup {
         add(new Property());
     }};
 
-    @XmlElementWrapper(required = true)
     @XmlElement(name = "property", required = true)
     public List<Property> getProperties() {
         return properties;

http://git-wip-us.apache.org/repos/asf/isis/blob/8ff81a7e/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/PropertyLayout.java
----------------------------------------------------------------------
diff --git a/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/PropertyLayout.java b/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/PropertyLayout.java
index 0728c1f..fff5086 100644
--- a/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/PropertyLayout.java
+++ b/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/PropertyLayout.java
@@ -16,7 +16,7 @@
  */
 package org.apache.isis.applib.layout.v1_0;
 
-
+import javax.xml.bind.annotation.XmlAttribute;
 import javax.xml.bind.annotation.XmlElement;
 import javax.xml.bind.annotation.XmlType;
 
@@ -25,22 +25,15 @@ import org.apache.isis.applib.annotation.Where;
 
 @XmlType(
         propOrder = {
-                "cssClass"
+                "named"
                 , "describedAs"
-                , "hidden"
-                , "labelPosition"
-                , "multiLine"
-                , "named"
-                , "namedEscaped"
-                , "renderedAsDayBefore"
-                , "typicalLength"
         }
 )
 public class PropertyLayout {
 
     private String cssClass;
 
-    @XmlElement(required = false)
+    @XmlAttribute(required = false)
     public String getCssClass() {
         return cssClass;
     }
@@ -64,7 +57,7 @@ public class PropertyLayout {
 
     private Where hidden;
 
-    @XmlElement(required = false)
+    @XmlAttribute(required = false)
     public Where getHidden() {
         return hidden;
     }
@@ -74,9 +67,9 @@ public class PropertyLayout {
     }
 
 
-    private LabelPosition labelPosition = LabelPosition.LEFT;
+    private LabelPosition labelPosition;
 
-    @XmlElement(required = true, defaultValue = "LEFT")
+    @XmlAttribute(required = false)
     public LabelPosition getLabelPosition() {
         return labelPosition;
     }
@@ -88,7 +81,7 @@ public class PropertyLayout {
 
     private Integer multiLine;
 
-    @XmlElement(required = false)
+    @XmlAttribute(required = false)
     public Integer getMultiLine() {
         return multiLine;
     }
@@ -112,7 +105,7 @@ public class PropertyLayout {
 
     private Boolean namedEscaped;
 
-    @XmlElement(required = false)
+    @XmlAttribute(required = false)
     public Boolean getNamedEscaped() {
         return namedEscaped;
     }
@@ -124,7 +117,7 @@ public class PropertyLayout {
 
     private Boolean renderedAsDayBefore;
 
-    @XmlElement(required = false)
+    @XmlAttribute(required = false)
     public Boolean getRenderedAsDayBefore() {
         return renderedAsDayBefore;
     }
@@ -134,9 +127,9 @@ public class PropertyLayout {
     }
 
 
-    private Integer typicalLength = -1;
+    private Integer typicalLength;
 
-    @XmlElement(required = true, defaultValue = "-1")
+    @XmlAttribute(required = false)
     public Integer getTypicalLength() {
         return typicalLength;
     }

http://git-wip-us.apache.org/repos/asf/isis/blob/8ff81a7e/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/Tab.java
----------------------------------------------------------------------
diff --git a/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/Tab.java b/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/Tab.java
index b8b311a..43ea13f 100644
--- a/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/Tab.java
+++ b/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/Tab.java
@@ -22,7 +22,8 @@ import javax.xml.bind.annotation.XmlElement;
 import javax.xml.bind.annotation.XmlType;
 
 @XmlType(
-        propOrder = {
+        name="tab"
+        , propOrder = {
                 "name"
                 , "left"
                 , "middle"

http://git-wip-us.apache.org/repos/asf/isis/blob/8ff81a7e/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/TabGroup.java
----------------------------------------------------------------------
diff --git a/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/TabGroup.java b/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/TabGroup.java
index 3d57c19..2280ad6 100644
--- a/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/TabGroup.java
+++ b/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/TabGroup.java
@@ -22,19 +22,19 @@ import java.util.ArrayList;
 import java.util.List;
 
 import javax.xml.bind.annotation.XmlElement;
-import javax.xml.bind.annotation.XmlElementWrapper;
 import javax.xml.bind.annotation.XmlType;
 
 @XmlType(
-        propOrder = {"tabs"}
-) public class TabGroup  {
+        //propOrder = {"tabs"}
+)
+public class TabGroup {
 
     // must be at least one tab.
     private List<Tab> tabs = new ArrayList<Tab>(){{
         add(new Tab());
     }};
 
-    @XmlElementWrapper(required = true)
+    // no wrapper
     @XmlElement(name = "tab", required = true)
     public List<Tab> getTabs() {
         return tabs;

http://git-wip-us.apache.org/repos/asf/isis/blob/8ff81a7e/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/object/layoutxml/LayoutXmlFacetDefault.java
----------------------------------------------------------------------
diff --git a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/object/layoutxml/LayoutXmlFacetDefault.java b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/object/layoutxml/LayoutXmlFacetDefault.java
index 3a391d7..f515ccc 100644
--- a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/object/layoutxml/LayoutXmlFacetDefault.java
+++ b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/object/layoutxml/LayoutXmlFacetDefault.java
@@ -75,7 +75,7 @@ public class LayoutXmlFacetDefault
     private void doFleshOut(final DomainObject metadata) {
         ObjectSpecification objectSpec = (ObjectSpecification) getFacetHolder();
         List<OneToOneAssociation> properties = getProperties(objectSpec);
-        List<TabGroup> tabGroups = metadata.getTabGroups();
+        List<TabGroup> tabses = metadata.getTabGroups();
     }
 
     private List getProperties(final ObjectSpecification objectSpec) {

http://git-wip-us.apache.org/repos/asf/isis/blob/8ff81a7e/core/metamodel/src/test/java/org/apache/isis/core/metamodel/layoutxml/v1_0/DomainObjectTest.java
----------------------------------------------------------------------
diff --git a/core/metamodel/src/test/java/org/apache/isis/core/metamodel/layoutxml/v1_0/DomainObjectTest.java b/core/metamodel/src/test/java/org/apache/isis/core/metamodel/layoutxml/v1_0/DomainObjectTest.java
index 070f094..26f361c 100644
--- a/core/metamodel/src/test/java/org/apache/isis/core/metamodel/layoutxml/v1_0/DomainObjectTest.java
+++ b/core/metamodel/src/test/java/org/apache/isis/core/metamodel/layoutxml/v1_0/DomainObjectTest.java
@@ -29,6 +29,7 @@ import org.junit.Before;
 import org.junit.Test;
 
 import org.apache.isis.applib.layout.v1_0.Action;
+import org.apache.isis.applib.layout.v1_0.Collection;
 import org.apache.isis.applib.layout.v1_0.Column;
 import org.apache.isis.applib.layout.v1_0.DomainObject;
 import org.apache.isis.applib.layout.v1_0.Property;
@@ -37,6 +38,10 @@ import org.apache.isis.applib.layout.v1_0.Tab;
 import org.apache.isis.applib.layout.v1_0.TabGroup;
 import org.apache.isis.applib.services.jaxb.JaxbService;
 
+import static org.hamcrest.CoreMatchers.equalTo;
+import static org.hamcrest.CoreMatchers.is;
+import static org.junit.Assert.assertThat;
+
 public class DomainObjectTest {
 
     private JaxbService jaxbService;
@@ -61,20 +66,22 @@ public class DomainObjectTest {
         Column left = tab.getLeft();
 
         PropertyGroup leftPropGroup = new PropertyGroup();
-        left.getPropertyGroups().add(leftPropGroup);
-
+        left.getContent().add(leftPropGroup);
         leftPropGroup.setName("General");
 
-        Property nameProperty = leftPropGroup.getProperties().get(0);
+        Collection similarToColl = new Collection();
+        left.getContent().add(similarToColl);
+        similarToColl.setId("similarTo");
 
-        nameProperty.setIdentifier("name");
+        Property nameProperty = leftPropGroup.getProperties().get(0);
+        nameProperty.setId("name");
 
         Action updateNameAction = new Action();
-        updateNameAction.setIdentifier("updateName");
+        updateNameAction.setId("updateName");
         nameProperty.getActions().add(updateNameAction);
 
         Action deleteAction = new Action();
-        deleteAction.setIdentifier("delete");
+        deleteAction.setId("delete");
         domainObject.getActions().add(deleteAction);
 
         String xml = jaxbService.toXml(domainObject,
@@ -84,7 +91,14 @@ public class DomainObjectTest {
                 ));
         System.out.println(xml);
 
-        jaxbService.fromXml(DomainObject.class, xml);
+        DomainObject domainObjectRoundtripped = jaxbService.fromXml(DomainObject.class, xml);
+        String xmlRoundtripped = jaxbService.toXml(domainObjectRoundtripped,
+                ImmutableMap.<String,Object>of(
+                        Marshaller.JAXB_SCHEMA_LOCATION,
+                        "http://isis.apache.org/schema/applib/layout http://isis.apache.org/schema/applib/layout/layout-1.0.xsd"
+                ));
+        assertThat(xml, is(equalTo(xmlRoundtripped)));
+
 
         System.out.println("==========");
 

http://git-wip-us.apache.org/repos/asf/isis/blob/8ff81a7e/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 f82698f..75b0e71 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
@@ -167,8 +167,8 @@ public class ComponentFactoryRegistrarDefault implements ComponentFactoryRegistr
     protected void addComponentFactoriesForEntity(final ComponentFactoryList componentFactories) {
 
         // top-level
+        componentFactories.add(new EntityTabbedPanelFactory());
         componentFactories.add(new EntityCombinedPanelFactory());
-        componentFactories.add(new EntityTabbedPanelFactory()); // last one wins, apparently.
 
         // lower-level
         componentFactories.add(new EntityIconAndTitlePanelFactory());

http://git-wip-us.apache.org/repos/asf/isis/blob/8ff81a7e/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/combined/EntityCombinedPanelFactory.java
----------------------------------------------------------------------
diff --git a/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/combined/EntityCombinedPanelFactory.java b/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/combined/EntityCombinedPanelFactory.java
index a42f062..14c1473 100644
--- a/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/combined/EntityCombinedPanelFactory.java
+++ b/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/combined/EntityCombinedPanelFactory.java
@@ -22,6 +22,8 @@ package org.apache.isis.viewer.wicket.ui.components.entity.combined;
 import org.apache.wicket.Component;
 import org.apache.wicket.model.IModel;
 
+import org.apache.isis.core.metamodel.facets.object.layoutxml.LayoutXmlFacet;
+import org.apache.isis.core.metamodel.spec.ObjectSpecification;
 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;
@@ -41,6 +43,13 @@ public class EntityCombinedPanelFactory extends EntityComponentFactoryAbstract {
     }
 
     @Override
+    protected ApplicationAdvice doAppliesTo(final EntityModel entityModel) {
+        final ObjectSpecification specification = entityModel.getTypeOfSpecification();
+        // opposite to the EntityTabbedPanelFactory
+        return appliesIf(!specification.containsDoOpFacet(LayoutXmlFacet.class));
+    }
+
+    @Override
     public Component createComponent(final String id, final IModel<?> model) {
         final EntityModel entityModel = (EntityModel) model;
         return new EntityCombinedPanel(id, entityModel);

http://git-wip-us.apache.org/repos/asf/isis/blob/8ff81a7e/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/tabbed/EntityTabbedPanelFactory.java
----------------------------------------------------------------------
diff --git a/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/tabbed/EntityTabbedPanelFactory.java b/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/tabbed/EntityTabbedPanelFactory.java
index db69e65..04c3496 100644
--- a/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/tabbed/EntityTabbedPanelFactory.java
+++ b/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/tabbed/EntityTabbedPanelFactory.java
@@ -36,7 +36,7 @@ public class EntityTabbedPanelFactory extends EntityComponentFactoryAbstract {
 
     private static final long serialVersionUID = 1L;
 
-    private static final String NAME = "combined";
+    private static final String NAME = "tabbed";
 
     public EntityTabbedPanelFactory() {
         super(ComponentType.ENTITY, NAME, EntityTabbedPanel.class);
@@ -45,7 +45,7 @@ public class EntityTabbedPanelFactory extends EntityComponentFactoryAbstract {
     @Override
     protected ApplicationAdvice doAppliesTo(final EntityModel entityModel) {
         final ObjectSpecification specification = entityModel.getTypeOfSpecification();
-        return appliesExclusivelyIf(specification.containsDoOpFacet(LayoutXmlFacet.class));
+        return appliesIf(specification.containsDoOpFacet(LayoutXmlFacet.class));
     }
 
     @Override

http://git-wip-us.apache.org/repos/asf/isis/blob/8ff81a7e/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 6cf4984..a78df60 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,44 +1,21 @@
 <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
 <domainObject xsi:schemaLocation="http://isis.apache.org/schema/applib/layout http://isis.apache.org/schema/applib/layout/layout-1.0.xsd" xmlns="http://isis.apache.org/schema/applib/layout" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
     <actions>
-        <action identifier="delete">
-            <layout>
-                <bookmarking>NEVER</bookmarking>
-                <position>BELOW</position>
-            </layout>
-        </action>
+        <action id="delete"/>
     </actions>
-    <tabGroups>
-        <tabGroup>
-            <tabs>
-                <tab>
-                    <left>
-                        <span>4</span>
-                        <propertyGroups>
-                            <propertyGroup name="General">
-                                <actions/>
-                                <properties>
-                                    <property identifier="name">
-                                        <layout>
-                                            <labelPosition>LEFT</labelPosition>
-                                            <typicalLength>-1</typicalLength>
-                                        </layout>
-                                        <actions>
-                                            <action identifier="updateName">
-                                                <layout>
-                                                    <bookmarking>NEVER</bookmarking>
-                                                    <position>BELOW</position>
-                                                </layout>
-                                            </action>
-                                        </actions>
-                                    </property>
-                                </properties>
-                            </propertyGroup>
-                        </propertyGroups>
-                        <collections/>
-                    </left>
-                </tab>
-            </tabs>
-        </tabGroup>
-    </tabGroups>
-</domainObject>
+    <tabGroup>
+        <tab>
+            <left span="4">
+                <propertyGroup name="General">
+                    <actions/>
+                    <property id="name">
+                        <actions>
+                            <action id="updateName"/>
+                        </actions>
+                        <layout/>
+                    </property>
+                </propertyGroup>
+            </left>
+        </tab>
+    </tabGroup>
+</domainObject>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/isis/blob/8ff81a7e/example/application/simpleapp/webapp/src/main/webapp/WEB-INF/translations-en.po
----------------------------------------------------------------------
diff --git a/example/application/simpleapp/webapp/src/main/webapp/WEB-INF/translations-en.po b/example/application/simpleapp/webapp/src/main/webapp/WEB-INF/translations-en.po
index 6daefe7..5e857e1 100644
--- a/example/application/simpleapp/webapp/src/main/webapp/WEB-INF/translations-en.po
+++ b/example/application/simpleapp/webapp/src/main/webapp/WEB-INF/translations-en.po
@@ -243,7 +243,7 @@ msgid "Result"
 msgstr ""
 
 
-#: org.apache.isis.applib.fixturescripts.FixtureResult#className
+#: org.apache.isis.applib.fixturescripts.FixtureResult#name
 msgid "Result class"
 msgstr ""
 

http://git-wip-us.apache.org/repos/asf/isis/blob/8ff81a7e/example/application/simpleapp/webapp/src/main/webapp/WEB-INF/translations-es.po
----------------------------------------------------------------------
diff --git a/example/application/simpleapp/webapp/src/main/webapp/WEB-INF/translations-es.po b/example/application/simpleapp/webapp/src/main/webapp/WEB-INF/translations-es.po
index fab4c95..7490901 100644
--- a/example/application/simpleapp/webapp/src/main/webapp/WEB-INF/translations-es.po
+++ b/example/application/simpleapp/webapp/src/main/webapp/WEB-INF/translations-es.po
@@ -243,7 +243,7 @@ msgid "Result"
 msgstr "Resultado"
 
 
-#: org.apache.isis.applib.fixturescripts.FixtureResult#className
+#: org.apache.isis.applib.fixturescripts.FixtureResult#name
 msgid "Result class"
 msgstr "Clase del resultado"
 

http://git-wip-us.apache.org/repos/asf/isis/blob/8ff81a7e/example/application/simpleapp/webapp/src/main/webapp/WEB-INF/translations-nl.po
----------------------------------------------------------------------
diff --git a/example/application/simpleapp/webapp/src/main/webapp/WEB-INF/translations-nl.po b/example/application/simpleapp/webapp/src/main/webapp/WEB-INF/translations-nl.po
index 1da75b7..c7a022f 100644
--- a/example/application/simpleapp/webapp/src/main/webapp/WEB-INF/translations-nl.po
+++ b/example/application/simpleapp/webapp/src/main/webapp/WEB-INF/translations-nl.po
@@ -244,7 +244,7 @@ msgid "Result"
 msgstr ""
 
 
-#: org.apache.isis.applib.fixturescripts.FixtureResult#className
+#: org.apache.isis.applib.fixturescripts.FixtureResult#name
 msgid "Result class"
 msgstr ""
 

http://git-wip-us.apache.org/repos/asf/isis/blob/8ff81a7e/example/application/simpleapp/webapp/src/main/webapp/WEB-INF/translations.po
----------------------------------------------------------------------
diff --git a/example/application/simpleapp/webapp/src/main/webapp/WEB-INF/translations.po b/example/application/simpleapp/webapp/src/main/webapp/WEB-INF/translations.po
index 6643591..f8a455b 100644
--- a/example/application/simpleapp/webapp/src/main/webapp/WEB-INF/translations.po
+++ b/example/application/simpleapp/webapp/src/main/webapp/WEB-INF/translations.po
@@ -243,7 +243,7 @@ msgid "Result"
 msgstr ""
 
 
-#: org.apache.isis.applib.fixturescripts.FixtureResult#className
+#: org.apache.isis.applib.fixturescripts.FixtureResult#name
 msgid "Result class"
 msgstr ""
 


[32/50] [abbrv] isis git commit: ISIS-993: metadata has back owners. Wicket component broken at this point

Posted by da...@apache.org.
http://git-wip-us.apache.org/repos/asf/isis/blob/f5c3b104/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/tabgroups/EntityTabGroupsPanel.java
----------------------------------------------------------------------
diff --git a/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/tabgroups/EntityTabGroupsPanel.java b/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/tabgroups/EntityTabGroupsPanel.java
new file mode 100644
index 0000000..3f9b76f
--- /dev/null
+++ b/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/tabgroups/EntityTabGroupsPanel.java
@@ -0,0 +1,119 @@
+/*
+ *  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.entity.tabgroups;
+
+import java.util.List;
+
+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.markup.html.list.ListItem;
+import org.apache.wicket.markup.html.list.ListView;
+import org.apache.wicket.markup.html.panel.Panel;
+import org.apache.wicket.model.Model;
+
+import org.apache.isis.applib.layout.v1_0.DomainObject;
+import org.apache.isis.applib.layout.v1_0.Tab;
+import org.apache.isis.applib.layout.v1_0.TabGroup;
+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.layoutxml.LayoutXmlFacet;
+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;
+
+import de.agilecoders.wicket.core.markup.html.bootstrap.tabs.AjaxBootstrapTabbedPanel;
+
+/**
+ * {@link PanelAbstract Panel} to represent an entity on a single page made up
+ * of several &lt;div&gt; regions.
+ */
+public class EntityTabGroupsPanel extends PanelAbstract<EntityModel> {
+
+    private static final long serialVersionUID = 1L;
+
+    private static final String ID_ENTITY_PROPERTIES_AND_COLLECTIONS = "entityPropertiesAndCollections";
+    private static final String ID_TAB_GROUPS = "tabGroups";
+    private static final String ID_TAB_GROUP = "tabGroup";
+
+    public EntityTabGroupsPanel(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 LayoutXmlFacet layoutXmlFacet = model.getTypeOfSpecification().getFacet(LayoutXmlFacet.class);
+        final DomainObject domainObject = layoutXmlFacet.getLayoutMetadata();
+
+        addOrReplace(ComponentType.ENTITY_SUMMARY, model);
+
+        final List<TabGroup> tabGroups = domainObject.getTabGroups();
+        final ListView<TabGroup> tabGroupsList =
+                new ListView<TabGroup>(ID_TAB_GROUPS, tabGroups) {
+
+            @Override
+            protected void populateItem(final ListItem<TabGroup> item) {
+
+                final List<ITab> tabs = Lists.newArrayList();
+                final TabGroup tabGroup = item.getModelObject();
+                final List<Tab> tabList = tabGroup.getTabs();
+
+                for (final Tab tab : tabList) {
+
+                    tabs.add(new AbstractTab(Model.of(tab.getName())) {
+                        private static final long serialVersionUID = 1L;
+
+                        @Override
+                        public Panel getPanel(String panelId) {
+                            return new EntityTabPanel(panelId, model, tab);
+                        }
+                    });
+                }
+                item.add(new AjaxBootstrapTabbedPanel(ID_TAB_GROUP, tabs));
+            }
+        };
+        add(tabGroupsList);
+    }
+
+    private static class EntityTabPanel extends PanelAbstract {
+        private static final long serialVersionUID = 1L;
+
+        public EntityTabPanel(String id, final EntityModel model, final Tab tab) {
+            super(id);
+
+            final EntityModel modelWithTabHints = new EntityModel(model.getPageParameters());
+            model.setTab(tab);
+
+            getComponentFactoryRegistry().addOrReplaceComponent(this, ID_ENTITY_PROPERTIES_AND_COLLECTIONS, ComponentType.ENTITY_PROPERTIES, modelWithTabHints);
+
+        }
+    }
+}

http://git-wip-us.apache.org/repos/asf/isis/blob/f5c3b104/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/tabgroups/EntityTabGroupsPanelFactory.java
----------------------------------------------------------------------
diff --git a/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/tabgroups/EntityTabGroupsPanelFactory.java b/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/tabgroups/EntityTabGroupsPanelFactory.java
new file mode 100644
index 0000000..825ea59
--- /dev/null
+++ b/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/tabgroups/EntityTabGroupsPanelFactory.java
@@ -0,0 +1,56 @@
+/*
+ *  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.entity.tabgroups;
+
+import org.apache.wicket.Component;
+import org.apache.wicket.model.IModel;
+
+import org.apache.isis.core.metamodel.facets.object.layoutxml.LayoutXmlFacet;
+import org.apache.isis.core.metamodel.spec.ObjectSpecification;
+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 EntityTabGroupsPanel}.
+ */
+public class EntityTabGroupsPanelFactory extends EntityComponentFactoryAbstract {
+
+    private static final long serialVersionUID = 1L;
+
+    private static final String NAME = "tabbed";
+
+    public EntityTabGroupsPanelFactory() {
+        super(ComponentType.ENTITY, NAME, EntityTabGroupsPanel.class);
+    }
+
+    @Override
+    protected ApplicationAdvice doAppliesTo(final EntityModel entityModel) {
+        final ObjectSpecification specification = entityModel.getTypeOfSpecification();
+        return appliesIf(specification.containsDoOpFacet(LayoutXmlFacet.class));
+    }
+
+    @Override
+    public Component createComponent(final String id, final IModel<?> model) {
+        final EntityModel entityModel = (EntityModel) model;
+        return new EntityTabGroupsPanel(id, entityModel);
+    }
+}

http://git-wip-us.apache.org/repos/asf/isis/blob/f5c3b104/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 036b99d..bb468a5 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
@@ -31,4 +31,14 @@
             </left>
         </tab>
     </tabGroup>
+    <tabGroup>
+        <tab name="Similar To">
+            <left span="12">
+                <collection id="similarTo">
+                    <actions/>
+                    <layout/>
+                </collection>
+            </left>
+        </tab>
+    </tabGroup>
 </domainObject>
\ No newline at end of file


[35/50] [abbrv] isis git commit: ISIS-993: more on the layout service, ability to download a zip of all layouts

Posted by da...@apache.org.
ISIS-993: more on the layout service, ability to download a zip of all layouts


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

Branch: refs/heads/ISIS-993
Commit: c998c76d2a692ab66165a194d7d1c877e625acdb
Parents: fb0f127
Author: Dan Haywood <da...@haywood-associates.co.uk>
Authored: Fri Jan 8 17:01:24 2016 +0000
Committer: Dan Haywood <da...@haywood-associates.co.uk>
Committed: Mon Jan 25 14:38:24 2016 +0000

----------------------------------------------------------------------
 .../applib/services/dto/Dto_downloadXml.java    |   9 +-
 .../applib/services/dto/Dto_downloadXsd.java    |   2 +
 .../layout/ObjectLayoutMetadataService.java     |  21 ++-
 .../layout/Object_downloadLayoutXml.java        |  30 ++--
 .../services/layout/Object_viewLayout.java      |  70 +++++++++
 .../ObjectLayoutMetadataFacet.java              |  35 +++++
 .../ObjectLayoutMetadataFacetDefault.java       |  65 ++++++++
 .../ObjectLayoutMetadataFacetFactory.java       |  61 ++++++++
 .../object/layoutxml/LayoutXmlFacetFactory.java |  61 --------
 .../layoutxml/ObjectLayoutMetadataFacet.java    |  35 -----
 .../ObjectLayoutMetadataFacetDefault.java       |  65 --------
 .../ObjectLayoutMetadataServiceDefault.java     |  13 +-
 .../services/metamodel/MetadataMenu.java        | 150 +++++++++++++++++++
 .../core/metamodel/services/metamodel/Util.java |  33 ++++
 .../dflt/ProgrammingModelFacetsJava5.java       |   4 +-
 .../combined/EntityCombinedPanelFactory.java    |   2 +-
 .../entity/tabgroups/EntityTabGroupsPanel.java  |   2 +-
 .../tabgroups/EntityTabGroupsPanelFactory.java  |   2 +-
 .../dom/simple/SimpleObject.layout.xml          |  13 +-
 19 files changed, 481 insertions(+), 192 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/isis/blob/c998c76d/core/applib/src/main/java/org/apache/isis/applib/services/dto/Dto_downloadXml.java
----------------------------------------------------------------------
diff --git 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
index 3cd9ad4..34b1072 100644
--- 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
@@ -16,15 +16,13 @@
  */
 package org.apache.isis.applib.services.dto;
 
-import java.io.IOException;
-
 import javax.inject.Inject;
-import javax.xml.bind.JAXBException;
 
 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.ParameterLayout;
 import org.apache.isis.applib.annotation.RestrictTo;
 import org.apache.isis.applib.annotation.SemanticsOf;
 import org.apache.isis.applib.services.jaxb.JaxbService;
@@ -50,8 +48,9 @@ public class Dto_downloadXml {
             cssClassFa = "fa-download"
     )
     @MemberOrder(sequence = "500.1")
-    public Object $$(final String fileName) throws JAXBException, IOException {
-
+    public Object $$(
+            @ParameterLayout(named = "File name")
+            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/c998c76d/core/applib/src/main/java/org/apache/isis/applib/services/dto/Dto_downloadXsd.java
----------------------------------------------------------------------
diff --git a/core/applib/src/main/java/org/apache/isis/applib/services/dto/Dto_downloadXsd.java b/core/applib/src/main/java/org/apache/isis/applib/services/dto/Dto_downloadXsd.java
index 9366ec4..a139f15 100644
--- a/core/applib/src/main/java/org/apache/isis/applib/services/dto/Dto_downloadXsd.java
+++ b/core/applib/src/main/java/org/apache/isis/applib/services/dto/Dto_downloadXsd.java
@@ -33,6 +33,7 @@ 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.ParameterLayout;
 import org.apache.isis.applib.annotation.RestrictTo;
 import org.apache.isis.applib.annotation.SemanticsOf;
 import org.apache.isis.applib.services.jaxb.JaxbService;
@@ -67,6 +68,7 @@ public class Dto_downloadXsd {
     )
     @MemberOrder(sequence = "500.2")
     public Object $$(
+            @ParameterLayout(named = "File name")
             final String fileName,
             final JaxbService.IsisSchemas isisSchemas) {
 

http://git-wip-us.apache.org/repos/asf/isis/blob/c998c76d/core/applib/src/main/java/org/apache/isis/applib/services/layout/ObjectLayoutMetadataService.java
----------------------------------------------------------------------
diff --git a/core/applib/src/main/java/org/apache/isis/applib/services/layout/ObjectLayoutMetadataService.java b/core/applib/src/main/java/org/apache/isis/applib/services/layout/ObjectLayoutMetadataService.java
index 56efd62..f0da669 100644
--- a/core/applib/src/main/java/org/apache/isis/applib/services/layout/ObjectLayoutMetadataService.java
+++ b/core/applib/src/main/java/org/apache/isis/applib/services/layout/ObjectLayoutMetadataService.java
@@ -21,14 +21,29 @@ import org.apache.isis.applib.layout.v1_0.ObjectLayoutMetadata;
 
 public interface ObjectLayoutMetadataService {
 
-    @Programmatic ObjectLayoutMetadata fromXml(Class<?> domainClass);
+    /**
+     * Returns raw (unnormalized) metadata, per the <code>.layout.xml</code> file.
+     */
+    @Programmatic
+    ObjectLayoutMetadata fromXml(Class<?> domainClass);
 
     /**
      *  @param objectLayoutMetadata - the layout to be validated.
      * @param domainClass - as per domain class.
      */
-    @Programmatic ObjectLayoutMetadata normalize(final ObjectLayoutMetadata objectLayoutMetadata, final Class<?> domainClass);
+    @Programmatic
+    ObjectLayoutMetadata normalize(final ObjectLayoutMetadata objectLayoutMetadata, final Class<?> domainClass);
 
-    @Programmatic String toXml(ObjectLayoutMetadata objectLayoutMetadata);
+    /**
+     * Obtains the layout metadata for the specified domain object.  It will have been {@link #normalize(ObjectLayoutMetadata, Class) normalized} already.
+     */
+    @Programmatic
+    ObjectLayoutMetadata toMetadata(Object domainObject);
+
+    /**
+     * Obtains the layout metadata for the specified domain class.  It will have been {@link #normalize(ObjectLayoutMetadata, Class) normalized} already.
+     */
+    @Programmatic
+    ObjectLayoutMetadata toMetadata(Class<?> domainClass);
 
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/isis/blob/c998c76d/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 9a3f5d2..aca104c 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
@@ -16,18 +16,16 @@
  */
 package org.apache.isis.applib.services.layout;
 
-import java.io.IOException;
-
 import javax.inject.Inject;
-import javax.xml.bind.JAXBException;
 
 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.ParameterLayout;
 import org.apache.isis.applib.annotation.RestrictTo;
 import org.apache.isis.applib.annotation.SemanticsOf;
-import org.apache.isis.applib.services.dto.Dto;
+import org.apache.isis.applib.layout.v1_0.ObjectLayoutMetadata;
 import org.apache.isis.applib.services.jaxb.JaxbService;
 import org.apache.isis.applib.value.Clob;
 
@@ -36,7 +34,7 @@ public class Object_downloadLayoutXml {
 
     private final Object object;
 
-    public Object_downloadLayoutXml(final Dto object) {
+    public Object_downloadLayoutXml(final Object object) {
         this.object = object;
     }
 
@@ -51,17 +49,31 @@ public class Object_downloadLayoutXml {
             cssClassFa = "fa-download"
     )
     @MemberOrder(sequence = "550.1")
-    public Object $$(final String fileName) throws JAXBException, IOException {
-        final String xml = layoutXmlService.toXml(object);
+    public Object $$(
+            @ParameterLayout(named = "File name")
+            final String fileName) {
+        final ObjectLayoutMetadata metadata = getObjectLayoutMetadata();
+        final String xml = jaxbService.toXml(metadata);
         return new Clob(Util.withSuffix(fileName, "xml"), "text/xml", xml);
     }
 
+    public boolean hide$$() {
+        return getObjectLayoutMetadata() == null;
+    }
     public String default0$$() {
-        return Util.withSuffix(object.getClass().getName(), "xml");
+        return Util.withSuffix(object.getClass().getSimpleName(), "layout.xml");
+    }
+
+    protected ObjectLayoutMetadata getObjectLayoutMetadata() {
+        return objectLayoutMetadataService.toMetadata(object);
     }
 
 
+
+    @Inject
+    ObjectLayoutMetadataService objectLayoutMetadataService;
+
     @Inject
-    JaxbService layoutXmlService;
+    JaxbService jaxbService;
 
 }

http://git-wip-us.apache.org/repos/asf/isis/blob/c998c76d/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
new file mode 100644
index 0000000..4957e9c
--- /dev/null
+++ b/core/applib/src/main/java/org/apache/isis/applib/services/layout/Object_viewLayout.java
@@ -0,0 +1,70 @@
+/**
+ *  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.v1_0.ObjectLayoutMetadata;
+
+@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 ObjectLayoutMetadata $$() {
+        return getObjectLayoutMetadata();
+    }
+
+    public boolean hide$$() {
+        return getObjectLayoutMetadata() == null;
+    }
+
+    protected ObjectLayoutMetadata getObjectLayoutMetadata() {
+        return objectLayoutMetadataService.toMetadata(object);
+    }
+
+
+
+    @Inject
+    ObjectLayoutMetadataService objectLayoutMetadataService;
+
+}

http://git-wip-us.apache.org/repos/asf/isis/blob/c998c76d/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/object/layoutmetadata/ObjectLayoutMetadataFacet.java
----------------------------------------------------------------------
diff --git a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/object/layoutmetadata/ObjectLayoutMetadataFacet.java b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/object/layoutmetadata/ObjectLayoutMetadataFacet.java
new file mode 100644
index 0000000..4d8db93
--- /dev/null
+++ b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/object/layoutmetadata/ObjectLayoutMetadataFacet.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.core.metamodel.facets.object.layoutmetadata;
+
+
+import org.apache.isis.core.metamodel.facetapi.Facet;
+import org.apache.isis.applib.layout.v1_0.ObjectLayoutMetadata;
+
+/**
+ * Corresponds to providing a <code>.layout.xml</code> file for the domain object's class.
+ */
+public interface ObjectLayoutMetadataFacet extends Facet {
+
+    /**
+     * Will have been {@link org.apache.isis.applib.services.layout.ObjectLayoutMetadataService#normalize(ObjectLayoutMetadata, Class) normalized}.
+     */
+    ObjectLayoutMetadata getMetadata();
+
+}

http://git-wip-us.apache.org/repos/asf/isis/blob/c998c76d/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/object/layoutmetadata/ObjectLayoutMetadataFacetDefault.java
----------------------------------------------------------------------
diff --git a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/object/layoutmetadata/ObjectLayoutMetadataFacetDefault.java b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/object/layoutmetadata/ObjectLayoutMetadataFacetDefault.java
new file mode 100644
index 0000000..95e3712
--- /dev/null
+++ b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/object/layoutmetadata/ObjectLayoutMetadataFacetDefault.java
@@ -0,0 +1,65 @@
+/*
+ *  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.facets.object.layoutmetadata;
+
+import org.apache.isis.applib.layout.v1_0.ObjectLayoutMetadata;
+import org.apache.isis.applib.services.layout.ObjectLayoutMetadataService;
+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.spec.ObjectSpecification;
+
+public class ObjectLayoutMetadataFacetDefault
+            extends FacetAbstract
+            implements ObjectLayoutMetadataFacet {
+
+    private final ObjectLayoutMetadata metadata;
+    private final ObjectLayoutMetadataService objectLayoutMetadataService;
+
+    public static Class<? extends Facet> type() {
+        return ObjectLayoutMetadataFacet.class;
+    }
+
+
+    public static ObjectLayoutMetadataFacet create(
+            final FacetHolder facetHolder,
+            final ObjectLayoutMetadata objectLayoutMetadata,
+            final ObjectLayoutMetadataService objectLayoutMetadataService) {
+        if(objectLayoutMetadata == null) {
+            return null;
+        }
+        return new ObjectLayoutMetadataFacetDefault(facetHolder, objectLayoutMetadata, objectLayoutMetadataService);
+    }
+
+    private ObjectLayoutMetadataFacetDefault(
+            final FacetHolder facetHolder,
+            final ObjectLayoutMetadata metadata,
+            final ObjectLayoutMetadataService objectLayoutMetadataService) {
+        super(ObjectLayoutMetadataFacetDefault.type(), facetHolder, Derivation.NOT_DERIVED);
+        this.metadata = metadata;
+        this.objectLayoutMetadataService = objectLayoutMetadataService;
+    }
+
+
+    public ObjectLayoutMetadata getMetadata() {
+        final ObjectSpecification objectSpecification = (ObjectSpecification) getFacetHolder();
+        return objectLayoutMetadataService.normalize(metadata, objectSpecification.getCorrespondingClass());
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/isis/blob/c998c76d/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/object/layoutmetadata/ObjectLayoutMetadataFacetFactory.java
----------------------------------------------------------------------
diff --git a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/object/layoutmetadata/ObjectLayoutMetadataFacetFactory.java b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/object/layoutmetadata/ObjectLayoutMetadataFacetFactory.java
new file mode 100644
index 0000000..0f1b4e8
--- /dev/null
+++ b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/object/layoutmetadata/ObjectLayoutMetadataFacetFactory.java
@@ -0,0 +1,61 @@
+/* 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.facets.object.layoutmetadata;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import org.apache.isis.applib.layout.v1_0.ObjectLayoutMetadata;
+import org.apache.isis.applib.services.layout.ObjectLayoutMetadataService;
+import org.apache.isis.core.metamodel.facetapi.FacetHolder;
+import org.apache.isis.core.metamodel.facetapi.FacetUtil;
+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;
+
+public class ObjectLayoutMetadataFacetFactory extends FacetFactoryAbstract implements ServicesInjectorAware {
+
+    private static final Logger LOG = LoggerFactory.getLogger(ObjectLayoutMetadataFacetFactory.class);
+
+    public ObjectLayoutMetadataFacetFactory() {
+        super(FeatureType.OBJECTS_ONLY);
+    }
+
+    @Override
+    public void process(final ProcessClassContext processClassContext) {
+        final Class<?> cls = processClassContext.getCls();
+        final FacetHolder facetHolder = processClassContext.getFacetHolder();
+
+        final ObjectLayoutMetadataService objectLayoutMetadataService = servicesInjector.lookupService(ObjectLayoutMetadataService.class);
+        FacetUtil.addFacet(
+                ObjectLayoutMetadataFacetDefault.create(facetHolder, readMetadata(cls), objectLayoutMetadataService));
+    }
+
+    private ObjectLayoutMetadata readMetadata(final Class<?> domainClass) {
+        final ObjectLayoutMetadataService objectLayoutMetadataService = servicesInjector.lookupService(ObjectLayoutMetadataService.class);
+        return objectLayoutMetadataService.fromXml(domainClass);
+    }
+
+    private ServicesInjector servicesInjector;
+
+    @Override
+    public void setServicesInjector(final ServicesInjector servicesInjector) {
+        this.servicesInjector = servicesInjector;
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/isis/blob/c998c76d/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/object/layoutxml/LayoutXmlFacetFactory.java
----------------------------------------------------------------------
diff --git a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/object/layoutxml/LayoutXmlFacetFactory.java b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/object/layoutxml/LayoutXmlFacetFactory.java
deleted file mode 100644
index f898f61..0000000
--- a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/object/layoutxml/LayoutXmlFacetFactory.java
+++ /dev/null
@@ -1,61 +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.facets.object.layoutxml;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import org.apache.isis.applib.layout.v1_0.ObjectLayoutMetadata;
-import org.apache.isis.applib.services.layout.ObjectLayoutMetadataService;
-import org.apache.isis.core.metamodel.facetapi.FacetHolder;
-import org.apache.isis.core.metamodel.facetapi.FacetUtil;
-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;
-
-public class LayoutXmlFacetFactory extends FacetFactoryAbstract implements ServicesInjectorAware {
-
-    private static final Logger LOG = LoggerFactory.getLogger(LayoutXmlFacetFactory.class);
-
-    public LayoutXmlFacetFactory() {
-        super(FeatureType.OBJECTS_ONLY);
-    }
-
-    @Override
-    public void process(final ProcessClassContext processClassContext) {
-        final Class<?> cls = processClassContext.getCls();
-        final FacetHolder facetHolder = processClassContext.getFacetHolder();
-
-        final ObjectLayoutMetadataService objectLayoutMetadataService = servicesInjector.lookupService(ObjectLayoutMetadataService.class);
-        FacetUtil.addFacet(
-                ObjectLayoutMetadataFacetDefault.create(facetHolder, readMetadata(cls), objectLayoutMetadataService));
-    }
-
-    private ObjectLayoutMetadata readMetadata(final Class<?> domainClass) {
-        final ObjectLayoutMetadataService objectLayoutMetadataService = servicesInjector.lookupService(ObjectLayoutMetadataService.class);
-        return objectLayoutMetadataService.fromXml(domainClass);
-    }
-
-    private ServicesInjector servicesInjector;
-
-    @Override
-    public void setServicesInjector(final ServicesInjector servicesInjector) {
-        this.servicesInjector = servicesInjector;
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/isis/blob/c998c76d/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/object/layoutxml/ObjectLayoutMetadataFacet.java
----------------------------------------------------------------------
diff --git a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/object/layoutxml/ObjectLayoutMetadataFacet.java b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/object/layoutxml/ObjectLayoutMetadataFacet.java
deleted file mode 100644
index 7285fc0..0000000
--- a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/object/layoutxml/ObjectLayoutMetadataFacet.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.core.metamodel.facets.object.layoutxml;
-
-
-import org.apache.isis.core.metamodel.facetapi.Facet;
-import org.apache.isis.applib.layout.v1_0.ObjectLayoutMetadata;
-
-/**
- * Corresponds to providing a <code>.layout.xml</code> file for the domain object's class.
- */
-public interface ObjectLayoutMetadataFacet extends Facet {
-
-    /**
-     * Will have been {@link org.apache.isis.applib.services.layout.ObjectLayoutMetadataService#normalize(ObjectLayoutMetadata, Class) normalized}.
-     */
-    ObjectLayoutMetadata getMetadata();
-
-}

http://git-wip-us.apache.org/repos/asf/isis/blob/c998c76d/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/object/layoutxml/ObjectLayoutMetadataFacetDefault.java
----------------------------------------------------------------------
diff --git a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/object/layoutxml/ObjectLayoutMetadataFacetDefault.java b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/object/layoutxml/ObjectLayoutMetadataFacetDefault.java
deleted file mode 100644
index 05d3cc8..0000000
--- a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/object/layoutxml/ObjectLayoutMetadataFacetDefault.java
+++ /dev/null
@@ -1,65 +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.facets.object.layoutxml;
-
-import org.apache.isis.applib.layout.v1_0.ObjectLayoutMetadata;
-import org.apache.isis.applib.services.layout.ObjectLayoutMetadataService;
-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.spec.ObjectSpecification;
-
-public class ObjectLayoutMetadataFacetDefault
-            extends FacetAbstract
-            implements ObjectLayoutMetadataFacet {
-
-    private final ObjectLayoutMetadata metadata;
-    private final ObjectLayoutMetadataService objectLayoutMetadataService;
-
-    public static Class<? extends Facet> type() {
-        return ObjectLayoutMetadataFacet.class;
-    }
-
-
-    public static ObjectLayoutMetadataFacet create(
-            final FacetHolder facetHolder,
-            final ObjectLayoutMetadata objectLayoutMetadata,
-            final ObjectLayoutMetadataService objectLayoutMetadataService) {
-        if(objectLayoutMetadata == null) {
-            return null;
-        }
-        return new ObjectLayoutMetadataFacetDefault(facetHolder, objectLayoutMetadata, objectLayoutMetadataService);
-    }
-
-    private ObjectLayoutMetadataFacetDefault(
-            final FacetHolder facetHolder,
-            final ObjectLayoutMetadata metadata,
-            final ObjectLayoutMetadataService objectLayoutMetadataService) {
-        super(ObjectLayoutMetadataFacetDefault.type(), facetHolder, Derivation.NOT_DERIVED);
-        this.metadata = metadata;
-        this.objectLayoutMetadataService = objectLayoutMetadataService;
-    }
-
-
-    public ObjectLayoutMetadata getMetadata() {
-        final ObjectSpecification objectSpecification = (ObjectSpecification) getFacetHolder();
-        return objectLayoutMetadataService.normalize(metadata, objectSpecification.getCorrespondingClass());
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/isis/blob/c998c76d/core/metamodel/src/main/java/org/apache/isis/core/metamodel/services/layout/ObjectLayoutMetadataServiceDefault.java
----------------------------------------------------------------------
diff --git a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/services/layout/ObjectLayoutMetadataServiceDefault.java b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/services/layout/ObjectLayoutMetadataServiceDefault.java
index c9daf91..294531a 100644
--- a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/services/layout/ObjectLayoutMetadataServiceDefault.java
+++ b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/services/layout/ObjectLayoutMetadataServiceDefault.java
@@ -68,6 +68,7 @@ import org.apache.isis.core.metamodel.facets.collections.layout.NamedFacetForCol
 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.members.order.annotprop.MemberOrderFacetXml;
+import org.apache.isis.core.metamodel.facets.object.layoutmetadata.ObjectLayoutMetadataFacet;
 import org.apache.isis.core.metamodel.facets.object.membergroups.MemberGroupLayoutFacet;
 import org.apache.isis.core.metamodel.facets.properties.propertylayout.CssClassFacetForPropertyXml;
 import org.apache.isis.core.metamodel.facets.properties.propertylayout.DescribedAsFacetForPropertyXml;
@@ -436,10 +437,18 @@ public class ObjectLayoutMetadataServiceDefault
 
 
     @Override
-    public String toXml(final ObjectLayoutMetadata objectLayoutMetadata) {
-        return jaxbService.toXml(objectLayoutMetadata);
+    public ObjectLayoutMetadata toMetadata(final Object domainObject) {
+        return toMetadata(domainObject.getClass());
     }
 
+    @Override
+    public ObjectLayoutMetadata toMetadata(final Class<?> domainClass) {
+        final ObjectSpecification objectSpec = specificationLookup.loadSpecification(domainClass);
+        final ObjectLayoutMetadataFacet facet = objectSpec.getFacet(ObjectLayoutMetadataFacet.class);
+        return facet != null? facet.getMetadata(): null;
+    }
+
+
 
     //region > injected dependencies
     private DeploymentCategory deploymentCategory;

http://git-wip-us.apache.org/repos/asf/isis/blob/c998c76d/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
new file mode 100644
index 0000000..fadfae2
--- /dev/null
+++ b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/services/metamodel/MetadataMenu.java
@@ -0,0 +1,150 @@
+/**
+ *  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.metamodel;
+
+import java.io.ByteArrayOutputStream;
+import java.io.File;
+import java.io.IOException;
+import java.io.OutputStreamWriter;
+import java.util.Collection;
+import java.util.zip.ZipEntry;
+import java.util.zip.ZipOutputStream;
+
+import javax.activation.MimeType;
+import javax.activation.MimeTypeParseException;
+import javax.inject.Inject;
+
+import com.google.common.base.Predicate;
+import com.google.common.collect.Collections2;
+
+import org.apache.isis.applib.FatalException;
+import org.apache.isis.applib.IsisApplibModule;
+import org.apache.isis.applib.annotation.Action;
+import org.apache.isis.applib.annotation.ActionLayout;
+import org.apache.isis.applib.annotation.DomainService;
+import org.apache.isis.applib.annotation.DomainServiceLayout;
+import org.apache.isis.applib.annotation.MemberOrder;
+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.v1_0.ObjectLayoutMetadata;
+import org.apache.isis.applib.services.jaxb.JaxbService;
+import org.apache.isis.applib.services.layout.ObjectLayoutMetadataService;
+import org.apache.isis.applib.value.Blob;
+import org.apache.isis.core.metamodel.spec.ObjectSpecification;
+import org.apache.isis.core.metamodel.spec.SpecificationLoaderSpi;
+import org.apache.isis.core.metamodel.spec.SpecificationLoaderSpiAware;
+
+@DomainService(
+        nature = NatureOfService.VIEW_MENU_ONLY
+)
+@DomainServiceLayout(
+        named = "Prototyping",
+        menuBar = DomainServiceLayout.MenuBar.SECONDARY,
+        menuOrder = "500.400"
+)
+public class MetadataMenu implements SpecificationLoaderSpiAware {
+
+    public static abstract class ActionDomainEvent extends IsisApplibModule.ActionDomainEvent<MetadataMenu> {
+    }
+
+    // //////////////////////////////////////
+
+
+    private final MimeType mimeTypeApplicationZip;
+
+    public MetadataMenu() {
+        try {
+            mimeTypeApplicationZip = new MimeType("application", "zip");
+        } catch (final MimeTypeParseException ex) {
+            throw new RuntimeException(ex);
+        }
+    }
+
+
+    // //////////////////////////////////////
+
+    public static class DownloadLayoutsDomainEvent extends ActionDomainEvent {
+    }
+
+    @Action(
+            domainEvent = DownloadLayoutsDomainEvent.class,
+            semantics = SemanticsOf.SAFE,
+            restrictTo = RestrictTo.PROTOTYPING
+    )
+    @ActionLayout(
+            cssClassFa = "fa-download"
+    )
+    @MemberOrder(sequence="500.400.1")
+    public Blob downloadLayouts() {
+        final Collection<ObjectSpecification> allSpecs = specificationLoader.allSpecifications();
+        final Collection<ObjectSpecification> domainObjectSpecs = Collections2
+                .filter(allSpecs, new Predicate<ObjectSpecification>(){
+                    @Override
+                    public boolean apply(final ObjectSpecification input) {
+                        return  !input.isAbstract() &&
+                                !input.isService() &&
+                                !input.isValue() &&
+                                !input.isParentedOrFreeCollection();
+                    }});
+        try {
+            final ByteArrayOutputStream baos = new ByteArrayOutputStream();
+            final ZipOutputStream zos = new ZipOutputStream(baos);
+            final OutputStreamWriter writer = new OutputStreamWriter(zos);
+            for (final ObjectSpecification objectSpec : domainObjectSpecs) {
+                final Class<?> domainClass = objectSpec.getCorrespondingClass();
+                final ObjectLayoutMetadata metadata = objectLayoutMetadataService.toMetadata(domainClass);
+                if(metadata != null) {
+                    zos.putNextEntry(new ZipEntry(zipEntryNameFor(objectSpec)));
+                    String xml = jaxbService.toXml(metadata);
+                    writer.write(xml);
+                    writer.flush();
+                    zos.closeEntry();
+                }
+            }
+            writer.close();
+            return new Blob("layouts.zip", mimeTypeApplicationZip, baos.toByteArray());
+        } catch (final IOException ex) {
+            throw new FatalException("Unable to create zip of layouts", ex);
+        }
+    }
+
+    private static String zipEntryNameFor(final ObjectSpecification objectSpec) {
+        final String fqn = objectSpec.getFullIdentifier();
+        return fqn.replace(".", File.separator)+".layout.xml";
+    }
+
+
+    // //////////////////////////////////////
+
+    @Inject
+    ObjectLayoutMetadataService objectLayoutMetadataService;
+
+    @Inject
+    JaxbService jaxbService;
+
+    private SpecificationLoaderSpi specificationLoader;
+
+    @Programmatic
+    @Override
+    public void setSpecificationLoaderSpi(final SpecificationLoaderSpi specificationLoader) {
+        this.specificationLoader = specificationLoader;
+    }
+
+
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/isis/blob/c998c76d/core/metamodel/src/main/java/org/apache/isis/core/metamodel/services/metamodel/Util.java
----------------------------------------------------------------------
diff --git a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/services/metamodel/Util.java b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/services/metamodel/Util.java
new file mode 100644
index 0000000..810de04
--- /dev/null
+++ b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/services/metamodel/Util.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.core.metamodel.services.metamodel;
+
+class Util {
+
+    private Util(){}
+
+    static String withSuffix(String fileName, String suffix) {
+        if(!suffix.startsWith(".")) {
+            suffix = "." + suffix;
+        }
+        if(!fileName.endsWith(suffix)) {
+            fileName += suffix;
+        }
+        return fileName;
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/isis/blob/c998c76d/core/metamodel/src/main/java/org/apache/isis/progmodels/dflt/ProgrammingModelFacetsJava5.java
----------------------------------------------------------------------
diff --git a/core/metamodel/src/main/java/org/apache/isis/progmodels/dflt/ProgrammingModelFacetsJava5.java b/core/metamodel/src/main/java/org/apache/isis/progmodels/dflt/ProgrammingModelFacetsJava5.java
index 9fc19be..b17cebe 100644
--- a/core/metamodel/src/main/java/org/apache/isis/progmodels/dflt/ProgrammingModelFacetsJava5.java
+++ b/core/metamodel/src/main/java/org/apache/isis/progmodels/dflt/ProgrammingModelFacetsJava5.java
@@ -108,7 +108,7 @@ import org.apache.isis.core.metamodel.facets.object.ignore.jdo.RemoveJdoEnhancem
 import org.apache.isis.core.metamodel.facets.object.ignore.jdo.RemoveJdoPrefixedMethodsFacetFactory;
 import org.apache.isis.core.metamodel.facets.object.immutable.immutableannot.CopyImmutableFacetOntoMembersFactory;
 import org.apache.isis.core.metamodel.facets.object.immutable.immutablemarkerifc.ImmutableFacetMarkerInterfaceFactory;
-import org.apache.isis.core.metamodel.facets.object.layoutxml.LayoutXmlFacetFactory;
+import org.apache.isis.core.metamodel.facets.object.layoutmetadata.ObjectLayoutMetadataFacetFactory;
 import org.apache.isis.core.metamodel.facets.object.mask.annotation.MaskFacetOnTypeAnnotationFactory;
 import org.apache.isis.core.metamodel.facets.object.maxlen.annotation.MaxLengthFacetOnTypeAnnotationFactory;
 import org.apache.isis.core.metamodel.facets.object.membergroups.annotprop.MemberGroupLayoutFacetFactory;
@@ -391,7 +391,7 @@ public final class ProgrammingModelFacetsJava5 extends ProgrammingModelAbstract
         // must come after DomainObjectAnnotationFacetFactory & MixinFacetFactory
         addFactory(NotContributedFacetDerivedFromMixinFacetFactory.class);
 
-        addFactory(LayoutXmlFacetFactory.class);
+        addFactory(ObjectLayoutMetadataFacetFactory.class);
 
         addFactory(DomainServiceLayoutFacetFactory.class);
         addFactory(DomainObjectLayoutFacetFactory.class);

http://git-wip-us.apache.org/repos/asf/isis/blob/c998c76d/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/combined/EntityCombinedPanelFactory.java
----------------------------------------------------------------------
diff --git a/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/combined/EntityCombinedPanelFactory.java b/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/combined/EntityCombinedPanelFactory.java
index 1602ff0..32c0900 100644
--- a/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/combined/EntityCombinedPanelFactory.java
+++ b/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/combined/EntityCombinedPanelFactory.java
@@ -22,7 +22,7 @@ package org.apache.isis.viewer.wicket.ui.components.entity.combined;
 import org.apache.wicket.Component;
 import org.apache.wicket.model.IModel;
 
-import org.apache.isis.core.metamodel.facets.object.layoutxml.ObjectLayoutMetadataFacet;
+import org.apache.isis.core.metamodel.facets.object.layoutmetadata.ObjectLayoutMetadataFacet;
 import org.apache.isis.core.metamodel.spec.ObjectSpecification;
 import org.apache.isis.viewer.wicket.model.models.EntityModel;
 import org.apache.isis.viewer.wicket.ui.ComponentFactory;

http://git-wip-us.apache.org/repos/asf/isis/blob/c998c76d/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/tabgroups/EntityTabGroupsPanel.java
----------------------------------------------------------------------
diff --git a/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/tabgroups/EntityTabGroupsPanel.java b/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/tabgroups/EntityTabGroupsPanel.java
index cce3292..6f49a68 100644
--- a/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/tabgroups/EntityTabGroupsPanel.java
+++ b/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/tabgroups/EntityTabGroupsPanel.java
@@ -37,7 +37,7 @@ import org.apache.isis.applib.layout.v1_0.TabGroup;
 import org.apache.isis.applib.services.jaxb.JaxbService;
 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.layoutxml.ObjectLayoutMetadataFacet;
+import org.apache.isis.core.metamodel.facets.object.layoutmetadata.ObjectLayoutMetadataFacet;
 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;

http://git-wip-us.apache.org/repos/asf/isis/blob/c998c76d/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/tabgroups/EntityTabGroupsPanelFactory.java
----------------------------------------------------------------------
diff --git a/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/tabgroups/EntityTabGroupsPanelFactory.java b/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/tabgroups/EntityTabGroupsPanelFactory.java
index 05e3b68..4171d89 100644
--- a/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/tabgroups/EntityTabGroupsPanelFactory.java
+++ b/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/tabgroups/EntityTabGroupsPanelFactory.java
@@ -22,7 +22,7 @@ package org.apache.isis.viewer.wicket.ui.components.entity.tabgroups;
 import org.apache.wicket.Component;
 import org.apache.wicket.model.IModel;
 
-import org.apache.isis.core.metamodel.facets.object.layoutxml.ObjectLayoutMetadataFacet;
+import org.apache.isis.core.metamodel.facets.object.layoutmetadata.ObjectLayoutMetadataFacet;
 import org.apache.isis.core.metamodel.spec.ObjectSpecification;
 import org.apache.isis.viewer.wicket.model.models.EntityModel;
 import org.apache.isis.viewer.wicket.ui.ComponentFactory;

http://git-wip-us.apache.org/repos/asf/isis/blob/c998c76d/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 8d69476..a50bdcf 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
@@ -16,24 +16,23 @@
             </left>
             <middle span="4">
             </middle>
-            <right span="4">
-                <propertyGroup name="Metadata">
+        </tab>
+        <tab name="Metadata">
+            <left span="4">
+                <propertyGroup name="Persistence">
                     <actions>
                         <action id="downloadJdoMetadata"/>
+                        <action id="downloadLayoutXml"/>
                     </actions>
                     <property id="versionSequence"/>
                 </propertyGroup>
-            </right>
-        </tab>
-        <tab name="Other">
-            <left span="4">
             </left>
         </tab>
     </tabGroup>
     <tabGroup>
         <tab name="Similar To">
             <left span="12">
-                <collection id="similarTox"/>
+                <collection id="similarTo"/>
             </left>
         </tab>
     </tabGroup>


[19/50] [abbrv] isis git commit: ISIS-1298: change @Hidden to @Programmatic for ViewModel.Cloneable#clone() method

Posted by da...@apache.org.
ISIS-1298: change @Hidden to @Programmatic for ViewModel.Cloneable#clone() method


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

Branch: refs/heads/ISIS-993
Commit: 3fc1eb219e6c2878ca5c6e6def7754054e723d3f
Parents: c229efe
Author: Dan Haywood <da...@haywood-associates.co.uk>
Authored: Sun Jan 24 13:13:04 2016 +0000
Committer: Dan Haywood <da...@haywood-associates.co.uk>
Committed: Sun Jan 24 13:13:04 2016 +0000

----------------------------------------------------------------------
 core/applib/src/main/java/org/apache/isis/applib/ViewModel.java | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/isis/blob/3fc1eb21/core/applib/src/main/java/org/apache/isis/applib/ViewModel.java
----------------------------------------------------------------------
diff --git a/core/applib/src/main/java/org/apache/isis/applib/ViewModel.java b/core/applib/src/main/java/org/apache/isis/applib/ViewModel.java
index c25fcbd..a61ff1e 100644
--- a/core/applib/src/main/java/org/apache/isis/applib/ViewModel.java
+++ b/core/applib/src/main/java/org/apache/isis/applib/ViewModel.java
@@ -19,10 +19,8 @@
 
 package org.apache.isis.applib;
 
-import org.apache.isis.applib.annotation.Hidden;
 import org.apache.isis.applib.annotation.Programmatic;
 
-
 /**
  * Indicates that an object belongs to the UI/application layer, and is intended to be used as a view model.
  *
@@ -57,7 +55,7 @@ public interface ViewModel {
      * view model whose state has been edited.
      */
     public interface Cloneable extends java.lang.Cloneable {
-        @Hidden
+        @Programmatic
         public Object clone();
     }
 }


[05/50] [abbrv] isis git commit: ISIS-1296: adding/updating similar IntelliJ launch configs

Posted by da...@apache.org.
ISIS-1296: adding/updating similar IntelliJ launch configs


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

Branch: refs/heads/ISIS-993
Commit: 89bd3fd577466d759ba72d13f2bd0f6c88d15d03
Parents: 0915e03
Author: Dan Haywood <da...@haywood-associates.co.uk>
Authored: Sun Jan 10 15:12:04 2016 +0000
Committer: Dan Haywood <da...@haywood-associates.co.uk>
Committed: Sun Jan 10 15:12:04 2016 +0000

----------------------------------------------------------------------
 ...OTOTYPE-with-fixtures-bypass-security.launch |  2 +-
 .../SimpleApp-PROTOTYPE-with-fixtures.launch    |  2 +-
 .../eclipse/launch/SimpleApp-PROTOTYPE.launch   |  2 +-
 .../ide/eclipse/launch/SimpleApp-SERVER.launch  |  2 +-
 ..._PROTOTYPE_with_fixtures-bypass-security.xml | 28 ++++++++++++++++++++
 .../SimpleApp_PROTOTYPE_with_fixtures.xml       | 28 ++++++++++++++++++++
 .../ide/intellij/launch/SimpleApp_SERVER.xml    | 28 ++++++++++++++++++++
 .../launch/SimpleApp__enhance_only_.xml         |  2 +-
 8 files changed, 89 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/isis/blob/89bd3fd5/example/application/simpleapp/webapp/ide/eclipse/launch/SimpleApp-PROTOTYPE-with-fixtures-bypass-security.launch
----------------------------------------------------------------------
diff --git a/example/application/simpleapp/webapp/ide/eclipse/launch/SimpleApp-PROTOTYPE-with-fixtures-bypass-security.launch b/example/application/simpleapp/webapp/ide/eclipse/launch/SimpleApp-PROTOTYPE-with-fixtures-bypass-security.launch
index 16e483a..91b8abb 100644
--- a/example/application/simpleapp/webapp/ide/eclipse/launch/SimpleApp-PROTOTYPE-with-fixtures-bypass-security.launch
+++ b/example/application/simpleapp/webapp/ide/eclipse/launch/SimpleApp-PROTOTYPE-with-fixtures-bypass-security.launch
@@ -14,7 +14,7 @@
 <booleanAttribute key="org.eclipse.jdt.debug.ui.INCLUDE_EXTERNAL_JARS" value="true"/>
 <stringAttribute key="org.eclipse.jdt.launching.CLASSPATH_PROVIDER" value="org.eclipse.m2e.launchconfig.classpathProvider"/>
 <stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="org.apache.isis.WebServer"/>
-<stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="--type SERVER_PROTOTYPE --manifest domainapp.app.DomainAppAppManifestWithFixturesBypassSecurity"/>
+<stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="--type SERVER_PROTOTYPE --port 8080 --manifest domainapp.app.DomainAppAppManifestWithFixturesBypassSecurity"/>
 <stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="simpleapp-webapp"/>
 <stringAttribute key="org.eclipse.jdt.launching.SOURCE_PATH_PROVIDER" value="org.eclipse.m2e.launchconfig.sourcepathProvider"/>
 </launchConfiguration>

http://git-wip-us.apache.org/repos/asf/isis/blob/89bd3fd5/example/application/simpleapp/webapp/ide/eclipse/launch/SimpleApp-PROTOTYPE-with-fixtures.launch
----------------------------------------------------------------------
diff --git a/example/application/simpleapp/webapp/ide/eclipse/launch/SimpleApp-PROTOTYPE-with-fixtures.launch b/example/application/simpleapp/webapp/ide/eclipse/launch/SimpleApp-PROTOTYPE-with-fixtures.launch
index 659195c..a20d0ea 100644
--- a/example/application/simpleapp/webapp/ide/eclipse/launch/SimpleApp-PROTOTYPE-with-fixtures.launch
+++ b/example/application/simpleapp/webapp/ide/eclipse/launch/SimpleApp-PROTOTYPE-with-fixtures.launch
@@ -14,7 +14,7 @@
 <booleanAttribute key="org.eclipse.jdt.debug.ui.INCLUDE_EXTERNAL_JARS" value="true"/>
 <stringAttribute key="org.eclipse.jdt.launching.CLASSPATH_PROVIDER" value="org.eclipse.m2e.launchconfig.classpathProvider"/>
 <stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="org.apache.isis.WebServer"/>
-<stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="--type SERVER_PROTOTYPE --manifest domainapp.app.DomainAppAppManifestWithFixtures"/>
+<stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="--type SERVER_PROTOTYPE --port 8080 --manifest domainapp.app.DomainAppAppManifestWithFixtures"/>
 <stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="simpleapp-webapp"/>
 <stringAttribute key="org.eclipse.jdt.launching.SOURCE_PATH_PROVIDER" value="org.eclipse.m2e.launchconfig.sourcepathProvider"/>
 </launchConfiguration>

http://git-wip-us.apache.org/repos/asf/isis/blob/89bd3fd5/example/application/simpleapp/webapp/ide/eclipse/launch/SimpleApp-PROTOTYPE.launch
----------------------------------------------------------------------
diff --git a/example/application/simpleapp/webapp/ide/eclipse/launch/SimpleApp-PROTOTYPE.launch b/example/application/simpleapp/webapp/ide/eclipse/launch/SimpleApp-PROTOTYPE.launch
index 7e1303a..918c5f1 100644
--- a/example/application/simpleapp/webapp/ide/eclipse/launch/SimpleApp-PROTOTYPE.launch
+++ b/example/application/simpleapp/webapp/ide/eclipse/launch/SimpleApp-PROTOTYPE.launch
@@ -14,7 +14,7 @@
 <booleanAttribute key="org.eclipse.jdt.debug.ui.INCLUDE_EXTERNAL_JARS" value="true"/>
 <stringAttribute key="org.eclipse.jdt.launching.CLASSPATH_PROVIDER" value="org.eclipse.m2e.launchconfig.classpathProvider"/>
 <stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="org.apache.isis.WebServer"/>
-<stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="--type SERVER_PROTOTYPE"/>
+<stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="--type SERVER_PROTOTYPE --port 8080"/>
 <stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="simpleapp-webapp"/>
 <stringAttribute key="org.eclipse.jdt.launching.SOURCE_PATH_PROVIDER" value="org.eclipse.m2e.launchconfig.sourcepathProvider"/>
 </launchConfiguration>

http://git-wip-us.apache.org/repos/asf/isis/blob/89bd3fd5/example/application/simpleapp/webapp/ide/eclipse/launch/SimpleApp-SERVER.launch
----------------------------------------------------------------------
diff --git a/example/application/simpleapp/webapp/ide/eclipse/launch/SimpleApp-SERVER.launch b/example/application/simpleapp/webapp/ide/eclipse/launch/SimpleApp-SERVER.launch
index deccfe8..a1c0e67 100644
--- a/example/application/simpleapp/webapp/ide/eclipse/launch/SimpleApp-SERVER.launch
+++ b/example/application/simpleapp/webapp/ide/eclipse/launch/SimpleApp-SERVER.launch
@@ -14,7 +14,7 @@
 <booleanAttribute key="org.eclipse.jdt.debug.ui.INCLUDE_EXTERNAL_JARS" value="true"/>
 <stringAttribute key="org.eclipse.jdt.launching.CLASSPATH_PROVIDER" value="org.eclipse.m2e.launchconfig.classpathProvider"/>
 <stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="org.apache.isis.WebServer"/>
-<stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="--type SERVER"/>
+<stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="--type SERVER --port 8080"/>
 <stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="simpleapp-webapp"/>
 <stringAttribute key="org.eclipse.jdt.launching.SOURCE_PATH_PROVIDER" value="org.eclipse.m2e.launchconfig.sourcepathProvider"/>
 </launchConfiguration>

http://git-wip-us.apache.org/repos/asf/isis/blob/89bd3fd5/example/application/simpleapp/webapp/ide/intellij/launch/SimpleApp_PROTOTYPE_with_fixtures-bypass-security.xml
----------------------------------------------------------------------
diff --git a/example/application/simpleapp/webapp/ide/intellij/launch/SimpleApp_PROTOTYPE_with_fixtures-bypass-security.xml b/example/application/simpleapp/webapp/ide/intellij/launch/SimpleApp_PROTOTYPE_with_fixtures-bypass-security.xml
new file mode 100644
index 0000000..9344c79
--- /dev/null
+++ b/example/application/simpleapp/webapp/ide/intellij/launch/SimpleApp_PROTOTYPE_with_fixtures-bypass-security.xml
@@ -0,0 +1,28 @@
+<component name="ProjectRunConfigurationManager">
+  <configuration default="false" name="SimpleApp-PROTOTYPE (domainapp.app.DomainAppAppManifestWithFixturesBypassSecurity)" type="Application" factoryName="Application" singleton="true">
+    <extension name="coverage" enabled="false" merge="false" sample_coverage="true" runner="idea" />
+    <option name="MAIN_CLASS_NAME" value="org.apache.isis.WebServer" />
+    <option name="VM_PARAMETERS" value="" />
+    <option name="PROGRAM_PARAMETERS" value="--type SERVER_PROTOTYPE --port 8080 --manifest domainapp.app.DomainAppAppManifestWithFixturesBypassSecurity" />
+    <option name="WORKING_DIRECTORY" value="file://$MODULE_DIR$" />
+    <option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" />
+    <option name="ALTERNATIVE_JRE_PATH" value="" />
+    <option name="ENABLE_SWING_INSPECTOR" value="false" />
+    <option name="ENV_VARIABLES" />
+    <option name="PASS_PARENT_ENVS" value="true" />
+    <module name="simpleapp-webapp" />
+    <envs />
+    <RunnerSettings RunnerId="Debug">
+      <option name="DEBUG_PORT" value="" />
+      <option name="TRANSPORT" value="0" />
+      <option name="LOCAL" value="true" />
+    </RunnerSettings>
+    <RunnerSettings RunnerId="Run" />
+    <ConfigurationWrapper RunnerId="Debug" />
+    <ConfigurationWrapper RunnerId="Run" />
+    <method>
+      <option name="Make" enabled="false" />
+      <option name="Maven.BeforeRunTask" enabled="true" file="C:/Apache/Isis/example/application/simpleapp/dom/pom.xml" goal="datanucleus:enhance -o" />
+    </method>
+  </configuration>
+</component>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/isis/blob/89bd3fd5/example/application/simpleapp/webapp/ide/intellij/launch/SimpleApp_PROTOTYPE_with_fixtures.xml
----------------------------------------------------------------------
diff --git a/example/application/simpleapp/webapp/ide/intellij/launch/SimpleApp_PROTOTYPE_with_fixtures.xml b/example/application/simpleapp/webapp/ide/intellij/launch/SimpleApp_PROTOTYPE_with_fixtures.xml
new file mode 100644
index 0000000..c813235
--- /dev/null
+++ b/example/application/simpleapp/webapp/ide/intellij/launch/SimpleApp_PROTOTYPE_with_fixtures.xml
@@ -0,0 +1,28 @@
+<component name="ProjectRunConfigurationManager">
+  <configuration default="false" name="SimpleApp-PROTOTYPE (domainapp.app.DomainAppAppManifestWithFixtures)" type="Application" factoryName="Application" singleton="true">
+    <extension name="coverage" enabled="false" merge="false" sample_coverage="true" runner="idea" />
+    <option name="MAIN_CLASS_NAME" value="org.apache.isis.WebServer" />
+    <option name="VM_PARAMETERS" value="" />
+    <option name="PROGRAM_PARAMETERS" value="--type SERVER_PROTOTYPE --port 8080 --manifest domainapp.app.DomainAppAppManifestWithFixtures" />
+    <option name="WORKING_DIRECTORY" value="file://$MODULE_DIR$" />
+    <option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" />
+    <option name="ALTERNATIVE_JRE_PATH" value="" />
+    <option name="ENABLE_SWING_INSPECTOR" value="false" />
+    <option name="ENV_VARIABLES" />
+    <option name="PASS_PARENT_ENVS" value="true" />
+    <module name="simpleapp-webapp" />
+    <envs />
+    <RunnerSettings RunnerId="Debug">
+      <option name="DEBUG_PORT" value="" />
+      <option name="TRANSPORT" value="0" />
+      <option name="LOCAL" value="true" />
+    </RunnerSettings>
+    <RunnerSettings RunnerId="Run" />
+    <ConfigurationWrapper RunnerId="Debug" />
+    <ConfigurationWrapper RunnerId="Run" />
+    <method>
+      <option name="Make" enabled="false" />
+      <option name="Maven.BeforeRunTask" enabled="true" file="C:/Apache/Isis/example/application/simpleapp/dom/pom.xml" goal="datanucleus:enhance -o" />
+    </method>
+  </configuration>
+</component>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/isis/blob/89bd3fd5/example/application/simpleapp/webapp/ide/intellij/launch/SimpleApp_SERVER.xml
----------------------------------------------------------------------
diff --git a/example/application/simpleapp/webapp/ide/intellij/launch/SimpleApp_SERVER.xml b/example/application/simpleapp/webapp/ide/intellij/launch/SimpleApp_SERVER.xml
new file mode 100644
index 0000000..a438f54
--- /dev/null
+++ b/example/application/simpleapp/webapp/ide/intellij/launch/SimpleApp_SERVER.xml
@@ -0,0 +1,28 @@
+<component name="ProjectRunConfigurationManager">
+  <configuration default="false" name="SimpleApp-SERVER" type="Application" factoryName="Application" singleton="true">
+    <extension name="coverage" enabled="false" merge="false" sample_coverage="true" runner="idea" />
+    <option name="MAIN_CLASS_NAME" value="org.apache.isis.WebServer" />
+    <option name="VM_PARAMETERS" value="" />
+    <option name="PROGRAM_PARAMETERS" value="--type SERVER --port 8080" />
+    <option name="WORKING_DIRECTORY" value="file://$MODULE_DIR$" />
+    <option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" />
+    <option name="ALTERNATIVE_JRE_PATH" value="" />
+    <option name="ENABLE_SWING_INSPECTOR" value="false" />
+    <option name="ENV_VARIABLES" />
+    <option name="PASS_PARENT_ENVS" value="true" />
+    <module name="simpleapp-webapp" />
+    <envs />
+    <RunnerSettings RunnerId="Debug">
+      <option name="DEBUG_PORT" value="" />
+      <option name="TRANSPORT" value="0" />
+      <option name="LOCAL" value="true" />
+    </RunnerSettings>
+    <RunnerSettings RunnerId="Run" />
+    <ConfigurationWrapper RunnerId="Debug" />
+    <ConfigurationWrapper RunnerId="Run" />
+    <method>
+      <option name="Make" enabled="false" />
+      <option name="Maven.BeforeRunTask" enabled="true" file="C:/Apache/Isis/example/application/simpleapp/dom/pom.xml" goal="datanucleus:enhance -o" />
+    </method>
+  </configuration>
+</component>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/isis/blob/89bd3fd5/example/application/simpleapp/webapp/ide/intellij/launch/SimpleApp__enhance_only_.xml
----------------------------------------------------------------------
diff --git a/example/application/simpleapp/webapp/ide/intellij/launch/SimpleApp__enhance_only_.xml b/example/application/simpleapp/webapp/ide/intellij/launch/SimpleApp__enhance_only_.xml
index 1a312f9..d3bfe6d 100644
--- a/example/application/simpleapp/webapp/ide/intellij/launch/SimpleApp__enhance_only_.xml
+++ b/example/application/simpleapp/webapp/ide/intellij/launch/SimpleApp__enhance_only_.xml
@@ -1,5 +1,5 @@
 <component name="ProjectRunConfigurationManager">
-s  <configuration default="false" name="SimpleApp (enhance only)" type="Application" factoryName="Application">
+  <configuration default="false" name="SimpleApp (enhance only)" type="Application" factoryName="Application">
     <extension name="coverage" enabled="false" merge="false" sample_coverage="true" runner="idea" />
     <option name="MAIN_CLASS_NAME" value="org.apache.isis.Dummy" />
     <option name="VM_PARAMETERS" value="" />


[36/50] [abbrv] isis git commit: ISIS-993: no longer show edit buttons for tabbed panel; sorted out a rendering issue of Blob/Clob when in tabbed view.

Posted by da...@apache.org.
ISIS-993: no longer show edit buttons for tabbed panel; sorted out a rendering issue of Blob/Clob when in tabbed view.


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

Branch: refs/heads/ISIS-993
Commit: 2b170467aa2be346363635be8ed884bafdc201c5
Parents: 47f4aea
Author: Dan Haywood <da...@haywood-associates.co.uk>
Authored: Tue Jan 12 21:04:15 2016 +0000
Committer: Dan Haywood <da...@haywood-associates.co.uk>
Committed: Mon Jan 25 14:38:24 2016 +0000

----------------------------------------------------------------------
 .../org/apache/isis/applib/services/jaxb/JaxbService.java     | 2 +-
 .../services/layout/ObjectLayoutMetadataServiceDefault.java   | 7 -------
 .../ui/components/entity/properties/EntityPropertiesForm.java | 5 ++---
 .../scalars/isisapplib/IsisBlobOrClobPanelAbstract.html       | 2 +-
 .../scalars/isisapplib/IsisBlobOrClobPanelAbstract.java       | 7 +++++--
 .../apache/isis/viewer/wicket/ui/pages/entity/EntityPage.java | 6 ++++++
 6 files changed, 15 insertions(+), 14 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/isis/blob/2b170467/core/applib/src/main/java/org/apache/isis/applib/services/jaxb/JaxbService.java
----------------------------------------------------------------------
diff --git a/core/applib/src/main/java/org/apache/isis/applib/services/jaxb/JaxbService.java b/core/applib/src/main/java/org/apache/isis/applib/services/jaxb/JaxbService.java
index ae0be24..450011a 100644
--- a/core/applib/src/main/java/org/apache/isis/applib/services/jaxb/JaxbService.java
+++ b/core/applib/src/main/java/org/apache/isis/applib/services/jaxb/JaxbService.java
@@ -111,7 +111,7 @@ public interface JaxbService {
                 return (T) unmarshal;
 
             } catch (final JAXBException ex) {
-                throw new NonRecoverableException("Error unmarshalling domain object from XML; domain object class is '" + domainClass.getName() + "'", ex);
+                throw new NonRecoverableException("Error unmarshalling XML to class '" + domainClass.getName() + "'", ex);
             }
         }
 

http://git-wip-us.apache.org/repos/asf/isis/blob/2b170467/core/metamodel/src/main/java/org/apache/isis/core/metamodel/services/layout/ObjectLayoutMetadataServiceDefault.java
----------------------------------------------------------------------
diff --git a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/services/layout/ObjectLayoutMetadataServiceDefault.java b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/services/layout/ObjectLayoutMetadataServiceDefault.java
index 6431486..35010c2 100644
--- a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/services/layout/ObjectLayoutMetadataServiceDefault.java
+++ b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/services/layout/ObjectLayoutMetadataServiceDefault.java
@@ -46,22 +46,15 @@ public class ObjectLayoutMetadataServiceDefault
 
     private static final Logger LOG = LoggerFactory.getLogger(ObjectLayoutMetadataServiceDefault.class);
 
-    private final Set<Class<?>> blacklisted = Sets.newConcurrentHashSet();
-
     @Programmatic
     public ObjectLayoutMetadata fromXml(Class<?> domainClass) {
 
-        if(blacklisted.contains(domainClass)) {
-            return null;
-        }
-
         final String xml;
         final String resourceName = domainClass.getSimpleName() + ".layout.xml";
         try {
             xml = resourceContentOf(domainClass, resourceName);
         } catch (IOException | IllegalArgumentException ex) {
 
-            blacklisted.add(domainClass);
             final String message = String .format(
                     "Failed to locate file %s (relative to %s.class); ex: %s)",
                     resourceName, domainClass.getName(), ex.getMessage());

http://git-wip-us.apache.org/repos/asf/isis/blob/2b170467/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/properties/EntityPropertiesForm.java
----------------------------------------------------------------------
diff --git a/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/properties/EntityPropertiesForm.java b/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/properties/EntityPropertiesForm.java
index 31c54a1..94c191c 100644
--- a/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/properties/EntityPropertiesForm.java
+++ b/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/properties/EntityPropertiesForm.java
@@ -188,11 +188,10 @@ public class EntityPropertiesForm extends FormAbstract<ObjectAdapter> implements
             addClassForSpan(rightColumn, Hint.RIGHT.from(columnSpans));
         }
 
-        // edit buttons and feedback
+        // edit buttons and feedback (not supported on tabbed view)
         final Hint leftHint = Hint.LEFT;
         final Column leftColumnMetaDataIfAny = leftHint.from(tabMetaDataIfAny);
-        final List<String> groupNames = PropUtil.propertyGroupNames(entityModel, leftHint, leftColumnMetaDataIfAny);
-        final boolean hasProperties = !groupNames.isEmpty();
+        final boolean hasProperties = leftColumnMetaDataIfAny == null && !PropUtil.propertyGroupNames(entityModel, leftHint, leftColumnMetaDataIfAny).isEmpty();
         if (hasProperties) {
             addButtons(leftColumn);
             addFeedbackGui(leftColumn);

http://git-wip-us.apache.org/repos/asf/isis/blob/2b170467/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 bd5724c..d642f93 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
@@ -33,7 +33,7 @@
                             <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"></span>
+                            <span class="fileName" wicket:id="fileName">[filename]</span><span>&nbsp;</span>
                         </span>
                         <span wicket:id="feedback" class="help-block"></span>
                         <span wicket:id="associatedActionLinksBelow"></span>

http://git-wip-us.apache.org/repos/asf/isis/blob/2b170467/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/scalars/isisapplib/IsisBlobOrClobPanelAbstract.java
----------------------------------------------------------------------
diff --git a/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/scalars/isisapplib/IsisBlobOrClobPanelAbstract.java b/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/scalars/isisapplib/IsisBlobOrClobPanelAbstract.java
index 5f6ad62..3b21b46 100644
--- a/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/scalars/isisapplib/IsisBlobOrClobPanelAbstract.java
+++ b/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/scalars/isisapplib/IsisBlobOrClobPanelAbstract.java
@@ -18,14 +18,14 @@
  */
 package org.apache.isis.viewer.wicket.ui.components.scalars.isisapplib;
 
-import de.agilecoders.wicket.extensions.markup.html.bootstrap.form.fileinput.BootstrapFileInputField;
-
 import java.awt.image.BufferedImage;
 import java.io.ByteArrayInputStream;
 import java.io.IOException;
 import java.util.List;
+
 import javax.activation.MimeType;
 import javax.imageio.ImageIO;
+
 import org.apache.wicket.Component;
 import org.apache.wicket.MarkupContainer;
 import org.apache.wicket.ajax.AjaxRequestTarget;
@@ -45,6 +45,7 @@ import org.apache.wicket.model.Model;
 import org.apache.wicket.request.resource.IResource;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
+
 import org.apache.isis.applib.value.Blob;
 import org.apache.isis.applib.value.NamedWithMimeType;
 import org.apache.isis.core.commons.lang.CloseableExtensions;
@@ -56,6 +57,8 @@ import org.apache.isis.viewer.wicket.ui.components.scalars.ScalarPanelAbstract;
 import org.apache.isis.viewer.wicket.ui.components.widgets.bootstrap.FormGroup;
 import org.apache.isis.viewer.wicket.ui.util.Components;
 
+import de.agilecoders.wicket.extensions.markup.html.bootstrap.form.fileinput.BootstrapFileInputField;
+
 public abstract class IsisBlobOrClobPanelAbstract<T extends NamedWithMimeType> extends ScalarPanelAbstract {
 
 

http://git-wip-us.apache.org/repos/asf/isis/blob/2b170467/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 d12a496..609be99 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,6 +143,12 @@ public class EntityPage extends PageAbstract {
             // it's sufficient to simply call reloadMetadata().
             // The facet checks the ObjectLayoutMetadataService to determine if dynamic reloading is enabled.
             facet.reloadMetadata();
+            if(facet.getMetadata() == null) {
+                // fallback to invalidating entire cache
+                if(!getDeploymentType().isProduction()) {
+                    getSpecificationLoader().invalidateCacheFor(objectAdapter.getObject());
+                }
+            }
         }
 
 


[45/50] [abbrv] isis git commit: ISIS-993: simplifying the metadata. the wicket components still broken at this point

Posted by da...@apache.org.
http://git-wip-us.apache.org/repos/asf/isis/blob/79248dc5/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/collections/layout/DescribedAsFacetForCollectionLayoutXml.java
----------------------------------------------------------------------
diff --git a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/collections/layout/DescribedAsFacetForCollectionLayoutXml.java b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/collections/layout/DescribedAsFacetForCollectionLayoutXml.java
deleted file mode 100644
index 10241a1..0000000
--- a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/collections/layout/DescribedAsFacetForCollectionLayoutXml.java
+++ /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.
- */
-
-package org.apache.isis.core.metamodel.facets.collections.layout;
-
-import com.google.common.base.Strings;
-
-import org.apache.isis.applib.layout.v1_0.CollectionLayout;
-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;
-
-public class DescribedAsFacetForCollectionLayoutXml extends DescribedAsFacetAbstract {
-
-    public static DescribedAsFacet create(CollectionLayout collectionLayout, FacetHolder holder) {
-        if(collectionLayout == null) {
-            return null;
-        }
-        final String describedAs = Strings.emptyToNull(collectionLayout.getDescribedAs());
-        return describedAs != null ? new DescribedAsFacetForCollectionLayoutXml(describedAs, holder) : null;
-    }
-
-    private DescribedAsFacetForCollectionLayoutXml(String value, FacetHolder holder) {
-        super(value, holder);
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/isis/blob/79248dc5/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
new file mode 100644
index 0000000..a159fc2
--- /dev/null
+++ b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/collections/layout/DescribedAsFacetForCollectionXml.java
@@ -0,0 +1,43 @@
+/*
+ *  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.facets.collections.layout;
+
+import com.google.common.base.Strings;
+
+import org.apache.isis.applib.layout.v1_0.Collection;
+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;
+
+public class DescribedAsFacetForCollectionXml extends DescribedAsFacetAbstract {
+
+    public static DescribedAsFacet create(Collection collectionLayout, FacetHolder holder) {
+        if(collectionLayout == null) {
+            return null;
+        }
+        final String describedAs = Strings.emptyToNull(collectionLayout.getDescribedAs());
+        return describedAs != null ? new DescribedAsFacetForCollectionXml(describedAs, holder) : null;
+    }
+
+    private DescribedAsFacetForCollectionXml(String value, FacetHolder holder) {
+        super(value, holder);
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/isis/blob/79248dc5/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/collections/layout/HiddenFacetForCollectionLayoutXml.java
----------------------------------------------------------------------
diff --git a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/collections/layout/HiddenFacetForCollectionLayoutXml.java b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/collections/layout/HiddenFacetForCollectionLayoutXml.java
deleted file mode 100644
index f362634..0000000
--- a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/collections/layout/HiddenFacetForCollectionLayoutXml.java
+++ /dev/null
@@ -1,52 +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.facets.collections.layout;
-
-import org.apache.isis.applib.annotation.When;
-import org.apache.isis.applib.annotation.Where;
-import org.apache.isis.applib.layout.v1_0.CollectionLayout;
-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;
-import org.apache.isis.core.metamodel.facets.members.hidden.HiddenFacetAbstract;
-
-public class HiddenFacetForCollectionLayoutXml extends HiddenFacetAbstract {
-
-    public static HiddenFacet create(final CollectionLayout collectionLayout, final FacetHolder holder) {
-        if (collectionLayout == null) {
-            return null;
-        }
-        final Where where = collectionLayout.getHidden();
-        return where != null && where != Where.NOT_SPECIFIED  ? new HiddenFacetForCollectionLayoutXml(where, holder) : null;
-    }
-
-    private HiddenFacetForCollectionLayoutXml(final Where where, final FacetHolder holder) {
-        super(When.ALWAYS, where, holder);
-    }
-
-    @Override
-    public String hiddenReason(final ObjectAdapter targetAdapter, final Where whereContext) {
-        if(!where().includes(whereContext)) {
-            return null;
-        }
-        return "Hidden on " + where().getFriendlyName();
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/isis/blob/79248dc5/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
new file mode 100644
index 0000000..8a52c8e
--- /dev/null
+++ b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/collections/layout/HiddenFacetForCollectionXml.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.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.v1_0.Collection;
+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;
+import org.apache.isis.core.metamodel.facets.members.hidden.HiddenFacetAbstract;
+
+public class HiddenFacetForCollectionXml extends HiddenFacetAbstract {
+
+    public static HiddenFacet create(final Collection collectionLayout, final FacetHolder holder) {
+        if (collectionLayout == null) {
+            return null;
+        }
+        final Where where = collectionLayout.getHidden();
+        return where != null && where != Where.NOT_SPECIFIED  ? new HiddenFacetForCollectionXml(where, holder) : null;
+    }
+
+    private HiddenFacetForCollectionXml(final Where where, final FacetHolder holder) {
+        super(When.ALWAYS, where, holder);
+    }
+
+    @Override
+    public String hiddenReason(final ObjectAdapter targetAdapter, final Where whereContext) {
+        if(!where().includes(whereContext)) {
+            return null;
+        }
+        return "Hidden on " + where().getFriendlyName();
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/isis/blob/79248dc5/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/collections/layout/NamedFacetForCollectionLayoutXml.java
----------------------------------------------------------------------
diff --git a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/collections/layout/NamedFacetForCollectionLayoutXml.java b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/collections/layout/NamedFacetForCollectionLayoutXml.java
deleted file mode 100644
index e9828d7..0000000
--- a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/collections/layout/NamedFacetForCollectionLayoutXml.java
+++ /dev/null
@@ -1,48 +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.facets.collections.layout;
-
-import com.google.common.base.Strings;
-
-import org.apache.isis.applib.layout.v1_0.CollectionLayout;
-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;
-
-public class NamedFacetForCollectionLayoutXml extends NamedFacetAbstract {
-
-    public static NamedFacet create(CollectionLayout collectionLayout, FacetHolder holder) {
-        if(collectionLayout == null) {
-            return null;
-        }
-        final String named = Strings.emptyToNull(collectionLayout.getNamed());
-        final Boolean escaped = collectionLayout.getNamedEscaped();
-        return named != null ? new NamedFacetForCollectionLayoutXml(named, escaped == null || escaped, holder) : null;
-    }
-
-    private NamedFacetForCollectionLayoutXml(
-        final String value,
-        final boolean escaped,
-        final FacetHolder holder) {
-
-        super(value, escaped, holder);
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/isis/blob/79248dc5/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
new file mode 100644
index 0000000..295cbc9
--- /dev/null
+++ b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/collections/layout/NamedFacetForCollectionXml.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.core.metamodel.facets.collections.layout;
+
+import com.google.common.base.Strings;
+
+import org.apache.isis.applib.layout.v1_0.Collection;
+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;
+
+public class NamedFacetForCollectionXml extends NamedFacetAbstract {
+
+    public static NamedFacet create(Collection collectionLayout, FacetHolder holder) {
+        if(collectionLayout == null) {
+            return null;
+        }
+        final String named = Strings.emptyToNull(collectionLayout.getNamed());
+        final Boolean escaped = collectionLayout.getNamedEscaped();
+        return named != null ? new NamedFacetForCollectionXml(named, escaped == null || escaped, holder) : null;
+    }
+
+    private NamedFacetForCollectionXml(
+        final String value,
+        final boolean escaped,
+        final FacetHolder holder) {
+
+        super(value, escaped, holder);
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/isis/blob/79248dc5/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/collections/layout/PagedFacetForCollectionLayoutXml.java
----------------------------------------------------------------------
diff --git a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/collections/layout/PagedFacetForCollectionLayoutXml.java b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/collections/layout/PagedFacetForCollectionLayoutXml.java
deleted file mode 100644
index f14abb1..0000000
--- a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/collections/layout/PagedFacetForCollectionLayoutXml.java
+++ /dev/null
@@ -1,41 +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.facets.collections.layout;
-
-import org.apache.isis.applib.layout.v1_0.CollectionLayout;
-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;
-
-public class PagedFacetForCollectionLayoutXml extends PagedFacetAbstract {
-
-    public static PagedFacet create(CollectionLayout collectionLayout, FacetHolder holder) {
-        if(collectionLayout == null) {
-            return null;
-        }
-        final Integer paged = collectionLayout.getPaged();
-        return paged != null && paged != -1 ? new PagedFacetForCollectionLayoutXml(paged, holder) : null;
-    }
-
-    private PagedFacetForCollectionLayoutXml(int paged, FacetHolder holder) {
-        super(paged, holder);
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/isis/blob/79248dc5/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
new file mode 100644
index 0000000..eee8838
--- /dev/null
+++ b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/collections/layout/PagedFacetForCollectionXml.java
@@ -0,0 +1,41 @@
+/*
+ *  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.facets.collections.layout;
+
+import org.apache.isis.applib.layout.v1_0.Collection;
+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;
+
+public class PagedFacetForCollectionXml extends PagedFacetAbstract {
+
+    public static PagedFacet create(Collection collectionLayout, FacetHolder holder) {
+        if(collectionLayout == null) {
+            return null;
+        }
+        final Integer paged = collectionLayout.getPaged();
+        return paged != null && paged != -1 ? new PagedFacetForCollectionXml(paged, holder) : null;
+    }
+
+    private PagedFacetForCollectionXml(int paged, FacetHolder holder) {
+        super(paged, holder);
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/isis/blob/79248dc5/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/collections/layout/SortedByFacetForCollectionLayoutXml.java
----------------------------------------------------------------------
diff --git a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/collections/layout/SortedByFacetForCollectionLayoutXml.java b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/collections/layout/SortedByFacetForCollectionLayoutXml.java
deleted file mode 100644
index 2030e45..0000000
--- a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/collections/layout/SortedByFacetForCollectionLayoutXml.java
+++ /dev/null
@@ -1,52 +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.facets.collections.layout;
-
-import java.util.Comparator;
-
-import org.apache.isis.applib.layout.v1_0.CollectionLayout;
-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;
-import org.apache.isis.core.metamodel.facets.collections.sortedby.SortedByFacetAbstract;
-
-public class SortedByFacetForCollectionLayoutXml extends SortedByFacetAbstract {
-
-    public static SortedByFacet create(CollectionLayout collectionLayout, FacetHolder holder) {
-        if(collectionLayout == null) {
-            return null;
-        }
-        final String sortedBy = collectionLayout.getSortedBy();
-        if (sortedBy == null) {
-            return null;
-        }
-        final Class sortedByClass = ClassUtil.forName(sortedBy);
-        if(sortedByClass == Comparator.class) {
-            return null;
-        }
-
-        return sortedByClass != null ? new SortedByFacetForCollectionLayoutXml(sortedByClass, holder) : null;
-    }
-
-    private SortedByFacetForCollectionLayoutXml(Class<? extends Comparator<?>> sortedBy, FacetHolder holder) {
-        super(sortedBy, holder);
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/isis/blob/79248dc5/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
new file mode 100644
index 0000000..dbba9dd
--- /dev/null
+++ b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/collections/layout/SortedByFacetForCollectionXml.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.core.metamodel.facets.collections.layout;
+
+import java.util.Comparator;
+
+import org.apache.isis.applib.layout.v1_0.Collection;
+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;
+import org.apache.isis.core.metamodel.facets.collections.sortedby.SortedByFacetAbstract;
+
+public class SortedByFacetForCollectionXml extends SortedByFacetAbstract {
+
+    public static SortedByFacet create(Collection collectionLayout, FacetHolder holder) {
+        if(collectionLayout == null) {
+            return null;
+        }
+        final String sortedBy = collectionLayout.getSortedBy();
+        if (sortedBy == null) {
+            return null;
+        }
+        final Class sortedByClass = ClassUtil.forName(sortedBy);
+        if(sortedByClass == Comparator.class) {
+            return null;
+        }
+
+        return sortedByClass != null ? new SortedByFacetForCollectionXml(sortedByClass, holder) : null;
+    }
+
+    private SortedByFacetForCollectionXml(Class<? extends Comparator<?>> sortedBy, FacetHolder holder) {
+        super(sortedBy, holder);
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/isis/blob/79248dc5/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/object/layoutxml/LayoutXmlFacetDefault.java
----------------------------------------------------------------------
diff --git a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/object/layoutxml/LayoutXmlFacetDefault.java b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/object/layoutxml/LayoutXmlFacetDefault.java
index ad617e8..ca42fa6 100644
--- a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/object/layoutxml/LayoutXmlFacetDefault.java
+++ b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/object/layoutxml/LayoutXmlFacetDefault.java
@@ -28,14 +28,11 @@ import com.google.common.collect.Maps;
 
 import org.apache.isis.applib.layout.v1_0.Action;
 import org.apache.isis.applib.layout.v1_0.ActionHolder;
-import org.apache.isis.applib.layout.v1_0.ActionLayout;
 import org.apache.isis.applib.layout.v1_0.Collection;
-import org.apache.isis.applib.layout.v1_0.CollectionLayout;
 import org.apache.isis.applib.layout.v1_0.Column;
 import org.apache.isis.applib.layout.v1_0.DomainObject;
 import org.apache.isis.applib.layout.v1_0.Property;
 import org.apache.isis.applib.layout.v1_0.PropertyGroup;
-import org.apache.isis.applib.layout.v1_0.PropertyLayout;
 import org.apache.isis.applib.layout.v1_0.Tab;
 import org.apache.isis.applib.layout.v1_0.TabGroup;
 import org.apache.isis.applib.services.i18n.TranslationService;
@@ -43,30 +40,30 @@ 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.facetapi.FacetUtil;
-import org.apache.isis.core.metamodel.facets.actions.layout.ActionPositionFacetForActionLayoutXml;
-import org.apache.isis.core.metamodel.facets.actions.layout.BookmarkPolicyFacetForActionLayoutXml;
-import org.apache.isis.core.metamodel.facets.actions.layout.CssClassFaFacetForActionLayoutXml;
-import org.apache.isis.core.metamodel.facets.actions.layout.CssClassFacetForActionLayoutXml;
-import org.apache.isis.core.metamodel.facets.actions.layout.DescribedAsFacetForActionLayoutXml;
+import org.apache.isis.core.metamodel.facets.actions.layout.ActionPositionFacetForActionXml;
+import org.apache.isis.core.metamodel.facets.actions.layout.BookmarkPolicyFacetForActionXml;
+import org.apache.isis.core.metamodel.facets.actions.layout.CssClassFaFacetForActionXml;
+import org.apache.isis.core.metamodel.facets.actions.layout.CssClassFacetForActionXml;
+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.NamedFacetForActionLayoutXml;
-import org.apache.isis.core.metamodel.facets.collections.layout.CssClassFacetForCollectionLayoutXml;
-import org.apache.isis.core.metamodel.facets.collections.layout.DefaultViewFacetForCollectionLayoutXml;
-import org.apache.isis.core.metamodel.facets.collections.layout.DescribedAsFacetForCollectionLayoutXml;
-import org.apache.isis.core.metamodel.facets.collections.layout.HiddenFacetForCollectionLayoutXml;
-import org.apache.isis.core.metamodel.facets.collections.layout.NamedFacetForCollectionLayoutXml;
-import org.apache.isis.core.metamodel.facets.collections.layout.PagedFacetForCollectionLayoutXml;
-import org.apache.isis.core.metamodel.facets.collections.layout.SortedByFacetForCollectionLayoutXml;
+import org.apache.isis.core.metamodel.facets.actions.layout.NamedFacetForActionXml;
+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;
+import org.apache.isis.core.metamodel.facets.collections.layout.HiddenFacetForCollectionXml;
+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.members.order.annotprop.MemberOrderFacetXml;
 import org.apache.isis.core.metamodel.facets.object.membergroups.MemberGroupLayoutFacet;
-import org.apache.isis.core.metamodel.facets.properties.propertylayout.CssClassFacetForPropertyLayoutXml;
-import org.apache.isis.core.metamodel.facets.properties.propertylayout.DescribedAsFacetForPropertyLayoutXml;
-import org.apache.isis.core.metamodel.facets.properties.propertylayout.HiddenFacetForPropertyLayoutXml;
-import org.apache.isis.core.metamodel.facets.properties.propertylayout.LabelAtFacetForPropertyLayoutXml;
-import org.apache.isis.core.metamodel.facets.properties.propertylayout.MultiLineFacetForPropertyLayoutXml;
-import org.apache.isis.core.metamodel.facets.properties.propertylayout.NamedFacetForPropertyLayoutXml;
-import org.apache.isis.core.metamodel.facets.properties.propertylayout.RenderedAdjustedFacetForPropertyLayoutXml;
-import org.apache.isis.core.metamodel.facets.properties.propertylayout.TypicalLengthFacetForPropertyLayoutXml;
+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;
+import org.apache.isis.core.metamodel.facets.properties.propertylayout.LabelAtFacetForPropertyXml;
+import org.apache.isis.core.metamodel.facets.properties.propertylayout.MultiLineFacetForPropertyXml;
+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.spec.ObjectSpecification;
 import org.apache.isis.core.metamodel.spec.feature.Contributed;
 import org.apache.isis.core.metamodel.spec.feature.ObjectAction;
@@ -281,53 +278,46 @@ public class LayoutXmlFacetDefault
                 }
                 FacetUtil.addFacet(
                     new MemberOrderFacetXml(memberOrderName, ""+memberOrderSequence, translationService, objectAction));
-            }
 
-            @Override
-            public void visit(final ActionLayout actionLayout) {
-                final Action action = actionLayout.getOwner();
-                final ActionHolder actionHolder = action.getOwner();
 
                 if(actionHolder instanceof PropertyGroup) {
-                    if(actionLayout.getPosition() == null ||
-                       actionLayout.getPosition() == org.apache.isis.applib.annotation.ActionLayout.Position.BELOW ||
-                       actionLayout.getPosition() == org.apache.isis.applib.annotation.ActionLayout.Position.RIGHT) {
-                       actionLayout.setPosition(org.apache.isis.applib.annotation.ActionLayout.Position.PANEL);
+                    if(action.getPosition() == null ||
+                       action.getPosition() == org.apache.isis.applib.annotation.ActionLayout.Position.BELOW ||
+                       action.getPosition() == org.apache.isis.applib.annotation.ActionLayout.Position.RIGHT) {
+                       action.setPosition(org.apache.isis.applib.annotation.ActionLayout.Position.PANEL);
                     }
                 } else if(actionHolder instanceof Property) {
-                    if(actionLayout.getPosition() == null ||
-                       actionLayout.getPosition() == org.apache.isis.applib.annotation.ActionLayout.Position.PANEL_DROPDOWN ||
-                       actionLayout.getPosition() == org.apache.isis.applib.annotation.ActionLayout.Position.PANEL) {
-                       actionLayout.setPosition(org.apache.isis.applib.annotation.ActionLayout.Position.BELOW);
+                    if(action.getPosition() == null ||
+                       action.getPosition() == org.apache.isis.applib.annotation.ActionLayout.Position.PANEL_DROPDOWN ||
+                       action.getPosition() == org.apache.isis.applib.annotation.ActionLayout.Position.PANEL) {
+                       action.setPosition(org.apache.isis.applib.annotation.ActionLayout.Position.BELOW);
                     }
                 } else {
                     // doesn't do anything for DomainObject or Collection
-                    actionLayout.setPosition(null);
+                    action.setPosition(null);
                 }
 
-                final ObjectAction objectAction = objectActionById.get(action.getId());
-                FacetUtil.addFacet(ActionPositionFacetForActionLayoutXml.create(actionLayout, objectAction));
-                FacetUtil.addFacet(BookmarkPolicyFacetForActionLayoutXml.create(actionLayout, objectAction));
-                FacetUtil.addFacet(CssClassFacetForActionLayoutXml.create(actionLayout, objectAction));
-                FacetUtil.addFacet(CssClassFaFacetForActionLayoutXml.create(actionLayout, objectAction));
-                FacetUtil.addFacet(DescribedAsFacetForActionLayoutXml.create(actionLayout, objectAction));
-                FacetUtil.addFacet(HiddenFacetForActionLayoutXml.create(actionLayout, objectAction));
-                FacetUtil.addFacet(NamedFacetForActionLayoutXml.create(actionLayout, objectAction));
+                FacetUtil.addFacet(ActionPositionFacetForActionXml.create(action, objectAction));
+                FacetUtil.addFacet(BookmarkPolicyFacetForActionXml.create(action, objectAction));
+                FacetUtil.addFacet(CssClassFacetForActionXml.create(action, objectAction));
+                FacetUtil.addFacet(CssClassFaFacetForActionXml.create(action, objectAction));
+                FacetUtil.addFacet(DescribedAsFacetForActionXml.create(action, objectAction));
+                FacetUtil.addFacet(HiddenFacetForActionLayoutXml.create(action, objectAction));
+                FacetUtil.addFacet(NamedFacetForActionXml.create(action, objectAction));
             }
 
             @Override
-            public void visit(final PropertyLayout propertyLayout) {
-                final Property property = propertyLayout.getOwner();
+            public void visit(final Property property) {
 
                 final OneToOneAssociation oneToOneAssociation = oneToOneAssociationById.get(property.getId());
-                FacetUtil.addFacet(CssClassFacetForPropertyLayoutXml.create(propertyLayout, oneToOneAssociation));
-                FacetUtil.addFacet(DescribedAsFacetForPropertyLayoutXml.create(propertyLayout, oneToOneAssociation));
-                FacetUtil.addFacet(HiddenFacetForPropertyLayoutXml.create(propertyLayout, oneToOneAssociation));
-                FacetUtil.addFacet(LabelAtFacetForPropertyLayoutXml.create(propertyLayout, oneToOneAssociation));
-                FacetUtil.addFacet(MultiLineFacetForPropertyLayoutXml.create(propertyLayout, oneToOneAssociation));
-                FacetUtil.addFacet(NamedFacetForPropertyLayoutXml.create(propertyLayout, oneToOneAssociation));
-                FacetUtil.addFacet(RenderedAdjustedFacetForPropertyLayoutXml.create(propertyLayout, oneToOneAssociation));
-                FacetUtil.addFacet(TypicalLengthFacetForPropertyLayoutXml.create(propertyLayout, oneToOneAssociation));
+                FacetUtil.addFacet(CssClassFacetForPropertyXml.create(property, oneToOneAssociation));
+                FacetUtil.addFacet(DescribedAsFacetForPropertyXml.create(property, oneToOneAssociation));
+                FacetUtil.addFacet(HiddenFacetForPropertyXml.create(property, oneToOneAssociation));
+                FacetUtil.addFacet(LabelAtFacetForPropertyXml.create(property, oneToOneAssociation));
+                FacetUtil.addFacet(MultiLineFacetForPropertyXml.create(property, oneToOneAssociation));
+                FacetUtil.addFacet(NamedFacetForPropertyXml.create(property, oneToOneAssociation));
+                FacetUtil.addFacet(RenderedAdjustedFacetForPropertyXml.create(property, oneToOneAssociation));
+                FacetUtil.addFacet(TypicalLengthFacetForPropertyXml.create(property, oneToOneAssociation));
 
                 // @MemberOrder#name based on owning property group, @MemberOrder#sequence monotonically increasing
                 final PropertyGroup propertyGroup = property.getOwner();
@@ -338,17 +328,16 @@ public class LayoutXmlFacetDefault
             }
 
             @Override
-            public void visit(final CollectionLayout collectionLayout) {
-                final Collection collection = collectionLayout.getOwner();
+            public void visit(final Collection collection) {
                 final OneToManyAssociation oneToManyAssociation = oneToManyAssociationById.get(collection.getId());
 
-                FacetUtil.addFacet(CssClassFacetForCollectionLayoutXml.create(collectionLayout, oneToManyAssociation));
-                FacetUtil.addFacet(DefaultViewFacetForCollectionLayoutXml.create(collectionLayout, oneToManyAssociation));
-                FacetUtil.addFacet(DescribedAsFacetForCollectionLayoutXml.create(collectionLayout, oneToManyAssociation));
-                FacetUtil.addFacet(HiddenFacetForCollectionLayoutXml.create(collectionLayout, oneToManyAssociation));
-                FacetUtil.addFacet(NamedFacetForCollectionLayoutXml.create(collectionLayout, oneToManyAssociation));
-                FacetUtil.addFacet(PagedFacetForCollectionLayoutXml.create(collectionLayout, oneToManyAssociation));
-                FacetUtil.addFacet(SortedByFacetForCollectionLayoutXml.create(collectionLayout, oneToManyAssociation));
+                FacetUtil.addFacet(CssClassFacetForCollectionXml.create(collection, oneToManyAssociation));
+                FacetUtil.addFacet(DefaultViewFacetForCollectionXml.create(collection, oneToManyAssociation));
+                FacetUtil.addFacet(DescribedAsFacetForCollectionXml.create(collection, oneToManyAssociation));
+                FacetUtil.addFacet(HiddenFacetForCollectionXml.create(collection, oneToManyAssociation));
+                FacetUtil.addFacet(NamedFacetForCollectionXml.create(collection, oneToManyAssociation));
+                FacetUtil.addFacet(PagedFacetForCollectionXml.create(collection, oneToManyAssociation));
+                FacetUtil.addFacet(SortedByFacetForCollectionXml.create(collection, oneToManyAssociation));
 
                 // copy the collection name onto the tab
                 final Column column = collection.getOwner();

http://git-wip-us.apache.org/repos/asf/isis/blob/79248dc5/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/properties/propertylayout/CssClassFacetForPropertyLayoutXml.java
----------------------------------------------------------------------
diff --git a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/properties/propertylayout/CssClassFacetForPropertyLayoutXml.java b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/properties/propertylayout/CssClassFacetForPropertyLayoutXml.java
deleted file mode 100644
index fb9bdb8..0000000
--- a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/properties/propertylayout/CssClassFacetForPropertyLayoutXml.java
+++ /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.
- */
-
-package org.apache.isis.core.metamodel.facets.properties.propertylayout;
-
-import com.google.common.base.Strings;
-
-import org.apache.isis.applib.layout.v1_0.PropertyLayout;
-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;
-
-public class CssClassFacetForPropertyLayoutXml extends CssClassFacetAbstract {
-
-    public static CssClassFacet create(PropertyLayout propertyLayout, FacetHolder holder) {
-        if(propertyLayout == null) {
-            return null;
-        }
-        final String cssClass = Strings.emptyToNull(propertyLayout.getCssClass());
-        return cssClass != null ? new CssClassFacetForPropertyLayoutXml(cssClass, holder) : null;
-    }
-
-    private CssClassFacetForPropertyLayoutXml(String value, FacetHolder holder) {
-        super(value, holder);
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/isis/blob/79248dc5/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
new file mode 100644
index 0000000..065e80c
--- /dev/null
+++ b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/properties/propertylayout/CssClassFacetForPropertyXml.java
@@ -0,0 +1,43 @@
+/*
+ *  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.facets.properties.propertylayout;
+
+import com.google.common.base.Strings;
+
+import org.apache.isis.applib.layout.v1_0.Property;
+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;
+
+public class CssClassFacetForPropertyXml extends CssClassFacetAbstract {
+
+    public static CssClassFacet create(Property propertyLayout, FacetHolder holder) {
+        if(propertyLayout == null) {
+            return null;
+        }
+        final String cssClass = Strings.emptyToNull(propertyLayout.getCssClass());
+        return cssClass != null ? new CssClassFacetForPropertyXml(cssClass, holder) : null;
+    }
+
+    private CssClassFacetForPropertyXml(String value, FacetHolder holder) {
+        super(value, holder);
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/isis/blob/79248dc5/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/properties/propertylayout/DescribedAsFacetForPropertyLayoutXml.java
----------------------------------------------------------------------
diff --git a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/properties/propertylayout/DescribedAsFacetForPropertyLayoutXml.java b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/properties/propertylayout/DescribedAsFacetForPropertyLayoutXml.java
deleted file mode 100644
index d36dfa9..0000000
--- a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/properties/propertylayout/DescribedAsFacetForPropertyLayoutXml.java
+++ /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.
- */
-
-package org.apache.isis.core.metamodel.facets.properties.propertylayout;
-
-import com.google.common.base.Strings;
-
-import org.apache.isis.applib.layout.v1_0.PropertyLayout;
-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;
-
-public class DescribedAsFacetForPropertyLayoutXml extends DescribedAsFacetAbstract {
-
-    public static DescribedAsFacet create(PropertyLayout propertyLayout, FacetHolder holder) {
-        if(propertyLayout == null) {
-            return null;
-        }
-        final String describedAs = Strings.emptyToNull(propertyLayout.getDescribedAs());
-        return describedAs != null ? new DescribedAsFacetForPropertyLayoutXml(describedAs, holder) : null;
-    }
-
-    private DescribedAsFacetForPropertyLayoutXml(String value, FacetHolder holder) {
-        super(value, holder);
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/isis/blob/79248dc5/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
new file mode 100644
index 0000000..2c9f6f6
--- /dev/null
+++ b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/properties/propertylayout/DescribedAsFacetForPropertyXml.java
@@ -0,0 +1,43 @@
+/*
+ *  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.facets.properties.propertylayout;
+
+import com.google.common.base.Strings;
+
+import org.apache.isis.applib.layout.v1_0.Property;
+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;
+
+public class DescribedAsFacetForPropertyXml extends DescribedAsFacetAbstract {
+
+    public static DescribedAsFacet create(Property propertyLayout, FacetHolder holder) {
+        if(propertyLayout == null) {
+            return null;
+        }
+        final String describedAs = Strings.emptyToNull(propertyLayout.getDescribedAs());
+        return describedAs != null ? new DescribedAsFacetForPropertyXml(describedAs, holder) : null;
+    }
+
+    private DescribedAsFacetForPropertyXml(String value, FacetHolder holder) {
+        super(value, holder);
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/isis/blob/79248dc5/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/properties/propertylayout/HiddenFacetForPropertyLayoutXml.java
----------------------------------------------------------------------
diff --git a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/properties/propertylayout/HiddenFacetForPropertyLayoutXml.java b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/properties/propertylayout/HiddenFacetForPropertyLayoutXml.java
deleted file mode 100644
index 7a93898..0000000
--- a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/properties/propertylayout/HiddenFacetForPropertyLayoutXml.java
+++ /dev/null
@@ -1,52 +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.facets.properties.propertylayout;
-
-import org.apache.isis.applib.annotation.When;
-import org.apache.isis.applib.annotation.Where;
-import org.apache.isis.applib.layout.v1_0.PropertyLayout;
-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;
-import org.apache.isis.core.metamodel.facets.members.hidden.HiddenFacetAbstract;
-
-public class HiddenFacetForPropertyLayoutXml extends HiddenFacetAbstract {
-
-    public static HiddenFacet create(final PropertyLayout propertyLayout, final FacetHolder holder) {
-        if (propertyLayout == null) {
-            return null;
-        }
-        final Where where = propertyLayout.getHidden();
-        return where != null && where != Where.NOT_SPECIFIED ? new HiddenFacetForPropertyLayoutXml(where, holder) : null;
-    }
-
-    private HiddenFacetForPropertyLayoutXml(final Where where, final FacetHolder holder) {
-        super(HiddenFacetForPropertyLayoutXml.class, When.ALWAYS, where, holder);
-    }
-
-    @Override
-    public String hiddenReason(final ObjectAdapter targetAdapter, final Where whereContext) {
-        if(!where().includes(whereContext)) {
-            return null;
-        }
-        return "Hidden on " + where().getFriendlyName();
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/isis/blob/79248dc5/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
new file mode 100644
index 0000000..4ee7f1d
--- /dev/null
+++ b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/properties/propertylayout/HiddenFacetForPropertyXml.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.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.v1_0.Property;
+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;
+import org.apache.isis.core.metamodel.facets.members.hidden.HiddenFacetAbstract;
+
+public class HiddenFacetForPropertyXml extends HiddenFacetAbstract {
+
+    public static HiddenFacet create(final Property propertyLayout, final FacetHolder holder) {
+        if (propertyLayout == null) {
+            return null;
+        }
+        final Where where = propertyLayout.getHidden();
+        return where != null && where != Where.NOT_SPECIFIED ? new HiddenFacetForPropertyXml(where, holder) : null;
+    }
+
+    private HiddenFacetForPropertyXml(final Where where, final FacetHolder holder) {
+        super(HiddenFacetForPropertyXml.class, When.ALWAYS, where, holder);
+    }
+
+    @Override
+    public String hiddenReason(final ObjectAdapter targetAdapter, final Where whereContext) {
+        if(!where().includes(whereContext)) {
+            return null;
+        }
+        return "Hidden on " + where().getFriendlyName();
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/isis/blob/79248dc5/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/properties/propertylayout/LabelAtFacetForPropertyLayoutXml.java
----------------------------------------------------------------------
diff --git a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/properties/propertylayout/LabelAtFacetForPropertyLayoutXml.java b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/properties/propertylayout/LabelAtFacetForPropertyLayoutXml.java
deleted file mode 100644
index c8a84d0..0000000
--- a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/properties/propertylayout/LabelAtFacetForPropertyLayoutXml.java
+++ /dev/null
@@ -1,42 +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.facets.properties.propertylayout;
-
-import org.apache.isis.applib.annotation.LabelPosition;
-import org.apache.isis.applib.layout.v1_0.PropertyLayout;
-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;
-
-public class LabelAtFacetForPropertyLayoutXml extends LabelAtFacetAbstract {
-
-    public static LabelAtFacet create(final PropertyLayout propertyLayout, FacetHolder holder) {
-        if (propertyLayout == null) {
-            return null;
-        }
-        final LabelPosition labelPosition = propertyLayout.getLabelPosition();
-        return labelPosition != null ? new LabelAtFacetForPropertyLayoutXml(labelPosition, holder) : null;
-    }
-
-    private LabelAtFacetForPropertyLayoutXml(final LabelPosition value, final FacetHolder holder) {
-        super(value, holder);
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/isis/blob/79248dc5/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
new file mode 100644
index 0000000..ba512a9
--- /dev/null
+++ b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/properties/propertylayout/LabelAtFacetForPropertyXml.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.core.metamodel.facets.properties.propertylayout;
+
+import org.apache.isis.applib.annotation.LabelPosition;
+import org.apache.isis.applib.layout.v1_0.Property;
+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;
+
+public class LabelAtFacetForPropertyXml extends LabelAtFacetAbstract {
+
+    public static LabelAtFacet create(final Property propertyLayout, FacetHolder holder) {
+        if (propertyLayout == null) {
+            return null;
+        }
+        final LabelPosition labelPosition = propertyLayout.getLabelPosition();
+        return labelPosition != null ? new LabelAtFacetForPropertyXml(labelPosition, holder) : null;
+    }
+
+    private LabelAtFacetForPropertyXml(final LabelPosition value, final FacetHolder holder) {
+        super(value, holder);
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/isis/blob/79248dc5/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/properties/propertylayout/MultiLineFacetForPropertyLayoutXml.java
----------------------------------------------------------------------
diff --git a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/properties/propertylayout/MultiLineFacetForPropertyLayoutXml.java b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/properties/propertylayout/MultiLineFacetForPropertyLayoutXml.java
deleted file mode 100644
index 072f287..0000000
--- a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/properties/propertylayout/MultiLineFacetForPropertyLayoutXml.java
+++ /dev/null
@@ -1,41 +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.facets.properties.propertylayout;
-
-import org.apache.isis.applib.layout.v1_0.PropertyLayout;
-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;
-
-public class MultiLineFacetForPropertyLayoutXml extends MultiLineFacetAbstract {
-
-    public static MultiLineFacet create(PropertyLayout propertyLayout, FacetHolder holder) {
-        if(propertyLayout == null) {
-            return null;
-        }
-        final Integer multiLine = propertyLayout.getMultiLine();
-        return multiLine != null && multiLine > 1 ? new MultiLineFacetForPropertyLayoutXml(multiLine, false, holder) : null;
-    }
-
-    private MultiLineFacetForPropertyLayoutXml(int numberOfLines, boolean preventWrapping, FacetHolder holder) {
-        super(numberOfLines, preventWrapping, holder);
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/isis/blob/79248dc5/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
new file mode 100644
index 0000000..9a48271
--- /dev/null
+++ b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/properties/propertylayout/MultiLineFacetForPropertyXml.java
@@ -0,0 +1,41 @@
+/*
+ *  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.facets.properties.propertylayout;
+
+import org.apache.isis.applib.layout.v1_0.Property;
+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;
+
+public class MultiLineFacetForPropertyXml extends MultiLineFacetAbstract {
+
+    public static MultiLineFacet create(Property propertyLayout, FacetHolder holder) {
+        if(propertyLayout == null) {
+            return null;
+        }
+        final Integer multiLine = propertyLayout.getMultiLine();
+        return multiLine != null && multiLine > 1 ? new MultiLineFacetForPropertyXml(multiLine, false, holder) : null;
+    }
+
+    private MultiLineFacetForPropertyXml(int numberOfLines, boolean preventWrapping, FacetHolder holder) {
+        super(numberOfLines, preventWrapping, holder);
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/isis/blob/79248dc5/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/properties/propertylayout/NamedFacetForPropertyLayoutXml.java
----------------------------------------------------------------------
diff --git a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/properties/propertylayout/NamedFacetForPropertyLayoutXml.java b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/properties/propertylayout/NamedFacetForPropertyLayoutXml.java
deleted file mode 100644
index 0f0e9b7..0000000
--- a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/properties/propertylayout/NamedFacetForPropertyLayoutXml.java
+++ /dev/null
@@ -1,48 +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.facets.properties.propertylayout;
-
-import com.google.common.base.Strings;
-
-import org.apache.isis.applib.layout.v1_0.PropertyLayout;
-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;
-
-public class NamedFacetForPropertyLayoutXml extends NamedFacetAbstract {
-
-    public static NamedFacet create(PropertyLayout propertyLayout, FacetHolder holder) {
-        if(propertyLayout == null) {
-            return null;
-        }
-        final String named = Strings.emptyToNull(propertyLayout.getNamed());
-        final Boolean escaped = propertyLayout.getNamedEscaped();
-        return named != null ? new NamedFacetForPropertyLayoutXml(named, (escaped == null || escaped), holder) : null;
-    }
-
-    private NamedFacetForPropertyLayoutXml(
-        final String value,
-        final boolean escaped,
-        final FacetHolder holder) {
-
-        super(value, escaped, holder);
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/isis/blob/79248dc5/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
new file mode 100644
index 0000000..392a152
--- /dev/null
+++ b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/properties/propertylayout/NamedFacetForPropertyXml.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.core.metamodel.facets.properties.propertylayout;
+
+import com.google.common.base.Strings;
+
+import org.apache.isis.applib.layout.v1_0.Property;
+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;
+
+public class NamedFacetForPropertyXml extends NamedFacetAbstract {
+
+    public static NamedFacet create(Property propertyLayout, FacetHolder holder) {
+        if(propertyLayout == null) {
+            return null;
+        }
+        final String named = Strings.emptyToNull(propertyLayout.getNamed());
+        final Boolean escaped = propertyLayout.getNamedEscaped();
+        return named != null ? new NamedFacetForPropertyXml(named, (escaped == null || escaped), holder) : null;
+    }
+
+    private NamedFacetForPropertyXml(
+        final String value,
+        final boolean escaped,
+        final FacetHolder holder) {
+
+        super(value, escaped, holder);
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/isis/blob/79248dc5/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/properties/propertylayout/RenderedAdjustedFacetForPropertyLayoutXml.java
----------------------------------------------------------------------
diff --git a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/properties/propertylayout/RenderedAdjustedFacetForPropertyLayoutXml.java b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/properties/propertylayout/RenderedAdjustedFacetForPropertyLayoutXml.java
deleted file mode 100644
index 0ceab99..0000000
--- a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/properties/propertylayout/RenderedAdjustedFacetForPropertyLayoutXml.java
+++ /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.
- */
-
-package org.apache.isis.core.metamodel.facets.properties.propertylayout;
-
-import org.apache.isis.applib.layout.v1_0.PropertyLayout;
-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;
-
-public class RenderedAdjustedFacetForPropertyLayoutXml extends RenderedAdjustedFacetAbstract {
-
-    public static RenderedAdjustedFacet create(final PropertyLayout propertyLayout, FacetHolder holder) {
-        if(propertyLayout == null) {
-            return null;
-        }
-        final Boolean renderedAsDayBefore = propertyLayout.getRenderedAsDayBefore();
-        return renderedAsDayBefore != null && renderedAsDayBefore ? new RenderedAdjustedFacetForPropertyLayoutXml(holder) : null;
-    }
-
-    public static final int ADJUST_BY = -1;
-
-    private RenderedAdjustedFacetForPropertyLayoutXml(FacetHolder holder) {
-        super(ADJUST_BY, holder);
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/isis/blob/79248dc5/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
new file mode 100644
index 0000000..63a3e4a
--- /dev/null
+++ b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/properties/propertylayout/RenderedAdjustedFacetForPropertyXml.java
@@ -0,0 +1,43 @@
+/*
+ *  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.facets.properties.propertylayout;
+
+import org.apache.isis.applib.layout.v1_0.Property;
+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;
+
+public class RenderedAdjustedFacetForPropertyXml extends RenderedAdjustedFacetAbstract {
+
+    public static RenderedAdjustedFacet create(final Property propertyLayout, FacetHolder holder) {
+        if(propertyLayout == null) {
+            return null;
+        }
+        final Boolean renderedAsDayBefore = propertyLayout.getRenderedAsDayBefore();
+        return renderedAsDayBefore != null && renderedAsDayBefore ? new RenderedAdjustedFacetForPropertyXml(holder) : null;
+    }
+
+    public static final int ADJUST_BY = -1;
+
+    private RenderedAdjustedFacetForPropertyXml(FacetHolder holder) {
+        super(ADJUST_BY, holder);
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/isis/blob/79248dc5/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/properties/propertylayout/TypicalLengthFacetForPropertyLayoutXml.java
----------------------------------------------------------------------
diff --git a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/properties/propertylayout/TypicalLengthFacetForPropertyLayoutXml.java b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/properties/propertylayout/TypicalLengthFacetForPropertyLayoutXml.java
deleted file mode 100644
index 5d51ce9..0000000
--- a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/properties/propertylayout/TypicalLengthFacetForPropertyLayoutXml.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.core.metamodel.facets.properties.propertylayout;
-
-import org.apache.isis.applib.layout.v1_0.PropertyLayout;
-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;
-
-public class TypicalLengthFacetForPropertyLayoutXml extends TypicalLengthFacetAbstract {
-
-    public static TypicalLengthFacet create(PropertyLayout propertyLayout, FacetHolder holder) {
-        if(propertyLayout == null) {
-            return null;
-        }
-        final Integer typicalLength = propertyLayout.getTypicalLength();
-        return typicalLength != null && typicalLength != -1 ? new TypicalLengthFacetForPropertyLayoutXml(typicalLength, holder) : null;
-    }
-
-    private final int typicalLength;
-
-    private TypicalLengthFacetForPropertyLayoutXml(int typicalLength, FacetHolder holder) {
-        super(holder, Derivation.NOT_DERIVED);
-        this.typicalLength = typicalLength;
-    }
-
-    @Override
-    public int value() {
-        return typicalLength;
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/isis/blob/79248dc5/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
new file mode 100644
index 0000000..1a193e5
--- /dev/null
+++ b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/properties/propertylayout/TypicalLengthFacetForPropertyXml.java
@@ -0,0 +1,49 @@
+/*
+ *  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.facets.properties.propertylayout;
+
+import org.apache.isis.applib.layout.v1_0.Property;
+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;
+
+public class TypicalLengthFacetForPropertyXml extends TypicalLengthFacetAbstract {
+
+    public static TypicalLengthFacet create(Property propertyLayout, FacetHolder holder) {
+        if(propertyLayout == null) {
+            return null;
+        }
+        final Integer typicalLength = propertyLayout.getTypicalLength();
+        return typicalLength != null && typicalLength != -1 ? new TypicalLengthFacetForPropertyXml(typicalLength, holder) : null;
+    }
+
+    private final int typicalLength;
+
+    private TypicalLengthFacetForPropertyXml(int typicalLength, FacetHolder holder) {
+        super(holder, Derivation.NOT_DERIVED);
+        this.typicalLength = typicalLength;
+    }
+
+    @Override
+    public int value() {
+        return typicalLength;
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/isis/blob/79248dc5/core/metamodel/src/test/java/org/apache/isis/core/metamodel/layoutxml/v1_0/DomainObjectTest.java
----------------------------------------------------------------------
diff --git a/core/metamodel/src/test/java/org/apache/isis/core/metamodel/layoutxml/v1_0/DomainObjectTest.java b/core/metamodel/src/test/java/org/apache/isis/core/metamodel/layoutxml/v1_0/DomainObjectTest.java
index 51269c5..437783a 100644
--- a/core/metamodel/src/test/java/org/apache/isis/core/metamodel/layoutxml/v1_0/DomainObjectTest.java
+++ b/core/metamodel/src/test/java/org/apache/isis/core/metamodel/layoutxml/v1_0/DomainObjectTest.java
@@ -18,11 +18,13 @@
  */
 package org.apache.isis.core.metamodel.layoutxml.v1_0;
 
+import java.util.List;
 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;
@@ -79,10 +81,14 @@ public class DomainObjectTest {
 
         Action updateNameAction = new Action();
         updateNameAction.setId("updateName");
+        final List<Action> propertyActions = Lists.newArrayList();
+        nameProperty.setActions(propertyActions);
         nameProperty.getActions().add(updateNameAction);
 
         Action deleteAction = new Action();
         deleteAction.setId("delete");
+        final List<Action> domainObjectActions = Lists.newArrayList();
+        domainObject.setActions(domainObjectActions);
         domainObject.getActions().add(deleteAction);
 
         String xml = jaxbService.toXml(domainObject,

http://git-wip-us.apache.org/repos/asf/isis/blob/79248dc5/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/tabgroups/EntityTabGroupsPanel.java
----------------------------------------------------------------------
diff --git a/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/tabgroups/EntityTabGroupsPanel.java b/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/tabgroups/EntityTabGroupsPanel.java
index 3f9b76f..1ab845e 100644
--- a/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/tabgroups/EntityTabGroupsPanel.java
+++ b/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/tabgroups/EntityTabGroupsPanel.java
@@ -33,6 +33,7 @@ import org.apache.wicket.model.Model;
 import org.apache.isis.applib.layout.v1_0.DomainObject;
 import org.apache.isis.applib.layout.v1_0.Tab;
 import org.apache.isis.applib.layout.v1_0.TabGroup;
+import org.apache.isis.applib.services.jaxb.JaxbService;
 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.layoutxml.LayoutXmlFacet;
@@ -73,6 +74,10 @@ public class EntityTabGroupsPanel extends PanelAbstract<EntityModel> {
         final LayoutXmlFacet layoutXmlFacet = model.getTypeOfSpecification().getFacet(LayoutXmlFacet.class);
         final DomainObject domainObject = layoutXmlFacet.getLayoutMetadata();
 
+        // TODO: debugging, remove
+        final String xml = getServicesInjector().lookupService(JaxbService.class).toXml(domainObject);
+        System.out.println(xml);
+
         addOrReplace(ComponentType.ENTITY_SUMMARY, model);
 
         final List<TabGroup> tabGroups = domainObject.getTabGroups();

http://git-wip-us.apache.org/repos/asf/isis/blob/79248dc5/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 2c0bc1f..dad55cf 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,6 +18,9 @@
  */
 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;
@@ -143,6 +146,18 @@ public class SimpleObject implements Comparable<SimpleObject> {
 
     @javax.inject.Inject
     @SuppressWarnings("unused")
-    private DomainObjectContainer container;
+    DomainObjectContainer container;
+
+
+    public List<SimpleObject> getSimilarTo() {
+        return simpleObjects.findByName(getName().substring(0,1));
+    }
+
+    public List<SimpleObject> getOthers() {
+        return simpleObjects.listAll();
+    }
+
+    @Inject
+    SimpleObjects simpleObjects;
 
 }


[06/50] [abbrv] isis git commit: ISIS-1296: updating the banner for the webconsole

Posted by da...@apache.org.
ISIS-1296: updating the banner for the webconsole


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

Branch: refs/heads/ISIS-993
Commit: 5d3d14b4f7ed3ad1619de3cd1935f10016f7fd28
Parents: 89bd3fd
Author: Dan Haywood <da...@haywood-associates.co.uk>
Authored: Sun Jan 10 15:24:14 2016 +0000
Committer: Dan Haywood <da...@haywood-associates.co.uk>
Committed: Sun Jan 10 15:24:14 2016 +0000

----------------------------------------------------------------------
 .../src/main/jettyconsole/isis-banner.pdn       | Bin 69658 -> 64162 bytes
 .../src/main/jettyconsole/isis-banner.png       | Bin 30776 -> 27310 bytes
 2 files changed, 0 insertions(+), 0 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/isis/blob/5d3d14b4/example/application/simpleapp/webapp/src/main/jettyconsole/isis-banner.pdn
----------------------------------------------------------------------
diff --git a/example/application/simpleapp/webapp/src/main/jettyconsole/isis-banner.pdn b/example/application/simpleapp/webapp/src/main/jettyconsole/isis-banner.pdn
index 37543c9..43a53e6 100644
Binary files a/example/application/simpleapp/webapp/src/main/jettyconsole/isis-banner.pdn and b/example/application/simpleapp/webapp/src/main/jettyconsole/isis-banner.pdn differ

http://git-wip-us.apache.org/repos/asf/isis/blob/5d3d14b4/example/application/simpleapp/webapp/src/main/jettyconsole/isis-banner.png
----------------------------------------------------------------------
diff --git a/example/application/simpleapp/webapp/src/main/jettyconsole/isis-banner.png b/example/application/simpleapp/webapp/src/main/jettyconsole/isis-banner.png
index cd9ecfe..cf10bef 100644
Binary files a/example/application/simpleapp/webapp/src/main/jettyconsole/isis-banner.png and b/example/application/simpleapp/webapp/src/main/jettyconsole/isis-banner.png differ


[17/50] [abbrv] isis git commit: ISIS-1287: more bad links in the security docs.

Posted by da...@apache.org.
ISIS-1287: more bad links in the security docs.


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

Branch: refs/heads/ISIS-993
Commit: 3887fb2eb80f86a5d05c50829b4f2ad18b6587bd
Parents: 0c17f54
Author: Dan Haywood <da...@haywood-associates.co.uk>
Authored: Sun Jan 24 12:18:58 2016 +0000
Committer: Dan Haywood <da...@haywood-associates.co.uk>
Committed: Sun Jan 24 12:18:58 2016 +0000

----------------------------------------------------------------------
 .../src/main/asciidoc/guides/_ugsec_shiro-ini-realm.adoc         | 2 +-
 .../src/main/asciidoc/guides/_ugsec_shiro-isis-ldap-realm.adoc   | 2 +-
 .../guides/_ugsec_shiro-isisaddons-security-module-realm.adoc    | 4 ++--
 3 files changed, 4 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/isis/blob/3887fb2e/adocs/documentation/src/main/asciidoc/guides/_ugsec_shiro-ini-realm.adoc
----------------------------------------------------------------------
diff --git a/adocs/documentation/src/main/asciidoc/guides/_ugsec_shiro-ini-realm.adoc b/adocs/documentation/src/main/asciidoc/guides/_ugsec_shiro-ini-realm.adoc
index 9397bfd..ec14f68 100644
--- a/adocs/documentation/src/main/asciidoc/guides/_ugsec_shiro-ini-realm.adoc
+++ b/adocs/documentation/src/main/asciidoc/guides/_ugsec_shiro-ini-realm.adoc
@@ -11,7 +11,7 @@ This is suitable for prototyping, but isn't intended for production use, if only
 
 The diagram below shows the Isis and components involved:
 
-image::{_imagesdir}security/security-apis-impl/configure-shiro-to-use-ini-realm.png[width="600px"]
+image::{_imagesdir}security/security-apis-impl/configure-shiro-to-use-ini-realm.PNG[width="600px"]
 
 The realm is responsible for validating the user credentials, and then creates a Shiro link:http://shiro.apache.org/static/latest/apidocs/org/apache/shiro/subject/Subject.html[`Subject`] which represents the user (for the current request).  Apache Isis `Authenticator` component then interacts with the `Subject` in order to check permissions.
 

http://git-wip-us.apache.org/repos/asf/isis/blob/3887fb2e/adocs/documentation/src/main/asciidoc/guides/_ugsec_shiro-isis-ldap-realm.adoc
----------------------------------------------------------------------
diff --git a/adocs/documentation/src/main/asciidoc/guides/_ugsec_shiro-isis-ldap-realm.adoc b/adocs/documentation/src/main/asciidoc/guides/_ugsec_shiro-isis-ldap-realm.adoc
index 0210fa7..20ac868 100644
--- a/adocs/documentation/src/main/asciidoc/guides/_ugsec_shiro-isis-ldap-realm.adoc
+++ b/adocs/documentation/src/main/asciidoc/guides/_ugsec_shiro-isis-ldap-realm.adoc
@@ -7,7 +7,7 @@
 
 Isis ships with an implementation of http://shiro.apache.org[Apache Shiro]'s `Realm` class that allows user authentication and authorization to be performed against an LDAP server.
 
-image::{_imagesdir}security/security-apis-impl/configure-shiro-to-use-isis-ldap-realm.png[width="600px"]
+image::{_imagesdir}security/security-apis-impl/configure-shiro-to-use-isis-ldap-realm.PNG[width="600px"]
 
 The LDAP database stores the user/passwords and user groups, while the `shiro.ini` file is used to map the LDAP groups to roles, and to map the roles to permissions.
 

http://git-wip-us.apache.org/repos/asf/isis/blob/3887fb2e/adocs/documentation/src/main/asciidoc/guides/_ugsec_shiro-isisaddons-security-module-realm.adoc
----------------------------------------------------------------------
diff --git a/adocs/documentation/src/main/asciidoc/guides/_ugsec_shiro-isisaddons-security-module-realm.adoc b/adocs/documentation/src/main/asciidoc/guides/_ugsec_shiro-isisaddons-security-module-realm.adoc
index b57bb5f..5406b97 100644
--- a/adocs/documentation/src/main/asciidoc/guides/_ugsec_shiro-isisaddons-security-module-realm.adoc
+++ b/adocs/documentation/src/main/asciidoc/guides/_ugsec_shiro-isisaddons-security-module-realm.adoc
@@ -16,7 +16,7 @@ In order to play along, the module includes a Shiro realm, which fits in as foll
 
 The general configuration is as follows:
 
-image::{_imagesdir}security/security-apis-impl/configure-shiro-to-use-isisaddons-security-module-realm.png[width="600px"]
+image::{_imagesdir}security/security-apis-impl/configure-shiro-to-use-isisaddons-security-module-realm.PNG[width="600px"]
 
 where the `IsisModuleSecurityRealm` realm is the implementation provided by the module.
 
@@ -27,7 +27,7 @@ In the configuration above user passwords are stored in the database.  The modul
 The security module also supports a slightly more sophisticated configuration.  Most organizations use LDAP for user credentials, and maintaining two separate user accounts would be less than ideal.  The `IsisModuleSecurityRealm` can therefore be configured with a subsidiary "delegate" realm that is responsible for performing the primary authentication of the user; if that passes then a user is created (as a domain entity) automatically.
 In most cases this delegate realm will be the LDAP realm, and so the architecture becomes:
 
-image::{_imagesdir}security/security-apis-impl/configure-shiro-to-use-isisaddons-security-module-realm-with-delegate-realm.png[width="600px"]
+image::{_imagesdir}security/security-apis-impl/configure-shiro-to-use-isisaddons-security-module-realm-with-delegate-realm.PNG[width="600px"]
 
 
 The security module has many more features than are described here, all of which are described in the module's link:https://github.com/isisaddons/isis-module-security[README].  The README also explains in detail how to configure an existing app to use this module.


[42/50] [abbrv] isis git commit: ISIS-993: further refactoring, working towards factoring out EntityColumnMembers. However getting an exception when there are two tab groups (with the id/feedback... not sure why yet).

Posted by da...@apache.org.
ISIS-993: further refactoring, working towards factoring out EntityColumnMembers.  However getting an exception when there are two tab groups (with the id/feedback... not sure why yet).


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

Branch: refs/heads/ISIS-993
Commit: 9bad36c92dc61e3465c757c101a7f11d93256bf5
Parents: 01781b8
Author: Dan Haywood <da...@haywood-associates.co.uk>
Authored: Sat Jan 9 09:07:21 2016 +0000
Committer: Dan Haywood <da...@haywood-associates.co.uk>
Committed: Mon Jan 25 14:38:24 2016 +0000

----------------------------------------------------------------------
 .../apache/isis/applib/layout/v1_0/Column.java  |  24 ++++
 .../json/LayoutMetadataReaderFromJson.java      |  10 +-
 .../metamodel/spec/ObjectSpecifications.java    |  28 +---
 .../viewer/wicket/model/models/EntityModel.java |  19 ++-
 .../entity/properties/EntityColumnMembers.java  |  50 ++++++++
 .../entity/properties/EntityPropertiesForm.java | 128 ++++++++++---------
 .../components/entity/properties/PropUtil.java  |  25 +++-
 .../dom/simple/SimpleObject.layout.xml          |  10 +-
 8 files changed, 194 insertions(+), 100 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/isis/blob/9bad36c9/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/Column.java
----------------------------------------------------------------------
diff --git a/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/Column.java b/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/Column.java
index f208a7f..fc8ec6d 100644
--- a/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/Column.java
+++ b/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/Column.java
@@ -28,6 +28,8 @@ import javax.xml.bind.annotation.XmlType;
 
 import com.google.common.collect.Lists;
 
+import org.apache.isis.applib.annotation.MemberGroupLayout;
+
 @XmlType(
         propOrder = {
                 "propertyGroups"
@@ -101,5 +103,27 @@ public class Column implements Serializable {
         this.owner = owner;
     }
 
+    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 Column from(final Tab tab) {
+            if(tab == null) {
+                return null;
+            }
+            if(this == LEFT) return tab.getLeft();
+            if(this == MIDDLE) return tab.getMiddle();
+            if(this == RIGHT) return tab.getRight();
+            throw new IllegalStateException();
+        }
 
+    }
 }

http://git-wip-us.apache.org/repos/asf/isis/blob/9bad36c9/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 215c202..0a29c6f 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
@@ -81,7 +81,7 @@ import org.apache.isis.core.metamodel.layoutmetadata.TypicalLengthFacetRepr;
 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.spec.ObjectSpecifications.MemberGroupLayoutHint;
+import org.apache.isis.applib.layout.v1_0.Column.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;
@@ -462,13 +462,13 @@ public class LayoutMetadataReaderFromJson implements LayoutMetadataReader2 {
         ColumnRepr columnRepr;
         
         columnRepr = addColumnWithSpan(metadata, columnSpans.getLeft());
-        updateColumnMemberGroups(objectSpec, MemberGroupLayoutHint.LEFT, columnRepr, actionIdsForAssociations);
+        updateColumnMemberGroups(objectSpec, Hint.LEFT, columnRepr, actionIdsForAssociations);
         
         columnRepr = addColumnWithSpan(metadata, columnSpans.getMiddle());
-        updateColumnMemberGroups(objectSpec, MemberGroupLayoutHint.MIDDLE, columnRepr, actionIdsForAssociations);
+        updateColumnMemberGroups(objectSpec, Hint.MIDDLE, columnRepr, actionIdsForAssociations);
         
         columnRepr = addColumnWithSpan(metadata, columnSpans.getRight());
-        updateColumnMemberGroups(objectSpec, MemberGroupLayoutHint.RIGHT, columnRepr, actionIdsForAssociations);
+        updateColumnMemberGroups(objectSpec, Hint.RIGHT, columnRepr, actionIdsForAssociations);
         
         columnRepr = addColumnWithSpan(metadata, columnSpans.getCollections());
         updateCollectionColumnRepr(objectSpec, columnRepr, actionIdsForAssociations);
@@ -479,7 +479,7 @@ public class LayoutMetadataReaderFromJson implements LayoutMetadataReader2 {
         return gson.toJson(metadata);
     }
 
-    private static void updateColumnMemberGroups(final ObjectSpecification objectSpec, final MemberGroupLayoutHint hint, final ColumnRepr columnRepr, final Set<String> actionIdsForAssociations) {
+    private static void updateColumnMemberGroups(final ObjectSpecification objectSpec, final Hint hint, final ColumnRepr columnRepr, final Set<String> actionIdsForAssociations) {
         final List<ObjectAssociation> objectAssociations = propertiesOf(objectSpec);
         final Map<String, List<ObjectAssociation>> associationsByGroup = ObjectAssociation.Util.groupByMemberOrderName(objectAssociations
         );

http://git-wip-us.apache.org/repos/asf/isis/blob/9bad36c9/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 2c24f0d..b184d35 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,7 @@ import java.util.Set;
 
 import com.google.common.collect.Lists;
 
-import org.apache.isis.applib.annotation.MemberGroupLayout.ColumnSpans;
 import org.apache.isis.applib.layout.v1_0.Column;
-import org.apache.isis.applib.layout.v1_0.Tab;
 import org.apache.isis.core.metamodel.facets.object.membergroups.MemberGroupLayoutFacet;
 
 
@@ -36,30 +34,10 @@ public final class ObjectSpecifications {
     private ObjectSpecifications() {
     }
 
-    public enum MemberGroupLayoutHint {
-        LEFT,
-        MIDDLE,
-        RIGHT;
-
-        public int from(ColumnSpans columnSpans) {
-            if(this == LEFT) return columnSpans.getLeft();
-            if(this == MIDDLE) return columnSpans.getMiddle();
-            if(this == RIGHT) return columnSpans.getRight();
-            throw new IllegalStateException();
-        }
-
-        public Column from(final Tab tab) {
-            if(this == LEFT) {return tab.getLeft();}
-            if(this == MIDDLE) return tab.getMiddle();
-            if(this == RIGHT) return tab.getRight();
-            throw new IllegalStateException();
-        }
-    }
-
     public static List<String> orderByMemberGroups(
             final ObjectSpecification objSpec,
             final Set<String> groupNamesToOrder,
-            final MemberGroupLayoutHint hint) {
+            final Column.Hint hint) {
 
         final MemberGroupLayoutFacet facet = objSpec.getFacet(MemberGroupLayoutFacet.class);
         final List<String> leftColumnGroupNames = Lists.newArrayList(groupNamesToOrder);
@@ -69,10 +47,10 @@ public final class ObjectSpecifications {
             return leftColumnGroupNames;
         }
         
-        if(hint == MemberGroupLayoutHint.MIDDLE) {
+        if(hint == Column.Hint.MIDDLE) {
             return facet.getColumnSpans().getMiddle()>0? facet.getMiddle(): Collections.<String>emptyList();
         }
-        if(hint == MemberGroupLayoutHint.RIGHT) {
+        if(hint == Column.Hint.RIGHT) {
             return facet.getColumnSpans().getRight()>0? facet.getRight(): Collections.<String>emptyList();
         }
         

http://git-wip-us.apache.org/repos/asf/isis/blob/9bad36c9/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 53b6bd1..bebb67c 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
@@ -44,7 +44,7 @@ import org.apache.isis.core.metamodel.facets.object.bookmarkpolicy.BookmarkPolic
 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.ObjectSpecifications.MemberGroupLayoutHint;
+import org.apache.isis.applib.layout.v1_0.Column.Hint;
 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;
@@ -130,7 +130,7 @@ public class EntityModel extends BookmarkableModel<ObjectAdapter> {
     private Mode mode = Mode.VIEW;
     private RenderingHint renderingHint = RenderingHint.REGULAR;
     private final Map<PropertyMemento, ScalarModel> propertyScalarModels = Maps.newHashMap();
-    private MemberGroupLayoutHint memberGroupLayoutHint;
+    private Hint hint;
 
     /**
      * Toggled by 'entityDetailsButton'.
@@ -451,11 +451,11 @@ public class EntityModel extends BookmarkableModel<ObjectAdapter> {
         entityDetailsVisible = !entityDetailsVisible;
     }
 
-    public MemberGroupLayoutHint getMemberGroupLayoutHint() {
-        return memberGroupLayoutHint;
+    public Hint getHint() {
+        return hint;
     }
-    public void setMemberGroupLayoutHint(MemberGroupLayoutHint memberGroupLayoutHint) {
-        this.memberGroupLayoutHint = memberGroupLayoutHint;
+    public void setHint(Hint hint) {
+        this.hint = hint;
     }
 
     
@@ -649,15 +649,20 @@ public class EntityModel extends BookmarkableModel<ObjectAdapter> {
 
 
     private Column columnMetadata;
+    private Column.Hint columnHint;
 
-    public EntityModel withColumnMetadata(final Column columnMetadata) {
+    public EntityModel withColumnMetadata(final Column columnMetadata, final Column.Hint columnHint) {
         this.columnMetadata = columnMetadata;
+        this.columnHint = columnHint;
         return this;
     }
 
     public Column getColumnMetadata() {
         return columnMetadata;
     }
+    public Column.Hint getColumnHint() {
+        return columnHint;
+    }
 
 
     // //////////////////////////////////////////////////////////

http://git-wip-us.apache.org/repos/asf/isis/blob/9bad36c9/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/properties/EntityColumnMembers.java
----------------------------------------------------------------------
diff --git a/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/properties/EntityColumnMembers.java b/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/properties/EntityColumnMembers.java
new file mode 100644
index 0000000..805a904
--- /dev/null
+++ b/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/properties/EntityColumnMembers.java
@@ -0,0 +1,50 @@
+/*
+ *  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.entity.properties;
+
+import org.apache.wicket.Component;
+
+import org.apache.isis.core.metamodel.adapter.ObjectAdapter;
+import org.apache.isis.viewer.wicket.model.models.EntityModel;
+import org.apache.isis.viewer.wicket.ui.panels.FormAbstract;
+
+public class EntityColumnMembers extends FormAbstract<ObjectAdapter> {
+
+    private static final long serialVersionUID = 1L;
+
+
+    private final Component owningPanel;
+
+    public EntityColumnMembers(
+            final String id,
+            final EntityModel entityModel,
+            final Component owningPanel) {
+
+        super(id, entityModel);
+        this.owningPanel = owningPanel; // for repainting
+
+        buildGui();
+    }
+
+    private void buildGui() {
+
+        final EntityModel entityModel = (EntityModel) getModel();
+
+    }
+}

http://git-wip-us.apache.org/repos/asf/isis/blob/9bad36c9/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/properties/EntityPropertiesForm.java
----------------------------------------------------------------------
diff --git a/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/properties/EntityPropertiesForm.java b/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/properties/EntityPropertiesForm.java
index f0ba38d..1f8792a 100644
--- a/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/properties/EntityPropertiesForm.java
+++ b/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/properties/EntityPropertiesForm.java
@@ -64,7 +64,7 @@ import org.apache.isis.core.metamodel.facets.object.membergroups.MemberGroupLayo
 import org.apache.isis.core.metamodel.runtimecontext.ServicesInjector;
 import org.apache.isis.core.metamodel.spec.ObjectSpecification;
 import org.apache.isis.core.metamodel.spec.ObjectSpecifications;
-import org.apache.isis.core.metamodel.spec.ObjectSpecifications.MemberGroupLayoutHint;
+import org.apache.isis.applib.layout.v1_0.Column.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;
@@ -151,7 +151,6 @@ public class EntityPropertiesForm extends FormAbstract<ObjectAdapter> implements
     private void buildGui() {
 
         final EntityModel entityModel = (EntityModel) getModel();
-
         final Tab tabMetaDataIfAny = entityModel.getTabMetadata();
 
         final ColumnSpans columnSpans;
@@ -169,71 +168,71 @@ public class EntityPropertiesForm extends FormAbstract<ObjectAdapter> implements
         }
 
         renderedFirstField = false;
-        
+
         // 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);
-        
-        boolean addedProperties;
-        if(columnSpans.getLeft() > 0) {
-            final MemberGroupLayoutHint hint = MemberGroupLayoutHint.LEFT;
-
-            final Column columnMetaDataIfAny = tabMetaDataIfAny != null ? hint
-                    .from(tabMetaDataIfAny) : null;
-            addPropertiesAndCollections(leftColumn, hint, entityModel,
-                    columnSpans, columnMetaDataIfAny);
-
-            final ObjectAdapter adapter = entityModel.getObject();
-            final ObjectSpecification objSpec = adapter.getSpecification();
 
-            final Map<String, List<ObjectAssociation>> associationsByGroup =
-                    PropUtil
-                    .propertiesByMemberOrder(adapter);
+        if(columnSpans.getLeft() > 0) {
 
-            final List<String> groupNames = columnMetaDataIfAny != null
-                    ? FluentIterable
-                    .from(columnMetaDataIfAny.getPropertyGroups())
-                    .transform(PropertyGroup.Util.nameOf())
-                    .toList()
-                    : ObjectSpecifications.orderByMemberGroups(objSpec, associationsByGroup.keySet(),
-                    hint);
+            addPropertiesAndCollections(leftColumn, entityModel, tabMetaDataIfAny, Hint.LEFT);
 
-            addedProperties = !groupNames.isEmpty();
-            addButtons(leftColumn);
-            addFeedbackGui(leftColumn);
         } else {
             Components.permanentlyHide(this, ID_LEFT_COLUMN);
-            addedProperties = false;
         }
-        if(!addedProperties) {
-            // a bit hacky...
-            Components.permanentlyHide(this,
-                    ID_EDIT_BUTTON, ID_OK_BUTTON, ID_CANCEL_BUTTON,
-                    ID_FEEDBACK);
-        }
-        
+
         // middle column
+        MarkupContainer middleColumn;
         if(columnSpans.getMiddle() > 0) {
-            MarkupContainer middleColumn = new WebMarkupContainer(ID_MIDDLE_COLUMN);
+            middleColumn = new WebMarkupContainer(ID_MIDDLE_COLUMN);
             add(middleColumn);
-            final Column columnMetaDataIfAny = tabMetaDataIfAny != null ? MemberGroupLayoutHint.MIDDLE
-                    .from(tabMetaDataIfAny) : null;
-            addPropertiesAndCollections(middleColumn, MemberGroupLayoutHint.MIDDLE, entityModel, columnSpans, columnMetaDataIfAny);
+
+            addPropertiesAndCollections(middleColumn, entityModel, tabMetaDataIfAny, Hint.MIDDLE);
         } else {
+            middleColumn = null;
             Components.permanentlyHide(this, ID_MIDDLE_COLUMN);
         }
 
         // right column
+        MarkupContainer rightColumn;
         if(columnSpans.getRight() > 0) {
-            MarkupContainer rightColumn = new WebMarkupContainer(ID_RIGHT_COLUMN);
+            rightColumn = new WebMarkupContainer(ID_RIGHT_COLUMN);
             add(rightColumn);
-            final Column columnMetaDataIfAny = tabMetaDataIfAny != null ? MemberGroupLayoutHint.RIGHT
-                    .from(tabMetaDataIfAny) : null;
-            addPropertiesAndCollections(rightColumn, MemberGroupLayoutHint.RIGHT, entityModel, columnSpans, columnMetaDataIfAny);
+
+            addPropertiesAndCollections(rightColumn, entityModel, tabMetaDataIfAny, 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
+        final Hint leftHint = Hint.LEFT;
+        final Column leftColumnMetaDataIfAny = leftHint.from(tabMetaDataIfAny);
+        final List<String> groupNames = PropUtil.propertyGroupNames(entityModel, leftHint, leftColumnMetaDataIfAny);
+        final boolean hasProperties = !groupNames.isEmpty();
+        if (hasProperties) {
+            addButtons(leftColumn);
+            addFeedbackGui(leftColumn);
+
+        } else {
+            Components.permanentlyHide(this,
+                    ID_EDIT_BUTTON, ID_OK_BUTTON, ID_CANCEL_BUTTON,
+                    ID_FEEDBACK);
+        }
+
+
         // collections (only if not being added to a tab)
         if(tabMetaDataIfAny == null && columnSpans.getCollections() > 0) {
             final String idCollectionsToShow;
@@ -262,20 +261,31 @@ public class EntityPropertiesForm extends FormAbstract<ObjectAdapter> implements
     }
 
     private void addPropertiesAndCollections(
-            final MarkupContainer col,
-            final MemberGroupLayoutHint hint,
+            final MarkupContainer middleColumn,
             final EntityModel entityModel,
-            final ColumnSpans columnSpans, final Column columnMetaDataIfAny) {
-        addPropertiesInColumn(col, hint, entityModel, columnSpans, columnMetaDataIfAny);
-        addCollectionsIfRequired(col, entityModel, columnMetaDataIfAny);
+            final Tab tabMetaDataIfAny, final Hint hint) {
+        final Column columnMetaDataIfAny = hint.from(tabMetaDataIfAny);
+
+        final EntityModel entityModelWithHints =
+                new EntityModel(entityModel.getPageParameters())
+                        .withColumnMetadata(columnMetaDataIfAny, hint);
+
+        addPropertiesAndCollections(middleColumn, entityModelWithHints);
+    }
+
+    private void addPropertiesAndCollections(
+            final MarkupContainer col,
+            final EntityModel entityModel) {
+        addPropertiesInColumn(col, entityModel);
+        addCollectionsIfRequired(col, entityModel);
     }
 
     private void addPropertiesInColumn(
             final MarkupContainer markupContainer,
-            final MemberGroupLayoutHint hint,
-            final EntityModel entityModel,
-            final ColumnSpans columnSpans, final Column columnMetaDataIfAny) {
-        final int span = hint.from(columnSpans);
+            final EntityModel entityModel) {
+
+        final Column columnMetaDataIfAny = entityModel.getColumnMetadata();
+        final Hint hint = entityModel.getColumnHint();
         final ObjectAdapter adapter = entityModel.getObject();
         final ObjectSpecification objSpec = adapter.getSpecification();
 
@@ -327,19 +337,17 @@ public class EntityPropertiesForm extends FormAbstract<ObjectAdapter> implements
                     actionsPanelDropDown,
                     AdditionalLinksPanel.Style.DROPDOWN);
         }
-
-        addClassForSpan(markupContainer, span);
     }
 
     private void addCollectionsIfRequired(
             final MarkupContainer column,
-            final EntityModel entityModel,
-            final Column columnMetaDataIfAny) {
+            final EntityModel entityModel) {
+
+        final Column columnMetaDataIfAny = entityModel.getColumnMetadata();
+
         if(columnMetaDataIfAny != null) {
-            final EntityModel modelWithMetadata = new EntityModel(entityModel.getPageParameters()).withColumnMetadata(
-                    columnMetaDataIfAny);
             getComponentFactoryRegistry()
-                    .addOrReplaceComponent(column, "collections", ComponentType.ENTITY_COLLECTIONS, modelWithMetadata);
+                    .addOrReplaceComponent(column, "collections", ComponentType.ENTITY_COLLECTIONS, entityModel);
         } else {
             Components.permanentlyHide(column, "collections");
         }

http://git-wip-us.apache.org/repos/asf/isis/blob/9bad36c9/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/properties/PropUtil.java
----------------------------------------------------------------------
diff --git a/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/properties/PropUtil.java b/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/properties/PropUtil.java
index 23a9a8d..ff0d5b8 100644
--- a/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/properties/PropUtil.java
+++ b/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/properties/PropUtil.java
@@ -21,20 +21,44 @@ package org.apache.isis.viewer.wicket.ui.components.entity.properties;
 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.applib.layout.v1_0.Column;
+import org.apache.isis.applib.layout.v1_0.PropertyGroup;
 import org.apache.isis.core.metamodel.adapter.ObjectAdapter;
 import org.apache.isis.core.metamodel.consent.InteractionInitiatedBy;
 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() {
     }
 
+    static List<String> propertyGroupNames(
+            final EntityModel entityModel,
+            final Column.Hint hint, final Column 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.getPropertyGroups())
+                .transform(PropertyGroup.Util.nameOf())
+                .toList()
+                : ObjectSpecifications.orderByMemberGroups(objSpec, associationsByGroup.keySet(),
+                hint);
+    }
+
     static Map<String, List<ObjectAssociation>> propertiesByMemberOrder(final ObjectAdapter adapter) {
         final List<ObjectAssociation> properties = visibleProperties(adapter);
         return ObjectAssociation.Util.groupByMemberOrderName(properties);
@@ -64,5 +88,4 @@ public final class PropUtil {
                 filter);
     }
 
-
 }

http://git-wip-us.apache.org/repos/asf/isis/blob/9bad36c9/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 c9e7ac8..7d4f0e4 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,8 +15,6 @@
                 </propertyGroup>
             </left>
             <right span="6">
-                <collection id="similarTo" defaultView="table"/>
-                <collection id="others" defaultView="hide"/>
             </right>
         </tab>
         <tab name="Metadata">
@@ -31,4 +29,12 @@
             </left>
         </tab>
     </tabGroup>
+    <tabGroup>
+        <tab name="Collections">
+            <left span="6">
+                <collection id="similarTo" defaultView="table"/>
+                <collection id="others" defaultView="hide"/>
+            </left>
+        </tab>
+    </tabGroup>
 </objectLayout>
\ No newline at end of file


[04/50] [abbrv] isis git commit: ISIS-1296: updating pom.xml to use Isis 1.11.1; fixing JDOQL strings; reinstating eclipse .launch files (with some minor renames/rationalization and now using app manifests)

Posted by da...@apache.org.
ISIS-1296: updating pom.xml to use Isis 1.11.1; fixing JDOQL strings; reinstating eclipse .launch files (with some minor renames/rationalization and now using app manifests)


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

Branch: refs/heads/ISIS-993
Commit: 0915e033657862f994d199040ef0631656fef305
Parents: 277f4cb
Author: Dan Haywood <da...@haywood-associates.co.uk>
Authored: Sun Jan 10 15:03:29 2016 +0000
Committer: Dan Haywood <da...@haywood-associates.co.uk>
Committed: Sun Jan 10 15:03:29 2016 +0000

----------------------------------------------------------------------
 .../java/domainapp/dom/simple/SimpleObject.java |  4 +--
 example/application/simpleapp/pom.xml           |  2 +-
 .../webapp/ide/eclipse/launch/.gitignore        |  8 +----
 .../ide/eclipse/launch/SimpleApp-JREBEL.launch  | 31 ++++++++++++++++++++
 .../launch/SimpleApp-PROTOTYPE-jrebel.launch    | 31 --------------------
 .../SimpleApp-PROTOTYPE-no-fixtures.launch      | 23 ---------------
 ...OTOTYPE-with-fixtures-bypass-security.launch | 20 +++++++++++++
 .../SimpleApp-PROTOTYPE-with-fixtures.launch    |  2 +-
 .../eclipse/launch/SimpleApp-PROTOTYPE.launch   | 20 +++++++++++++
 .../launch/SimpleApp-SERVER-no-fixtures.launch  | 23 ---------------
 .../ide/eclipse/launch/SimpleApp-SERVER.launch  | 20 +++++++++++++
 11 files changed, 96 insertions(+), 88 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/isis/blob/0915e033/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 a5fe4ef..2c0bc1f 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
@@ -54,11 +54,11 @@ import org.apache.isis.applib.util.ObjectContracts;
         @javax.jdo.annotations.Query(
                 name = "find", language = "JDOQL",
                 value = "SELECT "
-                        + "FROM domainapp.dom.modules.simple.SimpleObject "),
+                        + "FROM domainapp.dom.simple.SimpleObject "),
         @javax.jdo.annotations.Query(
                 name = "findByName", language = "JDOQL",
                 value = "SELECT "
-                        + "FROM domainapp.dom.modules.simple.SimpleObject "
+                        + "FROM domainapp.dom.simple.SimpleObject "
                         + "WHERE name.indexOf(:name) >= 0 ")
 })
 @javax.jdo.annotations.Unique(name="SimpleObject_name_UNQ", members = {"name"})

http://git-wip-us.apache.org/repos/asf/isis/blob/0915e033/example/application/simpleapp/pom.xml
----------------------------------------------------------------------
diff --git a/example/application/simpleapp/pom.xml b/example/application/simpleapp/pom.xml
index f3f0dc8..5724121 100644
--- a/example/application/simpleapp/pom.xml
+++ b/example/application/simpleapp/pom.xml
@@ -34,7 +34,7 @@
     </prerequisites>
 
     <properties>
-        <isis.version>1.11.0</isis.version>
+        <isis.version>1.11.1</isis.version>
 
         <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
         <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>

http://git-wip-us.apache.org/repos/asf/isis/blob/0915e033/example/application/simpleapp/webapp/ide/eclipse/launch/.gitignore
----------------------------------------------------------------------
diff --git a/example/application/simpleapp/webapp/ide/eclipse/launch/.gitignore b/example/application/simpleapp/webapp/ide/eclipse/launch/.gitignore
index 3d97345..1d44fd4 100644
--- a/example/application/simpleapp/webapp/ide/eclipse/launch/.gitignore
+++ b/example/application/simpleapp/webapp/ide/eclipse/launch/.gitignore
@@ -1,8 +1,2 @@
 /SimpleApp-PROTOTYPE-jrebel.launch
-/SimpleApp-PROTOTYPE-no-fixtures.launch
-/SimpleApp-PROTOTYPE-with-fixtures.launch
-/SimpleApp-SERVER-no-fixtures.launch
-/SimpleApp-PROTOTYPE-jrebel.launch
-/SimpleApp-PROTOTYPE-no-fixtures.launch
-/SimpleApp-PROTOTYPE-with-fixtures.launch
-/SimpleApp-SERVER-no-fixtures.launch
+/SimpleApp-jrebel.launch

http://git-wip-us.apache.org/repos/asf/isis/blob/0915e033/example/application/simpleapp/webapp/ide/eclipse/launch/SimpleApp-JREBEL.launch
----------------------------------------------------------------------
diff --git a/example/application/simpleapp/webapp/ide/eclipse/launch/SimpleApp-JREBEL.launch b/example/application/simpleapp/webapp/ide/eclipse/launch/SimpleApp-JREBEL.launch
new file mode 100644
index 0000000..e45f7f0
--- /dev/null
+++ b/example/application/simpleapp/webapp/ide/eclipse/launch/SimpleApp-JREBEL.launch
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<launchConfiguration type="org.eclipse.jdt.launching.localJavaApplication">
+<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
+<listEntry value="/isis-core-webserver/src/main/java/org/apache/isis/WebServer.java"/>
+</listAttribute>
+<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
+<listEntry value="1"/>
+</listAttribute>
+<mapAttribute key="org.eclipse.debug.core.preferred_launchers">
+<mapEntry key="[debug]" value="org.eclipse.jdt.launching.localJavaApplication"/>
+<mapEntry key="[run]" value="org.eclipse.jdt.launching.localJavaApplication"/>
+</mapAttribute>
+<stringAttribute key="org.eclipse.debug.core.source_locator_id" value="org.eclipse.jdt.launching.sourceLocator.JavaSourceLookupDirector"/>
+<stringAttribute key="org.eclipse.debug.core.source_locator_memento" value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&#13;&#10;&lt;sourceLookupDirector&gt;&#13;&#10;&lt;sourceContainers duplicates=&quot;false&quot;&gt;&#13;&#10;&lt;container memento=&quot;&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot; standalone=&amp;quot;no&amp;quot;?&amp;gt;&amp;#13;&amp;#10;&amp;lt;javaProject name=&amp;quot;isis-jrebel-plugin&amp;quot;/&amp;gt;&amp;#13;&amp;#10;&quot; typeId=&quot;org.eclipse.jdt.launching.sourceContainer.javaProject&quot;/&gt;&#13;&#10;&lt;container memento=&quot;&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot; standalone=&amp;quot;no&amp;quot;?&amp;gt;&amp;#13;&amp;#10;&amp;lt;default/&amp;gt;&amp;#13;&amp;#10;&quot; typeId=&quot;org.eclipse.debug.core.containerType.default&quot;/&gt;&#13;&#10;&lt;/sourceContainers&gt;&#13;&#10;&lt;/sourceLookupDirector&gt;&#13;&#10
 ;"/>
+<listAttribute key="org.eclipse.debug.ui.favoriteGroups">
+<listEntry value="org.eclipse.debug.ui.launchGroup.run"/>
+</listAttribute>
+<booleanAttribute key="org.eclipse.jdt.debug.ui.INCLUDE_EXTERNAL_JARS" value="true"/>
+<listAttribute key="org.eclipse.jdt.launching.CLASSPATH">
+<listEntry value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&#13;&#10;&lt;runtimeClasspathEntry containerPath=&quot;org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6&quot; path=&quot;1&quot; type=&quot;4&quot;/&gt;&#13;&#10;"/>
+<listEntry value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&#13;&#10;&lt;runtimeClasspathEntry path=&quot;3&quot; projectName=&quot;simple_wicket_restful_jdo-webapp&quot; type=&quot;1&quot;/&gt;&#13;&#10;"/>
+<listEntry value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&#13;&#10;&lt;runtimeClasspathEntry containerPath=&quot;org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER&quot; path=&quot;3&quot; type=&quot;4&quot;/&gt;&#13;&#10;"/>
+</listAttribute>
+<stringAttribute key="org.eclipse.jdt.launching.CLASSPATH_PROVIDER" value="org.eclipse.m2e.launchconfig.classpathProvider"/>
+<booleanAttribute key="org.eclipse.jdt.launching.DEFAULT_CLASSPATH" value="true"/>
+<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="org.apache.isis.WebServer"/>
+<stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="--port 8080 --type PROTOTYPE"/>
+<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="simpleapp-webapp"/>
+<stringAttribute key="org.eclipse.jdt.launching.SOURCE_PATH_PROVIDER" value="org.eclipse.m2e.launchconfig.sourcepathProvider"/>
+<stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="${jrebel_args} -Drebel.log=false -Drebel.check_class_hash=true -Drebel.packages_exclude=org.apache.isis -Dproject.root=${project_loc}/.. -Dtarget.dir=target-ide -Drebel.plugins=C:/github/danhaywood/isis-jrebel-plugin/target/danhaywood-isis-jrebel-plugin-1.0.0-SNAPSHOT.jar -Disis-jrebel-plugin.packagePrefix=dom.simple,org.apache.isis.objectstore.jdo.applib -Disis-jrebel-plugin.loggingLevel=warn -XX:MaxPermSize=128m"/>
+</launchConfiguration>

http://git-wip-us.apache.org/repos/asf/isis/blob/0915e033/example/application/simpleapp/webapp/ide/eclipse/launch/SimpleApp-PROTOTYPE-jrebel.launch
----------------------------------------------------------------------
diff --git a/example/application/simpleapp/webapp/ide/eclipse/launch/SimpleApp-PROTOTYPE-jrebel.launch b/example/application/simpleapp/webapp/ide/eclipse/launch/SimpleApp-PROTOTYPE-jrebel.launch
deleted file mode 100644
index e45f7f0..0000000
--- a/example/application/simpleapp/webapp/ide/eclipse/launch/SimpleApp-PROTOTYPE-jrebel.launch
+++ /dev/null
@@ -1,31 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<launchConfiguration type="org.eclipse.jdt.launching.localJavaApplication">
-<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
-<listEntry value="/isis-core-webserver/src/main/java/org/apache/isis/WebServer.java"/>
-</listAttribute>
-<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
-<listEntry value="1"/>
-</listAttribute>
-<mapAttribute key="org.eclipse.debug.core.preferred_launchers">
-<mapEntry key="[debug]" value="org.eclipse.jdt.launching.localJavaApplication"/>
-<mapEntry key="[run]" value="org.eclipse.jdt.launching.localJavaApplication"/>
-</mapAttribute>
-<stringAttribute key="org.eclipse.debug.core.source_locator_id" value="org.eclipse.jdt.launching.sourceLocator.JavaSourceLookupDirector"/>
-<stringAttribute key="org.eclipse.debug.core.source_locator_memento" value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&#13;&#10;&lt;sourceLookupDirector&gt;&#13;&#10;&lt;sourceContainers duplicates=&quot;false&quot;&gt;&#13;&#10;&lt;container memento=&quot;&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot; standalone=&amp;quot;no&amp;quot;?&amp;gt;&amp;#13;&amp;#10;&amp;lt;javaProject name=&amp;quot;isis-jrebel-plugin&amp;quot;/&amp;gt;&amp;#13;&amp;#10;&quot; typeId=&quot;org.eclipse.jdt.launching.sourceContainer.javaProject&quot;/&gt;&#13;&#10;&lt;container memento=&quot;&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot; standalone=&amp;quot;no&amp;quot;?&amp;gt;&amp;#13;&amp;#10;&amp;lt;default/&amp;gt;&amp;#13;&amp;#10;&quot; typeId=&quot;org.eclipse.debug.core.containerType.default&quot;/&gt;&#13;&#10;&lt;/sourceContainers&gt;&#13;&#10;&lt;/sourceLookupDirector&gt;&#13;&#10
 ;"/>
-<listAttribute key="org.eclipse.debug.ui.favoriteGroups">
-<listEntry value="org.eclipse.debug.ui.launchGroup.run"/>
-</listAttribute>
-<booleanAttribute key="org.eclipse.jdt.debug.ui.INCLUDE_EXTERNAL_JARS" value="true"/>
-<listAttribute key="org.eclipse.jdt.launching.CLASSPATH">
-<listEntry value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&#13;&#10;&lt;runtimeClasspathEntry containerPath=&quot;org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6&quot; path=&quot;1&quot; type=&quot;4&quot;/&gt;&#13;&#10;"/>
-<listEntry value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&#13;&#10;&lt;runtimeClasspathEntry path=&quot;3&quot; projectName=&quot;simple_wicket_restful_jdo-webapp&quot; type=&quot;1&quot;/&gt;&#13;&#10;"/>
-<listEntry value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&#13;&#10;&lt;runtimeClasspathEntry containerPath=&quot;org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER&quot; path=&quot;3&quot; type=&quot;4&quot;/&gt;&#13;&#10;"/>
-</listAttribute>
-<stringAttribute key="org.eclipse.jdt.launching.CLASSPATH_PROVIDER" value="org.eclipse.m2e.launchconfig.classpathProvider"/>
-<booleanAttribute key="org.eclipse.jdt.launching.DEFAULT_CLASSPATH" value="true"/>
-<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="org.apache.isis.WebServer"/>
-<stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="--port 8080 --type PROTOTYPE"/>
-<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="simpleapp-webapp"/>
-<stringAttribute key="org.eclipse.jdt.launching.SOURCE_PATH_PROVIDER" value="org.eclipse.m2e.launchconfig.sourcepathProvider"/>
-<stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="${jrebel_args} -Drebel.log=false -Drebel.check_class_hash=true -Drebel.packages_exclude=org.apache.isis -Dproject.root=${project_loc}/.. -Dtarget.dir=target-ide -Drebel.plugins=C:/github/danhaywood/isis-jrebel-plugin/target/danhaywood-isis-jrebel-plugin-1.0.0-SNAPSHOT.jar -Disis-jrebel-plugin.packagePrefix=dom.simple,org.apache.isis.objectstore.jdo.applib -Disis-jrebel-plugin.loggingLevel=warn -XX:MaxPermSize=128m"/>
-</launchConfiguration>

http://git-wip-us.apache.org/repos/asf/isis/blob/0915e033/example/application/simpleapp/webapp/ide/eclipse/launch/SimpleApp-PROTOTYPE-no-fixtures.launch
----------------------------------------------------------------------
diff --git a/example/application/simpleapp/webapp/ide/eclipse/launch/SimpleApp-PROTOTYPE-no-fixtures.launch b/example/application/simpleapp/webapp/ide/eclipse/launch/SimpleApp-PROTOTYPE-no-fixtures.launch
deleted file mode 100644
index 96a9a54..0000000
--- a/example/application/simpleapp/webapp/ide/eclipse/launch/SimpleApp-PROTOTYPE-no-fixtures.launch
+++ /dev/null
@@ -1,23 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<launchConfiguration type="org.eclipse.jdt.launching.localJavaApplication">
-<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
-<listEntry value="/isis-core-webserver/src/main/java/org/apache/isis/WebServer.java"/>
-</listAttribute>
-<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
-<listEntry value="1"/>
-</listAttribute>
-<mapAttribute key="org.eclipse.debug.core.preferred_launchers">
-<mapEntry key="[debug]" value="org.eclipse.jdt.launching.localJavaApplication"/>
-<mapEntry key="[run]" value="org.eclipse.jdt.launching.localJavaApplication"/>
-</mapAttribute>
-<stringAttribute key="org.eclipse.debug.core.source_locator_id" value="org.eclipse.jdt.launching.sourceLocator.JavaSourceLookupDirector"/>
-<listAttribute key="org.eclipse.debug.ui.favoriteGroups">
-<listEntry value="org.eclipse.debug.ui.launchGroup.debug"/>
-</listAttribute>
-<booleanAttribute key="org.eclipse.jdt.debug.ui.INCLUDE_EXTERNAL_JARS" value="true"/>
-<stringAttribute key="org.eclipse.jdt.launching.CLASSPATH_PROVIDER" value="org.eclipse.m2e.launchconfig.classpathProvider"/>
-<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="org.apache.isis.WebServer"/>
-<stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="--port 8080 --type SERVER_PROTOTYPE"/>
-<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="simpleapp-webapp"/>
-<stringAttribute key="org.eclipse.jdt.launching.SOURCE_PATH_PROVIDER" value="org.eclipse.m2e.launchconfig.sourcepathProvider"/>
-</launchConfiguration>

http://git-wip-us.apache.org/repos/asf/isis/blob/0915e033/example/application/simpleapp/webapp/ide/eclipse/launch/SimpleApp-PROTOTYPE-with-fixtures-bypass-security.launch
----------------------------------------------------------------------
diff --git a/example/application/simpleapp/webapp/ide/eclipse/launch/SimpleApp-PROTOTYPE-with-fixtures-bypass-security.launch b/example/application/simpleapp/webapp/ide/eclipse/launch/SimpleApp-PROTOTYPE-with-fixtures-bypass-security.launch
new file mode 100644
index 0000000..16e483a
--- /dev/null
+++ b/example/application/simpleapp/webapp/ide/eclipse/launch/SimpleApp-PROTOTYPE-with-fixtures-bypass-security.launch
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<launchConfiguration type="org.eclipse.jdt.launching.localJavaApplication">
+<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
+<listEntry value="/isis-core-webserver/src/main/java/org/apache/isis/WebServer.java"/>
+</listAttribute>
+<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
+<listEntry value="1"/>
+</listAttribute>
+<mapAttribute key="org.eclipse.debug.core.preferred_launchers">
+<mapEntry key="[debug]" value="org.eclipse.jdt.launching.localJavaApplication"/>
+<mapEntry key="[run]" value="org.eclipse.jdt.launching.localJavaApplication"/>
+</mapAttribute>
+<stringAttribute key="org.eclipse.debug.core.source_locator_id" value="org.eclipse.jdt.launching.sourceLocator.JavaSourceLookupDirector"/>
+<booleanAttribute key="org.eclipse.jdt.debug.ui.INCLUDE_EXTERNAL_JARS" value="true"/>
+<stringAttribute key="org.eclipse.jdt.launching.CLASSPATH_PROVIDER" value="org.eclipse.m2e.launchconfig.classpathProvider"/>
+<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="org.apache.isis.WebServer"/>
+<stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="--type SERVER_PROTOTYPE --manifest domainapp.app.DomainAppAppManifestWithFixturesBypassSecurity"/>
+<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="simpleapp-webapp"/>
+<stringAttribute key="org.eclipse.jdt.launching.SOURCE_PATH_PROVIDER" value="org.eclipse.m2e.launchconfig.sourcepathProvider"/>
+</launchConfiguration>

http://git-wip-us.apache.org/repos/asf/isis/blob/0915e033/example/application/simpleapp/webapp/ide/eclipse/launch/SimpleApp-PROTOTYPE-with-fixtures.launch
----------------------------------------------------------------------
diff --git a/example/application/simpleapp/webapp/ide/eclipse/launch/SimpleApp-PROTOTYPE-with-fixtures.launch b/example/application/simpleapp/webapp/ide/eclipse/launch/SimpleApp-PROTOTYPE-with-fixtures.launch
index dbfb2b3..659195c 100644
--- a/example/application/simpleapp/webapp/ide/eclipse/launch/SimpleApp-PROTOTYPE-with-fixtures.launch
+++ b/example/application/simpleapp/webapp/ide/eclipse/launch/SimpleApp-PROTOTYPE-with-fixtures.launch
@@ -14,7 +14,7 @@
 <booleanAttribute key="org.eclipse.jdt.debug.ui.INCLUDE_EXTERNAL_JARS" value="true"/>
 <stringAttribute key="org.eclipse.jdt.launching.CLASSPATH_PROVIDER" value="org.eclipse.m2e.launchconfig.classpathProvider"/>
 <stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="org.apache.isis.WebServer"/>
-<stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="--port 8080 -D isis.persistor.datanucleus.install-fixtures=true --type SERVER_PROTOTYPE"/>
+<stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="--type SERVER_PROTOTYPE --manifest domainapp.app.DomainAppAppManifestWithFixtures"/>
 <stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="simpleapp-webapp"/>
 <stringAttribute key="org.eclipse.jdt.launching.SOURCE_PATH_PROVIDER" value="org.eclipse.m2e.launchconfig.sourcepathProvider"/>
 </launchConfiguration>

http://git-wip-us.apache.org/repos/asf/isis/blob/0915e033/example/application/simpleapp/webapp/ide/eclipse/launch/SimpleApp-PROTOTYPE.launch
----------------------------------------------------------------------
diff --git a/example/application/simpleapp/webapp/ide/eclipse/launch/SimpleApp-PROTOTYPE.launch b/example/application/simpleapp/webapp/ide/eclipse/launch/SimpleApp-PROTOTYPE.launch
new file mode 100644
index 0000000..7e1303a
--- /dev/null
+++ b/example/application/simpleapp/webapp/ide/eclipse/launch/SimpleApp-PROTOTYPE.launch
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<launchConfiguration type="org.eclipse.jdt.launching.localJavaApplication">
+<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
+<listEntry value="/isis-core-webserver/src/main/java/org/apache/isis/WebServer.java"/>
+</listAttribute>
+<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
+<listEntry value="1"/>
+</listAttribute>
+<mapAttribute key="org.eclipse.debug.core.preferred_launchers">
+<mapEntry key="[debug]" value="org.eclipse.jdt.launching.localJavaApplication"/>
+<mapEntry key="[run]" value="org.eclipse.jdt.launching.localJavaApplication"/>
+</mapAttribute>
+<stringAttribute key="org.eclipse.debug.core.source_locator_id" value="org.eclipse.jdt.launching.sourceLocator.JavaSourceLookupDirector"/>
+<booleanAttribute key="org.eclipse.jdt.debug.ui.INCLUDE_EXTERNAL_JARS" value="true"/>
+<stringAttribute key="org.eclipse.jdt.launching.CLASSPATH_PROVIDER" value="org.eclipse.m2e.launchconfig.classpathProvider"/>
+<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="org.apache.isis.WebServer"/>
+<stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="--type SERVER_PROTOTYPE"/>
+<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="simpleapp-webapp"/>
+<stringAttribute key="org.eclipse.jdt.launching.SOURCE_PATH_PROVIDER" value="org.eclipse.m2e.launchconfig.sourcepathProvider"/>
+</launchConfiguration>

http://git-wip-us.apache.org/repos/asf/isis/blob/0915e033/example/application/simpleapp/webapp/ide/eclipse/launch/SimpleApp-SERVER-no-fixtures.launch
----------------------------------------------------------------------
diff --git a/example/application/simpleapp/webapp/ide/eclipse/launch/SimpleApp-SERVER-no-fixtures.launch b/example/application/simpleapp/webapp/ide/eclipse/launch/SimpleApp-SERVER-no-fixtures.launch
deleted file mode 100644
index 238b5a6..0000000
--- a/example/application/simpleapp/webapp/ide/eclipse/launch/SimpleApp-SERVER-no-fixtures.launch
+++ /dev/null
@@ -1,23 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<launchConfiguration type="org.eclipse.jdt.launching.localJavaApplication">
-<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
-<listEntry value="/isis-core-webserver/src/main/java/org/apache/isis/WebServer.java"/>
-</listAttribute>
-<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
-<listEntry value="1"/>
-</listAttribute>
-<mapAttribute key="org.eclipse.debug.core.preferred_launchers">
-<mapEntry key="[debug]" value="org.eclipse.jdt.launching.localJavaApplication"/>
-<mapEntry key="[run]" value="org.eclipse.jdt.launching.localJavaApplication"/>
-</mapAttribute>
-<stringAttribute key="org.eclipse.debug.core.source_locator_id" value="org.eclipse.jdt.launching.sourceLocator.JavaSourceLookupDirector"/>
-<listAttribute key="org.eclipse.debug.ui.favoriteGroups">
-<listEntry value="org.eclipse.debug.ui.launchGroup.run"/>
-</listAttribute>
-<booleanAttribute key="org.eclipse.jdt.debug.ui.INCLUDE_EXTERNAL_JARS" value="true"/>
-<stringAttribute key="org.eclipse.jdt.launching.CLASSPATH_PROVIDER" value="org.eclipse.m2e.launchconfig.classpathProvider"/>
-<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="org.apache.isis.WebServer"/>
-<stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="--port 8080 --type SERVER"/>
-<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="simpleapp-webapp"/>
-<stringAttribute key="org.eclipse.jdt.launching.SOURCE_PATH_PROVIDER" value="org.eclipse.m2e.launchconfig.sourcepathProvider"/>
-</launchConfiguration>

http://git-wip-us.apache.org/repos/asf/isis/blob/0915e033/example/application/simpleapp/webapp/ide/eclipse/launch/SimpleApp-SERVER.launch
----------------------------------------------------------------------
diff --git a/example/application/simpleapp/webapp/ide/eclipse/launch/SimpleApp-SERVER.launch b/example/application/simpleapp/webapp/ide/eclipse/launch/SimpleApp-SERVER.launch
new file mode 100644
index 0000000..deccfe8
--- /dev/null
+++ b/example/application/simpleapp/webapp/ide/eclipse/launch/SimpleApp-SERVER.launch
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<launchConfiguration type="org.eclipse.jdt.launching.localJavaApplication">
+<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
+<listEntry value="/isis-core-webserver/src/main/java/org/apache/isis/WebServer.java"/>
+</listAttribute>
+<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
+<listEntry value="1"/>
+</listAttribute>
+<mapAttribute key="org.eclipse.debug.core.preferred_launchers">
+<mapEntry key="[debug]" value="org.eclipse.jdt.launching.localJavaApplication"/>
+<mapEntry key="[run]" value="org.eclipse.jdt.launching.localJavaApplication"/>
+</mapAttribute>
+<stringAttribute key="org.eclipse.debug.core.source_locator_id" value="org.eclipse.jdt.launching.sourceLocator.JavaSourceLookupDirector"/>
+<booleanAttribute key="org.eclipse.jdt.debug.ui.INCLUDE_EXTERNAL_JARS" value="true"/>
+<stringAttribute key="org.eclipse.jdt.launching.CLASSPATH_PROVIDER" value="org.eclipse.m2e.launchconfig.classpathProvider"/>
+<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="org.apache.isis.WebServer"/>
+<stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="--type SERVER"/>
+<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="simpleapp-webapp"/>
+<stringAttribute key="org.eclipse.jdt.launching.SOURCE_PATH_PROVIDER" value="org.eclipse.m2e.launchconfig.sourcepathProvider"/>
+</launchConfiguration>


[11/50] [abbrv] isis git commit: ISIS-1296: updating website and status for 1.11.1 release.

Posted by da...@apache.org.
ISIS-1296: updating website and status for 1.11.1 release.


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

Branch: refs/heads/ISIS-993
Commit: 78bd18e207e83578f2d41d2b841c851214f9eb9e
Parents: 86a787b
Author: Dan Haywood <da...@haywood-associates.co.uk>
Authored: Sun Jan 17 14:57:01 2016 +0000
Committer: Dan Haywood <da...@haywood-associates.co.uk>
Committed: Sun Jan 17 14:57:01 2016 +0000

----------------------------------------------------------------------
 STATUS                                          |  3 +++
 .../main/asciidoc/_release-notes_1.11.1.adoc    | 20 ++++++++++++++++++++
 .../src/main/asciidoc/doap_isis.rdf             | 19 ++++++++++++++++++-
 .../src/main/asciidoc/downloads.adoc            | 10 +++++-----
 .../guides/_cgcom_cutting-a-release.adoc        |  4 ++--
 .../guides/_cgcom_post-release-successful.adoc  | 16 ++++++++++++----
 .../main/asciidoc/guides/_tg_pet-clinic.adoc    |  2 +-
 .../_tg_stop-scaffolding-start-coding.adoc      |  2 +-
 ...fun_getting-started_simpleapp-archetype.adoc |  2 +-
 .../asciidoc/guides/simpleapp-archetype.adoc    |  2 +-
 .../src/main/asciidoc/release-notes.adoc        | 15 ++++++++++++---
 11 files changed, 76 insertions(+), 19 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/isis/blob/78bd18e2/STATUS
----------------------------------------------------------------------
diff --git a/STATUS b/STATUS
index ae155ba..a5d5f1f 100644
--- a/STATUS
+++ b/STATUS
@@ -21,6 +21,9 @@ Description
 
 TLP releases:
 
+  * isis-1.11.1                                    : 17 Jan 2016
+  * simpleapp-archetype-1.11.1                     : 17 Jan 2016
+
   * isis-1.11.0                                    :  2 Jan 2016
   * simpleapp-archetype-1.11.0                     :  2 Jan 2016
 

http://git-wip-us.apache.org/repos/asf/isis/blob/78bd18e2/adocs/documentation/src/main/asciidoc/_release-notes_1.11.1.adoc
----------------------------------------------------------------------
diff --git a/adocs/documentation/src/main/asciidoc/_release-notes_1.11.1.adoc b/adocs/documentation/src/main/asciidoc/_release-notes_1.11.1.adoc
new file mode 100644
index 0000000..fae2ed9
--- /dev/null
+++ b/adocs/documentation/src/main/asciidoc/_release-notes_1.11.1.adoc
@@ -0,0 +1,20 @@
+[[r1.11.1]]
+= 1.11.1
+: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.11.1 is a bug fix release for Apache Isis 1.11.0, re-releasing using Java 7.
+
+Apache Isis is intended to be compatible with both Java 7 and Java 8.  However, it was found that v1.11.0 used a number
+of Java 8 APIs.  This release fixes this issue.
+
+
+
+== Bug
+
+* link:https://issues.apache.org/jira/browse/ISIS-1276[ISIS-1276] - Release activities for v1.11.1
+
+

http://git-wip-us.apache.org/repos/asf/isis/blob/78bd18e2/adocs/documentation/src/main/asciidoc/doap_isis.rdf
----------------------------------------------------------------------
diff --git a/adocs/documentation/src/main/asciidoc/doap_isis.rdf b/adocs/documentation/src/main/asciidoc/doap_isis.rdf
index 5834cf3..b9ca843 100644
--- a/adocs/documentation/src/main/asciidoc/doap_isis.rdf
+++ b/adocs/documentation/src/main/asciidoc/doap_isis.rdf
@@ -36,6 +36,23 @@
     <category rdf:resource="http://projects.apache.org/category/web-framework" />
 
     
+    <!-- 2016-01-17 releases -->
+    <release>
+      <Version>
+        <name>isis</name>
+        <created>2016-01-17</created>
+        <revision>1.11.1</revision>
+      </Version>
+    </release>
+    <release>
+      <Version>
+        <name>simpleapp-archetype</name>
+        <created>2016-01-17</created>
+        <revision>1.11.1</revision>
+      </Version>
+    </release>
+    
+
     <!-- 2016-01-02 releases -->
     <release>
       <Version>
@@ -51,7 +68,7 @@
         <revision>1.11.0</revision>
       </Version>
     </release>
-    
+
 
     <!-- 2015-11-10 releases -->
     <release>

http://git-wip-us.apache.org/repos/asf/isis/blob/78bd18e2/adocs/documentation/src/main/asciidoc/downloads.adoc
----------------------------------------------------------------------
diff --git a/adocs/documentation/src/main/asciidoc/downloads.adoc b/adocs/documentation/src/main/asciidoc/downloads.adoc
index a54662e..4a12657 100644
--- a/adocs/documentation/src/main/asciidoc/downloads.adoc
+++ b/adocs/documentation/src/main/asciidoc/downloads.adoc
@@ -25,12 +25,12 @@ If you want to build Apache Isis from formally released source tarballs, you can
 
 Core:
 
-* https://www.apache.org/dyn/closer.cgi/isis/isis-core/isis-1.11.0-source-release.zip[isis-1.11.0] (http://www.apache.org/dist/isis/isis-core/isis-1.11.0-source-release.zip.asc[asc], http://www.apache.org/dist/isis/isis-core/isis-1.11.0-source-release.zip.md5[md5])
+* https://www.apache.org/dyn/closer.cgi/isis/isis-core/isis-1.11.1-source-release.zip[isis-1.11.1] (http://www.apache.org/dist/isis/isis-core/isis-1.11.1-source-release.zip.asc[asc], http://www.apache.org/dist/isis/isis-core/isis-1.11.1-source-release.zip.md5[md5])
 
 
 Archetypes:
 
-* https://www.apache.org/dyn/closer.cgi/isis/archetype/simpleapp-archetype/simpleapp-archetype-1.11.0-source-release.zip[simpleapp-archetype-1.11.0] (http://www.apache.org/dist/isis/archetype/simpleapp-archetype/simpleapp-archetype-1.11.0-source-release.zip.asc[asc], http://www.apache.org/dist/isis/archetype/simpleapp-archetype/simpleapp-archetype-1.11.0-source-release.zip.md5[md5])
+* https://www.apache.org/dyn/closer.cgi/isis/archetype/simpleapp-archetype/simpleapp-archetype-1.11.1-source-release.zip[simpleapp-archetype-1.11.1] (http://www.apache.org/dist/isis/archetype/simpleapp-archetype/simpleapp-archetype-1.11.1-source-release.zip.asc[asc], http://www.apache.org/dist/isis/archetype/simpleapp-archetype/simpleapp-archetype-1.11.1-source-release.zip.md5[md5])
 
 
 
@@ -45,7 +45,7 @@ Then verify the signatures using a command such as:
 [source,bash]
 ----
 pgpk -a KEYS
-pgpv isis-1.11.0-source-release.zip.asc
+pgpv isis-1.11.1-source-release.zip.asc
 ----
 
 or
@@ -53,7 +53,7 @@ or
 [source,bash]
 ----
 pgp -ka KEYS
-pgp isis-1.11.0-source-release.zip.asc
+pgp isis-1.11.1-source-release.zip.asc
 ----
 
 
@@ -62,7 +62,7 @@ or
 [source,bash]
 ----
 gpg –import KEYS
-gpg –verify isis-1.11.0-source-release.zip.asc
+gpg –verify isis-1.11.1-source-release.zip.asc
 ----
 
 

http://git-wip-us.apache.org/repos/asf/isis/blob/78bd18e2/adocs/documentation/src/main/asciidoc/guides/_cgcom_cutting-a-release.adoc
----------------------------------------------------------------------
diff --git a/adocs/documentation/src/main/asciidoc/guides/_cgcom_cutting-a-release.adoc b/adocs/documentation/src/main/asciidoc/guides/_cgcom_cutting-a-release.adoc
index 0bdaa63..454af5e 100644
--- a/adocs/documentation/src/main/asciidoc/guides/_cgcom_cutting-a-release.adoc
+++ b/adocs/documentation/src/main/asciidoc/guides/_cgcom_cutting-a-release.adoc
@@ -124,7 +124,7 @@ cd core
 [[_cgcom_cutting-a-release_releasing-core_set-environment-variables]]
 === Set environment variables
 
-Set additional environment variables for the core "artefact":
+Set additional environment variables for the core "artifact":
 
 [source,bash]
 ----
@@ -378,7 +378,7 @@ cd ../example/application/simpleapp
 [[_cgcom_cutting-a-release_releasing-the-archetype_setup-environment-variables]]
 === Setup environment variables
 
-Set additional environment variables for the `simpleapp-archetype` artefact:
+Set additional environment variables for the `simpleapp-archetype` artifact:
 
 [source,bash]
 ----

http://git-wip-us.apache.org/repos/asf/isis/blob/78bd18e2/adocs/documentation/src/main/asciidoc/guides/_cgcom_post-release-successful.adoc
----------------------------------------------------------------------
diff --git a/adocs/documentation/src/main/asciidoc/guides/_cgcom_post-release-successful.adoc b/adocs/documentation/src/main/asciidoc/guides/_cgcom_post-release-successful.adoc
index ff2d41f..00d3681 100644
--- a/adocs/documentation/src/main/asciidoc/guides/_cgcom_post-release-successful.adoc
+++ b/adocs/documentation/src/main/asciidoc/guides/_cgcom_post-release-successful.adoc
@@ -155,22 +155,30 @@ svn delete $fullname-$old_ver-$zip
 popd
 ----
 
-For example:
-
 [source,bash]
 ----
 sh upd.sh 1.11.0 1.12.0
 ----
 
-The script downloads the artefacts from the Nexus release repository, adds the artefacts to subsversion and deletes the previous version.
+The script downloads the artifacts from the Nexus release repository, adds the artifacts to subversion and deletes the previous version.
+
+
+
+Double check that the files are correct; there is sometimes a small delay in the files becoming available in the release repository.  It should be sufficient to check just the `md5` or `.asc` files that these look valid (aren't HTML 404 error pages):
+
+[source,bash]
+----
+vi `find . -name *.md5`
+----
 
-At the end, commit the changes:
+Assuming all is good, commit the changes:
 
 [source]
 ----
 svn commit -m "publishing isis source releases to dist.apache.org"
 ----
 
+If the files are invalid, then revert using `svn revert . --recursive` and try again in a little while.
 
 
 

http://git-wip-us.apache.org/repos/asf/isis/blob/78bd18e2/adocs/documentation/src/main/asciidoc/guides/_tg_pet-clinic.adoc
----------------------------------------------------------------------
diff --git a/adocs/documentation/src/main/asciidoc/guides/_tg_pet-clinic.adoc b/adocs/documentation/src/main/asciidoc/guides/_tg_pet-clinic.adoc
index 39f836d..03a6926 100644
--- a/adocs/documentation/src/main/asciidoc/guides/_tg_pet-clinic.adoc
+++ b/adocs/documentation/src/main/asciidoc/guides/_tg_pet-clinic.adoc
@@ -62,7 +62,7 @@ Run the simpleapp archetype to build an empty Isis application:
 mvn archetype:generate  \
     -D archetypeGroupId=org.apache.isis.archetype \
     -D archetypeArtifactId=simpleapp-archetype \
-    -D archetypeVersion=1.11.0 \
+    -D archetypeVersion=1.11.1 \
     -D groupId=com.mycompany \
     -D artifactId=petclinic \
     -D version=1.0-SNAPSHOT \

http://git-wip-us.apache.org/repos/asf/isis/blob/78bd18e2/adocs/documentation/src/main/asciidoc/guides/_tg_stop-scaffolding-start-coding.adoc
----------------------------------------------------------------------
diff --git a/adocs/documentation/src/main/asciidoc/guides/_tg_stop-scaffolding-start-coding.adoc b/adocs/documentation/src/main/asciidoc/guides/_tg_stop-scaffolding-start-coding.adoc
index fb9de46..a541a06 100644
--- a/adocs/documentation/src/main/asciidoc/guides/_tg_stop-scaffolding-start-coding.adoc
+++ b/adocs/documentation/src/main/asciidoc/guides/_tg_stop-scaffolding-start-coding.adoc
@@ -30,7 +30,7 @@ Run the simpleapp archetype to build an empty Isis application:
 mvn archetype:generate  \
     -D archetypeGroupId=org.apache.isis.archetype \
     -D archetypeArtifactId=simpleapp-archetype \
-    -D archetypeVersion=1.11.0 \
+    -D archetypeVersion=1.11.1 \
     -D groupId=com.mycompany \
     -D artifactId=myapp \
     -D version=1.0-SNAPSHOT \

http://git-wip-us.apache.org/repos/asf/isis/blob/78bd18e2/adocs/documentation/src/main/asciidoc/guides/_ugfun_getting-started_simpleapp-archetype.adoc
----------------------------------------------------------------------
diff --git a/adocs/documentation/src/main/asciidoc/guides/_ugfun_getting-started_simpleapp-archetype.adoc b/adocs/documentation/src/main/asciidoc/guides/_ugfun_getting-started_simpleapp-archetype.adoc
index b91137b..e6d1ce4 100644
--- a/adocs/documentation/src/main/asciidoc/guides/_ugfun_getting-started_simpleapp-archetype.adoc
+++ b/adocs/documentation/src/main/asciidoc/guides/_ugfun_getting-started_simpleapp-archetype.adoc
@@ -22,7 +22,7 @@ To build the app from the latest stable release, then run the following command:
 mvn archetype:generate  \
     -D archetypeGroupId=org.apache.isis.archetype \
     -D archetypeArtifactId=simpleapp-archetype \
-    -D archetypeVersion=1.11.0 \
+    -D archetypeVersion=1.11.1 \
     -D groupId=com.mycompany \
     -D artifactId=myapp \
     -D version=1.0-SNAPSHOT \

http://git-wip-us.apache.org/repos/asf/isis/blob/78bd18e2/adocs/documentation/src/main/asciidoc/guides/simpleapp-archetype.adoc
----------------------------------------------------------------------
diff --git a/adocs/documentation/src/main/asciidoc/guides/simpleapp-archetype.adoc b/adocs/documentation/src/main/asciidoc/guides/simpleapp-archetype.adoc
index 315668c..1d66d57 100644
--- a/adocs/documentation/src/main/asciidoc/guides/simpleapp-archetype.adoc
+++ b/adocs/documentation/src/main/asciidoc/guides/simpleapp-archetype.adoc
@@ -25,7 +25,7 @@ Then run the following command:
 mvn archetype:generate  \
     -D archetypeGroupId=org.apache.isis.archetype \
     -D archetypeArtifactId=simpleapp-archetype \
-    -D archetypeVersion=1.11.0 \
+    -D archetypeVersion=1.11.1 \
     -D groupId=com.mycompany \
     -D artifactId=myapp \
     -D version=1.0-SNAPSHOT \

http://git-wip-us.apache.org/repos/asf/isis/blob/78bd18e2/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 5a543f1..a279f2b 100644
--- a/adocs/documentation/src/main/asciidoc/release-notes.adoc
+++ b/adocs/documentation/src/main/asciidoc/release-notes.adoc
@@ -21,10 +21,18 @@ This table summarises all releases of Apache Isis to date.
 | Improves
 | Bugs
 
+| 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]
+| Re-release under Java 1.7 (using toolchains plugin).
+| 0
+| 0
+| 1
+
 | xref:r1.11.0[1.11.0]
 | 02-jan-2016
 | * https://issues.apache.org/jira/secure/ReleaseNote.jspa?projectId=12311171&version=12333974[1.11.0]
-| Combined release notes for core and simpleapp-archetype.
+| More flexible REST API, view models using JAXB.
 | 9
 | 19
 | 12
@@ -32,7 +40,7 @@ This table summarises all releases of Apache Isis to date.
 | xref:r1.10.0[1.10.0]
 | 10-nov-2015
 | * https://issues.apache.org/jira/secure/ReleaseNote.jspa?projectId=12311171&version=12333354[1.10.0]
-| Combined release notes for core and simpleapp-archetype.
+| New domain services, multi-tenancy support and mixins.
 | 7
 | 18
 | 12
@@ -40,7 +48,7 @@ This table summarises all releases of Apache Isis to date.
 | xref:r1.9.0[1.9.0]
 | 1-sep-2015
 | * https://issues.apache.org/jira/secure/ReleaseNote.jspa?projectId=12311171&version=12332806[1.9.0]
-| Combined release notes for core and simpleapp-archetype.
+| AppManifest, Restful Objects representations and other "under-the-cover" improvements.
 | 18
 | 50
 | 25
@@ -210,6 +218,7 @@ This table summarises all releases of Apache Isis to date.
 
 
 
+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]
 include::_release-notes_1.9.0.adoc[leveloffset=+1]


[22/50] [abbrv] isis git commit: ISIS-993: factored out LayoutMetadataService, renamed the metadata classes

Posted by da...@apache.org.
ISIS-993: factored out LayoutMetadataService, renamed the metadata classes


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

Branch: refs/heads/ISIS-993
Commit: fb0f1273f4e0752f2e92c67e2961a14003861659
Parents: f7d55cf
Author: Dan Haywood <da...@haywood-associates.co.uk>
Authored: Fri Jan 8 15:46:30 2016 +0000
Committer: Dan Haywood <da...@haywood-associates.co.uk>
Committed: Mon Jan 25 14:38:24 2016 +0000

----------------------------------------------------------------------
 .../schema/applib/layout/layout-1.0.xsd         |  27 +-
 .../asciidoc/schema/applib/layout/layout.xsd    |  27 +-
 .../apache/isis/applib/layout/v1_0/Action.java  | 204 --------
 .../isis/applib/layout/v1_0/ActionHolder.java   |   2 +-
 .../layout/v1_0/ActionLayoutMetadata.java       | 223 +++++++++
 .../isis/applib/layout/v1_0/Collection.java     | 212 ---------
 .../layout/v1_0/CollectionLayoutMetadata.java   | 226 +++++++++
 .../apache/isis/applib/layout/v1_0/Column.java  |   6 +-
 .../isis/applib/layout/v1_0/DomainObject.java   | 174 -------
 .../layout/v1_0/ObjectLayoutMetadata.java       | 243 ++++++++++
 .../isis/applib/layout/v1_0/Property.java       | 209 ---------
 .../isis/applib/layout/v1_0/PropertyGroup.java  |  31 +-
 .../layout/v1_0/PropertyLayoutMetadata.java     | 227 +++++++++
 .../org/apache/isis/applib/layout/v1_0/Tab.java |  18 +-
 .../isis/applib/layout/v1_0/TabGroup.java       |  23 +-
 .../layout/ObjectLayoutMetadataService.java     |  34 ++
 .../layout/Object_downloadLayoutXml.java        |  67 +++
 .../isis/applib/services/layout/Util.java       |  33 ++
 .../layout/ActionPositionFacetForActionXml.java |   4 +-
 .../layout/BookmarkPolicyFacetForActionXml.java |   4 +-
 .../layout/CssClassFaFacetForActionXml.java     |   4 +-
 .../layout/CssClassFacetForActionXml.java       |   4 +-
 .../layout/DescribedAsFacetForActionXml.java    |   4 +-
 .../layout/HiddenFacetForActionLayoutXml.java   |   4 +-
 .../actions/layout/NamedFacetForActionXml.java  |   4 +-
 .../layout/CssClassFacetForCollectionXml.java   |   4 +-
 .../DefaultViewFacetForCollectionXml.java       |   4 +-
 .../DescribedAsFacetForCollectionXml.java       |   4 +-
 .../layout/HiddenFacetForCollectionXml.java     |   4 +-
 .../layout/NamedFacetForCollectionXml.java      |   4 +-
 .../layout/PagedFacetForCollectionXml.java      |   4 +-
 .../layout/SortedByFacetForCollectionXml.java   |   4 +-
 .../facets/object/layoutxml/LayoutXmlFacet.java |  32 --
 .../object/layoutxml/LayoutXmlFacetDefault.java | 381 ---------------
 .../object/layoutxml/LayoutXmlFacetFactory.java |  55 +--
 .../layoutxml/ObjectLayoutMetadataFacet.java    |  35 ++
 .../ObjectLayoutMetadataFacetDefault.java       |  65 +++
 .../CssClassFacetForPropertyXml.java            |   4 +-
 .../DescribedAsFacetForPropertyXml.java         |   4 +-
 .../HiddenFacetForPropertyXml.java              |   4 +-
 .../LabelAtFacetForPropertyXml.java             |   4 +-
 .../MultiLineFacetForPropertyXml.java           |   4 +-
 .../NamedFacetForPropertyXml.java               |   4 +-
 .../RenderedAdjustedFacetForPropertyXml.java    |   4 +-
 .../TypicalLengthFacetForPropertyXml.java       |   4 +-
 .../ObjectLayoutMetadataServiceDefault.java     | 468 +++++++++++++++++++
 .../metamodel/MetaModelServiceDefault.java      |   1 -
 .../ActionLayoutAnnotationFacetFactoryTest.java | 192 --------
 ...youtXmlLayoutAnnotationFacetFactoryTest.java | 192 ++++++++
 .../layoutxml/LayoutXmlFacetDefaultTest.java    |  60 ---
 .../ObjectLayoutMetadataFacetDefaultTest.java   |  60 +++
 .../layoutxml/v1_0/DomainObjectTest.java        | 121 -----
 .../v1_0/ObjectLayoutMetadataTest.java          | 121 +++++
 .../runtime/system/ObjectActionDefaultTest.java | 107 -----
 .../ObjectActionLayoutXmlDefaultTest.java       | 107 +++++
 .../wicket/WebRequestCycleForIsis.java          |   2 +-
 .../wicket/model/models/ActionModelTest.java    |   8 +-
 .../combined/EntityCombinedPanelFactory.java    |   4 +-
 .../entity/properties/EntityPropertiesForm.java |  37 +-
 .../entity/tabgroups/EntityTabGroupsPanel.java  |  25 +-
 .../tabgroups/EntityTabGroupsPanelFactory.java  |   4 +-
 .../wicket/ui/pages/entity/EntityPage.java      |  17 +-
 .../dom/simple/SimpleObject.layout.xml          |  18 +-
 63 files changed, 2305 insertions(+), 1881 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/isis/blob/fb0f1273/adocs/documentation/src/main/asciidoc/schema/applib/layout/layout-1.0.xsd
----------------------------------------------------------------------
diff --git a/adocs/documentation/src/main/asciidoc/schema/applib/layout/layout-1.0.xsd b/adocs/documentation/src/main/asciidoc/schema/applib/layout/layout-1.0.xsd
index 6aeb3d6..7a3e949 100644
--- a/adocs/documentation/src/main/asciidoc/schema/applib/layout/layout-1.0.xsd
+++ b/adocs/documentation/src/main/asciidoc/schema/applib/layout/layout-1.0.xsd
@@ -1,14 +1,14 @@
 <?xml version="1.0" standalone="yes"?>
 <xs:schema elementFormDefault="qualified" version="1.0" targetNamespace="http://isis.apache.org/schema/applib/layout" xmlns:tns="http://isis.apache.org/schema/applib/layout" xmlns:xs="http://www.w3.org/2001/XMLSchema">
 
-  <xs:element name="domainObject" type="tns:domainObject"/>
+  <xs:element name="objectLayout" type="tns:objectLayout"/>
 
-  <xs:complexType name="domainObject">
+  <xs:complexType name="objectLayout">
     <xs:sequence>
       <xs:element name="actions" minOccurs="0">
         <xs:complexType>
           <xs:sequence>
-            <xs:element name="action" type="tns:action" minOccurs="0" maxOccurs="unbounded"/>
+            <xs:element name="action" type="tns:actionLayout" minOccurs="0" maxOccurs="unbounded"/>
           </xs:sequence>
         </xs:complexType>
       </xs:element>
@@ -16,10 +16,11 @@
     </xs:sequence>
   </xs:complexType>
 
-  <xs:complexType name="action">
+  <xs:complexType name="actionLayout">
     <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"/>
@@ -49,7 +50,7 @@
   <xs:complexType name="column">
     <xs:sequence>
       <xs:element name="propertyGroup" type="tns:propertyGroup" minOccurs="0" maxOccurs="unbounded"/>
-      <xs:element name="collection" type="tns:collection" minOccurs="0" maxOccurs="unbounded"/>
+      <xs:element name="collection" type="tns:collectionLayoutXml" minOccurs="0" maxOccurs="unbounded"/>
     </xs:sequence>
     <xs:attribute name="span" type="xs:int" use="required"/>
   </xs:complexType>
@@ -59,26 +60,27 @@
       <xs:element name="actions" minOccurs="0">
         <xs:complexType>
           <xs:sequence>
-            <xs:element name="action" type="tns:action" minOccurs="0" maxOccurs="unbounded"/>
+            <xs:element name="action" type="tns:actionLayout" minOccurs="0" maxOccurs="unbounded"/>
           </xs:sequence>
         </xs:complexType>
       </xs:element>
-      <xs:element name="property" type="tns:property" maxOccurs="unbounded"/>
+      <xs:element name="property" type="tns:propertyLayout" maxOccurs="unbounded"/>
     </xs:sequence>
     <xs:attribute name="name" type="xs:string" use="required"/>
   </xs:complexType>
 
-  <xs:complexType name="property">
+  <xs:complexType name="propertyLayout">
     <xs:sequence>
       <xs:element name="named" type="xs:string" minOccurs="0"/>
       <xs:element name="describedAs" type="xs:string" minOccurs="0"/>
       <xs:element name="actions" minOccurs="0">
         <xs:complexType>
           <xs:sequence>
-            <xs:element name="action" type="tns:action" minOccurs="0" maxOccurs="unbounded"/>
+            <xs:element name="action" type="tns:actionLayout" minOccurs="0" maxOccurs="unbounded"/>
           </xs:sequence>
         </xs:complexType>
       </xs:element>
+      <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"/>
@@ -90,7 +92,7 @@
     <xs:attribute name="typicalLength" type="xs:int"/>
   </xs:complexType>
 
-  <xs:complexType name="collection">
+  <xs:complexType name="collectionLayoutXml">
     <xs:sequence>
       <xs:element name="named" type="xs:string" minOccurs="0"/>
       <xs:element name="describedAs" type="xs:string" minOccurs="0"/>
@@ -98,10 +100,11 @@
       <xs:element name="actions" minOccurs="0">
         <xs:complexType>
           <xs:sequence>
-            <xs:element name="action" type="tns:action" minOccurs="0" maxOccurs="unbounded"/>
+            <xs:element name="action" type="tns:actionLayout" minOccurs="0" maxOccurs="unbounded"/>
           </xs:sequence>
         </xs:complexType>
       </xs:element>
+      <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"/>
@@ -159,4 +162,4 @@
       <xs:enumeration value="NONE"/>
     </xs:restriction>
   </xs:simpleType>
-</xs:schema>
\ No newline at end of file
+</xs:schema>

http://git-wip-us.apache.org/repos/asf/isis/blob/fb0f1273/adocs/documentation/src/main/asciidoc/schema/applib/layout/layout.xsd
----------------------------------------------------------------------
diff --git a/adocs/documentation/src/main/asciidoc/schema/applib/layout/layout.xsd b/adocs/documentation/src/main/asciidoc/schema/applib/layout/layout.xsd
index 6aeb3d6..7a3e949 100644
--- a/adocs/documentation/src/main/asciidoc/schema/applib/layout/layout.xsd
+++ b/adocs/documentation/src/main/asciidoc/schema/applib/layout/layout.xsd
@@ -1,14 +1,14 @@
 <?xml version="1.0" standalone="yes"?>
 <xs:schema elementFormDefault="qualified" version="1.0" targetNamespace="http://isis.apache.org/schema/applib/layout" xmlns:tns="http://isis.apache.org/schema/applib/layout" xmlns:xs="http://www.w3.org/2001/XMLSchema">
 
-  <xs:element name="domainObject" type="tns:domainObject"/>
+  <xs:element name="objectLayout" type="tns:objectLayout"/>
 
-  <xs:complexType name="domainObject">
+  <xs:complexType name="objectLayout">
     <xs:sequence>
       <xs:element name="actions" minOccurs="0">
         <xs:complexType>
           <xs:sequence>
-            <xs:element name="action" type="tns:action" minOccurs="0" maxOccurs="unbounded"/>
+            <xs:element name="action" type="tns:actionLayout" minOccurs="0" maxOccurs="unbounded"/>
           </xs:sequence>
         </xs:complexType>
       </xs:element>
@@ -16,10 +16,11 @@
     </xs:sequence>
   </xs:complexType>
 
-  <xs:complexType name="action">
+  <xs:complexType name="actionLayout">
     <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"/>
@@ -49,7 +50,7 @@
   <xs:complexType name="column">
     <xs:sequence>
       <xs:element name="propertyGroup" type="tns:propertyGroup" minOccurs="0" maxOccurs="unbounded"/>
-      <xs:element name="collection" type="tns:collection" minOccurs="0" maxOccurs="unbounded"/>
+      <xs:element name="collection" type="tns:collectionLayoutXml" minOccurs="0" maxOccurs="unbounded"/>
     </xs:sequence>
     <xs:attribute name="span" type="xs:int" use="required"/>
   </xs:complexType>
@@ -59,26 +60,27 @@
       <xs:element name="actions" minOccurs="0">
         <xs:complexType>
           <xs:sequence>
-            <xs:element name="action" type="tns:action" minOccurs="0" maxOccurs="unbounded"/>
+            <xs:element name="action" type="tns:actionLayout" minOccurs="0" maxOccurs="unbounded"/>
           </xs:sequence>
         </xs:complexType>
       </xs:element>
-      <xs:element name="property" type="tns:property" maxOccurs="unbounded"/>
+      <xs:element name="property" type="tns:propertyLayout" maxOccurs="unbounded"/>
     </xs:sequence>
     <xs:attribute name="name" type="xs:string" use="required"/>
   </xs:complexType>
 
-  <xs:complexType name="property">
+  <xs:complexType name="propertyLayout">
     <xs:sequence>
       <xs:element name="named" type="xs:string" minOccurs="0"/>
       <xs:element name="describedAs" type="xs:string" minOccurs="0"/>
       <xs:element name="actions" minOccurs="0">
         <xs:complexType>
           <xs:sequence>
-            <xs:element name="action" type="tns:action" minOccurs="0" maxOccurs="unbounded"/>
+            <xs:element name="action" type="tns:actionLayout" minOccurs="0" maxOccurs="unbounded"/>
           </xs:sequence>
         </xs:complexType>
       </xs:element>
+      <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"/>
@@ -90,7 +92,7 @@
     <xs:attribute name="typicalLength" type="xs:int"/>
   </xs:complexType>
 
-  <xs:complexType name="collection">
+  <xs:complexType name="collectionLayoutXml">
     <xs:sequence>
       <xs:element name="named" type="xs:string" minOccurs="0"/>
       <xs:element name="describedAs" type="xs:string" minOccurs="0"/>
@@ -98,10 +100,11 @@
       <xs:element name="actions" minOccurs="0">
         <xs:complexType>
           <xs:sequence>
-            <xs:element name="action" type="tns:action" minOccurs="0" maxOccurs="unbounded"/>
+            <xs:element name="action" type="tns:actionLayout" minOccurs="0" maxOccurs="unbounded"/>
           </xs:sequence>
         </xs:complexType>
       </xs:element>
+      <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"/>
@@ -159,4 +162,4 @@
       <xs:enumeration value="NONE"/>
     </xs:restriction>
   </xs:simpleType>
-</xs:schema>
\ No newline at end of file
+</xs:schema>

http://git-wip-us.apache.org/repos/asf/isis/blob/fb0f1273/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/Action.java
----------------------------------------------------------------------
diff --git a/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/Action.java b/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/Action.java
deleted file mode 100644
index 7dd00de..0000000
--- a/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/Action.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.v1_0;
-
-import java.io.Serializable;
-
-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 org.apache.isis.applib.annotation.BookmarkPolicy;
-import org.apache.isis.applib.annotation.Where;
-
-/**
- * Broadly corresponds 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>
- */
-@XmlType(
-    propOrder = {
-        "named"
-        , "describedAs"
-    }
-)
-public class Action implements Serializable {
-
-    private static final long serialVersionUID = 1L;
-
-    public Action() {
-    }
-    public Action(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;
-
-    @XmlAttribute(required = false)
-    public BookmarkPolicy getBookmarking() {
-        return bookmarking;
-    }
-
-    public void setBookmarking(BookmarkPolicy bookmarking) {
-        this.bookmarking = bookmarking;
-    }
-
-
-    private String cssClass;
-
-    @XmlAttribute(required = false)
-    public String getCssClass() {
-        return cssClass;
-    }
-
-    public void setCssClass(String cssClass) {
-        this.cssClass = cssClass;
-    }
-
-
-    private String cssClassFa;
-
-    @XmlAttribute(required = false)
-    public String getCssClassFa() {
-        return cssClassFa;
-    }
-
-    public void setCssClassFa(String cssClassFa) {
-        this.cssClassFa = cssClassFa;
-    }
-
-
-
-    private org.apache.isis.applib.annotation.ActionLayout.CssClassFaPosition cssClassFaPosition;
-
-    @XmlAttribute(required = false)
-    public org.apache.isis.applib.annotation.ActionLayout.CssClassFaPosition getCssClassFaPosition() {
-        return cssClassFaPosition;
-    }
-
-    public void setCssClassFaPosition(org.apache.isis.applib.annotation.ActionLayout.CssClassFaPosition cssClassFaPosition) {
-        this.cssClassFaPosition = cssClassFaPosition;
-    }
-
-
-    private String describedAs;
-
-    @XmlElement(required = false)
-    public String getDescribedAs() {
-        return describedAs;
-    }
-
-    public void setDescribedAs(String describedAs) {
-        this.describedAs = describedAs;
-    }
-
-
-
-    private Where hidden;
-
-    @XmlAttribute(required = false)
-    public Where getHidden() {
-        return hidden;
-    }
-
-    public void setHidden(Where hidden) {
-        this.hidden = hidden;
-    }
-
-
-
-    private String named;
-
-    @XmlElement(required = false)
-    public String getNamed() {
-        return named;
-    }
-
-    public void setNamed(String named) {
-        this.named = named;
-    }
-
-
-
-    private Boolean namedEscaped;
-
-    @XmlAttribute(required = false)
-    public Boolean getNamedEscaped() {
-        return namedEscaped;
-    }
-
-    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 ActionHolder owner;
-    /**
-     * Owner.
-     *
-     * <p>
-     *     Set programmatically by framework after reading in from XML.
-     * </p>
-     */
-    @XmlTransient
-    public ActionHolder getOwner() {
-        return owner;
-    }
-
-    public void setOwner(final ActionHolder owner) {
-        this.owner = owner;
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/isis/blob/fb0f1273/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/ActionHolder.java
----------------------------------------------------------------------
diff --git a/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/ActionHolder.java b/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/ActionHolder.java
index bac4ebb..d5a6b37 100644
--- a/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/ActionHolder.java
+++ b/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/ActionHolder.java
@@ -21,5 +21,5 @@ package org.apache.isis.applib.layout.v1_0;
 import java.util.List;
 
 public interface ActionHolder {
-    List<Action> getActions();
+    List<ActionLayoutMetadata> getActions();
 }

http://git-wip-us.apache.org/repos/asf/isis/blob/fb0f1273/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/ActionLayoutMetadata.java
----------------------------------------------------------------------
diff --git a/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/ActionLayoutMetadata.java b/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/ActionLayoutMetadata.java
new file mode 100644
index 0000000..bf454d1
--- /dev/null
+++ b/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/ActionLayoutMetadata.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.v1_0;
+
+import java.io.Serializable;
+
+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 org.apache.isis.applib.annotation.BookmarkPolicy;
+import org.apache.isis.applib.annotation.Where;
+
+/**
+ * Broadly corresponds 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>
+ */
+@XmlType(
+    name = "actionLayout"
+    , propOrder = {
+        "named"
+        , "describedAs"
+        , "metadataError"
+    }
+)
+public class ActionLayoutMetadata implements Serializable {
+
+    private static final long serialVersionUID = 1L;
+
+    public ActionLayoutMetadata() {
+    }
+    public ActionLayoutMetadata(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;
+
+    @XmlAttribute(required = false)
+    public BookmarkPolicy getBookmarking() {
+        return bookmarking;
+    }
+
+    public void setBookmarking(BookmarkPolicy bookmarking) {
+        this.bookmarking = bookmarking;
+    }
+
+
+    private String cssClass;
+
+    @XmlAttribute(required = false)
+    public String getCssClass() {
+        return cssClass;
+    }
+
+    public void setCssClass(String cssClass) {
+        this.cssClass = cssClass;
+    }
+
+
+    private String cssClassFa;
+
+    @XmlAttribute(required = false)
+    public String getCssClassFa() {
+        return cssClassFa;
+    }
+
+    public void setCssClassFa(String cssClassFa) {
+        this.cssClassFa = cssClassFa;
+    }
+
+
+
+    private org.apache.isis.applib.annotation.ActionLayout.CssClassFaPosition cssClassFaPosition;
+
+    @XmlAttribute(required = false)
+    public org.apache.isis.applib.annotation.ActionLayout.CssClassFaPosition getCssClassFaPosition() {
+        return cssClassFaPosition;
+    }
+
+    public void setCssClassFaPosition(org.apache.isis.applib.annotation.ActionLayout.CssClassFaPosition cssClassFaPosition) {
+        this.cssClassFaPosition = cssClassFaPosition;
+    }
+
+
+    private String describedAs;
+
+    @XmlElement(required = false)
+    public String getDescribedAs() {
+        return describedAs;
+    }
+
+    public void setDescribedAs(String describedAs) {
+        this.describedAs = describedAs;
+    }
+
+
+
+    private Where hidden;
+
+    @XmlAttribute(required = false)
+    public Where getHidden() {
+        return hidden;
+    }
+
+    public void setHidden(Where hidden) {
+        this.hidden = hidden;
+    }
+
+
+
+    private String named;
+
+    @XmlElement(required = false)
+    public String getNamed() {
+        return named;
+    }
+
+    public void setNamed(String named) {
+        this.named = named;
+    }
+
+
+
+    private Boolean namedEscaped;
+
+    @XmlAttribute(required = false)
+    public Boolean getNamedEscaped() {
+        return namedEscaped;
+    }
+
+    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 ActionHolder owner;
+    /**
+     * Owner.
+     *
+     * <p>
+     *     Set programmatically by framework after reading in from XML.
+     * </p>
+     */
+    @XmlTransient
+    public ActionHolder getOwner() {
+        return owner;
+    }
+
+    public void setOwner(final ActionHolder 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;
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/isis/blob/fb0f1273/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/Collection.java
----------------------------------------------------------------------
diff --git a/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/Collection.java b/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/Collection.java
deleted file mode 100644
index 371db40..0000000
--- a/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/Collection.java
+++ /dev/null
@@ -1,212 +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.v1_0;
-
-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.XmlElementWrapper;
-import javax.xml.bind.annotation.XmlTransient;
-import javax.xml.bind.annotation.XmlType;
-
-import org.apache.isis.applib.annotation.Where;
-
-/**
- * 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>
- */
-@XmlType(
-        propOrder = {
-                "named"
-                ,"describedAs"
-                ,"sortedBy"
-                , "actions"
-        }
-)
-public class Collection implements ColumnContent, ActionHolder, Serializable {
-
-    private static final long serialVersionUID = 1L;
-
-    public Collection() {
-    }
-    public Collection(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;
-
-    @XmlAttribute(required = false)
-    public String getCssClass() {
-        return cssClass;
-    }
-
-    public void setCssClass(String cssClass) {
-        this.cssClass = cssClass;
-    }
-
-
-
-    private String describedAs;
-
-    @XmlElement(required = false)
-    public String getDescribedAs() {
-        return describedAs;
-    }
-
-    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;
-
-    @XmlAttribute(required = false)
-    public Where getHidden() {
-        return hidden;
-    }
-
-    public void setHidden(Where hidden) {
-        this.hidden = hidden;
-    }
-
-
-    private String named;
-
-    @XmlElement(required = false)
-    public String getNamed() {
-        return named;
-    }
-
-    public void setNamed(String named) {
-        this.named = named;
-    }
-
-
-    private Boolean namedEscaped;
-
-    @XmlAttribute(required = false)
-    public Boolean getNamedEscaped() {
-        return namedEscaped;
-    }
-
-    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<Action> actions;
-
-    @XmlElementWrapper(name = "actions", required = false)
-    @XmlElement(name = "action", required = false)
-    public List<Action> getActions() {
-        return actions;
-    }
-
-    public void setActions(List<Action> actions) {
-        this.actions = actions;
-    }
-
-
-
-    private Column owner;
-    /**
-     * Owner.
-     *
-     * <p>
-     *     Set programmatically by framework after reading in from XML.
-     * </p>
-     */
-    @XmlTransient
-    public Column getOwner() {
-        return owner;
-    }
-
-    public void setOwner(final Column owner) {
-        this.owner = owner;
-    }
-
-
-
-}

http://git-wip-us.apache.org/repos/asf/isis/blob/fb0f1273/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/CollectionLayoutMetadata.java
----------------------------------------------------------------------
diff --git a/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/CollectionLayoutMetadata.java b/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/CollectionLayoutMetadata.java
new file mode 100644
index 0000000..4dc14cd
--- /dev/null
+++ b/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/CollectionLayoutMetadata.java
@@ -0,0 +1,226 @@
+/*
+ *  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.v1_0;
+
+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.XmlElementWrapper;
+import javax.xml.bind.annotation.XmlTransient;
+import javax.xml.bind.annotation.XmlType;
+
+import org.apache.isis.applib.annotation.Where;
+
+/**
+ * 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>
+ */
+@XmlType(
+        propOrder = {
+                "named"
+                ,"describedAs"
+                ,"sortedBy"
+                , "actions"
+                , "metadataError"
+        }
+)
+public class CollectionLayoutMetadata implements ColumnContent, ActionHolder, Serializable {
+
+    private static final long serialVersionUID = 1L;
+
+    public CollectionLayoutMetadata() {
+    }
+    public CollectionLayoutMetadata(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;
+
+    @XmlAttribute(required = false)
+    public String getCssClass() {
+        return cssClass;
+    }
+
+    public void setCssClass(String cssClass) {
+        this.cssClass = cssClass;
+    }
+
+
+
+    private String describedAs;
+
+    @XmlElement(required = false)
+    public String getDescribedAs() {
+        return describedAs;
+    }
+
+    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;
+
+    @XmlAttribute(required = false)
+    public Where getHidden() {
+        return hidden;
+    }
+
+    public void setHidden(Where hidden) {
+        this.hidden = hidden;
+    }
+
+
+    private String named;
+
+    @XmlElement(required = false)
+    public String getNamed() {
+        return named;
+    }
+
+    public void setNamed(String named) {
+        this.named = named;
+    }
+
+
+    private Boolean namedEscaped;
+
+    @XmlAttribute(required = false)
+    public Boolean getNamedEscaped() {
+        return namedEscaped;
+    }
+
+    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<ActionLayoutMetadata> actions;
+
+    @XmlElementWrapper(name = "actions", required = false)
+    @XmlElement(name = "action", required = false)
+    public List<ActionLayoutMetadata> getActions() {
+        return actions;
+    }
+
+    public void setActions(List<ActionLayoutMetadata> actionLayoutMetadatas) {
+        this.actions = actionLayoutMetadatas;
+    }
+
+
+
+    private Column owner;
+    /**
+     * Owner.
+     *
+     * <p>
+     *     Set programmatically by framework after reading in from XML.
+     * </p>
+     */
+    @XmlTransient
+    public Column getOwner() {
+        return owner;
+    }
+
+    public void setOwner(final Column 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;
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/isis/blob/fb0f1273/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/Column.java
----------------------------------------------------------------------
diff --git a/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/Column.java b/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/Column.java
index 905438f..1f5ca23 100644
--- a/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/Column.java
+++ b/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/Column.java
@@ -71,15 +71,15 @@ public class Column implements Serializable {
     }
 
 
-    private List<Collection> collections = Lists.newArrayList();
+    private List<CollectionLayoutMetadata> collections = Lists.newArrayList();
 
     // no wrapper
     @XmlElement(name = "collection", required = false)
-    public List<Collection> getCollections() {
+    public List<CollectionLayoutMetadata> getCollections() {
         return collections;
     }
 
-    public void setCollections(final List<Collection> collections) {
+    public void setCollections(final List<CollectionLayoutMetadata> collections) {
         this.collections = collections;
     }
 

http://git-wip-us.apache.org/repos/asf/isis/blob/fb0f1273/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/DomainObject.java
----------------------------------------------------------------------
diff --git a/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/DomainObject.java b/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/DomainObject.java
deleted file mode 100644
index 99388eb..0000000
--- a/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/DomainObject.java
+++ /dev/null
@@ -1,174 +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.v1_0;
-
-import java.io.Serializable;
-import java.util.ArrayList;
-import java.util.List;
-
-import javax.xml.bind.annotation.XmlElement;
-import javax.xml.bind.annotation.XmlElementWrapper;
-import javax.xml.bind.annotation.XmlRootElement;
-import javax.xml.bind.annotation.XmlType;
-
-import org.apache.isis.applib.services.dto.Dto;
-
-@XmlRootElement
-@XmlType(
-        propOrder = {
-                "actions"
-                , "tabGroups"
-        }
-)
-public class DomainObject implements Dto, ActionHolder, Serializable {
-
-    private static final long serialVersionUID = 1L;
-
-    private List<Action> actions;
-
-    @XmlElementWrapper(name = "actions", required = false)
-    @XmlElement(name = "action", required = false)
-    public List<Action> getActions() {
-        return actions;
-    }
-
-    public void setActions(List<Action> actions) {
-        this.actions = actions;
-    }
-
-
-    // must have at least one tab group
-    private List<TabGroup> tabGroups = new ArrayList<TabGroup>() {{
-        add(new TabGroup());
-    }};
-
-    // no wrapper
-
-    /**
-     * Must have at least one tab group; no wrapper.
-     */
-    @XmlElement(name = "tabGroup", required = true)
-    public List<TabGroup> getTabGroups() {
-        return tabGroups;
-    }
-
-    public void setTabGroups(List<TabGroup> tabGroups) {
-        this.tabGroups = tabGroups;
-    }
-
-
-    public interface Visitor {
-        void visit(final DomainObject domainObject);
-        void visit(final TabGroup tabGroup);
-        void visit(final Tab tab);
-        void visit(final Column column);
-        void visit(final PropertyGroup propertyGroup);
-        void visit(final Property property);
-        void visit(final Collection collection);
-        void visit(final Action action);
-    }
-
-    public static class VisitorAdapter implements Visitor {
-        @Override
-        public void visit(final DomainObject domainObject) { }
-        @Override
-        public void visit(final TabGroup tabGroup) { }
-        @Override
-        public void visit(final Tab tab) { }
-        @Override
-        public void visit(final Column column) { }
-        @Override
-        public void visit(final PropertyGroup propertyGroup) {}
-        @Override
-        public void visit(final Property property) {}
-        @Override
-        public void visit(final Collection collection) {}
-        @Override
-        public void visit(final Action action) { }
-    }
-
-    /**
-     * Initializes all "owner" references across the graph, eg {@link TabGroup#setOwner(DomainObject)} and {@link Tab#setOwner(TabGroup)} .
-     */
-    public void init() {
-        visit(new VisitorAdapter());
-    }
-
-    public void visit(final Visitor visitor) {
-        visitor.visit(this);
-        traverseActions(this, visitor);
-        final List<TabGroup> tabGroups = getTabGroups();
-        for (final TabGroup tabGroup : tabGroups) {
-            tabGroup.setOwner(this);
-            visitor.visit(tabGroup);
-            final List<Tab> tabs = tabGroup.getTabs();
-            for (final Tab tab : tabs) {
-                tab.setOwner(tabGroup);
-                visitor.visit(tab);
-                traverseColumn(tab.getLeft(), tab, visitor);
-                traverseColumn(tab.getMiddle(), tab, visitor);
-                traverseColumn(tab.getRight(), tab, visitor);
-            }
-        }
-    }
-
-    private void traverseColumn(final Column column, final Tab tab, final Visitor visitor) {
-        if(column == null) {
-            return;
-        }
-        column.setOwner(tab);
-        visitor.visit(column);
-        traversePropertyGroups(column, visitor);
-        traverseCollections(column, visitor);
-    }
-
-    private void traversePropertyGroups(final Column column, final Visitor visitor) {
-        for (final PropertyGroup propertyGroup : column.getPropertyGroups()) {
-            propertyGroup.setOwner(column);
-            visitor.visit(propertyGroup);
-            traverseActions(propertyGroup, visitor);
-            final List<Property> properties = propertyGroup.getProperties();
-            for (final Property property : properties) {
-                property.setOwner(propertyGroup);
-                visitor.visit(property);
-                traverseActions(property, visitor);
-            }
-        }
-    }
-
-    private void traverseCollections(final Column column, final Visitor visitor) {
-        for (final Collection collection : column.getCollections()) {
-            collection.setOwner(column);
-            visitor.visit(collection);
-            traverseActions(collection, visitor);
-        }
-    }
-
-    private void traverseActions(final ActionHolder actionHolder, final Visitor visitor) {
-        final List<Action> actions = actionHolder.getActions();
-        if(actions == null) {
-            return;
-        }
-        for (final Action action : actions) {
-            action.setOwner(actionHolder);
-            visitor.visit(action);
-        }
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/isis/blob/fb0f1273/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/ObjectLayoutMetadata.java
----------------------------------------------------------------------
diff --git a/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/ObjectLayoutMetadata.java b/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/ObjectLayoutMetadata.java
new file mode 100644
index 0000000..2f056a8
--- /dev/null
+++ b/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/ObjectLayoutMetadata.java
@@ -0,0 +1,243 @@
+/*
+ *  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.v1_0;
+
+import java.io.Serializable;
+import java.util.ArrayList;
+import java.util.LinkedHashMap;
+import java.util.List;
+
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlElementWrapper;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlTransient;
+import javax.xml.bind.annotation.XmlType;
+
+import com.google.common.collect.Maps;
+
+import org.apache.isis.applib.annotation.Programmatic;
+import org.apache.isis.applib.services.dto.Dto;
+import org.apache.isis.applib.services.layout.ObjectLayoutMetadataService;
+
+@XmlRootElement(
+        name = "objectLayout"
+)
+@XmlType(
+        name = "objectLayout"
+        , propOrder = {
+                "actions"
+                , "tabGroups"
+        }
+)
+public class ObjectLayoutMetadata implements Dto, ActionHolder, Serializable {
+
+    private static final long serialVersionUID = 1L;
+
+    private List<ActionLayoutMetadata> actions;
+
+    @XmlElementWrapper(name = "actions", required = false)
+    @XmlElement(name = "action", required = false)
+    public List<ActionLayoutMetadata> getActions() {
+        return actions;
+    }
+
+    public void setActions(List<ActionLayoutMetadata> actionLayoutMetadatas) {
+        this.actions = actionLayoutMetadatas;
+    }
+
+
+    // must have at least one tab group
+    private List<TabGroup> tabGroups = new ArrayList<TabGroup>() {{
+        add(new TabGroup());
+    }};
+
+    // no wrapper
+
+    /**
+     * Must have at least one tab group; no wrapper.
+     */
+    @XmlElement(name = "tabGroup", required = true)
+    public List<TabGroup> getTabGroups() {
+        return tabGroups;
+    }
+
+    public void setTabGroups(List<TabGroup> tabGroups) {
+        this.tabGroups = tabGroups;
+    }
+
+
+    public interface Visitor {
+        void visit(final ObjectLayoutMetadata objectLayoutMetadata);
+        void visit(final TabGroup tabGroup);
+        void visit(final Tab tab);
+        void visit(final Column column);
+        void visit(final PropertyGroup propertyGroup);
+        void visit(final PropertyLayoutMetadata propertyLayoutMetadata);
+        void visit(final CollectionLayoutMetadata collectionLayoutMetadata);
+        void visit(final ActionLayoutMetadata actionLayoutMetadata);
+    }
+
+    public static class VisitorAdapter implements Visitor {
+        @Override
+        public void visit(final ObjectLayoutMetadata objectLayoutMetadata) { }
+        @Override
+        public void visit(final TabGroup tabGroup) { }
+        @Override
+        public void visit(final Tab tab) { }
+        @Override
+        public void visit(final Column column) { }
+        @Override
+        public void visit(final PropertyGroup propertyGroup) {}
+        @Override
+        public void visit(final PropertyLayoutMetadata propertyLayoutMetadata) {}
+        @Override
+        public void visit(final CollectionLayoutMetadata collectionLayoutMetadata) {}
+        @Override
+        public void visit(final ActionLayoutMetadata actionLayoutMetadata) { }
+    }
+
+
+    /**
+     * Visits all elements of the graph.  The {@link Visitor} implementation
+     * can assume that all "owner" references are populated.
+     */
+    public void visit(final Visitor visitor) {
+        visitor.visit(this);
+        traverseActions(this, visitor);
+        final List<TabGroup> tabGroups = getTabGroups();
+        for (final TabGroup tabGroup : tabGroups) {
+            tabGroup.setOwner(this);
+            visitor.visit(tabGroup);
+            final List<Tab> tabs = tabGroup.getTabs();
+            for (final Tab tab : tabs) {
+                tab.setOwner(tabGroup);
+                visitor.visit(tab);
+                traverseColumn(tab.getLeft(), tab, visitor);
+                traverseColumn(tab.getMiddle(), tab, visitor);
+                traverseColumn(tab.getRight(), tab, visitor);
+            }
+        }
+    }
+
+    private void traverseColumn(final Column column, final Tab tab, final Visitor visitor) {
+        if(column == null) {
+            return;
+        }
+        column.setOwner(tab);
+        visitor.visit(column);
+        traversePropertyGroups(column, visitor);
+        traverseCollections(column, visitor);
+    }
+
+    private void traversePropertyGroups(final Column column, final Visitor visitor) {
+        for (final PropertyGroup propertyGroup : column.getPropertyGroups()) {
+            propertyGroup.setOwner(column);
+            visitor.visit(propertyGroup);
+            traverseActions(propertyGroup, visitor);
+            final List<PropertyLayoutMetadata> properties = propertyGroup.getProperties();
+            for (final PropertyLayoutMetadata propertyLayoutMetadata : properties) {
+                propertyLayoutMetadata.setOwner(propertyGroup);
+                visitor.visit(propertyLayoutMetadata);
+                traverseActions(propertyLayoutMetadata, visitor);
+            }
+        }
+    }
+
+    private void traverseCollections(final Column column, final Visitor visitor) {
+        for (final CollectionLayoutMetadata collectionLayoutMetadata : column.getCollections()) {
+            collectionLayoutMetadata.setOwner(column);
+            visitor.visit(collectionLayoutMetadata);
+            traverseActions(collectionLayoutMetadata, visitor);
+        }
+    }
+
+    private void traverseActions(final ActionHolder actionHolder, final Visitor visitor) {
+        final List<ActionLayoutMetadata> actionLayoutMetadatas = actionHolder.getActions();
+        if(actionLayoutMetadatas == null) {
+            return;
+        }
+        for (final ActionLayoutMetadata actionLayoutMetadata : actionLayoutMetadatas) {
+            actionLayoutMetadata.setOwner(actionHolder);
+            visitor.visit(actionLayoutMetadata);
+        }
+    }
+
+
+    @Programmatic
+    @XmlTransient
+    public LinkedHashMap<String, PropertyLayoutMetadata> getAllPropertiesById() {
+        final LinkedHashMap<String, PropertyLayoutMetadata> propertyIds = Maps.newLinkedHashMap();
+        visit(new ObjectLayoutMetadata.VisitorAdapter() {
+            public void visit(final PropertyLayoutMetadata propertyLayoutMetadata) {
+                propertyIds.put(propertyLayoutMetadata.getId(), propertyLayoutMetadata);
+            }
+        });
+        return propertyIds;
+    }
+
+
+    @Programmatic
+    @XmlTransient
+    public LinkedHashMap<String, CollectionLayoutMetadata> getAllCollectionsById() {
+        final LinkedHashMap<String, CollectionLayoutMetadata> collectionIds = Maps.newLinkedHashMap();
+        final LinkedHashMap<String, ActionLayoutMetadata> actionIds = Maps.newLinkedHashMap();
+
+        visit(new ObjectLayoutMetadata.VisitorAdapter() {
+            @Override
+            public void visit(final CollectionLayoutMetadata collectionLayoutMetadata) {
+                collectionIds.put(collectionLayoutMetadata.getId(), collectionLayoutMetadata);
+            }
+        });
+        return collectionIds;
+    }
+
+
+    @Programmatic
+    @XmlTransient
+    public LinkedHashMap<String, ActionLayoutMetadata> getAllActionsById() {
+        final LinkedHashMap<String, ActionLayoutMetadata> actionIds = Maps.newLinkedHashMap();
+
+        visit(new ObjectLayoutMetadata.VisitorAdapter() {
+            @Override
+            public void visit(final ActionLayoutMetadata actionLayoutMetadata) {
+                actionIds.put(actionLayoutMetadata.getId(), actionLayoutMetadata);
+            }
+        });
+        return actionIds;
+    }
+
+
+
+    private boolean normalized;
+
+    /**
+     * Whether {@link ObjectLayoutMetadataService#normalize(ObjectLayoutMetadata, Class)}
+     * has been called on this instance.
+     */
+    @Programmatic
+    @XmlTransient
+    public boolean isNormalized() {
+        return normalized;
+    }
+
+    public void setNormalized(final boolean normalized) {
+        this.normalized = normalized;
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/isis/blob/fb0f1273/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/Property.java
----------------------------------------------------------------------
diff --git a/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/Property.java b/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/Property.java
deleted file mode 100644
index e01e47c..0000000
--- a/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/Property.java
+++ /dev/null
@@ -1,209 +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.v1_0;
-
-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.XmlElementWrapper;
-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;
-
-/**
- * Broadly corresponds to the {@link org.apache.isis.applib.annotation.PropertyLayout} annotation.
- */
-@XmlType(
-        propOrder = {
-                "named"
-                , "describedAs"
-                , "actions"
-        }
-)
-public class Property implements ActionHolder, Serializable {
-
-    private static final long serialVersionUID = 1L;
-
-    public Property() {
-    }
-
-    public Property(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;
-
-    @XmlAttribute(required = false)
-    public String getCssClass() {
-        return cssClass;
-    }
-
-    public void setCssClass(String cssClass) {
-        this.cssClass = cssClass;
-    }
-
-
-    private String describedAs;
-
-    @XmlElement(required = false)
-    public String getDescribedAs() {
-        return describedAs;
-    }
-
-    public void setDescribedAs(String describedAs) {
-        this.describedAs = describedAs;
-    }
-
-
-    private Where hidden;
-
-    @XmlAttribute(required = false)
-    public Where getHidden() {
-        return hidden;
-    }
-
-    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;
-
-    @XmlElement(required = false)
-    public String getNamed() {
-        return named;
-    }
-
-    public void setNamed(String named) {
-        this.named = named;
-    }
-
-
-    private Boolean namedEscaped;
-
-    @XmlAttribute(required = false)
-    public Boolean getNamedEscaped() {
-        return namedEscaped;
-    }
-
-    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<Action> actions;
-
-    @XmlElementWrapper(required = false)
-    @XmlElement(name = "action", required = false)
-    public List<Action> getActions() {
-        return actions;
-    }
-
-    public void setActions(List<Action> actions) {
-        this.actions = actions;
-    }
-
-
-    private PropertyGroup owner;
-    /**
-     * Owner.
-     *
-     * <p>
-     *     Set programmatically by framework after reading in from XML.
-     * </p>
-     */
-    @XmlTransient
-    public PropertyGroup getOwner() {
-        return owner;
-    }
-
-    public void setOwner(final PropertyGroup owner) {
-        this.owner = owner;
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/isis/blob/fb0f1273/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/PropertyGroup.java
----------------------------------------------------------------------
diff --git a/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/PropertyGroup.java b/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/PropertyGroup.java
index 78ef28a..fd7f3c7 100644
--- a/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/PropertyGroup.java
+++ b/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/PropertyGroup.java
@@ -22,13 +22,14 @@ import java.io.Serializable;
 import java.util.ArrayList;
 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.XmlElementWrapper;
 import javax.xml.bind.annotation.XmlTransient;
 import javax.xml.bind.annotation.XmlType;
 
-import com.google.common.collect.Lists;
+import com.google.common.base.Function;
 
 import org.apache.isis.applib.annotation.MemberOrder;
 
@@ -66,31 +67,31 @@ public class PropertyGroup implements ColumnContent, ActionHolder, Serializable
 
 
 
-    private List<Action> actions;
+    private List<ActionLayoutMetadata> actions;
 
     @XmlElementWrapper(required = false)
     @XmlElement(name = "action", required = false)
-    public List<Action> getActions() {
+    public List<ActionLayoutMetadata> getActions() {
         return actions;
     }
 
-    public void setActions(List<Action> actions) {
-        this.actions = actions;
+    public void setActions(List<ActionLayoutMetadata> actionLayoutMetadatas) {
+        this.actions = actionLayoutMetadatas;
     }
 
 
 
     // must be at least one property in the property group
-    private List<Property> properties = new ArrayList<Property>() {{
-        add(new Property());
+    private List<PropertyLayoutMetadata> properties = new ArrayList<PropertyLayoutMetadata>() {{
+        add(new PropertyLayoutMetadata());
     }};
 
     @XmlElement(name = "property", required = true)
-    public List<Property> getProperties() {
+    public List<PropertyLayoutMetadata> getProperties() {
         return properties;
     }
 
-    public void setProperties(List<Property> properties) {
+    public void setProperties(List<PropertyLayoutMetadata> properties) {
         this.properties = properties;
     }
 
@@ -113,4 +114,16 @@ public class PropertyGroup implements ColumnContent, ActionHolder, Serializable
     }
 
 
+    public static class Util {
+        private Util(){}
+        public static Function<? super PropertyGroup, String> nameOf() {
+            return new Function<PropertyGroup, String>() {
+                @Nullable @Override
+                public String apply(@Nullable final PropertyGroup propertyGroup) {
+                    return propertyGroup.getName();
+                }
+            };
+        }
+    }
+
 }

http://git-wip-us.apache.org/repos/asf/isis/blob/fb0f1273/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/PropertyLayoutMetadata.java
----------------------------------------------------------------------
diff --git a/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/PropertyLayoutMetadata.java b/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/PropertyLayoutMetadata.java
new file mode 100644
index 0000000..5f6b3b1
--- /dev/null
+++ b/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/PropertyLayoutMetadata.java
@@ -0,0 +1,227 @@
+/*
+ *  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.v1_0;
+
+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.XmlElementWrapper;
+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;
+
+/**
+ * Broadly corresponds to the {@link org.apache.isis.applib.annotation.PropertyLayout} annotation.
+ */
+@XmlType(
+        name = "propertyLayout"
+        , propOrder = {
+                "named"
+                , "describedAs"
+                , "actions"
+                , "metadataError"
+        }
+)
+public class PropertyLayoutMetadata implements ActionHolder, Serializable {
+
+    private static final long serialVersionUID = 1L;
+
+    public PropertyLayoutMetadata() {
+    }
+
+    public PropertyLayoutMetadata(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;
+
+    @XmlAttribute(required = false)
+    public String getCssClass() {
+        return cssClass;
+    }
+
+    public void setCssClass(String cssClass) {
+        this.cssClass = cssClass;
+    }
+
+
+    private String describedAs;
+
+    @XmlElement(required = false)
+    public String getDescribedAs() {
+        return describedAs;
+    }
+
+    public void setDescribedAs(String describedAs) {
+        this.describedAs = describedAs;
+    }
+
+
+    private Where hidden;
+
+    @XmlAttribute(required = false)
+    public Where getHidden() {
+        return hidden;
+    }
+
+    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;
+
+    @XmlElement(required = false)
+    public String getNamed() {
+        return named;
+    }
+
+    public void setNamed(String named) {
+        this.named = named;
+    }
+
+
+    private Boolean namedEscaped;
+
+    @XmlAttribute(required = false)
+    public Boolean getNamedEscaped() {
+        return namedEscaped;
+    }
+
+    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<ActionLayoutMetadata> actions;
+
+    @XmlElementWrapper(required = false)
+    @XmlElement(name = "action", required = false)
+    public List<ActionLayoutMetadata> getActions() {
+        return actions;
+    }
+
+    public void setActions(List<ActionLayoutMetadata> actionLayoutMetadatas) {
+        this.actions = actionLayoutMetadatas;
+    }
+
+
+    private PropertyGroup owner;
+    /**
+     * Owner.
+     *
+     * <p>
+     *     Set programmatically by framework after reading in from XML.
+     * </p>
+     */
+    @XmlTransient
+    public PropertyGroup getOwner() {
+        return owner;
+    }
+
+    public void setOwner(final PropertyGroup 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;
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/isis/blob/fb0f1273/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/Tab.java
----------------------------------------------------------------------
diff --git a/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/Tab.java b/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/Tab.java
index e81d20a..04d2542 100644
--- a/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/Tab.java
+++ b/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/Tab.java
@@ -26,6 +26,7 @@ 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;
@@ -130,9 +131,20 @@ public class Tab implements Serializable {
         if(propertyGroups != null) {
             contents.addAll(propertyGroups);
         }
-        final List<Collection> collections = column.getCollections();
-        if(collections != null) {
-            contents.addAll(collections);
+        final List<CollectionLayoutMetadata> collectionLayoutMetadatas = column.getCollections();
+        if(collectionLayoutMetadatas != null) {
+            contents.addAll(collectionLayoutMetadatas);
+        }
+    }
+
+    public static class Predicates {
+        public static Predicate<Tab> notEmpty() {
+            return new Predicate<Tab>() {
+                @Override
+                public boolean apply(final Tab tab) {
+                    return !tab.getContents().isEmpty();
+                }
+            };
         }
     }
 }

http://git-wip-us.apache.org/repos/asf/isis/blob/fb0f1273/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/TabGroup.java
----------------------------------------------------------------------
diff --git a/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/TabGroup.java b/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/TabGroup.java
index 60f39b8..7547d5e 100644
--- a/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/TabGroup.java
+++ b/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/TabGroup.java
@@ -26,6 +26,9 @@ 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;
+
 @XmlType()
 public class TabGroup implements Serializable {
 
@@ -50,7 +53,7 @@ public class TabGroup implements Serializable {
 
 
 
-    private DomainObject owner;
+    private ObjectLayoutMetadata owner;
 
     /**
      * Owner.
@@ -60,12 +63,26 @@ public class TabGroup implements Serializable {
      * </p>
      */
     @XmlTransient
-    public DomainObject getOwner() {
+    public ObjectLayoutMetadata getOwner() {
         return owner;
     }
 
-    public void setOwner(final DomainObject owner) {
+    public void setOwner(final ObjectLayoutMetadata owner) {
         this.owner = owner;
     }
 
+
+    public static class Predicates {
+        public static Predicate<TabGroup> notEmpty() {
+            return new Predicate<TabGroup>() {
+                @Override
+                public boolean apply(final TabGroup tabGroup) {
+                    return FluentIterable
+                            .from(tabGroup.getTabs())
+                            .anyMatch(Tab.Predicates.notEmpty());
+                }
+            };
+        }
+    }
+
 }

http://git-wip-us.apache.org/repos/asf/isis/blob/fb0f1273/core/applib/src/main/java/org/apache/isis/applib/services/layout/ObjectLayoutMetadataService.java
----------------------------------------------------------------------
diff --git a/core/applib/src/main/java/org/apache/isis/applib/services/layout/ObjectLayoutMetadataService.java b/core/applib/src/main/java/org/apache/isis/applib/services/layout/ObjectLayoutMetadataService.java
new file mode 100644
index 0000000..56efd62
--- /dev/null
+++ b/core/applib/src/main/java/org/apache/isis/applib/services/layout/ObjectLayoutMetadataService.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.
+ */
+package org.apache.isis.applib.services.layout;
+
+import org.apache.isis.applib.annotation.Programmatic;
+import org.apache.isis.applib.layout.v1_0.ObjectLayoutMetadata;
+
+public interface ObjectLayoutMetadataService {
+
+    @Programmatic ObjectLayoutMetadata fromXml(Class<?> domainClass);
+
+    /**
+     *  @param objectLayoutMetadata - the layout to be validated.
+     * @param domainClass - as per domain class.
+     */
+    @Programmatic ObjectLayoutMetadata normalize(final ObjectLayoutMetadata objectLayoutMetadata, final Class<?> domainClass);
+
+    @Programmatic String toXml(ObjectLayoutMetadata objectLayoutMetadata);
+
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/isis/blob/fb0f1273/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
new file mode 100644
index 0000000..9a3f5d2
--- /dev/null
+++ b/core/applib/src/main/java/org/apache/isis/applib/services/layout/Object_downloadLayoutXml.java
@@ -0,0 +1,67 @@
+/**
+ *  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 java.io.IOException;
+
+import javax.inject.Inject;
+import javax.xml.bind.JAXBException;
+
+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.RestrictTo;
+import org.apache.isis.applib.annotation.SemanticsOf;
+import org.apache.isis.applib.services.dto.Dto;
+import org.apache.isis.applib.services.jaxb.JaxbService;
+import org.apache.isis.applib.value.Clob;
+
+@Mixin
+public class Object_downloadLayoutXml {
+
+    private final Object object;
+
+    public Object_downloadLayoutXml(final Dto object) {
+        this.object = object;
+    }
+
+    public static class ActionDomainEvent extends org.apache.isis.applib.IsisApplibModule.ActionDomainEvent<Object_downloadLayoutXml> {}
+
+    @Action(
+            domainEvent = ActionDomainEvent.class,
+            semantics = SemanticsOf.SAFE,
+            restrictTo = RestrictTo.PROTOTYPING
+    )
+    @ActionLayout(
+            cssClassFa = "fa-download"
+    )
+    @MemberOrder(sequence = "550.1")
+    public Object $$(final String fileName) throws JAXBException, IOException {
+        final String xml = layoutXmlService.toXml(object);
+        return new Clob(Util.withSuffix(fileName, "xml"), "text/xml", xml);
+    }
+
+    public String default0$$() {
+        return Util.withSuffix(object.getClass().getName(), "xml");
+    }
+
+
+    @Inject
+    JaxbService layoutXmlService;
+
+}

http://git-wip-us.apache.org/repos/asf/isis/blob/fb0f1273/core/applib/src/main/java/org/apache/isis/applib/services/layout/Util.java
----------------------------------------------------------------------
diff --git a/core/applib/src/main/java/org/apache/isis/applib/services/layout/Util.java b/core/applib/src/main/java/org/apache/isis/applib/services/layout/Util.java
new file mode 100644
index 0000000..7e04bf8
--- /dev/null
+++ b/core/applib/src/main/java/org/apache/isis/applib/services/layout/Util.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.services.layout;
+
+class Util {
+
+    private Util(){}
+
+    static String withSuffix(String fileName, String suffix) {
+        if(!suffix.startsWith(".")) {
+            suffix = "." + suffix;
+        }
+        if(!fileName.endsWith(suffix)) {
+            fileName += suffix;
+        }
+        return fileName;
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/isis/blob/fb0f1273/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 d19bf9d..d2ea8ea 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,14 +19,14 @@
 
 package org.apache.isis.core.metamodel.facets.actions.layout;
 
-import org.apache.isis.applib.layout.v1_0.Action;
+import org.apache.isis.applib.layout.v1_0.ActionLayoutMetadata;
 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;
 
 public class ActionPositionFacetForActionXml extends ActionPositionFacetAbstract {
 
-    public static ActionPositionFacet create(Action actionLayout, FacetHolder holder) {
+    public static ActionPositionFacet create(ActionLayoutMetadata actionLayout, FacetHolder holder) {
         if(actionLayout == null) {
             return null;
         }

http://git-wip-us.apache.org/repos/asf/isis/blob/fb0f1273/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 b3a9623..8ba315b 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,14 +20,14 @@
 package org.apache.isis.core.metamodel.facets.actions.layout;
 
 import org.apache.isis.applib.annotation.BookmarkPolicy;
-import org.apache.isis.applib.layout.v1_0.Action;
+import org.apache.isis.applib.layout.v1_0.ActionLayoutMetadata;
 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;
 
 public class BookmarkPolicyFacetForActionXml extends BookmarkPolicyFacetAbstract {
 
-    public static BookmarkPolicyFacet create(final Action actionLayout, final FacetHolder holder) {
+    public static BookmarkPolicyFacet create(final ActionLayoutMetadata actionLayout, final FacetHolder holder) {
         if (actionLayout == null) {
             return null;
         }

http://git-wip-us.apache.org/repos/asf/isis/blob/fb0f1273/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 d0258d4..b413266 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.v1_0.Action;
+import org.apache.isis.applib.layout.v1_0.ActionLayoutMetadata;
 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;
@@ -29,7 +29,7 @@ import org.apache.isis.core.metamodel.facets.members.cssclassfa.CssClassFaPositi
 
 public class CssClassFaFacetForActionXml extends CssClassFaFacetAbstract {
 
-    public static CssClassFaFacet create(final Action actionLayout, final FacetHolder holder) {
+    public static CssClassFaFacet create(final ActionLayoutMetadata actionLayout, final FacetHolder holder) {
         if(actionLayout == null) {
             return null;
         }

http://git-wip-us.apache.org/repos/asf/isis/blob/fb0f1273/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 9ba1431..d50323f 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,14 +21,14 @@ package org.apache.isis.core.metamodel.facets.actions.layout;
 
 import com.google.common.base.Strings;
 
-import org.apache.isis.applib.layout.v1_0.Action;
+import org.apache.isis.applib.layout.v1_0.ActionLayoutMetadata;
 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;
 
 public class CssClassFacetForActionXml extends CssClassFacetAbstract {
 
-    public static CssClassFacet create(Action actionLayout, FacetHolder holder) {
+    public static CssClassFacet create(ActionLayoutMetadata actionLayout, FacetHolder holder) {
         if(actionLayout == null) {
             return null;
         }

http://git-wip-us.apache.org/repos/asf/isis/blob/fb0f1273/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 a33dd7c..ee81891 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,14 +21,14 @@ package org.apache.isis.core.metamodel.facets.actions.layout;
 
 import com.google.common.base.Strings;
 
-import org.apache.isis.applib.layout.v1_0.Action;
+import org.apache.isis.applib.layout.v1_0.ActionLayoutMetadata;
 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;
 
 public class DescribedAsFacetForActionXml extends DescribedAsFacetAbstract {
 
-    public static DescribedAsFacet create(Action actionLayout, FacetHolder holder) {
+    public static DescribedAsFacet create(ActionLayoutMetadata actionLayout, FacetHolder holder) {
         if(actionLayout == null) {
             return null;
         }


[23/50] [abbrv] isis git commit: ISIS-993: remove the 'first-field' class appender, since doesn't seem to be used

Posted by da...@apache.org.
ISIS-993: remove the 'first-field' class appender, since doesn't seem to be used


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

Branch: refs/heads/ISIS-993
Commit: f9f43c29685c6bc8d7c26c7331f75bcd2b5faf54
Parents: d41f2d1
Author: Dan Haywood <da...@haywood-associates.co.uk>
Authored: Sun Jan 10 14:17:02 2016 +0000
Committer: Dan Haywood <da...@haywood-associates.co.uk>
Committed: Mon Jan 25 14:38:24 2016 +0000

----------------------------------------------------------------------
 .../entity/properties/EntityPropertiesForm.java          | 11 ++---------
 1 file changed, 2 insertions(+), 9 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/isis/blob/f9f43c29/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/properties/EntityPropertiesForm.java
----------------------------------------------------------------------
diff --git a/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/properties/EntityPropertiesForm.java b/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/properties/EntityPropertiesForm.java
index ea35848..02230e9 100644
--- a/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/properties/EntityPropertiesForm.java
+++ b/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/properties/EntityPropertiesForm.java
@@ -128,7 +128,6 @@ public class EntityPropertiesForm extends FormAbstract<ObjectAdapter> implements
 
     private NotificationPanel feedback;
     
-    private boolean renderedFirstField;
 
     public EntityPropertiesForm(
             final String id,
@@ -167,8 +166,6 @@ public class EntityPropertiesForm extends FormAbstract<ObjectAdapter> implements
             columnSpans = memberGroupLayoutFacet.getColumnSpans();
         }
 
-        renderedFirstField = false;
-
         // 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);
@@ -263,7 +260,8 @@ public class EntityPropertiesForm extends FormAbstract<ObjectAdapter> implements
     private void addPropertiesAndCollections(
             final MarkupContainer middleColumn,
             final EntityModel entityModel,
-            final Tab tabMetaDataIfAny, final Hint hint) {
+            final Tab tabMetaDataIfAny,
+            final Hint hint) {
         final Column columnMetaDataIfAny = hint.from(tabMetaDataIfAny);
 
         final EntityModel entityModelWithHints =
@@ -367,11 +365,6 @@ public class EntityPropertiesForm extends FormAbstract<ObjectAdapter> implements
                 otoa, getDeploymentType());
 
         entityActions.addAll(EntityActionUtil.asLinkAndLabelsForAdditionalLinksPanel(entityModel, associatedActions));
-
-        if(!renderedFirstField) {
-            component.add(new CssClassAppender("first-field"));
-            renderedFirstField = true;
-        }
     }
 
     @Override


[31/50] [abbrv] isis git commit: ISIS-993: fixed the OK/edit issue.

Posted by da...@apache.org.
ISIS-993: fixed the OK/edit issue.


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

Branch: refs/heads/ISIS-993
Commit: d41f2d13c234a22bdab14a5172619e62f4b1a80e
Parents: 9bad36c
Author: Dan Haywood <da...@haywood-associates.co.uk>
Authored: Sat Jan 9 09:10:30 2016 +0000
Committer: Dan Haywood <da...@haywood-associates.co.uk>
Committed: Mon Jan 25 14:38:24 2016 +0000

----------------------------------------------------------------------
 .../ui/components/entity/properties/EntityPropertiesForm.java  | 2 +-
 .../src/main/java/domainapp/dom/simple/SimpleObject.layout.xml | 6 ++++--
 2 files changed, 5 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/isis/blob/d41f2d13/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/properties/EntityPropertiesForm.java
----------------------------------------------------------------------
diff --git a/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/properties/EntityPropertiesForm.java b/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/properties/EntityPropertiesForm.java
index 1f8792a..ea35848 100644
--- a/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/properties/EntityPropertiesForm.java
+++ b/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/properties/EntityPropertiesForm.java
@@ -227,7 +227,7 @@ public class EntityPropertiesForm extends FormAbstract<ObjectAdapter> implements
             addFeedbackGui(leftColumn);
 
         } else {
-            Components.permanentlyHide(this,
+            Components.permanentlyHide(leftColumn,
                     ID_EDIT_BUTTON, ID_OK_BUTTON, ID_CANCEL_BUTTON,
                     ID_FEEDBACK);
         }

http://git-wip-us.apache.org/repos/asf/isis/blob/d41f2d13/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 7d4f0e4..e49e937 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,8 +13,10 @@
                         </actions>
                     </property>
                 </propertyGroup>
+                <collection id="similarTo" defaultView="table"/>
             </left>
             <right span="6">
+                <collection id="others" defaultView="hide"/>
             </right>
         </tab>
         <tab name="Metadata">
@@ -29,12 +31,12 @@
             </left>
         </tab>
     </tabGroup>
+<!--
     <tabGroup>
         <tab name="Collections">
             <left span="6">
-                <collection id="similarTo" defaultView="table"/>
-                <collection id="others" defaultView="hide"/>
             </left>
         </tab>
     </tabGroup>
+-->
 </objectLayout>
\ No newline at end of file


[26/50] [abbrv] isis git commit: ISIS-993: slight simplification to metadata to make easier to fit into existing wicket cpt implementation; Wicket components now rendering again

Posted by da...@apache.org.
ISIS-993: slight simplification to metadata to make easier to fit into existing wicket cpt implementation; Wicket components now rendering again


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

Branch: refs/heads/ISIS-993
Commit: f7d55cf3aab05aacb511f6b27b07c7ebf8a7e0ff
Parents: 79248dc
Author: Dan Haywood <da...@haywood-associates.co.uk>
Authored: Fri Jan 8 10:28:12 2016 +0000
Committer: Dan Haywood <da...@haywood-associates.co.uk>
Committed: Mon Jan 25 14:38:24 2016 +0000

----------------------------------------------------------------------
 .../schema/applib/layout/layout-1.0.xsd         |  8 +--
 .../asciidoc/schema/applib/layout/layout.xsd    |  8 +--
 .../apache/isis/applib/layout/v1_0/Column.java  | 45 ++++++-------
 .../isis/applib/layout/v1_0/ColumnContent.java  |  1 +
 .../isis/applib/layout/v1_0/PropertyGroup.java  |  7 +-
 .../org/apache/isis/applib/layout/v1_0/Tab.java | 30 ++++++++-
 .../object/layoutxml/LayoutXmlFacetDefault.java | 16 +++--
 .../layoutxml/v1_0/DomainObjectTest.java        | 15 ++---
 .../viewer/wicket/model/models/EntityModel.java | 12 ++--
 .../collections/EntityCollectionsPanel.html     |  2 +-
 .../entity/properties/EntityPropertiesForm.java | 69 ++++++++++++--------
 .../properties/EntityPropertiesPanel.html       |  7 +-
 .../entity/tabgroups/EntityTabGroupsPanel.java  |  2 +-
 .../dom/simple/SimpleObject.layout.xml          |  3 +-
 14 files changed, 132 insertions(+), 93 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/isis/blob/f7d55cf3/adocs/documentation/src/main/asciidoc/schema/applib/layout/layout-1.0.xsd
----------------------------------------------------------------------
diff --git a/adocs/documentation/src/main/asciidoc/schema/applib/layout/layout-1.0.xsd b/adocs/documentation/src/main/asciidoc/schema/applib/layout/layout-1.0.xsd
index ba275c2..6aeb3d6 100644
--- a/adocs/documentation/src/main/asciidoc/schema/applib/layout/layout-1.0.xsd
+++ b/adocs/documentation/src/main/asciidoc/schema/applib/layout/layout-1.0.xsd
@@ -48,17 +48,15 @@
 
   <xs:complexType name="column">
     <xs:sequence>
-      <xs:choice minOccurs="0" maxOccurs="unbounded">
-        <xs:element name="propertyGroup" type="tns:propertyGroup"/>
-        <xs:element name="collection" type="tns:collection"/>
-      </xs:choice>
+      <xs:element name="propertyGroup" type="tns:propertyGroup" minOccurs="0" maxOccurs="unbounded"/>
+      <xs:element name="collection" type="tns:collection" minOccurs="0" maxOccurs="unbounded"/>
     </xs:sequence>
     <xs:attribute name="span" type="xs:int" use="required"/>
   </xs:complexType>
 
   <xs:complexType name="propertyGroup">
     <xs:sequence>
-      <xs:element name="actions">
+      <xs:element name="actions" minOccurs="0">
         <xs:complexType>
           <xs:sequence>
             <xs:element name="action" type="tns:action" minOccurs="0" maxOccurs="unbounded"/>

http://git-wip-us.apache.org/repos/asf/isis/blob/f7d55cf3/adocs/documentation/src/main/asciidoc/schema/applib/layout/layout.xsd
----------------------------------------------------------------------
diff --git a/adocs/documentation/src/main/asciidoc/schema/applib/layout/layout.xsd b/adocs/documentation/src/main/asciidoc/schema/applib/layout/layout.xsd
index ba275c2..6aeb3d6 100644
--- a/adocs/documentation/src/main/asciidoc/schema/applib/layout/layout.xsd
+++ b/adocs/documentation/src/main/asciidoc/schema/applib/layout/layout.xsd
@@ -48,17 +48,15 @@
 
   <xs:complexType name="column">
     <xs:sequence>
-      <xs:choice minOccurs="0" maxOccurs="unbounded">
-        <xs:element name="propertyGroup" type="tns:propertyGroup"/>
-        <xs:element name="collection" type="tns:collection"/>
-      </xs:choice>
+      <xs:element name="propertyGroup" type="tns:propertyGroup" minOccurs="0" maxOccurs="unbounded"/>
+      <xs:element name="collection" type="tns:collection" minOccurs="0" maxOccurs="unbounded"/>
     </xs:sequence>
     <xs:attribute name="span" type="xs:int" use="required"/>
   </xs:complexType>
 
   <xs:complexType name="propertyGroup">
     <xs:sequence>
-      <xs:element name="actions">
+      <xs:element name="actions" minOccurs="0">
         <xs:complexType>
           <xs:sequence>
             <xs:element name="action" type="tns:action" minOccurs="0" maxOccurs="unbounded"/>

http://git-wip-us.apache.org/repos/asf/isis/blob/f7d55cf3/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/Column.java
----------------------------------------------------------------------
diff --git a/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/Column.java b/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/Column.java
index 7e7129c..905438f 100644
--- a/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/Column.java
+++ b/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/Column.java
@@ -23,17 +23,15 @@ import java.util.List;
 
 import javax.xml.bind.annotation.XmlAttribute;
 import javax.xml.bind.annotation.XmlElement;
-import javax.xml.bind.annotation.XmlElements;
 import javax.xml.bind.annotation.XmlTransient;
 import javax.xml.bind.annotation.XmlType;
 
-import com.google.common.collect.Iterables;
 import com.google.common.collect.Lists;
 
 @XmlType(
         propOrder = {
-                "span"
-                , "content"
+                "propertyGroups"
+                , "collections"
         }
 )
 public class Column implements Serializable {
@@ -60,35 +58,30 @@ public class Column implements Serializable {
 
 
 
-    private List<ColumnContent> content = Lists.newArrayList();
+    private List<PropertyGroup> propertyGroups = Lists.newArrayList();
 
-    @XmlElements({
-        @XmlElement(name = "propertyGroup", required = false, type = PropertyGroup.class),
-        @XmlElement(name = "collection", required = false, type = Collection.class)
-
-    })
-    public List<ColumnContent> getContent() {
-        return content;
+    // no wrapper
+    @XmlElement(name = "propertyGroup", required = false)
+    public List<PropertyGroup> getPropertyGroups() {
+        return propertyGroups;
     }
 
-    public void setContent(List<ColumnContent> content) {
-        this.content = content;
+    public void setPropertyGroups(final List<PropertyGroup> propertyGroups) {
+        this.propertyGroups = propertyGroups;
     }
 
-    @XmlTransient
-    public Iterable<PropertyGroup> getPropertyGroups() {
-        return Iterables.transform(
-                        Iterables.filter(getContent(), Util.is(PropertyGroup.class)),
-                        Util.cast(PropertyGroup.class));
-    }
-    @XmlTransient
-    public Iterable<Collection> getCollections() {
-        return Iterables.transform(
-                        Iterables.filter(getContent(), Util.is(Collection.class)),
-                        Util.cast(Collection.class));
-    }
 
+    private List<Collection> collections = Lists.newArrayList();
+
+    // no wrapper
+    @XmlElement(name = "collection", required = false)
+    public List<Collection> getCollections() {
+        return collections;
+    }
 
+    public void setCollections(final List<Collection> collections) {
+        this.collections = collections;
+    }
 
 
     private Tab owner;

http://git-wip-us.apache.org/repos/asf/isis/blob/f7d55cf3/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/ColumnContent.java
----------------------------------------------------------------------
diff --git a/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/ColumnContent.java b/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/ColumnContent.java
index ccd0e3f..526aa26 100644
--- a/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/ColumnContent.java
+++ b/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/ColumnContent.java
@@ -20,4 +20,5 @@ package org.apache.isis.applib.layout.v1_0;
 
 public interface ColumnContent {
 
+
 }

http://git-wip-us.apache.org/repos/asf/isis/blob/f7d55cf3/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/PropertyGroup.java
----------------------------------------------------------------------
diff --git a/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/PropertyGroup.java b/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/PropertyGroup.java
index f249071..78ef28a 100644
--- a/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/PropertyGroup.java
+++ b/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/PropertyGroup.java
@@ -66,12 +66,9 @@ public class PropertyGroup implements ColumnContent, ActionHolder, Serializable
 
 
 
-    private List<Action> actions = Lists.newArrayList();
+    private List<Action> actions;
 
-    /**
-     * The <code>&lt;actions&gt;</code> element must be present but can be empty.
-     */
-    @XmlElementWrapper(required = true)
+    @XmlElementWrapper(required = false)
     @XmlElement(name = "action", required = false)
     public List<Action> getActions() {
         return actions;

http://git-wip-us.apache.org/repos/asf/isis/blob/f7d55cf3/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/Tab.java
----------------------------------------------------------------------
diff --git a/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/Tab.java b/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/Tab.java
index 4a07dca..e81d20a 100644
--- a/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/Tab.java
+++ b/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/Tab.java
@@ -19,12 +19,17 @@
 package org.apache.isis.applib.layout.v1_0;
 
 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.collect.Lists;
+
+import org.apache.isis.applib.annotation.Programmatic;
+
 @XmlType(
         name="tab"
         , propOrder = {
@@ -105,6 +110,29 @@ public class Tab implements Serializable {
         this.owner = owner;
     }
 
+    /**
+     * Aggregates the contents of all collections on this tab.
+     */
+    @Programmatic
+    public List<ColumnContent> getContents() {
+        final List<ColumnContent> contents = Lists.newArrayList();
+        appendContent(contents, getLeft());
+        appendContent(contents, getMiddle());
+        appendContent(contents, getRight());
+        return contents;
+    }
 
-
+    private static void appendContent(final List<ColumnContent> contents, final Column column) {
+        if(column == null) {
+            return;
+        }
+        final List<PropertyGroup> propertyGroups = column.getPropertyGroups();
+        if(propertyGroups != null) {
+            contents.addAll(propertyGroups);
+        }
+        final List<Collection> collections = column.getCollections();
+        if(collections != null) {
+            contents.addAll(collections);
+        }
+    }
 }

http://git-wip-us.apache.org/repos/asf/isis/blob/f7d55cf3/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/object/layoutxml/LayoutXmlFacetDefault.java
----------------------------------------------------------------------
diff --git a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/object/layoutxml/LayoutXmlFacetDefault.java b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/object/layoutxml/LayoutXmlFacetDefault.java
index ca42fa6..eedda94 100644
--- a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/object/layoutxml/LayoutXmlFacetDefault.java
+++ b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/object/layoutxml/LayoutXmlFacetDefault.java
@@ -198,7 +198,7 @@ public class LayoutXmlFacetDefault
             boolean wasSet = defaultPropertyGroupRef.compareAndSet(null, new PropertyGroup(MemberGroupLayoutFacet.DEFAULT_GROUP));
             final PropertyGroup defaultPropertyGroup = defaultPropertyGroupRef.get();
             if(wasSet) {
-                firstColumnRef.get().getContent().add(defaultPropertyGroup);
+                firstColumnRef.get().getPropertyGroups().add(defaultPropertyGroup);
             }
             Iterables.removeAll(propertyIds, oneToOneAssociationById.keySet());
             for (final String propertyId : missingPropertyIds) {
@@ -223,7 +223,7 @@ public class LayoutXmlFacetDefault
                 lastTabGroup.getTabs().add(tab);
                 Column left = new Column(12);
                 tab.setLeft(left);
-                left.getContent().add(new Collection(collectionId));
+                left.getCollections().add(new Collection(collectionId));
             }
         }
 
@@ -339,10 +339,18 @@ public class LayoutXmlFacetDefault
                 FacetUtil.addFacet(PagedFacetForCollectionXml.create(collection, oneToManyAssociation));
                 FacetUtil.addFacet(SortedByFacetForCollectionXml.create(collection, oneToManyAssociation));
 
-                // copy the collection name onto the tab
+                // @MemberOrder#name based on the collection's id (so that each has a single "member group")
+                final String groupName = collection.getId();
+                final String sequence = nextInSequenceFor(groupName);
+                FacetUtil.addFacet(
+                        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 Column column = collection.getOwner();
                 final Tab tab = column.getOwner();
-                tab.setName(collection.getId());
+                if(tab.getContents().size() == 1) {
+                    tab.setName(collection.getId());
+                }
             }
 
             private String nextInSequenceFor(final String propertyGroupName) {

http://git-wip-us.apache.org/repos/asf/isis/blob/f7d55cf3/core/metamodel/src/test/java/org/apache/isis/core/metamodel/layoutxml/v1_0/DomainObjectTest.java
----------------------------------------------------------------------
diff --git a/core/metamodel/src/test/java/org/apache/isis/core/metamodel/layoutxml/v1_0/DomainObjectTest.java b/core/metamodel/src/test/java/org/apache/isis/core/metamodel/layoutxml/v1_0/DomainObjectTest.java
index 437783a..a8d06c0 100644
--- a/core/metamodel/src/test/java/org/apache/isis/core/metamodel/layoutxml/v1_0/DomainObjectTest.java
+++ b/core/metamodel/src/test/java/org/apache/isis/core/metamodel/layoutxml/v1_0/DomainObjectTest.java
@@ -18,7 +18,6 @@
  */
 package org.apache.isis.core.metamodel.layoutxml.v1_0;
 
-import java.util.List;
 import java.util.Map;
 
 import javax.xml.bind.Marshaller;
@@ -69,11 +68,13 @@ public class DomainObjectTest {
         Column left = tab.getLeft();
 
         PropertyGroup leftPropGroup = new PropertyGroup();
-        left.getContent().add(leftPropGroup);
+        left.setPropertyGroups(Lists.<PropertyGroup>newArrayList());
+        left.getPropertyGroups().add(leftPropGroup);
         leftPropGroup.setName("General");
 
         Collection similarToColl = new Collection();
-        left.getContent().add(similarToColl);
+        left.setCollections(Lists.<Collection>newArrayList());
+        left.getCollections().add(similarToColl);
         similarToColl.setId("similarTo");
 
         Property nameProperty = leftPropGroup.getProperties().get(0);
@@ -81,14 +82,12 @@ public class DomainObjectTest {
 
         Action updateNameAction = new Action();
         updateNameAction.setId("updateName");
-        final List<Action> propertyActions = Lists.newArrayList();
-        nameProperty.setActions(propertyActions);
+        nameProperty.setActions(Lists.<Action>newArrayList());
         nameProperty.getActions().add(updateNameAction);
 
         Action deleteAction = new Action();
         deleteAction.setId("delete");
-        final List<Action> domainObjectActions = Lists.newArrayList();
-        domainObject.setActions(domainObjectActions);
+        domainObject.setActions(Lists.<Action>newArrayList());
         domainObject.getActions().add(deleteAction);
 
         String xml = jaxbService.toXml(domainObject,
@@ -115,7 +114,7 @@ public class DomainObjectTest {
     protected void dumpXsd(final DomainObject domainObject) {
         Map<String, String> schemas = jaxbService.toXsd(domainObject, JaxbService.IsisSchemas.INCLUDE);
         for (Map.Entry<String, String> entry : schemas.entrySet()) {
-            System.out.println(entry.getKey() + ":");
+            //System.out.println(entry.getKey() + ":");
             System.out.println(entry.getValue());
         }
     }

http://git-wip-us.apache.org/repos/asf/isis/blob/f7d55cf3/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 97ef07c..899f48e 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
@@ -634,17 +634,17 @@ public class EntityModel extends BookmarkableModel<ObjectAdapter> {
 
 
     // //////////////////////////////////////////////////////////
-    // tab (if any)
+    // tab metadata (if any)
     // //////////////////////////////////////////////////////////
 
-    private Tab tab;
+    private Tab tabMetadata;
 
-    public Tab getTab() {
-        return tab;
+    public Tab getTabMetadata() {
+        return tabMetadata;
     }
 
-    public void setTab(final Tab tab) {
-        this.tab = tab;
+    public void setTabMetadata(final Tab tabMetadata) {
+        this.tabMetadata = tabMetadata;
     }
 
     // //////////////////////////////////////////////////////////

http://git-wip-us.apache.org/repos/asf/isis/blob/f7d55cf3/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/collections/EntityCollectionsPanel.html
----------------------------------------------------------------------
diff --git a/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/collections/EntityCollectionsPanel.html b/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/collections/EntityCollectionsPanel.html
index f46ec4a..2d39517 100644
--- a/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/collections/EntityCollectionsPanel.html
+++ b/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/collections/EntityCollectionsPanel.html
@@ -38,7 +38,7 @@
                             </div>
                         </div>
 
-                        <div wicket:id="owner" class="collection panel-body">
+                        <div wicket:id="collection" class="collection panel-body">
                             [collection]
                         </div>
                     </div>

http://git-wip-us.apache.org/repos/asf/isis/blob/f7d55cf3/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/properties/EntityPropertiesForm.java
----------------------------------------------------------------------
diff --git a/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/properties/EntityPropertiesForm.java b/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/properties/EntityPropertiesForm.java
index 8339981..5901d08 100644
--- a/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/properties/EntityPropertiesForm.java
+++ b/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/properties/EntityPropertiesForm.java
@@ -155,11 +155,14 @@ public class EntityPropertiesForm extends FormAbstract<ObjectAdapter> implements
 
         final EntityModel entityModel = (EntityModel) getModel();
 
-        final Tab tabIfAny = entityModel.getTab();
+        final Tab tabMetaDataIfAny = entityModel.getTabMetadata();
 
         final ColumnSpans columnSpans;
-        if(tabIfAny != null) {
-            columnSpans = ColumnSpans.asSpans(tabIfAny.getLeft().getSpan(), tabIfAny.getMiddle().getSpan(), tabIfAny.getRight().getSpan());
+        if(tabMetaDataIfAny != null) {
+            columnSpans = ColumnSpans.asSpans(
+                    tabMetaDataIfAny.getLeft().getSpan(),
+                    tabMetaDataIfAny.getMiddle().getSpan(),
+                    tabMetaDataIfAny.getRight().getSpan());
         } else {
             final MemberGroupLayoutFacet memberGroupLayoutFacet =
                     entityModel.getObject().getSpecification().getFacet(MemberGroupLayoutFacet.class);
@@ -174,7 +177,7 @@ public class EntityPropertiesForm extends FormAbstract<ObjectAdapter> implements
         
         boolean addedProperties;
         if(columnSpans.getLeft() > 0) {
-            addedProperties = addPropertiesInColumn(leftColumn, MemberGroupLayoutHint.LEFT, tabIfAny, columnSpans);
+            addedProperties = addMembersInColumn(leftColumn, MemberGroupLayoutHint.LEFT, tabMetaDataIfAny, columnSpans);
             addButtons(leftColumn);
             addFeedbackGui(leftColumn);
         } else {
@@ -192,7 +195,7 @@ public class EntityPropertiesForm extends FormAbstract<ObjectAdapter> implements
         if(columnSpans.getMiddle() > 0) {
             MarkupContainer middleColumn = new WebMarkupContainer(ID_MIDDLE_COLUMN);
             add(middleColumn);
-            addPropertiesInColumn(middleColumn, MemberGroupLayoutHint.MIDDLE, tabIfAny, columnSpans);
+            addMembersInColumn(middleColumn, MemberGroupLayoutHint.MIDDLE, tabMetaDataIfAny, columnSpans);
         } else {
             Components.permanentlyHide(this, ID_MIDDLE_COLUMN);
         }
@@ -201,13 +204,13 @@ public class EntityPropertiesForm extends FormAbstract<ObjectAdapter> implements
         if(columnSpans.getRight() > 0) {
             MarkupContainer rightColumn = new WebMarkupContainer(ID_RIGHT_COLUMN);
             add(rightColumn);
-            addPropertiesInColumn(rightColumn, MemberGroupLayoutHint.RIGHT, tabIfAny, columnSpans);
+            addMembersInColumn(rightColumn, MemberGroupLayoutHint.RIGHT, tabMetaDataIfAny, columnSpans);
         } else {
             Components.permanentlyHide(this, ID_RIGHT_COLUMN);
         }
 
-        // collections
-        if(columnSpans.getCollections() > 0) {
+        // collections (only if not being added to a tab)
+        if(tabMetaDataIfAny == null && columnSpans.getCollections() > 0) {
             final String idCollectionsToShow;
             final String idCollectionsToHide;
             int collectionSpan;
@@ -223,19 +226,18 @@ public class EntityPropertiesForm extends FormAbstract<ObjectAdapter> implements
 
             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 boolean addPropertiesInColumn(
+    private boolean addMembersInColumn(
             final MarkupContainer markupContainer,
             final MemberGroupLayoutHint hint,
-            final Tab tabIfAny,
+            final Tab tabMetaDataIfAny,
             final ColumnSpans columnSpans) {
         final int span = hint.from(columnSpans);
         
@@ -243,20 +245,20 @@ public class EntityPropertiesForm extends FormAbstract<ObjectAdapter> implements
         final ObjectAdapter adapter = entityModel.getObject();
         final ObjectSpecification objSpec = adapter.getSpecification();
 
-        final List<ObjectAssociation> associations = visibleProperties(adapter, objSpec, Where.OBJECT_FORMS);
+        final Column columnMetaDataIfAny = tabMetaDataIfAny != null ? hint.from(tabMetaDataIfAny) : null;
+
+        // if in a tab, then collections are also rendered.
+        final List<ObjectAssociation> properties = visibleAssociations(adapter, ObjectAssociation.Filters.PROPERTIES);
 
         final RepeatingView memberGroupRv = new RepeatingView(ID_MEMBER_GROUP);
         markupContainer.add(memberGroupRv);
 
-        final Map<String, List<ObjectAssociation>> associationsByGroup = ObjectAssociation.Util.groupByMemberOrderName(associations);
-        
-        final List<String> groupNames;
-        if(tabIfAny != null) {
-            final Column column = hint.from(tabIfAny);
-            groupNames = Lists.newArrayList(Iterables.transform(column.getPropertyGroups(), propertyGroupName()));
-        } else {
-            groupNames = ObjectSpecifications.orderByMemberGroups(objSpec, associationsByGroup.keySet(), hint);
-        }
+        final Map<String, List<ObjectAssociation>> associationsByGroup =
+                ObjectAssociation.Util.groupByMemberOrderName(properties);
+
+        final List<String> groupNames = tabMetaDataIfAny != null
+                ? Lists.newArrayList(Iterables.transform(columnMetaDataIfAny.getPropertyGroups(), propertyGroupName()))
+                : ObjectSpecifications.orderByMemberGroups(objSpec, associationsByGroup.keySet(), hint);
 
         for(final String groupName: groupNames) {
             final List<ObjectAssociation> associationsInGroup = associationsByGroup.get(groupName);
@@ -296,6 +298,13 @@ public class EntityPropertiesForm extends FormAbstract<ObjectAdapter> implements
         }
         
         addClassForSpan(markupContainer, span);
+
+        // if in a tab, then also render collections
+        if(columnMetaDataIfAny != null) {
+            final List<ObjectAssociation> collections = visibleAssociations(adapter, ObjectAssociation.Filters.COLLECTIONS);
+
+        }
+
         return !groupNames.isEmpty();
     }
 
@@ -330,13 +339,21 @@ public class EntityPropertiesForm extends FormAbstract<ObjectAdapter> implements
     }
 
 
-    private List<ObjectAssociation> visibleProperties(final ObjectAdapter adapter, final ObjectSpecification objSpec, Where where) {
-        return objSpec.getAssociations(Contributed.INCLUDED, visiblePropertyFilter(adapter, where));
+    private List<ObjectAssociation> visibleAssociations(
+            final ObjectAdapter adapter,
+            final Filter<ObjectAssociation> associationFilter) {
+        final ObjectSpecification objSpec = adapter.getSpecification();
+
+        return objSpec.getAssociations(Contributed.INCLUDED, visibleAssociationFilter(adapter, Where.OBJECT_FORMS,
+                associationFilter));
     }
 
     @SuppressWarnings("unchecked")
-    private Filter<ObjectAssociation> visiblePropertyFilter(final ObjectAdapter adapter, Where where) {
-        return Filters.and(ObjectAssociation.Filters.PROPERTIES, ObjectAssociation.Filters.dynamicallyVisible(adapter,
+    private static Filter<ObjectAssociation> visibleAssociationFilter(
+            final ObjectAdapter adapter,
+            final Where where,
+            final Filter<ObjectAssociation> associationFilter) {
+        return Filters.and(associationFilter, ObjectAssociation.Filters.dynamicallyVisible(adapter,
                 InteractionInitiatedBy.USER, where
         ));
     }

http://git-wip-us.apache.org/repos/asf/isis/blob/f7d55cf3/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/properties/EntityPropertiesPanel.html
----------------------------------------------------------------------
diff --git a/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/properties/EntityPropertiesPanel.html b/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/properties/EntityPropertiesPanel.html
index afff1d6..4e917e2 100644
--- a/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/properties/EntityPropertiesPanel.html
+++ b/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/properties/EntityPropertiesPanel.html
@@ -36,7 +36,7 @@
                                         </div>
                                         <div class="properties panel-body">
                                             <div wicket:id="properties">
-                                                <div wicket:id="owner" class="property">[property]</div>
+                                                <div wicket:id="property" class="property">[property]</div>
                                             </div>
                                         </div>
                                     </div>
@@ -64,7 +64,7 @@
                                         </div>
                                         <div class="properties panel-body">
                                             <div wicket:id="properties">
-                                                <div wicket:id="owner" class="property">[property]</div>
+                                                <div wicket:id="property" class="property">[property]</div>
                                             </div>
                                         </div>
                                     </div>
@@ -84,7 +84,7 @@
                                         </div>
                                         <div class="properties panel-body">
                                             <div wicket:id="properties">
-                                                <div wicket:id="owner" class="property">[property]</div>
+                                                <div wicket:id="property" class="property">[property]</div>
                                             </div>
                                         </div>
                                     </div>
@@ -96,7 +96,6 @@
                     <div class="row">
                         <div wicket:id="entityCollectionsOverflow"></div>
                     </div>
-
                 </form>
             </div>
         </wicket:panel>

http://git-wip-us.apache.org/repos/asf/isis/blob/f7d55cf3/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/tabgroups/EntityTabGroupsPanel.java
----------------------------------------------------------------------
diff --git a/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/tabgroups/EntityTabGroupsPanel.java b/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/tabgroups/EntityTabGroupsPanel.java
index 1ab845e..e8438e1 100644
--- a/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/tabgroups/EntityTabGroupsPanel.java
+++ b/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/tabgroups/EntityTabGroupsPanel.java
@@ -115,7 +115,7 @@ public class EntityTabGroupsPanel extends PanelAbstract<EntityModel> {
             super(id);
 
             final EntityModel modelWithTabHints = new EntityModel(model.getPageParameters());
-            model.setTab(tab);
+            model.setTabMetadata(tab);
 
             getComponentFactoryRegistry().addOrReplaceComponent(this, ID_ENTITY_PROPERTIES_AND_COLLECTIONS, ComponentType.ENTITY_PROPERTIES, modelWithTabHints);
 

http://git-wip-us.apache.org/repos/asf/isis/blob/f7d55cf3/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 2abd6be..d367269 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,3 +1,5 @@
+DELIBERATE SYNTAX ERROR TO DISABLE NEW RENDERING
+
 <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
 <domainObject xsi:schemaLocation="http://isis.apache.org/schema/applib/layout http://isis.apache.org/schema/applib/layout/layout-1.0.xsd" xmlns="http://isis.apache.org/schema/applib/layout" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
     <actions>
@@ -7,7 +9,6 @@
         <tab name="Common">
             <left span="4">
                 <propertyGroup name="General">
-                    <actions/>
                     <property id="name" labelPosition="TOP">
                         <actions>
                             <action id="updateName"/>


[09/50] [abbrv] isis git commit: [maven-release-plugin] prepare for next development iteration

Posted by da...@apache.org.
[maven-release-plugin] prepare for next development iteration


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

Branch: refs/heads/ISIS-993
Commit: 006f98a2a119eadc01313a5371148071a710c2bc
Parents: 54f7ec1
Author: Dan Haywood <da...@haywood-associates.co.uk>
Authored: Sun Jan 10 15:28:20 2016 +0000
Committer: Dan Haywood <da...@haywood-associates.co.uk>
Committed: Sun Jan 10 15:28:20 2016 +0000

----------------------------------------------------------------------
 example/archetype/simpleapp/pom.xml | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/isis/blob/006f98a2/example/archetype/simpleapp/pom.xml
----------------------------------------------------------------------
diff --git a/example/archetype/simpleapp/pom.xml b/example/archetype/simpleapp/pom.xml
index 4d52c33..e884eab 100644
--- a/example/archetype/simpleapp/pom.xml
+++ b/example/archetype/simpleapp/pom.xml
@@ -21,7 +21,7 @@
     <modelVersion>4.0.0</modelVersion>
     <groupId>org.apache.isis.archetype</groupId>
     <artifactId>simpleapp-archetype</artifactId>
-    <version>1.11.1</version>
+    <version>1.12.0-SNAPSHOT</version>
     <packaging>maven-archetype</packaging>
     <name>simpleapp-archetype</name>
     <build>
@@ -47,8 +47,4 @@
         <version>1.11.1</version>
         <relativePath>../../../core/pom.xml</relativePath>
     </parent>
-
-  <scm>
-    <tag>simpleapp-archetype-1.11.1</tag>
-  </scm>
 </project>


[28/50] [abbrv] isis git commit: ISIS-993: refactoring EntityPropertiesForm so can factor out a new component.

Posted by da...@apache.org.
ISIS-993: refactoring EntityPropertiesForm so can factor out a new component.


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

Branch: refs/heads/ISIS-993
Commit: 01781b8c1371f7245f5a38d9c5f55baa2c9f4396
Parents: a1ed890
Author: Dan Haywood <da...@haywood-associates.co.uk>
Authored: Sat Jan 9 08:15:10 2016 +0000
Committer: Dan Haywood <da...@haywood-associates.co.uk>
Committed: Mon Jan 25 14:38:24 2016 +0000

----------------------------------------------------------------------
 .../entity/properties/EntityColumnMembers.html  | 46 +++++++++
 .../entity/properties/EntityPropertiesForm.java | 98 +++++++++-----------
 .../properties/EntityPropertiesPanel.html       | 96 ++++++++++---------
 .../components/entity/properties/PropUtil.java  | 68 ++++++++++++++
 .../entity/tabgroups/EntityTabGroupsPanel.html  |  4 +-
 5 files changed, 211 insertions(+), 101 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/isis/blob/01781b8c/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/properties/EntityColumnMembers.html
----------------------------------------------------------------------
diff --git a/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/properties/EntityColumnMembers.html b/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/properties/EntityColumnMembers.html
new file mode 100644
index 0000000..07ca0f3
--- /dev/null
+++ b/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/properties/EntityColumnMembers.html
@@ -0,0 +1,46 @@
+<?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="columnMembers" class="columnMembers">
+                <div class="inputFormTable properties">
+                    <fieldset wicket:id="memberGroup" class="memberGroup myBlockContainer">
+                        <div class="panel panel-default">
+                            <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>
+                            </div>
+                            <div class="properties panel-body">
+                                <div wicket:id="properties">
+                                    <div wicket:id="property" class="property">[property]</div>
+                                </div>
+                            </div>
+                        </div>
+                    </fieldset>
+                </div>
+                <div wicket:id="collections"></div>
+            </div>
+        </wicket:panel>
+    </body>
+</html>

http://git-wip-us.apache.org/repos/asf/isis/blob/01781b8c/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/properties/EntityPropertiesForm.java
----------------------------------------------------------------------
diff --git a/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/properties/EntityPropertiesForm.java b/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/properties/EntityPropertiesForm.java
index 3f2771d..f0ba38d 100644
--- a/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/properties/EntityPropertiesForm.java
+++ b/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/properties/EntityPropertiesForm.java
@@ -176,8 +176,29 @@ public class EntityPropertiesForm extends FormAbstract<ObjectAdapter> implements
         
         boolean addedProperties;
         if(columnSpans.getLeft() > 0) {
-            addedProperties = addPropertiesAndCollections(
-                    leftColumn, MemberGroupLayoutHint.LEFT, entityModel, tabMetaDataIfAny, columnSpans);
+            final MemberGroupLayoutHint hint = MemberGroupLayoutHint.LEFT;
+
+            final Column columnMetaDataIfAny = tabMetaDataIfAny != null ? hint
+                    .from(tabMetaDataIfAny) : null;
+            addPropertiesAndCollections(leftColumn, hint, entityModel,
+                    columnSpans, columnMetaDataIfAny);
+
+            final ObjectAdapter adapter = entityModel.getObject();
+            final ObjectSpecification objSpec = adapter.getSpecification();
+
+            final Map<String, List<ObjectAssociation>> associationsByGroup =
+                    PropUtil
+                    .propertiesByMemberOrder(adapter);
+
+            final List<String> groupNames = columnMetaDataIfAny != null
+                    ? FluentIterable
+                    .from(columnMetaDataIfAny.getPropertyGroups())
+                    .transform(PropertyGroup.Util.nameOf())
+                    .toList()
+                    : ObjectSpecifications.orderByMemberGroups(objSpec, associationsByGroup.keySet(),
+                    hint);
+
+            addedProperties = !groupNames.isEmpty();
             addButtons(leftColumn);
             addFeedbackGui(leftColumn);
         } else {
@@ -195,8 +216,9 @@ public class EntityPropertiesForm extends FormAbstract<ObjectAdapter> implements
         if(columnSpans.getMiddle() > 0) {
             MarkupContainer middleColumn = new WebMarkupContainer(ID_MIDDLE_COLUMN);
             add(middleColumn);
-            addPropertiesAndCollections(
-                    middleColumn, MemberGroupLayoutHint.MIDDLE, entityModel, tabMetaDataIfAny, columnSpans);
+            final Column columnMetaDataIfAny = tabMetaDataIfAny != null ? MemberGroupLayoutHint.MIDDLE
+                    .from(tabMetaDataIfAny) : null;
+            addPropertiesAndCollections(middleColumn, MemberGroupLayoutHint.MIDDLE, entityModel, columnSpans, columnMetaDataIfAny);
         } else {
             Components.permanentlyHide(this, ID_MIDDLE_COLUMN);
         }
@@ -205,8 +227,9 @@ public class EntityPropertiesForm extends FormAbstract<ObjectAdapter> implements
         if(columnSpans.getRight() > 0) {
             MarkupContainer rightColumn = new WebMarkupContainer(ID_RIGHT_COLUMN);
             add(rightColumn);
-            addPropertiesAndCollections(
-                    rightColumn, MemberGroupLayoutHint.RIGHT, entityModel, tabMetaDataIfAny, columnSpans);
+            final Column columnMetaDataIfAny = tabMetaDataIfAny != null ? MemberGroupLayoutHint.RIGHT
+                    .from(tabMetaDataIfAny) : null;
+            addPropertiesAndCollections(rightColumn, MemberGroupLayoutHint.RIGHT, entityModel, columnSpans, columnMetaDataIfAny);
         } else {
             Components.permanentlyHide(this, ID_RIGHT_COLUMN);
         }
@@ -238,19 +261,16 @@ public class EntityPropertiesForm extends FormAbstract<ObjectAdapter> implements
         }
     }
 
-    private boolean addPropertiesAndCollections(
+    private void addPropertiesAndCollections(
             final MarkupContainer col,
             final MemberGroupLayoutHint hint,
             final EntityModel entityModel,
-            final Tab tabMetaDataIfAny,
-            final ColumnSpans columnSpans) {
-        final Column columnMetaDataIfAny = tabMetaDataIfAny != null ? hint.from(tabMetaDataIfAny) : null;
-        final boolean addedProperties = addPropertiesInColumn(col, hint, entityModel, columnSpans, columnMetaDataIfAny);
-        addCollectionsIfRequired(col, hint, entityModel, tabMetaDataIfAny);
-        return addedProperties;
+            final ColumnSpans columnSpans, final Column columnMetaDataIfAny) {
+        addPropertiesInColumn(col, hint, entityModel, columnSpans, columnMetaDataIfAny);
+        addCollectionsIfRequired(col, entityModel, columnMetaDataIfAny);
     }
 
-    private boolean addPropertiesInColumn(
+    private void addPropertiesInColumn(
             final MarkupContainer markupContainer,
             final MemberGroupLayoutHint hint,
             final EntityModel entityModel,
@@ -259,13 +279,8 @@ public class EntityPropertiesForm extends FormAbstract<ObjectAdapter> implements
         final ObjectAdapter adapter = entityModel.getObject();
         final ObjectSpecification objSpec = adapter.getSpecification();
 
-        final List<ObjectAssociation> properties = visibleProperties(adapter);
-
-        final RepeatingView memberGroupRv = new RepeatingView(ID_MEMBER_GROUP);
-        markupContainer.add(memberGroupRv);
-
-        final Map<String, List<ObjectAssociation>> associationsByGroup = ObjectAssociation.Util.groupByMemberOrderName(properties);
-
+        final Map<String, List<ObjectAssociation>> associationsByGroup = PropUtil
+                .propertiesByMemberOrder(adapter);
         final List<String> groupNames = columnMetaDataIfAny != null
                 ? FluentIterable
                     .from(columnMetaDataIfAny.getPropertyGroups())
@@ -273,6 +288,9 @@ public class EntityPropertiesForm extends FormAbstract<ObjectAdapter> implements
                     .toList()
                 : ObjectSpecifications.orderByMemberGroups(objSpec, associationsByGroup.keySet(), hint);
 
+        final RepeatingView memberGroupRv = new RepeatingView(ID_MEMBER_GROUP);
+        markupContainer.add(memberGroupRv);
+
         for(final String groupName: groupNames) {
             final List<ObjectAssociation> associationsInGroup = associationsByGroup.get(groupName);
             if(associationsInGroup==null) {
@@ -311,19 +329,15 @@ public class EntityPropertiesForm extends FormAbstract<ObjectAdapter> implements
         }
 
         addClassForSpan(markupContainer, span);
-
-        return !groupNames.isEmpty();
     }
 
     private void addCollectionsIfRequired(
             final MarkupContainer column,
-            final MemberGroupLayoutHint hint,
             final EntityModel entityModel,
-            final Tab tabMetaDataIfAny) {
-
-        if(tabMetaDataIfAny != null) {
-            final Column columnMetadata = hint.from(tabMetaDataIfAny);
-            final EntityModel modelWithMetadata = new EntityModel(entityModel.getPageParameters()).withColumnMetadata(columnMetadata);
+            final Column columnMetaDataIfAny) {
+        if(columnMetaDataIfAny != null) {
+            final EntityModel modelWithMetadata = new EntityModel(entityModel.getPageParameters()).withColumnMetadata(
+                    columnMetaDataIfAny);
             getComponentFactoryRegistry()
                     .addOrReplaceComponent(column, "collections", ComponentType.ENTITY_COLLECTIONS, modelWithMetadata);
         } else {
@@ -352,30 +366,6 @@ public class EntityPropertiesForm extends FormAbstract<ObjectAdapter> implements
         }
     }
 
-    private List<ObjectAssociation> visibleProperties(final ObjectAdapter adapter) {
-        return visibleProperties(adapter, Filters.<ObjectAssociation>any());
-    }
-
-    private 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);
-    }
-
     @Override
     protected void onComponentTag(ComponentTag tag) {
         super.onComponentTag(tag);
@@ -815,7 +805,7 @@ public class EntityPropertiesForm extends FormAbstract<ObjectAdapter> implements
     }
 
     
-    private static void addClassForSpan(final Component component, final int numGridCols) {
+    static void addClassForSpan(final Component component, final int numGridCols) {
         component.add(new CssClassAppender("col-xs-"+numGridCols));
     }
 

http://git-wip-us.apache.org/repos/asf/isis/blob/01781b8c/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/properties/EntityPropertiesPanel.html
----------------------------------------------------------------------
diff --git a/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/properties/EntityPropertiesPanel.html b/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/properties/EntityPropertiesPanel.html
index ad8872a..9b8a582 100644
--- a/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/properties/EntityPropertiesPanel.html
+++ b/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/properties/EntityPropertiesPanel.html
@@ -24,25 +24,27 @@
                 <form wicket:id="entityProperties" class="inputForm" role="form">
                     <div class="row" style="padding-bottom: 20px">
                         <div wicket:id="leftColumn">
-                            <div class="inputFormTable properties">
-                                <fieldset wicket:id="memberGroup" class="memberGroup myBlockContainer">
-                                    <div class="panel panel-default">
-                                        <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="columnMembers">
+                                <div class="inputFormTable properties">
+                                    <fieldset wicket:id="memberGroup" class="memberGroup myBlockContainer">
+                                        <div class="panel panel-default">
+                                            <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>
                                             </div>
-                                        </div>
-                                        <div class="properties panel-body">
-                                            <div wicket:id="properties">
-                                                <div wicket:id="property" class="property">[property]</div>
+                                            <div class="properties panel-body">
+                                                <div wicket:id="properties">
+                                                    <div wicket:id="property" class="property">[property]</div>
+                                                </div>
                                             </div>
                                         </div>
-                                    </div>
-                                </fieldset>
+                                    </fieldset>
+                                </div>
+                                <div wicket:id="collections"></div>
                             </div>
-                            <div wicket:id="collections"></div>
                             <div class="feedbackPanel">
                                 <span wicket:id="feedback"></span>
                             </div>
@@ -53,46 +55,50 @@
                             </div>
                         </div>
                         <div wicket:id="middleColumn">
-                            <div class="inputFormTable properties">
-                                <fieldset wicket:id="memberGroup" class="memberGroup myBlockContainer">
-                                    <div class="panel panel-default">
-                                        <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="columnMembers">
+                                <div class="inputFormTable properties">
+                                    <fieldset wicket:id="memberGroup" class="memberGroup myBlockContainer">
+                                        <div class="panel panel-default">
+                                            <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>
                                             </div>
-                                        </div>
-                                        <div class="properties panel-body">
-                                            <div wicket:id="properties">
-                                                <div wicket:id="property" class="property">[property]</div>
+                                            <div class="properties panel-body">
+                                                <div wicket:id="properties">
+                                                    <div wicket:id="property" class="property">[property]</div>
+                                                </div>
                                             </div>
                                         </div>
-                                    </div>
-                                </fieldset>
+                                    </fieldset>
+                                </div>
+                                <div wicket:id="collections"></div>
                             </div>
-                            <div wicket:id="collections"></div>
                         </div>
                         <div wicket:id="rightColumn">
-                            <div class="inputFormTable properties">
-                                <fieldset wicket:id="memberGroup" class="memberGroup myBlockContainer">
-                                    <div class="panel panel-default">
-                                        <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="columnMembers">
+                                <div class="inputFormTable properties">
+                                    <fieldset wicket:id="memberGroup" class="memberGroup myBlockContainer">
+                                        <div class="panel panel-default">
+                                            <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>
                                             </div>
-                                        </div>
-                                        <div class="properties panel-body">
-                                            <div wicket:id="properties">
-                                                <div wicket:id="property" class="property">[property]</div>
+                                            <div class="properties panel-body">
+                                                <div wicket:id="properties">
+                                                    <div wicket:id="property" class="property">[property]</div>
+                                                </div>
                                             </div>
                                         </div>
-                                    </div>
-                                </fieldset>
+                                    </fieldset>
+                                </div>
+                                <div wicket:id="collections"></div>
                             </div>
-                            <div wicket:id="collections"></div>
                         </div>
                         <div wicket:id="entityCollections"></div>
                     </div>

http://git-wip-us.apache.org/repos/asf/isis/blob/01781b8c/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/properties/PropUtil.java
----------------------------------------------------------------------
diff --git a/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/properties/PropUtil.java b/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/properties/PropUtil.java
new file mode 100644
index 0000000..23a9a8d
--- /dev/null
+++ b/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/properties/PropUtil.java
@@ -0,0 +1,68 @@
+/*
+ *  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.entity.properties;
+
+import java.util.List;
+import java.util.Map;
+
+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.adapter.ObjectAdapter;
+import org.apache.isis.core.metamodel.consent.InteractionInitiatedBy;
+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;
+
+public final class PropUtil {
+
+    private PropUtil() {
+    }
+
+    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/01781b8c/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/tabgroups/EntityTabGroupsPanel.html
----------------------------------------------------------------------
diff --git a/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/tabgroups/EntityTabGroupsPanel.html b/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/tabgroups/EntityTabGroupsPanel.html
index fded796..4e45e96 100644
--- a/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/tabgroups/EntityTabGroupsPanel.html
+++ b/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/tabgroups/EntityTabGroupsPanel.html
@@ -25,8 +25,8 @@
 
         <div wicket:id="tabGroups">
             <div class="row">
-                <div wicket:id="tabGroup" class="col-xs-8">[tabbed panel will be here]</div>
-                <div XXXXwicket:id="collections" class = "fixedColumn col-xs-4">
+                <div wicket:id="tabGroup" class="col-xs-12">[tabbed panel will be here]</div>
+                <div XXXXwicket:id="entityColumnMembers" class = "fixedColumn col-xs-4">
                 </div>
             </div>
         </div>


[41/50] [abbrv] isis git commit: ISIS-993: working on the fleshing out stuff (to default missing layout metadata)

Posted by da...@apache.org.
ISIS-993: working on the fleshing out stuff (to default missing layout metadata)


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

Branch: refs/heads/ISIS-993
Commit: a9597d750fc527956e9a6444b7bebf68012ba1ab
Parents: 8ff81a7
Author: Dan Haywood <da...@haywood-associates.co.uk>
Authored: Wed Jan 6 21:21:19 2016 +0000
Committer: Dan Haywood <da...@haywood-associates.co.uk>
Committed: Mon Jan 25 14:38:24 2016 +0000

----------------------------------------------------------------------
 .../isis/applib/layout/v1_0/ActionHolder.java   |  25 +++++
 .../isis/applib/layout/v1_0/Collection.java     |   2 +-
 .../isis/applib/layout/v1_0/DomainObject.java   | 109 ++++++++++++++++++-
 .../isis/applib/layout/v1_0/Property.java       |   2 +-
 .../isis/applib/layout/v1_0/PropertyGroup.java  |   2 +-
 .../object/layoutxml/LayoutXmlFacetDefault.java |  57 ++++++++--
 .../metamodel/spec/feature/ObjectAction.java    |   5 +-
 .../metamodel/spec/feature/ObjectMember.java    |  31 ++++++
 8 files changed, 219 insertions(+), 14 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/isis/blob/a9597d75/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/ActionHolder.java
----------------------------------------------------------------------
diff --git a/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/ActionHolder.java b/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/ActionHolder.java
new file mode 100644
index 0000000..bac4ebb
--- /dev/null
+++ b/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/ActionHolder.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.v1_0;
+
+import java.util.List;
+
+public interface ActionHolder {
+    List<Action> getActions();
+}

http://git-wip-us.apache.org/repos/asf/isis/blob/a9597d75/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/Collection.java
----------------------------------------------------------------------
diff --git a/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/Collection.java b/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/Collection.java
index f7de5d8..6439807 100644
--- a/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/Collection.java
+++ b/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/Collection.java
@@ -34,7 +34,7 @@ import com.google.common.collect.Lists;
                 , "layout"
         }
 )
-public class Collection implements ColumnContent {
+public class Collection implements ColumnContent, ActionHolder {
 
     private String id;
 

http://git-wip-us.apache.org/repos/asf/isis/blob/a9597d75/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/DomainObject.java
----------------------------------------------------------------------
diff --git a/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/DomainObject.java b/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/DomainObject.java
index 052eb22..836a732 100644
--- a/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/DomainObject.java
+++ b/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/DomainObject.java
@@ -21,11 +21,15 @@ package org.apache.isis.applib.layout.v1_0;
 import java.util.ArrayList;
 import java.util.List;
 
+import javax.annotation.Nullable;
 import javax.xml.bind.annotation.XmlElement;
 import javax.xml.bind.annotation.XmlElementWrapper;
 import javax.xml.bind.annotation.XmlRootElement;
 import javax.xml.bind.annotation.XmlType;
 
+import com.google.common.base.Function;
+import com.google.common.base.Predicate;
+import com.google.common.collect.Iterables;
 import com.google.common.collect.Lists;
 
 import org.apache.isis.applib.services.dto.Dto;
@@ -38,7 +42,7 @@ import org.apache.isis.applib.services.dto.Dto;
                 , "tabGroups"
         }
 )
-public class DomainObject implements Dto {
+public class DomainObject implements Dto, ActionHolder {
 
     private List<Action> actions = Lists.newArrayList();
 
@@ -67,4 +71,107 @@ public class DomainObject implements Dto {
     public void setTabGroups(List<TabGroup> tabGroups) {
         this.tabGroups = tabGroups;
     }
+
+
+    public interface Visitor {
+        void visit(DomainObject domainObject);
+        void visit(Property property);
+        void visit(Collection collection);
+        void visit(Action action);
+        void visit(TabGroup tabGroup);
+        void visit(Tab tab);
+        void visit(Column column);
+    }
+
+    public static class VisitorAdapter implements Visitor {
+        @Override
+        public void visit(final DomainObject domainObject) { }
+        @Override
+        public void visit(final TabGroup tabGroup) { }
+        @Override
+        public void visit(final Tab tab) { }
+        @Override
+        public void visit(final Column column) { }
+        @Override
+        public void visit(Property property) {}
+        @Override
+        public void visit(Collection collection) {}
+        @Override
+        public void visit(Action action) {}
+    }
+
+
+    public void traverse(final Visitor visitor) {
+        visitor.visit(this);
+        traverseActions(this, visitor);
+        final List<TabGroup> tabGroups = getTabGroups();
+        for (final TabGroup tabGroup : tabGroups) {
+            visitor.visit(tabGroup);
+            final List<Tab> tabs = tabGroup.getTabs();
+            for (final Tab tab : tabs) {
+                visitor.visit(tab);
+                traverseColumn(tab.getLeft(), visitor);
+                traverseColumn(tab.getMiddle(), visitor);
+                traverseColumn(tab.getRight(), visitor);
+            }
+        }
+    }
+
+    private void traverseColumn(final Column column, final Visitor visitor) {
+        visitor.visit(column);
+        traversePropertyGroups(column, visitor);
+        traverseCollections(column, visitor);
+    }
+
+    private void traversePropertyGroups(final Column column, final Visitor visitor) {
+        final Iterable<PropertyGroup> propertyGroups =
+                Iterables.transform(
+                        Iterables.filter(column.getContent(), is(PropertyGroup.class)),
+                        cast(PropertyGroup.class));
+        for (final PropertyGroup propertyGroup : propertyGroups) {
+            final List<Property> properties = propertyGroup.getProperties();
+            for (final Property property : properties) {
+                visitor.visit(property);
+                traverseActions(property, visitor);
+            }
+        }
+    }
+
+    private void traverseCollections(final Column column, final Visitor visitor) {
+        final Iterable<Collection> collections =
+                Iterables.transform(
+                        Iterables.filter(column.getContent(), is(Collection.class)),
+                        cast(Collection.class));
+        for (final Collection collection : collections) {
+            visitor.visit(collection);
+            traverseActions(collection, visitor);
+        }
+    }
+
+    private void traverseActions(final ActionHolder actionHolder, final Visitor visitor) {
+        final List<Action> actions = actionHolder.getActions();
+        for (final Action action : actions) {
+            visitor.visit(action);
+        }
+    }
+
+    private <F, T extends F> CastFunction<F, T> cast(final Class<T> cls) {
+        return new CastFunction<>();
+    }
+
+    private <F,T> Predicate<F> is(final Class<T> cls) {
+        return new Predicate<F>() {
+            @Override public boolean apply(@Nullable final F from) {
+                return cls.isAssignableFrom(from.getClass());
+            }
+        };
+    }
+
+    private static class CastFunction<F, T extends F> implements Function<F, T> {
+        @Override
+        public final T apply(final F from) {
+            return (T) from;
+        }
+    }
+
 }

http://git-wip-us.apache.org/repos/asf/isis/blob/a9597d75/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/Property.java
----------------------------------------------------------------------
diff --git a/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/Property.java b/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/Property.java
index ad29288..9e8136b 100644
--- a/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/Property.java
+++ b/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/Property.java
@@ -34,7 +34,7 @@ import com.google.common.collect.Lists;
                 , "layout"
         }
 )
-public class Property {
+public class Property implements ActionHolder {
 
     private String id;
 

http://git-wip-us.apache.org/repos/asf/isis/blob/a9597d75/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/PropertyGroup.java
----------------------------------------------------------------------
diff --git a/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/PropertyGroup.java b/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/PropertyGroup.java
index 4aeebba..0b9b632 100644
--- a/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/PropertyGroup.java
+++ b/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/PropertyGroup.java
@@ -37,7 +37,7 @@ import org.apache.isis.applib.annotation.MemberOrder;
                 , "properties"
         }
 )
-public class PropertyGroup implements ColumnContent {
+public class PropertyGroup implements ColumnContent, ActionHolder {
 
     private String name;
 

http://git-wip-us.apache.org/repos/asf/isis/blob/a9597d75/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/object/layoutxml/LayoutXmlFacetDefault.java
----------------------------------------------------------------------
diff --git a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/object/layoutxml/LayoutXmlFacetDefault.java b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/object/layoutxml/LayoutXmlFacetDefault.java
index f515ccc..bbd2281 100644
--- a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/object/layoutxml/LayoutXmlFacetDefault.java
+++ b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/object/layoutxml/LayoutXmlFacetDefault.java
@@ -18,16 +18,22 @@
  */
 package org.apache.isis.core.metamodel.facets.object.layoutxml;
 
-
 import java.util.List;
+import java.util.Map;
 
+import org.apache.isis.applib.layout.v1_0.Action;
+import org.apache.isis.applib.layout.v1_0.Collection;
+import org.apache.isis.applib.layout.v1_0.DomainObject;
+import org.apache.isis.applib.layout.v1_0.Property;
 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.applib.layout.v1_0.DomainObject;
-import org.apache.isis.applib.layout.v1_0.TabGroup;
 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;
 
 public class LayoutXmlFacetDefault
@@ -74,12 +80,49 @@ public class LayoutXmlFacetDefault
 
     private void doFleshOut(final DomainObject metadata) {
         ObjectSpecification objectSpec = (ObjectSpecification) getFacetHolder();
-        List<OneToOneAssociation> properties = getProperties(objectSpec);
-        List<TabGroup> tabses = metadata.getTabGroups();
+
+        final List<OneToOneAssociation> oneToOneAssociations = getOneToOneAssociations(objectSpec);
+        final Map<String, OneToOneAssociation> oneToOneAssociationById = ObjectMember.Util.mapById(oneToOneAssociations);
+
+        final List<OneToManyAssociation> oneToManyAssociations = getOneToManyAssociations(objectSpec);
+        final Map<String, OneToManyAssociation> oneToManyAssociationById = ObjectMember.Util.mapById(oneToManyAssociations);
+
+        final List<ObjectAction> objectActions = objectSpec.getObjectActions(Contributed.INCLUDED);
+        final Map<String, ObjectAction> objectActionById = ObjectMember.Util.mapById(objectActions);
+
+        metadata.traverse(new DomainObject.VisitorAdapter() {
+            @Override
+            public void visit(final Property property) {
+                oneToOneAssociationById.remove(property.getId());
+            }
+            @Override
+            public void visit(final Collection collection) {
+                oneToManyAssociationById.remove(collection.getId());
+            }
+            @Override
+            public void visit(final Action action) {
+                objectActionById.remove(action.getId());
+            }
+        });
+
+        if(!oneToOneAssociationById.isEmpty()) {
+
+        }
+        if(!oneToManyAssociationById.isEmpty()) {
+
+        }
+        if(!objectActionById.isEmpty()) {
+
+        }
     }
 
-    private List getProperties(final ObjectSpecification objectSpec) {
+
+    private List getOneToOneAssociations(final ObjectSpecification objectSpec) {
+        return objectSpec
+                .getAssociations(Contributed.INCLUDED, ObjectAssociation.Filters.PROPERTIES);
+    }
+    private List getOneToManyAssociations(final ObjectSpecification objectSpec) {
         return objectSpec
-                .getAssociations(Contributed.INCLUDED, OneToOneAssociation.Filters.PROPERTIES);
+                .getAssociations(Contributed.INCLUDED, ObjectAssociation.Filters.COLLECTIONS);
     }
 }

http://git-wip-us.apache.org/repos/asf/isis/blob/a9597d75/core/metamodel/src/main/java/org/apache/isis/core/metamodel/spec/feature/ObjectAction.java
----------------------------------------------------------------------
diff --git a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/spec/feature/ObjectAction.java b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/spec/feature/ObjectAction.java
index 65f0115..a09c077 100644
--- a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/spec/feature/ObjectAction.java
+++ b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/spec/feature/ObjectAction.java
@@ -19,7 +19,6 @@ package org.apache.isis.core.metamodel.spec.feature;
 
 import java.util.List;
 
-import com.google.common.base.Functions;
 import com.google.common.base.Predicate;
 import com.google.common.base.Strings;
 import com.google.common.collect.Lists;
@@ -452,9 +451,9 @@ public interface ObjectAction extends ObjectMember {
 
             final List<ObjectAssociation> associations = adapterSpec.getAssociations(Contributed.INCLUDED);
             final List<String> associationNames = Lists.transform(associations,
-                    Functions.compose(StringFunctions.toLowerCase(), ObjectAssociation.Functions.toName()));
+                    com.google.common.base.Functions.compose(StringFunctions.toLowerCase(), ObjectAssociation.Functions.toName()));
             final List<String> associationIds = Lists.transform(associations,
-                    Functions.compose(StringFunctions.toLowerCase(), ObjectAssociation.Functions.toId()));
+                    com.google.common.base.Functions.compose(StringFunctions.toLowerCase(), ObjectAssociation.Functions.toId()));
 
             return new Filter<ObjectAction>() {
 

http://git-wip-us.apache.org/repos/asf/isis/blob/a9597d75/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 277c734..9d8fa15 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,14 @@
 
 package org.apache.isis.core.metamodel.spec.feature;
 
+import java.util.HashMap;
+import java.util.List;
+
+import javax.annotation.Nullable;
+
+import com.google.common.base.Function;
+import com.google.common.collect.Maps;
+
 import org.apache.isis.applib.annotation.When;
 import org.apache.isis.applib.annotation.Where;
 import org.apache.isis.core.metamodel.adapter.ObjectAdapter;
@@ -154,4 +162,27 @@ public interface ObjectMember extends ObjectFeature {
         }
 
     }
+
+    class Functions {
+
+        private Functions(){}
+        public static Function<ObjectMember, String> getId() {
+            return new Function<ObjectMember, String>() {
+                @Nullable @Override public String apply(@Nullable final ObjectMember oneToOneAssociation) {
+                    return oneToOneAssociation.getId();
+                }
+            };
+        }
+
+    }
+
+    class Util {
+
+        private Util(){}
+
+        public static <T extends ObjectMember> HashMap<String, T> mapById(final List<T> members) {
+            return Maps.newHashMap(Maps.uniqueIndex(members, ObjectMember.Functions.getId()));
+        }
+    }
+
 }


[21/50] [abbrv] isis git commit: ISIS-993: factored out LayoutMetadataService, renamed the metadata classes

Posted by da...@apache.org.
http://git-wip-us.apache.org/repos/asf/isis/blob/fb0f1273/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 c0b98da1..05ffb10 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.v1_0.Action;
+import org.apache.isis.applib.layout.v1_0.ActionLayoutMetadata;
 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;
@@ -29,7 +29,7 @@ import org.apache.isis.core.metamodel.facets.members.hidden.HiddenFacetAbstract;
 
 public class HiddenFacetForActionLayoutXml extends HiddenFacetAbstract {
 
-    public static HiddenFacet create(final Action actionLayout, final FacetHolder holder) {
+    public static HiddenFacet create(final ActionLayoutMetadata actionLayout, final FacetHolder holder) {
         if (actionLayout == null) {
             return null;
         }

http://git-wip-us.apache.org/repos/asf/isis/blob/fb0f1273/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 c96fa2a..efa4191 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,14 +21,14 @@ package org.apache.isis.core.metamodel.facets.actions.layout;
 
 import com.google.common.base.Strings;
 
-import org.apache.isis.applib.layout.v1_0.Action;
+import org.apache.isis.applib.layout.v1_0.ActionLayoutMetadata;
 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;
 
 public class NamedFacetForActionXml extends NamedFacetAbstract {
 
-    public static NamedFacet create(final Action actionLayout, final FacetHolder holder) {
+    public static NamedFacet create(final ActionLayoutMetadata actionLayout, final FacetHolder holder) {
         if(actionLayout == null) {
             return null;
         }

http://git-wip-us.apache.org/repos/asf/isis/blob/fb0f1273/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 c75d5a7..c2ffd02 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,14 +21,14 @@ package org.apache.isis.core.metamodel.facets.collections.layout;
 
 import com.google.common.base.Strings;
 
-import org.apache.isis.applib.layout.v1_0.Collection;
+import org.apache.isis.applib.layout.v1_0.CollectionLayoutMetadata;
 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;
 
 public class CssClassFacetForCollectionXml extends CssClassFacetAbstract {
 
-    public static CssClassFacet create(Collection collectionLayout, FacetHolder holder) {
+    public static CssClassFacet create(CollectionLayoutMetadata collectionLayout, FacetHolder holder) {
         if(collectionLayout == null) {
             return null;
         }

http://git-wip-us.apache.org/repos/asf/isis/blob/fb0f1273/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 594bca0..5802d5d 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.v1_0.Collection;
+import org.apache.isis.applib.layout.v1_0.CollectionLayoutMetadata;
 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;
@@ -32,7 +32,7 @@ public class DefaultViewFacetForCollectionXml extends DefaultViewFacetAbstract {
         super(value, holder);
     }
 
-    public static DefaultViewFacet create(Collection collectionLayout, FacetHolder holder) {
+    public static DefaultViewFacet create(CollectionLayoutMetadata collectionLayout, FacetHolder holder) {
         if (collectionLayout == null) {
             return null;
         }

http://git-wip-us.apache.org/repos/asf/isis/blob/fb0f1273/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 a159fc2..b9561f4 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,14 +21,14 @@ package org.apache.isis.core.metamodel.facets.collections.layout;
 
 import com.google.common.base.Strings;
 
-import org.apache.isis.applib.layout.v1_0.Collection;
+import org.apache.isis.applib.layout.v1_0.CollectionLayoutMetadata;
 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;
 
 public class DescribedAsFacetForCollectionXml extends DescribedAsFacetAbstract {
 
-    public static DescribedAsFacet create(Collection collectionLayout, FacetHolder holder) {
+    public static DescribedAsFacet create(CollectionLayoutMetadata collectionLayout, FacetHolder holder) {
         if(collectionLayout == null) {
             return null;
         }

http://git-wip-us.apache.org/repos/asf/isis/blob/fb0f1273/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 8a52c8e..a76ab13 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.v1_0.Collection;
+import org.apache.isis.applib.layout.v1_0.CollectionLayoutMetadata;
 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;
@@ -29,7 +29,7 @@ import org.apache.isis.core.metamodel.facets.members.hidden.HiddenFacetAbstract;
 
 public class HiddenFacetForCollectionXml extends HiddenFacetAbstract {
 
-    public static HiddenFacet create(final Collection collectionLayout, final FacetHolder holder) {
+    public static HiddenFacet create(final CollectionLayoutMetadata collectionLayout, final FacetHolder holder) {
         if (collectionLayout == null) {
             return null;
         }

http://git-wip-us.apache.org/repos/asf/isis/blob/fb0f1273/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 295cbc9..9509253 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,14 +21,14 @@ package org.apache.isis.core.metamodel.facets.collections.layout;
 
 import com.google.common.base.Strings;
 
-import org.apache.isis.applib.layout.v1_0.Collection;
+import org.apache.isis.applib.layout.v1_0.CollectionLayoutMetadata;
 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;
 
 public class NamedFacetForCollectionXml extends NamedFacetAbstract {
 
-    public static NamedFacet create(Collection collectionLayout, FacetHolder holder) {
+    public static NamedFacet create(CollectionLayoutMetadata collectionLayout, FacetHolder holder) {
         if(collectionLayout == null) {
             return null;
         }

http://git-wip-us.apache.org/repos/asf/isis/blob/fb0f1273/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 eee8838..6b577c0 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,14 +19,14 @@
 
 package org.apache.isis.core.metamodel.facets.collections.layout;
 
-import org.apache.isis.applib.layout.v1_0.Collection;
+import org.apache.isis.applib.layout.v1_0.CollectionLayoutMetadata;
 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;
 
 public class PagedFacetForCollectionXml extends PagedFacetAbstract {
 
-    public static PagedFacet create(Collection collectionLayout, FacetHolder holder) {
+    public static PagedFacet create(CollectionLayoutMetadata collectionLayout, FacetHolder holder) {
         if(collectionLayout == null) {
             return null;
         }

http://git-wip-us.apache.org/repos/asf/isis/blob/fb0f1273/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 dbba9dd..72410ce 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.v1_0.Collection;
+import org.apache.isis.applib.layout.v1_0.CollectionLayoutMetadata;
 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;
@@ -29,7 +29,7 @@ import org.apache.isis.core.metamodel.facets.collections.sortedby.SortedByFacetA
 
 public class SortedByFacetForCollectionXml extends SortedByFacetAbstract {
 
-    public static SortedByFacet create(Collection collectionLayout, FacetHolder holder) {
+    public static SortedByFacet create(CollectionLayoutMetadata collectionLayout, FacetHolder holder) {
         if(collectionLayout == null) {
             return null;
         }

http://git-wip-us.apache.org/repos/asf/isis/blob/fb0f1273/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/object/layoutxml/LayoutXmlFacet.java
----------------------------------------------------------------------
diff --git a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/object/layoutxml/LayoutXmlFacet.java b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/object/layoutxml/LayoutXmlFacet.java
deleted file mode 100644
index 608abbe..0000000
--- a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/object/layoutxml/LayoutXmlFacet.java
+++ /dev/null
@@ -1,32 +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.facets.object.layoutxml;
-
-
-import org.apache.isis.core.metamodel.facetapi.Facet;
-import org.apache.isis.applib.layout.v1_0.DomainObject;
-
-/**
- * Corresponds to providing a <code>.layout.xml</code> file for the domain object's class.
- */
-public interface LayoutXmlFacet extends Facet {
-
-    public DomainObject getLayoutMetadata();
-
-}

http://git-wip-us.apache.org/repos/asf/isis/blob/fb0f1273/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/object/layoutxml/LayoutXmlFacetDefault.java
----------------------------------------------------------------------
diff --git a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/object/layoutxml/LayoutXmlFacetDefault.java b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/object/layoutxml/LayoutXmlFacetDefault.java
deleted file mode 100644
index eedda94..0000000
--- a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/object/layoutxml/LayoutXmlFacetDefault.java
+++ /dev/null
@@ -1,381 +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.facets.object.layoutxml;
-
-import java.util.List;
-import java.util.Map;
-import java.util.concurrent.atomic.AtomicReference;
-
-import com.google.common.collect.Iterables;
-import com.google.common.collect.Lists;
-import com.google.common.collect.Maps;
-
-import org.apache.isis.applib.layout.v1_0.Action;
-import org.apache.isis.applib.layout.v1_0.ActionHolder;
-import org.apache.isis.applib.layout.v1_0.Collection;
-import org.apache.isis.applib.layout.v1_0.Column;
-import org.apache.isis.applib.layout.v1_0.DomainObject;
-import org.apache.isis.applib.layout.v1_0.Property;
-import org.apache.isis.applib.layout.v1_0.PropertyGroup;
-import org.apache.isis.applib.layout.v1_0.Tab;
-import org.apache.isis.applib.layout.v1_0.TabGroup;
-import org.apache.isis.applib.services.i18n.TranslationService;
-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.facetapi.FacetUtil;
-import org.apache.isis.core.metamodel.facets.actions.layout.ActionPositionFacetForActionXml;
-import org.apache.isis.core.metamodel.facets.actions.layout.BookmarkPolicyFacetForActionXml;
-import org.apache.isis.core.metamodel.facets.actions.layout.CssClassFaFacetForActionXml;
-import org.apache.isis.core.metamodel.facets.actions.layout.CssClassFacetForActionXml;
-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.collections.layout.CssClassFacetForCollectionXml;
-import org.apache.isis.core.metamodel.facets.collections.layout.DefaultViewFacetForCollectionXml;
-import org.apache.isis.core.metamodel.facets.collections.layout.DescribedAsFacetForCollectionXml;
-import org.apache.isis.core.metamodel.facets.collections.layout.HiddenFacetForCollectionXml;
-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.members.order.annotprop.MemberOrderFacetXml;
-import org.apache.isis.core.metamodel.facets.object.membergroups.MemberGroupLayoutFacet;
-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;
-import org.apache.isis.core.metamodel.facets.properties.propertylayout.LabelAtFacetForPropertyXml;
-import org.apache.isis.core.metamodel.facets.properties.propertylayout.MultiLineFacetForPropertyXml;
-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.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;
-
-public class LayoutXmlFacetDefault
-            extends FacetAbstract
-            implements LayoutXmlFacet {
-
-    private final DomainObject metadata;
-    private final TranslationService translationService;
-
-    public static Class<? extends Facet> type() {
-        return LayoutXmlFacet.class;
-    }
-
-
-    public static LayoutXmlFacet create(
-            final FacetHolder facetHolder,
-            final DomainObject domainObject,
-            final TranslationService translationService) {
-        if(domainObject == null) {
-            return null;
-        }
-        return new LayoutXmlFacetDefault(facetHolder, domainObject, translationService);
-    }
-
-    private LayoutXmlFacetDefault(
-            final FacetHolder facetHolder,
-            final DomainObject metadata,
-            final TranslationService translationService) {
-        super(LayoutXmlFacetDefault.type(), facetHolder, Derivation.NOT_DERIVED);
-        this.metadata = metadata;
-        this.translationService = translationService;
-    }
-
-
-    private boolean derived;
-
-    public DomainObject getLayoutMetadata() {
-        //return derived ? metadata : deriveAndOverwrite(metadata);
-        return deriveAndOverwrite(metadata);
-    }
-
-    private  DomainObject deriveAndOverwrite(final DomainObject metadata) {
-        synchronized (metadata) {
-            doDeriveAndOverwrite(metadata);
-            derived = true;
-        }
-        return metadata;
-    }
-
-    private void doDeriveAndOverwrite(final DomainObject metadata) {
-
-        final ObjectSpecification objectSpec = (ObjectSpecification) getFacetHolder();
-        final Map<String, OneToOneAssociation> oneToOneAssociationById =
-                ObjectMember.Util.mapById(getOneToOneAssociations(objectSpec));
-        final Map<String, OneToManyAssociation> oneToManyAssociationById =
-                ObjectMember.Util.mapById(getOneToManyAssociations(objectSpec));
-        final Map<String, ObjectAction> objectActionById =
-                ObjectMember.Util.mapById(objectSpec.getObjectActions(Contributed.INCLUDED));
-
-        derive(metadata, oneToOneAssociationById, oneToManyAssociationById, objectActionById);
-        overwrite(metadata, oneToOneAssociationById, oneToManyAssociationById, objectActionById);
-    }
-
-    /**
-     * 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>
-     */
-    private static void derive(
-            final DomainObject metadata,
-            final Map<String, OneToOneAssociation> oneToOneAssociationById,
-            final Map<String, OneToManyAssociation> oneToManyAssociationById,
-            final Map<String, ObjectAction> objectActionById) {
-        final List<String> propertyIds = Lists.newArrayList();
-        final List<String> collectionIds = Lists.newArrayList();
-        final List<String> actionIds = Lists.newArrayList();
-        final AtomicReference<PropertyGroup> defaultPropertyGroupRef = new AtomicReference<>();
-        final AtomicReference<Column> firstColumnRef = new AtomicReference<>();
-        final AtomicReference<TabGroup> lastTabGroupRef = new AtomicReference<>();
-
-        // catalog which property, collection and action Ids appear (anywhere) in the metadata
-        metadata.visit(new DomainObject.VisitorAdapter() {
-            @Override
-            public void visit(final Property property) {
-                propertyIds.add(property.getId());
-            }
-            @Override
-            public void visit(final Collection collection) {
-                collectionIds.add(collection.getId());
-            }
-            @Override
-            public void visit(final Action action) {
-                actionIds.add(action.getId());
-            }
-        });
-
-        // capture the first column, and also
-        // capture the first property group (if any) with the default name ('General')
-        metadata.visit(new DomainObject.VisitorAdapter() {
-            @Override
-            public void visit(final Column column) {
-                firstColumnRef.compareAndSet(null, column);
-            }
-            @Override
-            public void visit(final PropertyGroup propertyGroup) {
-                if(MemberGroupLayoutFacet.DEFAULT_GROUP.equals(propertyGroup.getName())) {
-                    defaultPropertyGroupRef.compareAndSet(null, propertyGroup);
-                }
-            }
-            @Override
-            public void visit(final TabGroup tabGroup) {
-                lastTabGroupRef.set(tabGroup);
-            }
-        });
-
-        // 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 List<String> missingPropertyIds = Lists.newArrayList(oneToOneAssociationById.keySet());
-        missingPropertyIds.removeAll(propertyIds);
-
-        if(!missingPropertyIds.isEmpty()) {
-            // ensure that there is a property group to use
-            boolean wasSet = defaultPropertyGroupRef.compareAndSet(null, new PropertyGroup(MemberGroupLayoutFacet.DEFAULT_GROUP));
-            final PropertyGroup defaultPropertyGroup = defaultPropertyGroupRef.get();
-            if(wasSet) {
-                firstColumnRef.get().getPropertyGroups().add(defaultPropertyGroup);
-            }
-            Iterables.removeAll(propertyIds, oneToOneAssociationById.keySet());
-            for (final String propertyId : missingPropertyIds) {
-                defaultPropertyGroup.getProperties().add(new Property(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 List<String> missingCollectionIds = Lists.newArrayList(oneToManyAssociationById.keySet());
-        missingCollectionIds.removeAll(collectionIds);
-
-        if(!missingCollectionIds.isEmpty()) {
-            while(metadata.getTabGroups().size() < 2) {
-                final TabGroup tabGroup = new TabGroup();
-                metadata.getTabGroups().add(tabGroup);
-                lastTabGroupRef.set(tabGroup);
-            }
-            final TabGroup lastTabGroup = lastTabGroupRef.get();
-            for (final String collectionId : missingCollectionIds) {
-                final Tab tab = new Tab();
-                lastTabGroup.getTabs().add(tab);
-                Column left = new Column(12);
-                tab.setLeft(left);
-                left.getCollections().add(new Collection(collectionId));
-            }
-        }
-
-        // any missing actions will be added as domain object actions (in the header)
-        final List<String> missingActionIds = Lists.newArrayList(objectActionById.keySet());
-        missingActionIds.removeAll(actionIds);
-
-        if(!missingActionIds.isEmpty()) {
-            for (String actionId : missingActionIds) {
-                metadata.getActions().add(new Action(actionId));
-            }
-        }
-    }
-
-    private void overwrite(
-            final DomainObject metadata,
-            final Map<String, OneToOneAssociation> oneToOneAssociationById,
-            final Map<String, OneToManyAssociation> oneToManyAssociationById,
-            final Map<String, ObjectAction> objectActionById) {
-
-        metadata.visit(new DomainObject.VisitorAdapter() {
-            private final Map<String, int[]> propertySequenceByGroup = Maps.newHashMap();
-            private int actionDomainObjectSequence = 1;
-            private int actionPropertyGroupSequence = 1;
-            private int actionPropertySequence = 1;
-            private int actionCollectionSequence = 1;
-
-            @Override
-            public void visit(final Action action) {
-                final ActionHolder actionHolder = action.getOwner();
-                final ObjectAction objectAction = objectActionById.get(action.getId());
-                final String memberOrderName;
-                final int memberOrderSequence;
-                if(actionHolder instanceof PropertyGroup) {
-                    final PropertyGroup propertyGroup = (PropertyGroup) actionHolder;
-                    final List<Property> properties = propertyGroup.getProperties();
-                    final Property property = properties.get(0); // any will do
-                    memberOrderName = property.getId();
-                    memberOrderSequence = actionPropertyGroupSequence++;
-                } else if(actionHolder instanceof Property) {
-                    final Property property = (Property) actionHolder;
-                    memberOrderName = property.getId();
-                    memberOrderSequence = actionPropertySequence++;
-                } else if(actionHolder instanceof Collection) {
-                    final Collection collection = (Collection) actionHolder;
-                    memberOrderName = collection.getId();
-                    memberOrderSequence = actionCollectionSequence++;
-                } else {
-                    // DomainObject
-                    memberOrderName = null;
-                    memberOrderSequence = actionDomainObjectSequence++;
-                }
-                FacetUtil.addFacet(
-                    new MemberOrderFacetXml(memberOrderName, ""+memberOrderSequence, translationService, objectAction));
-
-
-                if(actionHolder instanceof PropertyGroup) {
-                    if(action.getPosition() == null ||
-                       action.getPosition() == org.apache.isis.applib.annotation.ActionLayout.Position.BELOW ||
-                       action.getPosition() == org.apache.isis.applib.annotation.ActionLayout.Position.RIGHT) {
-                       action.setPosition(org.apache.isis.applib.annotation.ActionLayout.Position.PANEL);
-                    }
-                } else if(actionHolder instanceof Property) {
-                    if(action.getPosition() == null ||
-                       action.getPosition() == org.apache.isis.applib.annotation.ActionLayout.Position.PANEL_DROPDOWN ||
-                       action.getPosition() == org.apache.isis.applib.annotation.ActionLayout.Position.PANEL) {
-                       action.setPosition(org.apache.isis.applib.annotation.ActionLayout.Position.BELOW);
-                    }
-                } else {
-                    // doesn't do anything for DomainObject or Collection
-                    action.setPosition(null);
-                }
-
-                FacetUtil.addFacet(ActionPositionFacetForActionXml.create(action, objectAction));
-                FacetUtil.addFacet(BookmarkPolicyFacetForActionXml.create(action, objectAction));
-                FacetUtil.addFacet(CssClassFacetForActionXml.create(action, objectAction));
-                FacetUtil.addFacet(CssClassFaFacetForActionXml.create(action, objectAction));
-                FacetUtil.addFacet(DescribedAsFacetForActionXml.create(action, objectAction));
-                FacetUtil.addFacet(HiddenFacetForActionLayoutXml.create(action, objectAction));
-                FacetUtil.addFacet(NamedFacetForActionXml.create(action, objectAction));
-            }
-
-            @Override
-            public void visit(final Property property) {
-
-                final OneToOneAssociation oneToOneAssociation = oneToOneAssociationById.get(property.getId());
-                FacetUtil.addFacet(CssClassFacetForPropertyXml.create(property, oneToOneAssociation));
-                FacetUtil.addFacet(DescribedAsFacetForPropertyXml.create(property, oneToOneAssociation));
-                FacetUtil.addFacet(HiddenFacetForPropertyXml.create(property, oneToOneAssociation));
-                FacetUtil.addFacet(LabelAtFacetForPropertyXml.create(property, oneToOneAssociation));
-                FacetUtil.addFacet(MultiLineFacetForPropertyXml.create(property, oneToOneAssociation));
-                FacetUtil.addFacet(NamedFacetForPropertyXml.create(property, oneToOneAssociation));
-                FacetUtil.addFacet(RenderedAdjustedFacetForPropertyXml.create(property, oneToOneAssociation));
-                FacetUtil.addFacet(TypicalLengthFacetForPropertyXml.create(property, oneToOneAssociation));
-
-                // @MemberOrder#name based on owning property group, @MemberOrder#sequence monotonically increasing
-                final PropertyGroup propertyGroup = property.getOwner();
-                final String groupName = propertyGroup.getName();
-                final String sequence = nextInSequenceFor(groupName);
-                FacetUtil.addFacet(
-                        new MemberOrderFacetXml(groupName, sequence, translationService, oneToOneAssociation));
-            }
-
-            @Override
-            public void visit(final Collection collection) {
-                final OneToManyAssociation oneToManyAssociation = oneToManyAssociationById.get(collection.getId());
-
-                FacetUtil.addFacet(CssClassFacetForCollectionXml.create(collection, oneToManyAssociation));
-                FacetUtil.addFacet(DefaultViewFacetForCollectionXml.create(collection, oneToManyAssociation));
-                FacetUtil.addFacet(DescribedAsFacetForCollectionXml.create(collection, oneToManyAssociation));
-                FacetUtil.addFacet(HiddenFacetForCollectionXml.create(collection, oneToManyAssociation));
-                FacetUtil.addFacet(NamedFacetForCollectionXml.create(collection, oneToManyAssociation));
-                FacetUtil.addFacet(PagedFacetForCollectionXml.create(collection, oneToManyAssociation));
-                FacetUtil.addFacet(SortedByFacetForCollectionXml.create(collection, oneToManyAssociation));
-
-                // @MemberOrder#name based on the collection's id (so that each has a single "member group")
-                final String groupName = collection.getId();
-                final String sequence = nextInSequenceFor(groupName);
-                FacetUtil.addFacet(
-                        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 Column column = collection.getOwner();
-                final Tab tab = column.getOwner();
-                if(tab.getContents().size() == 1) {
-                    tab.setName(collection.getId());
-                }
-            }
-
-            private String nextInSequenceFor(final String propertyGroupName) {
-                synchronized (propertySequenceByGroup) {
-                    int[] holder = propertySequenceByGroup.get(propertyGroupName);
-                    if(holder == null) {
-                        holder = new int[]{0};
-                        propertySequenceByGroup.put(propertyGroupName, holder);
-                    }
-                    holder[0]++;
-                    return ""+holder[0];
-                }
-            }
-        });
-
-    }
-
-    private static List<OneToOneAssociation> getOneToOneAssociations(final ObjectSpecification objectSpec) {
-        List associations = objectSpec
-                .getAssociations(Contributed.INCLUDED, ObjectAssociation.Filters.PROPERTIES);
-        return associations;
-    }
-    private static List<OneToManyAssociation> getOneToManyAssociations(final ObjectSpecification objectSpec) {
-        List associations = objectSpec
-                .getAssociations(Contributed.INCLUDED, ObjectAssociation.Filters.COLLECTIONS);
-        return associations;
-    }
-}

http://git-wip-us.apache.org/repos/asf/isis/blob/fb0f1273/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/object/layoutxml/LayoutXmlFacetFactory.java
----------------------------------------------------------------------
diff --git a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/object/layoutxml/LayoutXmlFacetFactory.java b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/object/layoutxml/LayoutXmlFacetFactory.java
index 606f34a..f898f61 100644
--- a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/object/layoutxml/LayoutXmlFacetFactory.java
+++ b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/object/layoutxml/LayoutXmlFacetFactory.java
@@ -16,22 +16,15 @@
  * under the License. */
 package org.apache.isis.core.metamodel.facets.object.layoutxml;
 
-import java.io.IOException;
-import java.util.Set;
-
-import com.google.common.collect.Sets;
-
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-import org.apache.isis.applib.services.i18n.TranslationService;
-import org.apache.isis.applib.services.jaxb.JaxbService;
-import org.apache.isis.core.commons.lang.ClassExtensions;
+import org.apache.isis.applib.layout.v1_0.ObjectLayoutMetadata;
+import org.apache.isis.applib.services.layout.ObjectLayoutMetadataService;
 import org.apache.isis.core.metamodel.facetapi.FacetHolder;
 import org.apache.isis.core.metamodel.facetapi.FacetUtil;
 import org.apache.isis.core.metamodel.facetapi.FeatureType;
 import org.apache.isis.core.metamodel.facets.FacetFactoryAbstract;
-import org.apache.isis.applib.layout.v1_0.DomainObject;
 import org.apache.isis.core.metamodel.runtimecontext.ServicesInjector;
 import org.apache.isis.core.metamodel.runtimecontext.ServicesInjectorAware;
 
@@ -48,46 +41,14 @@ public class LayoutXmlFacetFactory extends FacetFactoryAbstract implements Servi
         final Class<?> cls = processClassContext.getCls();
         final FacetHolder facetHolder = processClassContext.getFacetHolder();
 
-        final TranslationService translationService = servicesInjector.lookupService(TranslationService.class);
-        FacetUtil.addFacet(LayoutXmlFacetDefault.create(facetHolder, readMetadata(cls), translationService));
+        final ObjectLayoutMetadataService objectLayoutMetadataService = servicesInjector.lookupService(ObjectLayoutMetadataService.class);
+        FacetUtil.addFacet(
+                ObjectLayoutMetadataFacetDefault.create(facetHolder, readMetadata(cls), objectLayoutMetadataService));
     }
 
-    private final Set<Class<?>> blacklisted = Sets.newConcurrentHashSet();
-
-    private DomainObject readMetadata(final Class<?> domainClass) {
-
-        if(blacklisted.contains(domainClass)) {
-            return null;
-        }
-        final String xml;
-
-        final String resourceName = domainClass.getSimpleName() + ".layout.xml";
-        try {
-            xml = ClassExtensions.resourceContentOf(domainClass, resourceName);
-        } catch (IOException | IllegalArgumentException ex) {
-
-            blacklisted.add(domainClass);
-            final String message = String .format(
-                    "Failed to locate file %s (relative to %s.class); ex: %s)",
-                    resourceName, domainClass.getName(), ex.getMessage());
-
-            LOG.debug(message);
-            return null;
-        }
-
-        try {
-            final JaxbService jaxbService = servicesInjector.lookupService(JaxbService.class);
-            final DomainObject metadata = jaxbService.fromXml(DomainObject.class, xml);
-            return metadata;
-        } catch(Exception ex) {
-
-            // note that we don't blacklist if the file exists but couldn't be parsed;
-            // the developer might fix so we will want to retry.
-            final String message = "Failed to parse " + resourceName + " file (" + ex.getMessage() + ")";
-            LOG.warn(message);
-
-            return null;
-        }
+    private ObjectLayoutMetadata readMetadata(final Class<?> domainClass) {
+        final ObjectLayoutMetadataService objectLayoutMetadataService = servicesInjector.lookupService(ObjectLayoutMetadataService.class);
+        return objectLayoutMetadataService.fromXml(domainClass);
     }
 
     private ServicesInjector servicesInjector;

http://git-wip-us.apache.org/repos/asf/isis/blob/fb0f1273/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/object/layoutxml/ObjectLayoutMetadataFacet.java
----------------------------------------------------------------------
diff --git a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/object/layoutxml/ObjectLayoutMetadataFacet.java b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/object/layoutxml/ObjectLayoutMetadataFacet.java
new file mode 100644
index 0000000..7285fc0
--- /dev/null
+++ b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/object/layoutxml/ObjectLayoutMetadataFacet.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.core.metamodel.facets.object.layoutxml;
+
+
+import org.apache.isis.core.metamodel.facetapi.Facet;
+import org.apache.isis.applib.layout.v1_0.ObjectLayoutMetadata;
+
+/**
+ * Corresponds to providing a <code>.layout.xml</code> file for the domain object's class.
+ */
+public interface ObjectLayoutMetadataFacet extends Facet {
+
+    /**
+     * Will have been {@link org.apache.isis.applib.services.layout.ObjectLayoutMetadataService#normalize(ObjectLayoutMetadata, Class) normalized}.
+     */
+    ObjectLayoutMetadata getMetadata();
+
+}

http://git-wip-us.apache.org/repos/asf/isis/blob/fb0f1273/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/object/layoutxml/ObjectLayoutMetadataFacetDefault.java
----------------------------------------------------------------------
diff --git a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/object/layoutxml/ObjectLayoutMetadataFacetDefault.java b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/object/layoutxml/ObjectLayoutMetadataFacetDefault.java
new file mode 100644
index 0000000..05d3cc8
--- /dev/null
+++ b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/object/layoutxml/ObjectLayoutMetadataFacetDefault.java
@@ -0,0 +1,65 @@
+/*
+ *  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.facets.object.layoutxml;
+
+import org.apache.isis.applib.layout.v1_0.ObjectLayoutMetadata;
+import org.apache.isis.applib.services.layout.ObjectLayoutMetadataService;
+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.spec.ObjectSpecification;
+
+public class ObjectLayoutMetadataFacetDefault
+            extends FacetAbstract
+            implements ObjectLayoutMetadataFacet {
+
+    private final ObjectLayoutMetadata metadata;
+    private final ObjectLayoutMetadataService objectLayoutMetadataService;
+
+    public static Class<? extends Facet> type() {
+        return ObjectLayoutMetadataFacet.class;
+    }
+
+
+    public static ObjectLayoutMetadataFacet create(
+            final FacetHolder facetHolder,
+            final ObjectLayoutMetadata objectLayoutMetadata,
+            final ObjectLayoutMetadataService objectLayoutMetadataService) {
+        if(objectLayoutMetadata == null) {
+            return null;
+        }
+        return new ObjectLayoutMetadataFacetDefault(facetHolder, objectLayoutMetadata, objectLayoutMetadataService);
+    }
+
+    private ObjectLayoutMetadataFacetDefault(
+            final FacetHolder facetHolder,
+            final ObjectLayoutMetadata metadata,
+            final ObjectLayoutMetadataService objectLayoutMetadataService) {
+        super(ObjectLayoutMetadataFacetDefault.type(), facetHolder, Derivation.NOT_DERIVED);
+        this.metadata = metadata;
+        this.objectLayoutMetadataService = objectLayoutMetadataService;
+    }
+
+
+    public ObjectLayoutMetadata getMetadata() {
+        final ObjectSpecification objectSpecification = (ObjectSpecification) getFacetHolder();
+        return objectLayoutMetadataService.normalize(metadata, objectSpecification.getCorrespondingClass());
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/isis/blob/fb0f1273/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 065e80c..e16cad5 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,14 +21,14 @@ package org.apache.isis.core.metamodel.facets.properties.propertylayout;
 
 import com.google.common.base.Strings;
 
-import org.apache.isis.applib.layout.v1_0.Property;
+import org.apache.isis.applib.layout.v1_0.PropertyLayoutMetadata;
 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;
 
 public class CssClassFacetForPropertyXml extends CssClassFacetAbstract {
 
-    public static CssClassFacet create(Property propertyLayout, FacetHolder holder) {
+    public static CssClassFacet create(PropertyLayoutMetadata propertyLayout, FacetHolder holder) {
         if(propertyLayout == null) {
             return null;
         }

http://git-wip-us.apache.org/repos/asf/isis/blob/fb0f1273/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 2c9f6f6..e2c6bb6 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,14 +21,14 @@ package org.apache.isis.core.metamodel.facets.properties.propertylayout;
 
 import com.google.common.base.Strings;
 
-import org.apache.isis.applib.layout.v1_0.Property;
+import org.apache.isis.applib.layout.v1_0.PropertyLayoutMetadata;
 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;
 
 public class DescribedAsFacetForPropertyXml extends DescribedAsFacetAbstract {
 
-    public static DescribedAsFacet create(Property propertyLayout, FacetHolder holder) {
+    public static DescribedAsFacet create(PropertyLayoutMetadata propertyLayout, FacetHolder holder) {
         if(propertyLayout == null) {
             return null;
         }

http://git-wip-us.apache.org/repos/asf/isis/blob/fb0f1273/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 4ee7f1d..83d15ab 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.v1_0.Property;
+import org.apache.isis.applib.layout.v1_0.PropertyLayoutMetadata;
 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;
@@ -29,7 +29,7 @@ import org.apache.isis.core.metamodel.facets.members.hidden.HiddenFacetAbstract;
 
 public class HiddenFacetForPropertyXml extends HiddenFacetAbstract {
 
-    public static HiddenFacet create(final Property propertyLayout, final FacetHolder holder) {
+    public static HiddenFacet create(final PropertyLayoutMetadata propertyLayout, final FacetHolder holder) {
         if (propertyLayout == null) {
             return null;
         }

http://git-wip-us.apache.org/repos/asf/isis/blob/fb0f1273/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 ba512a9..fc55c5d 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,14 +20,14 @@
 package org.apache.isis.core.metamodel.facets.properties.propertylayout;
 
 import org.apache.isis.applib.annotation.LabelPosition;
-import org.apache.isis.applib.layout.v1_0.Property;
+import org.apache.isis.applib.layout.v1_0.PropertyLayoutMetadata;
 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;
 
 public class LabelAtFacetForPropertyXml extends LabelAtFacetAbstract {
 
-    public static LabelAtFacet create(final Property propertyLayout, FacetHolder holder) {
+    public static LabelAtFacet create(final PropertyLayoutMetadata propertyLayout, FacetHolder holder) {
         if (propertyLayout == null) {
             return null;
         }

http://git-wip-us.apache.org/repos/asf/isis/blob/fb0f1273/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 9a48271..599ceba 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,14 +19,14 @@
 
 package org.apache.isis.core.metamodel.facets.properties.propertylayout;
 
-import org.apache.isis.applib.layout.v1_0.Property;
+import org.apache.isis.applib.layout.v1_0.PropertyLayoutMetadata;
 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;
 
 public class MultiLineFacetForPropertyXml extends MultiLineFacetAbstract {
 
-    public static MultiLineFacet create(Property propertyLayout, FacetHolder holder) {
+    public static MultiLineFacet create(PropertyLayoutMetadata propertyLayout, FacetHolder holder) {
         if(propertyLayout == null) {
             return null;
         }

http://git-wip-us.apache.org/repos/asf/isis/blob/fb0f1273/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 392a152..8f2ea3a 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,14 +21,14 @@ package org.apache.isis.core.metamodel.facets.properties.propertylayout;
 
 import com.google.common.base.Strings;
 
-import org.apache.isis.applib.layout.v1_0.Property;
+import org.apache.isis.applib.layout.v1_0.PropertyLayoutMetadata;
 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;
 
 public class NamedFacetForPropertyXml extends NamedFacetAbstract {
 
-    public static NamedFacet create(Property propertyLayout, FacetHolder holder) {
+    public static NamedFacet create(PropertyLayoutMetadata propertyLayout, FacetHolder holder) {
         if(propertyLayout == null) {
             return null;
         }

http://git-wip-us.apache.org/repos/asf/isis/blob/fb0f1273/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 63a3e4a..1947070 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,14 +19,14 @@
 
 package org.apache.isis.core.metamodel.facets.properties.propertylayout;
 
-import org.apache.isis.applib.layout.v1_0.Property;
+import org.apache.isis.applib.layout.v1_0.PropertyLayoutMetadata;
 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;
 
 public class RenderedAdjustedFacetForPropertyXml extends RenderedAdjustedFacetAbstract {
 
-    public static RenderedAdjustedFacet create(final Property propertyLayout, FacetHolder holder) {
+    public static RenderedAdjustedFacet create(final PropertyLayoutMetadata propertyLayout, FacetHolder holder) {
         if(propertyLayout == null) {
             return null;
         }

http://git-wip-us.apache.org/repos/asf/isis/blob/fb0f1273/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 1a193e5..dfbfb79 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,14 +19,14 @@
 
 package org.apache.isis.core.metamodel.facets.properties.propertylayout;
 
-import org.apache.isis.applib.layout.v1_0.Property;
+import org.apache.isis.applib.layout.v1_0.PropertyLayoutMetadata;
 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;
 
 public class TypicalLengthFacetForPropertyXml extends TypicalLengthFacetAbstract {
 
-    public static TypicalLengthFacet create(Property propertyLayout, FacetHolder holder) {
+    public static TypicalLengthFacet create(PropertyLayoutMetadata propertyLayout, FacetHolder holder) {
         if(propertyLayout == null) {
             return null;
         }

http://git-wip-us.apache.org/repos/asf/isis/blob/fb0f1273/core/metamodel/src/main/java/org/apache/isis/core/metamodel/services/layout/ObjectLayoutMetadataServiceDefault.java
----------------------------------------------------------------------
diff --git a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/services/layout/ObjectLayoutMetadataServiceDefault.java b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/services/layout/ObjectLayoutMetadataServiceDefault.java
new file mode 100644
index 0000000..c9daf91
--- /dev/null
+++ b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/services/layout/ObjectLayoutMetadataServiceDefault.java
@@ -0,0 +1,468 @@
+/**
+ *  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.layout;
+
+import java.io.IOException;
+import java.net.URL;
+import java.nio.charset.Charset;
+import java.util.LinkedHashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+import java.util.concurrent.atomic.AtomicReference;
+
+import javax.inject.Inject;
+
+import com.google.common.collect.Lists;
+import com.google.common.collect.Maps;
+import com.google.common.collect.Sets;
+import com.google.common.io.Resources;
+
+import org.slf4j.Logger;
+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.layout.v1_0.ActionHolder;
+import org.apache.isis.applib.layout.v1_0.ActionLayoutMetadata;
+import org.apache.isis.applib.layout.v1_0.CollectionLayoutMetadata;
+import org.apache.isis.applib.layout.v1_0.Column;
+import org.apache.isis.applib.layout.v1_0.ObjectLayoutMetadata;
+import org.apache.isis.applib.layout.v1_0.PropertyGroup;
+import org.apache.isis.applib.layout.v1_0.PropertyLayoutMetadata;
+import org.apache.isis.applib.layout.v1_0.Tab;
+import org.apache.isis.applib.layout.v1_0.TabGroup;
+import org.apache.isis.applib.services.i18n.TranslationService;
+import org.apache.isis.applib.services.jaxb.JaxbService;
+import org.apache.isis.applib.services.layout.ObjectLayoutMetadataService;
+import org.apache.isis.core.metamodel.deployment.DeploymentCategory;
+import org.apache.isis.core.metamodel.deployment.DeploymentCategoryAware;
+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;
+import org.apache.isis.core.metamodel.facets.actions.layout.CssClassFaFacetForActionXml;
+import org.apache.isis.core.metamodel.facets.actions.layout.CssClassFacetForActionXml;
+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.collections.layout.CssClassFacetForCollectionXml;
+import org.apache.isis.core.metamodel.facets.collections.layout.DefaultViewFacetForCollectionXml;
+import org.apache.isis.core.metamodel.facets.collections.layout.DescribedAsFacetForCollectionXml;
+import org.apache.isis.core.metamodel.facets.collections.layout.HiddenFacetForCollectionXml;
+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.members.order.annotprop.MemberOrderFacetXml;
+import org.apache.isis.core.metamodel.facets.object.membergroups.MemberGroupLayoutFacet;
+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;
+import org.apache.isis.core.metamodel.facets.properties.propertylayout.LabelAtFacetForPropertyXml;
+import org.apache.isis.core.metamodel.facets.properties.propertylayout.MultiLineFacetForPropertyXml;
+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.spec.ObjectSpecification;
+import org.apache.isis.core.metamodel.spec.SpecificationLoader;
+import org.apache.isis.core.metamodel.spec.SpecificationLoaderAware;
+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;
+
+@DomainService(nature = NatureOfService.DOMAIN)
+public class ObjectLayoutMetadataServiceDefault
+        implements ObjectLayoutMetadataService, DeploymentCategoryAware , SpecificationLoaderAware {
+
+    private static final Logger LOG = LoggerFactory.getLogger(ObjectLayoutMetadataServiceDefault.class);
+
+    private final Set<Class<?>> blacklisted = Sets.newConcurrentHashSet();
+
+    @Programmatic
+    public ObjectLayoutMetadata fromXml(Class<?> domainClass) {
+
+        if(blacklisted.contains(domainClass)) {
+            return null;
+        }
+
+        final String xml;
+        final String resourceName = domainClass.getSimpleName() + ".layout.xml";
+        try {
+            xml = resourceContentOf(domainClass, resourceName);
+        } catch (IOException | IllegalArgumentException ex) {
+
+            blacklisted.add(domainClass);
+            final String message = String .format(
+                    "Failed to locate file %s (relative to %s.class); ex: %s)",
+                    resourceName, domainClass.getName(), ex.getMessage());
+
+            LOG.debug(message);
+            return null;
+        }
+
+        try {
+            final ObjectLayoutMetadata metadata = jaxbService.fromXml(ObjectLayoutMetadata.class, xml);
+            return metadata;
+        } catch(Exception ex) {
+
+            // note that we don't blacklist if the file exists but couldn't be parsed;
+            // the developer might fix so we will want to retry.
+            final String message = "Failed to parse " + resourceName + " file (" + ex.getMessage() + ")";
+            LOG.warn(message);
+
+            return null;
+        }
+    }
+
+    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());
+    }
+
+
+    @Override
+    public ObjectLayoutMetadata normalize(final ObjectLayoutMetadata objectLayoutMetadata, final Class<?> domainClass) {
+        // caching (of whether validated) is enabled only in production.
+        return objectLayoutMetadata.isNormalized() && deploymentCategory.isProduction()
+                ? objectLayoutMetadata
+                : deriveAndOverwrite(objectLayoutMetadata, domainClass);
+    }
+
+    private ObjectLayoutMetadata deriveAndOverwrite(final ObjectLayoutMetadata objectLayoutMetadata, final Class<?> domainClass) {
+        synchronized (objectLayoutMetadata) {
+            final ObjectSpecification objectSpec = specificationLookup.loadSpecification(domainClass);
+            doDeriveAndOverwrite(objectLayoutMetadata, objectSpec);
+            objectLayoutMetadata.setNormalized(true);
+        }
+        return objectLayoutMetadata;
+    }
+
+    private void doDeriveAndOverwrite(final ObjectLayoutMetadata metadata, final ObjectSpecification objectSpec) {
+
+        final Map<String, OneToOneAssociation> oneToOneAssociationById =
+                ObjectMember.Util.mapById(getOneToOneAssociations(objectSpec));
+        final Map<String, OneToManyAssociation> oneToManyAssociationById =
+                ObjectMember.Util.mapById(getOneToManyAssociations(objectSpec));
+        final Map<String, ObjectAction> objectActionById =
+                ObjectMember.Util.mapById(objectSpec.getObjectActions(Contributed.INCLUDED));
+
+        derive(metadata, oneToOneAssociationById, oneToManyAssociationById, objectActionById);
+        overwrite(metadata, oneToOneAssociationById, oneToManyAssociationById, objectActionById);
+    }
+
+    /**
+     * 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>
+     */
+    private static void derive(
+            final ObjectLayoutMetadata metadata,
+            final Map<String, OneToOneAssociation> oneToOneAssociationById,
+            final Map<String, OneToManyAssociation> oneToManyAssociationById,
+            final Map<String, ObjectAction> objectActionById) {
+
+        final LinkedHashMap<String, PropertyLayoutMetadata> propertyIds = metadata.getAllPropertiesById();
+        final LinkedHashMap<String, CollectionLayoutMetadata> collectionIds = metadata.getAllCollectionsById();
+        final LinkedHashMap<String, ActionLayoutMetadata> actionIds = metadata.getAllActionsById();
+
+        final AtomicReference<PropertyGroup> defaultPropertyGroupRef = new AtomicReference<>();
+        final AtomicReference<Column> firstColumnRef = new AtomicReference<>();
+        final AtomicReference<TabGroup> lastTabGroupRef = new AtomicReference<>();
+
+        // capture the first column, and also
+        // capture the first property group (if any) with the default name ('General')
+        metadata.visit(new ObjectLayoutMetadata.VisitorAdapter() {
+            @Override
+            public void visit(final Column column) {
+                firstColumnRef.compareAndSet(null, column);
+            }
+            @Override
+            public void visit(final PropertyGroup propertyGroup) {
+                if(MemberGroupLayoutFacet.DEFAULT_GROUP.equals(propertyGroup.getName())) {
+                    defaultPropertyGroupRef.compareAndSet(null, propertyGroup);
+                }
+            }
+            @Override
+            public void visit(final TabGroup tabGroup) {
+                lastTabGroupRef.set(tabGroup);
+            }
+        });
+
+        // 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 List<String>[] propertyIdTuple = surplusAndMissing(propertyIds.keySet(), oneToOneAssociationById.keySet());
+        final List<String> surplusPropertyIds = propertyIdTuple[0];
+        final List<String> missingPropertyIds = propertyIdTuple[1];
+
+        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 = defaultPropertyGroupRef.compareAndSet(null, new PropertyGroup(MemberGroupLayoutFacet.DEFAULT_GROUP));
+            final PropertyGroup defaultPropertyGroup = defaultPropertyGroupRef.get();
+            if(wasSet) {
+                firstColumnRef.get().getPropertyGroups().add(defaultPropertyGroup);
+            }
+            for (final String propertyId : missingPropertyIds) {
+                defaultPropertyGroup.getProperties().add(new PropertyLayoutMetadata(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 List<String>[] collectionIdTuple = surplusAndMissing(collectionIds.keySet(), oneToManyAssociationById.keySet());
+        final List<String> surplusCollectionIds = collectionIdTuple[0];
+        final List<String> missingCollectionIds = collectionIdTuple[1];
+
+        for (String surplusCollectionId : surplusCollectionIds) {
+            collectionIds.get(surplusCollectionId).setMetadataError("No such collection");
+        }
+
+        if(!missingCollectionIds.isEmpty()) {
+            while(metadata.getTabGroups().size() < 2) {
+                final TabGroup tabGroup = new TabGroup();
+                metadata.getTabGroups().add(tabGroup);
+                lastTabGroupRef.set(tabGroup);
+            }
+            final TabGroup lastTabGroup = lastTabGroupRef.get();
+            for (final String collectionId : missingCollectionIds) {
+                final Tab tab = new Tab();
+                lastTabGroup.getTabs().add(tab);
+                Column left = new Column(12);
+                tab.setLeft(left);
+                left.getCollections().add(new CollectionLayoutMetadata(collectionId));
+            }
+        }
+
+        // any missing actions will be added as domain object actions (in the header)
+        final List<String>[] actionIdTuple = surplusAndMissing(actionIds.keySet(), objectActionById.keySet());
+        final List<String> surplusActionIds = actionIdTuple[0];
+        final List<String> missingActionIds = actionIdTuple[1];
+
+        for (String surplusActionId : surplusActionIds) {
+            actionIds.get(surplusActionId).setMetadataError("No such action");
+        }
+
+        if(!missingActionIds.isEmpty()) {
+            for (String actionId : missingActionIds) {
+                metadata.getActions().add(new ActionLayoutMetadata(actionId));
+            }
+        }
+    }
+
+    /**
+     * Returns a 2-element array (a tuple) of [first-second, second-first]
+     */
+    static <T> List<T>[] surplusAndMissing(final java.util.Collection<T> first, final java.util.Collection<T> second){
+        final List<T> firstNotSecond = Lists.newArrayList(first);
+        firstNotSecond.removeAll(second);
+        final List<T> secondNotFirst = Lists.newArrayList(second);
+        secondNotFirst.removeAll(first);
+        return new List[]{ firstNotSecond, secondNotFirst };
+    }
+
+    private void overwrite(
+            final ObjectLayoutMetadata metadata,
+            final Map<String, OneToOneAssociation> oneToOneAssociationById,
+            final Map<String, OneToManyAssociation> oneToManyAssociationById,
+            final Map<String, ObjectAction> objectActionById) {
+
+        metadata.visit(new ObjectLayoutMetadata.VisitorAdapter() {
+            private final Map<String, int[]> propertySequenceByGroup = Maps.newHashMap();
+            private int actionDomainObjectSequence = 1;
+            private int actionPropertyGroupSequence = 1;
+            private int actionPropertySequence = 1;
+            private int actionCollectionSequence = 1;
+
+            @Override
+            public void visit(final ActionLayoutMetadata actionLayoutMetadata) {
+                final ActionHolder actionHolder = actionLayoutMetadata.getOwner();
+                final ObjectAction objectAction = objectActionById.get(actionLayoutMetadata.getId());
+                if(objectAction == null) {
+                    return;
+                }
+
+                final String memberOrderName;
+                final int memberOrderSequence;
+                if(actionHolder instanceof PropertyGroup) {
+                    final PropertyGroup propertyGroup = (PropertyGroup) actionHolder;
+                    final List<PropertyLayoutMetadata> properties = propertyGroup.getProperties();
+                    final PropertyLayoutMetadata propertyLayoutMetadata = properties.get(0); // any will do
+                    memberOrderName = propertyLayoutMetadata.getId();
+                    memberOrderSequence = actionPropertyGroupSequence++;
+                } else if(actionHolder instanceof PropertyLayoutMetadata) {
+                    final PropertyLayoutMetadata propertyLayoutMetadata = (PropertyLayoutMetadata) actionHolder;
+                    memberOrderName = propertyLayoutMetadata.getId();
+                    memberOrderSequence = actionPropertySequence++;
+                } else if(actionHolder instanceof CollectionLayoutMetadata) {
+                    final CollectionLayoutMetadata collectionLayoutMetadata = (CollectionLayoutMetadata) actionHolder;
+                    memberOrderName = collectionLayoutMetadata.getId();
+                    memberOrderSequence = actionCollectionSequence++;
+                } else {
+                    // DomainObject
+                    memberOrderName = null;
+                    memberOrderSequence = actionDomainObjectSequence++;
+                }
+                FacetUtil.addFacet(
+                        new MemberOrderFacetXml(memberOrderName, ""+memberOrderSequence, translationService, objectAction));
+
+
+                if(actionHolder instanceof PropertyGroup) {
+                    if(actionLayoutMetadata.getPosition() == null ||
+                            actionLayoutMetadata.getPosition() == org.apache.isis.applib.annotation.ActionLayout.Position.BELOW ||
+                            actionLayoutMetadata.getPosition() == org.apache.isis.applib.annotation.ActionLayout.Position.RIGHT) {
+                        actionLayoutMetadata.setPosition(org.apache.isis.applib.annotation.ActionLayout.Position.PANEL);
+                    }
+                } else if(actionHolder instanceof PropertyLayoutMetadata) {
+                    if(actionLayoutMetadata.getPosition() == null ||
+                            actionLayoutMetadata.getPosition() == org.apache.isis.applib.annotation.ActionLayout.Position.PANEL_DROPDOWN ||
+                            actionLayoutMetadata.getPosition() == org.apache.isis.applib.annotation.ActionLayout.Position.PANEL) {
+                        actionLayoutMetadata.setPosition(org.apache.isis.applib.annotation.ActionLayout.Position.BELOW);
+                    }
+                } else {
+                    // doesn't do anything for DomainObject or Collection
+                    actionLayoutMetadata.setPosition(null);
+                }
+
+                FacetUtil.addFacet(ActionPositionFacetForActionXml.create(actionLayoutMetadata, objectAction));
+                FacetUtil.addFacet(BookmarkPolicyFacetForActionXml.create(actionLayoutMetadata, objectAction));
+                FacetUtil.addFacet(CssClassFacetForActionXml.create(actionLayoutMetadata, objectAction));
+                FacetUtil.addFacet(CssClassFaFacetForActionXml.create(actionLayoutMetadata, objectAction));
+                FacetUtil.addFacet(DescribedAsFacetForActionXml.create(actionLayoutMetadata, objectAction));
+                FacetUtil.addFacet(HiddenFacetForActionLayoutXml.create(actionLayoutMetadata, objectAction));
+                FacetUtil.addFacet(NamedFacetForActionXml.create(actionLayoutMetadata, objectAction));
+            }
+
+            @Override
+            public void visit(final PropertyLayoutMetadata propertyLayoutMetadata) {
+                final OneToOneAssociation oneToOneAssociation = oneToOneAssociationById.get(propertyLayoutMetadata.getId());
+                if(oneToOneAssociation == null) {
+                    return;
+                }
+
+                FacetUtil.addFacet(CssClassFacetForPropertyXml.create(propertyLayoutMetadata, oneToOneAssociation));
+                FacetUtil.addFacet(DescribedAsFacetForPropertyXml.create(propertyLayoutMetadata, oneToOneAssociation));
+                FacetUtil.addFacet(HiddenFacetForPropertyXml.create(propertyLayoutMetadata, oneToOneAssociation));
+                FacetUtil.addFacet(LabelAtFacetForPropertyXml.create(propertyLayoutMetadata, oneToOneAssociation));
+                FacetUtil.addFacet(MultiLineFacetForPropertyXml.create(propertyLayoutMetadata, oneToOneAssociation));
+                FacetUtil.addFacet(NamedFacetForPropertyXml.create(propertyLayoutMetadata, oneToOneAssociation));
+                FacetUtil.addFacet(RenderedAdjustedFacetForPropertyXml.create(propertyLayoutMetadata, oneToOneAssociation));
+                FacetUtil.addFacet(TypicalLengthFacetForPropertyXml.create(propertyLayoutMetadata, oneToOneAssociation));
+
+                // @MemberOrder#name based on owning property group, @MemberOrder#sequence monotonically increasing
+                final PropertyGroup propertyGroup = propertyLayoutMetadata.getOwner();
+                final String groupName = propertyGroup.getName();
+                final String sequence = nextInSequenceFor(groupName);
+                FacetUtil.addFacet(
+                        new MemberOrderFacetXml(groupName, sequence, translationService, oneToOneAssociation));
+            }
+
+            @Override
+            public void visit(final CollectionLayoutMetadata collectionLayoutMetadata) {
+                final OneToManyAssociation oneToManyAssociation = oneToManyAssociationById.get(collectionLayoutMetadata.getId());
+                if(oneToManyAssociation == null) {
+                    return;
+                }
+
+                FacetUtil.addFacet(CssClassFacetForCollectionXml.create(collectionLayoutMetadata, oneToManyAssociation));
+                FacetUtil.addFacet(DefaultViewFacetForCollectionXml.create(collectionLayoutMetadata, oneToManyAssociation));
+                FacetUtil.addFacet(DescribedAsFacetForCollectionXml.create(collectionLayoutMetadata, oneToManyAssociation));
+                FacetUtil.addFacet(HiddenFacetForCollectionXml.create(collectionLayoutMetadata, oneToManyAssociation));
+                FacetUtil.addFacet(NamedFacetForCollectionXml.create(collectionLayoutMetadata, oneToManyAssociation));
+                FacetUtil.addFacet(PagedFacetForCollectionXml.create(collectionLayoutMetadata, oneToManyAssociation));
+                FacetUtil.addFacet(SortedByFacetForCollectionXml.create(collectionLayoutMetadata, oneToManyAssociation));
+
+                // @MemberOrder#name based on the collection's id (so that each has a single "member group")
+                final String groupName = collectionLayoutMetadata.getId();
+                final String sequence = nextInSequenceFor(groupName);
+                FacetUtil.addFacet(
+                        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 Column column = collectionLayoutMetadata.getOwner();
+                final Tab tab = column.getOwner();
+                if(tab.getContents().size() == 1) {
+                    tab.setName(collectionLayoutMetadata.getNamed());
+                }
+            }
+
+            private String nextInSequenceFor(final String propertyGroupName) {
+                synchronized (propertySequenceByGroup) {
+                    int[] holder = propertySequenceByGroup.get(propertyGroupName);
+                    if(holder == null) {
+                        holder = new int[]{0};
+                        propertySequenceByGroup.put(propertyGroupName, holder);
+                    }
+                    holder[0]++;
+                    return ""+holder[0];
+                }
+            }
+        });
+    }
+
+    private static List<OneToOneAssociation> getOneToOneAssociations(final ObjectSpecification objectSpec) {
+        List associations = objectSpec
+                .getAssociations(Contributed.INCLUDED, ObjectAssociation.Filters.PROPERTIES);
+        return associations;
+    }
+    private static List<OneToManyAssociation> getOneToManyAssociations(final ObjectSpecification objectSpec) {
+        List associations = objectSpec
+                .getAssociations(Contributed.INCLUDED, ObjectAssociation.Filters.COLLECTIONS);
+        return associations;
+    }
+
+
+    @Override
+    public String toXml(final ObjectLayoutMetadata objectLayoutMetadata) {
+        return jaxbService.toXml(objectLayoutMetadata);
+    }
+
+
+    //region > injected dependencies
+    private DeploymentCategory deploymentCategory;
+
+    @Override
+    public void setDeploymentCategory(final DeploymentCategory deploymentCategory) {
+        this.deploymentCategory = deploymentCategory;
+    }
+
+    private SpecificationLoader specificationLookup;
+
+    @Override
+    public void setSpecificationLoader(final SpecificationLoader specificationLookup) {
+        this.specificationLookup = specificationLookup;
+    }
+
+
+    @Inject
+    JaxbService jaxbService;
+
+    @Inject
+    TranslationService translationService;
+
+    //endregion
+
+}

http://git-wip-us.apache.org/repos/asf/isis/blob/fb0f1273/core/metamodel/src/main/java/org/apache/isis/core/metamodel/services/metamodel/MetaModelServiceDefault.java
----------------------------------------------------------------------
diff --git a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/services/metamodel/MetaModelServiceDefault.java b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/services/metamodel/MetaModelServiceDefault.java
index 8b56996..9a23a1d 100644
--- a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/services/metamodel/MetaModelServiceDefault.java
+++ b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/services/metamodel/MetaModelServiceDefault.java
@@ -48,7 +48,6 @@ public class MetaModelServiceDefault implements MetaModelService, SpecificationL
     private final static Logger LOG = LoggerFactory.getLogger(MetaModelServiceDefault.class);
 
 
-
     //region > fromObjectType, toObjectType
     @Programmatic
     public Class<?> fromObjectType(final String objectType) {


[40/50] [abbrv] isis git commit: ISIS-993: pretty much there on deriving and syncing the metamodel with the layout.xml info;

Posted by da...@apache.org.
ISIS-993: pretty much there on deriving and syncing the metamodel with the layout.xml info;

next step is to do the new Wicket views for the tabs themselves


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

Branch: refs/heads/ISIS-993
Commit: 4a8ff11b322c97a5efe72e55ae7535f9bd847cc5
Parents: a9597d7
Author: Dan Haywood <da...@haywood-associates.co.uk>
Authored: Thu Jan 7 02:19:42 2016 +0000
Committer: Dan Haywood <da...@haywood-associates.co.uk>
Committed: Mon Jan 25 14:38:24 2016 +0000

----------------------------------------------------------------------
 .../apache/isis/applib/layout/v1_0/Action.java  |   5 +
 .../isis/applib/layout/v1_0/Collection.java     |   8 +
 .../apache/isis/applib/layout/v1_0/Column.java  |   8 +
 .../isis/applib/layout/v1_0/DomainObject.java   |  38 ++-
 .../isis/applib/layout/v1_0/Property.java       |   7 +
 .../isis/applib/layout/v1_0/PropertyGroup.java  |   7 +
 .../ActionPositionFacetForActionLayoutXml.java  |  41 +++
 .../BookmarkPolicyFacetForActionLayoutXml.java  |  42 +++
 .../CssClassFaFacetForActionLayoutXml.java      |  45 ++++
 .../layout/CssClassFacetForActionLayoutXml.java |  43 +++
 .../DescribedAsFacetForActionLayoutXml.java     |  43 +++
 .../layout/HiddenFacetForActionLayoutXml.java   |  52 ++++
 .../layout/NamedFacetForActionLayoutXml.java    |  45 ++++
 ...tViewFacetForCollectionLayoutAnnotation.java |  41 ---
 ...ewFacetOnCollectionFromLayoutProperties.java |  46 ----
 .../layout/CollectionLayoutFacetFactory.java    |   2 -
 .../CssClassFacetForCollectionLayoutXml.java    |  43 +++
 ...tViewFacetForCollectionLayoutAnnotation.java |  43 +++
 .../DefaultViewFacetForCollectionLayoutXml.java |  43 +++
 ...ewFacetOnCollectionFromLayoutProperties.java |  48 ++++
 .../DescribedAsFacetForCollectionLayoutXml.java |  43 +++
 .../HiddenFacetForCollectionLayoutXml.java      |  52 ++++
 .../NamedFacetForCollectionLayoutXml.java       |  48 ++++
 .../PagedFacetForCollectionLayoutXml.java       |  41 +++
 .../SortedByFacetForCollectionLayoutXml.java    |  52 ++++
 .../order/annotprop/MemberOrderFacetXml.java    |  35 +++
 .../object/layoutxml/LayoutXmlFacetDefault.java | 270 +++++++++++++++++--
 .../object/layoutxml/LayoutXmlFacetFactory.java |   4 +-
 .../CssClassFacetForPropertyLayoutXml.java      |  43 +++
 .../DescribedAsFacetForPropertyLayoutXml.java   |  43 +++
 .../HiddenFacetForPropertyLayoutXml.java        |  52 ++++
 .../LabelAtFacetForPropertyLayoutXml.java       |  42 +++
 .../MultiLineFacetForPropertyLayoutXml.java     |  41 +++
 .../NamedFacetForPropertyLayoutXml.java         |  48 ++++
 ...nderedAdjustedFacetForPropertyLayoutXml.java |  43 +++
 .../TypicalLengthFacetForPropertyLayoutXml.java |  49 ++++
 .../layoutxml/LayoutXmlFacetDefaultTest.java    |  60 +++++
 .../entity/tabbed/EntityTabbedPanel.html        |   2 +
 .../entity/tabbed/EntityTabbedPanel.java        |  13 +-
 .../dom/simple/SimpleObject.layout.xml          |   3 +-
 40 files changed, 1503 insertions(+), 131 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/isis/blob/4a8ff11b/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/Action.java
----------------------------------------------------------------------
diff --git a/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/Action.java b/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/Action.java
index d3ab3b3..05aa54f 100644
--- a/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/Action.java
+++ b/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/Action.java
@@ -31,6 +31,11 @@ import javax.xml.bind.annotation.XmlType;
 )
 public class Action {
 
+    public Action() {
+    }
+    public Action(final String id) {
+        setId(id);
+    }
 
     private String id;
     /**

http://git-wip-us.apache.org/repos/asf/isis/blob/4a8ff11b/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/Collection.java
----------------------------------------------------------------------
diff --git a/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/Collection.java b/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/Collection.java
index 6439807..4c48c2a 100644
--- a/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/Collection.java
+++ b/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/Collection.java
@@ -36,6 +36,14 @@ import com.google.common.collect.Lists;
 )
 public class Collection implements ColumnContent, ActionHolder {
 
+
+    public Collection() {
+    }
+    public Collection(final String id) {
+        setId(id);
+    }
+
+
     private String id;
 
     /**

http://git-wip-us.apache.org/repos/asf/isis/blob/4a8ff11b/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/Column.java
----------------------------------------------------------------------
diff --git a/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/Column.java b/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/Column.java
index e751c21..3ac724e 100644
--- a/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/Column.java
+++ b/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/Column.java
@@ -35,6 +35,14 @@ import com.google.common.collect.Lists;
 )
 public class Column {
 
+
+    public Column() {
+    }
+
+    public Column(final int span) {
+        setSpan(span);
+    }
+
     private int span = 4;
 
     @XmlAttribute(required = true)

http://git-wip-us.apache.org/repos/asf/isis/blob/4a8ff11b/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/DomainObject.java
----------------------------------------------------------------------
diff --git a/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/DomainObject.java b/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/DomainObject.java
index 836a732..c1868fc 100644
--- a/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/DomainObject.java
+++ b/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/DomainObject.java
@@ -36,8 +36,7 @@ import org.apache.isis.applib.services.dto.Dto;
 
 @XmlRootElement
 @XmlType(
-        name="domain-object"
-        , propOrder = {
+        propOrder = {
                 "actions"
                 , "tabGroups"
         }
@@ -75,12 +74,16 @@ public class DomainObject implements Dto, ActionHolder {
 
     public interface Visitor {
         void visit(DomainObject domainObject);
-        void visit(Property property);
-        void visit(Collection collection);
-        void visit(Action action);
         void visit(TabGroup tabGroup);
         void visit(Tab tab);
         void visit(Column column);
+        void visit(PropertyGroup propertyGroup);
+        void visit(Property property);
+        void visit(@Nullable PropertyLayout propertyLayout, Property forProperty);
+        void visit(Collection collection);
+        void visit(@Nullable CollectionLayout collectionLayout, Collection forCollection);
+        void visit(Action action, ActionHolder holder);
+        void visit(@Nullable ActionLayout actionLayout, Action forAction);
     }
 
     public static class VisitorAdapter implements Visitor {
@@ -93,15 +96,23 @@ public class DomainObject implements Dto, ActionHolder {
         @Override
         public void visit(final Column column) { }
         @Override
+        public void visit(PropertyGroup propertyGroup) {}
+        @Override
         public void visit(Property property) {}
         @Override
+        public void visit(@Nullable final PropertyLayout propertyLayout, final Property forProperty) { }
+        @Override
         public void visit(Collection collection) {}
         @Override
-        public void visit(Action action) {}
+        public void visit(@Nullable final CollectionLayout collectionLayout, final Collection forCollection) { }
+        @Override
+        public void visit(final Action action, final ActionHolder actionHolder) { }
+        @Override
+        public void visit(@Nullable final ActionLayout actionLayout, final Action forAction) { }
     }
 
 
-    public void traverse(final Visitor visitor) {
+    public void visit(final Visitor visitor) {
         visitor.visit(this);
         traverseActions(this, visitor);
         final List<TabGroup> tabGroups = getTabGroups();
@@ -118,20 +129,27 @@ public class DomainObject implements Dto, ActionHolder {
     }
 
     private void traverseColumn(final Column column, final Visitor visitor) {
+        if(column == null) {
+            return;
+        }
         visitor.visit(column);
         traversePropertyGroups(column, visitor);
         traverseCollections(column, visitor);
     }
 
     private void traversePropertyGroups(final Column column, final Visitor visitor) {
+        List<ColumnContent> content = column.getContent();
         final Iterable<PropertyGroup> propertyGroups =
                 Iterables.transform(
-                        Iterables.filter(column.getContent(), is(PropertyGroup.class)),
+                        Iterables.filter(content, is(PropertyGroup.class)),
                         cast(PropertyGroup.class));
         for (final PropertyGroup propertyGroup : propertyGroups) {
+            visitor.visit(propertyGroup);
+            traverseActions(propertyGroup, visitor);
             final List<Property> properties = propertyGroup.getProperties();
             for (final Property property : properties) {
                 visitor.visit(property);
+                visitor.visit(property.getLayout(), property);
                 traverseActions(property, visitor);
             }
         }
@@ -144,6 +162,7 @@ public class DomainObject implements Dto, ActionHolder {
                         cast(Collection.class));
         for (final Collection collection : collections) {
             visitor.visit(collection);
+            visitor.visit(collection.getLayout(), collection);
             traverseActions(collection, visitor);
         }
     }
@@ -151,7 +170,8 @@ public class DomainObject implements Dto, ActionHolder {
     private void traverseActions(final ActionHolder actionHolder, final Visitor visitor) {
         final List<Action> actions = actionHolder.getActions();
         for (final Action action : actions) {
-            visitor.visit(action);
+            visitor.visit(action, actionHolder);
+            visitor.visit(action.getLayout(), action);
         }
     }
 

http://git-wip-us.apache.org/repos/asf/isis/blob/4a8ff11b/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/Property.java
----------------------------------------------------------------------
diff --git a/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/Property.java b/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/Property.java
index 9e8136b..d3ee9b2 100644
--- a/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/Property.java
+++ b/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/Property.java
@@ -36,6 +36,13 @@ import com.google.common.collect.Lists;
 )
 public class Property implements ActionHolder {
 
+    public Property() {
+    }
+
+    public Property(final String id) {
+        this.id = id;
+    }
+
     private String id;
 
     /**

http://git-wip-us.apache.org/repos/asf/isis/blob/4a8ff11b/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/PropertyGroup.java
----------------------------------------------------------------------
diff --git a/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/PropertyGroup.java b/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/PropertyGroup.java
index 0b9b632..9d883fa 100644
--- a/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/PropertyGroup.java
+++ b/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/PropertyGroup.java
@@ -39,6 +39,13 @@ import org.apache.isis.applib.annotation.MemberOrder;
 )
 public class PropertyGroup implements ColumnContent, ActionHolder {
 
+    public PropertyGroup() {
+    }
+
+    public PropertyGroup(final String name) {
+        setName(name);
+    }
+
     private String name;
 
     /**

http://git-wip-us.apache.org/repos/asf/isis/blob/4a8ff11b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/actions/layout/ActionPositionFacetForActionLayoutXml.java
----------------------------------------------------------------------
diff --git a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/actions/layout/ActionPositionFacetForActionLayoutXml.java b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/actions/layout/ActionPositionFacetForActionLayoutXml.java
new file mode 100644
index 0000000..c585b6b
--- /dev/null
+++ b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/actions/layout/ActionPositionFacetForActionLayoutXml.java
@@ -0,0 +1,41 @@
+/*
+ *  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.facets.actions.layout;
+
+import org.apache.isis.applib.layout.v1_0.ActionLayout;
+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;
+
+public class ActionPositionFacetForActionLayoutXml extends ActionPositionFacetAbstract {
+
+    public static ActionPositionFacet create(ActionLayout actionLayout, FacetHolder holder) {
+        if(actionLayout == null) {
+            return null;
+        }
+        final org.apache.isis.applib.annotation.ActionLayout.Position position = actionLayout.getPosition();
+        return position != null ? new ActionPositionFacetForActionLayoutXml(position, holder) : null;
+    }
+
+    private ActionPositionFacetForActionLayoutXml(final org.apache.isis.applib.annotation.ActionLayout.Position position, final FacetHolder holder) {
+        super(position, holder);
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/isis/blob/4a8ff11b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/actions/layout/BookmarkPolicyFacetForActionLayoutXml.java
----------------------------------------------------------------------
diff --git a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/actions/layout/BookmarkPolicyFacetForActionLayoutXml.java b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/actions/layout/BookmarkPolicyFacetForActionLayoutXml.java
new file mode 100644
index 0000000..f273e9a
--- /dev/null
+++ b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/actions/layout/BookmarkPolicyFacetForActionLayoutXml.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.core.metamodel.facets.actions.layout;
+
+import org.apache.isis.applib.annotation.BookmarkPolicy;
+import org.apache.isis.applib.layout.v1_0.ActionLayout;
+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;
+
+public class BookmarkPolicyFacetForActionLayoutXml extends BookmarkPolicyFacetAbstract {
+
+    public static BookmarkPolicyFacet create(final ActionLayout actionLayout, final FacetHolder holder) {
+        if (actionLayout == null) {
+            return null;
+        }
+        final BookmarkPolicy bookmarkPolicy = actionLayout.getBookmarking();
+        return bookmarkPolicy != null && bookmarkPolicy != BookmarkPolicy.NEVER ? new BookmarkPolicyFacetForActionLayoutXml(bookmarkPolicy, holder) : null;
+    }
+
+    private BookmarkPolicyFacetForActionLayoutXml(final BookmarkPolicy bookmarkPolicy, final FacetHolder holder) {
+        super(bookmarkPolicy, holder);
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/isis/blob/4a8ff11b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/actions/layout/CssClassFaFacetForActionLayoutXml.java
----------------------------------------------------------------------
diff --git a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/actions/layout/CssClassFaFacetForActionLayoutXml.java b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/actions/layout/CssClassFaFacetForActionLayoutXml.java
new file mode 100644
index 0000000..285d705
--- /dev/null
+++ b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/actions/layout/CssClassFaFacetForActionLayoutXml.java
@@ -0,0 +1,45 @@
+/*
+ *  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.facets.actions.layout;
+
+import com.google.common.base.Strings;
+
+import org.apache.isis.applib.layout.v1_0.ActionLayout;
+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;
+import org.apache.isis.core.metamodel.facets.members.cssclassfa.CssClassFaPosition;
+
+public class CssClassFaFacetForActionLayoutXml extends CssClassFaFacetAbstract {
+
+    public static CssClassFaFacet create(final ActionLayout actionLayout, final FacetHolder holder) {
+        if(actionLayout == null) {
+            return null;
+        }
+        final String cssClassFa = Strings.emptyToNull(actionLayout.getCssClassFa());
+        CssClassFaPosition cssClassFaPosition = CssClassFaPosition.from(actionLayout.getCssClassFaPosition());
+        return cssClassFa != null ? new CssClassFaFacetForActionLayoutXml(cssClassFa, cssClassFaPosition, holder) : null;
+    }
+
+    private CssClassFaFacetForActionLayoutXml(final String value, final CssClassFaPosition position, final FacetHolder holder) {
+        super(value, position, holder);
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/isis/blob/4a8ff11b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/actions/layout/CssClassFacetForActionLayoutXml.java
----------------------------------------------------------------------
diff --git a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/actions/layout/CssClassFacetForActionLayoutXml.java b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/actions/layout/CssClassFacetForActionLayoutXml.java
new file mode 100644
index 0000000..c242091
--- /dev/null
+++ b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/actions/layout/CssClassFacetForActionLayoutXml.java
@@ -0,0 +1,43 @@
+/*
+ *  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.facets.actions.layout;
+
+import com.google.common.base.Strings;
+
+import org.apache.isis.applib.layout.v1_0.ActionLayout;
+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;
+
+public class CssClassFacetForActionLayoutXml extends CssClassFacetAbstract {
+
+    public static CssClassFacet create(ActionLayout actionLayout, FacetHolder holder) {
+        if(actionLayout == null) {
+            return null;
+        }
+        final String cssClass = Strings.emptyToNull(actionLayout.getCssClass());
+        return cssClass != null ? new CssClassFacetForActionLayoutXml(cssClass, holder) : null;
+    }
+
+    private CssClassFacetForActionLayoutXml(String value, FacetHolder holder) {
+        super(value, holder);
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/isis/blob/4a8ff11b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/actions/layout/DescribedAsFacetForActionLayoutXml.java
----------------------------------------------------------------------
diff --git a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/actions/layout/DescribedAsFacetForActionLayoutXml.java b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/actions/layout/DescribedAsFacetForActionLayoutXml.java
new file mode 100644
index 0000000..493cd7f
--- /dev/null
+++ b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/actions/layout/DescribedAsFacetForActionLayoutXml.java
@@ -0,0 +1,43 @@
+/*
+ *  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.facets.actions.layout;
+
+import com.google.common.base.Strings;
+
+import org.apache.isis.applib.layout.v1_0.ActionLayout;
+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;
+
+public class DescribedAsFacetForActionLayoutXml extends DescribedAsFacetAbstract {
+
+    public static DescribedAsFacet create(ActionLayout actionLayout, FacetHolder holder) {
+        if(actionLayout == null) {
+            return null;
+        }
+        final String describedAs = Strings.emptyToNull(actionLayout.getDescribedAs());
+        return describedAs != null ? new DescribedAsFacetForActionLayoutXml(describedAs, holder) : null;
+    }
+
+    private DescribedAsFacetForActionLayoutXml(String value, FacetHolder holder) {
+        super(value, holder);
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/isis/blob/4a8ff11b/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
new file mode 100644
index 0000000..821083a
--- /dev/null
+++ b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/actions/layout/HiddenFacetForActionLayoutXml.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.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.v1_0.ActionLayout;
+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;
+import org.apache.isis.core.metamodel.facets.members.hidden.HiddenFacetAbstract;
+
+public class HiddenFacetForActionLayoutXml extends HiddenFacetAbstract {
+
+    public static HiddenFacet create(final ActionLayout actionLayout, final FacetHolder holder) {
+        if (actionLayout == null) {
+            return null;
+        }
+        final Where where = actionLayout.getHidden();
+        return where != null && where != Where.NOT_SPECIFIED  ? new HiddenFacetForActionLayoutXml(where, holder) : null;
+    }
+
+    private HiddenFacetForActionLayoutXml(final Where where, final FacetHolder holder) {
+        super(When.ALWAYS, where, holder);
+    }
+
+    @Override
+    public String hiddenReason(final ObjectAdapter targetAdapter, final Where whereContext) {
+        if(!where().includes(whereContext)) {
+            return null;
+        }
+        return "Hidden on " + where().getFriendlyName();
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/isis/blob/4a8ff11b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/actions/layout/NamedFacetForActionLayoutXml.java
----------------------------------------------------------------------
diff --git a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/actions/layout/NamedFacetForActionLayoutXml.java b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/actions/layout/NamedFacetForActionLayoutXml.java
new file mode 100644
index 0000000..a8917d6
--- /dev/null
+++ b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/actions/layout/NamedFacetForActionLayoutXml.java
@@ -0,0 +1,45 @@
+/*
+ *  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.facets.actions.layout;
+
+import com.google.common.base.Strings;
+
+import org.apache.isis.applib.layout.v1_0.ActionLayout;
+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;
+
+public class NamedFacetForActionLayoutXml extends NamedFacetAbstract {
+
+    public static NamedFacet create(final ActionLayout actionLayout, final FacetHolder holder) {
+        if(actionLayout == null) {
+            return null;
+        }
+        final String named = Strings.emptyToNull(actionLayout.getNamed());
+        Boolean escaped = actionLayout.getNamedEscaped();
+        return named != null ? new NamedFacetForActionLayoutXml(named, (escaped == null || escaped), holder) : null;
+    }
+
+    private NamedFacetForActionLayoutXml(final String value, final boolean escaped, final FacetHolder holder) {
+
+        super(value, escaped, holder);
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/isis/blob/4a8ff11b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/collections/collection/defaultview/DefaultViewFacetForCollectionLayoutAnnotation.java
----------------------------------------------------------------------
diff --git a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/collections/collection/defaultview/DefaultViewFacetForCollectionLayoutAnnotation.java b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/collections/collection/defaultview/DefaultViewFacetForCollectionLayoutAnnotation.java
deleted file mode 100644
index 437ab37..0000000
--- a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/collections/collection/defaultview/DefaultViewFacetForCollectionLayoutAnnotation.java
+++ /dev/null
@@ -1,41 +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.facets.collections.collection.defaultview;
-
-import com.google.common.base.Strings;
-
-import org.apache.isis.applib.annotation.CollectionLayout;
-import org.apache.isis.core.metamodel.facetapi.FacetHolder;
-
-public class DefaultViewFacetForCollectionLayoutAnnotation extends DefaultViewFacetAbstract {
-
-    private DefaultViewFacetForCollectionLayoutAnnotation(String value, FacetHolder holder) {
-        super(value, holder);
-    }
-
-    public static DefaultViewFacet create(CollectionLayout collectionLayout, FacetHolder holder) {
-        if (collectionLayout == null) {
-            return null;
-        }
-
-        final String defaultView = Strings.emptyToNull(collectionLayout.defaultView());
-        return defaultView != null ? new DefaultViewFacetForCollectionLayoutAnnotation(defaultView, holder) : null;
-    }
-}

http://git-wip-us.apache.org/repos/asf/isis/blob/4a8ff11b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/collections/collection/defaultview/DefaultViewFacetOnCollectionFromLayoutProperties.java
----------------------------------------------------------------------
diff --git a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/collections/collection/defaultview/DefaultViewFacetOnCollectionFromLayoutProperties.java b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/collections/collection/defaultview/DefaultViewFacetOnCollectionFromLayoutProperties.java
deleted file mode 100644
index 2926798..0000000
--- a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/collections/collection/defaultview/DefaultViewFacetOnCollectionFromLayoutProperties.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.core.metamodel.facets.collections.collection.defaultview;
-
-import java.util.Properties;
-
-import com.google.common.base.Strings;
-
-import org.apache.isis.core.metamodel.facetapi.FacetHolder;
-
-public class DefaultViewFacetOnCollectionFromLayoutProperties extends DefaultViewFacetAbstract {
-
-    private DefaultViewFacetOnCollectionFromLayoutProperties(String defaultView, FacetHolder holder) {
-        super(defaultView, holder);
-    }
-
-    public static DefaultViewFacet create(Properties properties, FacetHolder holder) {
-        final String defaultView = defaultView(properties);
-        return defaultView != null ? new DefaultViewFacetOnCollectionFromLayoutProperties(defaultView, holder) : null;
-    }
-
-    public static String defaultView(Properties properties) {
-        if (properties == null) {
-            return null;
-        }
-
-        return Strings.emptyToNull(properties.getProperty("defaultView"));
-    }
-}

http://git-wip-us.apache.org/repos/asf/isis/blob/4a8ff11b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/collections/layout/CollectionLayoutFacetFactory.java
----------------------------------------------------------------------
diff --git a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/collections/layout/CollectionLayoutFacetFactory.java b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/collections/layout/CollectionLayoutFacetFactory.java
index 7367664..2d7d8d2 100644
--- a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/collections/layout/CollectionLayoutFacetFactory.java
+++ b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/collections/layout/CollectionLayoutFacetFactory.java
@@ -31,8 +31,6 @@ 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.collection.defaultview.DefaultViewFacetForCollectionLayoutAnnotation;
-import org.apache.isis.core.metamodel.facets.collections.collection.defaultview.DefaultViewFacetOnCollectionFromLayoutProperties;
 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.render.RenderFacet;

http://git-wip-us.apache.org/repos/asf/isis/blob/4a8ff11b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/collections/layout/CssClassFacetForCollectionLayoutXml.java
----------------------------------------------------------------------
diff --git a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/collections/layout/CssClassFacetForCollectionLayoutXml.java b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/collections/layout/CssClassFacetForCollectionLayoutXml.java
new file mode 100644
index 0000000..80f6132
--- /dev/null
+++ b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/collections/layout/CssClassFacetForCollectionLayoutXml.java
@@ -0,0 +1,43 @@
+/*
+ *  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.facets.collections.layout;
+
+import com.google.common.base.Strings;
+
+import org.apache.isis.applib.layout.v1_0.CollectionLayout;
+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;
+
+public class CssClassFacetForCollectionLayoutXml extends CssClassFacetAbstract {
+
+    public static CssClassFacet create(CollectionLayout collectionLayout, FacetHolder holder) {
+        if(collectionLayout == null) {
+            return null;
+        }
+        final String cssClass = Strings.emptyToNull(collectionLayout.getCssClass());
+        return cssClass != null ? new CssClassFacetForCollectionLayoutXml(cssClass, holder) : null;
+    }
+
+    private CssClassFacetForCollectionLayoutXml(String value, FacetHolder holder) {
+        super(value, holder);
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/isis/blob/4a8ff11b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/collections/layout/DefaultViewFacetForCollectionLayoutAnnotation.java
----------------------------------------------------------------------
diff --git a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/collections/layout/DefaultViewFacetForCollectionLayoutAnnotation.java b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/collections/layout/DefaultViewFacetForCollectionLayoutAnnotation.java
new file mode 100644
index 0000000..63c55d1
--- /dev/null
+++ b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/collections/layout/DefaultViewFacetForCollectionLayoutAnnotation.java
@@ -0,0 +1,43 @@
+/*
+ *  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.facets.collections.layout;
+
+import com.google.common.base.Strings;
+
+import org.apache.isis.applib.annotation.CollectionLayout;
+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;
+
+public class DefaultViewFacetForCollectionLayoutAnnotation extends DefaultViewFacetAbstract {
+
+    private DefaultViewFacetForCollectionLayoutAnnotation(String value, FacetHolder holder) {
+        super(value, holder);
+    }
+
+    public static DefaultViewFacet create(CollectionLayout collectionLayout, FacetHolder holder) {
+        if (collectionLayout == null) {
+            return null;
+        }
+
+        final String defaultView = Strings.emptyToNull(collectionLayout.defaultView());
+        return defaultView != null ? new DefaultViewFacetForCollectionLayoutAnnotation(defaultView, holder) : null;
+    }
+}

http://git-wip-us.apache.org/repos/asf/isis/blob/4a8ff11b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/collections/layout/DefaultViewFacetForCollectionLayoutXml.java
----------------------------------------------------------------------
diff --git a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/collections/layout/DefaultViewFacetForCollectionLayoutXml.java b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/collections/layout/DefaultViewFacetForCollectionLayoutXml.java
new file mode 100644
index 0000000..b8d9056
--- /dev/null
+++ b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/collections/layout/DefaultViewFacetForCollectionLayoutXml.java
@@ -0,0 +1,43 @@
+/*
+ *  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.facets.collections.layout;
+
+import com.google.common.base.Strings;
+
+import org.apache.isis.applib.layout.v1_0.CollectionLayout;
+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;
+
+public class DefaultViewFacetForCollectionLayoutXml extends DefaultViewFacetAbstract {
+
+    private DefaultViewFacetForCollectionLayoutXml(String value, FacetHolder holder) {
+        super(value, holder);
+    }
+
+    public static DefaultViewFacet create(CollectionLayout collectionLayout, FacetHolder holder) {
+        if (collectionLayout == null) {
+            return null;
+        }
+
+        final String defaultView = Strings.emptyToNull(collectionLayout.getDefaultView());
+        return defaultView != null ? new DefaultViewFacetForCollectionLayoutXml(defaultView, holder) : null;
+    }
+}

http://git-wip-us.apache.org/repos/asf/isis/blob/4a8ff11b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/collections/layout/DefaultViewFacetOnCollectionFromLayoutProperties.java
----------------------------------------------------------------------
diff --git a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/collections/layout/DefaultViewFacetOnCollectionFromLayoutProperties.java b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/collections/layout/DefaultViewFacetOnCollectionFromLayoutProperties.java
new file mode 100644
index 0000000..288f190
--- /dev/null
+++ b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/collections/layout/DefaultViewFacetOnCollectionFromLayoutProperties.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.core.metamodel.facets.collections.layout;
+
+import java.util.Properties;
+
+import com.google.common.base.Strings;
+
+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;
+
+public class DefaultViewFacetOnCollectionFromLayoutProperties extends DefaultViewFacetAbstract {
+
+    private DefaultViewFacetOnCollectionFromLayoutProperties(String defaultView, FacetHolder holder) {
+        super(defaultView, holder);
+    }
+
+    public static DefaultViewFacet create(Properties properties, FacetHolder holder) {
+        final String defaultView = defaultView(properties);
+        return defaultView != null ? new DefaultViewFacetOnCollectionFromLayoutProperties(defaultView, holder) : null;
+    }
+
+    public static String defaultView(Properties properties) {
+        if (properties == null) {
+            return null;
+        }
+
+        return Strings.emptyToNull(properties.getProperty("defaultView"));
+    }
+}

http://git-wip-us.apache.org/repos/asf/isis/blob/4a8ff11b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/collections/layout/DescribedAsFacetForCollectionLayoutXml.java
----------------------------------------------------------------------
diff --git a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/collections/layout/DescribedAsFacetForCollectionLayoutXml.java b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/collections/layout/DescribedAsFacetForCollectionLayoutXml.java
new file mode 100644
index 0000000..10241a1
--- /dev/null
+++ b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/collections/layout/DescribedAsFacetForCollectionLayoutXml.java
@@ -0,0 +1,43 @@
+/*
+ *  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.facets.collections.layout;
+
+import com.google.common.base.Strings;
+
+import org.apache.isis.applib.layout.v1_0.CollectionLayout;
+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;
+
+public class DescribedAsFacetForCollectionLayoutXml extends DescribedAsFacetAbstract {
+
+    public static DescribedAsFacet create(CollectionLayout collectionLayout, FacetHolder holder) {
+        if(collectionLayout == null) {
+            return null;
+        }
+        final String describedAs = Strings.emptyToNull(collectionLayout.getDescribedAs());
+        return describedAs != null ? new DescribedAsFacetForCollectionLayoutXml(describedAs, holder) : null;
+    }
+
+    private DescribedAsFacetForCollectionLayoutXml(String value, FacetHolder holder) {
+        super(value, holder);
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/isis/blob/4a8ff11b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/collections/layout/HiddenFacetForCollectionLayoutXml.java
----------------------------------------------------------------------
diff --git a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/collections/layout/HiddenFacetForCollectionLayoutXml.java b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/collections/layout/HiddenFacetForCollectionLayoutXml.java
new file mode 100644
index 0000000..f362634
--- /dev/null
+++ b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/collections/layout/HiddenFacetForCollectionLayoutXml.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.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.v1_0.CollectionLayout;
+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;
+import org.apache.isis.core.metamodel.facets.members.hidden.HiddenFacetAbstract;
+
+public class HiddenFacetForCollectionLayoutXml extends HiddenFacetAbstract {
+
+    public static HiddenFacet create(final CollectionLayout collectionLayout, final FacetHolder holder) {
+        if (collectionLayout == null) {
+            return null;
+        }
+        final Where where = collectionLayout.getHidden();
+        return where != null && where != Where.NOT_SPECIFIED  ? new HiddenFacetForCollectionLayoutXml(where, holder) : null;
+    }
+
+    private HiddenFacetForCollectionLayoutXml(final Where where, final FacetHolder holder) {
+        super(When.ALWAYS, where, holder);
+    }
+
+    @Override
+    public String hiddenReason(final ObjectAdapter targetAdapter, final Where whereContext) {
+        if(!where().includes(whereContext)) {
+            return null;
+        }
+        return "Hidden on " + where().getFriendlyName();
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/isis/blob/4a8ff11b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/collections/layout/NamedFacetForCollectionLayoutXml.java
----------------------------------------------------------------------
diff --git a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/collections/layout/NamedFacetForCollectionLayoutXml.java b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/collections/layout/NamedFacetForCollectionLayoutXml.java
new file mode 100644
index 0000000..e9828d7
--- /dev/null
+++ b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/collections/layout/NamedFacetForCollectionLayoutXml.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.core.metamodel.facets.collections.layout;
+
+import com.google.common.base.Strings;
+
+import org.apache.isis.applib.layout.v1_0.CollectionLayout;
+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;
+
+public class NamedFacetForCollectionLayoutXml extends NamedFacetAbstract {
+
+    public static NamedFacet create(CollectionLayout collectionLayout, FacetHolder holder) {
+        if(collectionLayout == null) {
+            return null;
+        }
+        final String named = Strings.emptyToNull(collectionLayout.getNamed());
+        final Boolean escaped = collectionLayout.getNamedEscaped();
+        return named != null ? new NamedFacetForCollectionLayoutXml(named, escaped == null || escaped, holder) : null;
+    }
+
+    private NamedFacetForCollectionLayoutXml(
+        final String value,
+        final boolean escaped,
+        final FacetHolder holder) {
+
+        super(value, escaped, holder);
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/isis/blob/4a8ff11b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/collections/layout/PagedFacetForCollectionLayoutXml.java
----------------------------------------------------------------------
diff --git a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/collections/layout/PagedFacetForCollectionLayoutXml.java b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/collections/layout/PagedFacetForCollectionLayoutXml.java
new file mode 100644
index 0000000..f14abb1
--- /dev/null
+++ b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/collections/layout/PagedFacetForCollectionLayoutXml.java
@@ -0,0 +1,41 @@
+/*
+ *  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.facets.collections.layout;
+
+import org.apache.isis.applib.layout.v1_0.CollectionLayout;
+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;
+
+public class PagedFacetForCollectionLayoutXml extends PagedFacetAbstract {
+
+    public static PagedFacet create(CollectionLayout collectionLayout, FacetHolder holder) {
+        if(collectionLayout == null) {
+            return null;
+        }
+        final Integer paged = collectionLayout.getPaged();
+        return paged != null && paged != -1 ? new PagedFacetForCollectionLayoutXml(paged, holder) : null;
+    }
+
+    private PagedFacetForCollectionLayoutXml(int paged, FacetHolder holder) {
+        super(paged, holder);
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/isis/blob/4a8ff11b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/collections/layout/SortedByFacetForCollectionLayoutXml.java
----------------------------------------------------------------------
diff --git a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/collections/layout/SortedByFacetForCollectionLayoutXml.java b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/collections/layout/SortedByFacetForCollectionLayoutXml.java
new file mode 100644
index 0000000..2030e45
--- /dev/null
+++ b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/collections/layout/SortedByFacetForCollectionLayoutXml.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.core.metamodel.facets.collections.layout;
+
+import java.util.Comparator;
+
+import org.apache.isis.applib.layout.v1_0.CollectionLayout;
+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;
+import org.apache.isis.core.metamodel.facets.collections.sortedby.SortedByFacetAbstract;
+
+public class SortedByFacetForCollectionLayoutXml extends SortedByFacetAbstract {
+
+    public static SortedByFacet create(CollectionLayout collectionLayout, FacetHolder holder) {
+        if(collectionLayout == null) {
+            return null;
+        }
+        final String sortedBy = collectionLayout.getSortedBy();
+        if (sortedBy == null) {
+            return null;
+        }
+        final Class sortedByClass = ClassUtil.forName(sortedBy);
+        if(sortedByClass == Comparator.class) {
+            return null;
+        }
+
+        return sortedByClass != null ? new SortedByFacetForCollectionLayoutXml(sortedByClass, holder) : null;
+    }
+
+    private SortedByFacetForCollectionLayoutXml(Class<? extends Comparator<?>> sortedBy, FacetHolder holder) {
+        super(sortedBy, holder);
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/isis/blob/4a8ff11b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/members/order/annotprop/MemberOrderFacetXml.java
----------------------------------------------------------------------
diff --git a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/members/order/annotprop/MemberOrderFacetXml.java b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/members/order/annotprop/MemberOrderFacetXml.java
new file mode 100644
index 0000000..7830d32
--- /dev/null
+++ b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/members/order/annotprop/MemberOrderFacetXml.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.core.metamodel.facets.members.order.annotprop;
+
+import org.apache.isis.applib.services.i18n.TranslationService;
+import org.apache.isis.core.metamodel.facetapi.FacetHolder;
+import org.apache.isis.core.metamodel.facets.members.order.MemberOrderFacetAbstract;
+
+public class MemberOrderFacetXml extends MemberOrderFacetAbstract {
+
+    public MemberOrderFacetXml(
+            final String name,
+            final String sequence,
+            final TranslationService translationService, final FacetHolder holder) {
+        super(name, sequence, translationService, holder);
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/isis/blob/4a8ff11b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/object/layoutxml/LayoutXmlFacetDefault.java
----------------------------------------------------------------------
diff --git a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/object/layoutxml/LayoutXmlFacetDefault.java b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/object/layoutxml/LayoutXmlFacetDefault.java
index bbd2281..e0b81d6 100644
--- a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/object/layoutxml/LayoutXmlFacetDefault.java
+++ b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/object/layoutxml/LayoutXmlFacetDefault.java
@@ -20,14 +20,52 @@ package org.apache.isis.core.metamodel.facets.object.layoutxml;
 
 import java.util.List;
 import java.util.Map;
+import java.util.concurrent.atomic.AtomicReference;
+
+import com.google.common.collect.Iterables;
+import com.google.common.collect.Lists;
+import com.google.common.collect.Maps;
 
 import org.apache.isis.applib.layout.v1_0.Action;
+import org.apache.isis.applib.layout.v1_0.ActionHolder;
+import org.apache.isis.applib.layout.v1_0.ActionLayout;
 import org.apache.isis.applib.layout.v1_0.Collection;
+import org.apache.isis.applib.layout.v1_0.CollectionLayout;
+import org.apache.isis.applib.layout.v1_0.Column;
 import org.apache.isis.applib.layout.v1_0.DomainObject;
 import org.apache.isis.applib.layout.v1_0.Property;
+import org.apache.isis.applib.layout.v1_0.PropertyGroup;
+import org.apache.isis.applib.layout.v1_0.PropertyLayout;
+import org.apache.isis.applib.layout.v1_0.Tab;
+import org.apache.isis.applib.layout.v1_0.TabGroup;
+import org.apache.isis.applib.services.i18n.TranslationService;
 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.facetapi.FacetUtil;
+import org.apache.isis.core.metamodel.facets.actions.layout.ActionPositionFacetForActionLayoutXml;
+import org.apache.isis.core.metamodel.facets.actions.layout.BookmarkPolicyFacetForActionLayoutXml;
+import org.apache.isis.core.metamodel.facets.actions.layout.CssClassFaFacetForActionLayoutXml;
+import org.apache.isis.core.metamodel.facets.actions.layout.CssClassFacetForActionLayoutXml;
+import org.apache.isis.core.metamodel.facets.actions.layout.DescribedAsFacetForActionLayoutXml;
+import org.apache.isis.core.metamodel.facets.actions.layout.HiddenFacetForActionLayoutXml;
+import org.apache.isis.core.metamodel.facets.actions.layout.NamedFacetForActionLayoutXml;
+import org.apache.isis.core.metamodel.facets.collections.layout.CssClassFacetForCollectionLayoutXml;
+import org.apache.isis.core.metamodel.facets.collections.layout.DefaultViewFacetForCollectionLayoutXml;
+import org.apache.isis.core.metamodel.facets.collections.layout.DescribedAsFacetForCollectionLayoutXml;
+import org.apache.isis.core.metamodel.facets.collections.layout.HiddenFacetForCollectionLayoutXml;
+import org.apache.isis.core.metamodel.facets.collections.layout.NamedFacetForCollectionLayoutXml;
+import org.apache.isis.core.metamodel.facets.collections.layout.PagedFacetForCollectionLayoutXml;
+import org.apache.isis.core.metamodel.facets.collections.layout.SortedByFacetForCollectionLayoutXml;
+import org.apache.isis.core.metamodel.facets.members.order.annotprop.MemberOrderFacetXml;
+import org.apache.isis.core.metamodel.facets.properties.propertylayout.CssClassFacetForPropertyLayoutXml;
+import org.apache.isis.core.metamodel.facets.properties.propertylayout.DescribedAsFacetForPropertyLayoutXml;
+import org.apache.isis.core.metamodel.facets.properties.propertylayout.HiddenFacetForPropertyLayoutXml;
+import org.apache.isis.core.metamodel.facets.properties.propertylayout.LabelAtFacetForPropertyLayoutXml;
+import org.apache.isis.core.metamodel.facets.properties.propertylayout.MultiLineFacetForPropertyLayoutXml;
+import org.apache.isis.core.metamodel.facets.properties.propertylayout.NamedFacetForPropertyLayoutXml;
+import org.apache.isis.core.metamodel.facets.properties.propertylayout.RenderedAdjustedFacetForPropertyLayoutXml;
+import org.apache.isis.core.metamodel.facets.properties.propertylayout.TypicalLengthFacetForPropertyLayoutXml;
 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;
@@ -41,6 +79,7 @@ public class LayoutXmlFacetDefault
             implements LayoutXmlFacet {
 
     private final DomainObject metadata;
+    private final TranslationService translationService;
 
     public static Class<? extends Facet> type() {
         return LayoutXmlFacet.class;
@@ -49,80 +88,255 @@ public class LayoutXmlFacetDefault
 
     public static LayoutXmlFacet create(
             final FacetHolder facetHolder,
-            final DomainObject domainObject) {
+            final DomainObject domainObject,
+            final TranslationService translationService) {
         if(domainObject == null) {
             return null;
         }
-        return new LayoutXmlFacetDefault(facetHolder, domainObject);
+        return new LayoutXmlFacetDefault(facetHolder, domainObject, translationService);
     }
 
     private LayoutXmlFacetDefault(
             final FacetHolder facetHolder,
-            final DomainObject metadata) {
+            final DomainObject metadata,
+            final TranslationService translationService) {
         super(LayoutXmlFacetDefault.type(), facetHolder, Derivation.NOT_DERIVED);
         this.metadata = metadata;
+        this.translationService = translationService;
     }
 
 
-    private boolean fleshedOut;
+    private boolean derivedAndSynced;
 
     public DomainObject getLayoutMetadata() {
-        return fleshedOut? metadata : fleshOut(metadata);
+        //return derivedAndSynced ? metadata : deriveAndSync(metadata);
+        return deriveAndSync(metadata);
     }
 
-    private  DomainObject fleshOut(final DomainObject metadata) {
+    private  DomainObject deriveAndSync(final DomainObject metadata) {
         synchronized (metadata) {
-            doFleshOut(metadata);
-            fleshedOut = true;
+            doDeriveAndSync(metadata);
+            derivedAndSynced = true;
         }
         return metadata;
     }
 
-    private void doFleshOut(final DomainObject metadata) {
-        ObjectSpecification objectSpec = (ObjectSpecification) getFacetHolder();
+    private void doDeriveAndSync(final DomainObject metadata) {
+
+        final ObjectSpecification objectSpec = (ObjectSpecification) getFacetHolder();
+        final Map<String, OneToOneAssociation> oneToOneAssociationById =
+                ObjectMember.Util.mapById(getOneToOneAssociations(objectSpec));
+        final Map<String, OneToManyAssociation> oneToManyAssociationById =
+                ObjectMember.Util.mapById(getOneToManyAssociations(objectSpec));
+        final Map<String, ObjectAction> objectActionById =
+                ObjectMember.Util.mapById(objectSpec.getObjectActions(Contributed.INCLUDED));
 
-        final List<OneToOneAssociation> oneToOneAssociations = getOneToOneAssociations(objectSpec);
-        final Map<String, OneToOneAssociation> oneToOneAssociationById = ObjectMember.Util.mapById(oneToOneAssociations);
+        derive(metadata, oneToOneAssociationById, oneToManyAssociationById, objectActionById);
 
-        final List<OneToManyAssociation> oneToManyAssociations = getOneToManyAssociations(objectSpec);
-        final Map<String, OneToManyAssociation> oneToManyAssociationById = ObjectMember.Util.mapById(oneToManyAssociations);
+        sync(metadata, oneToOneAssociationById, oneToManyAssociationById, objectActionById);
+    }
 
-        final List<ObjectAction> objectActions = objectSpec.getObjectActions(Contributed.INCLUDED);
-        final Map<String, ObjectAction> objectActionById = ObjectMember.Util.mapById(objectActions);
+    private void derive(
+            final DomainObject metadata,
+            final Map<String, OneToOneAssociation> oneToOneAssociationById,
+            final Map<String, OneToManyAssociation> oneToManyAssociationById,
+            final Map<String, ObjectAction> objectActionById) {
+        final List<String> propertyIds = Lists.newArrayList();
+        final List<String> collectionIds = Lists.newArrayList();
+        final List<String> actionIds = Lists.newArrayList();
+        final AtomicReference<PropertyGroup> generalPropertyGroupRef = new AtomicReference<>();
+        final AtomicReference<Column> firstColumnRef = new AtomicReference<>();
+        final AtomicReference<TabGroup> lastTabGroupRef = new AtomicReference<>();
 
-        metadata.traverse(new DomainObject.VisitorAdapter() {
+        metadata.visit(new DomainObject.VisitorAdapter() {
             @Override
             public void visit(final Property property) {
-                oneToOneAssociationById.remove(property.getId());
+                propertyIds.add(property.getId());
             }
             @Override
             public void visit(final Collection collection) {
-                oneToManyAssociationById.remove(collection.getId());
+                collectionIds.add(collection.getId());
+            }
+            @Override
+            public void visit(final Action action, final ActionHolder holder) {
+                actionIds.add(action.getId());
+            }
+            @Override
+            public void visit(final Column column) {
+                firstColumnRef.compareAndSet(null, column);
             }
             @Override
-            public void visit(final Action action) {
-                objectActionById.remove(action.getId());
+            public void visit(final PropertyGroup propertyGroup) {
+                if(propertyGroup.getName().equals("General")) {
+                    generalPropertyGroupRef.compareAndSet(null, propertyGroup);
+                }
+            }
+            @Override
+            public void visit(final TabGroup tabGroup) {
+                lastTabGroupRef.set(tabGroup);
             }
         });
 
-        if(!oneToOneAssociationById.isEmpty()) {
+        // any missing properties will be added to the (first) 'General' property group found
+        // if there is no 'General' property group then one will be added to the first Column of the first Tab.
+        final List<String> missingPropertyIds = Lists.newArrayList(oneToOneAssociationById.keySet());
+        missingPropertyIds.removeAll(propertyIds);
 
+        if(!missingPropertyIds.isEmpty()) {
+            // ensure that there is a property group to use
+            boolean wasSet = generalPropertyGroupRef.compareAndSet(null, new PropertyGroup("General"));
+            final PropertyGroup generalPropertyGroup = generalPropertyGroupRef.get();
+            if(wasSet) {
+                firstColumnRef.get().getContent().add(generalPropertyGroup);
+            }
+            Iterables.removeAll(propertyIds, oneToOneAssociationById.keySet());
+            for (final String propertyId : missingPropertyIds) {
+                generalPropertyGroup.getProperties().add(new Property(propertyId));
+            }
         }
-        if(!oneToManyAssociationById.isEmpty()) {
 
+        // 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 List<String> missingCollectionIds = Lists.newArrayList(oneToManyAssociationById.keySet());
+        missingCollectionIds.removeAll(collectionIds);
+
+        if(!missingCollectionIds.isEmpty()) {
+            while(metadata.getTabGroups().size() < 2) {
+                final TabGroup tabGroup = new TabGroup();
+                metadata.getTabGroups().add(tabGroup);
+                lastTabGroupRef.set(tabGroup);
+            }
+            final TabGroup lastTabGroup = lastTabGroupRef.get();
+            for (final String collectionId : missingCollectionIds) {
+                final Tab tab = new Tab();
+                lastTabGroup.getTabs().add(tab);
+                Column left = new Column(12);
+                tab.setLeft(left);
+                left.getContent().add(new Collection(collectionId));
+            }
         }
-        if(!objectActionById.isEmpty()) {
 
+        // any missing actions will be added as domain object actions (in the header)
+        final List<String> missingActionIds = Lists.newArrayList(objectActionById.keySet());
+        missingActionIds.removeAll(actionIds);
+
+        if(!missingActionIds.isEmpty()) {
+            for (String actionId : missingActionIds) {
+                metadata.getActions().add(new Action(actionId));
+            }
         }
     }
 
+    private void sync(
+            final DomainObject metadata,
+            final Map<String, OneToOneAssociation> oneToOneAssociationById,
+            final Map<String, OneToManyAssociation> oneToManyAssociationById,
+            final Map<String, ObjectAction> objectActionById) {
+
+        metadata.visit(new DomainObject.VisitorAdapter() {
+            private int domainObjectSequence = 1;
+            private int propertyGroupSequence = 1;
+            private int propertySequence = 1;
+            private int collectionSequence = 1;
+            private Map<Action, ActionHolder> actionHolderByAction = Maps.newHashMap();
+            @Override
+            public void visit(final Action action, final ActionHolder actionHolder) {
+                actionHolderByAction.put(action, actionHolder);
+                final ObjectAction objectAction = objectActionById.get(action.getId());
+                final String memberOrderName;
+                final int memberOrderSequence;
+                if(actionHolder instanceof PropertyGroup) {
+                    final PropertyGroup propertyGroup = (PropertyGroup) actionHolder;
+                    final List<Property> properties = propertyGroup.getProperties();
+                    final Property property = properties.get(0); // any will do
+                    memberOrderName = property.getId();
+                    memberOrderSequence = propertyGroupSequence++;
+                } else if(actionHolder instanceof Property) {
+                    final Property property = (Property) actionHolder;
+                    memberOrderName = property.getId();
+                    memberOrderSequence = propertySequence++;
+                } else if(actionHolder instanceof Collection) {
+                    final Collection collection = (Collection) actionHolder;
+                    memberOrderName = collection.getId();
+                    memberOrderSequence = collectionSequence++;
+                } else {
+                    // DomainObject
+                    memberOrderName = null;
+                    memberOrderSequence = domainObjectSequence++;
+                }
+                FacetUtil.addFacet(
+                    new MemberOrderFacetXml(memberOrderName, ""+memberOrderSequence, translationService, objectAction));
+            }
+            @Override
+            public void visit(final ActionLayout actionLayout, final Action action) {
+                final ObjectAction objectAction = objectActionById.get(action.getId());
+                final ActionHolder actionHolder = actionHolderByAction.get(action);
+
+                final ActionLayout actionLayoutForPosition;
+                if(actionHolder instanceof PropertyGroup) {
+                    // ensure that there is a non-null valid ActionLayout#position()
+                    actionLayoutForPosition = actionLayout != null ? actionLayout : new ActionLayout();
+                    if(     actionLayoutForPosition.getPosition() == null ||
+                            actionLayoutForPosition.getPosition() == org.apache.isis.applib.annotation.ActionLayout.Position.BELOW ||
+                            actionLayoutForPosition.getPosition() == org.apache.isis.applib.annotation.ActionLayout.Position.RIGHT) {
+                        actionLayoutForPosition.setPosition(org.apache.isis.applib.annotation.ActionLayout.Position.PANEL);
+                    }
+                } else if(actionHolder instanceof Property) {
+                    // ensure that there is a non-null valid ActionLayout#position()
+                    actionLayoutForPosition = actionLayout != null ? actionLayout : new ActionLayout();
+                    if(     actionLayoutForPosition.getPosition() == null ||
+                            actionLayoutForPosition.getPosition() == org.apache.isis.applib.annotation.ActionLayout.Position.PANEL_DROPDOWN ||
+                            actionLayoutForPosition.getPosition() == org.apache.isis.applib.annotation.ActionLayout.Position.PANEL) {
+                        actionLayoutForPosition.setPosition(org.apache.isis.applib.annotation.ActionLayout.Position.BELOW);
+                    }
+                } else {
+                    // doesn't do anything for DomainObject or Collection
+                    actionLayoutForPosition = null;
+                }
+                FacetUtil.addFacet(ActionPositionFacetForActionLayoutXml.create(actionLayoutForPosition, objectAction));
+
+                FacetUtil.addFacet(BookmarkPolicyFacetForActionLayoutXml.create(actionLayout, objectAction));
+                FacetUtil.addFacet(CssClassFacetForActionLayoutXml.create(actionLayout, objectAction));
+                FacetUtil.addFacet(CssClassFaFacetForActionLayoutXml.create(actionLayout, objectAction));
+                FacetUtil.addFacet(DescribedAsFacetForActionLayoutXml.create(actionLayout, objectAction));
+                FacetUtil.addFacet(HiddenFacetForActionLayoutXml.create(actionLayout, objectAction));
+                FacetUtil.addFacet(NamedFacetForActionLayoutXml.create(actionLayout, objectAction));
+            }
+            @Override
+            public void visit(final PropertyLayout propertyLayout, final Property property) {
+                final OneToOneAssociation oneToOneAssociation = oneToOneAssociationById.get(property.getId());
+                FacetUtil.addFacet(CssClassFacetForPropertyLayoutXml.create(propertyLayout, oneToOneAssociation));
+                FacetUtil.addFacet(DescribedAsFacetForPropertyLayoutXml.create(propertyLayout, oneToOneAssociation));
+                FacetUtil.addFacet(HiddenFacetForPropertyLayoutXml.create(propertyLayout, oneToOneAssociation));
+                FacetUtil.addFacet(LabelAtFacetForPropertyLayoutXml.create(propertyLayout, oneToOneAssociation));
+                FacetUtil.addFacet(MultiLineFacetForPropertyLayoutXml.create(propertyLayout, oneToOneAssociation));
+                FacetUtil.addFacet(NamedFacetForPropertyLayoutXml.create(propertyLayout, oneToOneAssociation));
+                FacetUtil.addFacet(RenderedAdjustedFacetForPropertyLayoutXml.create(propertyLayout, oneToOneAssociation));
+                FacetUtil.addFacet(TypicalLengthFacetForPropertyLayoutXml.create(propertyLayout, oneToOneAssociation));
+            }
+            @Override
+            public void visit(final CollectionLayout collectionLayout, final Collection collection) {
+                final OneToManyAssociation oneToManyAssociation = oneToManyAssociationById.get(collection.getId());
+                FacetUtil.addFacet(CssClassFacetForCollectionLayoutXml.create(collectionLayout, oneToManyAssociation));
+                FacetUtil.addFacet(DefaultViewFacetForCollectionLayoutXml.create(collectionLayout, oneToManyAssociation));
+                FacetUtil.addFacet(DescribedAsFacetForCollectionLayoutXml.create(collectionLayout, oneToManyAssociation));
+                FacetUtil.addFacet(HiddenFacetForCollectionLayoutXml.create(collectionLayout, oneToManyAssociation));
+                FacetUtil.addFacet(NamedFacetForCollectionLayoutXml.create(collectionLayout, oneToManyAssociation));
+                FacetUtil.addFacet(PagedFacetForCollectionLayoutXml.create(collectionLayout, oneToManyAssociation));
+                FacetUtil.addFacet(SortedByFacetForCollectionLayoutXml.create(collectionLayout, oneToManyAssociation));
+            }
+        });
+
+    }
 
-    private List getOneToOneAssociations(final ObjectSpecification objectSpec) {
-        return objectSpec
+    private List<OneToOneAssociation> getOneToOneAssociations(final ObjectSpecification objectSpec) {
+        List associations = objectSpec
                 .getAssociations(Contributed.INCLUDED, ObjectAssociation.Filters.PROPERTIES);
+        return associations;
     }
-    private List getOneToManyAssociations(final ObjectSpecification objectSpec) {
-        return objectSpec
+    private List<OneToManyAssociation> getOneToManyAssociations(final ObjectSpecification objectSpec) {
+        List associations = objectSpec
                 .getAssociations(Contributed.INCLUDED, ObjectAssociation.Filters.COLLECTIONS);
+        return associations;
     }
 }

http://git-wip-us.apache.org/repos/asf/isis/blob/4a8ff11b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/object/layoutxml/LayoutXmlFacetFactory.java
----------------------------------------------------------------------
diff --git a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/object/layoutxml/LayoutXmlFacetFactory.java b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/object/layoutxml/LayoutXmlFacetFactory.java
index 17d4063..606f34a 100644
--- a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/object/layoutxml/LayoutXmlFacetFactory.java
+++ b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/object/layoutxml/LayoutXmlFacetFactory.java
@@ -24,6 +24,7 @@ import com.google.common.collect.Sets;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
+import org.apache.isis.applib.services.i18n.TranslationService;
 import org.apache.isis.applib.services.jaxb.JaxbService;
 import org.apache.isis.core.commons.lang.ClassExtensions;
 import org.apache.isis.core.metamodel.facetapi.FacetHolder;
@@ -47,7 +48,8 @@ public class LayoutXmlFacetFactory extends FacetFactoryAbstract implements Servi
         final Class<?> cls = processClassContext.getCls();
         final FacetHolder facetHolder = processClassContext.getFacetHolder();
 
-        FacetUtil.addFacet(LayoutXmlFacetDefault.create(facetHolder, readMetadata(cls)));
+        final TranslationService translationService = servicesInjector.lookupService(TranslationService.class);
+        FacetUtil.addFacet(LayoutXmlFacetDefault.create(facetHolder, readMetadata(cls), translationService));
     }
 
     private final Set<Class<?>> blacklisted = Sets.newConcurrentHashSet();

http://git-wip-us.apache.org/repos/asf/isis/blob/4a8ff11b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/properties/propertylayout/CssClassFacetForPropertyLayoutXml.java
----------------------------------------------------------------------
diff --git a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/properties/propertylayout/CssClassFacetForPropertyLayoutXml.java b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/properties/propertylayout/CssClassFacetForPropertyLayoutXml.java
new file mode 100644
index 0000000..fb9bdb8
--- /dev/null
+++ b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/properties/propertylayout/CssClassFacetForPropertyLayoutXml.java
@@ -0,0 +1,43 @@
+/*
+ *  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.facets.properties.propertylayout;
+
+import com.google.common.base.Strings;
+
+import org.apache.isis.applib.layout.v1_0.PropertyLayout;
+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;
+
+public class CssClassFacetForPropertyLayoutXml extends CssClassFacetAbstract {
+
+    public static CssClassFacet create(PropertyLayout propertyLayout, FacetHolder holder) {
+        if(propertyLayout == null) {
+            return null;
+        }
+        final String cssClass = Strings.emptyToNull(propertyLayout.getCssClass());
+        return cssClass != null ? new CssClassFacetForPropertyLayoutXml(cssClass, holder) : null;
+    }
+
+    private CssClassFacetForPropertyLayoutXml(String value, FacetHolder holder) {
+        super(value, holder);
+    }
+
+}


[44/50] [abbrv] isis git commit: ISIS-993: simplifying the metadata. the wicket components still broken at this point

Posted by da...@apache.org.
http://git-wip-us.apache.org/repos/asf/isis/blob/79248dc5/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 bb468a5..2abd6be 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
@@ -8,11 +8,10 @@
             <left span="4">
                 <propertyGroup name="General">
                     <actions/>
-                    <property id="name">
+                    <property id="name" labelPosition="TOP">
                         <actions>
                             <action id="updateName"/>
                         </actions>
-                        <layout/>
                     </property>
                 </propertyGroup>
             </left>
@@ -23,10 +22,7 @@
                     <actions>
                         <action id="downloadJdoMetadata"/>
                     </actions>
-                    <property id="versionSequence">
-                        <actions/>
-                        <layout labelPosition="TOP" multiLine="5" cssClass="abcde"/>
-                    </property>
+                    <property id="versionSequence"/>
                 </propertyGroup>
             </left>
         </tab>
@@ -34,10 +30,7 @@
     <tabGroup>
         <tab name="Similar To">
             <left span="12">
-                <collection id="similarTo">
-                    <actions/>
-                    <layout/>
-                </collection>
+                <collection id="similarTo"/>
             </left>
         </tab>
     </tabGroup>


[25/50] [abbrv] isis git commit: ISIS-993: started working on adding a fixed column to right hand side

Posted by da...@apache.org.
ISIS-993: started working on adding a fixed column to right hand side


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

Branch: refs/heads/ISIS-993
Commit: ea02966b01fa8dd0a1548932cad7ac1ea7911e80
Parents: f80f273
Author: Dan Haywood <da...@haywood-associates.co.uk>
Authored: Fri Jan 8 18:48:16 2016 +0000
Committer: Dan Haywood <da...@haywood-associates.co.uk>
Committed: Mon Jan 25 14:38:24 2016 +0000

----------------------------------------------------------------------
 .../apache/isis/applib/layout/v1_0/Column.java  |  6 ++---
 .../isis/applib/layout/v1_0/ColumnHolder.java   | 23 ++++++++++++++++++++
 .../org/apache/isis/applib/layout/v1_0/Tab.java |  2 +-
 .../isis/applib/layout/v1_0/TabGroup.java       | 13 ++++++++++-
 .../ObjectLayoutMetadataServiceDefault.java     | 12 ++++++----
 .../metamodel/spec/ObjectSpecifications.java    |  6 ++---
 .../viewer/wicket/model/models/EntityModel.java |  1 -
 .../collections/EntityCollectionsPanel.java     |  4 +++-
 .../entity/properties/EntityPropertiesForm.java | 17 ++++++---------
 .../EntityTabGroupsPanel$EntityTabPanel.html    |  1 -
 .../entity/tabgroups/EntityTabGroupsPanel.html  |  7 ++++--
 .../entity/tabgroups/EntityTabGroupsPanel.java  |  2 ++
 12 files changed, 67 insertions(+), 27 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/isis/blob/ea02966b/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/Column.java
----------------------------------------------------------------------
diff --git a/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/Column.java b/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/Column.java
index 1f5ca23..f208a7f 100644
--- a/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/Column.java
+++ b/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/Column.java
@@ -84,7 +84,7 @@ public class Column implements Serializable {
     }
 
 
-    private Tab owner;
+    private ColumnHolder owner;
     /**
      * Owner.
      *
@@ -93,11 +93,11 @@ public class Column implements Serializable {
      * </p>
      */
     @XmlTransient
-    public Tab getOwner() {
+    public ColumnHolder getOwner() {
         return owner;
     }
 
-    public void setOwner(final Tab owner) {
+    public void setOwner(final ColumnHolder owner) {
         this.owner = owner;
     }
 

http://git-wip-us.apache.org/repos/asf/isis/blob/ea02966b/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/ColumnHolder.java
----------------------------------------------------------------------
diff --git a/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/ColumnHolder.java b/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/ColumnHolder.java
new file mode 100644
index 0000000..8211750
--- /dev/null
+++ b/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/ColumnHolder.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.v1_0;
+
+public interface ColumnHolder {
+
+}

http://git-wip-us.apache.org/repos/asf/isis/blob/ea02966b/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/Tab.java
----------------------------------------------------------------------
diff --git a/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/Tab.java b/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/Tab.java
index 04d2542..4f0a5c3 100644
--- a/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/Tab.java
+++ b/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/Tab.java
@@ -40,7 +40,7 @@ import org.apache.isis.applib.annotation.Programmatic;
                 , "right"
         }
 )
-public class Tab implements Serializable {
+public class Tab implements ColumnHolder, Serializable {
 
     private static final long serialVersionUID = 1L;
 

http://git-wip-us.apache.org/repos/asf/isis/blob/ea02966b/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/TabGroup.java
----------------------------------------------------------------------
diff --git a/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/TabGroup.java b/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/TabGroup.java
index 7547d5e..6fb93ee 100644
--- a/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/TabGroup.java
+++ b/core/applib/src/main/java/org/apache/isis/applib/layout/v1_0/TabGroup.java
@@ -30,7 +30,7 @@ import com.google.common.base.Predicate;
 import com.google.common.collect.FluentIterable;
 
 @XmlType()
-public class TabGroup implements Serializable {
+public class TabGroup implements ColumnHolder, Serializable {
 
     private static final long serialVersionUID = 1L;
 
@@ -53,6 +53,17 @@ public class TabGroup implements Serializable {
 
 
 
+    private Column fixed;
+
+    @XmlElement(required = false)
+    public Column getFixed() {
+        return fixed;
+    }
+
+    public void setFixed(final Column fixed) {
+        this.fixed = fixed;
+    }
+
     private ObjectLayoutMetadata owner;
 
     /**

http://git-wip-us.apache.org/repos/asf/isis/blob/ea02966b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/services/layout/ObjectLayoutMetadataServiceDefault.java
----------------------------------------------------------------------
diff --git a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/services/layout/ObjectLayoutMetadataServiceDefault.java b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/services/layout/ObjectLayoutMetadataServiceDefault.java
index 972999d..e2a2e1d 100644
--- a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/services/layout/ObjectLayoutMetadataServiceDefault.java
+++ b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/services/layout/ObjectLayoutMetadataServiceDefault.java
@@ -42,6 +42,7 @@ import org.apache.isis.applib.layout.v1_0.ActionHolder;
 import org.apache.isis.applib.layout.v1_0.ActionLayoutMetadata;
 import org.apache.isis.applib.layout.v1_0.CollectionLayoutMetadata;
 import org.apache.isis.applib.layout.v1_0.Column;
+import org.apache.isis.applib.layout.v1_0.ColumnHolder;
 import org.apache.isis.applib.layout.v1_0.ObjectLayoutMetadata;
 import org.apache.isis.applib.layout.v1_0.PropertyGroup;
 import org.apache.isis.applib.layout.v1_0.PropertyLayoutMetadata;
@@ -407,10 +408,13 @@ public class ObjectLayoutMetadataServiceDefault
 
                 // if there is only a single column and no other contents, then copy the collection Id onto the tab'
                 final Column column = collectionLayoutMetadata.getOwner();
-                final Tab tab = column.getOwner();
-                if(tab.getContents().size() == 1) {
-                    final String collectionName = oneToManyAssociation.getName();
-                    tab.setName(collectionName);
+                final ColumnHolder holder = column.getOwner();
+                if(holder instanceof Tab) {
+                    final Tab tab = (Tab) holder;
+                    if(tab.getContents().size() == 1) {
+                        final String collectionName = oneToManyAssociation.getName();
+                        tab.setName(collectionName);
+                    }
                 }
             }
 

http://git-wip-us.apache.org/repos/asf/isis/blob/ea02966b/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 7fee60b..2c24f0d 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
@@ -59,7 +59,7 @@ public final class ObjectSpecifications {
     public static List<String> orderByMemberGroups(
             final ObjectSpecification objSpec,
             final Set<String> groupNamesToOrder,
-            final MemberGroupLayoutHint memberGroupLayoutHint) {
+            final MemberGroupLayoutHint hint) {
 
         final MemberGroupLayoutFacet facet = objSpec.getFacet(MemberGroupLayoutFacet.class);
         final List<String> leftColumnGroupNames = Lists.newArrayList(groupNamesToOrder);
@@ -69,10 +69,10 @@ public final class ObjectSpecifications {
             return leftColumnGroupNames;
         }
         
-        if(memberGroupLayoutHint == MemberGroupLayoutHint.MIDDLE) {
+        if(hint == MemberGroupLayoutHint.MIDDLE) {
             return facet.getColumnSpans().getMiddle()>0? facet.getMiddle(): Collections.<String>emptyList();
         }
-        if(memberGroupLayoutHint == MemberGroupLayoutHint.RIGHT) {
+        if(hint == MemberGroupLayoutHint.RIGHT) {
             return facet.getColumnSpans().getRight()>0? facet.getRight(): Collections.<String>emptyList();
         }
         

http://git-wip-us.apache.org/repos/asf/isis/blob/ea02966b/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 9838163..53b6bd1 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
@@ -652,7 +652,6 @@ public class EntityModel extends BookmarkableModel<ObjectAdapter> {
 
     public EntityModel withColumnMetadata(final Column columnMetadata) {
         this.columnMetadata = columnMetadata;
-        this.tabMetadata = columnMetadata.getOwner();
         return this;
     }
 

http://git-wip-us.apache.org/repos/asf/isis/blob/ea02966b/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/collections/EntityCollectionsPanel.java
----------------------------------------------------------------------
diff --git a/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/collections/EntityCollectionsPanel.java b/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/collections/EntityCollectionsPanel.java
index 81b83c4..cf6f1d9 100644
--- a/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/collections/EntityCollectionsPanel.java
+++ b/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/collections/EntityCollectionsPanel.java
@@ -123,7 +123,9 @@ public class EntityCollectionsPanel extends PanelAbstract<EntityModel> {
             public int compare(final ObjectAssociation o1, final ObjectAssociation o2) {
                 final MemberOrderFacet o1Facet = o1.getFacet(MemberOrderFacet.class);
                 final MemberOrderFacet o2Facet = o2.getFacet(MemberOrderFacet.class);
-                return deweyOrderComparator.compare(o1Facet.sequence(), o2Facet.sequence());
+                return o1Facet == null? +1:
+                        o2Facet == null? -1:
+                        deweyOrderComparator.compare(o1Facet.sequence(), o2Facet.sequence());
             }
         });
 

http://git-wip-us.apache.org/repos/asf/isis/blob/ea02966b/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/properties/EntityPropertiesForm.java
----------------------------------------------------------------------
diff --git a/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/properties/EntityPropertiesForm.java b/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/properties/EntityPropertiesForm.java
index adc9262..3f2771d 100644
--- a/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/properties/EntityPropertiesForm.java
+++ b/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/properties/EntityPropertiesForm.java
@@ -242,9 +242,10 @@ public class EntityPropertiesForm extends FormAbstract<ObjectAdapter> implements
             final MarkupContainer col,
             final MemberGroupLayoutHint hint,
             final EntityModel entityModel,
-            final Tab tabMetaDataIfAny, final ColumnSpans columnSpans) {
-        final boolean addedProperties;
-        addedProperties = addPropertiesInColumn(col, hint, entityModel, tabMetaDataIfAny, columnSpans);
+            final Tab tabMetaDataIfAny,
+            final ColumnSpans columnSpans) {
+        final Column columnMetaDataIfAny = tabMetaDataIfAny != null ? hint.from(tabMetaDataIfAny) : null;
+        final boolean addedProperties = addPropertiesInColumn(col, hint, entityModel, columnSpans, columnMetaDataIfAny);
         addCollectionsIfRequired(col, hint, entityModel, tabMetaDataIfAny);
         return addedProperties;
     }
@@ -253,15 +254,11 @@ public class EntityPropertiesForm extends FormAbstract<ObjectAdapter> implements
             final MarkupContainer markupContainer,
             final MemberGroupLayoutHint hint,
             final EntityModel entityModel,
-            final Tab tabMetaDataIfAny,
-            final ColumnSpans columnSpans) {
+            final ColumnSpans columnSpans, final Column columnMetaDataIfAny) {
         final int span = hint.from(columnSpans);
-
         final ObjectAdapter adapter = entityModel.getObject();
         final ObjectSpecification objSpec = adapter.getSpecification();
 
-        final Column columnMetaDataIfAny = tabMetaDataIfAny != null ? hint.from(tabMetaDataIfAny) : null;
-
         final List<ObjectAssociation> properties = visibleProperties(adapter);
 
         final RepeatingView memberGroupRv = new RepeatingView(ID_MEMBER_GROUP);
@@ -269,7 +266,7 @@ public class EntityPropertiesForm extends FormAbstract<ObjectAdapter> implements
 
         final Map<String, List<ObjectAssociation>> associationsByGroup = ObjectAssociation.Util.groupByMemberOrderName(properties);
 
-        final List<String> groupNames = tabMetaDataIfAny != null
+        final List<String> groupNames = columnMetaDataIfAny != null
                 ? FluentIterable
                     .from(columnMetaDataIfAny.getPropertyGroups())
                     .transform(PropertyGroup.Util.nameOf())
@@ -312,7 +309,7 @@ public class EntityPropertiesForm extends FormAbstract<ObjectAdapter> implements
                     actionsPanelDropDown,
                     AdditionalLinksPanel.Style.DROPDOWN);
         }
-        
+
         addClassForSpan(markupContainer, span);
 
         return !groupNames.isEmpty();

http://git-wip-us.apache.org/repos/asf/isis/blob/ea02966b/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/tabgroups/EntityTabGroupsPanel$EntityTabPanel.html
----------------------------------------------------------------------
diff --git a/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/tabgroups/EntityTabGroupsPanel$EntityTabPanel.html b/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/tabgroups/EntityTabGroupsPanel$EntityTabPanel.html
index 94582b1..025253b 100644
--- a/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/tabgroups/EntityTabGroupsPanel$EntityTabPanel.html
+++ b/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/tabgroups/EntityTabGroupsPanel$EntityTabPanel.html
@@ -22,7 +22,6 @@
 <wicket:panel>
 	<div class="tabPanel">
         <div wicket:id="entityPropertiesAndCollections"></div>
-
 	</div>
 </wicket:panel>
 </body>

http://git-wip-us.apache.org/repos/asf/isis/blob/ea02966b/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/tabgroups/EntityTabGroupsPanel.html
----------------------------------------------------------------------
diff --git a/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/tabgroups/EntityTabGroupsPanel.html b/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/tabgroups/EntityTabGroupsPanel.html
index ebe6c63..fded796 100644
--- a/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/tabgroups/EntityTabGroupsPanel.html
+++ b/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/tabgroups/EntityTabGroupsPanel.html
@@ -24,9 +24,12 @@
 		<div wicket:id="entitySummary"></div>
 
         <div wicket:id="tabGroups">
-            <div wicket:id="tabGroup">[tabbed panel will be here]</div>
+            <div class="row">
+                <div wicket:id="tabGroup" class="col-xs-8">[tabbed panel will be here]</div>
+                <div XXXXwicket:id="collections" class = "fixedColumn col-xs-4">
+                </div>
+            </div>
         </div>
-
 	</div>
 </wicket:panel>
 </body>

http://git-wip-us.apache.org/repos/asf/isis/blob/ea02966b/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/tabgroups/EntityTabGroupsPanel.java
----------------------------------------------------------------------
diff --git a/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/tabgroups/EntityTabGroupsPanel.java b/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/tabgroups/EntityTabGroupsPanel.java
index fec95d0..2667d05 100644
--- a/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/tabgroups/EntityTabGroupsPanel.java
+++ b/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/tabgroups/EntityTabGroupsPanel.java
@@ -112,6 +112,8 @@ public class EntityTabGroupsPanel extends PanelAbstract<EntityModel> {
             }
         };
         add(tabGroupsList);
+
+        
     }
 
     private static class EntityTabPanel extends PanelAbstract {


[18/50] [abbrv] isis git commit: ISIS-1287: fixing bad link to cgcom in all guides

Posted by da...@apache.org.
ISIS-1287: fixing bad link to cgcom in all guides


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

Branch: refs/heads/ISIS-993
Commit: c229efeaee3f5c6a46a9d235ad22955fdcd5da53
Parents: 3887fb2
Author: Dan Haywood <da...@haywood-associates.co.uk>
Authored: Sun Jan 24 13:10:44 2016 +0000
Committer: Dan Haywood <da...@haywood-associates.co.uk>
Committed: Sun Jan 24 13:10:44 2016 +0000

----------------------------------------------------------------------
 adocs/documentation/src/main/asciidoc/guides/cgcom.adoc | 2 +-
 adocs/documentation/src/main/asciidoc/guides/cgcon.adoc | 2 +-
 adocs/documentation/src/main/asciidoc/guides/rgant.adoc | 2 +-
 adocs/documentation/src/main/asciidoc/guides/rgcfg.adoc | 2 +-
 adocs/documentation/src/main/asciidoc/guides/rgcms.adoc | 2 +-
 adocs/documentation/src/main/asciidoc/guides/rgsvc.adoc | 2 +-
 adocs/documentation/src/main/asciidoc/guides/ug.adoc    | 2 +-
 adocs/documentation/src/main/asciidoc/guides/ugbtb.adoc | 2 +-
 adocs/documentation/src/main/asciidoc/guides/ugfun.adoc | 2 +-
 adocs/documentation/src/main/asciidoc/guides/ugsec.adoc | 2 +-
 adocs/documentation/src/main/asciidoc/guides/ugtst.adoc | 2 +-
 adocs/documentation/src/main/asciidoc/guides/ugvro.adoc | 2 +-
 12 files changed, 12 insertions(+), 12 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/isis/blob/c229efea/adocs/documentation/src/main/asciidoc/guides/cgcom.adoc
----------------------------------------------------------------------
diff --git a/adocs/documentation/src/main/asciidoc/guides/cgcom.adoc b/adocs/documentation/src/main/asciidoc/guides/cgcom.adoc
index c48343e..8620a7e 100644
--- a/adocs/documentation/src/main/asciidoc/guides/cgcom.adoc
+++ b/adocs/documentation/src/main/asciidoc/guides/cgcom.adoc
@@ -36,7 +36,7 @@ The reference guides are:
 The "supporting procedures" guides are:
 
 * xref:cgcon.adoc#[Contributors' Guide] (how to set up a development environment for Apache Isis and contribute back to the project)
-* xref:cgcon.adoc#[Committers' Guide] (this guide)
+* xref:cgcom.adoc#[Committers' Guide] (this guide)
 
 
 

http://git-wip-us.apache.org/repos/asf/isis/blob/c229efea/adocs/documentation/src/main/asciidoc/guides/cgcon.adoc
----------------------------------------------------------------------
diff --git a/adocs/documentation/src/main/asciidoc/guides/cgcon.adoc b/adocs/documentation/src/main/asciidoc/guides/cgcon.adoc
index 7de978f..7517146 100644
--- a/adocs/documentation/src/main/asciidoc/guides/cgcon.adoc
+++ b/adocs/documentation/src/main/asciidoc/guides/cgcon.adoc
@@ -44,7 +44,7 @@ The reference guides are:
 The "supporting procedures" guides are:
 
 * xref:cgcon.adoc#[Contributors' Guide] (this guide)
-* xref:cgcon.adoc#[Committers' Guide] (release procedures and related practices)
+* xref:cgcom.adoc#[Committers' Guide] (release procedures and related practices)
 
 
 

http://git-wip-us.apache.org/repos/asf/isis/blob/c229efea/adocs/documentation/src/main/asciidoc/guides/rgant.adoc
----------------------------------------------------------------------
diff --git a/adocs/documentation/src/main/asciidoc/guides/rgant.adoc b/adocs/documentation/src/main/asciidoc/guides/rgant.adoc
index 5454e12..08c5178 100644
--- a/adocs/documentation/src/main/asciidoc/guides/rgant.adoc
+++ b/adocs/documentation/src/main/asciidoc/guides/rgant.adoc
@@ -37,7 +37,7 @@ The "supporting procedures" guides are:
 
 * xref:cgcon.adoc#[Contributors' Guide] (how to set up a development environment
 for Apache Isis and contribute back to the project)
-* xref:cgcon.adoc#[Committers' Guide] (release procedures and related practices)
+* xref:cgcom.adoc#[Committers' Guide] (release procedures and related practices)
 
 
 === Examples

http://git-wip-us.apache.org/repos/asf/isis/blob/c229efea/adocs/documentation/src/main/asciidoc/guides/rgcfg.adoc
----------------------------------------------------------------------
diff --git a/adocs/documentation/src/main/asciidoc/guides/rgcfg.adoc b/adocs/documentation/src/main/asciidoc/guides/rgcfg.adoc
index f10e6be..00610b8 100644
--- a/adocs/documentation/src/main/asciidoc/guides/rgcfg.adoc
+++ b/adocs/documentation/src/main/asciidoc/guides/rgcfg.adoc
@@ -47,7 +47,7 @@ The "supporting procedures" guides are:
 
 * xref:cgcon.adoc#[Contributors' Guide] (how to set up a development environment
 for Apache Isis and contribute back to the project)
-* xref:cgcon.adoc#[Committers' Guide] (release procedures and related practices)
+* xref:cgcom.adoc#[Committers' Guide] (release procedures and related practices)
 
 
 

http://git-wip-us.apache.org/repos/asf/isis/blob/c229efea/adocs/documentation/src/main/asciidoc/guides/rgcms.adoc
----------------------------------------------------------------------
diff --git a/adocs/documentation/src/main/asciidoc/guides/rgcms.adoc b/adocs/documentation/src/main/asciidoc/guides/rgcms.adoc
index 41c9875..da2d5c1 100644
--- a/adocs/documentation/src/main/asciidoc/guides/rgcms.adoc
+++ b/adocs/documentation/src/main/asciidoc/guides/rgcms.adoc
@@ -40,7 +40,7 @@ The "supporting procedures" guides are:
 
 * xref:cgcon.adoc#[Contributors' Guide] (how to set up a development environment
 for Apache Isis and contribute back to the project)
-* xref:cgcon.adoc#[Committers' Guide] (release procedures and related practices)
+* xref:cgcom.adoc#[Committers' Guide] (release procedures and related practices)
 
 
 

http://git-wip-us.apache.org/repos/asf/isis/blob/c229efea/adocs/documentation/src/main/asciidoc/guides/rgsvc.adoc
----------------------------------------------------------------------
diff --git a/adocs/documentation/src/main/asciidoc/guides/rgsvc.adoc b/adocs/documentation/src/main/asciidoc/guides/rgsvc.adoc
index 3918f7b..8f54369 100644
--- a/adocs/documentation/src/main/asciidoc/guides/rgsvc.adoc
+++ b/adocs/documentation/src/main/asciidoc/guides/rgsvc.adoc
@@ -37,7 +37,7 @@ The "supporting procedures" guides are:
 
 * xref:cgcon.adoc#[Contributors' Guide] (how to set up a development environment
 for Apache Isis and contribute back to the project)
-* xref:cgcon.adoc#[Committers' Guide] (release procedures and related practices)
+* xref:cgcom.adoc#[Committers' Guide] (release procedures and related practices)
 
 
 include::_rgsvc_api.adoc[leveloffset=+1]

http://git-wip-us.apache.org/repos/asf/isis/blob/c229efea/adocs/documentation/src/main/asciidoc/guides/ug.adoc
----------------------------------------------------------------------
diff --git a/adocs/documentation/src/main/asciidoc/guides/ug.adoc b/adocs/documentation/src/main/asciidoc/guides/ug.adoc
index 6b07136..c988cfa 100644
--- a/adocs/documentation/src/main/asciidoc/guides/ug.adoc
+++ b/adocs/documentation/src/main/asciidoc/guides/ug.adoc
@@ -28,4 +28,4 @@ The "supporting procedures" guides are:
 
 * xref:cgcon.adoc#[Contributors' Guide] (how to set up a development environment
 for Apache Isis and contribute back to the project)
-* xref:cgcon.adoc#[Committers' Guide] (release procedures and related practices)
+* xref:cgcom.adoc#[Committers' Guide] (release procedures and related practices)

http://git-wip-us.apache.org/repos/asf/isis/blob/c229efea/adocs/documentation/src/main/asciidoc/guides/ugbtb.adoc
----------------------------------------------------------------------
diff --git a/adocs/documentation/src/main/asciidoc/guides/ugbtb.adoc b/adocs/documentation/src/main/asciidoc/guides/ugbtb.adoc
index bb1ba14..fd3781e 100644
--- a/adocs/documentation/src/main/asciidoc/guides/ugbtb.adoc
+++ b/adocs/documentation/src/main/asciidoc/guides/ugbtb.adoc
@@ -38,7 +38,7 @@ The "supporting procedures" guides are:
 
 * xref:cgcon.adoc#[Contributors' Guide] (how to set up a development environment
 for Apache Isis and contribute back to the project)
-* xref:cgcon.adoc#[Committers' Guide] (release procedures and related practices)
+* xref:cgcom.adoc#[Committers' Guide] (release procedures and related practices)
 
 
 include::_ugbtb_view-models.adoc[leveloffset=+1]

http://git-wip-us.apache.org/repos/asf/isis/blob/c229efea/adocs/documentation/src/main/asciidoc/guides/ugfun.adoc
----------------------------------------------------------------------
diff --git a/adocs/documentation/src/main/asciidoc/guides/ugfun.adoc b/adocs/documentation/src/main/asciidoc/guides/ugfun.adoc
index bae562f..22daff9 100644
--- a/adocs/documentation/src/main/asciidoc/guides/ugfun.adoc
+++ b/adocs/documentation/src/main/asciidoc/guides/ugfun.adoc
@@ -40,7 +40,7 @@ The "supporting procedures" guides are:
 
 * xref:cgcon.adoc#[Contributors' Guide] (how to set up a development environment
 for Apache Isis and contribute back to the project)
-* xref:cgcon.adoc#[Committers' Guide] (release procedures and related practices)
+* xref:cgcom.adoc#[Committers' Guide] (release procedures and related practices)
 
 
 

http://git-wip-us.apache.org/repos/asf/isis/blob/c229efea/adocs/documentation/src/main/asciidoc/guides/ugsec.adoc
----------------------------------------------------------------------
diff --git a/adocs/documentation/src/main/asciidoc/guides/ugsec.adoc b/adocs/documentation/src/main/asciidoc/guides/ugsec.adoc
index 0baf9ee..117b52b 100644
--- a/adocs/documentation/src/main/asciidoc/guides/ugsec.adoc
+++ b/adocs/documentation/src/main/asciidoc/guides/ugsec.adoc
@@ -36,7 +36,7 @@ The "supporting procedures" guides are:
 
 * xref:cgcon.adoc#[Contributors' Guide] (how to set up a development environment
 for Apache Isis and contribute back to the project)
-* xref:cgcon.adoc#[Committers' Guide] (release procedures and related practices)
+* xref:cgcom.adoc#[Committers' Guide] (release procedures and related practices)
 
 
 === Terminology

http://git-wip-us.apache.org/repos/asf/isis/blob/c229efea/adocs/documentation/src/main/asciidoc/guides/ugtst.adoc
----------------------------------------------------------------------
diff --git a/adocs/documentation/src/main/asciidoc/guides/ugtst.adoc b/adocs/documentation/src/main/asciidoc/guides/ugtst.adoc
index 76cfbec..0ae1e82 100644
--- a/adocs/documentation/src/main/asciidoc/guides/ugtst.adoc
+++ b/adocs/documentation/src/main/asciidoc/guides/ugtst.adoc
@@ -41,7 +41,7 @@ The "supporting procedures" guides are:
 
 * xref:cgcon.adoc#[Contributors' Guide] (how to set up a development environment
 for Apache Isis and contribute back to the project)
-* xref:cgcon.adoc#[Committers' Guide] (release procedures and related practices)
+* xref:cgcom.adoc#[Committers' Guide] (release procedures and related practices)
 
 
 

http://git-wip-us.apache.org/repos/asf/isis/blob/c229efea/adocs/documentation/src/main/asciidoc/guides/ugvro.adoc
----------------------------------------------------------------------
diff --git a/adocs/documentation/src/main/asciidoc/guides/ugvro.adoc b/adocs/documentation/src/main/asciidoc/guides/ugvro.adoc
index 5a648d9..e41ea0f 100644
--- a/adocs/documentation/src/main/asciidoc/guides/ugvro.adoc
+++ b/adocs/documentation/src/main/asciidoc/guides/ugvro.adoc
@@ -46,7 +46,7 @@ The "supporting procedures" guides are:
 
 * xref:cgcon.adoc#[Contributors' Guide] (how to set up a development environment
 for Apache Isis and contribute back to the project)
-* xref:cgcon.adoc#[Committers' Guide] (release procedures and related practices)
+* xref:cgcom.adoc#[Committers' Guide] (release procedures and related practices)
 
 
 


[12/50] [abbrv] isis git commit: ISIS-1296: merging in 1.11.1-RC1 branch, fixing conflict

Posted by da...@apache.org.
ISIS-1296: merging in 1.11.1-RC1 branch, fixing conflict


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

Branch: refs/heads/ISIS-993
Commit: 8812424a472b4e679417566f4aaeae907184caa1
Parents: 78bd18e 006f98a
Author: Dan Haywood <da...@haywood-associates.co.uk>
Authored: Sun Jan 17 15:06:26 2016 +0000
Committer: Dan Haywood <da...@haywood-associates.co.uk>
Committed: Sun Jan 17 15:06:26 2016 +0000

----------------------------------------------------------------------
 .../isis/core/metamodel/facets/Annotations.java |   2 +-
 .../container/DomainObjectContainerDefault.java |   2 +-
 core/pom.xml                                    |  25 ++++++++++++++-
 .../unittestsupport/soap/SoapEndpointSpec.java  |   3 +-
 .../java/domainapp/dom/simple/SimpleObject.java |   4 +--
 .../webapp/ide/eclipse/launch/.gitignore        |   8 +----
 .../ide/eclipse/launch/SimpleApp-JREBEL.launch  |  31 +++++++++++++++++++
 .../launch/SimpleApp-PROTOTYPE-jrebel.launch    |  31 -------------------
 .../SimpleApp-PROTOTYPE-no-fixtures.launch      |  23 --------------
 ...OTOTYPE-with-fixtures-bypass-security.launch |  20 ++++++++++++
 .../SimpleApp-PROTOTYPE-with-fixtures.launch    |   2 +-
 .../eclipse/launch/SimpleApp-PROTOTYPE.launch   |  20 ++++++++++++
 .../launch/SimpleApp-SERVER-no-fixtures.launch  |  23 --------------
 .../ide/eclipse/launch/SimpleApp-SERVER.launch  |  20 ++++++++++++
 ..._PROTOTYPE_with_fixtures-bypass-security.xml |  28 +++++++++++++++++
 .../SimpleApp_PROTOTYPE_with_fixtures.xml       |  28 +++++++++++++++++
 .../ide/intellij/launch/SimpleApp_SERVER.xml    |  28 +++++++++++++++++
 .../launch/SimpleApp__enhance_only_.xml         |   2 +-
 .../src/main/jettyconsole/isis-banner.pdn       | Bin 69658 -> 64162 bytes
 .../src/main/jettyconsole/isis-banner.png       | Bin 30776 -> 27310 bytes
 example/archetype/simpleapp/pom.xml             |   2 +-
 .../java/domainapp/dom/simple/SimpleObject.java |   4 +--
 .../main/resources/archetype-resources/pom.xml  |   2 +-
 .../webapp/ide/eclipse/launch/.gitignore        |   8 +----
 ...OTOTYPE-with-fixtures-bypass-security.launch |  22 +++++++++++++
 .../SimpleApp-PROTOTYPE-with-fixtures.launch    |  22 +++++++++++++
 .../eclipse/launch/SimpleApp-PROTOTYPE.launch   |  22 +++++++++++++
 .../ide/eclipse/launch/SimpleApp-SERVER.launch  |  22 +++++++++++++
 ..._PROTOTYPE_with_fixtures-bypass-security.xml |  31 +++++++++++++++++++
 .../SimpleApp_PROTOTYPE_with_fixtures.xml       |  31 +++++++++++++++++++
 .../ide/intellij/launch/SimpleApp_SERVER.xml    |  31 +++++++++++++++++++
 .../launch/SimpleApp__enhance_only_.xml         |   2 +-
 .../src/main/jettyconsole/isis-banner.pdn       | Bin 69658 -> 64162 bytes
 .../src/main/jettyconsole/isis-banner.png       | Bin 30776 -> 27310 bytes
 .../projects/basic/archetype.properties         |   2 +-
 35 files changed, 395 insertions(+), 106 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/isis/blob/8812424a/core/pom.xml
----------------------------------------------------------------------