svn commit: r531220 - in /ofbiz/trunk/applications/product: config/ data/ entitydef/ script/org/ofbiz/product/product/ servicedef/ webapp/catalog/WEB-INF/ webapp/catalog/product/ widget/catalog/

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

svn commit: r531220 - in /ofbiz/trunk/applications/product: config/ data/ entitydef/ script/org/ofbiz/product/product/ servicedef/ webapp/catalog/WEB-INF/ webapp/catalog/product/ widget/catalog/

jaz-3
Author: jaz
Date: Sun Apr 22 09:17:09 2007
New Revision: 531220

URL: http://svn.apache.org/viewvc?view=rev&rev=531220
Log:
implemented ProductGeo

Modified:
    ofbiz/trunk/applications/product/config/ProductUiLabels.properties
    ofbiz/trunk/applications/product/data/ProductTypeData.xml
    ofbiz/trunk/applications/product/entitydef/entitygroup.xml
    ofbiz/trunk/applications/product/entitydef/entitymodel.xml
    ofbiz/trunk/applications/product/script/org/ofbiz/product/product/ProductServices.xml
    ofbiz/trunk/applications/product/servicedef/services.xml
    ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/controller.xml
    ofbiz/trunk/applications/product/webapp/catalog/product/ProductForms.xml
    ofbiz/trunk/applications/product/webapp/catalog/product/ProductTabBar.ftl
    ofbiz/trunk/applications/product/widget/catalog/ProductScreens.xml

Modified: ofbiz/trunk/applications/product/config/ProductUiLabels.properties
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/config/ProductUiLabels.properties?view=diff&rev=531220&r1=531219&r2=531220
==============================================================================
--- ofbiz/trunk/applications/product/config/ProductUiLabels.properties (original)
+++ ofbiz/trunk/applications/product/config/ProductUiLabels.properties Sun Apr 22 09:17:09 2007
@@ -116,12 +116,13 @@
 PageTitleEditProductFeatureCategories=Edit Product Feature Categories
 PageTitleEditProductFeatureGroups=Edit Feature Groups
 PageTitleEditProductFeatures=Edit Product Features
+PageTitleEditProductGeos=Edit Product Geos
 PageTitleEditProductGlAccounts=Edit Product GL Accounts
 PageTitleEditProductGoodIdentifications=Edit Product Good Identifications
 PageTitleEditProductInventoryItems=Edit Product Inventory Items
 PageTitleEditProductKeywords=Edit Product Keywords
 PageTitleEditProductMaintenance=Edit Product Maintenance
-PageTitleEditProductMeter=Edit Product Meter
+PageTitleEditProductMeters=Edit Product Meters
 PageTitleEditProductPriceRules=Edit Product Price Rules
 PageTitleEditProductPrices=Edit Product Prices
 PageTitleEditProductPromoRules=Edit Product Promo Rules

Modified: ofbiz/trunk/applications/product/data/ProductTypeData.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/data/ProductTypeData.xml?view=diff&rev=531220&r1=531219&r2=531220
==============================================================================
--- ofbiz/trunk/applications/product/data/ProductTypeData.xml (original)
+++ ofbiz/trunk/applications/product/data/ProductTypeData.xml Sun Apr 22 09:17:09 2007
@@ -178,6 +178,11 @@
     <ProductCategoryType description="Mix and Match" hasTable="N" parentTypeId="" productCategoryTypeId="MIXMATCH_CATEGORY"/>
     <ProductCategoryType description="Cross Sell" hasTable="N" parentTypeId="" productCategoryTypeId="CROSS_SELL_CATEGORY"/>
     <ProductCategoryType description="Tax" hasTable="N" parentTypeId="" productCategoryTypeId="TAX_CATEGORY"/>
+
+    <!-- product geo data -->
+    <EnumerationType description="Product Geo Data" enumTypeId="PROD_GEO" hasTable="N" parentTypeId=""/>
+    <Enumeration description="Purchase Include Geo" enumCode="PURCHASE_INCLUDE" enumId="PG_PURCH_INCLUDE" sequenceId="01" enumTypeId="PROD_GEO"/>
+    <Enumeration description="Purchase Exclude Geo" enumCode="PURCHASE_EXCLUDE" enumId="PG_PURCH_EXCLUDE" sequenceId="02" enumTypeId="PROD_GEO"/>
     
     <ProductCategoryContentType description="Category Name" hasTable="N" parentTypeId="" prodCatContentTypeId="CATEGORY_NAME"/>
     <ProductCategoryContentType description="Description" hasTable="N" parentTypeId="" prodCatContentTypeId="DESCRIPTION"/>

