svn commit: r487653 - /incubator/ofbiz/trunk/framework/widget/src/org/ofbiz/widget/html/HtmlFormRenderer.java

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

svn commit: r487653 - /incubator/ofbiz/trunk/framework/widget/src/org/ofbiz/widget/html/HtmlFormRenderer.java

sichen
Author: sichen
Date: Fri Dec 15 12:36:04 2006
New Revision: 487653

URL: http://svn.apache.org/viewvc?view=rev&rev=487653
Log:
Fixed off by one bug with rendering date fields.  These were truncating the date fields from 2006-12-15 to 2006-12-1.

Modified:
    incubator/ofbiz/trunk/framework/widget/src/org/ofbiz/widget/html/HtmlFormRenderer.java

Modified: incubator/ofbiz/trunk/framework/widget/src/org/ofbiz/widget/html/HtmlFormRenderer.java
URL: http://svn.apache.org/viewvc/incubator/ofbiz/trunk/framework/widget/src/org/ofbiz/widget/html/HtmlFormRenderer.java?view=diff&rev=487653&r1=487652&r2=487653
==============================================================================
--- incubator/ofbiz/trunk/framework/widget/src/org/ofbiz/widget/html/HtmlFormRenderer.java (original)
+++ incubator/ofbiz/trunk/framework/widget/src/org/ofbiz/widget/html/HtmlFormRenderer.java Fri Dec 15 12:36:04 2006
@@ -403,7 +403,7 @@
         String value = modelFormField.getEntry(context, dateTimeField.getDefaultValue(context));
         if (UtilValidate.isNotEmpty(value)) {
             if(value.length() > maxlength)
-                value = value.substring(0, maxlength-1);
+                value = value.substring(0, maxlength);
             buffer.append(" value=\"");
             buffer.append(value);
             buffer.append('"');
@@ -1698,7 +1698,7 @@
         String value = modelFormField.getEntry(context, dateFindField.getDefaultValue(context));
         if (UtilValidate.isNotEmpty(value)) {
             if(value.length() > maxlength)
-                value = value.substring(0, maxlength-1);
+                value = value.substring(0, maxlength);
             buffer.append(" value=\"");
             buffer.append(value);
             buffer.append('"');
@@ -1787,7 +1787,7 @@
         value = modelFormField.getEntry(context);
         if (UtilValidate.isNotEmpty(value)) {
             if(value.length() > maxlength)
-                value = value.substring(0, maxlength-1);
+                value = value.substring(0, maxlength);
             buffer.append(" value=\"");
             buffer.append(value);
             buffer.append('"');