This is an automated email from the ASF dual-hosted git repository. danhaywood pushed a commit to branch CAUSEWAY-3460 in repository https://gitbox.apache.org/repos/asf/causeway.git
commit fc7f2bd2fb81d3c313b411ef4edf13e928e1205a Author: danhaywood <[email protected]> AuthorDate: Sun May 14 17:13:02 2023 +0100 CAUSEWAY-3460: adds config parameter for Wicket viewer --- .../apache/causeway/core/config/CausewayConfiguration.java | 12 ++++++++++-- .../wicket/ui/components/scalars/ScalarPanelAbstract2.java | 6 ++++-- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/core/config/src/main/java/org/apache/causeway/core/config/CausewayConfiguration.java b/core/config/src/main/java/org/apache/causeway/core/config/CausewayConfiguration.java index b75de4f1e6..4324b4d01b 100644 --- a/core/config/src/main/java/org/apache/causeway/core/config/CausewayConfiguration.java +++ b/core/config/src/main/java/org/apache/causeway/core/config/CausewayConfiguration.java @@ -77,8 +77,6 @@ import org.apache.causeway.applib.services.userui.UserMenu; import org.apache.causeway.applib.value.semantics.TemporalValueSemantics.TemporalEditingPattern; import org.apache.causeway.commons.internal.base._NullSafe; import org.apache.causeway.commons.internal.context._Context; -import org.apache.causeway.core.config.CausewayConfiguration.Core; -import org.apache.causeway.core.config.CausewayConfiguration.Viewer; import org.apache.causeway.core.config.metamodel.facets.ActionConfigOptions; import org.apache.causeway.core.config.metamodel.facets.CollectionLayoutConfigOptions; import org.apache.causeway.core.config.metamodel.facets.DomainObjectConfigOptions; @@ -2173,6 +2171,16 @@ public class CausewayConfiguration { */ private boolean clearFieldButtonEnabled = true; + /** + * In prototyping mode, a text icon is appeneded to any property that is disabled, with its tool-tip explaining why the property is disabled. + * This configuration property can be used to suppress the icon, even in prototyping mode, if desired. + * + * <p> + * The default is to enable (show) the text icon (if in prototyping mode). + * </p> + */ + private boolean disableReasonExplanationInPrototypingModeEnabled = true; + /** * URL of file to read any custom CSS, relative to <code>static</code> package on the class path. * diff --git a/viewers/wicket/ui/src/main/java/org/apache/causeway/viewer/wicket/ui/components/scalars/ScalarPanelAbstract2.java b/viewers/wicket/ui/src/main/java/org/apache/causeway/viewer/wicket/ui/components/scalars/ScalarPanelAbstract2.java index 16a8deb896..94133f1534 100644 --- a/viewers/wicket/ui/src/main/java/org/apache/causeway/viewer/wicket/ui/components/scalars/ScalarPanelAbstract2.java +++ b/viewers/wicket/ui/src/main/java/org/apache/causeway/viewer/wicket/ui/components/scalars/ScalarPanelAbstract2.java @@ -257,8 +257,10 @@ extends ScalarPanelAbstract { addDisabledReasonIcon(buttonContainer, "fa-solid fa-ban", ""); break; case DISABLED_REASON_PROTOTYPING: - addDisabledReasonIcon(buttonContainer, "fa-solid fa-text-slash icon-prototyping", - " Note: This icon only appears in prototyping mode."); + if (getConfiguration().getViewer().getWicket().isDisableReasonExplanationInPrototypingModeEnabled()) { + addDisabledReasonIcon(buttonContainer, "fa-solid fa-text-slash icon-prototyping", + " Note: This icon only appears in prototyping mode."); + } break; case CLEAR_FIELD: addClearFieldButton(buttonContainer);
