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

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

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

hansbak-2
Author: hansbak
Date: Tue Apr  1 03:53:09 2008
New Revision: 643357

URL: http://svn.apache.org/viewvc?rev=643357&view=rev
Log:
add featurePrice and related screens and services for the upcoming feature selection on a product

Modified:
    ofbiz/trunk/applications/product/config/ProductUiLabels.xml
    ofbiz/trunk/applications/product/entitydef/entitygroup.xml
    ofbiz/trunk/applications/product/entitydef/entitymodel.xml
    ofbiz/trunk/applications/product/script/org/ofbiz/product/feature/ProductFeatureServices.xml
    ofbiz/trunk/applications/product/servicedef/services_feature.xml
    ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/controller.xml
    ofbiz/trunk/applications/product/webapp/catalog/feature/FeatureForms.xml
    ofbiz/trunk/applications/product/webapp/catalog/feature/FeatureTabBar.ftl
    ofbiz/trunk/applications/product/widget/catalog/FeatureScreens.xml

Modified: ofbiz/trunk/applications/product/config/ProductUiLabels.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/config/ProductUiLabels.xml?rev=643357&r1=643356&r2=643357&view=diff
==============================================================================
--- ofbiz/trunk/applications/product/config/ProductUiLabels.xml (original)
+++ ofbiz/trunk/applications/product/config/ProductUiLabels.xml Tue Apr  1 03:53:09 2008
@@ -4086,12 +4086,18 @@
     <property key="AddFeatureInteraction">
         <value xml:lang="en">Add Feature Interaction</value>
     </property>
+    <property key="PageTitleEditFeaturePrice">
+        <value xml:lang="en">Edit Feature Price</value>
+    </property>
+    <property key="PageTitleAddFeaturePrice">
+        <value xml:lang="en">Add Feature Price</value>
+    </property>
     <property key="ListFeatureInteractions">
         <value xml:lang="en">List Feature Interactions</value>
     </property>    
     <property key="PageTitleEditProductFeatureInteractions">
         <value xml:lang="en">Edit Product Feature Interactions</value>
-    </property>    
+    </property>
     <property key="PageTitleAddFeatureInterAction">
         <value xml:lang="en">Add Feature InterAction</value>
     </property>

Modified: ofbiz/trunk/applications/product/entitydef/entitygroup.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/entitydef/entitygroup.xml?rev=643357&r1=643356&r2=643357&view=diff
==============================================================================
--- ofbiz/trunk/applications/product/entitydef/entitygroup.xml (original)
+++ ofbiz/trunk/applications/product/entitydef/entitygroup.xml Tue Apr  1 03:53:09 2008
@@ -123,6 +123,7 @@
     <entity-group group="org.ofbiz" entity="ProductFeatureIactn" />
     <entity-group group="org.ofbiz" entity="ProductFeatureIactnType" />
     <entity-group group="org.ofbiz" entity="ProductFeatureType" />
+    <entity-group group="org.ofbiz" entity="FeaturePrice"/>
 
     <!-- ========================================================= -->
     <!-- org.ofbiz.product.inventory -->

Modified: ofbiz/trunk/applications/product/entitydef/entitymodel.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/entitydef/entitymodel.xml?rev=643357&r1=643356&r2=643357&view=diff
==============================================================================
--- ofbiz/trunk/applications/product/entitydef/entitymodel.xml (original)
+++ ofbiz/trunk/applications/product/entitydef/entitymodel.xml Tue Apr  1 03:53:09 2008
@@ -1527,7 +1527,42 @@
         <key-map field-name="parentTypeId" rel-field-name="productFeatureTypeId"/>
       </relation>
     </entity>
-
+  
+  <entity entity-name="FeaturePrice"
+    package-name="org.ofbiz.product.price"
+    title="Feature Price Entity">
+    <field name="productFeatureId" type="id-ne"></field>
+    <field name="productPriceTypeId" type="id-ne"></field>
+    <field name="currencyUomId" type="id"></field>
+    <field name="fromDate" type="date-time"></field>
+    <field name="thruDate" type="date-time"></field>
+    <field name="price" type="currency-precise"></field>
+    <field name="createdDate" type="date-time"></field>
+    <field name="createdByUserLogin" type="id-vlong"></field>
+    <field name="lastModifiedDate" type="date-time"></field>
+    <field name="lastModifiedByUserLogin" type="id-vlong"></field>
+    <prim-key field="productFeatureId"/>
+    <prim-key field="productPriceTypeId"/>
+    <prim-key field="currencyUomId"/>
+    <prim-key field="fromDate"/>
+    <relation type="one" fk-name="PROD_F_PRICE_TYPE" rel-entity-name="ProductPriceType">
+      <key-map field-name="productPriceTypeId"/>
+    </relation>
+    <relation type="one" fk-name="PROD_F_PRICE_CUOM" title="Currency" rel-entity-name="Uom">
+      <key-map field-name="currencyUomId" rel-field-name="uomId"/>
+    </relation>
+   <relation type="one" fk-name="PROD_F_PRICE_CBUL" title="CreatedBy" rel-entity-name="UserLogin">
+      <key-map field-name="createdByUserLogin" rel-field-name="userLoginId"/>
+    </relation>
+    <relation type="one" fk-name="PROD_F_PRICE_LMBUL" title="LastModifiedBy" rel-entity-name="UserLogin">
+      <key-map field-name="lastModifiedByUserLogin" rel-field-name="userLoginId"/>
+    </relation>
+    <index name="PRD_FT_PRC_GENLKP">
+      <index-field name="productFeatureId"/>
+      <index-field name="currencyUomId"/>
+    </index>
+  </entity>
+  
   <!-- ========================================================= -->
   <!-- org.ofbiz.product.inventory -->
   <!-- ========================================================= -->

