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/017fab93 Tree: http://git-wip-us.apache.org/repos/asf/isis/tree/017fab93 Diff: http://git-wip-us.apache.org/repos/asf/isis/diff/017fab93 Branch: refs/heads/ISIS-993 Commit: 017fab93e1de1314201234e5ed930f7d623f3d30 Parents: ea9204f Author: Dan Haywood <d...@haywood-associates.co.uk> Authored: Wed Jan 6 20:28:44 2016 +0000 Committer: Dan Haywood <d...@haywood-associates.co.uk> Committed: Mon Jan 25 15:06:07 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/017fab93/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/017fab93/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/017fab93/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/017fab93/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/017fab93/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/017fab93/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/017fab93/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/017fab93/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/017fab93/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/017fab93/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/017fab93/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/017fab93/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/017fab93/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/017fab93/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/017fab93/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/017fab93/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/017fab93/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/017fab93/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/017fab93/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/017fab93/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/017fab93/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/017fab93/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/017fab93/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/017fab93/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 ""