Author: adrianc
Date: Thu Nov 3 09:43:43 2011
New Revision: 1197028
URL:
http://svn.apache.org/viewvc?rev=1197028&view=revLog:
Added some comments to broken section of code in MacroFormRenderer.java. No time to fix it right now.
Modified:
ofbiz/trunk/framework/widget/src/org/ofbiz/widget/form/MacroFormRenderer.java
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=1197028&r1=1197027&r2=1197028&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 Thu Nov 3 09:43:43 2011
@@ -564,11 +564,16 @@ public class MacroFormRenderer implement
}
String contextValue = null;
- //if time-dropdow desactive encodingOutput for found hour and minutes
+ // If time-dropdown deactivate encodingOutput for found hour and minutes
boolean memEncodeOutput = modelFormField.getEncodeOutput();
- if (useTimeDropDown) modelFormField.setEncodeOutput(false);
+ if (useTimeDropDown)
+ // FIXME: This is not thread-safe! Never modify a model's state!
+ modelFormField.setEncodeOutput(false);
+ // FIXME: modelFormField.getEntry ignores shortDateInput when converting Date objects to Strings.
+ // Object type conversion should be done by the renderer, not by the model.
contextValue = modelFormField.getEntry(context, dateTimeField.getDefaultValue(context));
- if (useTimeDropDown) modelFormField.setEncodeOutput(memEncodeOutput);
+ if (useTimeDropDown)
+ modelFormField.setEncodeOutput(memEncodeOutput);
String value = contextValue;
if (UtilValidate.isNotEmpty(value)) {