struts-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From musa...@apache.org
Subject svn commit: r549655 - in /struts/struts2/trunk/core/src: main/java/org/apache/struts2/components/ main/java/org/apache/struts2/views/jsp/ui/ main/resources/template/css_xhtml/ main/resources/template/xhtml/ site/resources/tags/ test/java/org/apache/str...
Date Fri, 22 Jun 2007 00:53:25 GMT
Author: musachy
Date: Thu Jun 21 17:53:23 2007
New Revision: 549655

URL: http://svn.apache.org/viewvc?view=rev&rev=549655
Log:
WW-1852 Support alternate label separator in xhtml form tags (new attribute "labelSeparator")

Added:
    struts/struts2/trunk/core/src/test/resources/org/apache/struts2/views/jsp/ui/Textfield-4.txt
Modified:
    struts/struts2/trunk/core/src/main/java/org/apache/struts2/components/UIBean.java
    struts/struts2/trunk/core/src/main/java/org/apache/struts2/views/jsp/ui/AbstractUITag.java
    struts/struts2/trunk/core/src/main/resources/template/css_xhtml/controlheader-core.ftl
    struts/struts2/trunk/core/src/main/resources/template/xhtml/controlheader-core.ftl
    struts/struts2/trunk/core/src/site/resources/tags/a.html
    struts/struts2/trunk/core/src/site/resources/tags/actionerror.html
    struts/struts2/trunk/core/src/site/resources/tags/actionmessage.html
    struts/struts2/trunk/core/src/site/resources/tags/checkbox.html
    struts/struts2/trunk/core/src/site/resources/tags/checkboxlist.html
    struts/struts2/trunk/core/src/site/resources/tags/combobox.html
    struts/struts2/trunk/core/src/site/resources/tags/component.html
    struts/struts2/trunk/core/src/site/resources/tags/debug.html
    struts/struts2/trunk/core/src/site/resources/tags/div.html
    struts/struts2/trunk/core/src/site/resources/tags/doubleselect.html
    struts/struts2/trunk/core/src/site/resources/tags/fielderror.html
    struts/struts2/trunk/core/src/site/resources/tags/file.html
    struts/struts2/trunk/core/src/site/resources/tags/form.html
    struts/struts2/trunk/core/src/site/resources/tags/head.html
    struts/struts2/trunk/core/src/site/resources/tags/hidden.html
    struts/struts2/trunk/core/src/site/resources/tags/inputtransferselect.html
    struts/struts2/trunk/core/src/site/resources/tags/label.html
    struts/struts2/trunk/core/src/site/resources/tags/optiontransferselect.html
    struts/struts2/trunk/core/src/site/resources/tags/password.html
    struts/struts2/trunk/core/src/site/resources/tags/radio.html
    struts/struts2/trunk/core/src/site/resources/tags/reset.html
    struts/struts2/trunk/core/src/site/resources/tags/select.html
    struts/struts2/trunk/core/src/site/resources/tags/submit.html
    struts/struts2/trunk/core/src/site/resources/tags/textarea.html
    struts/struts2/trunk/core/src/site/resources/tags/textfield.html
    struts/struts2/trunk/core/src/site/resources/tags/token.html
    struts/struts2/trunk/core/src/site/resources/tags/updownselect.html
    struts/struts2/trunk/core/src/test/java/org/apache/struts2/views/jsp/ui/TextfieldTest.java

Modified: struts/struts2/trunk/core/src/main/java/org/apache/struts2/components/UIBean.java
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/java/org/apache/struts2/components/UIBean.java?view=diff&rev=549655&r1=549654&r2=549655
==============================================================================
--- struts/struts2/trunk/core/src/main/java/org/apache/struts2/components/UIBean.java (original)
+++ struts/struts2/trunk/core/src/main/java/org/apache/struts2/components/UIBean.java Thu
Jun 21 17:53:23 2007
@@ -430,6 +430,7 @@
     protected String disabled;
     protected String label;
     protected String labelPosition;
+    protected String labelSeparator;
     protected String requiredposition;
     protected String name;
     protected String required;
@@ -616,6 +617,10 @@
         if (label != null) {
             addParameter("label", findString(label));
         }