Modified: ofbiz/trunk/applications/product/entitydef/entitygroup.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/entitydef/entitygroup.xml?view=diff&rev=531220&r1=531219&r2=531220
==============================================================================
--- ofbiz/trunk/applications/product/entitydef/entitygroup.xml (original)
+++ ofbiz/trunk/applications/product/entitydef/entitygroup.xml Sun Apr 22 09:17:09 2007
@@ -159,6 +159,7 @@
     <entity-group group="org.ofbiz" entity="ProductContent" />
     <entity-group group="org.ofbiz" entity="ProductContentAndInfo" />
     <entity-group group="org.ofbiz" entity="ProductContentType" />
+    <entity-group group="org.ofbiz" entity="ProductGeo" />
     <entity-group group="org.ofbiz" entity="ProductGlAccount" />
     <entity-group group="org.ofbiz" entity="ProductInventoryItem" />
     <entity-group group="org.ofbiz" entity="ProductKeyword" />

Modified: ofbiz/trunk/applications/product/entitydef/entitymodel.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/entitydef/entitymodel.xml?view=diff&rev=531220&r1=531219&r2=531220
==============================================================================
--- ofbiz/trunk/applications/product/entitydef/entitymodel.xml (original)
+++ ofbiz/trunk/applications/product/entitydef/entitymodel.xml Sun Apr 22 09:17:09 2007
@@ -2173,6 +2173,26 @@
         <key-map field-name="parentTypeId" rel-field-name="productContentTypeId"/>
       </relation>
     </entity>
+    <entity entity-name="ProductGeo"
+            package-name="org.ofbiz.product.product"
+ default-resource-name="ProductEntityLabels"
+            title="Product Geo Entity">
+      <field name="productId" type="id-ne"></field>
+      <field name="geoId" type="id"></field>
+      <field name="productGeoEnumId" type="id"></field>
+      <field name="description" type="description"></field>
+      <prim-key field="productId"/>
+      <prim-key field="geoId"/>
+      <relation type="one" fk-name="PRDGEO_PRODUCT" rel-entity-name="Product">
+        <key-map field-name="productId"/>
+      </relation>
+      <relation type="one" fk-name="PRDGEO_GEO" rel-entity-name="Geo">
+        <key-map field-name="geoId"/>
+      </relation>
+      <relation type="one" fk-name="PRDGEO_ENUM" rel-entity-name="Enumeration">
+        <key-map field-name="productGeoEnumId" rel-field-name="enumId"/>
+      </relation>
+    </entity>
     <entity entity-name="ProductGlAccount"
             package-name="org.ofbiz.product.product"
             title="Product GlAccount Entity">

Modified: ofbiz/trunk/applications/product/script/org/ofbiz/product/product/ProductServices.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/script/org/ofbiz/product/product/ProductServices.xml?view=diff&rev=531220&r1=531219&r2=531220
==============================================================================
--- ofbiz/trunk/applications/product/script/org/ofbiz/product/product/ProductServices.xml (original)
+++ ofbiz/trunk/applications/product/script/org/ofbiz/product/product/ProductServices.xml Sun Apr 22 09:17:09 2007
@@ -771,7 +771,24 @@
         <entity-one entity-name="ProductMeter" value-name="lookedUpValue"/>
         <remove-value value-name="lookedUpValue"/>
     </simple-method>
-    
+
+    <!-- ProductGeo Services -->
+    <simple-method method-name="createProductGeo" short-description="Create an Product Geo">
+        <make-value value-name="newEntity" entity-name="ProductGeo"/>
+        <set-nonpk-fields map-name="parameters" value-name="newEntity"/>
+        <set-pk-fields map-name="parameters" value-name="newEntity"/>
+        <create-value value-name="newEntity"/>
+    </simple-method>
+    <simple-method method-name="updateProductGeo" short-description="Update an existing Product Geo">
+        <entity-one entity-name="ProductGeo" value-name="lookedUpValue"/>
+        <set-nonpk-fields map-name="parameters" value-name="lookedUpValue"/>
+        <store-value value-name="lookedUpValue"/>
+    </simple-method>
+    <simple-method method-name="deleteProductGeo" short-description="Delete an existing Product Geo">
+        <entity-one entity-name="ProductGeo" value-name="lookedUpValue"/>
+        <remove-value value-name="lookedUpValue"/>
+    </simple-method>
+
     <!-- a method to centralize product security code, meant to be called in-line with
         call-simple-method, and the checkAction and callingMethodName attributes should be in the method context -->
     <simple-method method-name="checkProductRelatedPermission" short-description="Check Product Related Permission">

