svn commit: r921401 - in /ofbiz/trunk/framework: example/widget/example/FormWidgetExampleForms.xml widget/src/org/ofbiz/widget/form/MacroFormRenderer.java

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

svn commit: r921401 - in /ofbiz/trunk/framework: example/widget/example/FormWidgetExampleForms.xml widget/src/org/ofbiz/widget/form/MacroFormRenderer.java

jleroux@apache.org
Author: jleroux
Date: Wed Mar 10 15:29:44 2010
New Revision: 921401

URL: http://svn.apache.org/viewvc?rev=921401&view=rev
Log:
Fix a small encoding bug found in Example Widget form
Set default values for fields 4&5 (time dropdowns)

Modified:
    ofbiz/trunk/framework/example/widget/example/FormWidgetExampleForms.xml
    ofbiz/trunk/framework/widget/src/org/ofbiz/widget/form/MacroFormRenderer.java

Modified: ofbiz/trunk/framework/example/widget/example/FormWidgetExampleForms.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/example/widget/example/FormWidgetExampleForms.xml?rev=921401&r1=921400&r2=921401&view=diff
==============================================================================
--- ofbiz/trunk/framework/example/widget/example/FormWidgetExampleForms.xml (original)
+++ ofbiz/trunk/framework/example/widget/example/FormWidgetExampleForms.xml Wed Mar 10 15:29:44 2010
@@ -79,7 +79,7 @@ under the License.
         <field name="field4"
                title="${uiLabelMap.ExampleDateField4Title}"
                tooltip="${uiLabelMap.ExampleDateField4Tooltip}">
-            <date-time input-method="time-dropdown" clock="24"/>
+            <date-time input-method="time-dropdown" clock="24" default-value="${exampleDateField}"/>
         </field>
         <!-- ***************** -->
         <!-- ***   field5  *** -->
@@ -87,7 +87,7 @@ under the License.
         <field name="field5"
                title="${uiLabelMap.ExampleDateField5Title}"
                tooltip="${uiLabelMap.ExampleDateField4Tooltip}">
-            <date-time input-method="time-dropdown" clock="12"/>
+            <date-time input-method="time-dropdown" clock="12" default-value="${exampleDateField}"/>
         </field>
         <!-- ***************** -->
         <!-- ***   field6  *** -->

Modified: ofbiz/trunk/framework/widget/src/org/ofbiz/widget/form/MacroFormRenderer.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/widget/src/org/ofbiz/widget/form/MacroFormRenderer.java?rev=921401&r1=921400&r2=921401&view=diff
==============================================================================
--- ofbiz/trunk/framework/widget/src/org/ofbiz/widget/form/MacroFormRenderer.java (original)
+++ ofbiz/trunk/framework/widget/src/org/ofbiz/widget/form/MacroFormRenderer.java Wed Mar 10 15:29:44 2010
@@ -562,7 +562,7 @@ public class MacroFormRenderer implement
             // set the Calendar to the default time of the form or now()
             Calendar cal = null;
             try {
-                Timestamp defaultTimestamp = Timestamp.valueOf(modelFormField.getEntry(context, defaultDateTimeString));
+                Timestamp defaultTimestamp = Timestamp.valueOf(dateTimeField.getDefaultDateTimeString(context));
                 cal = Calendar.getInstance();
                 cal.setTime(defaultTimestamp);
             } catch (IllegalArgumentException e) {