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 2024/04/25 11:14:38 UTC
(causeway) branch master updated: CAUSEWAY-3726: hide Clear-Field-Button when editing is disabled
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 11a9544eed CAUSEWAY-3726: hide Clear-Field-Button when editing is disabled
11a9544eed is described below
commit 11a9544eedfe19717f5c73b67129daa2f4f8028b
Author: andi-huber <ah...@apache.org>
AuthorDate: Thu Apr 25 13:14:31 2024 +0200
CAUSEWAY-3726: hide Clear-Field-Button when editing is disabled
---
.../wicket/ui/components/scalars/ScalarPanelAdditionalButton.java | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/viewers/wicket/ui/src/main/java/org/apache/causeway/viewer/wicket/ui/components/scalars/ScalarPanelAdditionalButton.java b/viewers/wicket/ui/src/main/java/org/apache/causeway/viewer/wicket/ui/components/scalars/ScalarPanelAdditionalButton.java
index 8d751ccf2d..9c09cc9261 100644
--- a/viewers/wicket/ui/src/main/java/org/apache/causeway/viewer/wicket/ui/components/scalars/ScalarPanelAdditionalButton.java
+++ b/viewers/wicket/ui/src/main/java/org/apache/causeway/viewer/wicket/ui/components/scalars/ScalarPanelAdditionalButton.java
@@ -88,6 +88,11 @@ enum ScalarPanelAdditionalButton {
default:
// fall through
}
+
+ // hide if editing is vetoed
+ if(scalarModel.disabledReason().isPresent()) {
+ return false;
+ }
// visible only if feature is not required and not already cleared
return scalarModel.getConfiguration().getViewer().getWicket().isClearFieldButtonEnabled()