You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by ap...@apache.org on 2007/10/20 06:39:35 UTC

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

Author: apatel
Date: Fri Oct 19 21:39:32 2007
New Revision: 586665

URL: http://svn.apache.org/viewvc?rev=586665&view=rev
Log:
CrUD Services and supporting UI for VenderProduct entity.

Modified:
    ofbiz/trunk/applications/product/config/ProductUiLabels.properties
    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/CatalogCommonScreens.xml
    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?rev=586665&r1=586664&r2=586665&view=diff
==============================================================================
--- ofbiz/trunk/applications/product/config/ProductUiLabels.properties (original)
+++ ofbiz/trunk/applications/product/config/ProductUiLabels.properties Fri Oct 19 21:39:32 2007
@@ -159,6 +159,7 @@
 PageTitleEditShipmentPlan=Edit Shipment Plan
 PageTitleEditShipmentRouteSegments=Edit Shipment Route Segments
 PageTitleEditSupplierProduct=Edit Supplier Product
+PageTitleEditVendorProduct=Edit Vendor Product
 PageTitleFindConfigItems=Find Config Items
 PageTitleFindFacility=Find Facility
 PageTitleFindFacilityGroup=Find Facility Group

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?rev=586665&r1=586664&r2=586665&view=diff
==============================================================================
--- ofbiz/trunk/applications/product/script/org/ofbiz/product/product/ProductServices.xml (original)
+++ ofbiz/trunk/applications/product/script/org/ofbiz/product/product/ProductServices.xml Fri Oct 19 21:39:32 2007
@@ -945,4 +945,16 @@
         <remove-value value-name="lookedUpValue"/>
     </simple-method>
     
+    <simple-method method-name="createVendorProduct" short-description="Create a VendorProduct">
+        <make-value entity-name="VendorProduct" value-name="newEntity"/>
+        <set-pk-fields value-name="newEntity" map-name="parameters"/>
+        <create-value value-name="newEntity"/>
+    </simple-method>
+    
+    <simple-method method-name="deleteVendorProduct" short-description="Remove the VendorProduct">
+        <make-value entity-name="VendorProduct" value-name="lookedUpValue"/>
+        <set-pk-fields value-name="lookedUpValue" map-name="parameters"/>
+        <remove-value value-name="lookedUpValue"/>
+    </simple-method>
+
 </simple-methods>

Modified: ofbiz/trunk/applications/product/servicedef/services.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/servicedef/services.xml?rev=586665&r1=586664&r2=586665&view=diff
==============================================================================
--- ofbiz/trunk/applications/product/servicedef/services.xml (original)
+++ ofbiz/trunk/applications/product/servicedef/services.xml Fri Oct 19 21:39:32 2007
@@ -1196,4 +1196,14 @@
         <attribute type="String" mode="IN" name="startPrice" optional="false"/>
         <attribute type="String" mode="IN" name="quantity" optional="false"/>
     </service>
+    
+    <!--VendorProduct Services -->
+    <service name="createVendorProduct" engine="simple" default-entity-name="VendorProduct"
+            location="org/ofbiz/product/product/ProductServices.xml" invoke="createVendorProduct" auth="true">
+        <auto-attributes include="pk" mode="IN" optional="false"/>
+    </service>
+    <service name="deleteVendorProduct" engine="simple" default-entity-name="VendorProduct"
+            location="org/ofbiz/product/product/ProductServices.xml" invoke="deleteVendorProduct" auth="true">
+        <auto-attributes include="pk" mode="IN" optional="false"/>
+    </service>
 </services>

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?rev=586665&r1=586664&r2=586665&view=diff
==============================================================================
--- ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/controller.xml (original)
+++ ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/controller.xml Fri Oct 19 21:39:32 2007
@@ -2485,6 +2485,27 @@
         <response name="error" type="view" value="ProductsExportToEbay"/>
     </request-map>
     
+    <!-- ================ Vendor Product Requests ================= -->
+    <request-map uri="EditVendorProduct">
+        <security https="true" auth="true"/>
+        <response name="success" type="view" value="EditVendorProduct"/>
+        <response name="error" type="view" value="EditVendorProduct"/>
+    </request-map>
+    
+    <request-map uri="createVendorProduct">
+        <security https="true" auth="true"/>
+        <event type="service" invoke="createVendorProduct"/>
+        <response name="success" type="view" value="EditVendorProduct"/>
+        <response name="error" type="view" value="EditVendorProduct"/>
+    </request-map>
+    
+    <request-map uri="deleteVendorProduct">
+        <security https="true" auth="true"/>
+        <event type="service" invoke="deleteVendorProduct"/>
+        <response name="success" type="view" value="EditVendorProduct"/>
+        <response name="error" type="view" value="EditVendorProduct"/>
+    </request-map>
+    
     <!-- end of request mappings -->
 
     <!-- View Mappings -->
@@ -2601,7 +2622,7 @@
     <view-map name="EditProductStoreFinAccountSettings" type="screen" page="component://product/widget/catalog/StoreScreens.xml#EditProductStoreFinAccountSettings"/>    
     <view-map name="EditProductStoreVendorPayments" type="screen" page="component://product/widget/catalog/StoreScreens.xml#EditProductStoreVendorPayments"/>
     <view-map name="EditProductStoreVendorShipments" type="screen" page="component://product/widget/catalog/StoreScreens.xml#EditProductStoreVendorShipments"/>
