You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by as...@apache.org on 2010/02/25 11:19:02 UTC

svn commit: r916219 - in /ofbiz/trunk: applications/party/config/ applications/party/data/ applications/party/script/org/ofbiz/party/party/ applications/party/script/org/ofbiz/party/user/ applications/party/servicedef/ applications/party/webapp/partymg...

Author: ashish
Date: Thu Feb 25 10:19:02 2010
New Revision: 916219

URL: http://svn.apache.org/viewvc?rev=916219&view=rev
Log:
Applied patch from jira issue OFBIZ-3508 - 

When we create a new customer profile, it doesn't send correct mail according to "UPD_PRSNL_INF_CNFRM", "PARTY_REGIS_CONFIRM" and "RDS_CUST_REGISTER" emailType. Currently it grabs the first from the list of ProductStoreEmailSetting entity and uses it's email settings to send the email.
It was due to unavailability of productStoreId for sending mail so whenever new customer profile will be created it should be associated to certain product store and its role type will be "CUSTOMER".

Apart from this customer profile page should have information about associated product stores.

Following points are covered:
   1.  Improved patch from OFBIZ-3000.
   2. Improved Product Store Roles screens.
   3. Added ProductStores portlet into party profile screen.
   4. Created updateProductStoreRole service for updating ProductStoreRole record.
   5. Removed EditProductStoreRoles.groovy and EditProductStoreRoles.ftl .

Thanks to Amit Sharma for the contribution.

Added:
    ofbiz/trunk/applications/party/webapp/partymgr/party/profileblocks/ProductStores.ftl   (with props)
    ofbiz/trunk/applications/product/widget/catalog/StoreForms.xml   (with props)
Removed:
    ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/actions/store/EditProductStoreRoles.groovy
    ofbiz/trunk/applications/product/webapp/catalog/store/EditProductStoreRoles.ftl
Modified:
    ofbiz/trunk/applications/party/config/PartyUiLabels.xml
    ofbiz/trunk/applications/party/data/PartyPortletData.xml
    ofbiz/trunk/applications/party/script/org/ofbiz/party/party/PartyServices.xml
    ofbiz/trunk/applications/party/script/org/ofbiz/party/user/UserEvents.xml
    ofbiz/trunk/applications/party/servicedef/services.xml
    ofbiz/trunk/applications/party/widget/partymgr/PartyForms.xml
    ofbiz/trunk/applications/party/widget/partymgr/ProfileScreens.xml
    ofbiz/trunk/applications/product/config/ProductUiLabels.xml
    ofbiz/trunk/applications/product/script/org/ofbiz/product/store/ProductStoreServices.xml
    ofbiz/trunk/applications/product/servicedef/services_store.xml
    ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/controller.xml
    ofbiz/trunk/applications/product/widget/catalog/CatalogMenus.xml
    ofbiz/trunk/applications/product/widget/catalog/StoreScreens.xml
    ofbiz/trunk/specialpurpose/ecommerce/script/org/ofbiz/ecommerce/customer/CustomerEvents.xml

Modified: ofbiz/trunk/applications/party/config/PartyUiLabels.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/party/config/PartyUiLabels.xml?rev=916219&r1=916218&r2=916219&view=diff
==============================================================================
--- ofbiz/trunk/applications/party/config/PartyUiLabels.xml (original)
+++ ofbiz/trunk/applications/party/config/PartyUiLabels.xml Thu Feb 25 10:19:02 2010
@@ -7551,6 +7551,9 @@
         <value xml:lang="th">ไม่พบข้อมูลวิธีการจ่ายเงินบนไฟล์</value>
         <value xml:lang="zh">没有存档的支付方式信息。</value>
     </property>
+    <property key="PartyNoProductStoreFoundForThisParty">
+        <value xml:lang="en">No product store(s) found for this party.</value>
+    </property>
     <property key="PartyNoServerHitsFound">
         <value xml:lang="de">Keine Server Hits für diesen Webseiten Besuch gefunden</value>
         <value xml:lang="en">No Server Hits found for this Visit</value>

Modified: ofbiz/trunk/applications/party/data/PartyPortletData.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/party/data/PartyPortletData.xml?rev=916219&r1=916218&r2=916219&view=diff
==============================================================================
--- ofbiz/trunk/applications/party/data/PartyPortletData.xml (original)
+++ ofbiz/trunk/applications/party/data/PartyPortletData.xml Thu Feb 25 10:19:02 2010
@@ -105,6 +105,12 @@
         description="Visits of a certain party"
         screenshot="/images/portlets/Visits.png"/>
     <PortletPortletCategory portalPortletId="Visits" portletCategoryId="PROFILE"/>