Modified: ofbiz/trunk/applications/product/script/org/ofbiz/product/feature/ProductFeatureServices.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/script/org/ofbiz/product/feature/ProductFeatureServices.xml?rev=643357&r1=643356&r2=643357&view=diff
==============================================================================
--- ofbiz/trunk/applications/product/script/org/ofbiz/product/feature/ProductFeatureServices.xml (original)
+++ ofbiz/trunk/applications/product/script/org/ofbiz/product/feature/ProductFeatureServices.xml Tue Apr  1 03:53:09 2008
@@ -350,4 +350,46 @@
         <remove-value value-name="productFeatureApplAttr"/>
         <check-errors/>
     </simple-method>
+    
+    <!-- Feature Price Service -->
+    <simple-method method-name="createFeaturePrice" short-description="Create a Feature Price">
+        <make-value value-name="newEntity" entity-name="FeaturePrice"/>
+        <if-empty field-name="parameters.productFeatureId">
+            <sequenced-id-to-env sequence-name="FeaturePrice" env-name="parameters.productFeatureId"/>
+        </if-empty>
+        <set-nonpk-fields map-name="parameters" value-name="newEntity"/>
+        <set-pk-fields map-name="parameters" value-name="newEntity"/>
+        
+        <now-timestamp-to-env env-name="nowTimestamp"/>
+        
+        <if-empty field-name="fromDate" map-name="newEntity">
+            <set field="newEntity.fromDate" from-field="nowTimestamp" />
+        </if-empty>
+        <field-to-result field-name="fromDate" map-name="newEntity"/>
+        
+        <set field="newEntity.lastModifiedDate" from-field="nowTimestamp" />
+        <set field="newEntity.createdDate" from-field="nowTimestamp" />
+        <set field="newEntity.lastModifiedByUserLogin" from-field="userLogin.userLoginId" />
+        <set field="newEntity.createdByUserLogin" from-field="userLogin.userLoginId" />
+        
+        <create-value value-name="newEntity"/>
+    </simple-method>
+    <simple-method method-name="updateFeaturePrice" short-description="Update a feature price">
+        <entity-one entity-name="FeaturePrice" value-name="lookedUpValue"/>
+        
+        <set-nonpk-fields map-name="parameters" value-name="lookedUpValue"/>
+        
+        <now-timestamp-to-env env-name="nowTimestamp"/>
+        <set field="lookedUpValue.lastModifiedDate" from-field="nowTimestamp" />
+        <set field="lookedUpValue.lastModifiedByUserLogin" from-field="userLogin.userLoginId" />
+        
+        <store-value value-name="lookedUpValue"/>
+    </simple-method>
+    <simple-method method-name="deleteFeaturePrice" short-description="Delete a feature price">
+        <make-value entity-name="FeaturePrice" value-name="lookupPKMap"/>
+        <set-pk-fields map-name="parameters" value-name="lookupPKMap"/>
+        <find-by-primary-key entity-name="FeaturePrice" map-name="lookupPKMap" value-name="lookedUpValue"/>
+        
+        <remove-value value-name="lookedUpValue"/>
+    </simple-method>
 </simple-methods>

Modified: ofbiz/trunk/applications/product/servicedef/services_feature.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/servicedef/services_feature.xml?rev=643357&r1=643356&r2=643357&view=diff
==============================================================================
--- ofbiz/trunk/applications/product/servicedef/services_feature.xml (original)
+++ ofbiz/trunk/applications/product/servicedef/services_feature.xml Tue Apr  1 03:53:09 2008
@@ -244,4 +244,36 @@
         <auto-attributes include="pk" mode="IN" optional="false"/>
         <auto-attributes include="nonpk" mode="IN" optional="true"/>
     </service>
+    <!-- Feature Price Service -->
+    <service name="createFeaturePrice" engine="simple" default-entity-name="FeaturePrice"
+        location="org/ofbiz/product/feature/ProductFeatureServices.xml" invoke="createFeaturePrice" auth="true">
+        <description>Create a Feature Price</description>
+        <auto-attributes mode="IN" include="pk" optional="false"/>
+        <auto-attributes include="nonpk" mode="IN" optional="true">
+            <exclude field-name="createdDate"/>
+            <exclude field-name="createdByUserLogin"/>
+            <exclude field-name="lastModifiedDate"/>
+            <exclude field-name="lastModifiedByUserLogin"/>
+        </auto-attributes>
+        <override name="productFeatureId" mode="IN" optional="true"/>
+        <override name="fromDate" mode="INOUT" optional="true"/>
+        <override name="price" optional="false"/>
+    </service>
+    <service name="updateFeaturePrice" engine="simple" default-entity-name="FeaturePrice"
+        location="org/ofbiz/product/feature/ProductFeatureServices.xml" invoke="updateFeaturePrice" auth="true">
+        <description>Update a Feature Price</description>
+        <auto-attributes include="pk" mode="IN" optional="false"/>
+        <auto-attributes include="nonpk" mode="IN" optional="true">
+            <exclude field-name="createdDate"/>
+            <exclude field-name="createdByUserLogin"/>
+            <exclude field-name="lastModifiedDate"/>
+            <exclude field-name="lastModifiedByUserLogin"/>
+        </auto-attributes>
+        <override name="price" optional="false"/>
+    </service>
+    <service name="deleteFeaturePrice" engine="simple" default-entity-name="FeaturePrice"
+        location="org/ofbiz/product/feature/ProductFeatureServices.xml" invoke="deleteFeaturePrice" auth="true">
+        <description>Delete a Feature Price</description>
+        <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=643357&r1=643356&r2=643357&view=diff
==============================================================================
--- ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/controller.xml (original)
+++ ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/controller.xml Tue Apr  1 03:53:09 2008
@@ -1208,6 +1208,28 @@
         <security https="true" auth="true"/>
         <response name="success" type="view" value="EditFeatureCategories"/>
     </request-map>
