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/05/30 08:18:48 UTC

[causeway] branch master updated: CAUSEWAY-3441: fixes property description not picked up from .layout.xml file

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 01995f34f1 CAUSEWAY-3441: fixes property description not picked up from .layout.xml file
01995f34f1 is described below

commit 01995f34f15d83b1f378aedc685106a272116fb6
Author: andi-huber <ah...@apache.org>
AuthorDate: Tue May 30 10:18:42 2023 +0200

    CAUSEWAY-3441: fixes property description not picked up from .layout.xml
    file
    
    - flipped logic in MemberDescribedFacetForPropertyLayoutXml
---
 .../propertylayout/MemberDescribedFacetForPropertyLayoutXml.java      | 2 +-
 .../describedAs/PropertyLayoutDescribedAsPage-description.adoc        | 4 ----
 2 files changed, 1 insertion(+), 5 deletions(-)

diff --git a/core/metamodel/src/main/java/org/apache/causeway/core/metamodel/facets/properties/propertylayout/MemberDescribedFacetForPropertyLayoutXml.java b/core/metamodel/src/main/java/org/apache/causeway/core/metamodel/facets/properties/propertylayout/MemberDescribedFacetForPropertyLayoutXml.java
index 51b790a33a..9919682538 100644
--- a/core/metamodel/src/main/java/org/apache/causeway/core/metamodel/facets/properties/propertylayout/MemberDescribedFacetForPropertyLayoutXml.java
+++ b/core/metamodel/src/main/java/org/apache/causeway/core/metamodel/facets/properties/propertylayout/MemberDescribedFacetForPropertyLayoutXml.java
@@ -36,7 +36,7 @@ extends MemberDescribedFacetWithStaticTextAbstract {
 
         return Optional.ofNullable(propertyLayoutData)
         .map(PropertyLayoutData::getDescribedAs)
-        .filter(_Strings::isEmpty)
+        .filter(_Strings::isNotEmpty)
         .map(describedAs->new MemberDescribedFacetForPropertyLayoutXml(
                 describedAs, holder, precedence));
     }
diff --git a/examples/demo/domain/src/main/java/demoapp/dom/domain/properties/PropertyLayout/describedAs/PropertyLayoutDescribedAsPage-description.adoc b/examples/demo/domain/src/main/java/demoapp/dom/domain/properties/PropertyLayout/describedAs/PropertyLayoutDescribedAsPage-description.adoc
index e349573811..cb0ba60e14 100644
--- a/examples/demo/domain/src/main/java/demoapp/dom/domain/properties/PropertyLayout/describedAs/PropertyLayoutDescribedAsPage-description.adoc
+++ b/examples/demo/domain/src/main/java/demoapp/dom/domain/properties/PropertyLayout/describedAs/PropertyLayoutDescribedAsPage-description.adoc
@@ -1,7 +1,5 @@
 :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 [...]
 
-WARNING: currently no tooltip is displayed for descriptions defined by layout.xml file; see link:https://issues.apache.org/jira/browse/CAUSEWAY-3441[CAUSEWAY-3441].
-
 Often the end-user of your application will be a frequent user and will know by sight the purpose of the various properties, collections and actions that are displayed.
 But, for less experienced users, or for new features, providing a description to provide brief additional information to the user may be of help.
 
@@ -54,8 +52,6 @@ include::PropertyLayoutDescribedAsPage_updateName.java[tags=annotation]
     <cpt:describedAs>Notes about this object</cpt:describedAs>
 </cpt:property>
 ----
-+
-WARNING: currently no tooltip is displayed for descriptions defined by layout.xml file; see link:https://issues.apache.org/jira/browse/CAUSEWAY-3441[CAUSEWAY-3441].
 
 * The `address` property is a counter-example: even though it has a description, it will not be rendered because it _also_ has a `labelPosition` which results in the label being suppressed:
 +