+    
+    <PortalPortlet portalPortletId="ProductStores" portletName="ProductStores"
+        screenName="ProductStores"
+        screenLocation="component://party/widget/partymgr/ProfileScreens.xml"
+        description="ProductStores of a certain party"/>
+    <PortletPortletCategory portalPortletId="ProductStores" portletCategoryId="PROFILE"/>
 
     <PortalPortlet portalPortletId="contact" portletName="Contact"
         screenName="Contact"
@@ -152,6 +158,6 @@
     <PortalPagePortlet portalPageId="PartyProfile" portalPortletId="Content" portletSeqId="00001" columnSeqId="00002" sequenceNum="5"/>
     <PortalPagePortlet portalPageId="PartyProfile" portalPortletId="Notes" portletSeqId="00001" columnSeqId="00002" sequenceNum="6"/>
     <PortalPagePortlet portalPageId="PartyProfile" portalPortletId="Visits" portletSeqId="00001" columnSeqId="00002" sequenceNum="7"/>
-
+    <PortalPagePortlet portalPageId="PartyProfile" portalPortletId="ProductStores" portletSeqId="00001" columnSeqId="00002" sequenceNum="8"/>
 
 </entity-engine-xml>

Modified: ofbiz/trunk/applications/party/script/org/ofbiz/party/party/PartyServices.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/party/script/org/ofbiz/party/party/PartyServices.xml?rev=916219&r1=916218&r2=916219&view=diff
==============================================================================
--- ofbiz/trunk/applications/party/script/org/ofbiz/party/party/PartyServices.xml (original)
+++ ofbiz/trunk/applications/party/script/org/ofbiz/party/party/PartyServices.xml Thu Feb 25 10:19:02 2010
@@ -955,12 +955,14 @@
     <simple-method method-name="sendCreatePartyEmailNotification" short-description="Notification email on party creation" login-required="false">
         <map-to-map map="parameters" to-map="bodyParameters"/>
         <set field="emailType" value="PARTY_REGIS_CONFIRM"/>
-        <entity-condition entity-name="ProductStoreEmailSetting" list="productStoreEmailSettings">
-            <condition-list>
-                <condition-expr field-name="emailType" operator="equals" from-field="emailType"/>
-            </condition-list>
-        </entity-condition>
-        <first-from-list entry="storeEmail" list="productStoreEmailSettings"/>
+        <set field="productStoreId" from-field="parameters.productStoreId" />
+        <if-empty field="productStoreId">
+            <log level="warning" message="No productStoreId specified."/>
+        </if-empty>
+        <entity-one entity-name="ProductStoreEmailSetting" value-field="storeEmail">
+            <field-map field-name="emailType"/>
+            <field-map field-name="productStoreId"/>
+        </entity-one>
         <entity-and list="webSites" entity-name="WebSite">
             <field-map field-name="productStoreId" from-field="storeEmail.productStoreId"/>
         </entity-and>
@@ -986,12 +988,14 @@
     <!-- send personal information update email notification -->
     <simple-method method-name="sendUpdatePersonalInfoEmailNotification" short-description="Send the Notification email on personal information updation" login-required="false">
         <map-to-map map="parameters" to-map="bodyParameters"/>
-        <entity-condition entity-name="ProductStoreEmailSetting" list="productStoreEmailSettings">
-            <condition-list>
-                <condition-expr field-name="emailType" operator="equals" value="UPD_PRSNL_INF_CNFRM"/>
-            </condition-list>
-        </entity-condition>
-        <first-from-list entry="storeEmail" list="productStoreEmailSettings"/>
+        <set field="productStoreId" from-field="parameters.productStoreId" />
+        <if-empty field="productStoreId">
+            <log level="warning" message="No productStoreId specified."/>
+        </if-empty>
+        <entity-one entity-name="ProductStoreEmailSetting" value-field="storeEmail">
+            <field-map field-name="emailType" value="UPD_PRSNL_INF_CNFRM"/>
+            <field-map field-name="productStoreId"/>
+        </entity-one>
         <entity-and list="webSites" entity-name="WebSite">
             <field-map field-name="productStoreId" from-field="storeEmail.productStoreId"/>
         </entity-and>

Modified: ofbiz/trunk/applications/party/script/org/ofbiz/party/user/UserEvents.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/party/script/org/ofbiz/party/user/UserEvents.xml?rev=916219&r1=916218&r2=916219&view=diff
==============================================================================
--- ofbiz/trunk/applications/party/script/org/ofbiz/party/user/UserEvents.xml (original)
+++ ofbiz/trunk/applications/party/script/org/ofbiz/party/user/UserEvents.xml Thu Feb 25 10:19:02 2010
@@ -394,8 +394,19 @@
         <!-- set the partyId in the request -->
         <field-to-request field="tempMap.partyId" request-name="partyId"/>
 
