Skip to content

Commit

Permalink
Merge pull request #622 from apache/WW-5133-labelposition
Browse files Browse the repository at this point in the history
[WW-5133] Drops labelposition attribute
  • Loading branch information
lukaszlenart authored Oct 24, 2022
2 parents 936481e + 943cb62 commit 58dcc83
Show file tree
Hide file tree
Showing 36 changed files with 23 additions and 286 deletions.
11 changes: 0 additions & 11 deletions core/src/main/java/org/apache/struts2/components/Checkbox.java
Original file line number Diff line number Diff line change
Expand Up @@ -96,17 +96,6 @@ public void setSubmitUnchecked(String submitUnchecked) {
this.submitUnchecked = submitUnchecked;
}

/**
* Deprecated since 2.5.27
* @deprecated use {@link #setLabelPosition(String)} instead
*/
@Deprecated
@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);
}

@Override
@StrutsTagAttribute(description="Define label position of form element (top/left), also 'right' is supported when using 'xhtml' theme")
public void setLabelPosition(String labelPosition) {
Expand Down
11 changes: 0 additions & 11 deletions core/src/main/java/org/apache/struts2/components/UIBean.java
Original file line number Diff line number Diff line change
Expand Up @@ -689,7 +689,6 @@ public void evaluateParams() {

if (labelPosition != null) {
String labelPosition = findString(this.labelPosition);
addParameter("labelposition", labelPosition);
addParameter("labelPosition", labelPosition);
}

Expand Down Expand Up @@ -1119,16 +1118,6 @@ public void setLabelSeparator(String labelseparator) {
this.labelSeparator = labelseparator;
}

/**
* Deprecated since 2.5.27
* @deprecated use {@link #setLabelPosition(String)} instead
*/
@StrutsTagAttribute(description="(Deprecated) Define label position of form element (top/left)")
@Deprecated
public void setLabelposition(String labelPosition) {
this.labelPosition = labelPosition;
}

@StrutsTagAttribute(description="Define label position of form element (top/left)")
public void setLabelPosition(String labelPosition) {
this.labelPosition = labelPosition;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -173,15 +173,6 @@ public void setLabel(String label) {
this.label = label;
}

/**
* Deprecated since 2.5.27
* @deprecated use {@link #setLabelPosition(String)} instead
*/
@Deprecated
public void setLabelposition(String labelPosition) {
this.labelPosition = labelPosition;
}

public void setLabelPosition(String labelPosition) {
this.labelPosition = labelPosition;
}
Expand Down
4 changes: 2 additions & 2 deletions core/src/main/resources/template/xhtml/validation.js
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ function clearErrorLabelsXHTML(form) {
parentEl = null;
}

//if labelposition is 'top' the label is on the row above
//if labelPosition is 'top' the label is on the row above
if(parentEl && parentEl.cells) {
var labelRow = parentEl.cells.length > 1 ? parentEl : StrutsUtils.previousElement(parentEl, "tr");
if (labelRow) {
Expand Down Expand Up @@ -120,7 +120,7 @@ function addErrorXHTML(e, errorText) {
table.insertBefore(tr, row);

// update the label too
//if labelposition is 'top' the label is on the row above
//if labelPosition is 'top' the label is on the row above
var labelRow = row.cells.length > 1 ? row : StrutsUtils.previousElement(tr, "tr");
var label = labelRow.cells[0].getElementsByTagName("label")[0];
if (label) {
Expand Down
8 changes: 0 additions & 8 deletions core/src/site/resources/tags/a-attributes.html
Original file line number Diff line number Diff line change
Expand Up @@ -197,14 +197,6 @@
<td align="left" valign="top">String</td>
<td align="left" valign="top">String that will be appended to the label</td>
</tr>
<tr>
<td align="left" valign="top">labelposition</td>
<td align="left" valign="top">false</td>
<td align="left" valign="top"></td>
<td align="left" valign="top">false</td>
<td align="left" valign="top">String</td>
<td align="left" valign="top">(Deprecated) Define label position of form element (top/left)</td>
</tr>
<tr>
<td align="left" valign="top">method</td>
<td align="left" valign="top">false</td>
Expand Down
8 changes: 0 additions & 8 deletions core/src/site/resources/tags/actionerror-attributes.html
Original file line number Diff line number Diff line change
Expand Up @@ -133,14 +133,6 @@
<td align="left" valign="top">String</td>
<td align="left" valign="top">String that will be appended to the label</td>
</tr>
<tr>
<td align="left" valign="top">labelposition</td>
<td align="left" valign="top">false</td>
<td align="left" valign="top"></td>
<td align="left" valign="top">false</td>
<td align="left" valign="top">String</td>
<td align="left" valign="top">(Deprecated) Define label position of form element (top/left)</td>
</tr>
<tr>
<td align="left" valign="top">name</td>
<td align="left" valign="top">false</td>
Expand Down
8 changes: 0 additions & 8 deletions core/src/site/resources/tags/actionmessage-attributes.html
Original file line number Diff line number Diff line change
Expand Up @@ -133,14 +133,6 @@
<td align="left" valign="top">String</td>
<td align="left" valign="top">String that will be appended to the label</td>
</tr>
<tr>
<td align="left" valign="top">labelposition</td>
<td align="left" valign="top">false</td>
<td align="left" valign="top"></td>
<td align="left" valign="top">false</td>
<td align="left" valign="top">String</td>
<td align="left" valign="top">(Deprecated) Define label position of form element (top/left)</td>
</tr>
<tr>
<td align="left" valign="top">name</td>
<td align="left" valign="top">false</td>
Expand Down
8 changes: 0 additions & 8 deletions core/src/site/resources/tags/checkbox-attributes.html
Original file line number Diff line number Diff line change
Expand Up @@ -133,14 +133,6 @@
<td align="left" valign="top">String</td>
<td align="left" valign="top">String that will be appended to the label</td>
</tr>
<tr>
<td align="left" valign="top">labelposition</td>
<td align="left" valign="top">false</td>
<td align="left" valign="top"></td>
<td align="left" valign="top">false</td>
<td align="left" valign="top">String</td>
<td align="left" valign="top">(Deprecated) Define label position of form element (top/left), also 'right' is supported when using 'xhtml' theme</td>
</tr>
<tr>
<td align="left" valign="top">name</td>
<td align="left" valign="top">false</td>
Expand Down
8 changes: 0 additions & 8 deletions core/src/site/resources/tags/checkboxlist-attributes.html
Original file line number Diff line number Diff line change
Expand Up @@ -125,14 +125,6 @@
<td align="left" valign="top">String</td>
<td align="left" valign="top">String that will be appended to the label</td>
</tr>
<tr>
<td align="left" valign="top">labelposition</td>
<td align="left" valign="top">false</td>
<td align="left" valign="top"></td>
<td align="left" valign="top">false</td>
<td align="left" valign="top">String</td>
<td align="left" valign="top">(Deprecated) Define label position of form element (top/left)</td>
</tr>
<tr>
<td align="left" valign="top">list</td>
<td align="left" valign="top"><strong>true</strong></td>
Expand Down
8 changes: 0 additions & 8 deletions core/src/site/resources/tags/combobox-attributes.html
Original file line number Diff line number Diff line change
Expand Up @@ -149,14 +149,6 @@
<td align="left" valign="top">String</td>
<td align="left" valign="top">String that will be appended to the label</td>
</tr>
<tr>
<td align="left" valign="top">labelposition</td>
<td align="left" valign="top">false</td>
<td align="left" valign="top"></td>
<td align="left" valign="top">false</td>
<td align="left" valign="top">String</td>
<td align="left" valign="top">(Deprecated) Define label position of form element (top/left)</td>
</tr>
<tr>
<td align="left" valign="top">list</td>
<td align="left" valign="top"><strong>true</strong></td>
Expand Down
8 changes: 0 additions & 8 deletions core/src/site/resources/tags/component-attributes.html
Original file line number Diff line number Diff line change
Expand Up @@ -125,14 +125,6 @@
<td align="left" valign="top">String</td>
<td align="left" valign="top">String that will be appended to the label</td>
</tr>
<tr>
<td align="left" valign="top">labelposition</td>
<td align="left" valign="top">false</td>
<td align="left" valign="top"></td>
<td align="left" valign="top">false</td>
<td align="left" valign="top">String</td>
<td align="left" valign="top">(Deprecated) Define label position of form element (top/left)</td>
</tr>
<tr>
<td align="left" valign="top">name</td>
<td align="left" valign="top">false</td>
Expand Down
8 changes: 0 additions & 8 deletions core/src/site/resources/tags/datetextfield-attributes.html
Original file line number Diff line number Diff line change
Expand Up @@ -133,14 +133,6 @@
<td align="left" valign="top">String</td>
<td align="left" valign="top">String that will be appended to the label</td>
</tr>
<tr>
<td align="left" valign="top">labelposition</td>
<td align="left" valign="top">false</td>
<td align="left" valign="top"></td>
<td align="left" valign="top">false</td>
<td align="left" valign="top">String</td>
<td align="left" valign="top">(Deprecated) Define label position of form element (top/left)</td>
</tr>
<tr>
<td align="left" valign="top">name</td>
<td align="left" valign="top">false</td>
Expand Down
8 changes: 0 additions & 8 deletions core/src/site/resources/tags/debug-attributes.html
Original file line number Diff line number Diff line change
Expand Up @@ -125,14 +125,6 @@
<td align="left" valign="top">String</td>
<td align="left" valign="top">String that will be appended to the label</td>
</tr>
<tr>
<td align="left" valign="top">labelposition</td>
<td align="left" valign="top">false</td>
<td align="left" valign="top"></td>
<td align="left" valign="top">false</td>
<td align="left" valign="top">String</td>
<td align="left" valign="top">(Deprecated) Define label position of form element (top/left)</td>
</tr>
<tr>
<td align="left" valign="top">name</td>
<td align="left" valign="top">false</td>
Expand Down
8 changes: 0 additions & 8 deletions core/src/site/resources/tags/doubleselect-attributes.html
Original file line number Diff line number Diff line change
Expand Up @@ -413,14 +413,6 @@
<td align="left" valign="top">String</td>
<td align="left" valign="top">String that will be appended to the label</td>
</tr>
<tr>
<td align="left" valign="top">labelposition</td>
<td align="left" valign="top">false</td>
<td align="left" valign="top"></td>
<td align="left" valign="top">false</td>
<td align="left" valign="top">String</td>
<td align="left" valign="top">(Deprecated) Define label position of form element (top/left)</td>
</tr>
<tr>
<td align="left" valign="top">list</td>
<td align="left" valign="top"><strong>true</strong></td>
Expand Down
8 changes: 0 additions & 8 deletions core/src/site/resources/tags/fielderror-attributes.html
Original file line number Diff line number Diff line change
Expand Up @@ -141,14 +141,6 @@
<td align="left" valign="top">String</td>
<td align="left" valign="top">String that will be appended to the label</td>
</tr>
<tr>
<td align="left" valign="top">labelposition</td>
<td align="left" valign="top">false</td>
<td align="left" valign="top"></td>
<td align="left" valign="top">false</td>
<td align="left" valign="top">String</td>
<td align="left" valign="top">(Deprecated) Define label position of form element (top/left)</td>
</tr>
<tr>
<td align="left" valign="top">name</td>
<td align="left" valign="top">false</td>
Expand Down
8 changes: 0 additions & 8 deletions core/src/site/resources/tags/file-attributes.html
Original file line number Diff line number Diff line change
Expand Up @@ -133,14 +133,6 @@
<td align="left" valign="top">String</td>
<td align="left" valign="top">String that will be appended to the label</td>
</tr>
<tr>
<td align="left" valign="top">labelposition</td>
<td align="left" valign="top">false</td>
<td align="left" valign="top"></td>
<td align="left" valign="top">false</td>
<td align="left" valign="top">String</td>
<td align="left" valign="top">(Deprecated) Define label position of form element (top/left)</td>
</tr>
<tr>
<td align="left" valign="top">name</td>
<td align="left" valign="top">false</td>
Expand Down
8 changes: 0 additions & 8 deletions core/src/site/resources/tags/form-attributes.html
Original file line number Diff line number Diff line change
Expand Up @@ -165,14 +165,6 @@
<td align="left" valign="top">String</td>
<td align="left" valign="top">String that will be appended to the label</td>
</tr>
<tr>
<td align="left" valign="top">labelposition</td>
<td align="left" valign="top">false</td>
<td align="left" valign="top"></td>
<td align="left" valign="top">false</td>
<td align="left" valign="top">String</td>
<td align="left" valign="top">(Deprecated) Define label position of form element (top/left)</td>
</tr>
<tr>
<td align="left" valign="top">method</td>
<td align="left" valign="top">false</td>
Expand Down
8 changes: 0 additions & 8 deletions core/src/site/resources/tags/head-attributes.html
Original file line number Diff line number Diff line change
Expand Up @@ -125,14 +125,6 @@
<td align="left" valign="top">String</td>
<td align="left" valign="top">String that will be appended to the label</td>
</tr>
<tr>
<td align="left" valign="top">labelposition</td>
<td align="left" valign="top">false</td>
<td align="left" valign="top"></td>
<td align="left" valign="top">false</td>
<td align="left" valign="top">String</td>
<td align="left" valign="top">(Deprecated) Define label position of form element (top/left)</td>
</tr>
<tr>
<td align="left" valign="top">name</td>
<td align="left" valign="top">false</td>
Expand Down
8 changes: 0 additions & 8 deletions core/src/site/resources/tags/hidden-attributes.html
Original file line number Diff line number Diff line change
Expand Up @@ -125,14 +125,6 @@
<td align="left" valign="top">String</td>
<td align="left" valign="top">String that will be appended to the label</td>
</tr>
<tr>
<td align="left" valign="top">labelposition</td>
<td align="left" valign="top">false</td>
<td align="left" valign="top"></td>
<td align="left" valign="top">false</td>
<td align="left" valign="top">String</td>
<td align="left" valign="top">(Deprecated) Define label position of form element (top/left)</td>
</tr>
<tr>
<td align="left" valign="top">name</td>
<td align="left" valign="top">false</td>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -189,14 +189,6 @@
<td align="left" valign="top">String</td>
<td align="left" valign="top">String that will be appended to the label</td>
</tr>
<tr>
<td align="left" valign="top">labelposition</td>
<td align="left" valign="top">false</td>
<td align="left" valign="top"></td>
<td align="left" valign="top">false</td>
<td align="left" valign="top">String</td>
<td align="left" valign="top">(Deprecated) Define label position of form element (top/left)</td>
</tr>
<tr>
<td align="left" valign="top">leftTitle</td>
<td align="left" valign="top">false</td>
Expand Down
8 changes: 0 additions & 8 deletions core/src/site/resources/tags/label-attributes.html
Original file line number Diff line number Diff line change
Expand Up @@ -133,14 +133,6 @@
<td align="left" valign="top">String</td>
<td align="left" valign="top">String that will be appended to the label</td>
</tr>
<tr>
<td align="left" valign="top">labelposition</td>
<td align="left" valign="top">false</td>
<td align="left" valign="top"></td>
<td align="left" valign="top">false</td>
<td align="left" valign="top">String</td>
<td align="left" valign="top">(Deprecated) Define label position of form element (top/left)</td>
</tr>
<tr>
<td align="left" valign="top">name</td>
<td align="left" valign="top">false</td>
Expand Down
8 changes: 0 additions & 8 deletions core/src/site/resources/tags/link-attributes.html
Original file line number Diff line number Diff line change
Expand Up @@ -157,14 +157,6 @@
<td align="left" valign="top">String</td>
<td align="left" valign="top">String that will be appended to the label</td>
</tr>
<tr>
<td align="left" valign="top">labelposition</td>
<td align="left" valign="top">false</td>
<td align="left" valign="top"></td>
<td align="left" valign="top">false</td>
<td align="left" valign="top">String</td>
<td align="left" valign="top">(Deprecated) Define label position of form element (top/left)</td>
</tr>
<tr>
<td align="left" valign="top">media</td>
<td align="left" valign="top">false</td>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -549,14 +549,6 @@
<td align="left" valign="top">String</td>
<td align="left" valign="top">String that will be appended to the label</td>
</tr>
<tr>
<td align="left" valign="top">labelposition</td>
<td align="left" valign="top">false</td>
<td align="left" valign="top"></td>
<td align="left" valign="top">false</td>
<td align="left" valign="top">String</td>
<td align="left" valign="top">(Deprecated) Define label position of form element (top/left)</td>
</tr>
<tr>
<td align="left" valign="top">leftDownLabel</td>
<td align="left" valign="top">false</td>
Expand Down
8 changes: 0 additions & 8 deletions core/src/site/resources/tags/password-attributes.html
Original file line number Diff line number Diff line change
Expand Up @@ -125,14 +125,6 @@
<td align="left" valign="top">String</td>
<td align="left" valign="top">String that will be appended to the label</td>
</tr>
<tr>
<td align="left" valign="top">labelposition</td>
<td align="left" valign="top">false</td>
<td align="left" valign="top"></td>
<td align="left" valign="top">false</td>
<td align="left" valign="top">String</td>
<td align="left" valign="top">(Deprecated) Define label position of form element (top/left)</td>
</tr>
<tr>
<td align="left" valign="top">maxLength</td>
<td align="left" valign="top">false</td>
Expand Down
8 changes: 0 additions & 8 deletions core/src/site/resources/tags/radio-attributes.html
Original file line number Diff line number Diff line change
Expand Up @@ -125,14 +125,6 @@
<td align="left" valign="top">String</td>
<td align="left" valign="top">String that will be appended to the label</td>
</tr>
<tr>
<td align="left" valign="top">labelposition</td>
<td align="left" valign="top">false</td>
<td align="left" valign="top"></td>
<td align="left" valign="top">false</td>
<td align="left" valign="top">String</td>
<td align="left" valign="top">(Deprecated) Define label position of form element (top/left)</td>
</tr>
<tr>
<td align="left" valign="top">list</td>
<td align="left" valign="top"><strong>true</strong></td>
Expand Down
Loading

0 comments on commit 58dcc83

Please sign in to comment.