svn commit: r802400 - in /ofbiz/trunk: applications/accounting/src/org/ofbiz/accounting/ applications/accounting/webapp/accounting/WEB-INF/ applications/accounting/widget/ applications/product/webapp/facility/WEB-INF/ applications/product/webapp/facili...

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

svn commit: r802400 - in /ofbiz/trunk: applications/accounting/src/org/ofbiz/accounting/ applications/accounting/webapp/accounting/WEB-INF/ applications/accounting/widget/ applications/product/webapp/facility/WEB-INF/ applications/product/webapp/facili...

jacopoc
Author: jacopoc
Date: Sat Aug  8 15:49:04 2009
New Revision: 802400

URL: http://svn.apache.org/viewvc?rev=802400&view=rev
Log:
Implemented CSV screen macro renderer; cleaned up existing csv widget forms that are now much more clean.
This is a good example of the great flexibility of widgets and the new macro renderer (no code was needed to implement the CSV renderer).

Added:
    ofbiz/trunk/framework/widget/templates/csvFormMacroLibrary.ftl   (with props)
    ofbiz/trunk/framework/widget/templates/csvScreenMacroLibrary.ftl   (with props)
Modified:
    ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/GlEvents.java
    ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/controller.xml
    ofbiz/trunk/applications/accounting/widget/GlForms.xml
    ofbiz/trunk/applications/accounting/widget/GlSetupForms.xml
    ofbiz/trunk/applications/accounting/widget/ReportFinancialSummaryForms.xml
    ofbiz/trunk/applications/product/webapp/facility/WEB-INF/controller.xml
    ofbiz/trunk/applications/product/webapp/facility/facility/FacilityForms.xml
    ofbiz/trunk/framework/common/webcommon/WEB-INF/common-controller.xml
    ofbiz/trunk/framework/widget/config/widget.properties

Modified: ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/GlEvents.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/GlEvents.java?rev=802400&r1=802399&r2=802400&view=diff
==============================================================================
--- ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/GlEvents.java (original)
+++ ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/GlEvents.java Sat Aug  8 15:49:04 2009
@@ -29,6 +29,7 @@
 import org.ofbiz.base.util.UtilDateTime;
 import org.ofbiz.base.util.UtilHttp;
 import org.ofbiz.base.util.UtilMisc;
+import org.ofbiz.base.util.UtilValidate;
 import org.ofbiz.entity.GenericDelegator;
 import org.ofbiz.entity.GenericEntityException;
 import org.ofbiz.entity.GenericValue;