+        <!-- Associated to Product Store -->
+        <entity-one entity-name="UserLogin" value-field="userLogin">
+            <field-map field-name="userLoginId" value="system"/>
+        </entity-one>
+        <set field="createProductStoreRoleMap.userLogin" from-field="userLogin"/>
+        <set field="createProductStoreRoleMap.partyId" from-field="tempMap.partyId"/>
+        <set field="createProductStoreRoleMap.roleTypeId" from-field="parameters.roleTypeId"/>
+        <set field="createProductStoreRoleMap.productStoreId" from-field="parameters.PRODUCT_STORE_ID"/>
+        <call-service service-name="createProductStoreRole" in-map-name="createProductStoreRoleMap"/>
+
         <!--send New User Email Notification-->
         <set field="emailContext.partyId" from-field="partyId"/>
+        <set field="emailContext.productStoreId" from-field="parameters.PRODUCT_STORE_ID"/>
         <set-service-fields service-name="sendCreatePartyEmailNotification" map="emailContext" to-map="serviceInMap"/>
         <call-service service-name="sendCreatePartyEmailNotification" in-map-name="serviceInMap"/>
     </simple-method>

Modified: ofbiz/trunk/applications/party/servicedef/services.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/party/servicedef/services.xml?rev=916219&r1=916218&r2=916219&view=diff
==============================================================================
--- ofbiz/trunk/applications/party/servicedef/services.xml (original)
+++ ofbiz/trunk/applications/party/servicedef/services.xml Thu Feb 25 10:19:02 2010
@@ -1053,11 +1053,13 @@
             location="component://party/script/org/ofbiz/party/party/PartyServices.xml" invoke="sendUpdatePersonalInfoEmailNotification" auth="false">
         <attribute name="partyId" type="String" mode="IN" optional="true"/>
         <attribute name="updatedUserLogin" type="org.ofbiz.entity.GenericValue" mode="IN" optional="true"/>
+        <attribute name="productStoreId" type="String" mode="IN" optional="true"/>
     </service>
     <service name="sendCreatePartyEmailNotification" engine="simple"
             location="component://party/script/org/ofbiz/party/party/PartyServices.xml" invoke="sendCreatePartyEmailNotification" auth="false">
         <attribute name="partyId" type="String" mode="IN" optional="false"/>
         <attribute name="emailAddress" type="String" mode="IN" optional="false"/>
+        <attribute name="productStoreId" type="String" mode="IN" optional="false"/>
     </service>
 
     <!-- Email address verification services-->

Added: ofbiz/trunk/applications/party/webapp/partymgr/party/profileblocks/ProductStores.ftl
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/party/webapp/partymgr/party/profileblocks/ProductStores.ftl?rev=916219&view=auto
==============================================================================
--- ofbiz/trunk/applications/party/webapp/partymgr/party/profileblocks/ProductStores.ftl (added)
+++ ofbiz/trunk/applications/party/webapp/partymgr/party/profileblocks/ProductStores.ftl Thu Feb 25 10:19:02 2010
@@ -0,0 +1,49 @@
+<#--
+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.
+-->
+
+<div id="partyProductStores" class="screenlet">
+  <div class="screenlet-title-bar">
+    <ul>
+      <li class="h3">${uiLabelMap.ProductStores}</li>
+    </ul>
+    <br class="clear" />
+  </div>
+  <div class="screenlet-body">
+    <#if productStoreRoles?has_content>
+      <table class="basic-table" cellspacing="0">
+        <tr class="header-row">
+          <td>${uiLabelMap.ProductStoreNameId}</td>
+          <td>${uiLabelMap.PartyRoleType}</td>
+        </tr>
+        <#list productStoreRoles as productStoreRole>
+          <#assign productStore = delegator.findOne("ProductStore", {"productStoreId" : productStoreRole.productStoreId}, true) />
+          <#assign roleType = delegator.findOne("RoleType", {"roleTypeId" : productStoreRole.roleTypeId}, true) />
+          <tr>
+            <td class="button-col">
+              <a href="/catalog/control/FindProductStoreRoles?partyId=${productStoreRole.partyId}&productStoreId=${productStore.productStoreId}">${productStore.storeName?default("${uiLabelMap.ProductNoDescription}")} (${productStore.productStoreId})</a>
+            </td>
+            <td>${roleType.description?if_exists}</td>
+          </tr>
+        </#list>
+      </table>
+    <#else>
+      ${uiLabelMap.PartyNoProductStoreFoundForThisParty}
+    </#if>
+  </div>
+</div>
\ No newline at end of file