-    
+    <view-map name="EditVendorProduct" type="screen" page="component://product/widget/catalog/ProductScreens.xml#EditVendorProduct"/>
     <view-map name="EditKeywordThesaurus" type="screen" page="component://product/widget/catalog/ThesaurusScreens.xml#EditKeywordThesaurus"/>
 
     <view-map name="pendingReviews" type="screen" page="component://product/widget/catalog/ReviewScreens.xml#pendingReviews"/>

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?rev=586665&r1=586664&r2=586665&view=diff
==============================================================================
--- ofbiz/trunk/applications/product/webapp/catalog/product/ProductForms.xml (original)
+++ ofbiz/trunk/applications/product/webapp/catalog/product/ProductForms.xml Fri Oct 19 21:39:32 2007
@@ -1530,6 +1530,27 @@
             </drop-down>
         </field>
         <field name="submitButton" title="${uiLabelMap.CommonAdd}"><submit button-type="button"/></field>
-    </form>   
+    </form>
+    
+    <!-- Vendor Product-->
+    <form name="ListVendorProducts" type="list" list-name="vendorProductList" target="deleteVendorProduct" paginate-target="EditVendorProduct">
+        <field name="productId"><hidden/></field>
+        <field name="vendorPartyId"><display/></field>
+        <field name="productStoreGroupId"><display/></field>
+        
+        <field name="submitButton" title="${uiLabelMap.CommonDelete}" widget-style="smallSubmit"><submit button-type="button"/></field>
+    </form>
+
+    <form name="EditVendorProduct" type="single" target="createVendorProduct">
+        <field name="productId"><hidden/></field>
+        <field name="vendorPartyId"><lookup target-form-name="LookupPartyName"/></field>
+        <field name="productStoreGroupId">
+            <drop-down current="selected" allow-empty="false">
+                <entity-options entity-name="ProductStoreGroup" key-field-name="productStoreGroupId" description="${description}"/>
+            </drop-down>
+        </field>
+        <field name="submitButton" title="${uiLabelMap.CommonAdd}" widget-style="smallSubmit"><submit button-type="button"/></field>
+    </form>
+    
  </forms>
  

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?rev=586665&r1=586664&r2=586665&view=diff
==============================================================================
--- ofbiz/trunk/applications/product/webapp/catalog/product/ProductTabBar.ftl (original)
+++ ofbiz/trunk/applications/product/webapp/catalog/product/ProductTabBar.ftl Fri Oct 19 21:39:32 2007
@@ -46,6 +46,8 @@
         <a href="<@o...@ofbizUrl>" class="${selectedClassMap.EditProductMeters?default(unselectedClassName)}">${uiLabelMap.ProductMeters}</a>
         <a href="<@o...@ofbizUrl>" class="${selectedClassMap.EditProductSubscriptionResources?default(unselectedClassName)}">${uiLabelMap.ProductSubscriptionResources}</a>
         <a href="<@o...@ofbizUrl>" class="${selectedClassMap.EditProductQuickAdmin?default(unselectedClassName)}">${uiLabelMap.ProductQuickAdmin}</a>
+        <a href="<@o...@ofbizUrl>" class="${selectedClassMap.EditVendorProduct?default(unselectedClassName)}">${uiLabelMap.PartyVendor}</a>
+
         <#if product?exists && product.isVirtual?if_exists == "Y">
             <a href="<@o...@ofbizUrl>" class="${selectedClassMap.QuickAddVariants?default(unselectedClassName)}">${uiLabelMap.ProductVariants}</a>
         </#if>

Modified: ofbiz/trunk/applications/product/widget/catalog/CatalogCommonScreens.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/widget/catalog/CatalogCommonScreens.xml?rev=586665&r1=586664&r2=586665&view=diff
==============================================================================
--- ofbiz/trunk/applications/product/widget/catalog/CatalogCommonScreens.xml (original)
+++ ofbiz/trunk/applications/product/widget/catalog/CatalogCommonScreens.xml Fri Oct 19 21:39:32 2007
@@ -51,6 +51,7 @@
     <screen name="CommonProductDecorator">
         <section>
             <actions>
+                <property-map resource="PartyUiLabels" map-name="uiLabelMap" global="true"/>
                 <set field="leftbarScreenName" value="leftbar"/>
                 <set field="leftbarScreenLocation" value="component://product/widget/catalog/CommonScreens.xml"/>
                 <set field="MainColumnStyle" value="leftonly"/>

Modified: ofbiz/trunk/applications/product/widget/catalog/ProductScreens.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/widget/catalog/ProductScreens.xml?rev=586665&r1=586664&r2=586665&view=diff
==============================================================================
--- ofbiz/trunk/applications/product/widget/catalog/ProductScreens.xml (original)
+++ ofbiz/trunk/applications/product/widget/catalog/ProductScreens.xml Fri Oct 19 21:39:32 2007
@@ -1007,4 +1007,31 @@
         </section>
     </screen>
     
+    <screen name="EditVendorProduct">
+        <section>
+            <actions>
+                <set field="titleProperty" value="PageTitleEditVendorProduct"/>
+                <set field="tabButtonItem" value="EditVendorProduct"/>
+                <set field="labelTitleProperty" value="PartyVendor"/>
+                
+                <set field="productId" from-field="parameters.productId"/>
+                <entity-condition entity-name="VendorProduct" list-name="vendorProductList">
+                    <condition-expr field-name="productId" env-name="productId"/>
+                </entity-condition>
+            </actions>
+            <widgets>
+                <decorator-screen name="CommonProductDecorator" location="${parameters.mainDecoratorLocation}">
+                    <decorator-section name="body">
+                        <container style="widget-container">
+                            <include-form name="ListVendorProducts" location="component://product/webapp/catalog/product/ProductForms.xml"/>
+                        </container>    
+                        <container style="widget-container">
+                            <include-form name="EditVendorProduct" location="component://product/webapp/catalog/product/ProductForms.xml"/>
+                        </container>    
+                    </decorator-section>
+                </decorator-screen>
+            </widgets>
+        </section>
+    </screen>
+    
 </screens>