ofbiz-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jler...@apache.org
Subject svn commit: r1576334 - in /ofbiz/branches/release11.04: ./ framework/widget/src/org/ofbiz/widget/form/ModelFormField.java
Date Tue, 11 Mar 2014 13:27:37 GMT
Author: jleroux
Date: Tue Mar 11 13:27:37 2014
New Revision: 1576334

URL: http://svn.apache.org/r1576334
Log:
"Applied fix from trunk for revision: 1576331  " 
------------------------------------------------------------------------
r1576331 | jleroux | 2014-03-11 14:26:10 +0100 (mar. 11 mars 2014) | 8 lignes

A slightly modified patch from Rong Nguyen for "View Calendar broken in Manufacturing" https://issues.apache.org/jira/browse/OFBIZ-5558

Url: https://demo-trunk.ofbiz.apache.org:8443/manufacturing/control/EditCalendarExceptionDay?calendarId=SUPPLIER
Calendar broken

Related with https://issues.apache.org/jira/browse/OFBIZ-4739

jleroux: formatting and some other slight issues fixed in patch
------------------------------------------------------------------------


Modified:
    ofbiz/branches/release11.04/   (props changed)
    ofbiz/branches/release11.04/framework/widget/src/org/ofbiz/widget/form/ModelFormField.java

Propchange: ofbiz/branches/release11.04/
------------------------------------------------------------------------------
  Merged /ofbiz/trunk:r1576331

Modified: ofbiz/branches/release11.04/framework/widget/src/org/ofbiz/widget/form/ModelFormField.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/release11.04/framework/widget/src/org/ofbiz/widget/form/ModelFormField.java?rev=1576334&r1=1576333&r2=1576334&view=diff
==============================================================================
--- ofbiz/branches/release11.04/framework/widget/src/org/ofbiz/widget/form/ModelFormField.java
(original)
+++ ofbiz/branches/release11.04/framework/widget/src/org/ofbiz/widget/form/ModelFormField.java
Tue Mar 11 13:27:37 2014
@@ -32,6 +32,9 @@ import java.util.Map;
 import java.util.StringTokenizer;
 import java.util.TimeZone;
 
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
 import javolution.util.FastList;
 import javolution.util.FastMap;
 
@@ -73,6 +76,7 @@ import org.w3c.dom.Element;
 
 import bsh.EvalError;
 import bsh.Interpreter;
+import freemarker.template.TemplateException;
 
 /**
  * Widget Library - Form model class
@@ -3148,7 +3152,14 @@ public class ModelFormField {
 
         @Override
         public void renderFieldString(Appendable writer, Map<String, Object> context,
FormStringRenderer formStringRenderer) throws IOException {
-            formStringRenderer.renderDateTimeField(writer, context, this);
+            HttpServletRequest request = (HttpServletRequest) context.get("request");
+            HttpServletResponse response = (HttpServletResponse) context.get("response");
+            try {
+                MacroFormRenderer renderer = new MacroFormRenderer(UtilProperties.getPropertyValue("widget",
"screen.formrenderer"), request, response);
+                renderer.renderDateTimeField(writer, context, this);
+            } catch (TemplateException e) {
+                Debug.logError("Not rendering content, error on MacroFormRenderer creation.",
module);
+            }
         }
 
         public String getType() {



Mime
View raw message