Propchange: ofbiz/trunk/applications/party/webapp/partymgr/party/profileblocks/ProductStores.ftl
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: ofbiz/trunk/applications/party/webapp/partymgr/party/profileblocks/ProductStores.ftl
------------------------------------------------------------------------------
    svn:keywords = Date Rev Author URL Id

Propchange: ofbiz/trunk/applications/party/webapp/partymgr/party/profileblocks/ProductStores.ftl
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Modified: ofbiz/trunk/applications/party/widget/partymgr/PartyForms.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/party/widget/partymgr/PartyForms.xml?rev=916219&r1=916218&r2=916219&view=diff
==============================================================================
--- ofbiz/trunk/applications/party/widget/partymgr/PartyForms.xml (original)
+++ ofbiz/trunk/applications/party/widget/partymgr/PartyForms.xml Thu Feb 25 10:19:02 2010
@@ -465,6 +465,14 @@
         <field use-when="displayPassword!=null" name="CONFIRM_PASSWORD" title="${uiLabelMap.CommonPassword}" tooltip="* ${uiLabelMap.CommonConfirm}" widget-style="required"><password size="15" maxlength="250"/></field>
         <field name="USERNAME" title="${uiLabelMap.CommonUsername}" tooltip="* ${uiLabelMap.PartyTemporaryPassword}"><text size="30" maxlength="250"/></field>
         <!--<field name="RequiredNote" title="${uiLabelMap.CommonEmptyHeader}"><display description="${uiLabelMap.PartyRequiredNote}" also-hidden="false"/></field> -->
+
+        <field name="PRODUCT_STORE_ID" title="Product Store" tooltip="${uiLabelMap.CommonRequired}" widget-style="required">
+            <drop-down>
+                <entity-options entity-name="ProductStore" key-field-name="productStoreId" description="${storeName} (${productStoreId})">
+                    <entity-order-by field-name="productStoreId"/>
+                </entity-options>
+            </drop-down>
+        </field>
         <field name="submitButton" title="${uiLabelMap.CommonSave}" widget-style="smallSubmit"><submit button-type="text-link"/></field>
     </form>
 

Modified: ofbiz/trunk/applications/party/widget/partymgr/ProfileScreens.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/party/widget/partymgr/ProfileScreens.xml?rev=916219&r1=916218&r2=916219&view=diff
==============================================================================
--- ofbiz/trunk/applications/party/widget/partymgr/ProfileScreens.xml (original)
+++ ofbiz/trunk/applications/party/widget/partymgr/ProfileScreens.xml Thu Feb 25 10:19:02 2010
@@ -588,4 +588,22 @@
         </section>
     </screen>
 
+    <screen name="ProductStores">
+        <section>
+            <actions>
+                <set field="partyId" from-field="parameters.partyId" default-value="${userLogin.partyId}"/>
+                <entity-and entity-name="ProductStoreRole" list="productStoreRoles" filter-by-date="true">
+                    <field-map field-name="partyId" from-field="partyId"/>
+                    <order-by field-name="-fromDate"/>
+                </entity-and>
+            </actions>
+            <widgets>
+                <platform-specific>
+                    <html>
+                        <html-template location="component://party/webapp/partymgr/party/profileblocks/ProductStores.ftl"/>
+                    </html>
+                </platform-specific>
+            </widgets>
+        </section>
+    </screen>
 </screens>

Modified: ofbiz/trunk/applications/product/config/ProductUiLabels.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/config/ProductUiLabels.xml?rev=916219&r1=916218&r2=916219&view=diff
==============================================================================
--- ofbiz/trunk/applications/product/config/ProductUiLabels.xml (original)
+++ ofbiz/trunk/applications/product/config/ProductUiLabels.xml Thu Feb 25 10:19:02 2010
@@ -6000,6 +6000,9 @@
         <value xml:lang="it">Ricerca prodotti in stock</value>
         <value xml:lang="zh">查找产品存货</value>
     </property>
+    <property key="PageTitleFindProductStoreRoles">
+        <value xml:lang="en">Find Product Store Roles</value>
+    </property>
     <property key="PageTitleFindShipmentGatewayConfig">
         <value xml:lang="en">Find Shipment Gateway Config</value>
         <value xml:lang="it">Ricerca configurazione gateway spedizione</value>

Modified: ofbiz/trunk/applications/product/script/org/ofbiz/product/store/ProductStoreServices.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/script/org/ofbiz/product/store/ProductStoreServices.xml?rev=916219&r1=916218&r2=916219&view=diff
==============================================================================
--- ofbiz/trunk/applications/product/script/org/ofbiz/product/store/ProductStoreServices.xml (original)
+++ ofbiz/trunk/applications/product/script/org/ofbiz/product/store/ProductStoreServices.xml Thu Feb 25 10:19:02 2010
@@ -272,6 +272,16 @@
 
         <create-value value-field="newEntity"/>
     </simple-method>
