svn commit: r692611 - in /ofbiz/trunk/framework/bi/webapp/bi: WEB-INF/actions/reportbuilder/RunStarSchemaQuery.groovy reportbuilder/SelectStarSchemaFields.ftl

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

svn commit: r692611 - in /ofbiz/trunk/framework/bi/webapp/bi: WEB-INF/actions/reportbuilder/RunStarSchemaQuery.groovy reportbuilder/SelectStarSchemaFields.ftl

jacopoc
Author: jacopoc
Date: Fri Sep  5 21:59:28 2008
New Revision: 692611

URL: http://svn.apache.org/viewvc?rev=692611&view=rev
Log:
Fixed error happening when only one field was selected for the dynamic report.

Modified:
    ofbiz/trunk/framework/bi/webapp/bi/WEB-INF/actions/reportbuilder/RunStarSchemaQuery.groovy
    ofbiz/trunk/framework/bi/webapp/bi/reportbuilder/SelectStarSchemaFields.ftl

Modified: ofbiz/trunk/framework/bi/webapp/bi/WEB-INF/actions/reportbuilder/RunStarSchemaQuery.groovy
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/bi/webapp/bi/WEB-INF/actions/reportbuilder/RunStarSchemaQuery.groovy?rev=692611&r1=692610&r2=692611&view=diff
==============================================================================
--- ofbiz/trunk/framework/bi/webapp/bi/WEB-INF/actions/reportbuilder/RunStarSchemaQuery.groovy (original)
+++ ofbiz/trunk/framework/bi/webapp/bi/WEB-INF/actions/reportbuilder/RunStarSchemaQuery.groovy Fri Sep  5 21:59:28 2008
@@ -29,13 +29,19 @@
 import org.ofbiz.entity.model.ModelViewEntity;
 import org.ofbiz.entity.model.ModelViewEntity.ModelAlias;
 
+import javolution.util.FastSet;
 import javolution.util.FastList;
 import javolution.util.FastMap;
 
 starSchemaName = parameters.starSchemaName;
-selectedFields = parameters.selectedField as Set;
-context.columnNames = selectedFields;
+selectedFieldList = UtilHttp.parseMultiFormData(parameters);
 
+//selectedFields = parameters.selectedField as Set;
+columnNames = FastSet.newInstance();
+selectedFieldList.each { selectedField ->
+  columnNames.add(selectedField.selectedFieldName);
+}
+context.columnNames = columnNames;
 List conditionList = null;
 EntityConditionList condition =  null;
 List orderByFields = null;
@@ -51,6 +57,6 @@
 findOptions = new EntityFindOptions();
 findOptions.setDistinct(false);
 
-records = delegator.findList(starSchemaName, condition, selectedFields, orderByFields, findOptions, false);
+records = delegator.findList(starSchemaName, condition, context.columnNames, orderByFields, findOptions, false);
 
 context.records = records;

Modified: ofbiz/trunk/framework/bi/webapp/bi/reportbuilder/SelectStarSchemaFields.ftl
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/bi/webapp/bi/reportbuilder/SelectStarSchemaFields.ftl?rev=692611&r1=692610&r2=692611&view=diff
==============================================================================
--- ofbiz/trunk/framework/bi/webapp/bi/reportbuilder/SelectStarSchemaFields.ftl (original)
+++ ofbiz/trunk/framework/bi/webapp/bi/reportbuilder/SelectStarSchemaFields.ftl Fri Sep  5 21:59:28 2008
@@ -35,7 +35,8 @@
         <#list starSchemaFields as starSchemaField>
         <tr valign="middle"<#if alt_row> class="alternate-row"</#if>>
             <td>
-                <input name="selectedField" value="${starSchemaField.name}" type="checkbox"/>
+                <input name="selectedFieldName_o_${starSchemaField_index}" value="${starSchemaField.name}" type="hidden"/>
+                <input name="_rowSubmit_o_${starSchemaField_index}" value="Y" type="checkbox"/>
             </td>
             <td>
                 ${starSchemaField.name}