+    <request-map uri="ListFeaturePrice">
+        <security https="true" auth="true"/>
+        <response name="success" type="view" value="ListFeaturePrice"/>
+    </request-map>
+    <request-map uri="createFeaturePrice">
+        <security https="true" auth="true"/>
+        <event type="service" invoke="createFeaturePrice"/>
+        <response name="success" type="view" value="ListFeaturePrice"/>
+        <response name="error" type="view" value="ListFeaturePrice"/>
+    </request-map>
+    <request-map uri="updateFeaturePrice">
+        <security https="true" auth="true"/>
+        <event type="service" invoke="updateFeaturePrice"/>
+        <response name="success" type="request-redirect-noparam" value="ListFeaturePrice"/>
+        <response name="error" type="view" value="ListFeaturePrice"/>
+    </request-map>
+    <request-map uri="deleteFeaturePrice">
+        <security https="true" auth="true"/>
+        <event type="service" invoke="deleteFeaturePrice"/>
+        <response name="success" type="view" value="ListFeaturePrice"/>
+        <response name="error" type="view" value="ListFeaturePrice"/>
+    </request-map>
     <!-- ================ Product Feature Requests ================= -->
     <request-map uri="EditProductFeatures">
         <security https="true" auth="true"/>
@@ -2590,6 +2612,7 @@
     <view-map name="EditFeatureInterAction" type="screen" page="component://product/widget/catalog/FeatureScreens.xml#EditFeatureInterAction"/>
     <view-map name="QuickAddProductFeatures" type="screen" page="component://product/widget/catalog/FeatureScreens.xml#QuickAddProductFeatures"/>
     <view-map name="CreateProductFeature" type="screen" page="component://product/widget/catalog/FeatureScreens.xml#CreateProductFeature"/>
+    <view-map name="ListFeaturePrice" type="screen" page="component://product/widget/catalog/FeatureScreens.xml#ListFeaturePrice"/>
     
     <view-map name="FindProdCatalog" type="screen" page="component://product/widget/catalog/CatalogScreens.xml#FindProdCatalog"/>
     <view-map name="EditProdCatalog" type="screen" page="component://product/widget/catalog/CatalogScreens.xml#EditProdCatalog"/>

Modified: ofbiz/trunk/applications/product/webapp/catalog/feature/FeatureForms.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/webapp/catalog/feature/FeatureForms.xml?rev=643357&r1=643356&r2=643357&view=diff
==============================================================================
--- ofbiz/trunk/applications/product/webapp/catalog/feature/FeatureForms.xml (original)
+++ ofbiz/trunk/applications/product/webapp/catalog/feature/FeatureForms.xml Tue Apr  1 03:53:09 2008
@@ -299,4 +299,45 @@
         <field name="submitButton" title="${uiLabelMap.CommonSubmit}" widget-style="smallSubmit"><submit button-type="button"/></field>
     
     </form>
+    <form name="ListFeaturePrice" type="list" paginate-target="ListFeaturePrice" target="updateFeaturePrice"
+        odd-row-style="alternate-row" default-table-style="basic-table">
+        <actions>
+            <entity-condition entity-name="FeaturePrice"/>
+        </actions>
+        <field name="productFeatureId"><hidden/></field>
+        <field name="productPriceTypeId" title="${uiLabelMap.ProductPriceType}"><display-entity entity-name="ProductPriceType"/></field>
+        <field name="currencyUomId" title="${uiLabelMap.ProductCurrency}"><display-entity entity-name="Uom" key-field-name="uomId" description="${description} [${uomId}]"/></field>
+        <field name="fromDate" title="${uiLabelMap.CommonFromDate}"><display/></field>
+        <field name="thruDate" title="${uiLabelMap.CommonThruDate}"><date-time default-value="${thruDate}"/></field>
+        <field name="price" title="${uiLabelMap.ProductPrice}" widget-style="required"><text size="25" default-value="${price}"/></field>
+        <field name="updateFeaturePrice" title="${uiLabelMap.CommonUpdate}" widget-style="smallSubmit"><submit button-type="button"/></field>
+        <field name="lastModifiedBy" title="${uiLabelMap.ProductLastModifiedBy}"><display description="[${lastModifiedByUserLogin}] ${uiLabelMap.CommonOn} ${lastModifiedDate}"/></field>
+        <field name="deleteFeaturePrice" title="${uiLabelMap.CommonDelete}" widget-style="buttontext">
+            <hyperlink target="deleteFeaturePrice?productFeatureId=${productFeatureId}&amp;productPriceTypeId=${productPriceTypeId}&amp;currencyUomId=${currencyUomId}&amp;fromDate=${fromDate}" description="${uiLabelMap.CommonDelete}" also-hidden="false"/>
+        </field>
+    </form>
+    <form name="CreateFeaturePrice" type="single" target="createFeaturePrice">
+        <actions>
+            <property-to-field field="defaultCurrencyUomId" resource="general" property="currency.uom.id.default" default="USD"/>
+        </actions>
+        <field name="productPriceTypeId" title="${uiLabelMap.ProductPriceType}">
+            <drop-down allow-empty="false" no-current-selected-key="DEFAULT_PRICE">
+                <entity-options entity-name="ProductPriceType" description="${description}">
+                    <entity-order-by field-name="description"/>
+                </entity-options>
+            </drop-down>
+        </field>
+        <field name="currencyUomId" title="${uiLabelMap.ProductCurrency}">
+            <drop-down allow-empty="false" no-current-selected-key="${defaultCurrencyUomId}">
+                <entity-options key-field-name="uomId" description="${abbreviation} - ${description}" entity-name="Uom">
+                    <entity-constraint name="uomTypeId" operator="equals" value="CURRENCY_MEASURE"/>
+                    <entity-order-by field-name="abbreviation"/>
+                </entity-options>
+            </drop-down>
+        </field>
+        <field name="fromDate" title="${uiLabelMap.CommonFromDate}"><date-time/></field>
+        <field name="thruDate" title="${uiLabelMap.CommonThruDate}"><date-time/></field>
+        <field name="price" title="${uiLabelMap.ProductPrice}" widget-style="required"><text size="25"/></field>
+        <field name="submitButton" title="${uiLabelMap.CommonCreate}" widget-style="smallSubmit"><submit button-type="button"/></field>
+    </form>
 </forms>