+    <simple-method method-name="updateProductStoreRole" short-description="Update a ProductStoreRole">
+        <check-permission permission="CATALOG" action="_UPDATE"><fail-message message="Security Error: to run updateProductStoreRole you must have the CATALOG_UPDATE or CATALOG_ADMIN permission"/></check-permission>
+        <check-errors/>
+
+        <make-value value-field="lookupPKMap" entity-name="ProductStoreRole"/>
+        <set-pk-fields map="parameters" value-field="lookupPKMap"/>
+        <find-by-primary-key map="lookupPKMap" value-field="lookedUpValue"/>
+        <set-nonpk-fields map="parameters" value-field="lookedUpValue"/>
+        <store-value value-field="lookedUpValue"/>
+    </simple-method>
     <simple-method method-name="removeProductStoreRole" short-description="Remove ProductStoreRole">
         <check-permission permission="CATALOG" action="_DELETE"><fail-message message="Security Error: to run removeProductStoreRole you must have the CATALOG_DELETE or CATALOG_ADMIN permission"/></check-permission>
         <check-errors/>

Modified: ofbiz/trunk/applications/product/servicedef/services_store.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/servicedef/services_store.xml?rev=916219&r1=916218&r2=916219&view=diff
==============================================================================
--- ofbiz/trunk/applications/product/servicedef/services_store.xml (original)
+++ ofbiz/trunk/applications/product/servicedef/services_store.xml Thu Feb 25 10:19:02 2010
@@ -90,6 +90,12 @@
         <auto-attributes include="nonpk" mode="IN" optional="true"/>
         <override name="fromDate" optional="true"/>
     </service>
+    <service name="updateProductStoreRole" default-entity-name="ProductStoreRole" engine="simple"
+            location="component://product/script/org/ofbiz/product/store/ProductStoreServices.xml" invoke="updateProductStoreRole" auth="true">
+        <description>Update a Product Store Role</description>
+        <auto-attributes include="pk" mode="IN" optional="false"/>
+        <auto-attributes include="nonpk" mode="IN" optional="true"/>
+    </service>
     <service name="removeProductStoreRole" default-entity-name="ProductStoreRole" engine="simple"
             location="component://product/script/org/ofbiz/product/store/ProductStoreServices.xml" invoke="removeProductStoreRole" auth="true">
         <description>Remove ProductStoreRole</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?rev=916219&r1=916218&r2=916219&view=diff
==============================================================================
--- ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/controller.xml (original)
+++ ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/controller.xml Thu Feb 25 10:19:02 2010
@@ -1953,21 +1953,27 @@
     </request-map>
 
     <!-- ================ ProductStore Role Requests ================= -->
-    <request-map uri="EditProductStoreRoles">
+    <request-map uri="FindProductStoreRoles">
         <security https="true" auth="true"/>
-        <response name="success" type="view" value="EditProductStoreRoles"/>
+        <response name="success" type="view" value="FindProductStoreRoles"/>
     </request-map>
     <request-map uri="storeCreateRole">
         <security https="true" auth="true"/>
         <event type="service" invoke="createProductStoreRole"/>
-        <response name="success" type="view" value="EditProductStoreRoles"/>
-        <response name="error" type="view" value="EditProductStoreRoles"/>
+        <response name="success" type="view" value="FindProductStoreRoles"/>
+        <response name="error" type="view" value="FindProductStoreRoles"/>
+    </request-map>
+    <request-map uri="storeUpdateRole">
+        <security https="true" auth="true"/>
+        <event type="service" invoke="updateProductStoreRole"/>
+        <response name="success" type="view" value="FindProductStoreRoles"/>
+        <response name="error" type="view" value="FindProductStoreRoles"/>
     </request-map>
     <request-map uri="storeRemoveRole">
         <security https="true" auth="true"/>
         <event type="service" invoke="removeProductStoreRole"/>
-        <response name="success" type="view" value="EditProductStoreRoles"/>
-        <response name="error" type="view" value="EditProductStoreRoles"/>
+        <response name="success" type="view" value="FindProductStoreRoles"/>
+        <response name="error" type="view" value="FindProductStoreRoles"/>
     </request-map>
 
     <!-- ================ ProductStore Payment Requests ================= -->