+        
+        if (labelSeparator != null) {
+            addParameter("labelseparator", findString(labelSeparator));
+        }
 
         if (labelPosition != null) {
             addParameter("labelposition", findString(labelPosition));
@@ -965,6 +970,11 @@
     @StrutsTagAttribute(description="Label expression used for rendering a element specific
label")
     public void setLabel(String label) {
         this.label = label;
+    }
+    
+    @StrutsTagAttribute(description="String that will be appended to the labe", defaultValue=":")
+    public void setLabelSeparator(String labelseparator) {
+        this.labelSeparator = labelseparator;
     }
 
     @StrutsTagAttribute(description="Define label position of form element (top/left)")

Modified: struts/struts2/trunk/core/src/main/java/org/apache/struts2/views/jsp/ui/AbstractUITag.java
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/java/org/apache/struts2/views/jsp/ui/AbstractUITag.java?view=diff&rev=549655&r1=549654&r2=549655
==============================================================================
--- struts/struts2/trunk/core/src/main/java/org/apache/struts2/views/jsp/ui/AbstractUITag.java
(original)
+++ struts/struts2/trunk/core/src/main/java/org/apache/struts2/views/jsp/ui/AbstractUITag.java
Thu Jun 21 17:53:23 2007
@@ -34,6 +34,7 @@
     protected String title;
     protected String disabled;
     protected String label;
+    protected String labelSeparator;
     protected String labelPosition;
     protected String requiredposition;
     protected String name;
@@ -79,6 +80,7 @@
         uiBean.setTitle(title);
         uiBean.setDisabled(disabled);
         uiBean.setLabel(label);
+        uiBean.setLabelSeparator(labelSeparator);
         uiBean.setLabelposition(labelPosition);
         uiBean.setRequiredposition(requiredposition);
         uiBean.setName(name);
@@ -254,5 +256,9 @@
 
     public void setTooltipIconPath(String tooltipIconPath) {
         this.tooltipIconPath = tooltipIconPath;
+    }
+
+    public void setLabelSeparator(String labelSeparator) {
+        this.labelSeparator = labelSeparator;
     }    
 }

Modified: struts/struts2/trunk/core/src/main/resources/template/css_xhtml/controlheader-core.ftl
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/resources/template/css_xhtml/controlheader-core.ftl?view=diff&rev=549655&r1=549654&r2=549655
==============================================================================
--- struts/struts2/trunk/core/src/main/resources/template/css_xhtml/controlheader-core.ftl
(original)
+++ struts/struts2/trunk/core/src/main/resources/template/css_xhtml/controlheader-core.ftl
Thu Jun 21 17:53:23 2007
@@ -39,7 +39,7 @@
 <#if parameters.required?default(false)>
         <span class="required">*</span><#t/>
 </#if>
-        ${parameters.label?html}:
+        ${parameters.label?html}${parameters.labelseparator!":"?html}
 <#include "/${parameters.templateDir}/xhtml/tooltip.ftl" />
 	</label><#t/>
 <#if parameters.labelposition?default("top") == 'top'>

Modified: struts/struts2/trunk/core/src/main/resources/template/xhtml/controlheader-core.ftl
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/resources/template/xhtml/controlheader-core.ftl?view=diff&rev=549655&r1=549654&r2=549655
==============================================================================
--- struts/struts2/trunk/core/src/main/resources/template/xhtml/controlheader-core.ftl (original)
+++ struts/struts2/trunk/core/src/main/resources/template/xhtml/controlheader-core.ftl Thu
Jun 21 17:53:23 2007
@@ -44,7 +44,7 @@
 <#if parameters.required?default(false) && parameters.requiredposition?default("right")
== 'right'>
  <span class="required">*</span><#t/>
 </#if>
-:<#t/>
+${parameters.labelseparator!":"?html}<#t/>
 <#include "/${parameters.templateDir}/xhtml/tooltip.ftl" /> 
 </label><#t/>
 </#if>

Modified: struts/struts2/trunk/core/src/site/resources/tags/a.html
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/site/resources/tags/a.html?view=diff&rev=549655&r1=549654&r2=549655
==============================================================================
--- struts/struts2/trunk/core/src/site/resources/tags/a.html (original)
+++ struts/struts2/trunk/core/src/site/resources/tags/a.html Thu Jun 21 17:53:23 2007
@@ -100,6 +100,14 @@
 					<td align="left" valign="top">Label expression used for rendering a element specific
label</td>
 				</tr>
 				<tr>
+					<td align="left" valign="top">labelSeparator</td>
+					<td align="left" valign="top">false</td>
+					<td align="left" valign="top">:</td>
+					<td align="left" valign="top">true</td>
+					<td align="left" valign="top">String</td>
+					<td align="left" valign="top">String that will be appended to the labe</td>
+				</tr>
+				<tr>
 					<td align="left" valign="top">labelposition</td>
 					<td align="left" valign="top">false</td>
 					<td align="left" valign="top"></td>

Modified: struts/struts2/trunk/core/src/site/resources/tags/actionerror.html
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/site/resources/tags/actionerror.html?view=diff&rev=549655&r1=549654&r2=549655
==============================================================================
--- struts/struts2/trunk/core/src/site/resources/tags/actionerror.html (original)
+++ struts/struts2/trunk/core/src/site/resources/tags/actionerror.html Thu Jun 21 17:53:23
2007
@@ -92,6 +92,14 @@
 					<td align="left" valign="top">Label expression used for rendering a element specific
label</td>
 				</tr>
 				<tr>
+					<td align="left" valign="top">labelSeparator</td>
+					<td align="left" valign="top">false</td>
+					<td align="left" valign="top">:</td>
+					<td align="left" valign="top">true</td>
+					<td align="left" valign="top">String</td>
+					<td align="left" valign="top">String that will be appended to the labe</td>
+				</tr>
+				<tr>
 					<td align="left" valign="top">labelposition</td>
 					<td align="left" valign="top">false</td>
 					<td align="left" valign="top"></td>

Modified: struts/struts2/trunk/core/src/site/resources/tags/actionmessage.html
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/site/resources/tags/actionmessage.html?view=diff&rev=549655&r1=549654&r2=549655
==============================================================================
--- struts/struts2/trunk/core/src/site/resources/tags/actionmessage.html (original)
+++ struts/struts2/trunk/core/src/site/resources/tags/actionmessage.html Thu Jun 21 17:53:23
2007
@@ -92,6 +92,14 @@
 					<td align="left" valign="top">Label expression used for rendering a element specific
label</td>
 				</tr>
 				<tr>
+					<td align="left" valign="top">labelSeparator</td>
+					<td align="left" valign="top">false</td>
+					<td align="left" valign="top">:</td>
+					<td align="left" valign="top">true</td>
+					<td align="left" valign="top">String</td>
+					<td align="left" valign="top">String that will be appended to the labe</td>
+				</tr>
+				<tr>
 					<td align="left" valign="top">labelposition</td>
 					<td align="left" valign="top">false</td>
 					<td align="left" valign="top"></td>

Modified: struts/struts2/trunk/core/src/site/resources/tags/checkbox.html
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/site/resources/tags/checkbox.html?view=diff&rev=549655&r1=549654&r2=549655
==============================================================================
--- struts/struts2/trunk/core/src/site/resources/tags/checkbox.html (original)
+++ struts/struts2/trunk/core/src/site/resources/tags/checkbox.html Thu Jun 21 17:53:23 2007
@@ -100,6 +100,14 @@
 					<td align="left" valign="top">Label expression used for rendering a element specific
label</td>
 				</tr>
 				<tr>
+					<td align="left" valign="top">labelSeparator</td>
+					<td align="left" valign="top">false</td>
+					<td align="left" valign="top">:</td>
+					<td align="left" valign="top">true</td>
+					<td align="left" valign="top">String</td>
+					<td align="left" valign="top">String that will be appended to the labe</td>
+				</tr>
+				<tr>
 					<td align="left" valign="top">labelposition</td>
 					<td align="left" valign="top">false</td>
 					<td align="left" valign="top"></td>

Modified: struts/struts2/trunk/core/src/site/resources/tags/checkboxlist.html
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/site/resources/tags/checkboxlist.html?view=diff&rev=549655&r1=549654&r2=549655
==============================================================================
--- struts/struts2/trunk/core/src/site/resources/tags/checkboxlist.html (original)
+++ struts/struts2/trunk/core/src/site/resources/tags/checkboxlist.html Thu Jun 21 17:53:23
2007
@@ -92,6 +92,14 @@
 					<td align="left" valign="top">Label expression used for rendering a element specific
label</td>
 				</tr>
 				<tr>
+					<td align="left" valign="top">labelSeparator</td>
+					<td align="left" valign="top">false</td>
+					<td align="left" valign="top">:</td>
+					<td align="left" valign="top">true</td>
+					<td align="left" valign="top">String</td>
+					<td align="left" valign="top">String that will be appended to the labe</td>
+				</tr>
+				<tr>
 					<td align="left" valign="top">labelposition</td>
 					<td align="left" valign="top">false</td>
 					<td align="left" valign="top"></td>

Modified: struts/struts2/trunk/core/src/site/resources/tags/combobox.html
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/site/resources/tags/combobox.html?view=diff&rev=549655&r1=549654&r2=549655
==============================================================================
--- struts/struts2/trunk/core/src/site/resources/tags/combobox.html (original)
+++ struts/struts2/trunk/core/src/site/resources/tags/combobox.html Thu Jun 21 17:53:23 2007
@@ -116,6 +116,14 @@
 					<td align="left" valign="top">Label expression used for rendering a element specific
label</td>
 				</tr>
 				<tr>
+					<td align="left" valign="top">labelSeparator</td>
+					<td align="left" valign="top">false</td>
+					<td align="left" valign="top">:</td>
+					<td align="left" valign="top">true</td>
+					<td align="left" valign="top">String</td>
+					<td align="left" valign="top">String that will be appended to the labe</td>
+				</tr>
+				<tr>
 					<td align="left" valign="top">labelposition</td>
 					<td align="left" valign="top">false</td>
 					<td align="left" valign="top"></td>

Modified: struts/struts2/trunk/core/src/site/resources/tags/component.html
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/site/resources/tags/component.html?view=diff&rev=549655&r1=549654&r2=549655
==============================================================================
--- struts/struts2/trunk/core/src/site/resources/tags/component.html (original)
+++ struts/struts2/trunk/core/src/site/resources/tags/component.html Thu Jun 21 17:53:23 2007
@@ -92,6 +92,14 @@
 					<td align="left" valign="top">Label expression used for rendering a element specific
label</td>
 				</tr>
 				<tr>
+					<td align="left" valign="top">labelSeparator</td>
+					<td align="left" valign="top">false</td>
+					<td align="left" valign="top">:</td>
+					<td align="left" valign="top">true</td>
+					<td align="left" valign="top">String</td>
+					<td align="left" valign="top">String that will be appended to the labe</td>
+				</tr>
+				<tr>
 					<td align="left" valign="top">labelposition</td>
 					<td align="left" valign="top">false</td>
 					<td align="left" valign="top"></td>

Modified: struts/struts2/trunk/core/src/site/resources/tags/debug.html
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/site/resources/tags/debug.html?view=diff&rev=549655&r1=549654&r2=549655
==============================================================================
--- struts/struts2/trunk/core/src/site/resources/tags/debug.html (original)
+++ struts/struts2/trunk/core/src/site/resources/tags/debug.html Thu Jun 21 17:53:23 2007
@@ -92,6 +92,14 @@
 					<td align="left" valign="top">Label expression used for rendering a element specific
label</td>
 				</tr>
 				<tr>
+					<td align="left" valign="top">labelSeparator</td>
+					<td align="left" valign="top">false</td>
+					<td align="left" valign="top">:</td>
+					<td align="left" valign="top">true</td>
+					<td align="left" valign="top">String</td>
+					<td align="left" valign="top">String that will be appended to the labe</td>
+				</tr>
+				<tr>
 					<td align="left" valign="top">labelposition</td>
 					<td align="left" valign="top">false</td>
 					<td align="left" valign="top"></td>

Modified: struts/struts2/trunk/core/src/site/resources/tags/div.html
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/site/resources/tags/div.html?view=diff&rev=549655&r1=549654&r2=549655
==============================================================================
--- struts/struts2/trunk/core/src/site/resources/tags/div.html (original)
+++ struts/struts2/trunk/core/src/site/resources/tags/div.html Thu Jun 21 17:53:23 2007
@@ -92,6 +92,14 @@
 					<td align="left" valign="top">Label expression used for rendering a element specific
label</td>
 				</tr>
 				<tr>
+					<td align="left" valign="top">labelSeparator</td>
+					<td align="left" valign="top">false</td>
+					<td align="left" valign="top">:</td>
+					<td align="left" valign="top">true</td>
+					<td align="left" valign="top">String</td>
+					<td align="left" valign="top">String that will be appended to the labe</td>
+				</tr>
+				<tr>
 					<td align="left" valign="top">labelposition</td>
 					<td align="left" valign="top">false</td>
 					<td align="left" valign="top"></td>

Modified: struts/struts2/trunk/core/src/site/resources/tags/doubleselect.html
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/site/resources/tags/doubleselect.html?view=diff&rev=549655&r1=549654&r2=549655
==============================================================================
--- struts/struts2/trunk/core/src/site/resources/tags/doubleselect.html (original)
+++ struts/struts2/trunk/core/src/site/resources/tags/doubleselect.html Thu Jun 21 17:53:23
2007
@@ -356,6 +356,14 @@
 					<td align="left" valign="top">Label expression used for rendering a element specific
label</td>
 				</tr>
 				<tr>
+					<td align="left" valign="top">labelSeparator</td>
+					<td align="left" valign="top">false</td>
+					<td align="left" valign="top">:</td>
+					<td align="left" valign="top">true</td>
+					<td align="left" valign="top">String</td>
+					<td align="left" valign="top">String that will be appended to the labe</td>
+				</tr>
+				<tr>
 					<td align="left" valign="top">labelposition</td>
 					<td align="left" valign="top">false</td>
 					<td align="left" valign="top"></td>

Modified: struts/struts2/trunk/core/src/site/resources/tags/fielderror.html
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/site/resources/tags/fielderror.html?view=diff&rev=549655&r1=549654&r2=549655
==============================================================================
--- struts/struts2/trunk/core/src/site/resources/tags/fielderror.html (original)
+++ struts/struts2/trunk/core/src/site/resources/tags/fielderror.html Thu Jun 21 17:53:23
2007
@@ -92,6 +92,14 @@
 					<td align="left" valign="top">Label expression used for rendering a element specific
label</td>
 				</tr>
 				<tr>
+					<td align="left" valign="top">labelSeparator</td>
+					<td align="left" valign="top">false</td>
+					<td align="left" valign="top">:</td>
+					<td align="left" valign="top">true</td>
+					<td align="left" valign="top">String</td>
+					<td align="left" valign="top">String that will be appended to the labe</td>
+				</tr>
+				<tr>
 					<td align="left" valign="top">labelposition</td>
 					<td align="left" valign="top">false</td>
 					<td align="left" valign="top"></td>

Modified: struts/struts2/trunk/core/src/site/resources/tags/file.html
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/site/resources/tags/file.html?view=diff&rev=549655&r1=549654&r2=549655
==============================================================================
--- struts/struts2/trunk/core/src/site/resources/tags/file.html (original)
+++ struts/struts2/trunk/core/src/site/resources/tags/file.html Thu Jun 21 17:53:23 2007
@@ -100,6 +100,14 @@
 					<td align="left" valign="top">Label expression used for rendering a element specific
label</td>
 				</tr>
 				<tr>
+					<td align="left" valign="top">labelSeparator</td>
+					<td align="left" valign="top">false</td>
+					<td align="left" valign="top">:</td>
+					<td align="left" valign="top">true</td>
+					<td align="left" valign="top">String</td>
+					<td align="left" valign="top">String that will be appended to the labe</td>
+				</tr>
+				<tr>
 					<td align="left" valign="top">labelposition</td>
 					<td align="left" valign="top">false</td>
 					<td align="left" valign="top"></td>

Modified: struts/struts2/trunk/core/src/site/resources/tags/form.html
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/site/resources/tags/form.html?view=diff&rev=549655&r1=549654&r2=549655
==============================================================================
--- struts/struts2/trunk/core/src/site/resources/tags/form.html (original)
+++ struts/struts2/trunk/core/src/site/resources/tags/form.html Thu Jun 21 17:53:23 2007
@@ -124,6 +124,14 @@
 					<td align="left" valign="top">Label expression used for rendering a element specific
label</td>
 				</tr>
 				<tr>
+					<td align="left" valign="top">labelSeparator</td>
+					<td align="left" valign="top">false</td>
+					<td align="left" valign="top">:</td>
+					<td align="left" valign="top">true</td>
+					<td align="left" valign="top">String</td>
+					<td align="left" valign="top">String that will be appended to the labe</td>
+				</tr>
+				<tr>
 					<td align="left" valign="top">labelposition</td>
 					<td align="left" valign="top">false</td>
 					<td align="left" valign="top"></td>

Modified: struts/struts2/trunk/core/src/site/resources/tags/head.html
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/site/resources/tags/head.html?view=diff&rev=549655&r1=549654&r2=549655
==============================================================================
--- struts/struts2/trunk/core/src/site/resources/tags/head.html (original)
+++ struts/struts2/trunk/core/src/site/resources/tags/head.html Thu Jun 21 17:53:23 2007
@@ -92,6 +92,14 @@
 					<td align="left" valign="top">Label expression used for rendering a element specific
label</td>
 				</tr>
 				<tr>
+					<td align="left" valign="top">labelSeparator</td>
+					<td align="left" valign="top">false</td>
+					<td align="left" valign="top">:</td>
+					<td align="left" valign="top">true</td>
+					<td align="left" valign="top">String</td>
+					<td align="left" valign="top">String that will be appended to the labe</td>
+				</tr>
+				<tr>
 					<td align="left" valign="top">labelposition</td>
 					<td align="left" valign="top">false</td>
 					<td align="left" valign="top"></td>

Modified: struts/struts2/trunk/core/src/site/resources/tags/hidden.html
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/site/resources/tags/hidden.html?view=diff&rev=549655&r1=549654&r2=549655
==============================================================================
--- struts/struts2/trunk/core/src/site/resources/tags/hidden.html (original)
+++ struts/struts2/trunk/core/src/site/resources/tags/hidden.html Thu Jun 21 17:53:23 2007
@@ -92,6 +92,14 @@
 					<td align="left" valign="top">Label expression used for rendering a element specific
label</td>
 				</tr>
 				<tr>
+					<td align="left" valign="top">labelSeparator</td>
+					<td align="left" valign="top">false</td>
+					<td align="left" valign="top">:</td>
+					<td align="left" valign="top">true</td>
+					<td align="left" valign="top">String</td>
+					<td align="left" valign="top">String that will be appended to the labe</td>
+				</tr>
+				<tr>
 					<td align="left" valign="top">labelposition</td>
 					<td align="left" valign="top">false</td>
 					<td align="left" valign="top"></td>

Modified: struts/struts2/trunk/core/src/site/resources/tags/inputtransferselect.html
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/site/resources/tags/inputtransferselect.html?view=diff&rev=549655&r1=549654&r2=549655
==============================================================================
--- struts/struts2/trunk/core/src/site/resources/tags/inputtransferselect.html (original)
+++ struts/struts2/trunk/core/src/site/resources/tags/inputtransferselect.html Thu Jun 21
17:53:23 2007
@@ -156,6 +156,14 @@
 					<td align="left" valign="top">Label expression used for rendering a element specific
label</td>
 				</tr>
 				<tr>
+					<td align="left" valign="top">labelSeparator</td>
+					<td align="left" valign="top">false</td>
+					<td align="left" valign="top">:</td>
+					<td align="left" valign="top">true</td>
+					<td align="left" valign="top">String</td>
+					<td align="left" valign="top">String that will be appended to the labe</td>
+				</tr>
+				<tr>
 					<td align="left" valign="top">labelposition</td>
 					<td align="left" valign="top">false</td>
 					<td align="left" valign="top"></td>

Modified: struts/struts2/trunk/core/src/site/resources/tags/label.html
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/site/resources/tags/label.html?view=diff&rev=549655&r1=549654&r2=549655
==============================================================================
--- struts/struts2/trunk/core/src/site/resources/tags/label.html (original)
+++ struts/struts2/trunk/core/src/site/resources/tags/label.html Thu Jun 21 17:53:23 2007
@@ -100,6 +100,14 @@
 					<td align="left" valign="top">Label expression used for rendering a element specific
label</td>
 				</tr>
 				<tr>
+					<td align="left" valign="top">labelSeparator</td>
+					<td align="left" valign="top">false</td>
+					<td align="left" valign="top">:</td>
+					<td align="left" valign="top">true</td>
+					<td align="left" valign="top">String</td>
+					<td align="left" valign="top">String that will be appended to the labe</td>
+				</tr>
+				<tr>
 					<td align="left" valign="top">labelposition</td>
 					<td align="left" valign="top">false</td>
 					<td align="left" valign="top"></td>

Modified: struts/struts2/trunk/core/src/site/resources/tags/optiontransferselect.html
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/site/resources/tags/optiontransferselect.html?view=diff&rev=549655&r1=549654&r2=549655
==============================================================================
--- struts/struts2/trunk/core/src/site/resources/tags/optiontransferselect.html (original)
+++ struts/struts2/trunk/core/src/site/resources/tags/optiontransferselect.html Thu Jun 21
17:53:23 2007
@@ -460,6 +460,14 @@
 					<td align="left" valign="top">Label expression used for rendering a element specific
label</td>
 				</tr>
 				<tr>
+					<td align="left" valign="top">labelSeparator</td>
+					<td align="left" valign="top">false</td>
+					<td align="left" valign="top">:</td>
+					<td align="left" valign="top">true</td>
+					<td align="left" valign="top">String</td>
+					<td align="left" valign="top">String that will be appended to the labe</td>
+				</tr>
+				<tr>
 					<td align="left" valign="top">labelposition</td>
 					<td align="left" valign="top">false</td>
 					<td align="left" valign="top"></td>

Modified: struts/struts2/trunk/core/src/site/resources/tags/password.html
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/site/resources/tags/password.html?view=diff&rev=549655&r1=549654&r2=549655
==============================================================================
--- struts/struts2/trunk/core/src/site/resources/tags/password.html (original)
+++ struts/struts2/trunk/core/src/site/resources/tags/password.html Thu Jun 21 17:53:23 2007
@@ -92,6 +92,14 @@
 					<td align="left" valign="top">Label expression used for rendering a element specific
label</td>
 				</tr>
 				<tr>
+					<td align="left" valign="top">labelSeparator</td>
+					<td align="left" valign="top">false</td>
+					<td align="left" valign="top">:</td>
+					<td align="left" valign="top">true</td>
+					<td align="left" valign="top">String</td>
+					<td align="left" valign="top">String that will be appended to the labe</td>
+				</tr>
+				<tr>
 					<td align="left" valign="top">labelposition</td>
 					<td align="left" valign="top">false</td>
 					<td align="left" valign="top"></td>

Modified: struts/struts2/trunk/core/src/site/resources/tags/radio.html
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/site/resources/tags/radio.html?view=diff&rev=549655&r1=549654&r2=549655
==============================================================================
--- struts/struts2/trunk/core/src/site/resources/tags/radio.html (original)
+++ struts/struts2/trunk/core/src/site/resources/tags/radio.html Thu Jun 21 17:53:23 2007
@@ -92,6 +92,14 @@
 					<td align="left" valign="top">Label expression used for rendering a element specific
label</td>
 				</tr>
 				<tr>
+					<td align="left" valign="top">labelSeparator</td>
+					<td align="left" valign="top">false</td>
+					<td align="left" valign="top">:</td>
+					<td align="left" valign="top">true</td>
+					<td align="left" valign="top">String</td>
+					<td align="left" valign="top">String that will be appended to the labe</td>
+				</tr>
+				<tr>
 					<td align="left" valign="top">labelposition</td>
 					<td align="left" valign="top">false</td>
 					<td align="left" valign="top"></td>

Modified: struts/struts2/trunk/core/src/site/resources/tags/reset.html
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/site/resources/tags/reset.html?view=diff&rev=549655&r1=549654&r2=549655
==============================================================================
--- struts/struts2/trunk/core/src/site/resources/tags/reset.html (original)
+++ struts/struts2/trunk/core/src/site/resources/tags/reset.html Thu Jun 21 17:53:23 2007
@@ -108,6 +108,14 @@
 					<td align="left" valign="top">Supply a reset button text apart from reset value.
Will have no effect for <i>input</i> type reset, since button text will always
be the value parameter.</td>
 				</tr>
 				<tr>
+					<td align="left" valign="top">labelSeparator</td>
+					<td align="left" valign="top">false</td>
+					<td align="left" valign="top">:</td>
+					<td align="left" valign="top">true</td>
+					<td align="left" valign="top">String</td>
+					<td align="left" valign="top">String that will be appended to the labe</td>
+				</tr>
+				<tr>
 					<td align="left" valign="top">labelposition</td>
 					<td align="left" valign="top">false</td>
 					<td align="left" valign="top"></td>

Modified: struts/struts2/trunk/core/src/site/resources/tags/select.html
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/site/resources/tags/select.html?view=diff&rev=549655&r1=549654&r2=549655
==============================================================================
--- struts/struts2/trunk/core/src/site/resources/tags/select.html (original)
+++ struts/struts2/trunk/core/src/site/resources/tags/select.html Thu Jun 21 17:53:23 2007
@@ -116,6 +116,14 @@
 					<td align="left" valign="top">Label expression used for rendering a element specific
label</td>
 				</tr>
 				<tr>
+					<td align="left" valign="top">labelSeparator</td>
+					<td align="left" valign="top">false</td>
+					<td align="left" valign="top">:</td>
+					<td align="left" valign="top">true</td>
+					<td align="left" valign="top">String</td>
+					<td align="left" valign="top">String that will be appended to the labe</td>
+				</tr>
+				<tr>
 					<td align="left" valign="top">labelposition</td>
 					<td align="left" valign="top">false</td>
 					<td align="left" valign="top"></td>

Modified: struts/struts2/trunk/core/src/site/resources/tags/submit.html
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/site/resources/tags/submit.html?view=diff&rev=549655&r1=549654&r2=549655
==============================================================================
--- struts/struts2/trunk/core/src/site/resources/tags/submit.html (original)
+++ struts/struts2/trunk/core/src/site/resources/tags/submit.html Thu Jun 21 17:53:23 2007
@@ -108,6 +108,14 @@
 					<td align="left" valign="top">Label expression used for rendering a element specific
label</td>
 				</tr>
 				<tr>
+					<td align="left" valign="top">labelSeparator</td>
+					<td align="left" valign="top">false</td>
+					<td align="left" valign="top">:</td>
+					<td align="left" valign="top">true</td>
+					<td align="left" valign="top">String</td>
+					<td align="left" valign="top">String that will be appended to the labe</td>
+				</tr>
+				<tr>
 					<td align="left" valign="top">labelposition</td>
 					<td align="left" valign="top">false</td>
 					<td align="left" valign="top"></td>

Modified: struts/struts2/trunk/core/src/site/resources/tags/textarea.html
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/site/resources/tags/textarea.html?view=diff&rev=549655&r1=549654&r2=549655
==============================================================================
--- struts/struts2/trunk/core/src/site/resources/tags/textarea.html (original)
+++ struts/struts2/trunk/core/src/site/resources/tags/textarea.html Thu Jun 21 17:53:23 2007
@@ -100,6 +100,14 @@
 					<td align="left" valign="top">Label expression used for rendering a element specific
label</td>
 				</tr>
 				<tr>
+					<td align="left" valign="top">labelSeparator</td>
+					<td align="left" valign="top">false</td>
+					<td align="left" valign="top">:</td>
+					<td align="left" valign="top">true</td>
+					<td align="left" valign="top">String</td>
+					<td align="left" valign="top">String that will be appended to the labe</td>
+				</tr>
+				<tr>
 					<td align="left" valign="top">labelposition</td>
 					<td align="left" valign="top">false</td>
 					<td align="left" valign="top"></td>

Modified: struts/struts2/trunk/core/src/site/resources/tags/textfield.html
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/site/resources/tags/textfield.html?view=diff&rev=549655&r1=549654&r2=549655
==============================================================================
--- struts/struts2/trunk/core/src/site/resources/tags/textfield.html (original)
+++ struts/struts2/trunk/core/src/site/resources/tags/textfield.html Thu Jun 21 17:53:23 2007
@@ -92,6 +92,14 @@
 					<td align="left" valign="top">Label expression used for rendering a element specific
label</td>
 				</tr>
 				<tr>
+					<td align="left" valign="top">labelSeparator</td>
+					<td align="left" valign="top">false</td>
+					<td align="left" valign="top">:</td>
+					<td align="left" valign="top">true</td>
+					<td align="left" valign="top">String</td>
+					<td align="left" valign="top">String that will be appended to the labe</td>
+				</tr>
+				<tr>
 					<td align="left" valign="top">labelposition</td>
 					<td align="left" valign="top">false</td>
 					<td align="left" valign="top"></td>

Modified: struts/struts2/trunk/core/src/site/resources/tags/token.html
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/site/resources/tags/token.html?view=diff&rev=549655&r1=549654&r2=549655
==============================================================================
--- struts/struts2/trunk/core/src/site/resources/tags/token.html (original)
+++ struts/struts2/trunk/core/src/site/resources/tags/token.html Thu Jun 21 17:53:23 2007
@@ -92,6 +92,14 @@
 					<td align="left" valign="top">Label expression used for rendering a element specific
label</td>
 				</tr>
 				<tr>
+					<td align="left" valign="top">labelSeparator</td>
+					<td align="left" valign="top">false</td>
+					<td align="left" valign="top">:</td>
+					<td align="left" valign="top">true</td>
+					<td align="left" valign="top">String</td>
+					<td align="left" valign="top">String that will be appended to the labe</td>
+				</tr>
+				<tr>
 					<td align="left" valign="top">labelposition</td>
 					<td align="left" valign="top">false</td>
 					<td align="left" valign="top"></td>

Modified: struts/struts2/trunk/core/src/site/resources/tags/updownselect.html
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/site/resources/tags/updownselect.html?view=diff&rev=549655&r1=549654&r2=549655
==============================================================================
--- struts/struts2/trunk/core/src/site/resources/tags/updownselect.html (original)
+++ struts/struts2/trunk/core/src/site/resources/tags/updownselect.html Thu Jun 21 17:53:23
2007
@@ -140,6 +140,14 @@
 					<td align="left" valign="top">Label expression used for rendering a element specific
label</td>
 				</tr>
 				<tr>
+					<td align="left" valign="top">labelSeparator</td>
+					<td align="left" valign="top">false</td>
+					<td align="left" valign="top">:</td>
+					<td align="left" valign="top">true</td>
+					<td align="left" valign="top">String</td>
+					<td align="left" valign="top">String that will be appended to the labe</td>
+				</tr>
+				<tr>
 					<td align="left" valign="top">labelposition</td>
 					<td align="left" valign="top">false</td>
 					<td align="left" valign="top"></td>

Modified: struts/struts2/trunk/core/src/test/java/org/apache/struts2/views/jsp/ui/TextfieldTest.java
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/test/java/org/apache/struts2/views/jsp/ui/TextfieldTest.java?view=diff&rev=549655&r1=549654&r2=549655
==============================================================================
--- struts/struts2/trunk/core/src/test/java/org/apache/struts2/views/jsp/ui/TextfieldTest.java
(original)
+++ struts/struts2/trunk/core/src/test/java/org/apache/struts2/views/jsp/ui/TextfieldTest.java
Thu Jun 21 17:53:23 2007
@@ -95,6 +95,25 @@
 
         verify(TextFieldTag.class.getResource("Textfield-3.txt"));
     }