Modified: ofbiz/trunk/applications/product/webapp/catalog/feature/FeatureTabBar.ftl
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/webapp/catalog/feature/FeatureTabBar.ftl?rev=643357&r1=643356&r2=643357&view=diff
==============================================================================
--- ofbiz/trunk/applications/product/webapp/catalog/feature/FeatureTabBar.ftl (original)
+++ ofbiz/trunk/applications/product/webapp/catalog/feature/FeatureTabBar.ftl Tue Apr  1 03:53:09 2008
@@ -26,6 +26,7 @@
         <li><a href="<@ofbizUrl>EditFeatureCategories</@ofbizUrl>" class="${selectedClassMap.FeatureCategory?default(unselectedClassName)}">${uiLabelMap.ProductFeatureCategory}</a></li>
         <li><a href="<@ofbizUrl>EditFeatureGroups</@ofbizUrl>" class="${selectedClassMap.FeatureGroup?default(unselectedClassName)}">${uiLabelMap.ProductFeatureGroup}</a></li>
         <li><a href="<@ofbizUrl>EditFeatureInterActions</@ofbizUrl>" class="${selectedClassMap.FeatureInterAction?default(unselectedClassName)}">${uiLabelMap.ProductFeatureInteraction}</a></li>
+        <li><a href="<@ofbizUrl>ListFeaturePrice</@ofbizUrl>" class="${selectedClassMap.FeaturePrice?default(unselectedClassName)}">${uiLabelMap.FormFieldTitle_featurePrice}</a></li>
     </ul>
 </div>
 <br/>

Modified: ofbiz/trunk/applications/product/widget/catalog/FeatureScreens.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/widget/catalog/FeatureScreens.xml?rev=643357&r1=643356&r2=643357&view=diff
==============================================================================
--- ofbiz/trunk/applications/product/widget/catalog/FeatureScreens.xml (original)
+++ ofbiz/trunk/applications/product/widget/catalog/FeatureScreens.xml Tue Apr  1 03:53:09 2008
@@ -465,5 +465,68 @@
             </widgets>
         </section>
     </screen>
+    <screen name="ListFeaturePrice">
+        <section>
+            <actions>
+                <set field="titleProperty" value="PageTitleEditFeaturePrice"/>
+                <set field="headerItem" value="featurecats"/>
+                <set field="tabButtonItem" value="FeaturePrice"/>
+            </actions>
+            <widgets>
+                <decorator-screen name="CommonFeatureDecorator">
+                    <decorator-section name="body">
+                        <container style="screenlet">
+                            <container style="screenlet-title-bar">
+                                <container style="h3">
+                                    <label text="${uiLabelMap.PageTitleEditFeaturePrice}"/>
+                                </container>
+                            </container>
+                            <container style="screenlet-body">
+                                <section>
+                                    <widgets>
+                                        <include-form name="ListFeaturePrice" location="component://product/webapp/catalog/feature/FeatureForms.xml"/>
+                                    </widgets>
+                                </section>
+                            </container>
+                        </container>
+                        <container style="screenlet">
+                            <container style="screenlet-title-bar">
+                                <container style="h3">
+                                    <label text="${uiLabelMap.PageTitleAddFeaturePrice}"/>
+                                </container>
+                            </container>
+                            <container style="screenlet-body">
+                                <section>
+                                    <widgets>
+                                        <include-form name="CreateFeaturePrice" location="component://product/webapp/catalog/feature/FeatureForms.xml"/>
+                                    </widgets>
+                                </section>
+                            </container>
+                        </container>
+                    </decorator-section>
+                </decorator-screen>
+            </widgets>
+        </section>
+    </screen>
+    <screen name="CreateFeaturePrice">
+        <section>
+            <widgets>
+                <decorator-screen name="CommonFeatureDecorator">
+                    <decorator-section name="body">
+                        <container style="screenlet">
+                            <container style="screenlet-title-bar">
+                                <container style="h3">
+                                    <label text="${uiLabelMap.ProductQuickApplyFeature}"/>
+                                </container>
+                            </container>
+                            <container style="screenlet-body">
+                                <include-form name="CreateFeaturePrice" location="component://product/webapp/catalog/feature/FeatureForms.xml"/>
+                            </container>
+                        </container>
+                    </decorator-section>
+                </decorator-screen>
+            </widgets>
+        </section>
+    </screen>
 </screens>
 


Reply | Threaded
Open this post in threaded view
|

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

hans_bakker
now i see that we better user ProductFeaturePrice instead of
FeaturePrice....i will correct that.


On Tue, 2008-04-01 at 10:54 +0000, [hidden email] wrote:

> Author: hansbak
> Date: Tue Apr  1 03:53:09 2008
> New Revision: 643357
>
> URL: http://svn.apache.org/viewvc?rev=643357&view=rev
> Log:
> add featurePrice and related screens and services for the upcoming feature selection on a product
>
> Modified:
>     ofbiz/trunk/applications/product/config/ProductUiLabels.xml
>     ofbiz/trunk/applications/product/entitydef/entitygroup.xml
>     ofbiz/trunk/applications/product/entitydef/entitymodel.xml
>     ofbiz/trunk/applications/product/script/org/ofbiz/product/feature/ProductFeatureServices.xml
>     ofbiz/trunk/applications/product/servicedef/services_feature.xml
>     ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/controller.xml
>     ofbiz/trunk/applications/product/webapp/catalog/feature/FeatureForms.xml
>     ofbiz/trunk/applications/product/webapp/catalog/feature/FeatureTabBar.ftl
>     ofbiz/trunk/applications/product/widget/catalog/FeatureScreens.xml
>
> Modified: ofbiz/trunk/applications/product/config/ProductUiLabels.xml
> URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/config/ProductUiLabels.xml?rev=643357&r1=643356&r2=643357&view=diff
> ==============================================================================
> --- ofbiz/trunk/applications/product/config/ProductUiLabels.xml (original)
> +++ ofbiz/trunk/applications/product/config/ProductUiLabels.xml Tue Apr  1 03:53:09 2008
> @@ -4086,12 +4086,18 @@
>      <property key="AddFeatureInteraction">
>          <value xml:lang="en">Add Feature Interaction</value>
>      </property>
> +    <property key="PageTitleEditFeaturePrice">
> +        <value xml:lang="en">Edit Feature Price</value>
> +    </property>
> +    <property key="PageTitleAddFeaturePrice">
> +        <value xml:lang="en">Add Feature Price</value>
> +    </property>
>      <property key="ListFeatureInteractions">
>          <value xml:lang="en">List Feature Interactions</value>
>      </property>    
>      <property key="PageTitleEditProductFeatureInteractions">
>          <value xml:lang="en">Edit Product Feature Interactions</value>
> -    </property>    
> +    </property>
>      <property key="PageTitleAddFeatureInterAction">
>          <value xml:lang="en">Add Feature InterAction</value>
>      </property>
>
> Modified: ofbiz/trunk/applications/product/entitydef/entitygroup.xml
> URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/entitydef/entitygroup.xml?rev=643357&r1=643356&r2=643357&view=diff
> ==============================================================================
> --- ofbiz/trunk/applications/product/entitydef/entitygroup.xml (original)
> +++ ofbiz/trunk/applications/product/entitydef/entitygroup.xml Tue Apr  1 03:53:09 2008
> @@ -123,6 +123,7 @@
>      <entity-group group="org.ofbiz" entity="ProductFeatureIactn" />
>      <entity-group group="org.ofbiz" entity="ProductFeatureIactnType" />
>      <entity-group group="org.ofbiz" entity="ProductFeatureType" />
> +    <entity-group group="org.ofbiz" entity="FeaturePrice"/>
>  
>      <!-- ========================================================= -->
>      <!-- org.ofbiz.product.inventory -->
>
> Modified: ofbiz/trunk/applications/product/entitydef/entitymodel.xml
> URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/entitydef/entitymodel.xml?rev=643357&r1=643356&r2=643357&view=diff
> ==============================================================================
> --- ofbiz/trunk/applications/product/entitydef/entitymodel.xml (original)
> +++ ofbiz/trunk/applications/product/entitydef/entitymodel.xml Tue Apr  1 03:53:09 2008
> @@ -1527,7 +1527,42 @@
>          <key-map field-name="parentTypeId" rel-field-name="productFeatureTypeId"/>
>        </relation>
>      </entity>
> -
> +  
> +  <entity entity-name="FeaturePrice"
> +    package-name="org.ofbiz.product.price"
> +    title="Feature Price Entity">
> +    <field name="productFeatureId" type="id-ne"></field>
> +    <field name="productPriceTypeId" type="id-ne"></field>
> +    <field name="currencyUomId" type="id"></field>
> +    <field name="fromDate" type="date-time"></field>
> +    <field name="thruDate" type="date-time"></field>
> +    <field name="price" type="currency-precise"></field>
> +    <field name="createdDate" type="date-time"></field>
> +    <field name="createdByUserLogin" type="id-vlong"></field>
> +    <field name="lastModifiedDate" type="date-time"></field>
> +    <field name="lastModifiedByUserLogin" type="id-vlong"></field>
> +    <prim-key field="productFeatureId"/>
> +    <prim-key field="productPriceTypeId"/>
> +    <prim-key field="currencyUomId"/>
> +    <prim-key field="fromDate"/>
> +    <relation type="one" fk-name="PROD_F_PRICE_TYPE" rel-entity-name="ProductPriceType">
> +      <key-map field-name="productPriceTypeId"/>
> +    </relation>
> +    <relation type="one" fk-name="PROD_F_PRICE_CUOM" title="Currency" rel-entity-name="Uom">
> +      <key-map field-name="currencyUomId" rel-field-name="uomId"/>
> +    </relation>
> +   <relation type="one" fk-name="PROD_F_PRICE_CBUL" title="CreatedBy" rel-entity-name="UserLogin">
> +      <key-map field-name="createdByUserLogin" rel-field-name="userLoginId"/>
> +    </relation>
> +    <relation type="one" fk-name="PROD_F_PRICE_LMBUL" title="LastModifiedBy" rel-entity-name="UserLogin">
> +      <key-map field-name="lastModifiedByUserLogin" rel-field-name="userLoginId"/>
> +    </relation>
> +    <index name="PRD_FT_PRC_GENLKP">
> +      <index-field name="productFeatureId"/>
> +      <index-field name="currencyUomId"/>
> +    </index>
> +  </entity>
> +  
>    <!-- ========================================================= -->
>    <!-- org.ofbiz.product.inventory -->
>    <!-- ========================================================= -->
>
> Modified: ofbiz/trunk/applications/product/script/org/ofbiz/product/feature/ProductFeatureServices.xml
> URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/script/org/ofbiz/product/feature/ProductFeatureServices.xml?rev=643357&r1=643356&r2=643357&view=diff
> ==============================================================================
> --- ofbiz/trunk/applications/product/script/org/ofbiz/product/feature/ProductFeatureServices.xml (original)
> +++ ofbiz/trunk/applications/product/script/org/ofbiz/product/feature/ProductFeatureServices.xml Tue Apr  1 03:53:09 2008
> @@ -350,4 +350,46 @@
>          <remove-value value-name="productFeatureApplAttr"/>
>          <check-errors/>
>      </simple-method>
> +    
> +    <!-- Feature Price Service -->
> +    <simple-method method-name="createFeaturePrice" short-description="Create a Feature Price">
> +        <make-value value-name="newEntity" entity-name="FeaturePrice"/>
> +        <if-empty field-name="parameters.productFeatureId">
> +            <sequenced-id-to-env sequence-name="FeaturePrice" env-name="parameters.productFeatureId"/>
> +        </if-empty>
> +        <set-nonpk-fields map-name="parameters" value-name="newEntity"/>
> +        <set-pk-fields map-name="parameters" value-name="newEntity"/>
> +        
> +        <now-timestamp-to-env env-name="nowTimestamp"/>
> +        
> +        <if-empty field-name="fromDate" map-name="newEntity">
> +            <set field="newEntity.fromDate" from-field="nowTimestamp" />
> +        </if-empty>
> +        <field-to-result field-name="fromDate" map-name="newEntity"/>
> +        
> +        <set field="newEntity.lastModifiedDate" from-field="nowTimestamp" />
> +        <set field="newEntity.createdDate" from-field="nowTimestamp" />
> +        <set field="newEntity.lastModifiedByUserLogin" from-field="userLogin.userLoginId" />
> +        <set field="newEntity.createdByUserLogin" from-field="userLogin.userLoginId" />
> +        
> +        <create-value value-name="newEntity"/>
> +    </simple-method>
> +    <simple-method method-name="updateFeaturePrice" short-description="Update a feature price">
> +        <entity-one entity-name="FeaturePrice" value-name="lookedUpValue"/>
> +        
> +        <set-nonpk-fields map-name="parameters" value-name="lookedUpValue"/>
> +        
> +        <now-timestamp-to-env env-name="nowTimestamp"/>
> +        <set field="lookedUpValue.lastModifiedDate" from-field="nowTimestamp" />
> +        <set field="lookedUpValue.lastModifiedByUserLogin" from-field="userLogin.userLoginId" />
> +        
> +        <store-value value-name="lookedUpValue"/>
> +    </simple-method>
> +    <simple-method method-name="deleteFeaturePrice" short-description="Delete a feature price">
> +        <make-value entity-name="FeaturePrice" value-name="lookupPKMap"/>
> +        <set-pk-fields map-name="parameters" value-name="lookupPKMap"/>
> +        <find-by-primary-key entity-name="FeaturePrice" map-name="lookupPKMap" value-name="lookedUpValue"/>
> +        
> +        <remove-value value-name="lookedUpValue"/>
> +    </simple-method>
>  </simple-methods>
>
> Modified: ofbiz/trunk/applications/product/servicedef/services_feature.xml
> URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/servicedef/services_feature.xml?rev=643357&r1=643356&r2=643357&view=diff
> ==============================================================================
> --- ofbiz/trunk/applications/product/servicedef/services_feature.xml (original)
> +++ ofbiz/trunk/applications/product/servicedef/services_feature.xml Tue Apr  1 03:53:09 2008
> @@ -244,4 +244,36 @@
>          <auto-attributes include="pk" mode="IN" optional="false"/>
>          <auto-attributes include="nonpk" mode="IN" optional="true"/>
>      </service>
> +    <!-- Feature Price Service -->
> +    <service name="createFeaturePrice" engine="simple" default-entity-name="FeaturePrice"
> +        location="org/ofbiz/product/feature/ProductFeatureServices.xml" invoke="createFeaturePrice" auth="true">
> +        <description>Create a Feature Price</description>
> +        <auto-attributes mode="IN" include="pk" optional="false"/>
> +        <auto-attributes include="nonpk" mode="IN" optional="true">
> +            <exclude field-name="createdDate"/>
> +            <exclude field-name="createdByUserLogin"/>
> +            <exclude field-name="lastModifiedDate"/>
> +            <exclude field-name="lastModifiedByUserLogin"/>
> +        </auto-attributes>
> +        <override name="productFeatureId" mode="IN" optional="true"/>
> +        <override name="fromDate" mode="INOUT" optional="true"/>
> +        <override name="price" optional="false"/>
> +    </service>
> +    <service name="updateFeaturePrice" engine="simple" default-entity-name="FeaturePrice"
> +        location="org/ofbiz/product/feature/ProductFeatureServices.xml" invoke="updateFeaturePrice" auth="true">
> +        <description>Update a Feature Price</description>
> +        <auto-attributes include="pk" mode="IN" optional="false"/>
> +        <auto-attributes include="nonpk" mode="IN" optional="true">
> +            <exclude field-name="createdDate"/>
> +            <exclude field-name="createdByUserLogin"/>
> +            <exclude field-name="lastModifiedDate"/>
> +            <exclude field-name="lastModifiedByUserLogin"/>
> +        </auto-attributes>
> +        <override name="price" optional="false"/>
> +    </service>
> +    <service name="deleteFeaturePrice" engine="simple" default-entity-name="FeaturePrice"
> +        location="org/ofbiz/product/feature/ProductFeatureServices.xml" invoke="deleteFeaturePrice" auth="true">
> +        <description>Delete a Feature Price</description>
> +        <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=643357&r1=643356&r2=643357&view=diff
> ==============================================================================
> --- ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/controller.xml (original)
> +++ ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/controller.xml Tue Apr  1 03:53:09 2008
> @@ -1208,6 +1208,28 @@
>          <security https="true" auth="true"/>
>          <response name="success" type="view" value="EditFeatureCategories"/>
>      </request-map>
> +    <request-map uri="ListFeaturePrice">
> +        <security https="true" auth="true"/>
> +        <response name="success" type="view" value="ListFeaturePrice"/>
> +    </request-map>
> +    <request-map uri="createFeaturePrice">
> +        <security https="true" auth="true"/>
> +        <event type="service" invoke="createFeaturePrice"/>
> +        <response name="success" type="view" value="ListFeaturePrice"/>
> +        <response name="error" type="view" value="ListFeaturePrice"/>
> +    </request-map>
> +    <request-map uri="updateFeaturePrice">
> +        <security https="true" auth="true"/>
> +        <event type="service" invoke="updateFeaturePrice"/>
> +        <response name="success" type="request-redirect-noparam" value="ListFeaturePrice"/>
> +        <response name="error" type="view" value="ListFeaturePrice"/>
> +    </request-map>
> +    <request-map uri="deleteFeaturePrice">
> +        <security https="true" auth="true"/>
> +        <event type="service" invoke="deleteFeaturePrice"/>
> +        <response name="success" type="view" value="ListFeaturePrice"/>
> +        <response name="error" type="view" value="ListFeaturePrice"/>
> +    </request-map>
>      <!-- ================ Product Feature Requests ================= -->
>      <request-map uri="EditProductFeatures">
>          <security https="true" auth="true"/>
> @@ -2590,6 +2612,7 @@
>      <view-map name="EditFeatureInterAction" type="screen" page="component://product/widget/catalog/FeatureScreens.xml#EditFeatureInterAction"/>
>      <view-map name="QuickAddProductFeatures" type="screen" page="component://product/widget/catalog/FeatureScreens.xml#QuickAddProductFeatures"/>
>      <view-map name="CreateProductFeature" type="screen" page="component://product/widget/catalog/FeatureScreens.xml#CreateProductFeature"/>
> +    <view-map name="ListFeaturePrice" type="screen" page="component://product/widget/catalog/FeatureScreens.xml#ListFeaturePrice"/>
>      
>      <view-map name="FindProdCatalog" type="screen" page="component://product/widget/catalog/CatalogScreens.xml#FindProdCatalog"/>
>      <view-map name="EditProdCatalog" type="screen" page="component://product/widget/catalog/CatalogScreens.xml#EditProdCatalog"/>
>
> Modified: ofbiz/trunk/applications/product/webapp/catalog/feature/FeatureForms.xml
> URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/webapp/catalog/feature/FeatureForms.xml?rev=643357&r1=643356&r2=643357&view=diff
> ==============================================================================
> --- ofbiz/trunk/applications/product/webapp/catalog/feature/FeatureForms.xml (original)
> +++ ofbiz/trunk/applications/product/webapp/catalog/feature/FeatureForms.xml Tue Apr  1 03:53:09 2008
> @@ -299,4 +299,45 @@
>          <field name="submitButton" title="${uiLabelMap.CommonSubmit}" widget-style="smallSubmit"><submit button-type="button"/></field>
>      
>      </form>
> +    <form name="ListFeaturePrice" type="list" paginate-target="ListFeaturePrice" target="updateFeaturePrice"
> +        odd-row-style="alternate-row" default-table-style="basic-table">
> +        <actions>
> +            <entity-condition entity-name="FeaturePrice"/>
> +        </actions>
> +        <field name="productFeatureId"><hidden/></field>
> +        <field name="productPriceTypeId" title="${uiLabelMap.ProductPriceType}"><display-entity entity-name="ProductPriceType"/></field>
> +        <field name="currencyUomId" title="${uiLabelMap.ProductCurrency}"><display-entity entity-name="Uom" key-field-name="uomId" description="${description} [${uomId}]"/></field>
> +        <field name="fromDate" title="${uiLabelMap.CommonFromDate}"><display/></field>
> +        <field name="thruDate" title="${uiLabelMap.CommonThruDate}"><date-time default-value="${thruDate}"/></field>
> +        <field name="price" title="${uiLabelMap.ProductPrice}" widget-style="required"><text size="25" default-value="${price}"/></field>
> +        <field name="updateFeaturePrice" title="${uiLabelMap.CommonUpdate}" widget-style="smallSubmit"><submit button-type="button"/></field>
> +        <field name="lastModifiedBy" title="${uiLabelMap.ProductLastModifiedBy}"><display description="[${lastModifiedByUserLogin}] ${uiLabelMap.CommonOn} ${lastModifiedDate}"/></field>
> +        <field name="deleteFeaturePrice" title="${uiLabelMap.CommonDelete}" widget-style="buttontext">
> +            <hyperlink target="deleteFeaturePrice?productFeatureId=${productFeatureId}&amp;productPriceTypeId=${productPriceTypeId}&amp;currencyUomId=${currencyUomId}&amp;fromDate=${fromDate}" description="${uiLabelMap.CommonDelete}" also-hidden="false"/>
> +        </field>
> +    </form>
> +    <form name="CreateFeaturePrice" type="single" target="createFeaturePrice">
> +        <actions>
> +            <property-to-field field="defaultCurrencyUomId" resource="general" property="currency.uom.id.default" default="USD"/>
> +        </actions>
> +        <field name="productPriceTypeId" title="${uiLabelMap.ProductPriceType}">
> +            <drop-down allow-empty="false" no-current-selected-key="DEFAULT_PRICE">
> +                <entity-options entity-name="ProductPriceType" description="${description}">
> +                    <entity-order-by field-name="description"/>
> +                </entity-options>
> +            </drop-down>
> +        </field>
> +        <field name="currencyUomId" title="${uiLabelMap.ProductCurrency}">
> +            <drop-down allow-empty="false" no-current-selected-key="${defaultCurrencyUomId}">
> +                <entity-options key-field-name="uomId" description="${abbreviation} - ${description}" entity-name="Uom">
> +                    <entity-constraint name="uomTypeId" operator="equals" value="CURRENCY_MEASURE"/>
> +                    <entity-order-by field-name="abbreviation"/>
> +                </entity-options>
> +            </drop-down>
> +        </field>
> +        <field name="fromDate" title="${uiLabelMap.CommonFromDate}"><date-time/></field>
> +        <field name="thruDate" title="${uiLabelMap.CommonThruDate}"><date-time/></field>
> +        <field name="price" title="${uiLabelMap.ProductPrice}" widget-style="required"><text size="25"/></field>
> +        <field name="submitButton" title="${uiLabelMap.CommonCreate}" widget-style="smallSubmit"><submit button-type="button"/></field>
> +    </form>
>  </forms>
>
> Modified: ofbiz/trunk/applications/product/webapp/catalog/feature/FeatureTabBar.ftl
> URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/webapp/catalog/feature/FeatureTabBar.ftl?rev=643357&r1=643356&r2=643357&view=diff
> ==============================================================================
> --- ofbiz/trunk/applications/product/webapp/catalog/feature/FeatureTabBar.ftl (original)
> +++ ofbiz/trunk/applications/product/webapp/catalog/feature/FeatureTabBar.ftl Tue Apr  1 03:53:09 2008
> @@ -26,6 +26,7 @@
>          <li><a href="<@ofbizUrl>EditFeatureCategories</@ofbizUrl>" class="${selectedClassMap.FeatureCategory?default(unselectedClassName)}">${uiLabelMap.ProductFeatureCategory}</a></li>
>          <li><a href="<@ofbizUrl>EditFeatureGroups</@ofbizUrl>" class="${selectedClassMap.FeatureGroup?default(unselectedClassName)}">${uiLabelMap.ProductFeatureGroup}</a></li>
>          <li><a href="<@ofbizUrl>EditFeatureInterActions</@ofbizUrl>" class="${selectedClassMap.FeatureInterAction?default(unselectedClassName)}">${uiLabelMap.ProductFeatureInteraction}</a></li>
> +        <li><a href="<@ofbizUrl>ListFeaturePrice</@ofbizUrl>" class="${selectedClassMap.FeaturePrice?default(unselectedClassName)}">${uiLabelMap.FormFieldTitle_featurePrice}</a></li>
>      </ul>
>  </div>
>  <br/>
>
> Modified: ofbiz/trunk/applications/product/widget/catalog/FeatureScreens.xml
> URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/widget/catalog/FeatureScreens.xml?rev=643357&r1=643356&r2=643357&view=diff
> ==============================================================================
> --- ofbiz/trunk/applications/product/widget/catalog/FeatureScreens.xml (original)
> +++ ofbiz/trunk/applications/product/widget/catalog/FeatureScreens.xml Tue Apr  1 03:53:09 2008
> @@ -465,5 +465,68 @@
>              </widgets>
>          </section>
>      </screen>
> +    <screen name="ListFeaturePrice">
> +        <section>
> +            <actions>
> +                <set field="titleProperty" value="PageTitleEditFeaturePrice"/>
> +                <set field="headerItem" value="featurecats"/>
> +                <set field="tabButtonItem" value="FeaturePrice"/>
> +            </actions>
> +            <widgets>
> +                <decorator-screen name="CommonFeatureDecorator">
> +                    <decorator-section name="body">
> +                        <container style="screenlet">
> +                            <container style="screenlet-title-bar">
> +                                <container style="h3">
> +                                    <label text="${uiLabelMap.PageTitleEditFeaturePrice}"/>
> +                                </container>
> +                            </container>
> +                            <container style="screenlet-body">
> +                                <section>
> +                                    <widgets>
> +                                        <include-form name="ListFeaturePrice" location="component://product/webapp/catalog/feature/FeatureForms.xml"/>
> +                                    </widgets>
> +                                </section>
> +                            </container>
> +                        </container>
> +                        <container style="screenlet">
> +                            <container style="screenlet-title-bar">
> +                                <container style="h3">
> +                                    <label text="${uiLabelMap.PageTitleAddFeaturePrice}"/>
> +                                </container>
> +                            </container>
> +                            <container style="screenlet-body">
> +                                <section>
> +                                    <widgets>
> +                                        <include-form name="CreateFeaturePrice" location="component://product/webapp/catalog/feature/FeatureForms.xml"/>
> +                                    </widgets>
> +                                </section>
> +                            </container>
> +                        </container>
> +                    </decorator-section>
> +                </decorator-screen>
> +            </widgets>
> +        </section>
> +    </screen>
> +    <screen name="CreateFeaturePrice">
> +        <section>
> +            <widgets>
> +                <decorator-screen name="CommonFeatureDecorator">
> +                    <decorator-section name="body">
> +                        <container style="screenlet">
> +                            <container style="screenlet-title-bar">
> +                                <container style="h3">
> +                                    <label text="${uiLabelMap.ProductQuickApplyFeature}"/>
> +                                </container>
> +                            </container>
> +                            <container style="screenlet-body">
> +                                <include-form name="CreateFeaturePrice" location="component://product/webapp/catalog/feature/FeatureForms.xml"/>
> +                            </container>
> +                        </container>
> +                    </decorator-section>
> +                </decorator-screen>
> +            </widgets>
> +        </section>
> +    </screen>
>  </screens>
>  
>
>
>
--
AntWebsystems.com: Quality OFBiz services for competitive rates.....