mirror of
https://github.com/apache/struts.git
synced 2026-08-06 07:06:58 +00:00
Merge pull request #510 from apache/WW-5149-labelposition
[WW-5149] Puts back "labelposition" with a warning of deprecation
This commit is contained in:
@@ -91,7 +91,7 @@ public class Checkbox extends UIBean {
|
||||
@Override
|
||||
@StrutsTagAttribute(description="(Deprecated) Define label position of form element (top/left), also 'right' is supported when using 'xhtml' theme")
|
||||
public void setLabelposition(String labelPosition) {
|
||||
super.setLabelPosition(labelPosition);
|
||||
super.setLabelposition(labelPosition);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -1106,6 +1106,7 @@ public abstract class UIBean extends Component {
|
||||
@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;
|
||||
}
|
||||
|
||||
|
||||
@@ -30,6 +30,7 @@ import java.util.Map;
|
||||
* Abstract base class for all UI tags.
|
||||
*/
|
||||
public abstract class AbstractUITag extends ComponentTagSupport implements DynamicAttributes {
|
||||
|
||||
protected String cssClass;
|
||||
protected String cssErrorClass;
|
||||
protected String cssStyle;
|
||||
@@ -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;
|
||||
@@ -90,7 +93,11 @@ public abstract class AbstractUITag extends ComponentTagSupport implements Dynam
|
||||
uiBean.setDisabled(disabled);
|
||||
uiBean.setLabel(label);
|
||||
uiBean.setLabelSeparator(labelSeparator);
|
||||
uiBean.setLabelPosition(labelPosition);
|
||||
if (labelposition != null && labelPosition == null) {
|
||||
uiBean.setLabelposition(labelposition);
|
||||
} else {
|
||||
uiBean.setLabelPosition(labelPosition);
|
||||
}
|
||||
uiBean.setRequiredPosition(requiredPosition);
|
||||
uiBean.setErrorPosition(errorPosition);
|
||||
uiBean.setName(name);
|
||||
@@ -176,8 +183,8 @@ public abstract class AbstractUITag extends ComponentTagSupport implements Dynam
|
||||
* @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) {
|
||||
|
||||
Reference in New Issue
Block a user