husted 2002/07/07 11:45:18
Modified: src/share/org/apache/struts/action ActionServlet.java
Log:
Change "convertHack" to "convertNull" so that we don't have the H-word in the public
API (jeez, this guy is ~such~ a spoil-sport =:0) and also to use a more descriptive
term. Also, after trying it both ways in various contexts (:don't tell my wife:),
change documentation to use term "application module" for "sub-application" and
"module-relative" for "application-context". Corresponding changes to other
documentation to follow.
Revision Changes Path
1.111 +19 -20
jakarta-struts/src/share/org/apache/struts/action/ActionServlet.java
Index: ActionServlet.java
===================================================================
RCS file:
/home/cvs/jakarta-struts/src/share/org/apache/struts/action/ActionServlet.java,v
retrieving revision 1.110
retrieving revision 1.111
diff -u -r1.110 -r1.111
--- ActionServlet.java 6 Jul 2002 19:11:06 -0000 1.110
+++ ActionServlet.java 7 Jul 2002 18:45:18 -0000 1.111
@@ -181,18 +181,17 @@
* <li><strong>config</strong> - Context-relative path to the XML resource
* containing the configuration information for the default application.
* [/WEB-INF/struts-config.xml].</li>
- * <li><strong>config/foo</strong> - Context-relative path to the XML resource
- * containing the configuration information for the sub-application that
- * will be at prefix "/foo". This can be repeated as many times as
- * required for multiple sub-applications. (Since Struts 1.1)</li>
- * <li><strong>convertHack</strong> - Set to <code>true</code> to force form
- * bean population of bean properties that are of Java wrapper class types
- * (such as java.lang.Integer) to set the property to <code>null</code>,
- * instead of zero, in a manner equivalent to the behavior of Struts 1.0.
+ * <li><strong>config/${module}</strong> - Context-relative path to the XML resource
+ * containing the configuration information for the application module that
+ * will use the specified prefix (/${module}). This can be repeated as many
+ * times as required for multiple application modules. (Since Struts 1.1)</li>
+ * <li><strong>convertNull</strong> - Force simulation of the Struts 1.0 behavior
+ * when populating forms. If set to true, the numeric Java wrapper class types
+ * (like <code>java.lang.Integer</code>) will default to null (rather than 0).
* (Since Struts 1.1) [false] </li>
- * <li><strong>debug</strong> - The debugging detail level for this
- * servlet, which controls how much information is logged. Accepts
- * values 0 (off) and 1 (least serious) through 6 (most serious). [0]</li>
+ * <li><strong>debug</strong> - TThe debugging detail level that controls how much
+ * information is logged for this servlet. Accepts values 0 (off) and from
+ * 1 (least serious) through 6 (most serious). [0]</li>
* <li><strong>detail</strong> - The debugging detail level for the Digester
* we utilize to process the application configuration files. Accepts
* values 0 (off) and 1 (least serious) through 6 (most serious). [0]</li>
@@ -323,7 +322,7 @@
* properties of the Java wrapper class types.
* @since Struts 1.1
*/
- protected boolean convertHack = false;
+ protected boolean convertNull = false;
/**
@@ -1115,19 +1114,19 @@
// Backwards compatibility hack for form beans of Java wrapper classes
// Set to true for strict Struts 1.0 compatibility
- value = getServletConfig().getInitParameter("convertHack");
+ value = getServletConfig().getInitParameter("convertNull");
if (value != null) {
if ("true".equalsIgnoreCase(value) ||
"yes".equalsIgnoreCase(value) ||
"on".equalsIgnoreCase(value) ||
"y".equalsIgnoreCase(value) ||
"1".equalsIgnoreCase(value)) {
- convertHack = true;
+ convertNull = true;
} else {
- convertHack = false;
+ convertNull = false;
}
}
- if (convertHack) {
+ if (convertNull) {
ConvertUtils.deregister();
ConvertUtils.register(new BooleanConverter(null), Boolean.class);
ConvertUtils.register(new ByteConverter(null), Byte.class);
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>