Modified: ofbiz/trunk/applications/product/servicedef/services.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/servicedef/services.xml?view=diff&rev=531220&r1=531219&r2=531220
==============================================================================
--- ofbiz/trunk/applications/product/servicedef/services.xml (original)
+++ ofbiz/trunk/applications/product/servicedef/services.xml Sun Apr 22 09:17:09 2007
@@ -469,6 +469,23 @@
         <description>Delete a ProductMeter</description>
         <auto-attributes include="pk" mode="IN" optional="false"/>
     </service>
+    <service name="createProductGeo" default-entity-name="ProductGeo" engine="simple"
+        location="org/ofbiz/product/product/ProductServices.xml" invoke="createProductGeo" auth="true">
+        <description>Create a ProductGeo</description>
+        <auto-attributes include="pk" mode="IN" optional="false"/>
+        <auto-attributes include="nonpk" mode="IN" optional="true"/>
+    </service>
+    <service name="updateProductGeo" default-entity-name="ProductGeo" engine="simple"
+        location="org/ofbiz/product/product/ProductServices.xml" invoke="updateProductGeo" auth="true">
+        <description>Update a ProductGeo</description>
+        <auto-attributes include="pk" mode="IN" optional="false"/>
+        <auto-attributes include="nonpk" mode="IN" optional="true"/>
+    </service>
+    <service name="deleteProductGeo" default-entity-name="ProductGeo" engine="simple"
+        location="org/ofbiz/product/product/ProductServices.xml" invoke="deleteProductGeo" auth="true">
+        <description>Delete a ProductGeo</description>
+        <auto-attributes include="pk" mode="IN" optional="false"/>
+    </service>
     <service name="createCommunicationEventProduct" engine="simple"
         location="org/ofbiz/product/communication/CommunicationEventServices.xml" invoke="createCommunicationEventProduct" auth="true">
         <description>Create a Communication Event Product</description>

Modified: ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/controller.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/controller.xml?view=diff&rev=531220&r1=531219&r2=531220
==============================================================================
--- ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/controller.xml (original)
+++ ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/controller.xml Sun Apr 22 09:17:09 2007
@@ -1426,6 +1426,30 @@
         <response name="success" type="view" value="EditProductMeters"/>
         <response name="error" type="view" value="EditProductMeters"/>
     </request-map>
+
+    <!-- ================ ProductGeo Requests ================= -->
+    <request-map uri="EditProductGeos">
+        <security https="true" auth="true"/>
+        <response name="success" type="view" value="EditProductGeos"/>
+    </request-map>
+    <request-map uri="createProductGeo">
+        <security https="true" auth="true"/>
+        <event type="service" path="" invoke="createProductGeo"/>
+        <response name="success" type="view" value="EditProductGeos"/>
+        <response name="error" type="view" value="EditProductGeos"/>
+    </request-map>
+    <request-map uri="updateProductGeo">
+        <security https="true" auth="true"/>
+        <event type="service" path="" invoke="updateProductGeo"/>
+        <response name="success" type="view" value="EditProductGeos"/>
+        <response name="error" type="view" value="EditProductGeos"/>
+    </request-map>
+    <request-map uri="deleteProductGeo">
+        <security https="true" auth="true"/>
+        <event type="service" path="" invoke="deleteProductGeo"/>
+        <response name="success" type="view" value="EditProductGeos"/>
+        <response name="error" type="view" value="EditProductGeos"/>
+    </request-map>
     
     <!-- ================ ProductSubscriptionResources Requests ================= -->
     <request-map uri="EditProductSubscriptionResources"><security https="true" auth="true"/><response name="success" type="view" value="EditProductSubscriptionResources"/></request-map>
@@ -2356,6 +2380,7 @@
     <view-map name="ProductBarCode.pdf" type="screenfop" page="component://product/widget/catalog/ProductScreens.xml#ProductBarCode.fo" content-type="application/pdf" encoding="none"/>
 
     <view-map name="EditProductContent" type="screen" page="component://product/widget/catalog/ProductScreens.xml#EditProductContent"/>
