svn commit: r995771 - /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: r995771 - /ofbiz/trunk/framework/widget/src/org/ofbiz/widget/html/HtmlFormRenderer.java

jleroux@apache.org
Author: jleroux
Date: Fri Sep 10 12:30:11 2010
New Revision: 995771

URL: http://svn.apache.org/viewvc?rev=995771&view=rev
Log:
To keep things consistent with r966202 and while at it I have also handled the action/event couple in HtmlFormRenderer.java.renderDateTimeField()

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

Modified: ofbiz/trunk/framework/widget/src/org/ofbiz/widget/html/HtmlFormRenderer.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/widget/src/org/ofbiz/widget/html/HtmlFormRenderer.java?rev=995771&r1=995770&r2=995771&view=diff
==============================================================================
--- ofbiz/trunk/framework/widget/src/org/ofbiz/widget/html/HtmlFormRenderer.java (original)
+++ ofbiz/trunk/framework/widget/src/org/ofbiz/widget/html/HtmlFormRenderer.java Fri Sep 10 12:30:11 2010
@@ -518,6 +518,9 @@ public class HtmlFormRenderer extends Ht
         ModelFormField modelFormField = dateTimeField.getModelFormField();
         String paramName = modelFormField.getParameterName(context);
         String defaultDateTimeString = dateTimeField.getDefaultDateTimeString(context);
+        
+        String event = modelFormField.getEvent();
+        String action = modelFormField.getAction(context);        
 
         Map<String, String> uiLabelMap = UtilGenerics.checkMap(context.get("uiLabelMap"));
         if (uiLabelMap == null) {
@@ -587,6 +590,14 @@ public class HtmlFormRenderer extends Ht
             writer.append(idName);
             writer.append('"');
         }
+        
+        if (UtilValidate.isNotEmpty(event) && UtilValidate.isNotEmpty(action)) {
+            writer.append(" ");
+            writer.append(event);
+            writer.append("=\"");
+            writer.append(action);
+            writer.append('"');
+        }        
 
         writer.append("/>");
 
@@ -835,7 +846,6 @@ public class HtmlFormRenderer extends Ht
                 writer.append(")\" ");
             }
 
-
             if (UtilValidate.isNotEmpty(event) && UtilValidate.isNotEmpty(action)) {
                 writer.append(" ");
                 writer.append(event);