Author: martinc Date: Tue Dec 28 17:35:59 2004 New Revision: 123587 URL: http://svn.apache.org/viewcvs?view=rev&rev=123587 Log: Port recent fixes from trunk to the 1.2.x branch:
* Make sure all ModuleException constructors invoke super. * Bug #32504: Document the means used to format values in the <bean:write> tag. * Bug #32016: Wrap the hidden token field in a <div> element for HTML 4.01 Strict compliance. Modified: struts/core/branches/STRUTS_1_2_BRANCH/doc/userGuide/struts-bean.xml struts/core/branches/STRUTS_1_2_BRANCH/src/share/org/apache/struts/taglib/html/FormTag.java struts/core/branches/STRUTS_1_2_BRANCH/src/share/org/apache/struts/util/ModuleException.java Modified: struts/core/branches/STRUTS_1_2_BRANCH/doc/userGuide/struts-bean.xml Url: http://svn.apache.org/viewcvs/struts/core/branches/STRUTS_1_2_BRANCH/doc/userGuide/struts-bean.xml?view=diff&rev=123587&p1=struts/core/branches/STRUTS_1_2_BRANCH/doc/userGuide/struts-bean.xml&r1=123586&p2=struts/core/branches/STRUTS_1_2_BRANCH/doc/userGuide/struts-bean.xml&r2=123587 ============================================================================== --- struts/core/branches/STRUTS_1_2_BRANCH/doc/userGuide/struts-bean.xml (original) +++ struts/core/branches/STRUTS_1_2_BRANCH/doc/userGuide/struts-bean.xml Tue Dec 28 17:35:59 2004 @@ -956,7 +956,12 @@ <code>getAsText()</code> method will be called.</li> <li>Otherwise, the usual <code>toString()</code> conversions will be applied.</li> </ul> - + <p>When a format string is provided, numeric values are formatted using the + <code>java.text.DecimalFormat</code> class; if the format string came from + a resource, the <code>applyLocalisedPattern()</code> method is used, and + <code>applyPattern()</code> is used otherwise. Dates are formatted using + the <code>SimpleDateFormat</code> class. For details of the specific format + patterns, please see the Javadocs for those classes.</p> <p>If a problem occurs while retrieving the specified bean property, a request time exception will be thrown.</p> </info> Modified: struts/core/branches/STRUTS_1_2_BRANCH/src/share/org/apache/struts/taglib/html/FormTag.java Url: http://svn.apache.org/viewcvs/struts/core/branches/STRUTS_1_2_BRANCH/src/share/org/apache/struts/taglib/html/FormTag.java?view=diff&rev=123587&p1=struts/core/branches/STRUTS_1_2_BRANCH/src/share/org/apache/struts/taglib/html/FormTag.java&r1=123586&p2=struts/core/branches/STRUTS_1_2_BRANCH/src/share/org/apache/struts/taglib/html/FormTag.java&r2=123587 ============================================================================== --- struts/core/branches/STRUTS_1_2_BRANCH/src/share/org/apache/struts/taglib/html/FormTag.java (original) +++ struts/core/branches/STRUTS_1_2_BRANCH/src/share/org/apache/struts/taglib/html/FormTag.java Tue Dec 28 17:35:59 2004 @@ -529,7 +529,8 @@ } /** - * Generates a hidden input field with token information, if any. + * Generates a hidden input field with token information, if any. The + * field is added within a div element for HTML 4.01 Strict compliance. * @return A hidden input field containing the token. * @since Struts 1.1 */ @@ -542,7 +543,7 @@ (String) session.getAttribute(Globals.TRANSACTION_TOKEN_KEY); if (token != null) { - results.append("<input type=\"hidden\" name=\""); + results.append("<div><input type=\"hidden\" name=\""); results.append(Constants.TOKEN_KEY); results.append("\" value=\""); results.append(token); @@ -551,6 +552,7 @@ } else { results.append("\">"); } + results.append("</div>"); } } Modified: struts/core/branches/STRUTS_1_2_BRANCH/src/share/org/apache/struts/util/ModuleException.java Url: http://svn.apache.org/viewcvs/struts/core/branches/STRUTS_1_2_BRANCH/src/share/org/apache/struts/util/ModuleException.java?view=diff&rev=123587&p1=struts/core/branches/STRUTS_1_2_BRANCH/src/share/org/apache/struts/util/ModuleException.java&r1=123586&p2=struts/core/branches/STRUTS_1_2_BRANCH/src/share/org/apache/struts/util/ModuleException.java&r2=123587 ============================================================================== --- struts/core/branches/STRUTS_1_2_BRANCH/src/share/org/apache/struts/util/ModuleException.java (original) +++ struts/core/branches/STRUTS_1_2_BRANCH/src/share/org/apache/struts/util/ModuleException.java Tue Dec 28 17:35:59 2004 @@ -110,6 +110,7 @@ * @param values Array of replacement values */ public ModuleException(String key, Object[] values) { + super(key); error = new ActionError(key, values); message = new ActionMessage(key, values); } --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]