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/isis.git
The following commit(s) were added to refs/heads/master by this push:
new 537337884d ISIS-3333: fixes Title Tooltips not rendered if
DomainObject has no 'describedAs'
537337884d is described below
commit 537337884d206ca0f10ad7d7f29fa2104b8a567d
Author: Andi Huber <[email protected]>
AuthorDate: Fri Jan 20 09:44:57 2023 +0100
ISIS-3333: fixes Title Tooltips not rendered if DomainObject has no
'describedAs'
---
.../components/entity/icontitle/EntityIconAndTitlePanel.java | 10 ++++------
.../org/apache/causeway/viewer/wicket/ui/util/WktTooltips.java | 2 +-
2 files changed, 5 insertions(+), 7 deletions(-)
diff --git
a/viewers/wicket/ui/src/main/java/org/apache/causeway/viewer/wicket/ui/components/entity/icontitle/EntityIconAndTitlePanel.java
b/viewers/wicket/ui/src/main/java/org/apache/causeway/viewer/wicket/ui/components/entity/icontitle/EntityIconAndTitlePanel.java
index d11a96781e..3d8fbbd197 100644
---
a/viewers/wicket/ui/src/main/java/org/apache/causeway/viewer/wicket/ui/components/entity/icontitle/EntityIconAndTitlePanel.java
+++
b/viewers/wicket/ui/src/main/java/org/apache/causeway/viewer/wicket/ui/components/entity/icontitle/EntityIconAndTitlePanel.java
@@ -134,15 +134,13 @@ extends PanelAbstract<ManagedObject, ObjectAdapterModel> {
final String title = determineTitle();
Wkt.labelAdd(link, ID_ENTITY_TITLE, titleAbbreviated(title));
- String entityTypeName = determineFriendlyType() // from actual
underlying model
+ final String tooltipTitle = determineFriendlyType() // from
actual underlying model
.orElseGet(spec::getSingularName); // not sure if this
code path is ever reached
+ final String tooltipBody =
_Strings.nonEmpty(typeOfSpecification.getDescription())
+ .orElseGet(()->title);
- val description = typeOfSpecification.getDescription();
+ WktTooltips.addTooltip(link, tooltipTitle, tooltipBody);
- WktTooltips.addTooltip(link, entityTypeName,
- description!=null
- ? description
- : title);
}
}
diff --git
a/viewers/wicket/ui/src/main/java/org/apache/causeway/viewer/wicket/ui/util/WktTooltips.java
b/viewers/wicket/ui/src/main/java/org/apache/causeway/viewer/wicket/ui/util/WktTooltips.java
index 2d21e1116e..a4fbc1a710 100644
---
a/viewers/wicket/ui/src/main/java/org/apache/causeway/viewer/wicket/ui/util/WktTooltips.java
+++
b/viewers/wicket/ui/src/main/java/org/apache/causeway/viewer/wicket/ui/util/WktTooltips.java
@@ -61,7 +61,7 @@ public class WktTooltips {
if(target instanceof ActionLink) {
val actionLink = (ActionLink)target;
if(!actionLink.getActionModel().hasParameters()) {
- //XXX[CAUSEWAY-3051] adding a tooltip to an ActionLink will
break any ConfirmationBehavior,
+ //XXX[ISIS-3051] adding a tooltip to an ActionLink will break
any ConfirmationBehavior,
//that's also applied to the ActionLink.
throw _Exceptions.illegalArgument(
"Adding a tooltip to an ActionLink will break any
ConfirmationBehavior, "