@@ -2771,7 +2777,7 @@
 
     <view-map name="FindProductStore" type="screen" page="component://product/widget/catalog/StoreScreens.xml#FindProductStore"/>
     <view-map name="EditProductStore" type="screen" page="component://product/widget/catalog/StoreScreens.xml#EditProductStore"/>
-    <view-map name="EditProductStoreRoles" type="screen" page="component://product/widget/catalog/StoreScreens.xml#EditProductStoreRoles"/>
+    <view-map name="FindProductStoreRoles" type="screen" page="component://product/widget/catalog/StoreScreens.xml#FindProductStoreRoles"/>
     <view-map name="EditProductStoreEmails" type="screen" page="component://product/widget/catalog/StoreScreens.xml#EditProductStoreEmails"/>
     <view-map name="EditProductStorePromos" type="screen" page="component://product/widget/catalog/StoreScreens.xml#EditProductStorePromos"/>
     <view-map name="EditProductStoreCatalogs" type="screen" page="component://product/widget/catalog/StoreScreens.xml#EditProductStoreCatalogs"/>

Modified: ofbiz/trunk/applications/product/widget/catalog/CatalogMenus.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/widget/catalog/CatalogMenus.xml?rev=916219&r1=916218&r2=916219&view=diff
==============================================================================
--- ofbiz/trunk/applications/product/widget/catalog/CatalogMenus.xml (original)
+++ ofbiz/trunk/applications/product/widget/catalog/CatalogMenus.xml Thu Feb 25 10:19:02 2010
@@ -112,8 +112,8 @@
                 <parameter param-name="productStoreId"/>
             </link>
         </menu-item>
-        <menu-item name="EditProductStoreRoles" title="${uiLabelMap.PartyRoles}">
-            <link target="EditProductStoreRoles">
+        <menu-item name="FindProductStoreRoles" title="${uiLabelMap.PartyRoles}">
+            <link target="FindProductStoreRoles">
                 <parameter param-name="productStoreId"/>
             </link>
         </menu-item>