+    
+    public void testLabelSeparatorJsp() throws Exception {
+        TestAction testAction = (TestAction) action;
+        testAction.setFoo("bar");
+
+        TextFieldTag tag = new TextFieldTag();
+        tag.setPageContext(pageContext);
+        tag.setName("myname");
+        tag.setValue("%{foo}");
+        tag.setSize("10");
+        tag.setOnblur("blahescape('somevalue');");
+        tag.setLabelSeparator("??");
+        tag.setLabel("label");
+
+        tag.doStartTag();
+        tag.doEndTag();
+
+        verify(TextFieldTag.class.getResource("Textfield-4.txt"));
+    }
 
     public void testNoLabelFtl() throws Exception {
         TestAction testAction = (TestAction) action;

Added: struts/struts2/trunk/core/src/test/resources/org/apache/struts2/views/jsp/ui/Textfield-4.txt
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/test/resources/org/apache/struts2/views/jsp/ui/Textfield-4.txt?view=auto&rev=549655
==============================================================================
--- struts/struts2/trunk/core/src/test/resources/org/apache/struts2/views/jsp/ui/Textfield-4.txt
(added)
+++ struts/struts2/trunk/core/src/test/resources/org/apache/struts2/views/jsp/ui/Textfield-4.txt
Thu Jun 21 17:53:23 2007
@@ -0,0 +1,6 @@
+<tr>
+    <td class="tdLabel">
+        <label for="myname" class="label">label??</label>
+    </td>
+    <td><input type="text" name="myname" size="10" value="bar" id="myname" onblur="blahescape('somevalue');"/></td>
+</tr>
\ No newline at end of file



Mime
View raw message