You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@struts.apache.org by lu...@apache.org on 2021/11/23 08:37:22 UTC

[struts] branch WW-5149-labelposition created (now cffbc05)

This is an automated email from the ASF dual-hosted git repository.

lukaszlenart pushed a change to branch WW-5149-labelposition
in repository https://gitbox.apache.org/repos/asf/struts.git.


      at cffbc05  WW-5149 Puts back labelposition with a warning of deprecation

This branch includes the following new commits:

     new cffbc05  WW-5149 Puts back labelposition with a warning of deprecation

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


[struts] 01/01: WW-5149 Puts back labelposition with a warning of deprecation

Posted by lu...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

lukaszlenart pushed a commit to branch WW-5149-labelposition
in repository https://gitbox.apache.org/repos/asf/struts.git

commit cffbc055adeb864732fdbdb1bb45863ae9b0d347
Author: Lukasz Lenart <lu...@apache.org>
AuthorDate: Tue Nov 23 09:37:10 2021 +0100

    WW-5149 Puts back labelposition with a warning of deprecation
---
 core/src/main/java/org/apache/struts2/components/UIBean.java | 9 +++++++++
 1 file changed, 9 insertions(+)

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 21ae1d5..9d4a3e5 100644
--- a/core/src/main/java/org/apache/struts2/components/UIBean.java
+++ b/core/src/main/java/org/apache/struts2/components/UIBean.java
@@ -463,6 +463,8 @@ public abstract class UIBean extends Component {
     protected String cssErrorStyle;
     protected String disabled;
     protected String label;
+    @Deprecated
+    protected String labelposition;
     protected String labelPosition;
     protected String labelSeparator;
     protected String requiredPosition;
@@ -678,6 +680,13 @@ public abstract class UIBean extends Component {
             addParameter("labelseparator", findString(labelSeparator));
         }
 
+        if (labelposition != null) {
+            LOG.warn("\"labelposition\" attribute is deprecated, please use \"labelPosition\" instead!");
+            String labelPosition = findString(this.labelposition);
+            addParameter("labelposition", labelPosition);
+            addParameter("labelPosition", labelPosition);
+        }
+
         if (labelPosition != null) {
             String labelPosition = findString(this.labelPosition);
             addParameter("labelposition", labelPosition);