You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by jl...@apache.org on 2012/05/15 09:14:55 UTC

svn commit: r1338570 - /ofbiz/trunk/framework/widget/templates/csvFormMacroLibrary.ftl

Author: jleroux
Date: Tue May 15 07:14:55 2012
New Revision: 1338570

URL: http://svn.apache.org/viewvc?rev=1338570&view=rev
Log:
A patch Ranjit Kumar Singh from  "Error in CSV download" https://issues.apache.org/jira/browse/OFBIZ-4873

If sorting is enabled for at least one field in the list type form-widget, we get an error, here is the  details:

Error executing macro: renderFieldTitle
required parameter: id is not specified.
The problematic instruction:
----------
==> macro renderFieldTitle [on line 53, column 1 in component://widget/templates/csvFormMacroLibrary.ftl]
in user-directive renderFieldTitle [on line 116, column 57 in component://widget/templates/csvFormMacroLibrary.ftl]
in user-directive renderSortField [on line 1, column 1 in Fri May 11 12:33:29 IST 2012]
----------

Java backtrace for programmers:
----------
freemarker.template.TemplateException: Error executing macro: renderFieldTitle
required parameter: id is not specified.
at freemarker.core.Macro$Context.sanityCheck(Macro.java:211)

Adding a default empty string to the id parameter fixes the issue

Modified:
    ofbiz/trunk/framework/widget/templates/csvFormMacroLibrary.ftl

Modified: ofbiz/trunk/framework/widget/templates/csvFormMacroLibrary.ftl
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/widget/templates/csvFormMacroLibrary.ftl?rev=1338570&r1=1338569&r2=1338570&view=diff
==============================================================================
--- ofbiz/trunk/framework/widget/templates/csvFormMacroLibrary.ftl (original)
+++ ofbiz/trunk/framework/widget/templates/csvFormMacroLibrary.ftl Tue May 15 07:14:55 2012
@@ -50,7 +50,7 @@ under the License.
 <#macro renderHiddenField name value id event action></#macro>
 <#macro renderIgnoredField></#macro>
 
-<#macro renderFieldTitle style title id fieldHelpText=""><@renderField title />,</#macro>
+<#macro renderFieldTitle style title id="" fieldHelpText=""><@renderField title />,</#macro>
 <#macro renderSingleFormFieldTitle></#macro>
 
 <#macro renderFormOpen linkUrl formType targetWindow containerId containerStyle autocomplete name useRowSubmit></#macro>