You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@causeway.apache.org by ah...@apache.org on 2023/03/31 09:07:07 UTC

[causeway] branch master updated: CAUSEWAY-3401: demo: editingDisabledReason=... correction

This is an automated email from the ASF dual-hosted git repository.

ahuber pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/causeway.git


The following commit(s) were added to refs/heads/master by this push:
     new c0a6492bff CAUSEWAY-3401: demo: editingDisabledReason=... correction
c0a6492bff is described below

commit c0a6492bff968adcf846fc525673397f4cee0fe3
Author: Andi Huber <ah...@apache.org>
AuthorDate: Fri Mar 31 11:07:01 2023 +0200

    CAUSEWAY-3401: demo: editingDisabledReason=... correction
---
 .../EditingReasonDisabledMetaAnnotation.java                      | 5 ++++-
 .../PropertyEditingReasonDisabledPage-description.adoc            | 4 ++--
 .../editingReasonDisabled/PropertyEditingReasonDisabledPage.java  | 8 ++++++--
 3 files changed, 12 insertions(+), 5 deletions(-)

diff --git a/examples/demo/domain/src/main/java/demoapp/dom/domain/properties/Property/editingReasonDisabled/EditingReasonDisabledMetaAnnotation.java b/examples/demo/domain/src/main/java/demoapp/dom/domain/properties/Property/editingReasonDisabled/EditingReasonDisabledMetaAnnotation.java
index 234d3fc365..5c11db4349 100644
--- a/examples/demo/domain/src/main/java/demoapp/dom/domain/properties/Property/editingReasonDisabled/EditingReasonDisabledMetaAnnotation.java
+++ b/examples/demo/domain/src/main/java/demoapp/dom/domain/properties/Property/editingReasonDisabled/EditingReasonDisabledMetaAnnotation.java
@@ -24,10 +24,13 @@ import java.lang.annotation.Retention;
 import java.lang.annotation.RetentionPolicy;
 import java.lang.annotation.Target;
 
+import org.apache.causeway.applib.annotation.Editing;
 import org.apache.causeway.applib.annotation.Property;
 
 //tag::class[]
-@Property(editingDisabledReason = "disabled "
+@Property(
+        editing = Editing.DISABLED,
+        editingDisabledReason = "disabled "
         + "for demo purposes (meta annot.)")        // <.>
 @Inherited
 @Target({
diff --git a/examples/demo/domain/src/main/java/demoapp/dom/domain/properties/Property/editingReasonDisabled/PropertyEditingReasonDisabledPage-description.adoc b/examples/demo/domain/src/main/java/demoapp/dom/domain/properties/Property/editingReasonDisabled/PropertyEditingReasonDisabledPage-description.adoc
index 2463cc5552..f35fc37b30 100644
--- a/examples/demo/domain/src/main/java/demoapp/dom/domain/properties/Property/editingReasonDisabled/PropertyEditingReasonDisabledPage-description.adoc
+++ b/examples/demo/domain/src/main/java/demoapp/dom/domain/properties/Property/editingReasonDisabled/PropertyEditingReasonDisabledPage-description.adoc
@@ -1,4 +1,4 @@
 :Notice: 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 ag [...]
 
-The `editingReasonDisabled` attribute - if *not* empty - implies `editing=false` 
-and provides a tooltip to the UI.
\ No newline at end of file
+The `editingReasonDisabled` attribute in combination with attribute `editing=Editing#DISABLED` 
+provides a tooltip to the UI (as to why this property cannot be edited).
\ No newline at end of file
diff --git a/examples/demo/domain/src/main/java/demoapp/dom/domain/properties/Property/editingReasonDisabled/PropertyEditingReasonDisabledPage.java b/examples/demo/domain/src/main/java/demoapp/dom/domain/properties/Property/editingReasonDisabled/PropertyEditingReasonDisabledPage.java
index e6014d1c05..6f922f754f 100644
--- a/examples/demo/domain/src/main/java/demoapp/dom/domain/properties/Property/editingReasonDisabled/PropertyEditingReasonDisabledPage.java
+++ b/examples/demo/domain/src/main/java/demoapp/dom/domain/properties/Property/editingReasonDisabled/PropertyEditingReasonDisabledPage.java
@@ -54,7 +54,9 @@ public class PropertyEditingReasonDisabledPage implements HasAsciiDocDescription
     }
 
 //tag::annotation[]
-    @Property(editingDisabledReason = "disabled for demo purposes") // <.>
+    @Property(
+            editing = Editing.DISABLED,
+            editingDisabledReason = "disabled for demo purposes") // <.>
     @PropertyLayout(
         describedAs = "@Property(editingDisabledReason = \"disabled for demo purposes\")",
         fieldSetId = "annotation", sequence = "1")
@@ -76,7 +78,9 @@ public class PropertyEditingReasonDisabledPage implements HasAsciiDocDescription
 
 //tag::meta-annotated-overridden[]
     @EditingReasonDisabledMetaAnnotation                            // <.>
-    @Property(editingDisabledReason = "disabled for demo purposes") // <.>
+    @Property(
+            editing = Editing.DISABLED,
+            editingDisabledReason = "disabled for demo purposes") // <.>
     @PropertyLayout(
         describedAs =
             "@EditingReasonDisabledMetaAnnotation " +