Skip to content

Commit

Permalink
WW-5149 Puts back labelposition with a warning of deprecation
Browse files Browse the repository at this point in the history
  • Loading branch information
lukaszlenart committed Nov 23, 2021
1 parent d9ba299 commit b8494c1
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
Expand Up @@ -1106,6 +1106,7 @@ public void setLabelSeparator(String labelseparator) {
@StrutsTagAttribute(description="(Deprecated) Define label position of form element (top/left)")
@Deprecated
public void setLabelposition(String labelPosition) {
LOG.warn("\"labelposition\" attribute is deprecated, please use \"labelPosition\" instead!");
this.labelPosition = labelPosition;
}

Expand Down
Expand Up @@ -30,6 +30,7 @@
* Abstract base class for all UI tags.
*/
public abstract class AbstractUITag extends ComponentTagSupport implements DynamicAttributes {

protected String cssClass;
protected String cssErrorClass;
protected String cssStyle;
Expand All @@ -38,6 +39,8 @@ public abstract class AbstractUITag extends ComponentTagSupport implements Dynam
protected String disabled;
protected String label;
protected String labelSeparator;
@Deprecated
protected String labelposition;
protected String labelPosition;
protected String requiredPosition;
protected String errorPosition;
Expand Down Expand Up @@ -90,7 +93,11 @@ protected void populateParams() {
uiBean.setDisabled(disabled);
uiBean.setLabel(label);
uiBean.setLabelSeparator(labelSeparator);
uiBean.setLabelPosition(labelPosition);
if (labelposition != null) {
uiBean.setLabelposition(labelposition);
} else {
uiBean.setLabelPosition(labelPosition);
}
uiBean.setRequiredPosition(requiredPosition);
uiBean.setErrorPosition(errorPosition);
uiBean.setName(name);
Expand Down Expand Up @@ -176,8 +183,8 @@ public void setLabel(String label) {
* @deprecated use {@link #setLabelPosition(String)} instead
*/
@Deprecated
public void setLabelposition(String labelPosition) {
this.labelPosition = labelPosition;
public void setLabelposition(String labelposition) {
this.labelposition = labelposition;
}

public void setLabelPosition(String labelPosition) {
Expand Down

0 comments on commit b8494c1

Please sign in to comment.