Author: erwan
Date: Thu Aug 19 18:46:27 2010 New Revision: 987265 URL: http://svn.apache.org/viewvc?rev=987265&view=rev Log: removing dependency to product and using new example demo data for reporting Added: ofbiz/trunk/framework/example/webapp/birt/report/example.rptdesign - copied, changed from r987155, ofbiz/trunk/framework/example/webapp/birt/report/product.rptdesign Removed: ofbiz/trunk/framework/example/webapp/birt/report/product.rptdesign Modified: ofbiz/trunk/framework/example/webapp/birt/WEB-INF/controller.xml ofbiz/trunk/framework/example/webapp/birt/birt/report.ftl ofbiz/trunk/framework/example/webapp/example/WEB-INF/controller.xml ofbiz/trunk/framework/example/widget/example/BirtForms.xml ofbiz/trunk/framework/example/widget/example/BirtScreens.xml ofbiz/trunk/framework/example/widget/example/ExampleForms.xml Modified: ofbiz/trunk/framework/example/webapp/birt/WEB-INF/controller.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/example/webapp/birt/WEB-INF/controller.xml?rev=987265&r1=987264&r2=987265&view=diff ============================================================================== --- ofbiz/trunk/framework/example/webapp/birt/WEB-INF/controller.xml (original) +++ ofbiz/trunk/framework/example/webapp/birt/WEB-INF/controller.xml Thu Aug 19 18:46:27 2010 @@ -85,6 +85,6 @@ under the License. application/vnd.ms-word application/vnd.ms-powerpoint --> - <view-map name="ViewHandler" type="birt" page="component://example/webapp/birt/report/product.rptdesign" content-type="application/pdf"/> + <view-map name="ViewHandler" type="birt" page="component://example/webapp/birt/report/example.rptdesign" content-type="application/pdf"/> <!-- end of view mappings --> </site-conf> Modified: ofbiz/trunk/framework/example/webapp/birt/birt/report.ftl URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/example/webapp/birt/birt/report.ftl?rev=987265&r1=987264&r2=987265&view=diff ============================================================================== --- ofbiz/trunk/framework/example/webapp/birt/birt/report.ftl (original) +++ ofbiz/trunk/framework/example/webapp/birt/birt/report.ftl Thu Aug 19 18:46:27 2010 @@ -20,7 +20,7 @@ under the License. <#assign birt = JspTaglibs["/WEB-INF/birt.tld"]/> <@birt.report id="birtReport" - reportDesign="component://example/webapp/birt/report/product.rptdesign" + reportDesign="component://example/webapp/birt/report/example.rptdesign" baseURL="/birt" height="700" width="900" Copied: ofbiz/trunk/framework/example/webapp/birt/report/example.rptdesign (from r987155, ofbiz/trunk/framework/example/webapp/birt/report/product.rptdesign) URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/example/webapp/birt/report/example.rptdesign?p2=ofbiz/trunk/framework/example/webapp/birt/report/example.rptdesign&p1=ofbiz/trunk/framework/example/webapp/birt/report/product.rptdesign&r1=987155&r2=987265&rev=987265&view=diff ============================================================================== --- ofbiz/trunk/framework/example/webapp/birt/report/product.rptdesign (original) +++ ofbiz/trunk/framework/example/webapp/birt/report/example.rptdesign Thu Aug 19 18:46:27 2010 @@ -1,107 +1,89 @@ <?xml version="1.0" encoding="UTF-8"?> -<!-- -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. ---> -<report xmlns="http://www.eclipse.org/birt/2005/design" version="3.2.20" id="1"> - <property name="createdBy">Eclipse BIRT Designer Version 2.5.1.v20090903 Build <2.5.1.v20090917-1447></property> +<report xmlns="http://www.eclipse.org/birt/2005/design" version="3.2.21" id="1"> + <property name="createdBy">Eclipse BIRT Designer Version 2.6.0.v20100531 Build <2.6.0.v20100609-1613></property> <property name="units">in</property> <method name="initialize"><![CDATA[importPackage(Packages.org.ofbiz.base.util) -module = "product.rptdesign";]]></method> +module = "example.rptdesign";]]></method> <property name="iconFile">/templates/blank_report.gif</property> <property name="bidiLayoutOrientation">ltr</property> <data-sources> <script-data-source name="OFBiz" id="8"/> </data-sources> <data-sets> - <script-data-set name="Product" id="9"> + <script-data-set name="Example" id="9"> <list-property name="resultSetHints"> <structure> <property name="position">0</property> - <property name="name">productId</property> + <property name="name">exampleId</property> <property name="dataType">string</property> </structure> <structure> <property name="position">1</property> - <property name="name">productTypeId</property> + <property name="name">exampleTypeId</property> <property name="dataType">string</property> </structure> <structure> <property name="position">2</property> - <property name="name">internalName</property> + <property name="name">exampleName</property> <property name="dataType">string</property> </structure> </list-property> <list-property name="columnHints"> <structure> - <property name="columnName">productId</property> - <text-property name="displayName">productId</text-property> + <property name="columnName">exampleId</property> + <text-property name="displayName">exampleId</text-property> </structure> <structure> - <property name="columnName">productTypeId</property> - <text-property name="displayName">productTypeId</text-property> + <property name="columnName">exampleTypeId</property> + <text-property name="displayName">exampleTypeId</text-property> </structure> <structure> - <property name="columnName">internalName</property> - <text-property name="displayName">internalName</text-property> + <property name="columnName">exampleName</property> + <text-property name="displayName">exampleName</text-property> </structure> </list-property> <structure name="cachedMetaData"> <list-property name="resultSet"> <structure> <property name="position">1</property> - <property name="name">productId</property> + <property name="name">exampleId</property> <property name="dataType">string</property> </structure> <structure> <property name="position">2</property> - <property name="name">productTypeId</property> + <property name="name">exampleTypeId</property> <property name="dataType">string</property> </structure> <structure> <property name="position">3</property> - <property name="name">internalName</property> + <property name="name">exampleName</property> <property name="dataType">string</property> </structure> </list-property> </structure> <property name="dataSource">OFBiz</property> - <method name="open"><![CDATA[products = null; + <method name="open"><![CDATA[examples = null; try { - products = delegator.findList("Product", null, null, null, null, false); + examples = delegator.findList("Example", null, null, null, null, false); } catch (e) { Debug.logError(e, module); } totalRow = 0; countOfRow = 0; -if (products) { - totalRow = products.size(); +if (examples) { + totalRow = examples.size(); }]]></method> <method name="fetch"><![CDATA[if (countOfRow == totalRow - 1) return false; -product = products.get(countOfRow); -productId = product.getString("productId"); -productTypeId = product.getString("productTypeId"); -internalName = product.getString("internalName"); - -row["productId"] = productId; -row["productTypeId"] = productTypeId; -row["internalName"] = internalName; +example = examples.get(countOfRow); +exampleId = example.getString("exampleId"); +exampleTypeId = example.getString("exampleTypeId"); +exampleName = example.getString("exampleName"); + +row["exampleId"] = exampleId; +row["exampleTypeId"] = exampleTypeId; +row["exampleName"] = exampleName; countOfRow ++; return true;]]></method> @@ -153,24 +135,24 @@ return true;]]></method> </page-setup> <body> <table id="10"> - <property name="dataSet">Product</property> + <property name="dataSet">Example</property> <list-property name="boundDataColumns"> <structure> - <property name="name">productId</property> - <text-property name="displayName">productId</text-property> - <expression name="expression">dataSetRow["productId"]</expression> + <property name="name">exampleId</property> + <text-property name="displayName">exampleId</text-property> + <expression name="expression" type="javascript">dataSetRow["exampleId"]</expression> <property name="dataType">string</property> </structure> <structure> - <property name="name">productTypeId</property> - <text-property name="displayName">productTypeId</text-property> - <expression name="expression">dataSetRow["productTypeId"]</expression> + <property name="name">exampleTypeId</property> + <text-property name="displayName">exampleTypeId</text-property> + <expression name="expression" type="javascript">dataSetRow["exampleTypeId"]</expression> <property name="dataType">string</property> </structure> <structure> - <property name="name">internalName</property> - <text-property name="displayName">internalName</text-property> - <expression name="expression">dataSetRow["internalName"]</expression> + <property name="name">exampleName</property> + <text-property name="displayName">exampleName</text-property> + <expression name="expression">dataSetRow["exampleName"]</expression> <property name="dataType">string</property> </structure> </list-property> @@ -184,17 +166,17 @@ return true;]]></method> <property name="textAlign">center</property> <cell id="12"> <label id="13"> - <text-property name="text">productId</text-property> + <text-property name="text">exampleId</text-property> </label> </cell> <cell id="14"> <label id="15"> - <text-property name="text">productTypeId</text-property> + <text-property name="text">exampleTypeId</text-property> </label> </cell> <cell id="16"> <label id="17"> - <text-property name="text">internalName</text-property> + <text-property name="text">exampleName</text-property> </label> </cell> </row> @@ -203,17 +185,17 @@ return true;]]></method> <row id="18"> <cell id="19"> <data id="20"> - <property name="resultSetColumn">productId</property> + <property name="resultSetColumn">exampleId</property> </data> </cell> <cell id="21"> <data id="22"> - <property name="resultSetColumn">productTypeId</property> + <property name="resultSetColumn">exampleTypeId</property> </data> </cell> <cell id="23"> <data id="24"> - <property name="resultSetColumn">internalName</property> + <property name="resultSetColumn">exampleName</property> </data> </cell> </row> Modified: ofbiz/trunk/framework/example/webapp/example/WEB-INF/controller.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/example/webapp/example/WEB-INF/controller.xml?rev=987265&r1=987264&r2=987265&view=diff ============================================================================== --- ofbiz/trunk/framework/example/webapp/example/WEB-INF/controller.xml (original) +++ ofbiz/trunk/framework/example/webapp/example/WEB-INF/controller.xml Thu Aug 19 18:46:27 2010 @@ -290,7 +290,7 @@ under the License. <view-map name="BirtMain" type="screen" page="component://example/widget/example/BirtScreens.xml#main"/> <view-map name="Report" type="screen" page="component://example/widget/example/BirtScreens.xml#Report"/> <view-map name="Mail" type="screen" page="component://example/widget/example/BirtScreens.xml#EditMail"/> - <view-map name="ViewHandler" type="birt" page="component://example/webapp/birt/report/product.rptdesign" content-type="application/pdf"/> + <view-map name="ViewHandler" type="birt" page="component://example/webapp/birt/report/example.rptdesign" content-type="application/pdf"/> <!-- Flotr view mapping --> <view-map name="ExampleBarChart" page="component://example/widget/example/ExampleScreens.xml#ExampleBarChart" type="screen"/> Modified: ofbiz/trunk/framework/example/widget/example/BirtForms.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/example/widget/example/BirtForms.xml?rev=987265&r1=987264&r2=987265&view=diff ============================================================================== --- ofbiz/trunk/framework/example/widget/example/BirtForms.xml (original) +++ ofbiz/trunk/framework/example/widget/example/BirtForms.xml Thu Aug 19 18:46:27 2010 @@ -25,7 +25,7 @@ under the License. <field name="sendFrom"><text/></field> <field name="sendTo"><text/></field> <field name="subject"><text/></field> - <field name="birtReportLocation" tooltip="Example is component://example/webapp/birt/report/product.rptdesign"><text/></field> + <field name="birtReportLocation" tooltip="Example is component://example/webapp/birt/report/example.rptdesign"><text/></field> <field name="birtContentType"> <drop-down> <option key="text/html" description="text/html"/> Modified: ofbiz/trunk/framework/example/widget/example/BirtScreens.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/example/widget/example/BirtScreens.xml?rev=987265&r1=987264&r2=987265&view=diff ============================================================================== --- ofbiz/trunk/framework/example/widget/example/BirtScreens.xml (original) +++ ofbiz/trunk/framework/example/widget/example/BirtScreens.xml Thu Aug 19 18:46:27 2010 @@ -31,7 +31,7 @@ under the License. <section> <widgets> <label style="h3" text="BIRT is an open source Eclipse-based reporting system that integrates with any OFBiz application to produce compelling reports including graphical presentations like pie and bar charts."/> - <label style="h3" text="This application provides you with a sample product report."/> + <label style="h3" text="This application provides you with a sample example report."/> <label style="h3" text="See the help option how to create your own OFBiz intergrated reports."/> <link style="h3" text="or see the Birt home for more information" target="http://eclipse.org/birt/phoenix/intro/" url-mode="plain" target-window="_blank_"/> </widgets> Modified: ofbiz/trunk/framework/example/widget/example/ExampleForms.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/example/widget/example/ExampleForms.xml?rev=987265&r1=987264&r2=987265&view=diff ============================================================================== --- ofbiz/trunk/framework/example/widget/example/ExampleForms.xml (original) +++ ofbiz/trunk/framework/example/widget/example/ExampleForms.xml Thu Aug 19 18:46:27 2010 @@ -129,7 +129,7 @@ under the License. <field name="anotherText"> <drop-down allow-empty="true"> <option key="Explicit Option" description="${uiLabelMap.ExampleExplicitOption}"/> - <entity-options entity-name="ProductType" description="${description}" key-field-name="productTypeId"> + <entity-options entity-name="ExampleType" description="${description}" key-field-name="exampleTypeId"> <entity-order-by field-name="description"/> </entity-options> </drop-down> |
Free forum by Nabble | Edit this page |