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:41:03 UTC
[39/50] [abbrv] isis git commit: ISIS-993: pretty much there on
deriving and syncing the metamodel with the layout.xml info;
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>