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/13 22:12:41 UTC
[isis] branch ISIS-2222 updated (1a301e5 -> f8f3d50)
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.
from 1a301e5 ISIS-2222: removes WrapperDemo and TextDemo, adds in PropertyLayout for multiLine.
add 2101531 ISIS-2401: fix regression: create mementos for paranted coll. as well
new 2de5d52 ISIS-2222: fleshes out @PropertyLayout a little bit
new f8f3d50 ISIS-2222: fleshes out @PropertyLayout a little bit more
The 2 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:
.../annotations/ActionLayout/ActionLayoutMenu.java | 1 -
.../PropertyLayout/PropertyLayoutMenu.java | 3 +-
.../PropertyLayoutCssClassVm-description.adoc | 52 ++++++++-
.../cssClass/PropertyLayoutCssClassVm.java | 10 +-
.../cssClass/PropertyLayoutCssClassVm.layout.xml | 2 +
.../multiLine/MultiLineMetaAnnotation.java | 25 ++++
.../PropertyLayoutMultiLineMetaAnnotation.java | 19 ---
.../PropertyLayoutMultiLineVm-description.adoc | 101 +++++++++++++++-
.../multiLine/PropertyLayoutMultiLineVm.java | 63 ++++++++--
.../multiLine/PropertyLayoutMultiLineVm.layout.xml | 3 +
...LayoutMultiLineVm_updateWithMetaAnnotation.java | 32 ++++++
...iLineVm_updateWithMetaAnnotationOverridden.java | 38 ++++++
...ayoutMultiLineVm_updateWithParameterLayout.java | 38 ++++++
.../PropertyLayout/named/NamedMetaAnnotation.java | 25 ++++
.../named/PropertyLayoutNamedMetaAnnotation.java | 19 ---
.../named/PropertyLayoutNamedVm-description.adoc | 127 +++++++++++++++++----
.../named/PropertyLayoutNamedVm.java | 82 +++++++++----
.../named/PropertyLayoutNamedVm.layout.xml | 2 +-
...pertyLayoutNamedVm_updateWithEscapedMarkup.java | 40 +++++++
.../PropertyLayoutNamedVm_updateWithMarkup.java | 42 +++++++
...ertyLayoutNamedVm_updateWithMetaAnnotation.java | 32 ++++++
...NamedVm_updateWithMetaAnnotationOverridden.java | 37 ++++++
...rtyLayoutNamedVm_updateWithParameterLayout.java | 38 ++++++
.../dom/types/isis/markups/jdo/IsisMarkupJdo.java | 1 -
.../dom/types/isis/markups/vm/IsisMarkupVm.java | 2 +-
.../viewer/services/mementos/ObjectMementoWkt.java | 7 +-
26 files changed, 726 insertions(+), 115 deletions(-)
create mode 100644 examples/demo/domain/src/main/java/demoapp/dom/annotations/PropertyLayout/multiLine/MultiLineMetaAnnotation.java
delete mode 100644 examples/demo/domain/src/main/java/demoapp/dom/annotations/PropertyLayout/multiLine/PropertyLayoutMultiLineMetaAnnotation.java
create mode 100644 examples/demo/domain/src/main/java/demoapp/dom/annotations/PropertyLayout/multiLine/PropertyLayoutMultiLineVm_updateWithMetaAnnotation.java
create mode 100644 examples/demo/domain/src/main/java/demoapp/dom/annotations/PropertyLayout/multiLine/PropertyLayoutMultiLineVm_updateWithMetaAnnotationOverridden.java
create mode 100644 examples/demo/domain/src/main/java/demoapp/dom/annotations/PropertyLayout/multiLine/PropertyLayoutMultiLineVm_updateWithParameterLayout.java
create mode 100644 examples/demo/domain/src/main/java/demoapp/dom/annotations/PropertyLayout/named/NamedMetaAnnotation.java
delete mode 100644 examples/demo/domain/src/main/java/demoapp/dom/annotations/PropertyLayout/named/PropertyLayoutNamedMetaAnnotation.java
create mode 100644 examples/demo/domain/src/main/java/demoapp/dom/annotations/PropertyLayout/named/PropertyLayoutNamedVm_updateWithEscapedMarkup.java
create mode 100644 examples/demo/domain/src/main/java/demoapp/dom/annotations/PropertyLayout/named/PropertyLayoutNamedVm_updateWithMarkup.java
create mode 100644 examples/demo/domain/src/main/java/demoapp/dom/annotations/PropertyLayout/named/PropertyLayoutNamedVm_updateWithMetaAnnotation.java
create mode 100644 examples/demo/domain/src/main/java/demoapp/dom/annotations/PropertyLayout/named/PropertyLayoutNamedVm_updateWithMetaAnnotationOverridden.java
create mode 100644 examples/demo/domain/src/main/java/demoapp/dom/annotations/PropertyLayout/named/PropertyLayoutNamedVm_updateWithParameterLayout.java
[isis] 02/02: ISIS-2222: fleshes out @PropertyLayout a little bit
more
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 f8f3d50e4ddbf474ba6c982f17d93d966c5d0d23
Author: danhaywood <da...@haywood-associates.co.uk>
AuthorDate: Mon Jul 13 23:12:07 2020 +0100
ISIS-2222: fleshes out @PropertyLayout a little bit more
---
.../multiLine/MultiLineMetaAnnotation.java | 25 +++++++
.../PropertyLayoutMultiLineMetaAnnotation.java | 19 ------
.../PropertyLayoutMultiLineVm-description.adoc | 78 +++++++++++++++++-----
.../multiLine/PropertyLayoutMultiLineVm.java | 46 ++++++++++---
...LayoutMultiLineVm_updateWithMetaAnnotation.java | 32 +++++++++
...LineVm_updateWithMetaAnnotationOverridden.java} | 21 +++---
...ayoutMultiLineVm_updateWithParameterLayout.java | 38 +++++++++++
.../named/PropertyLayoutNamedVm-description.adoc | 2 +-
.../named/PropertyLayoutNamedVm.java | 65 +++++++++---------
...ertyLayoutNamedVm_updateWithMetaAnnotation.java | 3 -
...NamedVm_updateWithMetaAnnotationOverridden.java | 2 -
11 files changed, 237 insertions(+), 94 deletions(-)
diff --git a/examples/demo/domain/src/main/java/demoapp/dom/annotations/PropertyLayout/multiLine/MultiLineMetaAnnotation.java b/examples/demo/domain/src/main/java/demoapp/dom/annotations/PropertyLayout/multiLine/MultiLineMetaAnnotation.java
new file mode 100644
index 0000000..745ccec
--- /dev/null
+++ b/examples/demo/domain/src/main/java/demoapp/dom/annotations/PropertyLayout/multiLine/MultiLineMetaAnnotation.java
@@ -0,0 +1,25 @@
+package demoapp.dom.annotations.PropertyLayout.multiLine;
+
+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;
+
+//tag::class[]
+@PropertyLayout(multiLine = 5) // <.>
+@ParameterLayout(multiLine = 5) // <.>
+@Inherited
+@Target({
+ ElementType.METHOD, ElementType.FIELD, // <.>
+ ElementType.PARAMETER, // <.>
+ ElementType.TYPE // <.>
+})
+@Retention(RetentionPolicy.RUNTIME)
+public @interface MultiLineMetaAnnotation {
+
+}
+//end::class[]
diff --git a/examples/demo/domain/src/main/java/demoapp/dom/annotations/PropertyLayout/multiLine/PropertyLayoutMultiLineMetaAnnotation.java b/examples/demo/domain/src/main/java/demoapp/dom/annotations/PropertyLayout/multiLine/PropertyLayoutMultiLineMetaAnnotation.java
deleted file mode 100644
index 1e1a210..0000000
--- a/examples/demo/domain/src/main/java/demoapp/dom/annotations/PropertyLayout/multiLine/PropertyLayoutMultiLineMetaAnnotation.java
+++ /dev/null
@@ -1,19 +0,0 @@
-package demoapp.dom.annotations.PropertyLayout.multiLine;
-
-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.PropertyLayout;
-
-//tag::class[]
-@PropertyLayout(multiLine = 5)
-@Inherited
-@Target({ ElementType.METHOD, ElementType.FIELD, ElementType.TYPE, ElementType.ANNOTATION_TYPE })
-@Retention(RetentionPolicy.RUNTIME)
-public @interface PropertyLayoutMultiLineMetaAnnotation {
-
-}
-//end::class[]
diff --git a/examples/demo/domain/src/main/java/demoapp/dom/annotations/PropertyLayout/multiLine/PropertyLayoutMultiLineVm-description.adoc b/examples/demo/domain/src/main/java/demoapp/dom/annotations/PropertyLayout/multiLine/PropertyLayoutMultiLineVm-description.adoc
index d859111..1d976a5 100644
--- a/examples/demo/domain/src/main/java/demoapp/dom/annotations/PropertyLayout/multiLine/PropertyLayoutMultiLineVm-description.adoc
+++ b/examples/demo/domain/src/main/java/demoapp/dom/annotations/PropertyLayout/multiLine/PropertyLayoutMultiLineVm-description.adoc
@@ -1,27 +1,44 @@
-The "multiLine" facet indicates that a multiline text field should be used to render a property.
-It is currently supported only for ``String`` properties and parameters.
+The "multiLine" facet is a hint to indicates that a multiline text field (a textbox) should be used to render a property or parameter:
-The facet can be specified using either an attribute, a meta-attribute, or the layout file.
+* for properties, the name can be specified using either the `@PropertyLayout` annotation, or a meta-annotation, or using the `Xxx.layout.xml` layout file.
-== Attribute or layout
+* for parameters, the name can be specified using either the `@ParameterLayout` annotation, or a meta-annotation.
-The facet can be specified:
+The facet is currently supported only for ``String``s.
-* using `@PropertyLayout#multiLine()`:
+== Annotation
+
+The multiline facet can be specified explicitly using an annotation:
+
+* for properties, using `@PropertyLayout#multiLine()`:
+
[source,java,indent=0]
----
include::PropertyLayoutMultiLineVm.java[tags=annotation]
----
+<.> explicitly specifies that the property should use a textbox
-* or using the layout file
+* for parameters, using `@ParameterLayout#multiLine()`:
+
[source,java,indent=0]
----
-include::PropertyLayoutMultiLineVm.java[tags=layout-file]
+include::PropertyLayoutMultiLineVm_updateWithParameterLayout.java[tags=annotation]
----
+<.> explicitly specifies that the parameter should use a textbox
+
+== Layout File
+
+For properties (not parameters), the multiline facet can be specified using the `Xxx.layout.xml` file:
+
+* property definition:
+
-where the `Xxx.layout.xml` includes:
+[source,java,indent=0]
+----
+include::PropertyLayoutMultiLineVm.java[tags=layout-file]
+----
+<.> `multiLine` attribute is _not_ present.
+
+* layout file snippet:
+
[source,xml,indent=0,tabsize=4]
----
@@ -30,28 +47,59 @@ where the `Xxx.layout.xml` includes:
// TODO: for some reason this doesn't include correctly in the app...
//include::PropertyLayoutMultiLineVm.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.
+
== Meta-annotations
-The facet can also be specified using a custom meta-annotation:
+The multiline facet can also be specified using a custom meta-annotation:
-* meta-annotation:
+* the meta-annotation is defined as:
+
[source,java]
----
-include::PropertyLayoutMultiLineMetaAnnotation.java[tags=class]
+include::MultiLineMetaAnnotation.java[tags=class]
----
-+
-applied to property:
+<.> 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::PropertyLayoutMultiLineVm.java[tags=meta-annotated]
----
+<.> property's multiLine facet is inherited from the meta-annotation
-* This meta-annotation can itself be overridden
+* or can be applied to a parameter:
++
+[source,java,indent=0]
+----
+include::PropertyLayoutMultiLineVm_updateWithMetaAnnotation.java[tags=meta-annotation]
+----
+<.> parameter's name is inherited from the meta-annotation
+
+The meta-annotation can itself be overridden:
+
+* in a property:
+
[source,java,indent=0]
----
include::PropertyLayoutMultiLineVm.java[tags=meta-annotated-overridden]
----
+<.> name from meta-annotation ...
+<.> \... is overridden by the `@PropertyLayout` annotation
+
+* or a parameter:
++
+[source,java,indent=0]
+----
+include::PropertyLayoutMultiLineVm_updateWithMetaAnnotationOverridden.java[tags=meta-annotation-overridden]
+----
+<.> name from meta-annotation ...
+<.> \... is overridden by the `@ParameterLayout` annotation
diff --git a/examples/demo/domain/src/main/java/demoapp/dom/annotations/PropertyLayout/multiLine/PropertyLayoutMultiLineVm.java b/examples/demo/domain/src/main/java/demoapp/dom/annotations/PropertyLayout/multiLine/PropertyLayoutMultiLineVm.java
index 909f85a..46b221f 100644
--- a/examples/demo/domain/src/main/java/demoapp/dom/annotations/PropertyLayout/multiLine/PropertyLayoutMultiLineVm.java
+++ b/examples/demo/domain/src/main/java/demoapp/dom/annotations/PropertyLayout/multiLine/PropertyLayoutMultiLineVm.java
@@ -55,17 +55,29 @@ public class PropertyLayoutMultiLineVm implements HasAsciiDocDescription {
//tag::annotation[]
@Property(optionality = Optionality.OPTIONAL)
- @PropertyLayout(multiLine = 5, describedAs = "@PropertyLayout(multiLine = 5)", hidden = Where.ALL_TABLES)
- @MemberOrder(name = "multiLine", sequence = "1")
+ @PropertyLayout(
+ multiLine = 5 // <.>
+ , describedAs = "@PropertyLayout(" +
+ "multiLine = 5)"
+ , hidden = Where.ALL_TABLES
+ )
+ @MemberOrder(name = "properties", sequence = "1")
@XmlElement(required = false)
@Getter @Setter
private String propertyUsingAnnotation;
//end::annotation[]
//tag::annotation-readonly[]
- @Property(optionality = Optionality.OPTIONAL, editing = Editing.DISABLED)
- @PropertyLayout(multiLine = 5, describedAs = "@PropertyLayout(multiLine = 5)", hidden = Where.ALL_TABLES)
- @MemberOrder(name = "multiLine", sequence = "1")
+ @Property(
+ optionality = Optionality.OPTIONAL
+ , editing = Editing.DISABLED // <.>
+ )
+ @PropertyLayout(
+ multiLine = 5
+ , describedAs = "@PropertyLayout(" +
+ "multiLine = 5)"
+ , hidden = Where.ALL_TABLES)
+ @MemberOrder(name = "properties", sequence = "2")
@XmlElement(required = false)
@Getter @Setter
private String propertyUsingAnnotationReadOnly;
@@ -73,8 +85,12 @@ public class PropertyLayoutMultiLineVm implements HasAsciiDocDescription {
//tag::layout-file[]
@Property(optionality = Optionality.OPTIONAL)
- @PropertyLayout(describedAs = "<cpt:property id=\"...\" multiLine=\"5\"/>", hidden = Where.ALL_TABLES)
- @MemberOrder(name = "multiLine", sequence = "2")
+ @PropertyLayout( // <.>
+ describedAs =
+ "<cpt:property id=\"...\" multiLine=\"5\"/>"
+ , hidden = Where.ALL_TABLES
+ )
+ @MemberOrder(name = "properties", sequence = "3")
@XmlElement(required = false)
@Getter @Setter
private String propertyUsingLayout;
@@ -82,8 +98,11 @@ public class PropertyLayoutMultiLineVm implements HasAsciiDocDescription {
//tag::meta-annotated[]
@Property(optionality = Optionality.OPTIONAL)
- @PropertyLayoutMultiLineMetaAnnotation
- @PropertyLayout(describedAs = "@PropertyLayoutMultiLineMetaAnnotation", hidden = Where.ALL_TABLES)
+ @MultiLineMetaAnnotation // <.>
+ @PropertyLayout(
+ describedAs = "@MultiLineMetaAnnotation"
+ , hidden = Where.ALL_TABLES
+ )
@MemberOrder(name = "meta-annotated", sequence = "1")
@XmlElement(required = false)
@Getter @Setter
@@ -92,8 +111,13 @@ public class PropertyLayoutMultiLineVm implements HasAsciiDocDescription {
//tag::meta-annotated-overridden[]
@Property(optionality = Optionality.OPTIONAL)
- @PropertyLayoutMultiLineMetaAnnotation
- @PropertyLayout(multiLine = 3, describedAs = "meta-annotation overridden using @PropertyLayout(...)", hidden = Where.ALL_TABLES)
+ @MultiLineMetaAnnotation // <.>
+ @PropertyLayout(
+ multiLine = 3 // <.>
+ , describedAs =
+ "meta-annotation overridden using @PropertyLayout(...)"
+ , hidden = Where.ALL_TABLES
+ )
@MemberOrder(name = "meta-annotated", sequence = "2")
@XmlElement(required = false)
@Getter @Setter
diff --git a/examples/demo/domain/src/main/java/demoapp/dom/annotations/PropertyLayout/multiLine/PropertyLayoutMultiLineVm_updateWithMetaAnnotation.java b/examples/demo/domain/src/main/java/demoapp/dom/annotations/PropertyLayout/multiLine/PropertyLayoutMultiLineVm_updateWithMetaAnnotation.java
new file mode 100644
index 0000000..e7a73df
--- /dev/null
+++ b/examples/demo/domain/src/main/java/demoapp/dom/annotations/PropertyLayout/multiLine/PropertyLayoutMultiLineVm_updateWithMetaAnnotation.java
@@ -0,0 +1,32 @@
+package demoapp.dom.annotations.PropertyLayout.multiLine;
+
+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.SemanticsOf;
+
+import lombok.RequiredArgsConstructor;
+
+@Action(
+ semantics = SemanticsOf.IDEMPOTENT,
+ associateWith = "propertyUsingMetaAnnotation", associateWithSequence = "1"
+)
+@RequiredArgsConstructor
+public class PropertyLayoutMultiLineVm_updateWithMetaAnnotation {
+
+ private final PropertyLayoutMultiLineVm propertyLayoutMultiLineVm;
+
+//tag::meta-annotation[]
+ public PropertyLayoutMultiLineVm act(
+ @Parameter(optionality = Optionality.OPTIONAL)
+ @MultiLineMetaAnnotation // <.>
+ final String newValue) {
+ propertyLayoutMultiLineVm.setPropertyUsingMetaAnnotation(newValue);
+ return propertyLayoutMultiLineVm;
+ }
+//end::meta-annotation[]
+ public String default0Act() {
+ return propertyLayoutMultiLineVm.getPropertyUsingMetaAnnotation();
+ }
+
+}
diff --git a/examples/demo/domain/src/main/java/demoapp/dom/annotations/PropertyLayout/named/PropertyLayoutNamedVm_updateWithMetaAnnotationOverridden.java b/examples/demo/domain/src/main/java/demoapp/dom/annotations/PropertyLayout/multiLine/PropertyLayoutMultiLineVm_updateWithMetaAnnotationOverridden.java
similarity index 53%
copy from examples/demo/domain/src/main/java/demoapp/dom/annotations/PropertyLayout/named/PropertyLayoutNamedVm_updateWithMetaAnnotationOverridden.java
copy to examples/demo/domain/src/main/java/demoapp/dom/annotations/PropertyLayout/multiLine/PropertyLayoutMultiLineVm_updateWithMetaAnnotationOverridden.java
index a3af2ce..9bcbca9 100644
--- a/examples/demo/domain/src/main/java/demoapp/dom/annotations/PropertyLayout/named/PropertyLayoutNamedVm_updateWithMetaAnnotationOverridden.java
+++ b/examples/demo/domain/src/main/java/demoapp/dom/annotations/PropertyLayout/multiLine/PropertyLayoutMultiLineVm_updateWithMetaAnnotationOverridden.java
@@ -1,39 +1,38 @@
-package demoapp.dom.annotations.PropertyLayout.named;
+package demoapp.dom.annotations.PropertyLayout.multiLine;
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 org.apache.isis.applib.annotation.Where;
import lombok.RequiredArgsConstructor;
+import demoapp.dom.annotations.PropertyLayout.named.NamedMetaAnnotation;
+
@Action(
semantics = SemanticsOf.IDEMPOTENT,
associateWith = "propertyUsingMetaAnnotationButOverridden", associateWithSequence = "1"
- // , hidden = Where.EVERYWHERE // TODO: meta-annotations seem not to be picked up.
)
@RequiredArgsConstructor
-public class PropertyLayoutNamedVm_updateWithMetaAnnotationOverridden {
+public class PropertyLayoutMultiLineVm_updateWithMetaAnnotationOverridden {
- private final PropertyLayoutNamedVm propertyLayoutNamedVm;
+ private final PropertyLayoutMultiLineVm propertyLayoutMultiLineVm;
//tag::meta-annotation-overridden[]
- public PropertyLayoutNamedVm act(
+ public PropertyLayoutMultiLineVm act(
@Parameter(optionality = Optionality.OPTIONAL)
@NamedMetaAnnotation // <.>
@ParameterLayout(
- named = "@ParameterLayout name " +
- "overrides meta-annotation" // <.>
+ multiLine = 3 // <.>
)
final String newValue) {
- propertyLayoutNamedVm.setPropertyUsingMetaAnnotationButOverridden(newValue);
- return propertyLayoutNamedVm;
+ propertyLayoutMultiLineVm.setPropertyUsingMetaAnnotationButOverridden(newValue);
+ return propertyLayoutMultiLineVm;
}
//end::meta-annotation-overridden[]
public String default0Act() {
- return propertyLayoutNamedVm.getPropertyUsingMetaAnnotationButOverridden();
+ return propertyLayoutMultiLineVm.getPropertyUsingMetaAnnotationButOverridden();
}
}
diff --git a/examples/demo/domain/src/main/java/demoapp/dom/annotations/PropertyLayout/multiLine/PropertyLayoutMultiLineVm_updateWithParameterLayout.java b/examples/demo/domain/src/main/java/demoapp/dom/annotations/PropertyLayout/multiLine/PropertyLayoutMultiLineVm_updateWithParameterLayout.java
new file mode 100644
index 0000000..d295fb0
--- /dev/null
+++ b/examples/demo/domain/src/main/java/demoapp/dom/annotations/PropertyLayout/multiLine/PropertyLayoutMultiLineVm_updateWithParameterLayout.java
@@ -0,0 +1,38 @@
+package demoapp.dom.annotations.PropertyLayout.multiLine;
+
+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 = "propertyUsingAnnotation", associateWithSequence = "1"
+)
+@RequiredArgsConstructor
+public class PropertyLayoutMultiLineVm_updateWithParameterLayout {
+
+ private final PropertyLayoutMultiLineVm propertyLayoutMultiLineVm;
+
+//tag::annotation[]
+ public PropertyLayoutMultiLineVm act(
+ @Parameter(optionality = Optionality.OPTIONAL)
+ @ParameterLayout(
+ named = "Named using @ParameterLayout" // <.>
+ , describedAs =
+ "@ParameterLayout(named = " +
+ "\"Named using @ParameterLayout\")"
+ )
+ final String newValue) {
+ propertyLayoutMultiLineVm.setPropertyUsingAnnotation(newValue);
+ return propertyLayoutMultiLineVm;
+ }
+//end::annotation[]
+ public String default0Act() {
+ return propertyLayoutMultiLineVm.getPropertyUsingAnnotation();
+ }
+
+}
diff --git a/examples/demo/domain/src/main/java/demoapp/dom/annotations/PropertyLayout/named/PropertyLayoutNamedVm-description.adoc b/examples/demo/domain/src/main/java/demoapp/dom/annotations/PropertyLayout/named/PropertyLayoutNamedVm-description.adoc
index b05d941..08a5530 100644
--- a/examples/demo/domain/src/main/java/demoapp/dom/annotations/PropertyLayout/named/PropertyLayoutNamedVm-description.adoc
+++ b/examples/demo/domain/src/main/java/demoapp/dom/annotations/PropertyLayout/named/PropertyLayoutNamedVm-description.adoc
@@ -13,7 +13,7 @@ This can optionally be escaped.
== Annotation
-The name can be specified using explicitly using an annotation.
+The name can be specified explicitly using an annotation:
* for properties, using `@PropertyLayout#named()`:
+
diff --git a/examples/demo/domain/src/main/java/demoapp/dom/annotations/PropertyLayout/named/PropertyLayoutNamedVm.java b/examples/demo/domain/src/main/java/demoapp/dom/annotations/PropertyLayout/named/PropertyLayoutNamedVm.java
index 1170fd3..5a61421 100644
--- a/examples/demo/domain/src/main/java/demoapp/dom/annotations/PropertyLayout/named/PropertyLayoutNamedVm.java
+++ b/examples/demo/domain/src/main/java/demoapp/dom/annotations/PropertyLayout/named/PropertyLayoutNamedVm.java
@@ -81,38 +81,6 @@ public class PropertyLayoutNamedVm implements HasAsciiDocDescription {
private String propertyUsingLayout;
//end::layout-file[]
-//tag::markup[]
- @Property(optionality = Optionality.OPTIONAL)
- @PropertyLayout(
- named = "Named <b>uses</b> <i>markup</i>", // <.>
- namedEscaped = false // <.>
- , describedAs = "@PropertyLayout(" +
- "named= \"Named <b>uses</b> <i>markup</i>\"" +
- ", namedEscaped=false)"
- , hidden = Where.ALL_TABLES
- )
- @MemberOrder(name = "markup", sequence = "1")
- @XmlElement(required = false)
- @Getter @Setter
- private String propertyUsingMarkup;
-//end::markup[]
-
-//tag::markup-escaped[]
- @Property(optionality = Optionality.OPTIONAL)
- @PropertyLayout(
- named = "Named <b>but</b> <i>escaped</i>", // <.>
- namedEscaped = true // <.>
- , describedAs = "@PropertyLayout(named= " +
- "\"Named <b>but</b> <i>unescaped</i>\"" +
- ", namedEscaped=true)"
- , hidden = Where.ALL_TABLES
- )
- @MemberOrder(name = "markup", sequence = "2")
- @XmlElement(required = false)
- @Getter @Setter
- private String propertyUsingEscapedMarkup;
-//end::markup-escaped[]
-
//tag::meta-annotated[]
@Property(optionality = Optionality.OPTIONAL)
@NamedMetaAnnotation // <.>
@@ -142,5 +110,38 @@ public class PropertyLayoutNamedVm implements HasAsciiDocDescription {
private String propertyUsingMetaAnnotationButOverridden;
//end::meta-annotated-overridden[]
+ //tag::markup[]
+ @Property(optionality = Optionality.OPTIONAL)
+ @PropertyLayout(
+ named = "Named <b>uses</b> <i>markup</i>", // <.>
+ namedEscaped = false // <.>
+ , describedAs = "@PropertyLayout(" +
+ "named= \"Named <b>uses</b> <i>markup</i>\"" +
+ ", namedEscaped=false)"
+ , hidden = Where.ALL_TABLES
+ )
+ @MemberOrder(name = "markup", sequence = "1")
+ @XmlElement(required = false)
+ @Getter @Setter
+ private String propertyUsingMarkup;
+//end::markup[]
+
+ //tag::markup-escaped[]
+ @Property(optionality = Optionality.OPTIONAL)
+ @PropertyLayout(
+ named = "Named <b>but</b> <i>escaped</i>", // <.>
+ namedEscaped = true // <.>
+ , describedAs = "@PropertyLayout(named= " +
+ "\"Named <b>but</b> <i>unescaped</i>\"" +
+ ", namedEscaped=true)"
+ , hidden = Where.ALL_TABLES
+ )
+ @MemberOrder(name = "markup", sequence = "2")
+ @XmlElement(required = false)
+ @Getter @Setter
+ private String propertyUsingEscapedMarkup;
+//end::markup-escaped[]
+
+
}
//end::class[]
diff --git a/examples/demo/domain/src/main/java/demoapp/dom/annotations/PropertyLayout/named/PropertyLayoutNamedVm_updateWithMetaAnnotation.java b/examples/demo/domain/src/main/java/demoapp/dom/annotations/PropertyLayout/named/PropertyLayoutNamedVm_updateWithMetaAnnotation.java
index 9833558..3901f16 100644
--- a/examples/demo/domain/src/main/java/demoapp/dom/annotations/PropertyLayout/named/PropertyLayoutNamedVm_updateWithMetaAnnotation.java
+++ b/examples/demo/domain/src/main/java/demoapp/dom/annotations/PropertyLayout/named/PropertyLayoutNamedVm_updateWithMetaAnnotation.java
@@ -3,16 +3,13 @@ package demoapp.dom.annotations.PropertyLayout.named;
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 org.apache.isis.applib.annotation.Where;
import lombok.RequiredArgsConstructor;
@Action(
semantics = SemanticsOf.IDEMPOTENT,
associateWith = "propertyUsingMetaAnnotation", associateWithSequence = "1"
- // ,hidden = Where.EVERYWHERE // TODO: meta-annotations seem not to be picked up.
)
@RequiredArgsConstructor
public class PropertyLayoutNamedVm_updateWithMetaAnnotation {
diff --git a/examples/demo/domain/src/main/java/demoapp/dom/annotations/PropertyLayout/named/PropertyLayoutNamedVm_updateWithMetaAnnotationOverridden.java b/examples/demo/domain/src/main/java/demoapp/dom/annotations/PropertyLayout/named/PropertyLayoutNamedVm_updateWithMetaAnnotationOverridden.java
index a3af2ce..74e997c 100644
--- a/examples/demo/domain/src/main/java/demoapp/dom/annotations/PropertyLayout/named/PropertyLayoutNamedVm_updateWithMetaAnnotationOverridden.java
+++ b/examples/demo/domain/src/main/java/demoapp/dom/annotations/PropertyLayout/named/PropertyLayoutNamedVm_updateWithMetaAnnotationOverridden.java
@@ -5,14 +5,12 @@ 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 org.apache.isis.applib.annotation.Where;
import lombok.RequiredArgsConstructor;
@Action(
semantics = SemanticsOf.IDEMPOTENT,
associateWith = "propertyUsingMetaAnnotationButOverridden", associateWithSequence = "1"
- // , hidden = Where.EVERYWHERE // TODO: meta-annotations seem not to be picked up.
)
@RequiredArgsConstructor
public class PropertyLayoutNamedVm_updateWithMetaAnnotationOverridden {
[isis] 01/02: ISIS-2222: fleshes out @PropertyLayout a little bit
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 2de5d524454338d3d98ff63b2c107142d7f89933
Author: danhaywood <da...@haywood-associates.co.uk>
AuthorDate: Mon Jul 13 22:45:00 2020 +0100
ISIS-2222: fleshes out @PropertyLayout a little bit
---
.../annotations/ActionLayout/ActionLayoutMenu.java | 1 -
.../PropertyLayout/PropertyLayoutMenu.java | 3 +-
.../PropertyLayoutCssClassVm-description.adoc | 52 ++++++++-
.../cssClass/PropertyLayoutCssClassVm.java | 10 +-
.../cssClass/PropertyLayoutCssClassVm.layout.xml | 2 +
.../PropertyLayoutMultiLineVm-description.adoc | 51 ++++++++-
.../multiLine/PropertyLayoutMultiLineVm.java | 23 +++-
.../multiLine/PropertyLayoutMultiLineVm.layout.xml | 3 +
.../PropertyLayout/named/NamedMetaAnnotation.java | 25 ++++
.../named/PropertyLayoutNamedMetaAnnotation.java | 19 ---
.../named/PropertyLayoutNamedVm-description.adoc | 127 +++++++++++++++++----
.../named/PropertyLayoutNamedVm.java | 49 ++++++--
.../named/PropertyLayoutNamedVm.layout.xml | 2 +-
...pertyLayoutNamedVm_updateWithEscapedMarkup.java | 40 +++++++
.../PropertyLayoutNamedVm_updateWithMarkup.java | 42 +++++++
...ertyLayoutNamedVm_updateWithMetaAnnotation.java | 35 ++++++
...NamedVm_updateWithMetaAnnotationOverridden.java | 39 +++++++
...rtyLayoutNamedVm_updateWithParameterLayout.java | 38 ++++++
.../dom/types/isis/markups/jdo/IsisMarkupJdo.java | 1 -
.../dom/types/isis/markups/vm/IsisMarkupVm.java | 2 +-
20 files changed, 496 insertions(+), 68 deletions(-)
diff --git a/examples/demo/domain/src/main/java/demoapp/dom/annotations/ActionLayout/ActionLayoutMenu.java b/examples/demo/domain/src/main/java/demoapp/dom/annotations/ActionLayout/ActionLayoutMenu.java
index 13ffa81..3d9dcb9 100644
--- a/examples/demo/domain/src/main/java/demoapp/dom/annotations/ActionLayout/ActionLayoutMenu.java
+++ b/examples/demo/domain/src/main/java/demoapp/dom/annotations/ActionLayout/ActionLayoutMenu.java
@@ -27,7 +27,6 @@ import org.apache.isis.applib.annotation.SemanticsOf;
import lombok.extern.log4j.Log4j2;
@DomainService(nature=NatureOfService.VIEW, objectType = "demo.ActionLayoutMenu")
-@DomainObjectLayout(named="@ActionLayout")
@Log4j2
public class ActionLayoutMenu {
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 4742cc1..830483c 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
@@ -30,7 +30,6 @@ import lombok.extern.log4j.Log4j2;
import demoapp.dom.annotations.PropertyLayout.multiLine.PropertyLayoutMultiLineVm;
@DomainService(nature=NatureOfService.VIEW, objectType = "demo.PropertyLayoutMenu")
-@DomainObjectLayout(named="@PropertyLayout")
@Log4j2
public class PropertyLayoutMenu {
@@ -43,7 +42,7 @@ public class PropertyLayoutMenu {
public demoapp.dom.annotations.PropertyLayout.multiLine.PropertyLayoutMultiLineVm multiLine(){
val vm = new PropertyLayoutMultiLineVm();
vm.setPropertyUsingAnnotation("A multiline string\nspanning\n5 lines. (click me)");
- vm.setPropertyUsingMetaAnnotation("A readonly string\nspanning\n5 lines. (but allows text select)");
+ vm.setPropertyUsingAnnotationReadOnly("A readonly string\nspanning\n5 lines. (but allows text select)");
return vm;
}
diff --git a/examples/demo/domain/src/main/java/demoapp/dom/annotations/PropertyLayout/cssClass/PropertyLayoutCssClassVm-description.adoc b/examples/demo/domain/src/main/java/demoapp/dom/annotations/PropertyLayout/cssClass/PropertyLayoutCssClassVm-description.adoc
index d40bbd9..0cd7cfa 100644
--- a/examples/demo/domain/src/main/java/demoapp/dom/annotations/PropertyLayout/cssClass/PropertyLayoutCssClassVm-description.adoc
+++ b/examples/demo/domain/src/main/java/demoapp/dom/annotations/PropertyLayout/cssClass/PropertyLayoutCssClassVm-description.adoc
@@ -1,11 +1,57 @@
-TODO
+The "cssClass" facet indicates that a property field should set the specified CSS class.
+The `application.css` file can then be used to apply styling to that CSS class.
-[source,java]
+The facet can be specified using either an attribute, a meta-attribute, or the layout file.
+
+== Attribute or layout
+
+The facet can be specified:
+
+* using `@PropertyLayout#multiLine()`:
++
+[source,java,indent=0]
+----
+include::PropertyLayoutCssClassVm.java[tags=annotation]
+----
+
+* or using the layout file
++
+[source,java,indent=0]
+----
+include::PropertyLayoutCssClassVm.java[tags=layout-file]
+----
++
+where the `Xxx.layout.xml` includes:
++
+[source,xml,indent=0,tabsize=4]
----
-include::PropertyLayoutCssClassVm.java[tags=class]
+<cpt:property id="propertyUsingLayout" cssClass="red"/>
----
+// TODO: for some reason this doesn't include correctly in the app...
+//include::PropertyLayoutCssClassVm.layout.xml[tags=layout-file]
+== Meta-annotations
+
+The facet can also be specified using a custom meta-annotation:
+
+* meta-annotation:
++
[source,java]
----
include::PropertyLayoutCssClassMetaAnnotation.java[tags=class]
----
++
+applied to property:
++
+[source,java,indent=0]
+----
+include::PropertyLayoutCssClassVm.java[tags=meta-annotated]
+----
+
+* This meta-annotation can itself be overridden
++
+[source,java,indent=0]
+----
+include::PropertyLayoutCssClassVm.java[tags=meta-annotated-overridden]
+----
+
diff --git a/examples/demo/domain/src/main/java/demoapp/dom/annotations/PropertyLayout/cssClass/PropertyLayoutCssClassVm.java b/examples/demo/domain/src/main/java/demoapp/dom/annotations/PropertyLayout/cssClass/PropertyLayoutCssClassVm.java
index 0254f64..1cf7803 100644
--- a/examples/demo/domain/src/main/java/demoapp/dom/annotations/PropertyLayout/cssClass/PropertyLayoutCssClassVm.java
+++ b/examples/demo/domain/src/main/java/demoapp/dom/annotations/PropertyLayout/cssClass/PropertyLayoutCssClassVm.java
@@ -53,20 +53,25 @@ public class PropertyLayoutCssClassVm implements HasAsciiDocDescription {
return "PropertyLayout#cssClass";
}
+//tag::annotation[]
@Property(optionality = Optionality.OPTIONAL)
@PropertyLayout(cssClass = "red", describedAs = "@PropertyLayout(cssClass=\"red\")", hidden = Where.ALL_TABLES)
@MemberOrder(name = "properties", sequence = "1")
@XmlElement(required = false)
@Getter @Setter
private String propertyUsingAnnotation;
+//end::annotation[]
+//tag::layout-file[]
@Property(optionality = Optionality.OPTIONAL)
@PropertyLayout(describedAs = "<cpt:property id=\"...\" cssClass=\"red\"/>", hidden = Where.ALL_TABLES)
@MemberOrder(name = "properties", sequence = "2")
@XmlElement(required = false)
@Getter @Setter
private String propertyUsingLayout;
+//end::layout-file[]
+ //tag::meta-annotated[]
@Property(optionality = Optionality.OPTIONAL)
@PropertyLayoutCssClassMetaAnnotation
@PropertyLayout(describedAs = "@PropertyLayoutCssClassMetaAnnotation", hidden = Where.ALL_TABLES)
@@ -74,14 +79,17 @@ public class PropertyLayoutCssClassVm implements HasAsciiDocDescription {
@XmlElement(required = false)
@Getter @Setter
private String propertyUsingMetaAnnotation;
+//end::meta-annotated[]
+//tag::meta-annotated-overridden[]
@Property(optionality = Optionality.OPTIONAL)
@PropertyLayoutCssClassMetaAnnotation
@PropertyLayout(cssClass = "blue", describedAs = "meta-annotation overridden using @PropertyLayout(...)", hidden = Where.ALL_TABLES)
@MemberOrder(name = "meta-annotated", sequence = "2")
@XmlElement(required = false)
@Getter @Setter
- private String propertyUsingMetaAnnotationOverridden;
+ private String propertyUsingMetaAnnotationButOverridden;
+//end::meta-annotated-overridden[]
}
//end::class[]
diff --git a/examples/demo/domain/src/main/java/demoapp/dom/annotations/PropertyLayout/cssClass/PropertyLayoutCssClassVm.layout.xml b/examples/demo/domain/src/main/java/demoapp/dom/annotations/PropertyLayout/cssClass/PropertyLayoutCssClassVm.layout.xml
index 2c27c02..c9b6b3d 100644
--- a/examples/demo/domain/src/main/java/demoapp/dom/annotations/PropertyLayout/cssClass/PropertyLayoutCssClassVm.layout.xml
+++ b/examples/demo/domain/src/main/java/demoapp/dom/annotations/PropertyLayout/cssClass/PropertyLayoutCssClassVm.layout.xml
@@ -19,7 +19,9 @@
<bs3:col span="6">
<cpt:fieldSet name="Properties" id="properties">
<cpt:property id="propertyUsingAnnotation"/>
+<!-- tag::layout-file[] -->
<cpt:property id="propertyUsingLayout" cssClass="red"/>
+<!-- end::layout-file[] -->
</cpt:fieldSet>
<cpt:fieldSet name="Contributed" id="contributed"/>
<cpt:fieldSet name="Meta-annotated" id="meta-annotated"/>
diff --git a/examples/demo/domain/src/main/java/demoapp/dom/annotations/PropertyLayout/multiLine/PropertyLayoutMultiLineVm-description.adoc b/examples/demo/domain/src/main/java/demoapp/dom/annotations/PropertyLayout/multiLine/PropertyLayoutMultiLineVm-description.adoc
index bada930..d859111 100644
--- a/examples/demo/domain/src/main/java/demoapp/dom/annotations/PropertyLayout/multiLine/PropertyLayoutMultiLineVm-description.adoc
+++ b/examples/demo/domain/src/main/java/demoapp/dom/annotations/PropertyLayout/multiLine/PropertyLayoutMultiLineVm-description.adoc
@@ -1,12 +1,57 @@
-TODO
+The "multiLine" facet indicates that a multiline text field should be used to render a property.
+It is currently supported only for ``String`` properties and parameters.
-[source,java]
+The facet can be specified using either an attribute, a meta-attribute, or the layout file.
+
+== Attribute or layout
+
+The facet can be specified:
+
+* using `@PropertyLayout#multiLine()`:
++
+[source,java,indent=0]
+----
+include::PropertyLayoutMultiLineVm.java[tags=annotation]
+----
+
+* or using the layout file
++
+[source,java,indent=0]
+----
+include::PropertyLayoutMultiLineVm.java[tags=layout-file]
----
-include::PropertyLayoutMultiLineVm.java[tags=class]
++
+where the `Xxx.layout.xml` includes:
++
+[source,xml,indent=0,tabsize=4]
----
+<cpt:property id="propertyUsingLayout" multiLine="5"/>
+----
+// TODO: for some reason this doesn't include correctly in the app...
+//include::PropertyLayoutMultiLineVm.layout.xml[tags=layout-file]
+
+== Meta-annotations
+The facet can also be specified using a custom meta-annotation:
+
+* meta-annotation:
++
[source,java]
----
include::PropertyLayoutMultiLineMetaAnnotation.java[tags=class]
----
++
+applied to property:
++
+[source,java,indent=0]
+----
+include::PropertyLayoutMultiLineVm.java[tags=meta-annotated]
+----
+
+* This meta-annotation can itself be overridden
++
+[source,java,indent=0]
+----
+include::PropertyLayoutMultiLineVm.java[tags=meta-annotated-overridden]
+----
diff --git a/examples/demo/domain/src/main/java/demoapp/dom/annotations/PropertyLayout/multiLine/PropertyLayoutMultiLineVm.java b/examples/demo/domain/src/main/java/demoapp/dom/annotations/PropertyLayout/multiLine/PropertyLayoutMultiLineVm.java
index 980c543..909f85a 100644
--- a/examples/demo/domain/src/main/java/demoapp/dom/annotations/PropertyLayout/multiLine/PropertyLayoutMultiLineVm.java
+++ b/examples/demo/domain/src/main/java/demoapp/dom/annotations/PropertyLayout/multiLine/PropertyLayoutMultiLineVm.java
@@ -53,35 +53,52 @@ public class PropertyLayoutMultiLineVm implements HasAsciiDocDescription {
return "PropertyLayout#multiLine";
}
+//tag::annotation[]
@Property(optionality = Optionality.OPTIONAL)
@PropertyLayout(multiLine = 5, describedAs = "@PropertyLayout(multiLine = 5)", hidden = Where.ALL_TABLES)
@MemberOrder(name = "multiLine", sequence = "1")
@XmlElement(required = false)
@Getter @Setter
private String propertyUsingAnnotation;
+//end::annotation[]
+//tag::annotation-readonly[]
+ @Property(optionality = Optionality.OPTIONAL, editing = Editing.DISABLED)
+ @PropertyLayout(multiLine = 5, describedAs = "@PropertyLayout(multiLine = 5)", hidden = Where.ALL_TABLES)
+ @MemberOrder(name = "multiLine", sequence = "1")
+ @XmlElement(required = false)
+ @Getter @Setter
+ private String propertyUsingAnnotationReadOnly;
+//end::annotation-readonly[]
+
+//tag::layout-file[]
@Property(optionality = Optionality.OPTIONAL)
@PropertyLayout(describedAs = "<cpt:property id=\"...\" multiLine=\"5\"/>", hidden = Where.ALL_TABLES)
@MemberOrder(name = "multiLine", sequence = "2")
@XmlElement(required = false)
@Getter @Setter
private String propertyUsingLayout;
+//end::layout-file[]
- @Property(optionality = Optionality.OPTIONAL, editing = Editing.DISABLED)
+//tag::meta-annotated[]
+ @Property(optionality = Optionality.OPTIONAL)
@PropertyLayoutMultiLineMetaAnnotation
@PropertyLayout(describedAs = "@PropertyLayoutMultiLineMetaAnnotation", hidden = Where.ALL_TABLES)
@MemberOrder(name = "meta-annotated", sequence = "1")
@XmlElement(required = false)
@Getter @Setter
private String propertyUsingMetaAnnotation;
+//end::meta-annotated[]
- @Property(optionality = Optionality.OPTIONAL, editing = Editing.DISABLED)
+//tag::meta-annotated-overridden[]
+ @Property(optionality = Optionality.OPTIONAL)
@PropertyLayoutMultiLineMetaAnnotation
@PropertyLayout(multiLine = 3, describedAs = "meta-annotation overridden using @PropertyLayout(...)", hidden = Where.ALL_TABLES)
@MemberOrder(name = "meta-annotated", sequence = "2")
@XmlElement(required = false)
@Getter @Setter
- private String usingMetaAnnotationButOverridden;
+ private String propertyUsingMetaAnnotationButOverridden;
+//end::meta-annotated-overridden[]
}
//end::class[]
diff --git a/examples/demo/domain/src/main/java/demoapp/dom/annotations/PropertyLayout/multiLine/PropertyLayoutMultiLineVm.layout.xml b/examples/demo/domain/src/main/java/demoapp/dom/annotations/PropertyLayout/multiLine/PropertyLayoutMultiLineVm.layout.xml
index 5ccf9fb..753644d 100644
--- a/examples/demo/domain/src/main/java/demoapp/dom/annotations/PropertyLayout/multiLine/PropertyLayoutMultiLineVm.layout.xml
+++ b/examples/demo/domain/src/main/java/demoapp/dom/annotations/PropertyLayout/multiLine/PropertyLayoutMultiLineVm.layout.xml
@@ -19,7 +19,10 @@
<bs3:col span="6">
<cpt:fieldSet name="Properties" id="properties">
<cpt:property id="propertyUsingAnnotation"/>
+ <cpt:property id="propertyUsingAnnotationReadOnly"/>
+<!-- tag::layout-file[] -->
<cpt:property id="propertyUsingLayout" multiLine="5"/>
+<!-- end::layout-file[] -->
</cpt:fieldSet>
<cpt:fieldSet name="Meta-annotated" id="meta-annotated"/>
<cpt:fieldSet name="Other" id="other" unreferencedProperties="true"/>
diff --git a/examples/demo/domain/src/main/java/demoapp/dom/annotations/PropertyLayout/named/NamedMetaAnnotation.java b/examples/demo/domain/src/main/java/demoapp/dom/annotations/PropertyLayout/named/NamedMetaAnnotation.java
new file mode 100644
index 0000000..4e49a2f
--- /dev/null
+++ b/examples/demo/domain/src/main/java/demoapp/dom/annotations/PropertyLayout/named/NamedMetaAnnotation.java
@@ -0,0 +1,25 @@
+package demoapp.dom.annotations.PropertyLayout.named;
+
+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;
+
+//tag::class[]
+@PropertyLayout(named = "Named from meta-annotation") // <.>
+@ParameterLayout(named = "Named from meta-annotation") // <.>
+@Inherited
+@Target({
+ ElementType.METHOD, ElementType.FIELD, // <.>
+ ElementType.PARAMETER, // <.>
+ ElementType.TYPE // <.>
+})
+@Retention(RetentionPolicy.RUNTIME)
+public @interface NamedMetaAnnotation {
+
+}
+//end::class[]
diff --git a/examples/demo/domain/src/main/java/demoapp/dom/annotations/PropertyLayout/named/PropertyLayoutNamedMetaAnnotation.java b/examples/demo/domain/src/main/java/demoapp/dom/annotations/PropertyLayout/named/PropertyLayoutNamedMetaAnnotation.java
deleted file mode 100644
index 82758e7..0000000
--- a/examples/demo/domain/src/main/java/demoapp/dom/annotations/PropertyLayout/named/PropertyLayoutNamedMetaAnnotation.java
+++ /dev/null
@@ -1,19 +0,0 @@
-package demoapp.dom.annotations.PropertyLayout.named;
-
-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.PropertyLayout;
-
-//tag::class[]
-@PropertyLayout(named = "Named from meta-annotation")
-@Inherited
-@Target({ ElementType.METHOD, ElementType.FIELD, ElementType.TYPE, ElementType.ANNOTATION_TYPE })
-@Retention(RetentionPolicy.RUNTIME)
-public @interface PropertyLayoutNamedMetaAnnotation {
-
-}
-//end::class[]
diff --git a/examples/demo/domain/src/main/java/demoapp/dom/annotations/PropertyLayout/named/PropertyLayoutNamedVm-description.adoc b/examples/demo/domain/src/main/java/demoapp/dom/annotations/PropertyLayout/named/PropertyLayoutNamedVm-description.adoc
index 4208bf4..b05d941 100644
--- a/examples/demo/domain/src/main/java/demoapp/dom/annotations/PropertyLayout/named/PropertyLayoutNamedVm-description.adoc
+++ b/examples/demo/domain/src/main/java/demoapp/dom/annotations/PropertyLayout/named/PropertyLayoutNamedVm-description.adoc
@@ -1,29 +1,49 @@
-The `@PropertyLayout#named()` attribute (and its equivalent in the layout file) allows the name of the property to be overridden.
+Normally the name of a property _and_ also a parameter is inferred from its name in code.
+This inferred name can be however be overridden using various mechanisms with an explicit value.
+This is useful for example if the desired name is a Java keyword (such as "default", or "package") and therefore cannot be used as a variable name.
+
+* for properties, the name can be specified using either the `@PropertyLayout` annotation, or a meta-annotation, or using the `Xxx.layout.xml` layout file.
+
+* for parameters, the name can be specified using either the `@ParameterLayout` annotation, or a meta-annotation.
-This can be useful if the desired name is a Java keyword (such as "default", or "package") that cannot be used as a variable name.
Names can also include HTML markup.
-The associated `namedEscaped()` attribute can be used to indicate whether to escape any HTML markup.
+This can optionally be escaped.
-== Attribute or layout
-The name can be specified:
+== Annotation
-* using `@PropertyLayout#named()`:
+The name can be specified using explicitly using an annotation.
+
+* for properties, using `@PropertyLayout#named()`:
+
[source,java,indent=0]
----
include::PropertyLayoutNamedVm.java[tags=annotation]
----
+<.> explicitly specifies name of the property
-* or using the layout file
+* for parameters, using `@ParameterLayout#named()`:
+
[source,java,indent=0]
----
-include::PropertyLayoutNamedVm.java[tags=annotation]
+include::PropertyLayoutNamedVm_updateWithParameterLayout.java[tags=annotation]
----
+<.> explicitly specifies name of the parameter
+
+== Layout File
+
+For properties (not parameters), the name can be specified using the `Xxx.layout.xml` file:
+
+* property definition:
+
-where the `layout.xml` is:
+[source,java,indent=0]
+----
+include::PropertyLayoutNamedVm.java[tags=layout-file]
+----
+<.> `named` attribute is _not_ present.
+
+* layout file snippet:
+
[source,xml,indent=0,tabsize=4]
----
@@ -32,49 +52,106 @@ where the `layout.xml` is:
</cpt:property>
----
// TODO: for some reason this doesn't include correctly in the app...
-
//include::PropertyLayoutNamedVm.layout.xml[tags=layout-file]
-== Markup
+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.
-The name can include HTML markup.
+== Meta-annotations
+
+The name can also be specified using a custom meta-annotation:
+
+* the meta-annotation is defined as:
++
+[source,java]
+----
+include::NamedMetaAnnotation.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)
-* Name with markup (not escaped):
+* and can be applied to a property:
+
[source,java,indent=0]
----
-include::PropertyLayoutNamedVm.java[tags=markup]
+include::PropertyLayoutNamedVm.java[tags=meta-annotated]
----
+<.> property's name is inherited from the meta-annotation
-* Named with markup (but escaped using `namedEscaped`):
+* or can be applied to a parameter:
++
+[source,java,indent=0]
+----
+include::PropertyLayoutNamedVm_updateWithMetaAnnotation.java[tags=meta-annotation]
+----
+<.> parameter's name is inherited from the meta-annotation
+The meta-annotation can itself be overridden:
+
+* in a property:
++
[source,java,indent=0]
----
-include::PropertyLayoutNamedVm.java[tags=markup-escaped]
+include::PropertyLayoutNamedVm.java[tags=meta-annotated-overridden]
+----
+<.> name from meta-annotation ...
+<.> \... is overridden by the `@PropertyLayout` annotation
+
+* or a parameter:
++
+[source,java,indent=0]
+----
+include::PropertyLayoutNamedVm_updateWithMetaAnnotationOverridden.java[tags=meta-annotation-overridden]
----
+<.> name from meta-annotation ...
+<.> \... is overridden by the `@ParameterLayout` annotation
-== Meta-annotations
+== Markup
-The name can also be specified using a custom meta-annotation:
+The name can include HTML markup:
-* meta-annotation:
+* for a property:
+
-[source,java]
+[source,java,indent=0]
----
-include::PropertyLayoutNamedMetaAnnotation.java[tags=class]
+include::PropertyLayoutNamedVm.java[tags=markup]
----
+<.> Name includes HTML markup
+<.> which is rendered as HTML provided that escaping is switched off
+
+* and for a parameter:
+
-applied to property:
+[source,java,indent=0]
+----
+include::PropertyLayoutNamedVm_updateWithMarkup.java[tags=markup]
+----
+<.> Name includes HTML markup
+<.> which is rendered as HTML provided that escaping is switched off
+
+
+
+The HTML markup can also be escaped, using the `namedEscaped` attribute:
+
+* for a property:
+
[source,java,indent=0]
----
-include::PropertyLayoutNamedVm.java[tags=meta-annotated]
+include::PropertyLayoutNamedVm.java[tags=markup-escaped]
----
+<.> Name includes HTML markup
+<.> which is rendered as is if escaping is enabled
-* This meta-annotation can itself be overridden
+* and for a parameter:
+
[source,java,indent=0]
----
-include::PropertyLayoutNamedVm.java[tags=meta-annotated-overridden]
+include::PropertyLayoutNamedVm_updateWithEscapedMarkup.java[tags=escaped-markup]
----
+<.> Name includes HTML markup
+<.> which is rendered as is if escaping is enabled
+
diff --git a/examples/demo/domain/src/main/java/demoapp/dom/annotations/PropertyLayout/named/PropertyLayoutNamedVm.java b/examples/demo/domain/src/main/java/demoapp/dom/annotations/PropertyLayout/named/PropertyLayoutNamedVm.java
index 2218d3f..1170fd3 100644
--- a/examples/demo/domain/src/main/java/demoapp/dom/annotations/PropertyLayout/named/PropertyLayoutNamedVm.java
+++ b/examples/demo/domain/src/main/java/demoapp/dom/annotations/PropertyLayout/named/PropertyLayoutNamedVm.java
@@ -55,7 +55,12 @@ public class PropertyLayoutNamedVm implements HasAsciiDocDescription {
//tag::annotation[]
@Property(optionality = Optionality.OPTIONAL)
- @PropertyLayout(named = "Named using annotation", describedAs = "@PropertyLayout(named= \"Named using annotation\")", hidden = Where.ALL_TABLES)
+ @PropertyLayout(
+ named = "Named using annotation" // <.>
+ , describedAs = "@PropertyLayout(" +
+ "named= \"Named using annotation\")"
+ , hidden = Where.ALL_TABLES
+ )
@MemberOrder(name = "properties", sequence = "1")
@XmlElement(required = false)
@Getter @Setter
@@ -64,7 +69,12 @@ public class PropertyLayoutNamedVm implements HasAsciiDocDescription {
//tag::layout-file[]
@Property(optionality = Optionality.OPTIONAL)
- @PropertyLayout(describedAs = "<cpt:property id=\"...\"><cpt:named>...</cpt:named></cpt:property>", hidden = Where.ALL_TABLES)
+ @PropertyLayout( // <.>
+ describedAs = "<cpt:property id=\"...\">" +
+ "<cpt:named>...</cpt:named>" +
+ "</cpt:property>"
+ , hidden = Where.ALL_TABLES
+ )
@MemberOrder(name = "properties", sequence = "2")
@XmlElement(required = false)
@Getter @Setter
@@ -73,7 +83,14 @@ public class PropertyLayoutNamedVm implements HasAsciiDocDescription {
//tag::markup[]
@Property(optionality = Optionality.OPTIONAL)
- @PropertyLayout(named = "Named <b>uses</b> <i>markup</i>", namedEscaped = false, describedAs = "@PropertyLayout(named= \"Named <b>uses</b> <i>markup</i>\" namedEscaped=false)", hidden = Where.ALL_TABLES)
+ @PropertyLayout(
+ named = "Named <b>uses</b> <i>markup</i>", // <.>
+ namedEscaped = false // <.>
+ , describedAs = "@PropertyLayout(" +
+ "named= \"Named <b>uses</b> <i>markup</i>\"" +
+ ", namedEscaped=false)"
+ , hidden = Where.ALL_TABLES
+ )
@MemberOrder(name = "markup", sequence = "1")
@XmlElement(required = false)
@Getter @Setter
@@ -82,7 +99,14 @@ public class PropertyLayoutNamedVm implements HasAsciiDocDescription {
//tag::markup-escaped[]
@Property(optionality = Optionality.OPTIONAL)
- @PropertyLayout(named = "Named <b>but</b> <i>escaped</i>", namedEscaped = true, describedAs = "@PropertyLayout(named= \"Named <b>but</b> <i>unescaped</i>\" namedEscaped=true)", hidden = Where.ALL_TABLES)
+ @PropertyLayout(
+ named = "Named <b>but</b> <i>escaped</i>", // <.>
+ namedEscaped = true // <.>
+ , describedAs = "@PropertyLayout(named= " +
+ "\"Named <b>but</b> <i>unescaped</i>\"" +
+ ", namedEscaped=true)"
+ , hidden = Where.ALL_TABLES
+ )
@MemberOrder(name = "markup", sequence = "2")
@XmlElement(required = false)
@Getter @Setter
@@ -91,8 +115,11 @@ public class PropertyLayoutNamedVm implements HasAsciiDocDescription {
//tag::meta-annotated[]
@Property(optionality = Optionality.OPTIONAL)
- @PropertyLayoutNamedMetaAnnotation
- @PropertyLayout(describedAs = "@PropertyLayoutNamedMetaAnnotation", hidden = Where.ALL_TABLES)
+ @NamedMetaAnnotation // <.>
+ @PropertyLayout(
+ describedAs = "@NamedMetaAnnotation"
+ , hidden = Where.ALL_TABLES
+ )
@MemberOrder(name = "meta-annotated", sequence = "1")
@XmlElement(required = false)
@Getter @Setter
@@ -101,8 +128,14 @@ public class PropertyLayoutNamedVm implements HasAsciiDocDescription {
//tag::meta-annotated-overridden[]
@Property(optionality = Optionality.OPTIONAL)
- @PropertyLayoutNamedMetaAnnotation
- @PropertyLayout(named = "Name overrides meta-annotation", describedAs = "meta-annotation overridden using @PropertyLayout(...)", hidden = Where.ALL_TABLES)
+ @NamedMetaAnnotation // <.>
+ @PropertyLayout(
+ named = "@PropertyLayout name " +
+ "overrides meta-annotation" // <.>
+ , describedAs =
+ "meta-annotation overridden using @PropertyLayout(...)"
+ , hidden = Where.ALL_TABLES
+ )
@MemberOrder(name = "meta-annotated", sequence = "2")
@XmlElement(required = false)
@Getter @Setter
diff --git a/examples/demo/domain/src/main/java/demoapp/dom/annotations/PropertyLayout/named/PropertyLayoutNamedVm.layout.xml b/examples/demo/domain/src/main/java/demoapp/dom/annotations/PropertyLayout/named/PropertyLayoutNamedVm.layout.xml
index f46aec2..d867fff 100644
--- a/examples/demo/domain/src/main/java/demoapp/dom/annotations/PropertyLayout/named/PropertyLayoutNamedVm.layout.xml
+++ b/examples/demo/domain/src/main/java/demoapp/dom/annotations/PropertyLayout/named/PropertyLayoutNamedVm.layout.xml
@@ -25,8 +25,8 @@
</cpt:property>
<!-- end::layout-file[] -->
</cpt:fieldSet>
- <cpt:fieldSet name="Markup" id="markup"/>
<cpt:fieldSet name="Meta-annotated" id="meta-annotated"/>
+ <cpt:fieldSet name="Markup" id="markup"/>
<cpt:fieldSet name="Other" id="other" unreferencedProperties="true"/>
</bs3:col>
<bs3:col span="6">
diff --git a/examples/demo/domain/src/main/java/demoapp/dom/annotations/PropertyLayout/named/PropertyLayoutNamedVm_updateWithEscapedMarkup.java b/examples/demo/domain/src/main/java/demoapp/dom/annotations/PropertyLayout/named/PropertyLayoutNamedVm_updateWithEscapedMarkup.java
new file mode 100644
index 0000000..8e1c817
--- /dev/null
+++ b/examples/demo/domain/src/main/java/demoapp/dom/annotations/PropertyLayout/named/PropertyLayoutNamedVm_updateWithEscapedMarkup.java
@@ -0,0 +1,40 @@
+package demoapp.dom.annotations.PropertyLayout.named;
+
+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 = "propertyUsingEscapedMarkup", associateWithSequence = "1"
+)
+@RequiredArgsConstructor
+public class PropertyLayoutNamedVm_updateWithEscapedMarkup {
+
+ private final PropertyLayoutNamedVm propertyLayoutNamedVm;
+
+//tag::escaped-markup[]
+ public PropertyLayoutNamedVm act(
+ @Parameter(optionality = Optionality.OPTIONAL)
+ @ParameterLayout(
+ named = "Named <b>but</b> <i>escaped</i>", // <.>
+ namedEscaped = true, // <.>
+ describedAs =
+ "@ParameterLayout(named = " +
+ "\"Named <b>but</b> <i>escaped</i>\", " +
+ "namedEscaped = true)"
+ )
+ final String newValue) {
+ propertyLayoutNamedVm.setPropertyUsingEscapedMarkup(newValue);
+ return propertyLayoutNamedVm;
+ }
+//end::escaped-markup[]
+ public String default0Act() {
+ return propertyLayoutNamedVm.getPropertyUsingEscapedMarkup();
+ }
+
+}
diff --git a/examples/demo/domain/src/main/java/demoapp/dom/annotations/PropertyLayout/named/PropertyLayoutNamedVm_updateWithMarkup.java b/examples/demo/domain/src/main/java/demoapp/dom/annotations/PropertyLayout/named/PropertyLayoutNamedVm_updateWithMarkup.java
new file mode 100644
index 0000000..2fdc2e4
--- /dev/null
+++ b/examples/demo/domain/src/main/java/demoapp/dom/annotations/PropertyLayout/named/PropertyLayoutNamedVm_updateWithMarkup.java
@@ -0,0 +1,42 @@
+package demoapp.dom.annotations.PropertyLayout.named;
+
+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.PropertyLayout;
+import org.apache.isis.applib.annotation.SemanticsOf;
+import org.apache.isis.applib.annotation.Where;
+
+import lombok.RequiredArgsConstructor;
+
+@Action(
+ semantics = SemanticsOf.IDEMPOTENT,
+ associateWith = "propertyUsingMarkup", associateWithSequence = "1"
+)
+@RequiredArgsConstructor
+public class PropertyLayoutNamedVm_updateWithMarkup {
+
+ private final PropertyLayoutNamedVm propertyLayoutNamedVm;
+
+//tag::markup[]
+ public PropertyLayoutNamedVm act(
+ @Parameter(optionality = Optionality.OPTIONAL)
+ @ParameterLayout(
+ named = "Named <b>uses</b> <i>markup</i>", // <.>
+ namedEscaped = false, // <.>
+ describedAs =
+ "@ParameterLayout(named = " +
+ "\"Named <b>uses</b> <i>markup</i>\", " +
+ "namedEscaped = false)"
+ )
+ final String newValue) {
+ propertyLayoutNamedVm.setPropertyUsingMarkup(newValue);
+ return propertyLayoutNamedVm;
+ }
+//end::markup[]
+ public String default0Act() {
+ return propertyLayoutNamedVm.getPropertyUsingMarkup();
+ }
+
+}
diff --git a/examples/demo/domain/src/main/java/demoapp/dom/annotations/PropertyLayout/named/PropertyLayoutNamedVm_updateWithMetaAnnotation.java b/examples/demo/domain/src/main/java/demoapp/dom/annotations/PropertyLayout/named/PropertyLayoutNamedVm_updateWithMetaAnnotation.java
new file mode 100644
index 0000000..9833558
--- /dev/null
+++ b/examples/demo/domain/src/main/java/demoapp/dom/annotations/PropertyLayout/named/PropertyLayoutNamedVm_updateWithMetaAnnotation.java
@@ -0,0 +1,35 @@
+package demoapp.dom.annotations.PropertyLayout.named;
+
+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 org.apache.isis.applib.annotation.Where;
+
+import lombok.RequiredArgsConstructor;
+
+@Action(
+ semantics = SemanticsOf.IDEMPOTENT,
+ associateWith = "propertyUsingMetaAnnotation", associateWithSequence = "1"
+ // ,hidden = Where.EVERYWHERE // TODO: meta-annotations seem not to be picked up.
+)
+@RequiredArgsConstructor
+public class PropertyLayoutNamedVm_updateWithMetaAnnotation {
+
+ private final PropertyLayoutNamedVm propertyLayoutNamedVm;
+
+//tag::meta-annotation[]
+ public PropertyLayoutNamedVm act(
+ @Parameter(optionality = Optionality.OPTIONAL)
+ @NamedMetaAnnotation // <.>
+ final String newValue) {
+ propertyLayoutNamedVm.setPropertyUsingMetaAnnotation(newValue);
+ return propertyLayoutNamedVm;
+ }
+//end::meta-annotation[]
+ public String default0Act() {
+ return propertyLayoutNamedVm.getPropertyUsingMetaAnnotation();
+ }
+
+}
diff --git a/examples/demo/domain/src/main/java/demoapp/dom/annotations/PropertyLayout/named/PropertyLayoutNamedVm_updateWithMetaAnnotationOverridden.java b/examples/demo/domain/src/main/java/demoapp/dom/annotations/PropertyLayout/named/PropertyLayoutNamedVm_updateWithMetaAnnotationOverridden.java
new file mode 100644
index 0000000..a3af2ce
--- /dev/null
+++ b/examples/demo/domain/src/main/java/demoapp/dom/annotations/PropertyLayout/named/PropertyLayoutNamedVm_updateWithMetaAnnotationOverridden.java
@@ -0,0 +1,39 @@
+package demoapp.dom.annotations.PropertyLayout.named;
+
+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 org.apache.isis.applib.annotation.Where;
+
+import lombok.RequiredArgsConstructor;
+
+@Action(
+ semantics = SemanticsOf.IDEMPOTENT,
+ associateWith = "propertyUsingMetaAnnotationButOverridden", associateWithSequence = "1"
+ // , hidden = Where.EVERYWHERE // TODO: meta-annotations seem not to be picked up.
+)
+@RequiredArgsConstructor
+public class PropertyLayoutNamedVm_updateWithMetaAnnotationOverridden {
+
+ private final PropertyLayoutNamedVm propertyLayoutNamedVm;
+
+//tag::meta-annotation-overridden[]
+ public PropertyLayoutNamedVm act(
+ @Parameter(optionality = Optionality.OPTIONAL)
+ @NamedMetaAnnotation // <.>
+ @ParameterLayout(
+ named = "@ParameterLayout name " +
+ "overrides meta-annotation" // <.>
+ )
+ final String newValue) {
+ propertyLayoutNamedVm.setPropertyUsingMetaAnnotationButOverridden(newValue);
+ return propertyLayoutNamedVm;
+ }
+//end::meta-annotation-overridden[]
+ public String default0Act() {
+ return propertyLayoutNamedVm.getPropertyUsingMetaAnnotationButOverridden();
+ }
+
+}
diff --git a/examples/demo/domain/src/main/java/demoapp/dom/annotations/PropertyLayout/named/PropertyLayoutNamedVm_updateWithParameterLayout.java b/examples/demo/domain/src/main/java/demoapp/dom/annotations/PropertyLayout/named/PropertyLayoutNamedVm_updateWithParameterLayout.java
new file mode 100644
index 0000000..5e447fa
--- /dev/null
+++ b/examples/demo/domain/src/main/java/demoapp/dom/annotations/PropertyLayout/named/PropertyLayoutNamedVm_updateWithParameterLayout.java
@@ -0,0 +1,38 @@
+package demoapp.dom.annotations.PropertyLayout.named;
+
+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 = "propertyUsingAnnotation", associateWithSequence = "1"
+)
+@RequiredArgsConstructor
+public class PropertyLayoutNamedVm_updateWithParameterLayout {
+
+ private final PropertyLayoutNamedVm propertyLayoutNamedVm;
+
+//tag::annotation[]
+ public PropertyLayoutNamedVm act(
+ @Parameter(optionality = Optionality.OPTIONAL)
+ @ParameterLayout(
+ named = "Named using @ParameterLayout" // <.>
+ , describedAs =
+ "@ParameterLayout(named = " +
+ "\"Named using @ParameterLayout\")"
+ )
+ final String newValue) {
+ propertyLayoutNamedVm.setPropertyUsingAnnotation(newValue);
+ return propertyLayoutNamedVm;
+ }
+//end::annotation[]
+ public String default0Act() {
+ return propertyLayoutNamedVm.getPropertyUsingAnnotation();
+ }
+
+}
diff --git a/examples/demo/domain/src/main/java/demoapp/dom/types/isis/markups/jdo/IsisMarkupJdo.java b/examples/demo/domain/src/main/java/demoapp/dom/types/isis/markups/jdo/IsisMarkupJdo.java
index 5b3722c..12d86e1 100644
--- a/examples/demo/domain/src/main/java/demoapp/dom/types/isis/markups/jdo/IsisMarkupJdo.java
+++ b/examples/demo/domain/src/main/java/demoapp/dom/types/isis/markups/jdo/IsisMarkupJdo.java
@@ -62,7 +62,6 @@ public class IsisMarkupJdo // <.>
return "Markup JDO entity: " + bookmarkService.bookmarkFor(this).getIdentifier();
}
- @Title(prepend = "Markup JDO entity: ")
@MemberOrder(name = "read-only-properties", sequence = "1")
@Column(allowsNull = "false", jdbcType = "CLOB") // <.>
@Getter @Setter
diff --git a/examples/demo/domain/src/main/java/demoapp/dom/types/isis/markups/vm/IsisMarkupVm.java b/examples/demo/domain/src/main/java/demoapp/dom/types/isis/markups/vm/IsisMarkupVm.java
index 52ad91f..cde7a74 100644
--- a/examples/demo/domain/src/main/java/demoapp/dom/types/isis/markups/vm/IsisMarkupVm.java
+++ b/examples/demo/domain/src/main/java/demoapp/dom/types/isis/markups/vm/IsisMarkupVm.java
@@ -70,7 +70,7 @@ public class IsisMarkupVm
private Markup readOnlyProperty;
@Property(editing = Editing.ENABLED) // <.>
- @PropertyLayout(hidden = Where.EVERYWHERE)
+ @PropertyLayout(hidden = Where.ALL_TABLES)
@MemberOrder(name = "editable-properties", sequence = "1")
@XmlElement(required = true)
@Getter @Setter