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/20 19:01:48 UTC
[isis] 01/01: ISIS-2222: fixes PropertyLayout layout file for
'repainting'
This is an automated email from the ASF dual-hosted git repository.
danhaywood pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/isis.git
commit ed299d7df917f837e2c0c062a31ba6d035a88f38
Author: danhaywood <da...@haywood-associates.co.uk>
AuthorDate: Mon Jul 20 19:55:30 2020 +0100
ISIS-2222: fixes PropertyLayout layout file for 'repainting'
(replace 'unchanging')
---
.../applib/layout/component/component.xsd | 10 +-
.../layout/component/PropertyLayoutData.java | 12 --
.../component/PropertyLayoutData_repaint_Test.java | 38 +------
.../UnchangingFacetForPropertyXml.java | 9 +-
examples/demo/domain/pom.xml | 6 +
.../PropertyLayout/PropertyLayoutMenu.java | 27 ++++-
.../repainting/PdfJsViewerAdvisorFallback.java | 28 +++++
.../PropertyLayoutRepaintingVm-description.adoc | 112 +++++++++++++++++++
.../repainting/PropertyLayoutRepaintingVm.java | 124 +++++++++++++++++++++
.../PropertyLayoutRepaintingVm.layout.xml | 49 ++++++++
.../PropertyLayoutRepaintingVm_mixinProperty.java | 52 +++++++++
...paintingVm_mixinPropertyWithMetaAnnotation.java | 51 +++++++++
..._mixinPropertyWithMetaAnnotationOverridden.java | 53 +++++++++
.../RepaintingNoRepaintMetaAnnotation.java | 24 ++++
.../RepaintingRepaintMetaAnnotation.java | 23 ++++
.../src/main/java/demoapp/dom/menubars.layout.xml | 1 +
examples/demo/wicket/pom.xml | 8 +-
.../java/demoapp/webapp/wicket/DemoAppWicket.java | 10 +-
.../wicket/ui/pages/bootstrap-overrides-all-v2.css | 1 +
19 files changed, 582 insertions(+), 56 deletions(-)
diff --git a/antora/supplemental-ui/applib/layout/component/component.xsd b/antora/supplemental-ui/applib/layout/component/component.xsd
index d4439b0..84677ff 100644
--- a/antora/supplemental-ui/applib/layout/component/component.xsd
+++ b/antora/supplemental-ui/applib/layout/component/component.xsd
@@ -100,7 +100,7 @@
<xs:attribute name="promptStyle" type="tns:promptStyle"/>
<xs:attribute name="renderedAsDayBefore" type="xs:boolean"/>
<xs:attribute name="typicalLength" type="xs:int"/>
- <xs:attribute name="unchanging" type="xs:boolean"/>
+ <xs:attribute name="repainting" type="xs:boolean"/>
</xs:complexType>
<xs:complexType name="collection">
@@ -188,4 +188,12 @@
<xs:enumeration value="NONE"/>
</xs:restriction>
</xs:simpleType>
+
+ <xs:simpleType name="repainting">
+ <xs:restriction base="xs:string">
+ <xs:enumeration value="REPAINT"/>
+ <xs:enumeration value="NO_REPAINT"/>
+ <xs:enumeration value="NOT_SPECIFIED"/>
+ </xs:restriction>
+ </xs:simpleType>
</xs:schema>
diff --git a/api/applib/src/main/java/org/apache/isis/applib/layout/component/PropertyLayoutData.java b/api/applib/src/main/java/org/apache/isis/applib/layout/component/PropertyLayoutData.java
index 817a6aa..a56700b 100644
--- a/api/applib/src/main/java/org/apache/isis/applib/layout/component/PropertyLayoutData.java
+++ b/api/applib/src/main/java/org/apache/isis/applib/layout/component/PropertyLayoutData.java
@@ -211,18 +211,6 @@ HasCssClass, HasDescribedAs, HasHidden, HasNamed {
}
- @XmlAttribute(required = false)
- public Boolean getUnchanging() {
- return getRepainting() != null ? getRepainting() == Repainting.NO_REPAINT : null;
- }
-
- public void setUnchanging(Boolean unchanging) {
- if(getRepainting() == null && unchanging != null) {
- setRepainting(unchanging ? Repainting.NO_REPAINT : Repainting.REPAINT);
- }
- }
-
-
private Repainting repainting;
@XmlAttribute(required = false)
diff --git a/api/applib/src/test/java/org/apache/isis/applib/layout/component/PropertyLayoutData_repaint_Test.java b/api/applib/src/test/java/org/apache/isis/applib/layout/component/PropertyLayoutData_repaint_Test.java
index d3881eb..f3cb74c 100644
--- a/api/applib/src/test/java/org/apache/isis/applib/layout/component/PropertyLayoutData_repaint_Test.java
+++ b/api/applib/src/test/java/org/apache/isis/applib/layout/component/PropertyLayoutData_repaint_Test.java
@@ -32,60 +32,30 @@ public class PropertyLayoutData_repaint_Test {
public void setUp() throws Exception {
data = new PropertyLayoutData();
- assertThat(data.getUnchanging(), is(nullValue()));
assertThat(data.getRepainting(), is(nullValue()));
}
@Test
- public void derive_from_setUnchanging_TRUE_when_null() throws Exception {
+ public void no_repaint() throws Exception {
// when
- data.setUnchanging(true);
+ data.setRepainting(Repainting.NO_REPAINT);
// then
assertThat(data.getRepainting(), is(Repainting.NO_REPAINT));
- assertThat(data.getUnchanging(), is(true));
}
@Test
- public void derive_from_setUnchanging_FALSE_when_null() throws Exception {
+ public void repaint() throws Exception {
// when
- data.setUnchanging(false);
+ data.setRepainting(Repainting.REPAINT);
// then
assertThat(data.getRepainting(), is(Repainting.REPAINT));
- assertThat(data.getUnchanging(), is(false));
}
- @Test
- public void ignore_from_setUnchanging_once_set_to_NO_REPAINT() throws Exception {
-
- // given
- data.setRepainting(Repainting.NO_REPAINT);
-
- // when
- data.setUnchanging(false);
-
- // then (ignored)
- assertThat(data.getRepainting(), is(Repainting.NO_REPAINT));
- assertThat(data.getUnchanging(), is(true));
- }
-
- @Test
- public void ignore_from_setUnchanging_once_set_to_REPAINT() throws Exception {
-
- // given
- data.setRepainting(Repainting.REPAINT);
-
- // when
- data.setUnchanging(true);
-
- // then (ignored)
- assertThat(data.getRepainting(), is(Repainting.REPAINT));
- assertThat(data.getUnchanging(), is(false));
- }
}
\ No newline at end of file
diff --git a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/properties/propertylayout/UnchangingFacetForPropertyXml.java b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/properties/propertylayout/UnchangingFacetForPropertyXml.java
index 07eb82a..f7643ce 100644
--- a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/properties/propertylayout/UnchangingFacetForPropertyXml.java
+++ b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/properties/propertylayout/UnchangingFacetForPropertyXml.java
@@ -19,6 +19,7 @@
package org.apache.isis.core.metamodel.facets.properties.propertylayout;
+import org.apache.isis.applib.annotation.Repainting;
import org.apache.isis.applib.layout.component.PropertyLayoutData;
import org.apache.isis.core.metamodel.facetapi.FacetHolder;
import org.apache.isis.core.metamodel.facets.properties.renderunchanged.UnchangingFacet;
@@ -30,9 +31,11 @@ public class UnchangingFacetForPropertyXml extends UnchangingFacetAbstract {
if(propertyLayout == null) {
return null;
}
- final Boolean unchanging = propertyLayout.getUnchanging();
- final boolean isUnchanging = unchanging != null && unchanging;
- return new UnchangingFacetForPropertyXml(isUnchanging, holder);
+ final Repainting repainting = propertyLayout.getRepainting();
+ if(repainting == null || repainting == Repainting.NOT_SPECIFIED) {
+ return null;
+ }
+ return new UnchangingFacetForPropertyXml(repainting == Repainting.NO_REPAINT, holder);
}
private UnchangingFacetForPropertyXml(final boolean unchanging, FacetHolder holder) {
diff --git a/examples/demo/domain/pom.xml b/examples/demo/domain/pom.xml
index db5bdaa..a0c0862 100644
--- a/examples/demo/domain/pom.xml
+++ b/examples/demo/domain/pom.xml
@@ -63,6 +63,12 @@
<dependency>
<groupId>org.apache.isis.extensions</groupId>
+ <artifactId>isis-extensions-pdfjs-applib</artifactId>
+ </dependency>
+
+
+ <dependency>
+ <groupId>org.apache.isis.extensions</groupId>
<artifactId>isis-extensions-modelannotation</artifactId>
</dependency>
<dependency>
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 b62883e..8407d3d 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,6 +18,8 @@
*/
package demoapp.dom.annotations.PropertyLayout;
+import java.util.Optional;
+
import javax.inject.Inject;
import org.apache.isis.applib.annotation.Action;
@@ -26,6 +28,7 @@ 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 org.apache.isis.applib.value.Blob;
import lombok.val;
import lombok.extern.log4j.Log4j2;
@@ -39,13 +42,15 @@ import demoapp.dom.annotations.PropertyLayout.multiLine.PropertyLayoutMultiLineV
import demoapp.dom.annotations.PropertyLayout.named.PropertyLayoutNamedVm;
import demoapp.dom.annotations.PropertyLayout.navigable.FileNodeVm;
import demoapp.dom.annotations.PropertyLayout.renderDay.PropertyLayoutRenderDayVm;
+import demoapp.dom.annotations.PropertyLayout.repainting.PropertyLayoutRepaintingVm;
+import demoapp.dom.types.Samples;
@DomainService(nature=NatureOfService.VIEW, objectType = "demo.PropertyLayoutMenu")
@Log4j2
public class PropertyLayoutMenu {
@Action(semantics = SemanticsOf.SAFE)
- @ActionLayout(cssClassFa="fa-css3", describedAs = "HTML styling")
+ @ActionLayout(cssClassFa="fa-file-code", describedAs = "HTML styling")
public PropertyLayoutCssClassVm cssClass(){
return new PropertyLayoutCssClassVm();
}
@@ -110,7 +115,27 @@ public class PropertyLayoutMenu {
return new PropertyLayoutRenderDayVm(clockService.nowAsJodaLocalDate());
}
+ @Action(semantics = SemanticsOf.SAFE)
+ @ActionLayout(cssClassFa="fa-paint-brush", describedAs = "Performance hint for properties holding unchanging large objects")
+ public PropertyLayoutRepaintingVm repainting(){
+ val vm = new PropertyLayoutRepaintingVm();
+ vm.setEditMe("Modify this field to see if repainting occurs...");
+ samples.stream()
+ .filter(x -> x.getName().endsWith(".pdf"))
+ .findFirst()
+ .ifPresent(pdfBlob -> {
+ vm.setPropertyUsingAnnotation(pdfBlob);
+ vm.setPropertyUsingLayout(pdfBlob);
+ vm.setPropertyUsingMetaAnnotation(pdfBlob);
+ vm.setPropertyUsingMetaAnnotationButOverridden(pdfBlob);
+ });
+ return vm;
+ }
+
@Inject
ClockService clockService;
+ @Inject
+ Samples<Blob> samples;
+
}
diff --git a/examples/demo/domain/src/main/java/demoapp/dom/annotations/PropertyLayout/repainting/PdfJsViewerAdvisorFallback.java b/examples/demo/domain/src/main/java/demoapp/dom/annotations/PropertyLayout/repainting/PdfJsViewerAdvisorFallback.java
new file mode 100644
index 0000000..b55c090
--- /dev/null
+++ b/examples/demo/domain/src/main/java/demoapp/dom/annotations/PropertyLayout/repainting/PdfJsViewerAdvisorFallback.java
@@ -0,0 +1,28 @@
+package demoapp.dom.annotations.PropertyLayout.repainting;
+
+import org.springframework.stereotype.Service;
+
+import org.apache.isis.applib.services.bookmark.Bookmark;
+import org.apache.isis.extensions.viewer.wicket.pdfjs.applib.config.Scale;
+import org.apache.isis.extensions.viewer.wicket.pdfjs.applib.spi.PdfJsViewerAdvisor;
+
+@Service
+public class PdfJsViewerAdvisorFallback implements PdfJsViewerAdvisor {
+
+ @Override
+ public Advice advise(InstanceKey instanceKey) {
+ return new Advice(1, new Advice.TypeAdvice(Scale._1_00, 400));
+ }
+
+ @Override
+ public void pageNumChangedTo(InstanceKey instanceKey, int pageNum) {
+ }
+
+ @Override
+ public void scaleChangedTo(InstanceKey instanceKey, Scale scale) {
+ }
+
+ @Override
+ public void heightChangedTo(InstanceKey instanceKey, int height) {
+ }
+}
diff --git a/examples/demo/domain/src/main/java/demoapp/dom/annotations/PropertyLayout/repainting/PropertyLayoutRepaintingVm-description.adoc b/examples/demo/domain/src/main/java/demoapp/dom/annotations/PropertyLayout/repainting/PropertyLayoutRepaintingVm-description.adoc
new file mode 100644
index 0000000..e317fe5
--- /dev/null
+++ b/examples/demo/domain/src/main/java/demoapp/dom/annotations/PropertyLayout/repainting/PropertyLayoutRepaintingVm-description.adoc
@@ -0,0 +1,112 @@
+The "repainting" hint indicates that the value held by the property never changes over time, even when other properties of the object do change.
+When set to "no repaint", the viewer uses this hint to not repaint the property after an AJAX update even if some other property/ies of the object have changed.
+
+* for properties, the hint can be specified using either the `@PropertyLayout` annotation, or a meta-annotation, or using the `Xxx.layout.xml` layout file.
+
+The hint does _not_ apply for action parameters.
+
+The primarily use case for performance, eg can improve the user experience when rendering PDFs/blobs.
+
+IMPORTANT: if there are multiple blobs or clobs, then _all_ must specify "NO REPAINT".
+Said another way: if only one blob/clob property requires a repaint, then all will be repainted.
+
+== Annotated
+
+The (no) repainting hint can be specified explicitly using an annotation:
+
+* for properties, using `@PropertyLayout#repainting()`:
++
+[source,java,indent=0]
+----
+include::PropertyLayoutRepaintingVm.java[tags=annotation]
+----
+<.> explicitly specifies that the property should not be repainted
+<.> The Wicket pdf.js extension will render this Blob as a PDF
+
+== 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::PropertyLayoutRepaintingVm.java[tags=layout-file]
+----
+<.> `repainting` hint is _not_ present.
+
+* layout file snippet:
++
+[source,xml,indent=0,tabsize=4]
+----
+<cpt:property id="propertyUsingLayout" repainting="NO_REPAINT"/>
+----
+
+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::PropertyLayoutRepaintingVm_mixinProperty.java[tags=class]
+----
+<.> explicitly specifies that the contributed property should not be repainted.
+
+== Meta-annotated
+
+The (no) repainting hint can also be specified using a custom meta-annotation:
+
+* the meta-annotation is defined as:
++
+[source,java]
+----
+include::RepaintingNoRepaintMetaAnnotation.java[tags=class]
+----
+<.> annotated for property (there is no equivalent for parameters)
+<.> annotation can be applied to a property (either its getter or the field directly)
+<.> annotation can be applied to a type (ie, meta-meta annotations recursively)
+
+* and can be applied to a property:
++
+[source,java,indent=0]
+----
+include::PropertyLayoutRepaintingVm.java[tags=meta-annotated]
+----
+<.> hint is inherited from the meta-annotation
+
+* or can be applied to mixin:
++
+[source,java,indent=0]
+----
+include::PropertyLayoutRepaintingVm_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::PropertyLayoutRepaintingVm.java[tags=meta-annotated-overridden]
+----
+<.> hint from meta-annotation ...
+<.> \... is overridden by the `@PropertyLayout` annotation
+
+
+* or a mixin:
++
+[source,java,indent=0]
+----
+include::PropertyLayoutRepaintingVm_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/repainting/PropertyLayoutRepaintingVm.java b/examples/demo/domain/src/main/java/demoapp/dom/annotations/PropertyLayout/repainting/PropertyLayoutRepaintingVm.java
new file mode 100644
index 0000000..7c24913
--- /dev/null
+++ b/examples/demo/domain/src/main/java/demoapp/dom/annotations/PropertyLayout/repainting/PropertyLayoutRepaintingVm.java
@@ -0,0 +1,124 @@
+/*
+ * 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.repainting;
+
+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 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.Repainting;
+import org.apache.isis.applib.value.Blob;
+import org.apache.isis.extensions.viewer.wicket.pdfjs.applib.annotations.PdfJsViewer;
+
+import lombok.Getter;
+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.PropertyLayoutRepaintingVm"
+)
+public class PropertyLayoutRepaintingVm implements HasAsciiDocDescription {
+
+ public String title() {
+ return "PropertyLayout#repainting";
+ }
+
+ @Property(editing = Editing.ENABLED, optionality = Optionality.OPTIONAL)
+ @PropertyLayout(
+ describedAs =
+ "Editable property " +
+ "(PDFs should not repaint if it changes)"
+ )
+ @MemberOrder(name = "edit", sequence = "1")
+ @XmlElement(required = false)
+ @Getter @Setter
+ private String editMe;
+
+//tag::annotation[]
+ @Property()
+ @PropertyLayout(
+ repainting = Repainting.NO_REPAINT // <.>
+ , describedAs =
+ "@PropertyLayout(repainting = NO_REPAINT)"
+ )
+ @MemberOrder(name = "annotation", sequence = "1")
+ @XmlElement(required = true)
+ @PdfJsViewer // <.>
+ @Getter @Setter
+ private Blob propertyUsingAnnotation;
+//end::annotation[]
+
+//tag::layout-file[]
+ @Property(optionality = Optionality.OPTIONAL)
+ @PropertyLayout( // <.>
+ describedAs =
+ "<cpt:property id=\"...\" repainting = \"NO_REPAINT\"/>"
+ )
+ @MemberOrder(name = "layout-file", sequence = "1")
+ @XmlElement(required = false)
+// @PdfJsViewer
+ @Getter @Setter
+ private Blob propertyUsingLayout;
+//end::layout-file[]
+
+//tag::meta-annotated[]
+ @Property(optionality = Optionality.OPTIONAL)
+ @RepaintingNoRepaintMetaAnnotation // <.>
+ @PropertyLayout(
+ describedAs = "@RepaintingNoRepaintMetaAnnotation"
+ )
+ @MemberOrder(name = "meta-annotated", sequence = "1")
+ @XmlElement(required = false)
+// @PdfJsViewer
+ @Getter @Setter
+ private Blob propertyUsingMetaAnnotation;
+//end::meta-annotated[]
+
+//tag::meta-annotated-overridden[]
+ @Property(optionality = Optionality.OPTIONAL)
+ @RepaintingRepaintMetaAnnotation // <.>
+ @PropertyLayout(
+ repainting = Repainting.NO_REPAINT // <.>
+ , describedAs =
+ "@RepaintingRepaintMetaAnnotation @PropertyLayout(...)"
+ )
+ @MemberOrder(name = "meta-annotated-overridden", sequence = "1")
+ @XmlElement(required = false)
+// @PdfJsViewer
+ @Getter @Setter
+ private Blob propertyUsingMetaAnnotationButOverridden;
+//end::meta-annotated-overridden[]
+
+}
+//end::class[]
diff --git a/examples/demo/domain/src/main/java/demoapp/dom/annotations/PropertyLayout/repainting/PropertyLayoutRepaintingVm.layout.xml b/examples/demo/domain/src/main/java/demoapp/dom/annotations/PropertyLayout/repainting/PropertyLayoutRepaintingVm.layout.xml
new file mode 100644
index 0000000..a89223a
--- /dev/null
+++ b/examples/demo/domain/src/main/java/demoapp/dom/annotations/PropertyLayout/repainting/PropertyLayoutRepaintingVm.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="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="Edit" id="edit" />
+ <cpt:fieldSet name="Annotated" id="annotation"/>
+ <cpt:fieldSet name="Layout File" id="layout-file">
+<!-- tag::layout-file[] -->
+ <cpt:property id="propertyUsingLayout" repainting="NO_REPAINT"/>
+<!-- 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/repainting/PropertyLayoutRepaintingVm_mixinProperty.java b/examples/demo/domain/src/main/java/demoapp/dom/annotations/PropertyLayout/repainting/PropertyLayoutRepaintingVm_mixinProperty.java
new file mode 100644
index 0000000..3ea83e1
--- /dev/null
+++ b/examples/demo/domain/src/main/java/demoapp/dom/annotations/PropertyLayout/repainting/PropertyLayoutRepaintingVm_mixinProperty.java
@@ -0,0 +1,52 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package demoapp.dom.annotations.PropertyLayout.repainting;
+
+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.Repainting;
+import org.apache.isis.applib.value.Blob;
+import org.apache.isis.extensions.viewer.wicket.pdfjs.applib.annotations.PdfJsViewer;
+
+import lombok.RequiredArgsConstructor;
+
+//tag::class[]
+@Property()
+@PropertyLayout(
+ repainting = Repainting.NO_REPAINT // <.>
+ , describedAs =
+ "@PropertyLayout(repainting = NO_REPAINT)"
+)
+@RequiredArgsConstructor
+public class PropertyLayoutRepaintingVm_mixinProperty {
+ // ...
+//end::class[]
+
+ private final PropertyLayoutRepaintingVm propertyLayoutRepaintingVm;
+
+// @PdfJsViewer
+ @MemberOrder(name = "contributed", sequence = "1")
+ public Blob prop() {
+ return propertyLayoutRepaintingVm.getPropertyUsingAnnotation();
+ }
+
+//tag::class[]
+}
+//end::class[]
diff --git a/examples/demo/domain/src/main/java/demoapp/dom/annotations/PropertyLayout/repainting/PropertyLayoutRepaintingVm_mixinPropertyWithMetaAnnotation.java b/examples/demo/domain/src/main/java/demoapp/dom/annotations/PropertyLayout/repainting/PropertyLayoutRepaintingVm_mixinPropertyWithMetaAnnotation.java
new file mode 100644
index 0000000..b1e3b84
--- /dev/null
+++ b/examples/demo/domain/src/main/java/demoapp/dom/annotations/PropertyLayout/repainting/PropertyLayoutRepaintingVm_mixinPropertyWithMetaAnnotation.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.repainting;
+
+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.value.Blob;
+import org.apache.isis.extensions.viewer.wicket.pdfjs.applib.annotations.PdfJsViewer;
+
+import lombok.RequiredArgsConstructor;
+
+//tag::class[]
+@Property()
+@RepaintingNoRepaintMetaAnnotation // <.>
+@PropertyLayout(
+ describedAs =
+ "@RepaintingNoRepaintMetaAnnotation"
+)
+@RequiredArgsConstructor
+public class PropertyLayoutRepaintingVm_mixinPropertyWithMetaAnnotation {
+ // ...
+//end::class[]
+
+ private final PropertyLayoutRepaintingVm propertyLayoutRepaintingVm;
+
+// @PdfJsViewer
+ @MemberOrder(name = "meta-annotated", sequence = "2")
+ public Blob prop() {
+ return propertyLayoutRepaintingVm.getPropertyUsingAnnotation();
+ }
+
+//tag::class[]
+}
+//end::class[]
diff --git a/examples/demo/domain/src/main/java/demoapp/dom/annotations/PropertyLayout/repainting/PropertyLayoutRepaintingVm_mixinPropertyWithMetaAnnotationOverridden.java b/examples/demo/domain/src/main/java/demoapp/dom/annotations/PropertyLayout/repainting/PropertyLayoutRepaintingVm_mixinPropertyWithMetaAnnotationOverridden.java
new file mode 100644
index 0000000..cb9c279
--- /dev/null
+++ b/examples/demo/domain/src/main/java/demoapp/dom/annotations/PropertyLayout/repainting/PropertyLayoutRepaintingVm_mixinPropertyWithMetaAnnotationOverridden.java
@@ -0,0 +1,53 @@
+/*
+ * 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.repainting;
+
+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.Repainting;
+import org.apache.isis.applib.value.Blob;
+import org.apache.isis.extensions.viewer.wicket.pdfjs.applib.annotations.PdfJsViewer;
+
+import lombok.RequiredArgsConstructor;
+
+//tag::meta-annotation-overridden[]
+@Property()
+@RepaintingRepaintMetaAnnotation // <.>
+@PropertyLayout(
+ repainting = Repainting.NO_REPAINT // <.>
+ , describedAs =
+ "@RepaintingNoRepaintMetaAnnotation @PropertyLayout(...)"
+)
+@RequiredArgsConstructor
+public class PropertyLayoutRepaintingVm_mixinPropertyWithMetaAnnotationOverridden {
+ // ...
+//end::meta-annotation-overridden[]
+
+ private final PropertyLayoutRepaintingVm propertyLayoutRepaintingVm;
+
+// @PdfJsViewer
+ @MemberOrder(name = "meta-annotated-overridden", sequence = "2")
+ public Blob prop() {
+ return propertyLayoutRepaintingVm.getPropertyUsingAnnotation();
+ }
+
+//tag::meta-annotation-overridden[]
+}
+//end::meta-annotation-overridden[]
diff --git a/examples/demo/domain/src/main/java/demoapp/dom/annotations/PropertyLayout/repainting/RepaintingNoRepaintMetaAnnotation.java b/examples/demo/domain/src/main/java/demoapp/dom/annotations/PropertyLayout/repainting/RepaintingNoRepaintMetaAnnotation.java
new file mode 100644
index 0000000..f06de99
--- /dev/null
+++ b/examples/demo/domain/src/main/java/demoapp/dom/annotations/PropertyLayout/repainting/RepaintingNoRepaintMetaAnnotation.java
@@ -0,0 +1,24 @@
+package demoapp.dom.annotations.PropertyLayout.repainting;
+
+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.Repainting;
+
+//tag::class[]
+@PropertyLayout(repainting = Repainting.NO_REPAINT) // <.>
+@Inherited
+@Target({
+ ElementType.METHOD, ElementType.FIELD, // <.>
+ ElementType.TYPE // <.>
+})
+@Retention(RetentionPolicy.RUNTIME)
+public @interface RepaintingNoRepaintMetaAnnotation {
+
+}
+//end::class[]
diff --git a/examples/demo/domain/src/main/java/demoapp/dom/annotations/PropertyLayout/repainting/RepaintingRepaintMetaAnnotation.java b/examples/demo/domain/src/main/java/demoapp/dom/annotations/PropertyLayout/repainting/RepaintingRepaintMetaAnnotation.java
new file mode 100644
index 0000000..eedc649
--- /dev/null
+++ b/examples/demo/domain/src/main/java/demoapp/dom/annotations/PropertyLayout/repainting/RepaintingRepaintMetaAnnotation.java
@@ -0,0 +1,23 @@
+package demoapp.dom.annotations.PropertyLayout.repainting;
+
+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;
+import org.apache.isis.applib.annotation.Repainting;
+
+//tag::class[]
+@PropertyLayout(repainting = Repainting.REPAINT) // <.>
+@Inherited
+@Target({
+ ElementType.METHOD, ElementType.FIELD, // <.>
+ ElementType.TYPE // <.>
+})
+@Retention(RetentionPolicy.RUNTIME)
+public @interface RepaintingRepaintMetaAnnotation {
+
+}
+//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 285776b..f7e5aaa 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
@@ -129,6 +129,7 @@ as a replacement for
<mb3:serviceAction objectType="demo.PropertyLayoutMenu" id="named"/>
<mb3:serviceAction objectType="demo.PropertyLayoutMenu" id="navigable"/>
<mb3:serviceAction objectType="demo.PropertyLayoutMenu" id="renderDay"/>
+ <mb3:serviceAction objectType="demo.PropertyLayoutMenu" id="repainting"/>
</mb3:section>
</mb3:menu>
diff --git a/examples/demo/wicket/pom.xml b/examples/demo/wicket/pom.xml
index 2e813ba..19e486b 100644
--- a/examples/demo/wicket/pom.xml
+++ b/examples/demo/wicket/pom.xml
@@ -76,7 +76,13 @@
<type>pom</type>
</dependency>
- </dependencies>
+ <dependency>
+ <groupId>org.apache.isis.extensions</groupId>
+ <artifactId>isis-extensions-pdfjs-ui</artifactId>
+ </dependency>
+
+
+</dependencies>
<profiles>
diff --git a/examples/demo/wicket/src/main/java/demoapp/webapp/wicket/DemoAppWicket.java b/examples/demo/wicket/src/main/java/demoapp/webapp/wicket/DemoAppWicket.java
index 3f02eb5..e004383 100644
--- a/examples/demo/wicket/src/main/java/demoapp/webapp/wicket/DemoAppWicket.java
+++ b/examples/demo/wicket/src/main/java/demoapp/webapp/wicket/DemoAppWicket.java
@@ -23,6 +23,7 @@ import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.web.servlet.support.SpringBootServletInitializer;
import org.springframework.context.annotation.Import;
+import org.apache.isis.extensions.viewer.wicket.pdfjs.ui.IsisModuleExtPdfjsUi;
import org.apache.isis.valuetypes.asciidoc.metamodel.IsisModuleValAsciidocMetaModel;
import org.apache.isis.valuetypes.asciidoc.persistence.jdo.dn5.IsisModuleValAsciidocPersistenceJdoDn5;
import org.apache.isis.valuetypes.markdown.persistence.jdo.dn5.IsisModuleValMarkdownPersistenceJdoDn5;
@@ -44,13 +45,14 @@ import demoapp.webapp.DemoAppManifest;
// Metamodel
IsisModuleValAsciidocMetaModel.class,
- // UI
- IsisModuleViewerWicketViewer.class, // wicket viewer
- IsisModuleValSseUiWkt.class, // server sent events
+ // UI (Wicket Viewer)
+ IsisModuleViewerWicketViewer.class,
+ IsisModuleValSseUiWkt.class,
IsisModuleValAsciidocUiWkt.class,
IsisModuleValMarkdownUiWkt.class,
+ IsisModuleExtPdfjsUi.class,
- // Persistence
+ // Persistence (JDO/DN5)
IsisModuleValAsciidocPersistenceJdoDn5.class, //
IsisModuleValMarkdownPersistenceJdoDn5.class,
diff --git a/viewers/wicket/ui/src/main/java/org/apache/isis/viewer/wicket/ui/pages/bootstrap-overrides-all-v2.css b/viewers/wicket/ui/src/main/java/org/apache/isis/viewer/wicket/ui/pages/bootstrap-overrides-all-v2.css
index 614f9e4..69f43eb 100644
--- a/viewers/wicket/ui/src/main/java/org/apache/isis/viewer/wicket/ui/pages/bootstrap-overrides-all-v2.css
+++ b/viewers/wicket/ui/src/main/java/org/apache/isis/viewer/wicket/ui/pages/bootstrap-overrides-all-v2.css
@@ -596,6 +596,7 @@ div.label-left label.control-label {
width: 30%;
float: left;
padding-top: 2px;
+ padding-right: 2px;
text-align: left;
}