Added: ofbiz/trunk/applications/product/widget/catalog/StoreForms.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/widget/catalog/StoreForms.xml?rev=916219&view=auto
==============================================================================
--- ofbiz/trunk/applications/product/widget/catalog/StoreForms.xml (added)
+++ ofbiz/trunk/applications/product/widget/catalog/StoreForms.xml Thu Feb 25 10:19:02 2010
@@ -0,0 +1,102 @@
+<?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.
+-->
+
+<forms xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
+        xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/widget-form.xsd">
+
+    <form name="FindProductStoreRole" type="single" target="FindProductStoreRoles" default-entity-name="ProductStoreRole">
+        <field name="noConditionFind"><hidden value="Y"/><!-- if this isn't there then with all fields empty no query will be done --></field>
+        <field name="productStoreId" title="${uiLabelMap.ProductStoreId}"><hidden/></field>
+        <field name="partyId" title="${uiLabelMap.PartyPartyId}"><lookup target-form-name="LookupPartyName"/></field>
+        <field name="roleTypeId" title="${uiLabelMap.PartyRoleTypeId}">
+            <drop-down allow-empty="true">
+                <entity-options description="${description}" entity-name="RoleType" key-field-name="roleTypeId"/>
+            </drop-down>
+        </field>
+        <field name="fromDate" position="1"><date-time/></field>
+        <field name="thruDate" position="2"><date-time/></field>
+        <field name="sequenceNum"><text/></field>
+        <field name="searchButton" title="${uiLabelMap.CommonFind}" widget-style="smallSubmit"><submit button-type="button"/></field>
+    </form>
+
+    <form name="ListProductStoreRole" type="list" list-name="listIt" paginate-target="FindProductStoreRoles" default-entity-name="ProductStoreRole" separate-columns="true"
+        odd-row-style="alternate-row" header-row-style="header-row-2" default-table-style="basic-table hover-bar">
+        <actions>
+            <service service-name="performFind" result-map="result" result-map-list="listIt">
+                <field-map field-name="inputFields" from-field="parameters"/>
+                <field-map field-name="entityName" value="ProductStoreRole"/>
+                <field-map field-name="orderBy" from-field="parameters.sortField"/>
+                <field-map field-name="viewIndex" from-field="viewIndex"/>
+                <field-map field-name="viewSize" from-field="viewSize"/>
+            </service>
+        </actions>
+        <field name="partyId" title="${uiLabelMap.PartyPartyId}">
+            <display-entity entity-name="PartyNameView" key-field-name="partyId" description="${groupName}${lastName},${firstName}">
+                <sub-hyperlink target="/partymgr/control/viewprofile" target-type="inter-app" description="[${partyId}]" >
+                    <parameter param-name="partyId"/>
+                </sub-hyperlink>
+            </display-entity>
+        </field>
+        <field name="roleTypeId" title="${uiLabelMap.PartyRoleTypeId}"><display-entity entity-name="RoleType"/></field>
+        <field name="fromDate"><display/></field>
+        <field name="thruDate"><display/></field>
+        <field name="sequenceNum"><display/></field>
+        <field name="editLink" widget-style="buttontext" title="${uiLabelMap.CommonEdit}">
+           <hyperlink target="FindProductStoreRoles" description="${uiLabelMap.CommonEdit}">
+                <parameter param-name="partyId"/>
+                <parameter param-name="productStoreId"/>
+                <parameter param-name="roleTypeId"/>
+                <parameter param-name="fromDate"/>
+            </hyperlink>
+        </field>
+        <field name="deleteLink" widget-style="buttontext" title="${uiLabelMap.CommonDelete}">
+            <hyperlink target="storeRemoveRole" description="${uiLabelMap.CommonDelete}">
+                <parameter param-name="partyId"/>
+                <parameter param-name="productStoreId"/>
+                <parameter param-name="roleTypeId"/>
+                <parameter param-name="fromDate"/>
+            </hyperlink>
+        </field>
+    </form>
+
+    <form name="EditProductStoreRole" type="single" target="storeUpdateRole" default-map-name="productStoreRole"
+            header-row-style="header-row" default-table-style="basic-table">
+        <alt-target use-when="productStoreRole==null" target="storeCreateRole"/>
+        <field name="partyId" use-when="productStoreRole==null" title="${uiLabelMap.PartyPartyId}" tooltip="${uiLabelMap.CommonRequired}"><lookup target-form-name="LookupPartyName"/></field>
+        <field name="partyId" use-when="productStoreRole!=null" title="${uiLabelMap.PartyPartyId}"><display/></field>
+        <field name="productStoreId"><hidden/></field>
+        <field name="roleTypeId" use-when="productStoreRole==null" title="${uiLabelMap.PartyRoleTypeId}" tooltip="${uiLabelMap.CommonRequired}">
+            <drop-down allow-empty="true">
+                <entity-options description="${description}" entity-name="RoleType" key-field-name="roleTypeId"/>
+            </drop-down>
+        </field>
+        <field name="roleTypeId" use-when="productStoreRole!=null" title="${uiLabelMap.PartyRoleTypeId}"><display-entity entity-name="RoleType"/></field>
+        <field name="fromDate" use-when="productStoreRole==null" title="${uiLabelMap.CommonFromDate}"><date-time/></field>
+        <field name="fromDate" use-when="productStoreRole!=null" title="${uiLabelMap.CommonFromDate}"><display/></field>
+        <field name="thruDate"><date-time/></field>
+        <field name="sequenceNum"><text/></field>
+        <field name="submitButton" title="${uiLabelMap.CommonAdd}" use-when="productStoreRole==null" widget-style="smallSubmit">
+            <submit button-type="button"/>
+        </field>
+        <field name="submitButton" title="${uiLabelMap.CommonSubmit}" use-when="productStoreRole!=null" widget-style="smallSubmit">
+            <submit button-type="button"/>
+        </field>
+    </form>
+</forms>

Propchange: ofbiz/trunk/applications/product/widget/catalog/StoreForms.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: ofbiz/trunk/applications/product/widget/catalog/StoreForms.xml
------------------------------------------------------------------------------
    svn:keywords = Date Rev Author URL Id

Propchange: ofbiz/trunk/applications/product/widget/catalog/StoreForms.xml
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Modified: ofbiz/trunk/applications/product/widget/catalog/StoreScreens.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/widget/catalog/StoreScreens.xml?rev=916219&r1=916218&r2=916219&view=diff
==============================================================================
--- ofbiz/trunk/applications/product/widget/catalog/StoreScreens.xml (original)
+++ ofbiz/trunk/applications/product/widget/catalog/StoreScreens.xml Thu Feb 25 10:19:02 2010
@@ -70,25 +70,32 @@
             </widgets>
        </section>
     </screen>
-    <screen name="EditProductStoreRoles">
+    <screen name="FindProductStoreRoles">
        <section>
             <actions>
-                <set field="titleProperty" value="PageTitleEditProductStoreRoles"/>
+                <set field="titleProperty" value="PageTitleFindProductStoreRoles"/>
                 <set field="headerItem" value="store"/>
-                <set field="tabButtonItem" value="EditProductStoreRoles"/>
+                <set field="tabButtonItem" value="FindProductStoreRoles"/>
                 <set field="labelTitleProperty" value="ProductProductStoreRoles"/>
-
                 <set field="productStoreId" from-field="parameters.productStoreId"/>
