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 2020/07/16 10:53:25 UTC
[isis] branch ISIS-2222 updated (5fbb912 -> 149a60f)
This is an automated email from the ASF dual-hosted git repository.
danhaywood pushed a change to branch ISIS-2222
in repository https://gitbox.apache.org/repos/asf/isis.git.
discard 5fbb912 ISIS-2222: wip for PropertyLayout#renderDay
add 3df352c ISIS-2374: exclude gradlew from git
add 50b8dc0 ISIS-2374: disallow persistent lombok config alterations (exclude git)
add 8a7f132 ISIS-2374: CI: add JAXB Java Source Generator step (build-script)
new 149a60f ISIS-2222: wip for PropertyLayout#renderDay
This update added new revisions after undoing existing revisions.
That is to say, some revisions that were in the old version of the
branch are not in the new version. This situation occurs
when a user --force pushes a change and generates a repository
containing something like this:
* -- * -- B -- O -- O -- O (5fbb912)
\
N -- N -- N refs/heads/ISIS-2222 (149a60f)
You should already have received notification emails for all of the O
revisions, and so the following emails describe only the N revisions
from the common base, B.
Any revisions marked "omit" are not gone; other references still
refer to them. Any revisions marked "discard" are gone forever.
The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
Summary of changes:
.gitignore | 6 ++++++
scripts/ci/build-core-using-gradle.sh | 20 +++++++++-----------
2 files changed, 15 insertions(+), 11 deletions(-)
[isis] 01/01: ISIS-2222: wip for PropertyLayout#renderDay
Posted by da...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
danhaywood pushed a commit to branch ISIS-2222
in repository https://gitbox.apache.org/repos/asf/isis.git
commit 149a60f2c2e16cba955e441faade49143c8b7ebd
Author: danhaywood <da...@haywood-associates.co.uk>
AuthorDate: Thu Jul 16 10:14:44 2020 +0100
ISIS-2222: wip for PropertyLayout#renderDay
---
.../PropertyLayout/PropertyLayoutMenu.java | 12 ++
.../PropertyLayoutRenderDayVm-description.adoc | 137 +++++++++++++++++++++
.../renderDay/PropertyLayoutRenderDayVm.java | 110 +++++++++++++++++
.../renderDay/PropertyLayoutRenderDayVm.layout.xml | 49 ++++++++
.../PropertyLayoutRenderDayVm_downloadAsXml.java | 36 ++++++
...erDayVm_endDateExclusiveUsingMixinProperty.java | 51 ++++++++
...enderDayVm_mixinPropertyWithMetaAnnotation.java | 50 ++++++++
..._mixinPropertyWithMetaAnnotationOverridden.java | 51 ++++++++
...enderDayVm_updateEndDateWithMetaAnnotation.java | 56 +++++++++
..._updateEndDateWithMetaAnnotationOverridden.java | 42 +++++++
...nderDayVm_updateEndDateWithParameterLayout.java | 40 ++++++
.../RenderDayMetaAnnotationEndDateExclusive.java | 26 ++++
.../RenderDayMetaAnnotationStartDateInclusive.java | 26 ++++
.../src/main/java/demoapp/dom/menubars.layout.xml | 1 +
14 files changed, 687 insertions(+)
diff --git a/examples/demo/domain/src/main/java/demoapp/dom/annotations/PropertyLayout/PropertyLayoutMenu.java b/examples/demo/domain/src/main/java/demoapp/dom/annotations/PropertyLayout/PropertyLayoutMenu.java
index 1dd5e90..1f3ca6f 100644
--- a/examples/demo/domain/src/main/java/demoapp/dom/annotations/PropertyLayout/PropertyLayoutMenu.java
+++ b/examples/demo/domain/src/main/java/demoapp/dom/annotations/PropertyLayout/PropertyLayoutMenu.java
@@ -18,11 +18,14 @@
*/
package demoapp.dom.annotations.PropertyLayout;
+import javax.inject.Inject;
+
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.NatureOfService;
import org.apache.isis.applib.annotation.SemanticsOf;
+import org.apache.isis.applib.services.clock.ClockService;
import lombok.val;
import lombok.extern.log4j.Log4j2;
@@ -34,6 +37,7 @@ import demoapp.dom.annotations.PropertyLayout.hidden.child.PropertyLayoutHiddenC
import demoapp.dom.annotations.PropertyLayout.multiLine.PropertyLayoutMultiLineVm;
import demoapp.dom.annotations.PropertyLayout.named.PropertyLayoutNamedVm;
import demoapp.dom.annotations.PropertyLayout.navigable.FileNodeVm;
+import demoapp.dom.annotations.PropertyLayout.renderDay.PropertyLayoutRenderDayVm;
@DomainService(nature=NatureOfService.VIEW, objectType = "demo.PropertyLayoutMenu")
@Log4j2
@@ -93,5 +97,13 @@ public class PropertyLayoutMenu {
return new FileNodeVm();
}
+ @Action(semantics = SemanticsOf.SAFE)
+ @ActionLayout(cssClassFa="fa-step-forward", describedAs = "Inclusive and exclusive date ranges")
+ public PropertyLayoutRenderDayVm renderDay(){
+ return new PropertyLayoutRenderDayVm(clockService.nowAsJodaLocalDate());
+ }
+
+ @Inject
+ ClockService clockService;
}
diff --git a/examples/demo/domain/src/main/java/demoapp/dom/annotations/PropertyLayout/renderDay/PropertyLayoutRenderDayVm-description.adoc b/examples/demo/domain/src/main/java/demoapp/dom/annotations/PropertyLayout/renderDay/PropertyLayoutRenderDayVm-description.adoc
new file mode 100644
index 0000000..20b657b
--- /dev/null
+++ b/examples/demo/domain/src/main/java/demoapp/dom/annotations/PropertyLayout/renderDay/PropertyLayoutRenderDayVm-description.adoc
@@ -0,0 +1,137 @@
+CAUTION: TODO - not yet updated...
+
+The "renderDay" hint indicates that a textbox of the specified number of lines should be used to render a property or parameter:
+
+* for properties, the hint can be specified using either the `@PropertyLayout` annotation, or a meta-annotation, or using the `Xxx.layout.xml` layout file.
+
+* for parameters, the hint can be specified using either the `@ParameterLayout` annotation, or a meta-annotation.
+
+The hint is currently supported only for properties and parameters of type ``String``s.
+
+== Annotated
+
+The renderDay hint can be specified explicitly using an annotation:
+
+* for properties, using `@PropertyLayout#renderDay()`:
++
+[source,java,indent=0]
+----
+include::PropertyLayoutRenderDayVm.java[tags=render-as-day]
+----
+<.> explicitly specifies that the property should use a textbox
+
+* for parameters, using `@ParameterLayout#renderDay()`:
++
+[source,java,indent=0]
+----
+include::PropertyLayoutRenderDayVm_updateWithParameterLayout.java[tags=annotation]
+----
+<.> explicitly specifies that the parameter should use a textbox
+
+== Layout File
+
+For properties (not parameters), the renderDay hint can be specified using the `Xxx.layout.xml` file:
+
+* property definition:
++
+[source,java,indent=0]
+----
+include::PropertyLayoutRenderDayVm.java[tags=layout-file]
+----
+<.> `renderDay` hint is _not_ present.
+
+* layout file snippet:
++
+[source,xml,indent=0,tabsize=4]
+----
+<cpt:property id="propertyUsingLayout" renderDay="5"/>
+----
+// TODO: for some reason this doesn't include correctly in the app...
+//include::PropertyLayoutRenderDayVm.layout.xml[tags=layout-file]
+
+One advantage of the layout file over the annotation is that the layout file is dynamic: it can be modified and the changes reloaded in a running application.
+
+TIP: It is sometimes necessary to invoke the `Rebuild Metamodel` action to see this take effect.
+
+== Contributed
+
+The `@PropertyLayout` can also be applied at the class-level to mixin properties:.
+
+[source,java,indent=0]
+----
+include::PropertyLayoutRenderDayVm_mixinProperty.java[tags=class]
+----
+<.> explicitly specifies that the contributed property should use a textbox
+
+== Meta-annotated
+
+The renderDay hint can also be specified using a custom meta-annotation:
+
+* the meta-annotation is defined as:
++
+[source,java]
+----
+include::RenderDayMetaAnnotation.java[tags=class]
+----
+<.> annotated for property ...
+<.> \... and also for parameter.
+<.> annotation can be applied to a property (either its getter or the field directly)
+<.> annotation can be applied to a parameter
+<.> annotation can be applied to a type (ie, meta-meta annotations recursively)
+
+* and can be applied to a property:
++
+[source,java,indent=0]
+----
+include::PropertyLayoutRenderDayVm.java[tags=meta-annotated]
+----
+<.> hint is inherited from the meta-annotation
+
+* or can be applied to a parameter:
++
+[source,java,indent=0]
+----
+include::PropertyLayoutRenderDayVm_updateWithMetaAnnotation.java[tags=meta-annotation]
+----
+<.> hint is inherited from the meta-annotation
+
+* or can be applied to mixin:
++
+[source,java,indent=0]
+----
+include::PropertyLayoutRenderDayVm_mixinPropertyWithMetaAnnotation.java[tags=class]
+----
+<.> hint is inherited from the meta-annotation
+
+=== Meta-annotated Overridden
+
+The meta-annotation can itself be overridden:
+
+* in a property:
++
+[source,java,indent=0]
+----
+include::PropertyLayoutRenderDayVm.java[tags=meta-annotated-overridden]
+----
+<.> hint from meta-annotation ...
+<.> \... is overridden by the `@PropertyLayout` annotation
+
+* or a parameter:
++
+[source,java,indent=0]
+----
+include::PropertyLayoutRenderDayVm_updateWithMetaAnnotationOverridden.java[tags=meta-annotation-overridden]
+----
+<.> hint from meta-annotation ...
+<.> \... is overridden by the `@ParameterLayout` annotation
+
+
+* or a mixin:
++
+[source,java,indent=0]
+----
+include::PropertyLayoutRenderDayVm_mixinPropertyWithMetaAnnotationOverridden.java[tags=meta-annotation-overridden]
+----
+<.> hint from meta-annotation ...
+<.> \... is overridden by the `@ParameterLayout` annotation
+
diff --git a/examples/demo/domain/src/main/java/demoapp/dom/annotations/PropertyLayout/renderDay/PropertyLayoutRenderDayVm.java b/examples/demo/domain/src/main/java/demoapp/dom/annotations/PropertyLayout/renderDay/PropertyLayoutRenderDayVm.java
new file mode 100644
index 0000000..b071bda
--- /dev/null
+++ b/examples/demo/domain/src/main/java/demoapp/dom/annotations/PropertyLayout/renderDay/PropertyLayoutRenderDayVm.java
@@ -0,0 +1,110 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package demoapp.dom.annotations.PropertyLayout.renderDay;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlType;
+import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
+
+import org.joda.time.DateTime;
+import org.joda.time.LocalDate;
+
+import org.apache.isis.applib.annotation.DomainObject;
+import org.apache.isis.applib.annotation.Editing;
+import org.apache.isis.applib.annotation.MemberOrder;
+import org.apache.isis.applib.annotation.Nature;
+import org.apache.isis.applib.annotation.Optionality;
+import org.apache.isis.applib.annotation.Property;
+import org.apache.isis.applib.annotation.PropertyLayout;
+import org.apache.isis.applib.annotation.RenderDay;
+import org.apache.isis.applib.util.JaxbAdapters;
+import org.apache.isis.schema.jaxbadapters.JodaLocalDateStringAdapter;
+
+import lombok.Getter;
+import lombok.NoArgsConstructor;
+import lombok.Setter;
+
+import demoapp.dom._infra.asciidocdesc.HasAsciiDocDescription;
+
+//tag::class[]
+@XmlRootElement(name = "root")
+@XmlType
+@XmlAccessorType(XmlAccessType.FIELD)
+@DomainObject(
+ nature=Nature.VIEW_MODEL,
+ objectType = "demo.PropertyLayoutRenderDayVm",
+ editing = Editing.ENABLED
+)
+@NoArgsConstructor
+public class PropertyLayoutRenderDayVm implements HasAsciiDocDescription {
+
+ public PropertyLayoutRenderDayVm(LocalDate localDate) {
+ startDateInclusive = localDate;
+ endDateExclusive = startDateInclusive.plusDays(7);
+ }
+
+ public String title() {
+ return "PropertyLayout#renderDay";
+ }
+
+//tag::render-not-specified[]
+ @Property(optionality = Optionality.OPTIONAL)
+ @PropertyLayout(
+ renderDay = RenderDay.NOT_SPECIFIED // <.>
+ , describedAs =
+ "@PropertyLayout(renderDay = NOT_SPECIFIED)"
+ )
+ @MemberOrder(name = "annotation", sequence = "1")
+ @XmlElement(required = false)
+ @XmlJavaTypeAdapter(JodaLocalDateStringAdapter.ForJaxb.class)
+ @Getter @Setter
+ private LocalDate startDateInclusive;
+//end::render-not-specified[]
+
+//tag::render-as-day-before[]
+ @Property(optionality = Optionality.OPTIONAL)
+ @PropertyLayout(
+ renderDay = RenderDay.AS_DAY_BEFORE // <.>
+ , describedAs =
+ "@PropertyLayout(renderDay = AS_DAY_BEFORE)"
+ )
+ @MemberOrder(name = "annotation", sequence = "2")
+ @XmlElement(required = false)
+ @XmlJavaTypeAdapter(JodaLocalDateStringAdapter.ForJaxb.class)
+ @Getter @Setter
+ private LocalDate endDateExclusive;
+//end::render-as-day-before[]
+
+//tag::render-as-day[]
+ @Property(optionality = Optionality.OPTIONAL)
+ @PropertyLayout(
+ renderDay = RenderDay.AS_DAY // <.>
+ , describedAs =
+ "Value of getEndDateExclusive(), but @PropertyLayout(renderDay = AS_DAY)"
+ )
+ @MemberOrder(name = "annotation", sequence = "3")
+ public LocalDate getEndDateExclusiveRaw() {
+ return getEndDateExclusive();
+ }
+//end::render-as-day[]
+}
+//end::class[]
diff --git a/examples/demo/domain/src/main/java/demoapp/dom/annotations/PropertyLayout/renderDay/PropertyLayoutRenderDayVm.layout.xml b/examples/demo/domain/src/main/java/demoapp/dom/annotations/PropertyLayout/renderDay/PropertyLayoutRenderDayVm.layout.xml
new file mode 100644
index 0000000..f7dce44
--- /dev/null
+++ b/examples/demo/domain/src/main/java/demoapp/dom/annotations/PropertyLayout/renderDay/PropertyLayoutRenderDayVm.layout.xml
@@ -0,0 +1,49 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<bs3:grid
+ xsi:schemaLocation="http://isis.apache.org/applib/layout/component http://isis.apache.org/applib/layout/component/component.xsd http://isis.apache.org/applib/layout/grid/bootstrap3 http://isis.apache.org/applib/layout/grid/bootstrap3/bootstrap3.xsd"
+ xmlns:bs3="http://isis.apache.org/applib/layout/grid/bootstrap3"
+ xmlns:cpt="http://isis.apache.org/applib/layout/component"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+
+ <bs3:row>
+ <bs3:col span="10" unreferencedActions="true">
+ <cpt:domainObject />
+ <cpt:action id="downloadAsXml"/>
+ <cpt:action id="rebuildMetamodel"/>
+ </bs3:col>
+ <bs3:col span="2">
+ <cpt:fieldSet name="" id="sources" />
+ </bs3:col>
+ </bs3:row>
+
+ <bs3:row>
+ <bs3:col span="6">
+ <cpt:fieldSet name="Annotated" id="annotation"/>
+ <cpt:fieldSet name="Layout File" id="layout-file">
+<!-- tag::layout-file[] -->
+ <cpt:property id="propertyUsingLayout" multiLine="5"/>
+<!-- end::layout-file[] -->
+ </cpt:fieldSet>
+ <cpt:fieldSet name="Contributed" id="contributed"/>
+ <cpt:fieldSet name="Meta-annotated" id="meta-annotated"/>
+ <cpt:fieldSet name="Meta-annotated Overridden" id="meta-annotated-overridden"/>
+ <cpt:fieldSet name="Other" id="other" unreferencedProperties="true"/>
+ </bs3:col>
+ <bs3:col span="6">
+ <cpt:fieldSet name="Description" id="description" >
+ <cpt:action id="clearHints" position="PANEL" />
+ <cpt:action id="downloadLayoutXml" position="PANEL_DROPDOWN"/>
+ <cpt:action id="rebuildMetamodel" position="PANEL_DROPDOWN"/>
+ <cpt:action id="downloadMetamodelXml" position="PANEL_DROPDOWN"/>
+ <cpt:action id="inspectMetamodel" position="PANEL_DROPDOWN"/>
+ <cpt:action id="downloadJdoMetadata" position="PANEL_DROPDOWN"/>
+ <cpt:action id="openRestApi" position="PANEL_DROPDOWN" />
+ <cpt:property id="description"/>
+ </cpt:fieldSet>
+ </bs3:col>
+ </bs3:row>
+ <bs3:row>
+ <bs3:col span="12" unreferencedCollections="true"/>
+ </bs3:row>
+
+</bs3:grid>
diff --git a/examples/demo/domain/src/main/java/demoapp/dom/annotations/PropertyLayout/renderDay/PropertyLayoutRenderDayVm_downloadAsXml.java b/examples/demo/domain/src/main/java/demoapp/dom/annotations/PropertyLayout/renderDay/PropertyLayoutRenderDayVm_downloadAsXml.java
new file mode 100644
index 0000000..1d54b8a
--- /dev/null
+++ b/examples/demo/domain/src/main/java/demoapp/dom/annotations/PropertyLayout/renderDay/PropertyLayoutRenderDayVm_downloadAsXml.java
@@ -0,0 +1,36 @@
+package demoapp.dom.annotations.PropertyLayout.renderDay;
+
+import javax.inject.Inject;
+
+import org.apache.isis.applib.annotation.Action;
+import org.apache.isis.applib.annotation.ActionLayout;
+import org.apache.isis.applib.annotation.SemanticsOf;
+import org.apache.isis.applib.services.jaxb.JaxbService;
+import org.apache.isis.applib.value.Clob;
+import org.apache.isis.applib.value.NamedWithMimeType;
+
+import lombok.RequiredArgsConstructor;
+import lombok.val;
+
+//tag::class[]
+@Action(
+ semantics = SemanticsOf.IDEMPOTENT
+)
+@RequiredArgsConstructor
+public class PropertyLayoutRenderDayVm_downloadAsXml {
+
+ private final PropertyLayoutRenderDayVm propertyLayoutRenderDayVm;
+
+ public Clob act(final String fileName) {
+ val xml = jaxbService.toXml(propertyLayoutRenderDayVm);
+ return Clob.of(fileName, NamedWithMimeType.CommonMimeType.XML, xml);
+ }
+ public String default0Act() {
+ return "PropertyLayoutRenderVm.xml";
+ }
+
+ @Inject
+ JaxbService jaxbService;
+
+}
+//end::class[]
diff --git a/examples/demo/domain/src/main/java/demoapp/dom/annotations/PropertyLayout/renderDay/PropertyLayoutRenderDayVm_endDateExclusiveUsingMixinProperty.java b/examples/demo/domain/src/main/java/demoapp/dom/annotations/PropertyLayout/renderDay/PropertyLayoutRenderDayVm_endDateExclusiveUsingMixinProperty.java
new file mode 100644
index 0000000..8ac3e28
--- /dev/null
+++ b/examples/demo/domain/src/main/java/demoapp/dom/annotations/PropertyLayout/renderDay/PropertyLayoutRenderDayVm_endDateExclusiveUsingMixinProperty.java
@@ -0,0 +1,51 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package demoapp.dom.annotations.PropertyLayout.renderDay;
+
+import org.joda.time.LocalDate;
+
+import org.apache.isis.applib.annotation.MemberOrder;
+import org.apache.isis.applib.annotation.Property;
+import org.apache.isis.applib.annotation.PropertyLayout;
+import org.apache.isis.applib.annotation.RenderDay;
+
+import lombok.RequiredArgsConstructor;
+
+//tag::class[]
+@Property()
+@PropertyLayout(
+ renderDay = RenderDay.AS_DAY_BEFORE // <.>
+ , describedAs =
+ "@PropertyLayout(renderDay = AS_DAY_BEFORE)"
+)
+@RequiredArgsConstructor
+public class PropertyLayoutRenderDayVm_endDateExclusiveUsingMixinProperty {
+ // ...
+//end::class[]
+
+ private final PropertyLayoutRenderDayVm propertyLayoutRenderDayVm;
+
+ @MemberOrder(name = "contributed", sequence = "1")
+ public LocalDate prop() {
+ return propertyLayoutRenderDayVm.getEndDateExclusive();
+ }
+
+//tag::class[]
+}
+//end::class[]
diff --git a/examples/demo/domain/src/main/java/demoapp/dom/annotations/PropertyLayout/renderDay/PropertyLayoutRenderDayVm_mixinPropertyWithMetaAnnotation.java b/examples/demo/domain/src/main/java/demoapp/dom/annotations/PropertyLayout/renderDay/PropertyLayoutRenderDayVm_mixinPropertyWithMetaAnnotation.java
new file mode 100644
index 0000000..2d23cf2
--- /dev/null
+++ b/examples/demo/domain/src/main/java/demoapp/dom/annotations/PropertyLayout/renderDay/PropertyLayoutRenderDayVm_mixinPropertyWithMetaAnnotation.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 demoapp.dom.annotations.PropertyLayout.renderDay;
+
+import org.joda.time.LocalDate;
+
+import org.apache.isis.applib.annotation.MemberOrder;
+import org.apache.isis.applib.annotation.Property;
+import org.apache.isis.applib.annotation.PropertyLayout;
+
+import lombok.RequiredArgsConstructor;
+
+//tag::class[]
+@Property()
+@RenderDayMetaAnnotationEndDateExclusive // <.>
+@PropertyLayout(
+ describedAs =
+ "@RenderDayMetaAnnotation"
+)
+@RequiredArgsConstructor
+public class PropertyLayoutRenderDayVm_mixinPropertyWithMetaAnnotation {
+ // ...
+//end::class[]
+
+ private final PropertyLayoutRenderDayVm propertyLayoutRenderDayVm;
+
+ @MemberOrder(name = "meta-annotated", sequence = "2")
+ public LocalDate prop() {
+ return propertyLayoutRenderDayVm.getEndDateExclusive();
+ }
+
+//tag::class[]
+}
+//end::class[]
diff --git a/examples/demo/domain/src/main/java/demoapp/dom/annotations/PropertyLayout/renderDay/PropertyLayoutRenderDayVm_mixinPropertyWithMetaAnnotationOverridden.java b/examples/demo/domain/src/main/java/demoapp/dom/annotations/PropertyLayout/renderDay/PropertyLayoutRenderDayVm_mixinPropertyWithMetaAnnotationOverridden.java
new file mode 100644
index 0000000..7222580
--- /dev/null
+++ b/examples/demo/domain/src/main/java/demoapp/dom/annotations/PropertyLayout/renderDay/PropertyLayoutRenderDayVm_mixinPropertyWithMetaAnnotationOverridden.java
@@ -0,0 +1,51 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package demoapp.dom.annotations.PropertyLayout.renderDay;
+
+import org.joda.time.LocalDate;
+
+import org.apache.isis.applib.annotation.MemberOrder;
+import org.apache.isis.applib.annotation.Property;
+import org.apache.isis.applib.annotation.PropertyLayout;
+
+import lombok.RequiredArgsConstructor;
+
+//tag::meta-annotation-overridden[]
+@Property()
+@RenderDayMetaAnnotationEndDateExclusive // <.>
+@PropertyLayout(
+ multiLine = 3 // <.>
+ , describedAs =
+ "@RenderDayMetaAnnotation @PropertyLayout(...)"
+)
+@RequiredArgsConstructor
+public class PropertyLayoutRenderDayVm_mixinPropertyWithMetaAnnotationOverridden {
+ // ...
+//end::meta-annotation-overridden[]
+
+ private final PropertyLayoutRenderDayVm propertyLayoutRenderDayVm;
+
+ @MemberOrder(name = "meta-annotated-overridden", sequence = "2")
+ public LocalDate prop() {
+ return propertyLayoutRenderDayVm.getEndDateExclusive();
+ }
+
+//tag::meta-annotation-overridden[]
+}
+//end::meta-annotation-overridden[]
diff --git a/examples/demo/domain/src/main/java/demoapp/dom/annotations/PropertyLayout/renderDay/PropertyLayoutRenderDayVm_updateEndDateWithMetaAnnotation.java b/examples/demo/domain/src/main/java/demoapp/dom/annotations/PropertyLayout/renderDay/PropertyLayoutRenderDayVm_updateEndDateWithMetaAnnotation.java
new file mode 100644
index 0000000..47a7c9a
--- /dev/null
+++ b/examples/demo/domain/src/main/java/demoapp/dom/annotations/PropertyLayout/renderDay/PropertyLayoutRenderDayVm_updateEndDateWithMetaAnnotation.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 demoapp.dom.annotations.PropertyLayout.renderDay;
+
+import org.joda.time.LocalDate;
+
+import org.apache.isis.applib.annotation.Action;
+import org.apache.isis.applib.annotation.Optionality;
+import org.apache.isis.applib.annotation.Parameter;
+import org.apache.isis.applib.annotation.ParameterLayout;
+import org.apache.isis.applib.annotation.SemanticsOf;
+
+import lombok.RequiredArgsConstructor;
+
+@Action(
+ semantics = SemanticsOf.IDEMPOTENT,
+ associateWith = "endDateExclusive", associateWithSequence = "2"
+)
+@RequiredArgsConstructor
+public class PropertyLayoutRenderDayVm_updateEndDateWithMetaAnnotation {
+
+ private final PropertyLayoutRenderDayVm propertyLayoutRenderDayVm;
+
+//tag::meta-annotation[]
+ public PropertyLayoutRenderDayVm act(
+ @Parameter(optionality = Optionality.OPTIONAL)
+ @RenderDayMetaAnnotationEndDateExclusive // <.>
+ @ParameterLayout(
+ describedAs = "@RenderDayAsDayBeforeMetaAnnotation"
+ )
+ final LocalDate endDateExclusive) {
+ propertyLayoutRenderDayVm.setEndDateExclusive(endDateExclusive);
+ return propertyLayoutRenderDayVm;
+ }
+//end::meta-annotation[]
+ public LocalDate default0Act() {
+ return propertyLayoutRenderDayVm.getEndDateExclusive();
+ }
+
+}
diff --git a/examples/demo/domain/src/main/java/demoapp/dom/annotations/PropertyLayout/renderDay/PropertyLayoutRenderDayVm_updateEndDateWithMetaAnnotationOverridden.java b/examples/demo/domain/src/main/java/demoapp/dom/annotations/PropertyLayout/renderDay/PropertyLayoutRenderDayVm_updateEndDateWithMetaAnnotationOverridden.java
new file mode 100644
index 0000000..da29050
--- /dev/null
+++ b/examples/demo/domain/src/main/java/demoapp/dom/annotations/PropertyLayout/renderDay/PropertyLayoutRenderDayVm_updateEndDateWithMetaAnnotationOverridden.java
@@ -0,0 +1,42 @@
+package demoapp.dom.annotations.PropertyLayout.renderDay;
+
+import org.joda.time.LocalDate;
+
+import org.apache.isis.applib.annotation.Action;
+import org.apache.isis.applib.annotation.Optionality;
+import org.apache.isis.applib.annotation.Parameter;
+import org.apache.isis.applib.annotation.ParameterLayout;
+import org.apache.isis.applib.annotation.RenderDay;
+import org.apache.isis.applib.annotation.SemanticsOf;
+
+import lombok.RequiredArgsConstructor;
+
+@Action(
+ semantics = SemanticsOf.IDEMPOTENT,
+ associateWith = "endDateExclusive", associateWithSequence = "3"
+)
+@RequiredArgsConstructor
+public class PropertyLayoutRenderDayVm_updateEndDateWithMetaAnnotationOverridden {
+
+ private final PropertyLayoutRenderDayVm propertyLayoutRenderDayVm;
+
+//tag::meta-annotation-overridden[]
+ public PropertyLayoutRenderDayVm act(
+ @Parameter(optionality = Optionality.OPTIONAL)
+ @RenderDayMetaAnnotationStartDateInclusive // <.> // deliberately incorrectly annotated
+ @ParameterLayout(
+ renderDay = RenderDay.AS_DAY_BEFORE // <.>
+ , describedAs =
+ "@RenderDayMetaAnnotationStartDateInclusive " +
+ "@ParameterLayout(renderDay = AS_DAY_BEFORE)"
+ )
+ final LocalDate endDate) {
+ propertyLayoutRenderDayVm.setEndDateExclusive(endDate);
+ return propertyLayoutRenderDayVm;
+ }
+//end::meta-annotation-overridden[]
+ public LocalDate default0Act() {
+ return propertyLayoutRenderDayVm.getEndDateExclusive();
+ }
+
+}
diff --git a/examples/demo/domain/src/main/java/demoapp/dom/annotations/PropertyLayout/renderDay/PropertyLayoutRenderDayVm_updateEndDateWithParameterLayout.java b/examples/demo/domain/src/main/java/demoapp/dom/annotations/PropertyLayout/renderDay/PropertyLayoutRenderDayVm_updateEndDateWithParameterLayout.java
new file mode 100644
index 0000000..ba88c2a
--- /dev/null
+++ b/examples/demo/domain/src/main/java/demoapp/dom/annotations/PropertyLayout/renderDay/PropertyLayoutRenderDayVm_updateEndDateWithParameterLayout.java
@@ -0,0 +1,40 @@
+package demoapp.dom.annotations.PropertyLayout.renderDay;
+
+import org.joda.time.LocalDate;
+
+import org.apache.isis.applib.annotation.Action;
+import org.apache.isis.applib.annotation.Optionality;
+import org.apache.isis.applib.annotation.Parameter;
+import org.apache.isis.applib.annotation.ParameterLayout;
+import org.apache.isis.applib.annotation.RenderDay;
+import org.apache.isis.applib.annotation.SemanticsOf;
+
+import lombok.RequiredArgsConstructor;
+
+@Action(
+ semantics = SemanticsOf.IDEMPOTENT,
+ associateWith = "endDateExclusive", associateWithSequence = "1"
+)
+@RequiredArgsConstructor
+public class PropertyLayoutRenderDayVm_updateEndDateWithParameterLayout {
+
+ private final PropertyLayoutRenderDayVm propertyLayoutRenderDayVm;
+
+//tag::annotation[]
+ public PropertyLayoutRenderDayVm act(
+ @Parameter(optionality = Optionality.OPTIONAL)
+ @ParameterLayout(
+ renderDay = RenderDay.AS_DAY_BEFORE // <.>
+ , describedAs =
+ "@ParameterLayout(renderDay = AS_DAY_BEFORE)"
+ )
+ final LocalDate endDate) {
+ propertyLayoutRenderDayVm.setEndDateExclusive(endDate);
+ return propertyLayoutRenderDayVm;
+ }
+//end::annotation[]
+ public LocalDate default0Act() {
+ return propertyLayoutRenderDayVm.getEndDateExclusive();
+ }
+
+}
diff --git a/examples/demo/domain/src/main/java/demoapp/dom/annotations/PropertyLayout/renderDay/RenderDayMetaAnnotationEndDateExclusive.java b/examples/demo/domain/src/main/java/demoapp/dom/annotations/PropertyLayout/renderDay/RenderDayMetaAnnotationEndDateExclusive.java
new file mode 100644
index 0000000..ddfcc53
--- /dev/null
+++ b/examples/demo/domain/src/main/java/demoapp/dom/annotations/PropertyLayout/renderDay/RenderDayMetaAnnotationEndDateExclusive.java
@@ -0,0 +1,26 @@
+package demoapp.dom.annotations.PropertyLayout.renderDay;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Inherited;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+import org.apache.isis.applib.annotation.ParameterLayout;
+import org.apache.isis.applib.annotation.PropertyLayout;
+import org.apache.isis.applib.annotation.RenderDay;
+
+//tag::class[]
+@PropertyLayout(renderDay = RenderDay.AS_DAY_BEFORE) // <.>
+@ParameterLayout(renderDay = RenderDay.AS_DAY_BEFORE) // <.>
+@Inherited
+@Target({
+ ElementType.METHOD, ElementType.FIELD, // <.>
+ ElementType.PARAMETER, // <.>
+ ElementType.TYPE // <.>
+})
+@Retention(RetentionPolicy.RUNTIME)
+public @interface RenderDayMetaAnnotationEndDateExclusive {
+
+}
+//end::class[]
diff --git a/examples/demo/domain/src/main/java/demoapp/dom/annotations/PropertyLayout/renderDay/RenderDayMetaAnnotationStartDateInclusive.java b/examples/demo/domain/src/main/java/demoapp/dom/annotations/PropertyLayout/renderDay/RenderDayMetaAnnotationStartDateInclusive.java
new file mode 100644
index 0000000..3636f07
--- /dev/null
+++ b/examples/demo/domain/src/main/java/demoapp/dom/annotations/PropertyLayout/renderDay/RenderDayMetaAnnotationStartDateInclusive.java
@@ -0,0 +1,26 @@
+package demoapp.dom.annotations.PropertyLayout.renderDay;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Inherited;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+import org.apache.isis.applib.annotation.ParameterLayout;
+import org.apache.isis.applib.annotation.PropertyLayout;
+import org.apache.isis.applib.annotation.RenderDay;
+
+//tag::class[]
+@PropertyLayout(renderDay = RenderDay.AS_DAY) // <.>
+@ParameterLayout(renderDay = RenderDay.AS_DAY) // <.>
+@Inherited
+@Target({
+ ElementType.METHOD, ElementType.FIELD, // <.>
+ ElementType.PARAMETER, // <.>
+ ElementType.TYPE // <.>
+})
+@Retention(RetentionPolicy.RUNTIME)
+public @interface RenderDayMetaAnnotationStartDateInclusive {
+
+}
+//end::class[]
diff --git a/examples/demo/domain/src/main/java/demoapp/dom/menubars.layout.xml b/examples/demo/domain/src/main/java/demoapp/dom/menubars.layout.xml
index f22750f..2fee26f 100644
--- a/examples/demo/domain/src/main/java/demoapp/dom/menubars.layout.xml
+++ b/examples/demo/domain/src/main/java/demoapp/dom/menubars.layout.xml
@@ -127,6 +127,7 @@ as a replacement for
<mb3:serviceAction objectType="demo.PropertyLayoutMenu" id="multiLine"/>
<mb3:serviceAction objectType="demo.PropertyLayoutMenu" id="named"/>
<mb3:serviceAction objectType="demo.PropertyLayoutMenu" id="navigable"/>
+ <mb3:serviceAction objectType="demo.PropertyLayoutMenu" id="renderDay"/>
</mb3:section>
</mb3:menu>