+    <view-map name="EditProductGeos" type="screen" page="component://product/widget/catalog/ProductScreens.xml#EditProductGeos"/>
     <view-map name="EditProductGoodIdentifications" type="screen" page="component://product/widget/catalog/ProductScreens.xml#EditProductGoodIdentifications"/>
     <view-map name="EditProductCategories" type="screen" page="component://product/widget/catalog/ProductScreens.xml#EditProductCategories"/>
     <view-map name="EditProductKeyword" type="screen" page="component://product/widget/catalog/ProductScreens.xml#EditProductKeyword"/>

Modified: ofbiz/trunk/applications/product/webapp/catalog/product/ProductForms.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/webapp/catalog/product/ProductForms.xml?view=diff&rev=531220&r1=531219&r2=531220
==============================================================================
--- ofbiz/trunk/applications/product/webapp/catalog/product/ProductForms.xml (original)
+++ ofbiz/trunk/applications/product/webapp/catalog/product/ProductForms.xml Sun Apr 22 09:17:09 2007
@@ -1047,7 +1047,58 @@
         </field>
         <field name="submitButton" title="${uiLabelMap.CommonUpdate}" widget-style="smallSubmit"><submit button-type="button"/></field>
     </form>
-    <form name="AddProductFeatureApplAttr" type="single" target="createProductFeatureApplAttr" title=""
+
+    <!-- create and update a ProductGeo -->
+    <form name="AddProductGeo" type="single" target="createProductGeo" title=""
+            default-title-style="tableheadtext" default-widget-style="inputBox" default-tooltip-style="tabletext">
+        <auto-fields-service service-name="createProductGeo" />
+        <field name="productId"><display also-hidden="true"/></field>
+        <field name="geoId" widget-style="selectBox">
+            <drop-down allow-empty="false">
+                <entity-options entity-name="Geo" key-field-name="geoId" description="${geoName}">
+                    <entity-order-by field-name="geoTypeId"/>
+                    <entity-order-by field-name="geoName"/>
+                </entity-options>
+            </drop-down>
+        </field>
+        <field name="productGeoEnumId" widget-style="selectBox">
+            <drop-down allow-empty="false">
+                <entity-options entity-name="Enumeration" description="${description}" key-field-name="enumId">
+                    <entity-constraint name="enumTypeId" operator="equals" value="PROD_GEO"/>
+                    <entity-order-by field-name="sequenceId"/>
+                </entity-options>
+            </drop-down>
+        </field>
+        <field name="description"><text size="20" /></field>
+        <field name="submitButton" title="${uiLabelMap.CommonAdd}" widget-style="smallSubmit"><submit button-type="button"/></field>
+    </form>
+    <form name="ListProductGeos" type="list" list-name="productGeos" target="updateProductGeo"
+            default-title-style="tableheadtext" default-widget-style="inputBox" default-tooltip-style="tabletext">
+        <actions>
+            <entity-condition entity-name="ProductGeo">
+                <condition-expr field-name="productId" env-name="productId"/>
+            </entity-condition>
+        </actions>
+        <auto-fields-service service-name="updateProductGeo"/>
+        <field name="productId"><display also-hidden="true"/></field>
+        <field name="geoId"><display also-hidden="true"/></field>
+        <field name="productGeoEnumId" widget-style="selectBox">
+            <drop-down allow-empty="false">
+                <entity-options entity-name="Enumeration" description="${description}" key-field-name="enumId">
+                    <entity-constraint name="enumTypeId" operator="equals" value="PROD_GEO"/>
+                    <entity-order-by field-name="sequenceId"/>
+                </entity-options>
+            </drop-down>
+        </field>
+        <field name="description"><text size="20" /></field>
+        <field name="deleteLink" title="" widget-style="buttontext">
+            <hyperlink target="deleteProductGeo?productId=${productId}&amp;geoId=${geoId}"
+                description="${uiLabelMap.CommonDelete}" also-hidden="false"/>
+        </field>
+        <field name="submitButton" title="${uiLabelMap.CommonUpdate}" widget-style="smallSubmit"><submit button-type="button"/></field>
+    </form>
+
+    <form name="AddProductFeatureApplAttr" type="single" target="createProductFeatureApplAttr" title=""
         default-title-style="tableheadtext" default-widget-style="inputBox" default-tooltip-style="tabletext">
         <auto-fields-service service-name="createProductFeatureApplAttr" />
         <field name="productId"><hidden/></field>