@@ -54,7 +55,6 @@
     // The number of multi form rows is retrieved
     int rowCount = UtilHttp.getMultiFormRowCount(ctx);
     for (int i = 0; i < rowCount; i++) {  //for calculating amount per glAccountId
-        BigDecimal amount = BigDecimal.ZERO;
         String suffix = UtilHttp.MULTI_ROW_DELIMITER + i;
         isSelected = (ctx.containsKey("_rowSubmit" + suffix) && "Y".equalsIgnoreCase((String)ctx.get("_rowSubmit" + suffix)));
         if (!isSelected) {
@@ -65,16 +65,16 @@
         organizationPartyId = (String) ctx.get("organizationPartyId" + suffix);
         glAccountId = (String) ctx.get("glAccountId" + suffix);
         try {
-            List<GenericValue> acctgTransEntries = delegator.findByAnd("AcctgTransEntry", UtilMisc.toMap("acctgTransId", acctgTransId, "acctgTransEntrySeqId", acctgTransEntrySeqId));
-                for (GenericValue acctgTransEntry : acctgTransEntries) {  //calculate amount for each AcctgTransEntry according to glAccountId based on debit and credit
-                    debitCreditFlag = acctgTransEntry.getString("debitCreditFlag");
-                    if ("D".equalsIgnoreCase(debitCreditFlag)) {
-                        amount = amount.add(acctgTransEntry.getBigDecimal("amount")); //for debit
-                    } else {
-                        amount = amount.subtract(acctgTransEntry.getBigDecimal("amount")); //for credit
-                    }
+            GenericValue acctgTransEntry = delegator.findOne("AcctgTransEntry", UtilMisc.toMap("acctgTransId", acctgTransId, "acctgTransEntrySeqId", acctgTransEntrySeqId), false);
+            if (UtilValidate.isNotEmpty(acctgTransEntry)) {
+                //calculate amount for each AcctgTransEntry according to glAccountId based on debit and credit
+                debitCreditFlag = acctgTransEntry.getString("debitCreditFlag");
+                if ("D".equalsIgnoreCase(debitCreditFlag)) {
+                    reconciledBalance = reconciledBalance.add(acctgTransEntry.getBigDecimal("amount"));  //total balance per glAccountId
+                } else {
+                    reconciledBalance = reconciledBalance.subtract(acctgTransEntry.getBigDecimal("amount"));  //total balance per glAccountId
                 }
-            reconciledBalance = reconciledBalance.add(amount);  //total balance per glAccountId
+            }
         } catch (GenericEntityException e) {
             Debug.logError(e, module);
             return "error";
@@ -103,8 +103,8 @@
         acctgTransId = (String) ctx.get("acctgTransId" + suffix);
         acctgTransEntrySeqId = (String) ctx.get("acctgTransEntrySeqId" + suffix);
         try {
-            List<GenericValue> acctgTransEntries = delegator.findByAnd("AcctgTransEntry", UtilMisc.toMap("acctgTransId", acctgTransId, "acctgTransEntrySeqId", acctgTransEntrySeqId));
-            for (GenericValue acctgTransEntry : acctgTransEntries) {
+            GenericValue acctgTransEntry = delegator.findOne("AcctgTransEntry", UtilMisc.toMap("acctgTransId", acctgTransId, "acctgTransEntrySeqId", acctgTransEntrySeqId), false);
+            if (UtilValidate.isNotEmpty(acctgTransEntry)) {
                 reconciledAmount = acctgTransEntry.getString("amount");
                 acctgTransId = acctgTransEntry.getString("acctgTransId");
                 acctgTransEntrySeqId = acctgTransEntry.getString("acctgTransEntrySeqId");

Modified: ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/controller.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/controller.xml?rev=802400&r1=802399&r2=802400&view=diff
==============================================================================
--- ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/controller.xml (original)
+++ ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/controller.xml Sat Aug  8 15:49:04 2009
@@ -2575,7 +2575,7 @@
     <view-map name="EditCreditCardTypeGlAccounts" type="screen" page="component://accounting/widget/GlSetupScreens.xml#EditCreditCardTypeGlAccounts"/>
     <view-map name="EditOrganizationTaxAuthorityGlAccounts" type="screen" page="component://accounting/widget/GlSetupScreens.xml#EditOrganizationTaxAuthorityGlAccounts"/>
     <view-map name="ListGlAccountOrgPdf" type="screenfop" page="component://accounting/widget/GlSetupScreens.xml#ListGlAccountOrgPdf" content-type="application/pdf" encoding="none"/>
-    <view-map name="ListGlAccountOrgCsv" type="screentext" page="component://accounting/widget/GlSetupScreens.xml#ListGlAccountOrgCsv" content-type="text/csv" encoding="none"/>
+    <view-map name="ListGlAccountOrgCsv" type="screencvs" page="component://accounting/widget/GlSetupScreens.xml#ListGlAccountOrgCsv" content-type="text/csv" encoding="none"/>
 
     <!-- Manual Credit Card Transaction -->
     <view-map name="FindGatewayResponses" page="component://accounting/widget/TransactionScreens.xml#FindGatewayResponses" type="screen"/>
@@ -2656,19 +2656,19 @@
     -->
 
     <view-map name="FixedAssetGeoLocation" type="screen" page="component://accounting/widget/FixedAssetScreens.xml#FixedAssetGeoLocation"/>
-    <view-map name="AcctgTransEntriesSearchResultsCsv" type="screentext" page="component://accounting/widget/GlScreens.xml#AcctgTransEntriesSearchResultsCsv" content-type="text/csv" encoding="none"/>
+    <view-map name="AcctgTransEntriesSearchResultsCsv" type="screencsv" page="component://accounting/widget/GlScreens.xml#AcctgTransEntriesSearchResultsCsv" content-type="text/csv" encoding="none"/>
     <view-map name="AcctgTransEntriesSearchResultsPdf" type="screenfop" page="component://accounting/widget/GlScreens.xml#AcctgTransEntriesSearchResultsPdf" content-type="application/pdf" encoding="none"/>
-    <view-map name="AcctgTransSearchResultsCsv" type="screentext" page="component://accounting/widget/GlScreens.xml#AcctgTransSearchResultsCsv" content-type="text/csv" encoding="none"/>
+    <view-map name="AcctgTransSearchResultsCsv" type="screencsv" page="component://accounting/widget/GlScreens.xml#AcctgTransSearchResultsCsv" content-type="text/csv" encoding="none"/>
     <view-map name="AcctgTransSearchResultPdf" type="screenfop" page="component://accounting/widget/GlScreens.xml#AcctgTransSearchResultPdf" content-type="application/pdf" encoding="none"/>
 
     <view-map name="TransactionTotalsPdf" type="screenfop" page="component://accounting/widget/ReportFinancialSummaryScreens.xml#TransactionTotalsPdf" content-type="application/pdf" encoding="none"/>
-    <view-map name="TransactionTotalsCsv" type="screentext" page="component://accounting/widget/ReportFinancialSummaryScreens.xml#TransactionTotalsCsv" content-type="text/csv" encoding="none"/>
+    <view-map name="TransactionTotalsCsv" type="screencsv" page="component://accounting/widget/ReportFinancialSummaryScreens.xml#TransactionTotalsCsv" content-type="text/csv" encoding="none"/>
     <view-map name="IncomeStatementListPdf" type="screenfop" page="component://accounting/widget/ReportFinancialSummaryScreens.xml#IncomeStatementListPdf" content-type="application/pdf" encoding="none"/>
-    <view-map name="IncomeStatementListCsv" type="screentext" page="component://accounting/widget/ReportFinancialSummaryScreens.xml#IncomeStatementListCsv" content-type="text/csv" encoding="none"/>
-    <view-map name="BalanceSheetCsv" type="screentext" page="component://accounting/widget/ReportFinancialSummaryScreens.xml#BalanceSheetCsv" content-type="text/csv" encoding="none"/>
+    <view-map name="IncomeStatementListCsv" type="screencsv" page="component://accounting/widget/ReportFinancialSummaryScreens.xml#IncomeStatementListCsv" content-type="text/csv" encoding="none"/>
+    <view-map name="BalanceSheetCsv" type="screencsv" page="component://accounting/widget/ReportFinancialSummaryScreens.xml#BalanceSheetCsv" content-type="text/csv" encoding="none"/>
     <view-map name="BalanceSheetPdf" type="screenfop" page="component://accounting/widget/ReportFinancialSummaryScreens.xml#BalanceSheetPdf" content-type="application/pdf" encoding="none"/>
     <view-map name="TrialBalanceSearchResultsPdf" type="screenfop" page="component://accounting/widget/ReportFinancialSummaryScreens.xml#TrialBalanceSearchResultsPdf" content-type="application/pdf" encoding="none"/>
-    <view-map name="TrialBalanceSearchResultsCsv" type="screentext" page="component://accounting/widget/ReportFinancialSummaryScreens.xml#TrialBalanceSearchResultsCsv" content-type="text/csv" encoding="none"/>
+    <view-map name="TrialBalanceSearchResultsCsv" type="screencsv" page="component://accounting/widget/ReportFinancialSummaryScreens.xml#TrialBalanceSearchResultsCsv" content-type="text/csv" encoding="none"/>
     <view-map name="AcctgTransDetailReportPdf" type="screenfop" page="component://accounting/widget/GlScreens.xml#AcctgTransDetailReportPdf" content-type="application/pdf" encoding="none"/>
     <view-map name="GlAccountTrialBalance" type="screen" page="component://accounting/widget/ReportFinancialSummaryScreens.xml#GlAccountTrialBalance"/>
     <view-map name="GlAccountTrialBalanceReportPdf" type="screenfop" page="component://accounting/widget/ReportFinancialSummaryScreens.xml#GlAccountTrialBalanceReportPdf" content-type="application/pdf" encoding="none"/>

Modified: ofbiz/trunk/applications/accounting/widget/GlForms.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/widget/GlForms.xml?rev=802400&r1=802399&r2=802400&view=diff
==============================================================================
--- ofbiz/trunk/applications/accounting/widget/GlForms.xml (original)
+++ ofbiz/trunk/applications/accounting/widget/GlForms.xml Sat Aug  8 15:49:04 2009
@@ -909,86 +909,25 @@
                 <order-by field-name="-transactionDate"/>
             </entity-condition>
         </actions>
-        <field name="quot0" title="&quot;"><display/></field>
         <field name="acctgTransId"><display/></field>
-        <field name="quot1" title="&quot;"><display/></field>
-        <field name="separator0" title=","><display description=", "/></field>
-
-        <field name="quot2" title="&quot;"><display/></field>
         <field name="acctgTransEntrySeqId"><display description="${acctgTransEntrySeqId}"/></field>
-        <field name="quot3" title="&quot;"><display/></field>
-        <field name="separator1" title=","><display description=", "/></field>
-
-        <field name="quot4" title="&quot;"><display/></field>
         <field name="transactionDate"><display/></field>
-        <field name="quot5" title="&quot;"><display/></field>
-        <field name="separator2" title=","><display description=", "/></field>
-
         <field name="acctgTransTypeId" title="${uiLabelMap.AccountingTransactionType}"><display-entity entity-name="AcctgTransType"/></field>
-        <field name="separator3" title=","><display description=", "/></field>
-
         <field name="glFiscalTypeId" title="${uiLabelMap.FormFieldTitle_glFiscalType}"><display-entity entity-name="GlFiscalType"/></field>
-        <field name="separator4" title=","><display description=", "/></field>
-
-        <field name="quot6" title="&quot;"><display/></field>
         <field name="glAccountId"><display/></field>
-        <field name="quot7" title="&quot;"><display/></field>
-        <field name="separator5" title=","><display description=","/></field>
-
         <field name="glAccountDescription"><display description="${accountName}"/></field>
-        <field name="separator6" title=","><display description=","/></field>
-
         <field name="glAccountClassId" title="${uiLabelMap.AccountingGlAccountClass}"><display-entity entity-name="GlAccountClass"/></field>
-        <field name="separator7" title=","><display description=","/></field>
-
-        <field name="quot8" title="&quot;"><display/></field>
         <field name="invoiceId"><display/></field>
-        <field name="quot9" title="&quot;"><display/></field>
-        <field name="separator8" title=","><display description=","/></field>
-
-        <field name="quot10" title="&quot;"><display/></field>
         <field name="paymentId"><display/></field>
-        <field name="quot11" title="&quot;"><display/></field>
-        <field name="separator9" title=","><display description=","/></field>
-
-        <field name="quot12" title="&quot;"><display/></field>
         <field name="workEffortId"><display/></field>
-        <field name="quot13" title="&quot;"><display/></field>
-        <field name="separator10" title=","><display description=","/></field>
-
-        <field name="quot14" title="&quot;"><display/></field>
         <field name="shipmentId"><display/></field>
-        <field name="quot15" title="&quot;"><display/></field>
-        <field name="separator12" title=","><display description=","/></field>
-        
-        <field name="quot16" title="&quot;"><display/></field>
         <field name="partyId"><display/></field>
         <field name="quot17" title="&quot;"><display/></field>
-        <field name="separator13" title=","><display description=","/></field>
-        
-        <field name="quot18" title="&quot;"><display/></field>
         <field name="productId"><display/></field>
-        <field name="quot19" title="&quot;"><display/></field>
-        <field name="separator14" title=","><display description=","/></field>
-        
-        <field name="quot20" title="&quot;"><display/></field>
         <field name="isPosted"><display/></field>
-        <field name="quot21" title="&quot;"><display/></field>
-        <field name="separator15" title=","><display description=","/></field>
-
-        <field name="quot22" title="&quot;"><display/></field>
         <field name="postedDate"><display/></field>
-        <field name="quot23" title="&quot;"><display/></field>
-        <field name="separator16" title=","><display description=","/></field>
-
-        <field name="quot24" title="&quot;"><display/></field>
         <field name="debitCreditFlag"><display/></field>
-        <field name="quot25" title="&quot;"><display/></field>
-        <field name="separator17" title=","><display description=","/></field>
-        
-        <field name="quot26" title="&quot;"><display/></field>
         <field name="amount"><display currency="${currencyUomId}"/></field>
-        <field name="quot27" title="&quot;"><display/></field>
     </form>
 
     <form name="AcctgTransSearchResultsCsv" type="list" title="List Accounting Transactions" list-name="acctgTransList" view-size="1000">
@@ -1022,43 +961,16 @@
                 <order-by field-name="-transactionDate"/>
             </entity-condition>
         </actions>
-        <field name="quot0" title="&quot;"><display/></field>
         <field name="acctgTransId"><display/></field>
-        <field name="quot1" title="&quot;"><display/></field>
-        <field name="separator1" title=","><display description=","/></field>
-        
-        <field name="quot2" title="&quot;"><display/></field>
         <field name="transactionDate"><display/></field>
-        <field name="quot3" title="&quot;"><display/></field>
-        <field name="separator2" title=","><display description=","/></field>
         <field name="acctgTransTypeId" title="${uiLabelMap.AccountingTransactionType}"><display-entity entity-name="AcctgTransType"/></field>
-        <field name="separator3" title=","><display description=","/></field>
         <field name="glFiscalTypeId" title="${uiLabelMap.FormFieldTitle_glFiscalType}"><display-entity entity-name="GlFiscalType"/></field>
-        <field name="separator4" title=","><display description=","/></field>
-        <field name="quot4" title="&quot;"><display/></field>
         <field name="invoiceId"><display/></field>
-        <field name="quot5" title="&quot;"><display/></field>
-        <field name="separator5" title=","><display description=","/></field>
-        <field name="quot6" title="&quot;"><display/></field>
         <field name="paymentId"><display/></field>
-        <field name="quot7" title="&quot;"><display/></field>
-        <field name="separator6" title=","><display description=","/></field>
-        <field name="quot8" title="&quot;"><display/></field>
         <field name="workEffortId"><display/></field>
-        <field name="quot9" title="&quot;"><display/></field>
-        <field name="separator7" title=","><display description=","/></field>
-        <field name="quot10" title="&quot;"><display/></field>
         <field name="shipmentId"><display/></field>
-        <field name="quot11" title="&quot;"><display/></field>
-        <field name="separator8" title=","><display description=","/></field>
-        <field name="quot12" title="&quot;"><display/></field>
         <field name="isPosted"><display/></field>
-        <field name="quot13" title="&quot;"><display/></field>
-        <field name="separator9" title=","><display description=","/></field>
-        <field name="quot14" title="&quot;"><display/></field>
         <field name="postedDate"><display/></field>
-        <field name="quot15" title="&quot;"><display/></field>
-        <field name="separator10" title=","><display description=","/></field>
     </form>
 
     <form name="AcctgTransDetailReportPdf" type="single" default-map-name="acctgTrans">

Modified: ofbiz/trunk/applications/accounting/widget/GlSetupForms.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/widget/GlSetupForms.xml?rev=802400&r1=802399&r2=802400&view=diff
==============================================================================
--- ofbiz/trunk/applications/accounting/widget/GlSetupForms.xml (original)
+++ ofbiz/trunk/applications/accounting/widget/GlSetupForms.xml Sat Aug  8 15:49:04 2009
@@ -983,51 +983,17 @@
                 <order-by field-name="glAccountId"/>
             </entity-condition>
         </actions>
-        <field name="quot0" title="&quot;"><display description="&quot;"/></field>
         <field name="glAccountId"><display description="${glAccountId}"/></field>
-        <field name="quot1" title="&quot;"><display description="&quot;"/></field>
-        <field name="separator0" title=","><display description=","/></field>
-
-        <field name="quot2" title="&quot;"><display description="&quot;"/></field>
         <field name="glAccountTypeId"><display-entity entity-name="GlAccountType"/></field>
-        <field name="quot3" title="&quot;"><display description="&quot;"/></field>
-        <field name="separator1" title=","><display description=","/></field>
-
-        <field name="quot4" title="&quot;"><display description="&quot;"/></field>
         <field name="glAccountClassId"><display-entity entity-name="GlAccountClass" key-field-name="glAccountClassId"/></field>
-        <field name="quot5" title="&quot;"><display description="&quot;"/></field>
-        <field name="separator2" title=","><display description=","/></field>
-
         <field name="glResourceTypeId"><display-entity entity-name="GlResourceType" key-field-name="glResourceTypeId"/></field>
-        <field name="separator3" title=","><display description=","/></field>
-
         <field name="glXbrlClassId"><display-entity entity-name="GlXbrlClass" key-field-name="glXbrlClassId"/></field>
-        <field name="separator4" title=","><display description=","/></field>
-
-        <field name="quot6" title="&quot;"><display description="&quot;"/></field>
         <field name="parentGlAccountId"><display-entity entity-name="GlAccount" key-field-name="glAccountId" description="${parentGlAccountId}"/></field>            
-        <field name="quot7" title="&quot;"><display description="&quot;"/></field>
-        <field name="separator5" title=","><display description=","/></field>
-
-        <field name="quot8" title="&quot;"><display description="&quot;"/></field>
         <field name="accountCode" ><display-entity entity-name="GlAccount" key-field-name="glAccountId" description="${accountCode}"/></field>
-        <field name="quot9" title="&quot;"><display description="&quot;"/></field>
-        <field name="separator6" title=","><display description=","/></field>
-
         <field name="accountName" ><display-entity entity-name="GlAccount" key-field-name="glAccountId" description="${accountName}"/></field>
-        <field name="separator7" title=","><display description=","/></field>
-
         <field name="description"><display description="${description}"/></field>
-        <field name="separator8" title=","><display description=","/></field>
-
-        <field name="quot10" title="&quot;"><display description="&quot;"/></field>
         <field name="productId"><display description="${productId}"/></field>
-        <field name="quot11" title="&quot;"><display description="&quot;"/></field>
-        <field name="separator9" title=","><display description=","/></field>
-
-        <field name="quot12" title="&quot;"><display description="&quot;"/></field>
         <field name="postedBalance"><display description="${postedBalance}"/></field>
-        <field name="quot13" title="&quot;"><display description="&quot;"/></field>
     </form>
     
     <form name="FindGlAccountCategory" type="single" target="FindGlAccountCategory" default-entity-name="GlAccountCategory">

Modified: ofbiz/trunk/applications/accounting/widget/ReportFinancialSummaryForms.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/widget/ReportFinancialSummaryForms.xml?rev=802400&r1=802399&r2=802400&view=diff
==============================================================================
--- ofbiz/trunk/applications/accounting/widget/ReportFinancialSummaryForms.xml (original)
+++ ofbiz/trunk/applications/accounting/widget/ReportFinancialSummaryForms.xml Sat Aug  8 15:49:04 2009
@@ -322,15 +322,11 @@
         <row-actions>
             <entity-one entity-name="GlAccount" value-field="glAccount"/>
         </row-actions>
-        <field name="quot0" title="&quot;"><display description="&quot;"/></field>
         <field name="glAccountId"><display description="${glAccountId}"/></field>
-        <field name="quot1" title="&quot;"><display description="&quot;"/></field>
         <field name="seprator0" title=","><display description=","/></field>
         <field name="glAccountName"><display description="${glAccount.accountName}"/></field>
         <field name="seprator1" title=","><display description=","/></field>
-        <field name="quot2" title="&quot;"><display description="&quot;"/></field>
         <field name="totalAmount"><display type="currency" currency="${currencyUomId}"/></field>
-        <field name="quot3" title="&quot;"><display description="&quot;"/></field>
         <field name="seprator2" title=","><display description=","/></field>
         <field name="quot4" title="&quot;"><display description="&quot;"/></field>
         <field name="totalOfCurrentFiscalPeriod"><display type="currency" currency="${currencyUomId}"/></field>
@@ -343,14 +339,10 @@
                 <field-map field-name="glAccountId"/>
             </entity-one>
         </row-actions>
-        <field name="quot0" title="&quot;"><display description="&quot;"/></field>
         <field name="glAccountId"><display description="[${glAccountId}] [${glAccount.accountCode}] ${glAccount.accountName}"/></field>
-        <field name="quot1" title="&quot;"><display description="&quot;"/></field>
         <field name="seprator0" title=","><display description=","/></field>
 
-        <field name="quot2" title="&quot;"><display description="&quot;"/></field>
         <field name="totalAmount"><display type="currency" currency="${currencyUomId}"/></field>
-        <field name="quot3" title="&quot;"><display description="&quot;"/></field>
     </form>
     <form name="BalanceSheetLiabilityListCsv" type="list" list-name="liabilityBalancesList" view-size="99999">
         <row-actions>
@@ -400,20 +392,11 @@
             <set field="parameters.creditTotal" value="${bsh:(showCredit ? (creditTotal.add(absolutePostedBalance)) : (creditTotal))}" type="BigDecimal"/>
         </row-actions>
         <field name="glAccountId" use-when="!showTotals"><display description="[${glAccountId}] [${glAccount.accountCode}] ${glAccount.accountName}"/></field>
-        <field name="separator0" title=","><display description=","/></field>
-
-        <field name="quot0" title="&quot;"><display/></field>
         <field name="debit" use-when="showDebit"><display description="${absolutePostedBalance}" type="currency" currency="${currencyUomId}"/></field>
         <field name="debit" use-when="showCredit"><display description="${noValue}"/></field>
-        <field name="quot1" title="&quot;"><display/></field>
-        <field name="separator1" title=","><display description=","/></field>
-
-        <field name="quot2" title="&quot;"><display/></field>
         <field name="credit" use-when="showCredit"><display description="${absolutePostedBalance}" type="currency" currency="${currencyUomId}"/></field>
         <field name="credit" use-when="showDebit"><display description="${noValue}"/></field>
-        <field name="quot3" title="&quot;"><display/></field>
         <field name="glAccountId" use-when="showTotals"><display description="${uiLabelMap.Total}"/></field>
-        <field name="separator2" title="," use-when="showTotals"><display description=","/></field>
         <field name="debit" use-when="showTotals"><display description="${parameters.debitTotal}" type="currency" currency="${currencyUomId}"/></field>
         <field name="credit" use-when="showTotals"><display description="${parameters.creditTotal}" type="currency" currency="${currencyUomId}"/></field>
     </form>

Modified: ofbiz/trunk/applications/product/webapp/facility/WEB-INF/controller.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/webapp/facility/WEB-INF/controller.xml?rev=802400&r1=802399&r2=802400&view=diff
==============================================================================
--- ofbiz/trunk/applications/product/webapp/facility/WEB-INF/controller.xml (original)
+++ ofbiz/trunk/applications/product/webapp/facility/WEB-INF/controller.xml Sat Aug  8 15:49:04 2009
@@ -1368,7 +1368,7 @@
     <view-map name="InventoryItemGrandTotals" type="screen" page="component://product/widget/facility/FacilityScreens.xml#InventoryItemGrandTotals"/>
     <view-map name="InventoryAverageCosts" type="screen" page="component://product/widget/facility/FacilityScreens.xml#InventoryAverageCosts"/>
 
-    <view-map name="InventoryItemTotalsExport" type="screentext" page="component://product/widget/facility/FacilityScreens.xml#InventoryItemTotalsExport" content-type="text/csv" encoding="none"/>
+    <view-map name="InventoryItemTotalsExport" type="screencsv" page="component://product/widget/facility/FacilityScreens.xml#InventoryItemTotalsExport" content-type="text/csv" encoding="none"/>
 
     <view-map name="FacilityLocationGeoLocation" type="screen" page="component://product/widget/facility/FacilityScreens.xml#FacilityLocationGeoLocation"/>
 

Modified: ofbiz/trunk/applications/product/webapp/facility/facility/FacilityForms.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/webapp/facility/facility/FacilityForms.xml?rev=802400&r1=802399&r2=802400&view=diff
==============================================================================
--- ofbiz/trunk/applications/product/webapp/facility/facility/FacilityForms.xml (original)
+++ ofbiz/trunk/applications/product/webapp/facility/facility/FacilityForms.xml Sat Aug  8 15:49:04 2009
@@ -690,48 +690,19 @@
     <form name="InventoryItemTotalsExport" type="list" list-name="inventoryItemTotals"
         odd-row-style="alternate-row" default-table-style="basic-table hover-bar">
         <field name="productId" title="${uiLabelMap.ProductProductId}"><display/></field>
-        <field name="separator0" title=","><display description=","/></field>
-        <field name="quot0" title="&quot;"><display description="&quot;"/></field>
         <field name="quantityOnHand" title="${uiLabelMap.ProductQoh}"><display/></field>
-        <field name="quot1" title="&quot;"><display description="&quot;"/></field>
-        <field name="separator1" title=","><display description=","/></field>
-        <field name="quot2" title="&quot;"><display description="&quot;"/></field>
         <field name="availableToPromise" title="${uiLabelMap.ProductAtp}"><display/></field>
-        <field name="quot3" title="&quot;"><display description="&quot;"/></field>
-        <field name="separator2" title=","><display description=","/></field>
-        <field name="quot4" title="&quot;"><display description="&quot;"/></field>
         <field name="costPrice" title="${uiLabelMap.ProductCostPrice}"><display/></field>
-        <field name="quot5" title="&quot;"><display description="&quot;"/></field>
-        <field name="separator3" title=","><display description=","/></field>
-        <field name="quot6" title="&quot;"><display description="&quot;"/></field>
         <field name="retailPrice" title="${uiLabelMap.ProductRetailPrice}"><display/></field>
-        <field name="quot7" title="&quot;"><display description="&quot;"/></field>
-        <field name="separator4" title=","><display description=","/></field>
-        <field name="quot8" title="&quot;"><display description="&quot;"/></field>
         <field name="totalCostPrice" title="${uiLabelMap.CommonTotal} ${uiLabelMap.ProductCostPrice}"><display/></field>
-        <field name="quot9" title="&quot;"><display description="&quot;"/></field>
-        <field name="separator5" title=","><display description=","/></field>
-        <field name="quot10" title="&quot;"><display description="&quot;"/></field>
         <field name="totalRetailPrice" title="${uiLabelMap.CommonTotal} ${uiLabelMap.ProductRetailPrice}"><display/></field>
-        <field name="quot11" title="&quot;"><display description="&quot;"/></field>
     </form>
     <form name="InventoryItemGrandTotalsExport" type="list" list-name="inventoryItemGrandTotals"
         odd-row-style="alternate-row" default-table-style="basic-table hover-bar">
-        <field name="quot0" title="&quot;"><display description="&quot;"/></field>
         <field name="qohGrandTotal" title="${uiLabelMap.ProductQoh} ${uiLabelMap.CommonTotal} ${uiLabelMap.CommonQty}"><display/></field>
-        <field name="quot1" title="&quot;"><display description="&quot;"/></field>
-        <field name="separator0" title=","><display description=","/></field>
-        <field name="quot2" title="&quot;"><display description="&quot;"/></field>
         <field name="atpGrandTotal" title="${uiLabelMap.ProductAtp} ${uiLabelMap.CommonTotal} ${uiLabelMap.CommonQty}"><display/></field>
-        <field name="quot3" title="&quot;"><display description="&quot;"/></field>
-        <field name="separator1" title=","><display description=","/></field>
-        <field name="quot4" title="&quot;"><display description="&quot;"/></field>
         <field name="totalCostPriceGrandTotal" title="${uiLabelMap.CommonTotal} ${uiLabelMap.ProductCostPrice}"><display/></field>
-        <field name="quot5" title="&quot;"><display description="&quot;"/></field>
-        <field name="separator2" title=","><display description=","/></field>
-        <field name="quot6" title="&quot;"><display description="&quot;"/></field>
         <field name="totalRetailPriceGrandTotal" title="${uiLabelMap.CommonTotal} ${uiLabelMap.ProductRetailPrice}"><display/></field>
-        <field name="quot7" title="&quot;"><display description="&quot;"/></field>
     </form>
 
     <form name="ToFacilityTransfers" type="list"  target="" title="" list-name="toTransfers"

Modified: ofbiz/trunk/framework/common/webcommon/WEB-INF/common-controller.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/common/webcommon/WEB-INF/common-controller.xml?rev=802400&r1=802399&r2=802400&view=diff
==============================================================================
--- ofbiz/trunk/framework/common/webcommon/WEB-INF/common-controller.xml (original)
+++ ofbiz/trunk/framework/common/webcommon/WEB-INF/common-controller.xml Sat Aug  8 15:49:04 2009
@@ -43,6 +43,7 @@
     <handler name="screen" type="view" class="org.ofbiz.widget.screen.MacroScreenViewHandler"/>
     <handler name="screenxml" type="view" class="org.ofbiz.widget.screen.MacroScreenViewHandler"/>
     <handler name="screentext" type="view" class="org.ofbiz.widget.screen.MacroScreenViewHandler"/>
+    <handler name="screencsv" type="view" class="org.ofbiz.widget.screen.MacroScreenViewHandler"/>
     <!--handler name="screen" type="view" class="org.ofbiz.widget.screen.ScreenWidgetViewHandler"/>
     <handler name="screenxml" type="view" class="org.ofbiz.widget.screen.ScreenXmlViewHandler"/>
     <handler name="screentext" type="view" class="org.ofbiz.widget.screen.ScreenTextViewHandler"/-->

Modified: ofbiz/trunk/framework/widget/config/widget.properties
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/widget/config/widget.properties?rev=802400&r1=802399&r2=802400&view=diff
==============================================================================
--- ofbiz/trunk/framework/widget/config/widget.properties (original)
+++ ofbiz/trunk/framework/widget/config/widget.properties Sat Aug  8 15:49:04 2009
@@ -69,3 +69,11 @@
 screenfop.encoder=xml
 screenfop.default.contenttype=application/pdf
 screenfop.default.encoding=none
+# csv output
+screencsv.name=csv
+screencsv.screenrenderer=component://widget/templates/csvScreenMacroLibrary.ftl
+screencsv.formrenderer=component://widget/templates/csvFormMacroLibrary.ftl
+screencsv.menurenderer=component://widget/templates/csvMenuMacroLibrary.ftl
+screencsv.treerenderer=component://widget/templates/csvTreeMacroLibrary.ftl
+screencsv.default.contenttype=UTF-8
+screencsv.default.encoding=none

Added: ofbiz/trunk/framework/widget/templates/csvFormMacroLibrary.ftl
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/widget/templates/csvFormMacroLibrary.ftl?rev=802400&view=auto
==============================================================================
--- ofbiz/trunk/framework/widget/templates/csvFormMacroLibrary.ftl (added)
+++ ofbiz/trunk/framework/widget/templates/csvFormMacroLibrary.ftl Sat Aug  8 15:49:04 2009
@@ -0,0 +1,119 @@
+<#--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+
+<#macro renderField text><#if text?exists>"${text}"</#if></#macro>
+
+<#macro renderDisplayField idName description class alert inPlaceEditorId="" inPlaceEditorUrl="" inPlaceEditorParams="">
+<@renderField description />, <#rt/>
+</#macro>
+<#macro renderHyperlinkField></#macro>
+
+<#macro renderTextField name className alert value textSize maxlength id event action clientAutocomplete ajaxUrl ajaxEnabled><@renderField value /></#macro>
+
+<#macro renderTextareaField name className alert cols rows id readonly value visualEdtiorEnalble buttons><@renderField value /></#macro>
+
+<#macro renderDateTimeField name className alert title value size maxlength id dateType shortDateInput timeDropdownParamName defaultDateTimeString calGif localizedIconTitle timeDropdown timeHourName classString hour1 hour2 timeMinutesName minutes isTwelveHour ampmName amSelected pmSelected compositeType formName><@renderField value /></#macro>
+
+<#macro renderDropDownField name className alert id multiple formName otherFieldName event action size firstInList currentValue explicitDescription allowEmpty options fieldName otherFieldName otherValue otherFieldSize dDFCurrent ajaxEnabled noCurrentSelectedKey ajaxOptions frequency minChars choices autoSelect partialSearch partialChars ignoreCase fullSearch>
+<#if currentValue?has_content && firstInList?has_content>
+<@renderField explicitDescription />
+<#else>
+<#list options as item>
+<@renderField item.description />
+</#list>
+</#if>
+</#macro>
+
+<#macro renderTooltip tooltip tooltipStyle></#macro>
+<#macro renderCheckField items className alert allChecked currentValue name event action></#macro>
+<#macro renderRadioField items className alert currentValue noCurrentSelectedKey name event ation></#macro>
+
+<#macro renderSubmitField buttonType className alert formName title name event action imgSrc containerId ajaxUrl></#macro>
+<#macro renderResetField className alert name title></#macro>
+
+<#macro renderHiddenField name value></#macro>
+<#macro renderIgnoredField></#macro>
+
+<#macro renderFieldTitle style title><@renderField title />, </#macro>
+<#macro renderSingleFormFieldTitle></#macro>
+
+<#macro renderFormOpen linkUrl formType targetWindow containerId containerStyle autocomplete name useRowSubmit></#macro>
+<#macro renderFormClose focusFieldName formName></#macro>
+<#macro renderMultiFormClose></#macro>
+
+<#macro renderFormatListWrapperOpen formName style columnStyles></#macro>
+<#macro renderFormatListWrapperClose formName></#macro>
+
+<#macro renderFormatHeaderRowOpen style></#macro>
+<#macro renderFormatHeaderRowClose>
+
+</#macro>
+<#macro renderFormatHeaderRowCellOpen style positionSpan></#macro>
+<#macro renderFormatHeaderRowCellClose></#macro>
+
+<#macro renderFormatHeaderRowFormCellOpen style> </#macro>
+<#macro renderFormatHeaderRowFormCellClose></#macro>
+<#macro renderFormatHeaderRowFormCellTitleSeparator style isLast></#macro>
+
+<#macro renderFormatItemRowOpen formName itemIndex altRowStyles evenRowStyle oddRowStyle></#macro>
+<#macro renderFormatItemRowClose formName>
+
+</#macro>
+<#macro renderFormatItemRowCellOpen fieldName style positionSpan></#macro>
+<#macro renderFormatItemRowCellClose fieldName></#macro>
+<#macro renderFormatItemRowFormCellOpen style></#macro>
+<#macro renderFormatItemRowFormCellClose></#macro>
+
+<#macro renderFormatSingleWrapperOpen formName style></#macro>
+<#macro renderFormatSingleWrapperClose formName>
+</#macro>
+
+<#macro renderFormatFieldRowOpen></#macro>
+<#macro renderFormatFieldRowClose>
+</#macro>
+<#macro renderFormatFieldRowTitleCellOpen style> </#macro>
+<#macro renderFormatFieldRowTitleCellClose></#macro>
+<#macro renderFormatFieldRowSpacerCell></#macro>
+<#macro renderFormatFieldRowWidgetCellOpen positionSpan style></#macro>
+<#macro renderFormatFieldRowWidgetCellClose></#macro>
+
+<#macro renderFormatEmptySpace>&nbsp;</#macro>
+
+<#macro renderTextFindField name value defaultOption opEquals opBeginsWith opContains opIsEmpty opNotEqual className alert size maxlength autocomplete titleStyle hideIgnoreCase ignCase ignoreCase><@renderField value /></#macro>
+
+<#macro renderDateFindField className alert name localizedInputTitle value size maxlength dateType formName defaultDateTimeString imgSrc localizedIconTitle titleStyle defaultOptionFrom defaultOptionThru opEquals opSameDay opGreaterThanFromDayStart opGreaterThan opGreaterThan opLessThan opUpToDay opUpThruDay opIsEmpty><@renderField value /></#macro>
+
+<#macro renderRangeFindField className alert name value size maxlength autocomplete titleStyle defaultOptionFrom opEquals opGreaterThan opGreaterThanEquals opLessThan opLessThanEquals value2 defaultOptionThru>
+<@renderField value />
+</#macro>
+
+<#macro renderLookupField className alert name value size maxlength autocomplete descriptionFieldName formName lookupFieldFormName targetParameterIter imgSrc><@renderField value /></#macro>
+<#macro renderNextPrev paginateStyle paginateFirstStyle viewIndex highIndex listSize viewSize ajaxEnabled javaScriptEnabled ajaxFirstUrl firstUrl paginateFirstLabel paginatePreviousStyle ajaxPreviousUrl previousUrl paginatePreviousLabel pageLabel ajaxSelectUrl selectUrl commonDisplaying paginateNextStyle ajaxNextUrl nextUrl paginateNextLabel paginateLastStyle ajaxLastUrl lastUrl paginateLastLabel></#macro>
+<#macro renderFileField className alert name value size maxlength autocomplete><@renderField value /></#macro>
+<#macro renderPasswordField className alert name value size maxlength id autocomplete></#macro>
+<#macro renderImageFiel value border width height event action></#macro>
+<#macro renderBanner style leftStyle rightStyle leftText text rightText></#macro>
+<#macro renderFieldGroupOpen style id title collapsed collapsibleAreaId collapsible expandToolTip collapseToolTip></#macro>
+<#macro renderFieldGroupClose style id title></#macro>
+
+<#macro renderHyperlinkTitle name title showSelectAll="N"></#macro>
+<#macro renderSortField style title linkUrl ajaxEnabled></#macro>
+<#macro formatBoundaryComment boundaryType widgetType widgetName></#macro>
+<#macro makeHiddenFormLinkAnchor linkStyle hiddenFormName event action imgSrc description><@renderField description /></#macro>
+<#macro makeHyperlinkString linkStyle hiddenFormName event action imgSrc linkUrl targetWindow description><@renderField description /></#macro>
\ No newline at end of file

Propchange: ofbiz/trunk/framework/widget/templates/csvFormMacroLibrary.ftl
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: ofbiz/trunk/framework/widget/templates/csvFormMacroLibrary.ftl
------------------------------------------------------------------------------
    svn:keywords = Date Rev Author URL Id

Propchange: ofbiz/trunk/framework/widget/templates/csvFormMacroLibrary.ftl
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: ofbiz/trunk/framework/widget/templates/csvScreenMacroLibrary.ftl
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/widget/templates/csvScreenMacroLibrary.ftl?rev=802400&view=auto
==============================================================================
--- ofbiz/trunk/framework/widget/templates/csvScreenMacroLibrary.ftl (added)
+++ ofbiz/trunk/framework/widget/templates/csvScreenMacroLibrary.ftl Sat Aug  8 15:49:04 2009
@@ -0,0 +1,55 @@
+<#--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+
+<#macro renderScreenBegin>
+</#macro>
+
+<#macro renderScreenEnd>
+</#macro>
+
+<#macro renderSectionBegin boundaryComment>
+</#macro>
+
+<#macro renderSectionEnd boundaryComment>
+</#macro>
+
+<#macro renderContainerBegin id style autoUpdateLink autoUpdateInterval></#macro>
+<#macro renderContainerEnd></#macro>
+<#macro renderContentBegin editRequest enableEditValue editContainerStyle></#macro>
+<#macro renderContentBody></#macro>
+<#macro renderContentEnd urlString editMode editContainerStyle editRequest enableEditValue></#macro>
+<#macro renderSubContentBegin editContainerStyle editRequest enableEditValue></#macro>
+<#macro renderSubContentBody></#macro>
+<#macro renderSubContentEnd urlString editMode editContainerStyle editRequest enableEditValue></#macro>
+
+<#macro renderHorizontalSeparator id style></#macro>
+<#macro renderLabel text id style>
+    <#if text?exists>
+        ${text}<#lt/>
+    </#if>
+</#macro>
+<#macro renderLink parameterList targetWindow target uniqueItemName linkType actionUrl id style name linkUrl text imgStr></#macro>
+<#macro renderImage src id style wid hgt border alt urlString></#macro>
+
+<#macro renderContentFrame fullUrl width height border></#macro>
+<#macro renderScreenletBegin id title collapsible collapsibleAreaId expandToolTip collapseToolTip fullUrlString padded menuString showMore collapsed javaScriptEnabled></#macro>
+<#macro renderScreenletSubWidget></#macro>
+<#macro renderScreenletEnd></#macro>
+
+<#macro renderScreenletPaginateMenu lowIndex actualPageSize ofLabel listSize paginateLastStyle lastLinkUrl paginateLastLabel paginateNextStyle nextLinkUrl paginateNextLabel paginatePreviousStyle paginatePreviousLabel previousLinkUrl paginateFirstStyle paginateFirstLabel firstLinkUrl></#macro>

Propchange: ofbiz/trunk/framework/widget/templates/csvScreenMacroLibrary.ftl
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: ofbiz/trunk/framework/widget/templates/csvScreenMacroLibrary.ftl
------------------------------------------------------------------------------
    svn:keywords = Date Rev Author URL Id

Propchange: ofbiz/trunk/framework/widget/templates/csvScreenMacroLibrary.ftl
------------------------------------------------------------------------------
    svn:mime-type = text/plain