-                <entity-one entity-name="ProductStore" value-field="productStore" auto-field-map="true"/>
-
-                <script location="component://product/webapp/catalog/WEB-INF/actions/store/EditProductStoreRoles.groovy"/>
+                <set field="parameters.fromDate" from-field="parameters.fromDate" type="Timestamp"/>
+                <entity-one entity-name="ProductStoreRole" value-field="productStoreRole" auto-field-map="true"/>
+                <set field="parameters.productStoreId" value="${groovy:parameters.noConditionFind==null || parameters.noConditionFind=='N'?'':parameters.productStoreId}"/>
             </actions>
             <widgets>
                 <decorator-screen name="CommonProductStoreDecorator" location="${parameters.mainDecoratorLocation}">
                     <decorator-section name="body">
-                        <platform-specific>
-                            <html><html-template location="component://product/webapp/catalog/store/EditProductStoreRoles.ftl"/></html>
-                        </platform-specific>
+                        <screenlet title="${uiLabelMap.PageTitleEditProductStoreRoles}">
+                            <include-form name="EditProductStoreRole" location="component://product/widget/catalog/StoreForms.xml"/>
+                        </screenlet>
+                        <decorator-screen name="FindScreenDecorator" location="component://common/widget/CommonScreens.xml">
+                            <decorator-section name="search-options">
+                                <include-form name="FindProductStoreRole" location="component://product/widget/catalog/StoreForms.xml"/>
+                            </decorator-section>
+                            <decorator-section name="search-results">
+                                <include-form name="ListProductStoreRole" location="component://product/widget/catalog/StoreForms.xml"/>
+                            </decorator-section>
+                        </decorator-screen>
                     </decorator-section>
                 </decorator-screen>
             </widgets>

Modified: ofbiz/trunk/specialpurpose/ecommerce/script/org/ofbiz/ecommerce/customer/CustomerEvents.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/ecommerce/script/org/ofbiz/ecommerce/customer/CustomerEvents.xml?rev=916219&r1=916218&r2=916219&view=diff
==============================================================================
--- ofbiz/trunk/specialpurpose/ecommerce/script/org/ofbiz/ecommerce/customer/CustomerEvents.xml (original)
+++ ofbiz/trunk/specialpurpose/ecommerce/script/org/ofbiz/ecommerce/customer/CustomerEvents.xml Thu Feb 25 10:19:02 2010
@@ -406,6 +406,16 @@
             ]]></call-bsh>
         </if-compare>
 
+        <!-- Associated to Product Store -->
+        <entity-one entity-name="UserLogin" value-field="userLogin">
+            <field-map field-name="userLoginId" value="system"/>
+        </entity-one>
+        <set field="createProductStoreRoleMap.userLogin" from-field="userLogin"/>
+        <set field="createProductStoreRoleMap.partyId" from-field="tempMap.partyId"/>
+        <set field="createProductStoreRoleMap.roleTypeId" from-field="parameters.roleTypeId"/>
+        <set field="createProductStoreRoleMap.productStoreId" from-field="parameters.emailProductStoreId"/>
+        <call-service service-name="createProductStoreRole" in-map-name="createProductStoreRoleMap"/>
+
         <!-- send off the registration email -->
         <if-not-empty field="emailContext.emailAddress">
             <set from-field="parameters.emailProductStoreId" field="storeEmailLookup.productStoreId"/>
@@ -1158,7 +1168,17 @@
         <call-service service-name="createPartyTelecomNumber" in-map-name="billToTelecomNumberCtx">
             <result-to-field result-name="contactMechId" field="billToTelecomContactMechId"/>
         </call-service>
+        <!-- Associated to Product Store -->
+        <entity-one entity-name="UserLogin" value-field="userLogin">
+            <field-map field-name="userLoginId" value="system"/>
+        </entity-one>
+        <set field="createProductStoreRoleMap.userLogin" from-field="userLogin"/>
+        <set field="createProductStoreRoleMap.partyId" from-field="parameters.partyId"/>
+        <set field="createProductStoreRoleMap.roleTypeId" from-field="parameters.roleTypeId"/>
+        <set field="createProductStoreRoleMap.productStoreId" from-field="parameters.productStoreId"/>
+        <call-service service-name="createProductStoreRole" in-map-name="createProductStoreRoleMap"/>
 
+        <set field="emailAddressCtx.productStoreId" from-field="parameters.productStoreId"/>
         <set-service-fields service-name="sendCreatePartyEmailNotification" map="emailAddressCtx" to-map="serviceInMap"/>
         <call-service-asynch service-name="sendCreatePartyEmailNotification" in-map-name="serviceInMap"/>
      </simple-method>