Modified: ofbiz/trunk/applications/product/webapp/catalog/product/ProductTabBar.ftl
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/webapp/catalog/product/ProductTabBar.ftl?view=diff&rev=531220&r1=531219&r2=531220
==============================================================================
--- ofbiz/trunk/applications/product/webapp/catalog/product/ProductTabBar.ftl (original)
+++ ofbiz/trunk/applications/product/webapp/catalog/product/ProductTabBar.ftl Sun Apr 22 09:17:09 2007
@@ -26,6 +26,7 @@
         <a href="<@ofbizUrl>EditProduct?productId=${productId}</@ofbizUrl>" class="${selectedClassMap.EditProduct?default(unselectedClassName)}">${uiLabelMap.ProductProduct}</a>
         <a href="<@ofbizUrl>EditProductPrices?productId=${productId}</@ofbizUrl>" class="${selectedClassMap.EditProductPrices?default(unselectedClassName)}">${uiLabelMap.ProductPrices}</a>
         <a href="<@ofbizUrl>EditProductContent?productId=${productId}</@ofbizUrl>" class="${selectedClassMap.EditProductContent?default(unselectedClassName)}">${uiLabelMap.ProductContent}</a>
+        <a href="<@ofbizUrl>EditProductGeos?productId=${productId}</@ofbizUrl>" class="${selectedClassMap.EditProductGeos?default(unselectedClassName)}">${uiLabelMap.CommonGeos}</a>
         <a href="<@ofbizUrl>EditProductGoodIdentifications?productId=${productId}</@ofbizUrl>" class="${selectedClassMap.EditProductGoodIdentifications?default(unselectedClassName)}">${uiLabelMap.CommonIds}</a>
         <a href="<@ofbizUrl>EditProductCategories?productId=${productId}</@ofbizUrl>" class="${selectedClassMap.EditProductCategories?default(unselectedClassName)}">${uiLabelMap.ProductCategories}</a>
         <a href="<@ofbizUrl>EditProductKeyword?productId=${productId}</@ofbizUrl>" class="${selectedClassMap.EditProductKeyword?default(unselectedClassName)}">${uiLabelMap.ProductKeywords}</a>

Modified: ofbiz/trunk/applications/product/widget/catalog/ProductScreens.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/widget/catalog/ProductScreens.xml?view=diff&rev=531220&r1=531219&r2=531220
==============================================================================
--- ofbiz/trunk/applications/product/widget/catalog/ProductScreens.xml (original)
+++ ofbiz/trunk/applications/product/widget/catalog/ProductScreens.xml Sun Apr 22 09:17:09 2007
@@ -860,7 +860,7 @@
     <screen name="EditProductMeters">
         <section>
             <actions>
-                <set field="titleProperty" value="PageTitleEditProductMeter"/>
+                <set field="titleProperty" value="PageTitleEditProductMeters"/>
                 <set field="tabButtonItem" value="EditProductMeters"/>
                 <set field="productId" from-field="parameters.productId"/>
             </actions>
@@ -869,6 +869,27 @@
                     <decorator-section name="body">
                         <include-form name="ListProductMeters" location="component://product/webapp/catalog/product/ProductForms.xml"/>
                         <include-form name="AddProductMeter" location="component://product/webapp/catalog/product/ProductForms.xml"/>
+                    </decorator-section>
+                </decorator-screen>
+            </widgets>
+        </section>
+    </screen>
+    <screen name="EditProductGeos">
+        <section>
+            <actions>
+                <set field="titleProperty" value="PageTitleEditProductGeos"/>
+                <set field="tabButtonItem" value="EditProductGeos"/>
+                <set field="productId" from-field="parameters.productId"/>
+            </actions>
+            <widgets>
+                <decorator-screen name="CommonProductDecorator" location="${parameters.mainDecoratorLocation}">
+                    <decorator-section name="body">
+                        <container style="widget-container">
+                            <include-form name="ListProductGeos" location="component://product/webapp/catalog/product/ProductForms.xml"/>
+                        </container>
+                        <container style="widget-container">
+                            <include-form name="AddProductGeo" location="component://product/webapp/catalog/product/ProductForms.xml"/>
+                        </container>
                     </decorator-section>
                 </decorator-screen>
             </widgets>