This is an automated email from the ASF dual-hosted git repository. lukaszlenart pushed a commit to branch feature/WW-5510-tooltip in repository https://gitbox.apache.org/repos/asf/struts.git
commit c2a5bfe3c92cd39d2d75720751de499972c70a88 Author: Lukasz Lenart <lukaszlen...@apache.org> AuthorDate: Thu Jan 16 10:31:43 2025 +0100 WW-5510 Marks support for tooltips as deprecated This will be removed in the minor release, migrate to use native html tooltip support --- .../src/main/java/org/apache/struts2/components/UIBean.java | 13 ++++++++++--- .../java/org/apache/struts2/views/jsp/ui/AbstractUITag.java | 6 ++++++ 2 files changed, 16 insertions(+), 3 deletions(-) diff --git a/core/src/main/java/org/apache/struts2/components/UIBean.java b/core/src/main/java/org/apache/struts2/components/UIBean.java index 6c8c8212a..17fb9eac6 100644 --- a/core/src/main/java/org/apache/struts2/components/UIBean.java +++ b/core/src/main/java/org/apache/struts2/components/UIBean.java @@ -300,7 +300,7 @@ import java.util.function.Function; * <!-- END SNIPPET: javascriptRelatedAttributes --> * * <!-- START SNIPPET: tooltipattributes --> - * + * <strong>Deprecated since 7.0.1</strong * <table border="1" summary=""> * <tr> * <td>Attribute</td> @@ -344,7 +344,7 @@ import java.util.function.Function; * * <!-- START SNIPPET: tooltipdescription --> * <p> - * <b>tooltipConfig is deprecated, use individual tooltip configuration attributes instead </b> + * <strong>tooltipConfig is deprecated, use individual tooltip configuration attributes instead </strong> * </p> * * <p> @@ -380,7 +380,7 @@ import java.util.function.Function; * * <pre> * <!-- START SNIPPET: tooltipexample --> - * + * <strong>Deprecated since 7.0.1</strong> * <!-- Example 1: --> * <s:form * tooltipDelay="500" @@ -968,6 +968,7 @@ public abstract class UIBean extends Component { } } + @Deprecated(since = "7.0.1", forRemoval = true) protected Map<String, String> getTooltipConfig(UIBean component) { Object tooltipConfigObj = component.getAttributes().get("tooltipConfig"); Map<String, String> result = new LinkedHashMap<>(); @@ -1237,11 +1238,13 @@ public abstract class UIBean extends Component { } @StrutsTagAttribute(description="Set the tooltip of this particular component") + @Deprecated(since = "7.0.1", forRemoval = true) public void setTooltip(String tooltip) { this.tooltip = tooltip; } @StrutsTagAttribute(description="Deprecated. Use individual tooltip configuration attributes instead.") + @Deprecated(since = "7.0.1", forRemoval = true) public void setTooltipConfig(String tooltipConfig) { this.tooltipConfig = tooltipConfig; } @@ -1252,22 +1255,26 @@ public abstract class UIBean extends Component { } @StrutsTagAttribute(description="Use JavaScript to generate tooltips", type="Boolean", defaultValue="false") + @Deprecated(since = "7.0.1", forRemoval = true) public void setJavascriptTooltip(String javascriptTooltip) { this.javascriptTooltip = javascriptTooltip; } @StrutsTagAttribute(description="CSS class applied to JavaScrip tooltips", defaultValue="StrutsTTClassic") + @Deprecated(since = "7.0.1", forRemoval = true) public void setTooltipCssClass(String tooltipCssClass) { this.tooltipCssClass = tooltipCssClass; } @StrutsTagAttribute(description="Delay in milliseconds, before showing JavaScript tooltips ", defaultValue="Classic") + @Deprecated(since = "7.0.1", forRemoval = true) public void setTooltipDelay(String tooltipDelay) { this.tooltipDelay = tooltipDelay; } @StrutsTagAttribute(description="Icon path used for image that will have the tooltip") + @Deprecated(since = "7.0.1", forRemoval = true) public void setTooltipIconPath(String tooltipIconPath) { this.tooltipIconPath = tooltipIconPath; } diff --git a/core/src/main/java/org/apache/struts2/views/jsp/ui/AbstractUITag.java b/core/src/main/java/org/apache/struts2/views/jsp/ui/AbstractUITag.java index 9a26c3326..e02631feb 100644 --- a/core/src/main/java/org/apache/struts2/views/jsp/ui/AbstractUITag.java +++ b/core/src/main/java/org/apache/struts2/views/jsp/ui/AbstractUITag.java @@ -261,10 +261,12 @@ public abstract class AbstractUITag extends ComponentTagSupport implements Dynam this.onchange = onchange; } + @Deprecated(since = "7.0.1", forRemoval = true) public void setTooltip(String tooltip) { this.tooltip = tooltip; } + @Deprecated(since = "7.0.1", forRemoval = true) public void setTooltipConfig(String tooltipConfig) { this.tooltipConfig = tooltipConfig; } @@ -277,18 +279,22 @@ public abstract class AbstractUITag extends ComponentTagSupport implements Dynam this.key = key; } + @Deprecated(since = "7.0.1", forRemoval = true) public void setJavascriptTooltip(String javascriptTooltip) { this.javascriptTooltip = javascriptTooltip; } + @Deprecated(since = "7.0.1", forRemoval = true) public void setTooltipCssClass(String tooltipCssClass) { this.tooltipCssClass = tooltipCssClass; } + @Deprecated(since = "7.0.1", forRemoval = true) public void setTooltipDelay(String tooltipDelay) { this.tooltipDelay = tooltipDelay; } + @Deprecated(since = "7.0.1", forRemoval = true) public void setTooltipIconPath(String tooltipIconPath) { this.tooltipIconPath = tooltipIconPath; }