svn commit: r651848 - in /ofbiz/trunk/applications: marketing/config/ marketing/data/ marketing/script/org/ofbiz/sfa/lead/ marketing/servicedef/ marketing/webapp/sfa/ marketing/webapp/sfa/WEB-INF/ marketing/webapp/sfa/lead/ marketing/widget/sfa/ party/...

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

svn commit: r651848 - in /ofbiz/trunk/applications: marketing/config/ marketing/data/ marketing/script/org/ofbiz/sfa/lead/ marketing/servicedef/ marketing/webapp/sfa/ marketing/webapp/sfa/WEB-INF/ marketing/webapp/sfa/lead/ marketing/widget/sfa/ party/...

apatel-2
Author: apatel
Date: Sat Apr 26 12:15:00 2008
New Revision: 651848

URL: http://svn.apache.org/viewvc?rev=651848&view=rev
Log:
New events and services and Forms for adding leads. Thanks Mridul Pathak, Jyotsna Rathore, Sumit Pandit, Rathnesh, Awdesh Parihar and others for helping.

Added:
    ofbiz/trunk/applications/marketing/script/org/ofbiz/sfa/lead/
    ofbiz/trunk/applications/marketing/script/org/ofbiz/sfa/lead/LeadServices.xml   (with props)
    ofbiz/trunk/applications/marketing/webapp/sfa/findSfaParty.ftl   (with props)
    ofbiz/trunk/applications/marketing/webapp/sfa/lead/
    ofbiz/trunk/applications/marketing/webapp/sfa/lead/LeadForms.xml   (with props)
    ofbiz/trunk/applications/marketing/widget/sfa/LeadScreens.xml   (with props)
Modified:
    ofbiz/trunk/applications/marketing/config/MarketingUiLabels.xml
    ofbiz/trunk/applications/marketing/data/MarketingTypeData.xml
    ofbiz/trunk/applications/marketing/servicedef/services.xml
    ofbiz/trunk/applications/marketing/webapp/sfa/WEB-INF/controller.xml
    ofbiz/trunk/applications/marketing/widget/sfa/CommonScreens.xml
    ofbiz/trunk/applications/marketing/widget/sfa/SfaMenus.xml
    ofbiz/trunk/applications/party/config/PartyUiLabels.xml
    ofbiz/trunk/applications/party/script/org/ofbiz/party/party/PartySimpleMethods.xml

Modified: ofbiz/trunk/applications/marketing/config/MarketingUiLabels.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/marketing/config/MarketingUiLabels.xml?rev=651848&r1=651847&r2=651848&view=diff
==============================================================================
--- ofbiz/trunk/applications/marketing/config/MarketingUiLabels.xml (original)
+++ ofbiz/trunk/applications/marketing/config/MarketingUiLabels.xml Sat Apr 26 12:15:00 2008
@@ -1125,11 +1125,23 @@
     <property key="SfaCompetitors">
         <value xml:lang="en">Competitors &amp; Partners </value>
     </property>
+    <property key="SfaLeadGroup">
+        <value xml:lang="en">Lead Group</value>
+    </property>
+    <property key="SfaLeadPerson">
+        <value xml:lang="en">Lead Person</value>
+    </property>
+    <property key="SfaLeadSource">
+        <value xml:lang="en">Lead Source</value>
+    </property>
     <property key="SfaDocuments">
         <value xml:lang="en">Documents</value>
     </property>
     <property key="SfaEvents">
         <value xml:lang="en">Events</value>
+    </property>
+    <property key="SfaFindLeads">
+        <value xml:lang="en">Find Leads</value>
     </property>
     <property key="SfaForecasts">
         <value xml:lang="en">Forecast</value>

Modified: ofbiz/trunk/applications/marketing/data/MarketingTypeData.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/marketing/data/MarketingTypeData.xml?rev=651848&r1=651847&r2=651848&view=diff
==============================================================================
--- ofbiz/trunk/applications/marketing/data/MarketingTypeData.xml (original)
+++ ofbiz/trunk/applications/marketing/data/MarketingTypeData.xml Sat Apr 26 12:15:00 2008
@@ -58,4 +58,6 @@
     <EnumerationType description="Tracking Code Source" enumTypeId="TRACKINGCODE_SRC" hasTable="N" parentTypeId=""/>
     <Enumeration description="Cookie" enumCode="COOKIE" enumId="TKCDSRC_COOKIE" sequenceId="01" enumTypeId="TRACKINGCODE_SRC"/>
     <Enumeration description="URL Parameter" enumCode="URL_PARAM" enumId="TKCDSRC_URL_PARAM" sequenceId="01" enumTypeId="TRACKINGCODE_SRC"/>  
+
+    <DataSourceType dataSourceTypeId="LEAD_SOURCE" description="Lead Source"/>
 </entity-engine-xml>

Added: ofbiz/trunk/applications/marketing/script/org/ofbiz/sfa/lead/LeadServices.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/marketing/script/org/ofbiz/sfa/lead/LeadServices.xml?rev=651848&view=auto
==============================================================================
--- ofbiz/trunk/applications/marketing/script/org/ofbiz/sfa/lead/LeadServices.xml (added)
+++ ofbiz/trunk/applications/marketing/script/org/ofbiz/sfa/lead/LeadServices.xml Sat Apr 26 12:15:00 2008
@@ -0,0 +1,67 @@
+<?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.
+-->
+
+<simple-methods xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+    xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/simple-methods.xsd">
+
+    <simple-method method-name="createLead"  short-description="create Lead Person or Lead Group">
+        <if-not-empty field-name="parameters.leadType">
+            <set field="leadType" from-field="parameters.leadType"/>
+            <else>
+                <set field="leadType" value="PERSON"/>
+            </else>
+        </if-not-empty>
+    
+        <set field="parameters.roleTypeId" value="LEAD"/>
+        <if-compare field-name="leadType" operator="equals" value="PERSON">
+            <call-simple-method method-name="createPersonRoleAndContactMechs" xml-resource="org/ofbiz/party/party/PartySimpleMethods.xml"/>
+        
+            <if-not-empty field-name="parameters.partyIdFrom">
+                <set field="partyRelationshipContext.partyIdFrom" from-field="parameters.partyIdFrom"/>
+                <set field="partyRelationshipContext.partyIdTo" from-field="partyId"/>
+                <set field="partyRelationshipContext.roleTypeIdFrom" value="LEAD"/>
+                <set field="partyRelationshipContext.roleTypeIdTo" value="LEAD"/>
+                <set field="partyRelationshipContext.partyRelationshipTypeId" value="GROUP_ROLLUP"/>
+                <call-service service-name="createPartyRelationship" in-map-name="partyRelationshipContext"/>
+            </if-not-empty>
+        </if-compare>
+    
+        <if-compare field-name="leadType" operator="equals" value="GROUP">
+            <call-simple-method method-name="createPartyGroupRoleAndContactMechs" xml-resource="org/ofbiz/party/party/PartySimpleMethods.xml"/>
+        </if-compare>
+    
+        <if-not-empty field-name="parameters.leadSource">
+            <make-value entity-name="DataSource" value-name="dataSource"/>
+            <sequenced-id-to-env sequence-name="DataSource" env-name="dataSourceId"/>
+            <set field="dataSource.dataSourceId" from-field="dataSourceId"/>
+            <set field="dataSource.dataSourceTypeId" value="LEAD_SOURCE"/>
+            <set field="dataSource.description" from-field="parameters.leadSource"/>
+            <create-value value-name="dataSource"/>
+        
+            <make-value entity-name="PartyDataSource" value-name="partyDataSource"/>
+            <set field="partyDataSource.partyId" from-field="partyId"/>
+            <set field="partyDataSource.dataSourceId" from-field="dataSourceId"/>
+            <now-timestamp-to-env env-name="nowTimestamp"/>
+            <set field="partyDataSource.fromDate" from-field="nowTimestamp"/>
+            <set field="partyDataSource.isCreate" value="Y"/>
+            <create-value value-name="partyDataSource"/>
+        </if-not-empty>
+    </simple-method>
+</simple-methods>

Propchange: ofbiz/trunk/applications/marketing/script/org/ofbiz/sfa/lead/LeadServices.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: ofbiz/trunk/applications/marketing/script/org/ofbiz/sfa/lead/LeadServices.xml
------------------------------------------------------------------------------
    svn:keywords = Date Rev Author URL Id

Propchange: ofbiz/trunk/applications/marketing/script/org/ofbiz/sfa/lead/LeadServices.xml
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Modified: ofbiz/trunk/applications/marketing/servicedef/services.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/marketing/servicedef/services.xml?rev=651848&r1=651847&r2=651848&view=diff
==============================================================================
--- ofbiz/trunk/applications/marketing/servicedef/services.xml (original)
+++ ofbiz/trunk/applications/marketing/servicedef/services.xml Sat Apr 26 12:15:00 2008
@@ -384,4 +384,26 @@
         <auto-attributes mode="IN" include="pk" optional="false"/>
         <auto-attributes mode="IN" include="nonpk" optional="true"/>
     </service>
+
+    <!-- lead services -->
+    <service name="createLead" engine="simple"
+        location="org/ofbiz/sfa/lead/LeadServices.xml" invoke="createLead">
+        <description>Create a Lead Person or Group</description>
+        <auto-attributes entity-name="Person" mode="IN" optional="true">
+            <exclude field-name="partyId"/>
+        </auto-attributes>
+        <auto-attributes entity-name="PartyGroup" mode="IN" optional="true">
+            <exclude field-name="partyId"/>
+        </auto-attributes>
+        <auto-attributes entity-name="PostalAddress" mode="IN" optional="true">
+            <exclude field-name="contactMechId"/>
+        </auto-attributes>
+        <auto-attributes entity-name="TelecomNumber" mode="IN" optional="true">
+            <exclude field-name="contactMechId"/>
+        </auto-attributes>
+        <attribute name="emailAddress" type="String" mode="IN" optional="true"/>
+        <attribute name="partyIdFrom" type="String" mode="IN" optional="true"/>
+        <attribute name="leadType" type="String" mode="IN" optional="false"/><!-- can be PERSON OR GROUP -->
+        <attribute name="leadSource" type="String" mode="IN" optional="true"/>
+    </service>
  </services>

Modified: ofbiz/trunk/applications/marketing/webapp/sfa/WEB-INF/controller.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/marketing/webapp/sfa/WEB-INF/controller.xml?rev=651848&r1=651847&r2=651848&view=diff
==============================================================================
--- ofbiz/trunk/applications/marketing/webapp/sfa/WEB-INF/controller.xml (original)
+++ ofbiz/trunk/applications/marketing/webapp/sfa/WEB-INF/controller.xml Sat Apr 26 12:15:00 2008
@@ -82,6 +82,22 @@
         <security https="true" auth="true"/>
         <response name="success" type="view" value="ViewAccount"/>
     </request-map>
+
+    <!-- Lead Requests -->
+    <request-map uri="FindLead">
+        <security https="true" auth="true"/>
+        <response name="success" type="view" value="FindLead"/>
+    </request-map>
+    <request-map uri="CreateLead">
+        <security https="true" auth="true"/>
+        <response name="success" type="view" value="CreateLead"/>
+    </request-map>
+    <request-map uri="createLead">
+        <security https="true" auth="true"/>
+        <event type="service" invoke="createLead"/>
+        <response name="success" type="view" value="FindLead"/>
+        <response name="error" type="view" value="CreateLead"/>
+    </request-map>
     <!-- end of request mappings -->
 
     <!-- View Mappings -->
@@ -93,5 +109,7 @@
     <view-map name="FindAccounts" type="screen" page="component://marketing/widget/sfa/AccountScreens.xml#FindAccounts"/>
     <view-map name="NewAccounts" type="screen" page="component://marketing/widget/sfa/AccountScreens.xml#NewAccounts"/>
     <view-map name="ViewAccount" type="screen" page="component://marketing/widget/sfa/AccountScreens.xml#ViewAccount"/>
+    <view-map name="FindLead" type="screen" page="component://marketing/widget/sfa/LeadScreens.xml#FindLead"/>
+    <view-map name="CreateLead" type="screen" page="component://marketing/widget/sfa/LeadScreens.xml#CreateLead"/>
     <!-- end of view mappings -->
 </site-conf>

Added: ofbiz/trunk/applications/marketing/webapp/sfa/findSfaParty.ftl
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/marketing/webapp/sfa/findSfaParty.ftl?rev=651848&view=auto
==============================================================================
--- ofbiz/trunk/applications/marketing/webapp/sfa/findSfaParty.ftl (added)
+++ ofbiz/trunk/applications/marketing/webapp/sfa/findSfaParty.ftl Sat Apr 26 12:15:00 2008
@@ -0,0 +1,148 @@
+<#--
+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.
+-->
+
+<#assign extInfo = parameters.extInfo?default("N")>
+<#if roleTypeId=="LEAD">
+  <#assign currentUrl="FindLead"/>
+  <#assign title="${uiLabelMap.SfaFindLeads}">
+</#if>
+<div id="findPartyParameters" class="screenlet">
+  <div class="screenlet-title-bar">
+    <ul>
+      <li class="h3">${title?if_exists}</li>
+      <#if parameters.hideFields?default("N") == "Y">
+        <li><a href="<@ofbizUrl>${currentUrl?if_exists}?hideFields=N${paramList}</@ofbizUrl>">${uiLabelMap.CommonShowLookupFields}</a></li>
+      <#else>
+        <#if partyList?exists><li><a href="<@ofbizUrl>${currentUrl?if_exists}?hideFields=Y${paramList}</@ofbizUrl>">${uiLabelMap.CommonHideFields}</a></li></#if>
+        <li><a href="javascript:document.lookupparty.submit();">${uiLabelMap.PartyLookupParty}</a></li>
+      </#if>
+    </ul>
+    <br/><br/>
+  </div>
+  <#if parameters.hideFields?default("N") != "Y">
+    <div class="screenlet-body">
+      <#-- NOTE: this form is setup to allow a search by partial partyId or userLoginId; to change it to go directly to
+          the viewprofile page when these are entered add the follow attribute to the form element:
+          
+           onsubmit="javascript:lookupParty('<@ofbizUrl>viewprofile</@ofbizUrl>');"
+       -->
+      <form method="post" name="lookupparty" action="<@ofbizUrl>${currentUrl?if_exists}</@ofbizUrl>" class="basic-form">
+        <input type="hidden" name="lookupFlag" value="Y"/>
+        <input type="hidden" name="hideFields" value="Y"/>
+        <input type="hidden" name="roleTypeId" value="${roleTypeId}"/>
+        <table cellspacing="0">
+          <tr>
+            <td class="label">${uiLabelMap.PartyContactInformation}</td>
+            <td>
+              <input type="radio" name="extInfo" value="N" onclick="javascript:refreshInfo();" <#if extInfo == "N">checked="checked"</#if>/>${uiLabelMap.CommonNone}&nbsp;
+              <input type="radio" name="extInfo" value="P" onclick="javascript:refreshInfo();" <#if extInfo == "P">checked="checked"</#if>/>${uiLabelMap.PartyPostal}&nbsp;
+              <input type="radio" name="extInfo" value="T" onclick="javascript:refreshInfo();" <#if extInfo == "T">checked="checked"</#if>/>${uiLabelMap.PartyTelecom}&nbsp;
+              <input type="radio" name="extInfo" value="O" onclick="javascript:refreshInfo();" <#if extInfo == "O">checked="checked"</#if>/>${uiLabelMap.CommonOther}&nbsp;
+            </td>
+          </tr>
+          <tr>
+            <td class="label">${uiLabelMap.PartyPartyId}</td>
+            <td><input type="text" name="partyId" value="${parameters.partyId?if_exists}"/></td>
+          </tr>
+          <tr>
+            <td class="label">${uiLabelMap.PartyLastName}</td>
+            <td><input type="text" name="lastName" value="${parameters.lastName?if_exists}"/></td>
+          </tr>
+          <tr>
+            <td class="label">${uiLabelMap.PartyFirstName}</td>
+            <td><input type="text" name="firstName" value="${parameters.firstName?if_exists}"/></td>
+          </tr>
+          <tr>
+            <td class="label">${uiLabelMap.PartyPartyGroupName}</td>
+            <td><input type="text" name="groupName" value="${parameters.groupName?if_exists}"/></td>
+          </tr>
+          <#if extInfo == "P">
+            <tr><td colspan="3"><hr/></td></tr>
+            <tr>
+              <td class="label">${uiLabelMap.CommonAddress1}</td>
+              <td><input type="text" name="address1" value="${parameters.address1?if_exists}"/></td>
+            </tr>
+            <tr>
+              <td class="label">${uiLabelMap.CommonAddress2}</td>
+              <td><input type="text" name="address2" value="${parameters.address2?if_exists}"/></td>
+            </tr>
+            <tr>
+              <td class="label">${uiLabelMap.CommonCity}</td>
+              <td><inputmsg type="text" name="city" value="${parameters.city?if_exists}"/></td>
+            </tr>
+            <tr>
+              <td class="label">${uiLabelMap.CommonStateProvince}</td>
+              <td>
+                <select name="stateProvinceGeoId">
+                  <#if currentStateGeo?has_content>
+                    <option value="${currentStateGeo.geoId}">${currentStateGeo.geoName?default(currentStateGeo.geoId)}</option>
+                    <option value="${currentStateGeo.geoId}">---</option>
+                  </#if>
+                  <option value="ANY">${uiLabelMap.CommonAnyStateProvince}</option>
+                  ${screens.render("component://common/widget/CommonScreens.xml#states")}
+                </select>
+              </td>
+            </tr>
+            <tr>
+              <td class="label">${uiLabelMap.PartyPostalCode}</td>
+              <td><input type="text" name="postalCode" value="${parameters.postalCode?if_exists}"/></td>
+            </tr>
+          </#if>
+          <#if extInfo == "T">
+            <tr><td colspan="3"><hr/></td></tr>
+            <tr>
+              <td class="label">${uiLabelMap.PartyCountryCode}</td>
+              <td><input type="text" name="countryCode" value="${parameters.countryCode?if_exists}"/></td>
+            </tr>
+            <tr>
+              <td class="label">${uiLabelMap.PartyAreaCode}</td>
+              <td><input type="text" name="areaCode" value="${parameters.areaCode?if_exists}"/></td>
+            </tr>
+            <tr>
+              <td class="label">${uiLabelMap.PartyContactNumber}</td>
+              <td><input type="text" name="contactNumber" value="${parameters.contactNumber?if_exists}"/></td>
+            </tr>
+          </#if>
+          <#if extInfo == "O">
+            <tr><td colspan="3"><hr/></td></tr>
+            <tr>
+              <td class="label">${uiLabelMap.PartyContactInformation}</td>
+              <td><input type="text" name="infoString" value="${parameters.infoString?if_exists}"/></td>
+            </tr>
+          </#if>
+          <tr><td colspan="3"><hr/></td></tr>
+          <tr align="center">
+            <td>&nbsp;</td>
+            <td>
+              <input type="submit" value="${uiLabelMap.PartyLookupParty}" onClick="javascript:document.lookupparty.submit();"/>
+            </td>
+          </tr>
+        </table>
+      </form>
+    </div>
+  </#if>
+</div>
+
+<#if parameters.hideFields?default("N") != "Y">
+  <script language="JavaScript" type="text/javascript">
+    <!--//
+      document.lookupparty.partyId.focus();
+    //-->
+  </script>
+</#if>

Propchange: ofbiz/trunk/applications/marketing/webapp/sfa/findSfaParty.ftl
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: ofbiz/trunk/applications/marketing/webapp/sfa/findSfaParty.ftl
------------------------------------------------------------------------------
    svn:keywords = Date Rev Author URL Id

Propchange: ofbiz/trunk/applications/marketing/webapp/sfa/findSfaParty.ftl
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: ofbiz/trunk/applications/marketing/webapp/sfa/lead/LeadForms.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/marketing/webapp/sfa/lead/LeadForms.xml?rev=651848&view=auto
==============================================================================
--- ofbiz/trunk/applications/marketing/webapp/sfa/lead/LeadForms.xml (added)
+++ ofbiz/trunk/applications/marketing/webapp/sfa/lead/LeadForms.xml Sat Apr 26 12:15:00 2008
@@ -0,0 +1,92 @@
+<?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="ListLeads" type="list" list-name="partyList" list-entry-name="partyRow" paginate-target="FindLead">
+        <row-actions>
+            <entity-one entity-name="PartyGroup" value-name="partyGroup">
+                <field-map field-name="partyId" env-name="partyRow.partyId"/>
+            </entity-one>
+            <entity-one entity-name="Person" value-name="person">
+                <field-map field-name="partyId" env-name="partyRow.partyId"/>
+            </entity-one>
+            <entity-one entity-name="PartyType" value-name="partyType">
+                <field-map field-name="partyTypeId" env-name="partyRow.partyTypeId"/>
+            </entity-one>
+        </row-actions>
+        <field name="partyId" title="${uiLabelMap.PartyPartyId}">
+            <hyperlink target="/partymgr/control/viewprofile?partyId=${partyRow.partyId}" description="${partyRow.partyId}" target-type="inter-app"/>
+        </field>
+        <field name="partyName" title="${uiLabelMap.PartyName}" use-when="partyGroup != null"><display description="${partyGroup.groupName}"/></field>
+        <field name="partyName" title="${uiLabelMap.PartyName}" use-when="person != null"><display description="${person.lastName}, ${person.firstName}"/></field>
+        <field name="partyTypeId" title="${uiLabelMap.PartyType}"><display description="${partyType.description}"/> </field>
+    </form>
+    <form name="createLead" type="single" target="createLead" header-row-style="header-row" default-table-style="basic-table">
+        <field name="leadType"><hidden value="${leadType}"/></field>
+        <field name="firstName" use-when="leadType.equals(&quot;PERSON&quot;)" tooltip="${uiLabelMap.CommonRequired}" widget-style="required"><text/></field>
+        <field name="lastName" use-when="leadType.equals(&quot;PERSON&quot;)" tooltip="${uiLabelMap.CommonRequired}" widget-style="required"><text/></field>
+        <field name="suffix" use-when="leadType.equals(&quot;PERSON&quot;)"><text/></field>
+        <field name="groupName" use-when="leadType.equals(&quot;GROUP&quot;)" title="${uiLabelMap.PartyGroupName}" tooltip="${uiLabelMap.CommonRequired}" widget-style="required"><text size="30" maxlength="60"/></field>
+        <field name="numEmployees" use-when="leadType.equals(&quot;GROUP&quot;)" title="${uiLabelMap.MarketingEmployees}"><text size="30"/></field>
+        <field name="siteName" use-when="leadType.equals(&quot;GROUP&quot;)" title="${uiLabelMap.FormFieldTitle_officeSiteName}"><text size="30" maxlength="60"/></field>
+        <field name="postalAddressTitle" title="${uiLabelMap.PartyGeneralCorrespondenceAddress}" title-area-style="group-label"><display description=" " also-hidden="false"/></field>
+        <field name="address1" title="${uiLabelMap.CommonAddress1}" tooltip="${uiLabelMap.CommonRequired}" widget-style="required"><text size="50" maxlength="60"/></field>
+        <field name="address2" title="${uiLabelMap.CommonAddress2}"><text size="50" maxlength="60"/></field>
+        <field name="city" title="${uiLabelMap.CommonCity}" tooltip="${uiLabelMap.CommonRequired}" widget-style="required"><text size="30" maxlength="60"/></field>
+        <field name="state" title="${uiLabelMap.CommonState}" tooltip="${uiLabelMap.CommonRequired}" widget-style="required">
+            <drop-down allow-empty="true">
+                <entity-options entity-name="Geo" key-field-name="geoId" description="${geoId} - ${geoName}">
+                    <entity-constraint name="geoTypeId" operator="in" value="STATE,PROVINCE"/>
+                    <entity-order-by field-name="geoId"/>
+                </entity-options>
+            </drop-down>
+        </field>
+        <field name="postalCode" title="${uiLabelMap.CommonZipPostalCode}" tooltip="${uiLabelMap.CommonRequired}" widget-style="required"><text size="10" maxlength="30"/></field>
+        <field name="country" title="${uiLabelMap.CommonCountry}" tooltip="${uiLabelMap.CommonRequired}" widget-style="required">
+            <drop-down allow-empty="false" no-current-selected-key="${defaultCountryGeoId}">
+                <entity-options entity-name="Geo" key-field-name="geoId" description="${geoId}: ${geoName}">
+                    <entity-constraint name="geoTypeId" value="COUNTRY"/>
+                    <entity-order-by field-name="geoId"/>
+                </entity-options>
+            </drop-down>
+        </field>
+        <field name="phoneTitle" title="${uiLabelMap.PartyPrimaryPhone}" title-area-style="group-label"><display/></field>
+        <field name="countryCode" title="${uiLabelMap.PartyCountryCode}"><text size="4" maxlength="10"/></field>
+        <field name="areaCode" title="${uiLabelMap.PartyAreaCode}"><text size="4" maxlength="10"/></field>
+        <field name="contactNumber" title="${uiLabelMap.PartyPhoneNumber}"><text size="15" maxlength="15"/></field>
+        <field name="extensionCode" title="${uiLabelMap.PartyContactExt}"><text size="6" maxlength="10"/></field>
+        <field name="emailAddressTitle" title="${uiLabelMap.PartyEmailAddress}" title-area-style="group-label"><display/></field>
+        <field name="emailAddress" title="${uiLabelMap.CommonEmail}"><text size="50" maxlength="60"/></field>
+        <field name="leadSourceTitle" title="${uiLabelMap.SfaLeadSource}" title-area-style="group-label"><display/></field>
+        <field name="leadSource" title="${uiLabelMap.SfaLeadSource}"><text size="50" maxlength="60"/></field>
+        <field name="leadGroupTitle" title="${uiLabelMap.SfaLeadGroup}" use-when="leadType.equals(&quot;PERSON&quot;)" title-area-style="group-label"><display/></field>
+        <field name="partyIdFrom" title="Lead Group" use-when="leadType.equals(&quot;PERSON&quot;)">
+            <drop-down allow-empty="true">
+                <entity-options entity-name="PartyRoleAndPartyDetail" description="${groupName} [${partyId}]" key-field-name="partyId">
+                    <entity-constraint name="roleTypeId" operator="equals" value="LEAD"/>
+                    <entity-constraint name="partyTypeId" operator="equals" value="PARTY_GROUP"/>
+                </entity-options>
+            </drop-down>
+</field>
+        <field name="submitButton" title="${uiLabelMap.CommonSave}" widget-style="smallSubmit"><submit button-type="button"/></field>
+    </form>
+</forms>

Propchange: ofbiz/trunk/applications/marketing/webapp/sfa/lead/LeadForms.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: ofbiz/trunk/applications/marketing/webapp/sfa/lead/LeadForms.xml
------------------------------------------------------------------------------
    svn:keywords = Date Rev Author URL Id

Propchange: ofbiz/trunk/applications/marketing/webapp/sfa/lead/LeadForms.xml
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Modified: ofbiz/trunk/applications/marketing/widget/sfa/CommonScreens.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/marketing/widget/sfa/CommonScreens.xml?rev=651848&r1=651847&r2=651848&view=diff
==============================================================================
--- ofbiz/trunk/applications/marketing/widget/sfa/CommonScreens.xml (original)
+++ ofbiz/trunk/applications/marketing/widget/sfa/CommonScreens.xml Sat Apr 26 12:15:00 2008
@@ -29,6 +29,8 @@
                 <property-map resource="PartyUiLabels" map-name="uiLabelMap" global="true"/>
                 <property-map resource="OrderUiLabels" map-name="uiLabelMap" global="true"/>
                 <property-map resource="MarketingUiLabels" map-name="uiLabelMap" global="true"/>
+                <set field="layoutSettings.javaScripts[]" value="/partymgr/static/partymgr.js" global="true"/>
+                <set field="layoutSettings.styleSheets[]" value="/partymgr/static/partymgr.css" global="true"/>
                 <set field="layoutSettings.companyName" from-field="uiLabelMap.SfaCompanyName" global="true"/>
                 <set field="layoutSettings.companySubtitle" from-field="uiLabelMap.MarketingCompanySubtitle" global="true"/>
                 <set field="applicationMenuName" value="SfaAppBar" global="true"/>

Added: ofbiz/trunk/applications/marketing/widget/sfa/LeadScreens.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/marketing/widget/sfa/LeadScreens.xml?rev=651848&view=auto
==============================================================================
--- ofbiz/trunk/applications/marketing/widget/sfa/LeadScreens.xml (added)
+++ ofbiz/trunk/applications/marketing/widget/sfa/LeadScreens.xml Sat Apr 26 12:15:00 2008
@@ -0,0 +1,114 @@
+<?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.
+-->
+
+<screens xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+        xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/widget-screen.xsd">
+
+     <screen name="FindLead">
+        <section>
+            <actions>
+                <set field="roleTypeId" value="LEAD"/>
+            </actions>
+            <widgets>
+                <decorator-screen name="main-decorator" location="${parameters.mainDecoratorLocation}">
+                    <decorator-section name="body">
+                        <section>
+                            <actions>
+                                <service service-name="findParty" auto-field-map="true"/>
+                            </actions>
+                            <widgets>
+                               <container><link target="CreateLead?leadType=PERSON" text="${uiLabelMap.CommonCreate} ${uiLabelMap.SfaLeadPerson}" style="buttontext"/><link target="CreateLead?leadType=GROUP" text="${uiLabelMap.CommonCreate} ${uiLabelMap.SfaLeadGroup}" style="buttontext"/></container>                              
+                               <section>
+                                    <widgets>
+                                        <platform-specific>
+                                            <html><html-template location="component://marketing/webapp/sfa/findSfaParty.ftl"/></html>
+                                        </platform-specific>
+                                        <container style="screenlet">
+                                           <container style="screenlet-title-bar">
+                                               <container style="h3">
+                                                   <label text="${uiLabelMap.SfaFindResults}"/>
+                                               </container>
+                                           </container>
+                                           <container style="screenlet-body">
+                                               <section>
+                                                   <condition>
+                                                       <not>
+                                                           <if-empty field-name="partyList"/>
+                                                       </not>
+                                                   </condition>
+                                                   <widgets>
+                                                       <include-form name="ListLeads" location="component://marketing/webapp/sfa/lead/LeadForms.xml"/>
+                                                   </widgets>
+                                                   <fail-widgets>
+                                                       <container style="h3">
+                                                           <label text="${uiLabelMap.PartyNoPartiesFound}"/>
+                                                       </container>
+                                                   </fail-widgets>
+                                               </section>
+                                           </container>
+                                        </container>
+                                    </widgets>
+                                </section>
+                            </widgets>
+                        </section>
+                    </decorator-section>
+                </decorator-screen>
+            </widgets>
+        </section>  
+    </screen>
+    <screen name="CreateLead">
+        <section>
+            <actions>
+                <set field="titleProperty" value="PageTitleCreateLead"/>
+                <set field="leadType" from-field="parameters.leadType"/>
+            </actions>
+            <widgets>
+                <decorator-screen name="main-decorator" location="${parameters.mainDecoratorLocation}">
+                    <decorator-section name="body">
+                          <container style="screenlet">
+                                <container style="screenlet-title-bar">
+                                    <container style="h3">
+                                        <section>
+                                            <condition>
+                                                <if-compare value="PERSON" field-name="leadType" operator="equals"/>
+                                            </condition>
+                                            <widgets>
+                                                <label text="${uiLabelMap.CommonCreate} ${uiLabelMap.SfaLeadPerson}"/>
+                                            </widgets>
+                                            <fail-widgets>
+                                                <label text="${uiLabelMap.CommonCreate} ${uiLabelMap.SfaLeadGroup}"/>
+                                            </fail-widgets>
+                                        </section>
+                                    </container>
+                                </container>
+                                <container style="screenlet-body">
+                                    <section>
+                                        <widgets>
+                                            <include-form name="createLead" location="component://marketing/webapp/sfa/lead/LeadForms.xml"/>
+                                        </widgets>
+                                    </section>
+                                </container>
+                            </container>
+                    </decorator-section>
+                </decorator-screen>
+            </widgets>
+        </section>
+    </screen>
+</screens>

Propchange: ofbiz/trunk/applications/marketing/widget/sfa/LeadScreens.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: ofbiz/trunk/applications/marketing/widget/sfa/LeadScreens.xml
------------------------------------------------------------------------------
    svn:keywords = Date Rev Author URL Id

Propchange: ofbiz/trunk/applications/marketing/widget/sfa/LeadScreens.xml
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Modified: ofbiz/trunk/applications/marketing/widget/sfa/SfaMenus.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/marketing/widget/sfa/SfaMenus.xml?rev=651848&r1=651847&r2=651848&view=diff
==============================================================================
--- ofbiz/trunk/applications/marketing/widget/sfa/SfaMenus.xml (original)
+++ ofbiz/trunk/applications/marketing/widget/sfa/SfaMenus.xml Sat Apr 26 12:15:00 2008
@@ -23,7 +23,7 @@
         <menu-item name="Main" title="${uiLabelMap.MarketingMainPage}"><link target="main"/></menu-item>
         <menu-item name="Accounts" title="${uiLabelMap.SfaAcccounts}"><link target="FindAccounts"/></menu-item>
         <menu-item name="Contacts" title="${uiLabelMap.SfaContacts}"><link target=""/></menu-item>
-        <menu-item name="Leads" title="${uiLabelMap.SfaLeads}"><link target=""/></menu-item>
+        <menu-item name="Leads" title="${uiLabelMap.SfaLeads}"><link target="FindLead"/></menu-item>
         <menu-item name="Competitors" title="${uiLabelMap.SfaCompetitors}"><link target=""/></menu-item>
         <menu-item name="Events" title="${uiLabelMap.SfaEvents}"><link target=""/></menu-item>
         <menu-item name="Documents" title="${uiLabelMap.SfaDocuments}"><link target=""/></menu-item>
@@ -50,4 +50,4 @@
         <menu-item name="viewAccount" title="${uiLabelMap.PageTitleAccountSummary}"><link target="ViewAccount?partyId=${partyId}"/></menu-item>
         <menu-item name="editAccount" title="${uiLabelMap.PageTitleEditAccount}"><link target=""/></menu-item>
     </menu>
-</menus>
\ No newline at end of file
+</menus>

Modified: ofbiz/trunk/applications/party/config/PartyUiLabels.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/party/config/PartyUiLabels.xml?rev=651848&r1=651847&r2=651848&view=diff
==============================================================================
--- ofbiz/trunk/applications/party/config/PartyUiLabels.xml (original)
+++ ofbiz/trunk/applications/party/config/PartyUiLabels.xml Sat Apr 26 12:15:00 2008
@@ -3406,6 +3406,15 @@
         <value xml:lang="th">เพศ</value>
         <value xml:lang="zh">性别</value>
     </property>
+    <property key="PartyGeneralCorrespondenceAddress">
+        <value xml:lang="en">General Correspondence Address</value>
+        <value xml:lang="fr">Adresse principale</value>
+        <value xml:lang="it">Indirizzo Generale Corrispondenza</value>
+        <value xml:lang="ro">Adresa Generala Corespondenta</value>
+        <value xml:lang="ru">Адрес для корреспонденции</value>
+        <value xml:lang="th">ที่อยู่ทั่วไปที่ติดต่อกันทางจดหมาย</value>
+        <value xml:lang="zh">通信地址</value>
+    </property>
     <property key="PartyGoToParent">
         <value xml:lang="en">Go to Parent</value>
         <value xml:lang="th">ไปยังผู้ดูแล</value>
@@ -5048,6 +5057,15 @@
         <value xml:lang="ru">Цена</value>
         <value xml:lang="th">ราคา</value>
         <value xml:lang="zh">ä»·æ ¼</value>
+    </property>
+    <property key="PartyPrimaryPhone">
+        <value xml:lang="en">Primary Phone Number</value>
+        <value xml:lang="fr">Numéro de téléphone principal</value>
+        <value xml:lang="it">Numero Telefono Principale</value>
+        <value xml:lang="ro">Numero Telefon Principal</value>
+        <value xml:lang="ru">Основной телефонный номер</value>
+        <value xml:lang="th">เบอร์โทรศัพท์ที่สำคัญ</value>
+        <value xml:lang="zh">第一个电话号码</value>
     </property>
     <property key="PartyProduct">
         <value xml:lang="en">Product</value>

Modified: ofbiz/trunk/applications/party/script/org/ofbiz/party/party/PartySimpleMethods.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/party/script/org/ofbiz/party/party/PartySimpleMethods.xml?rev=651848&r1=651847&r2=651848&view=diff
==============================================================================
--- ofbiz/trunk/applications/party/script/org/ofbiz/party/party/PartySimpleMethods.xml (original)
+++ ofbiz/trunk/applications/party/script/org/ofbiz/party/party/PartySimpleMethods.xml Sat Apr 26 12:15:00 2008
@@ -91,4 +91,143 @@
         <field-to-result field-name="newUserLogin"/>
         <field-to-result field-name="createUlInMap.partyId" result-name="partyId"/>
     </simple-method>
+
+    <!-- Simple method to create a person, its role and basic contact mechs -->
+    <simple-method method-name="createPersonRoleAndContactMechs" short-description="Creates a person, role and contactMechs">
+        <call-map-processor processor-name="person" in-map-name="parameters" out-map-name="personContext"
+            xml-resource="org/ofbiz/party/party/PartyMapProcs.xml"/>
+    
+        <call-map-processor processor-name="postalAddress" in-map-name="parameters" out-map-name="postalAddressContext"
+            xml-resource="org/ofbiz/party/contact/PartyContactMechMapProcs.xml"/>
+    
+        <if-not-empty field-name="parameters.contactNumber">
+            <call-map-processor processor-name="telecomNumber" in-map-name="parameters" out-map-name="telecomNumberContext"
+                xml-resource="org/ofbiz/party/contact/PartyContactMechMapProcs.xml"/>
+        </if-not-empty>
+    
+        <if-not-empty field-name="parameters.emailAddress">
+            <call-map-processor in-map-name="parameters" out-map-name="emailAddressContext">
+                <simple-map-processor name="emailAddress">
+                    <process field="emailAddress">
+                        <copy/>
+                        <validate-method method="isEmail"><fail-property resource="PartyUiLabels" property="PartyEmailAddressNotFormattedCorrectly"/></validate-method>
+                    </process>
+                </simple-map-processor>
+            </call-map-processor>
+        </if-not-empty>
+        <check-errors/>
+    
+        <call-service service-name="createPerson" in-map-name="personContext">
+            <result-to-field result-name="partyId" field-name="partyId"/>
+        </call-service>
+    
+        <if-not-empty field-name="parameters.roleTypeId">
+            <set field="createPartyRoleCtx.partyId" from-field="partyId"/>
+            <set field="createPartyRoleCtx.roleTypeId" from-field="parameters.roleTypeId"/>
+            <call-service service-name="createPartyRole" in-map-name="createPartyRoleCtx"/>
+        </if-not-empty>
+    
+        <set field="postalAddContactMechPurpTypeId" from-field="parameters.postalAddContactMechPurpTypeId"/>
+        <set field="contactNumber" from-field="parameters.contactNumber"/>
+        <set field="phoneContactMechPurpTypeId" from-field="parameters.phoneContactMechPurpTypeId"/>
+        <set field="emailAddress" from-field="parameters.emailAddress"/>
+        <set field="emailContactMechPurpTypeId" from-field="parameters.emailContactMechPurpTypeId"/>
+        <call-simple-method method-name="createPartyContactMechs"/>        
+    </simple-method>
+
+    <!-- Simple method to create a party group, its role and basic contact mechs -->
+    <simple-method method-name="createPartyGroupRoleAndContactMechs" short-description="Creates a party group, role and contactMechs">
+        <call-map-processor processor-name="partyGroup" in-map-name="parameters" out-map-name="partyGroupContext"
+            xml-resource="org/ofbiz/party/party/PartyMapProcs.xml"/>
+    
+        <call-map-processor processor-name="postalAddress" in-map-name="parameters" out-map-name="postalAddressContext"
+            xml-resource="org/ofbiz/party/contact/PartyContactMechMapProcs.xml"/>
+    
+        <if-not-empty field-name="parameters.contactNumber">
+            <call-map-processor processor-name="telecomNumber" in-map-name="parameters" out-map-name="telecomNumberContext"
+                xml-resource="org/ofbiz/party/contact/PartyContactMechMapProcs.xml"/>
+        </if-not-empty>
+    
+        <if-not-empty field-name="parameters.emailAddress">
+            <call-map-processor in-map-name="parameters" out-map-name="emailAddressContext">
+                <simple-map-processor name="emailAddress">
+                    <process field="emailAddress">
+                        <copy/>
+                        <validate-method method="isEmail"><fail-property resource="PartyUiLabels" property="PartyEmailAddressNotFormattedCorrectly"/></validate-method>
+                    </process>
+                </simple-map-processor>
+            </call-map-processor>
+        </if-not-empty>
+        <check-errors/>
+    
+        <set field="partyGroupContext.partyTypeId" value="PARTY_GROUP"/>
+        <call-service service-name="createPartyGroup" in-map-name="partyGroupContext">
+            <result-to-field result-name="partyId" field-name="partyId"/>
+        </call-service>
+    
+        <if-not-empty field-name="parameters.roleTypeId">
+            <set field="createPartyRoleCtx.partyId" from-field="partyId"/>
+            <set field="createPartyRoleCtx.roleTypeId" from-field="parameters.roleTypeId"/>
+            <call-service service-name="createPartyRole" in-map-name="createPartyRoleCtx"/>
+        </if-not-empty>
+    
+        <set field="postalAddContactMechPurpTypeId" from-field="parameters.postalAddContactMechPurpTypeId"/>
+        <set field="contactNumber" from-field="parameters.contactNumber"/>
+        <set field="phoneContactMechPurpTypeId" from-field="parameters.phoneContactMechPurpTypeId"/>
+        <set field="emailAddress" from-field="parameters.emailAddress"/>
+        <set field="emailContactMechPurpTypeId" from-field="parameters.emailContactMechPurpTypeId"/>
+        <call-simple-method method-name="createPartyContactMechs"/>        
+    </simple-method>
+
+    <!-- Simple method to create Party Postal Address, Telecom Number and Email Address, to be used by
+         createPersonRoleAndContactMechs and createPartyGroupRoleAndContactMechs simple methods -->
+    <simple-method method-name="createPartyContactMechs" short-description="Create Contact Mechs">
+        <!-- Create Party Postal Address and set purpose -->
+        <set field="postalAddressContext.partyId" from-field="partyId"/>
+        <call-service service-name="createPartyPostalAddress" in-map-name="postalAddressContext">
+            <result-to-field result-name="contactMechId" field-name="addressContactMechId"/>
+        </call-service>
+    
+        <set field="postalAddressPurposeCtx.partyId" from-field="partyId"/>
+        <set field="postalAddressPurposeCtx.contactMechId" from-field="addressContactMechId"/>
+        <set field="postalAddressPurposeCtx.contactMechPurposeTypeId" value="GENERAL_LOCATION"/>
+        <call-service service-name="createPartyContactMechPurpose" in-map-name="postalAddressPurposeCtx"/>
+    
+        <if-not-empty field-name="postalAddContactMechPurpTypeId">
+            <set field="postalAddressPurposeCtx.contactMechPurposeTypeId" from-field="postalAddContactMechPurpTypeId"/>
+            <call-service service-name="createPartyContactMechPurpose" in-map-name="postalAddressPurposeCtx"/>
+        </if-not-empty>
+    
+        <!-- Create Party Telecom Number and set purpose -->
+        <if-not-empty field-name="contactNumber">
+            <set field="telecomNumberContext.partyId" from-field="partyId"/>
+            <call-service service-name="createPartyTelecomNumber" in-map-name="telecomNumberContext">
+                <result-to-field result-name="contactMechId" field-name="phoneContactMechId"/>
+            </call-service>
+        
+            <set field="phonePurposeContext.partyId" from-field="partyId"/>
+            <set field="phonePurposeContext.contactMechId" from-field="phoneContactMechId"/>
+            <set field="phonePurposeContext.contactMechPurposeTypeId" from-field="phoneContactMechPurpTypeId"/>
+            <if-empty field-name="phonePurposeContext.contactMechPurposeTypeId">
+                <set field="phonePurposeContext.contactMechPurposeTypeId" value="PRIMARY_PHONE"/>
+            </if-empty>
+            <call-service service-name="createPartyContactMechPurpose" in-map-name="phonePurposeContext"/>
+        </if-not-empty>
+    
+        <!-- Create Party Email Address and set purpose -->
+        <if-not-empty field-name="emailAddress">
+            <set field="emailAddressContext.partyId" from-field="partyId"/>
+            <call-service service-name="createPartyEmailAddress" in-map-name="emailAddressContext">
+                <result-to-field result-name="contactMechId" field-name="emailContactMechId"/>
+            </call-service>
+        
+            <set field="emailPurposeContext.partyId" from-field="partyId"/>
+            <set field="emailPurposeContext.contactMechId" from-field="emailContactMechId"/>
+            <set field="emailPurposeContext.contactMechPurposeTypeId" from-field="emailContactMechPurpTypeId"/>
+            <if-empty field-name="emailPurposeContext.contactMechPurposeTypeId">
+                 <set field="emailPurposeContext.contactMechPurposeTypeId" value="PRIMARY_EMAIL"/>
+            </if-empty>
+            <call-service service-name="createPartyContactMechPurpose" in-map-name="emailPurposeContext"/>
+        </if-not-empty>
+    </simple-method>
 </simple-methods>


Reply | Threaded
Open this post in threaded view
|

Re: svn commit: r651848 - in /ofbiz/trunk/applications: marketing/config/ marketing/data/ marketing/script/org/ofbiz/sfa/lead/ marketing/servicedef/ marketing/webapp/sfa/ marketing/webapp/sfa/WEB-INF/ marketing/webapp/sfa/lead/ marketing/widget/sfa/ party/...

hans_bakker
First of all a nice addition to the SFA application....however:

the issue states:
Lead is both a Person and PartyGroup (related by a PartyRelationship)
because much of the information in a lead translates directly into
Account and Contact information and this way the Lead records can either
be duplicated, or simply modified adding the Account and Contact roles.
For the Person and Party-Group parties will be in the Lead role.

and in the leadcreation I have to create a lead (person) and
leadgroup(account/company) seperately....

why using a ftl and not a form? we had this discussion before in the
projectmanager.....

In general a good start....and co-operation?

we are currently extending the account/opportunity screens.

Regards,
Hans


On Sat, 2008-04-26 at 19:15 +0000, [hidden email] wrote:

> Author: apatel
> Date: Sat Apr 26 12:15:00 2008
> New Revision: 651848
>
> URL: http://svn.apache.org/viewvc?rev=651848&view=rev
> Log:
> New events and services and Forms for adding leads. Thanks Mridul Pathak, Jyotsna Rathore, Sumit Pandit, Rathnesh, Awdesh Parihar and others for helping.
>
> Added:
>     ofbiz/trunk/applications/marketing/script/org/ofbiz/sfa/lead/
>     ofbiz/trunk/applications/marketing/script/org/ofbiz/sfa/lead/LeadServices.xml   (with props)
>     ofbiz/trunk/applications/marketing/webapp/sfa/findSfaParty.ftl   (with props)
>     ofbiz/trunk/applications/marketing/webapp/sfa/lead/
>     ofbiz/trunk/applications/marketing/webapp/sfa/lead/LeadForms.xml   (with props)
>     ofbiz/trunk/applications/marketing/widget/sfa/LeadScreens.xml   (with props)
> Modified:
>     ofbiz/trunk/applications/marketing/config/MarketingUiLabels.xml
>     ofbiz/trunk/applications/marketing/data/MarketingTypeData.xml
>     ofbiz/trunk/applications/marketing/servicedef/services.xml
>     ofbiz/trunk/applications/marketing/webapp/sfa/WEB-INF/controller.xml
>     ofbiz/trunk/applications/marketing/widget/sfa/CommonScreens.xml
>     ofbiz/trunk/applications/marketing/widget/sfa/SfaMenus.xml
>     ofbiz/trunk/applications/party/config/PartyUiLabels.xml
>     ofbiz/trunk/applications/party/script/org/ofbiz/party/party/PartySimpleMethods.xml
>
> Modified: ofbiz/trunk/applications/marketing/config/MarketingUiLabels.xml
> URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/marketing/config/MarketingUiLabels.xml?rev=651848&r1=651847&r2=651848&view=diff
> ==============================================================================
> --- ofbiz/trunk/applications/marketing/config/MarketingUiLabels.xml (original)
> +++ ofbiz/trunk/applications/marketing/config/MarketingUiLabels.xml Sat Apr 26 12:15:00 2008
> @@ -1125,11 +1125,23 @@
>      <property key="SfaCompetitors">
>          <value xml:lang="en">Competitors &amp; Partners </value>
>      </property>
> +    <property key="SfaLeadGroup">
> +        <value xml:lang="en">Lead Group</value>
> +    </property>
> +    <property key="SfaLeadPerson">
> +        <value xml:lang="en">Lead Person</value>
> +    </property>
> +    <property key="SfaLeadSource">
> +        <value xml:lang="en">Lead Source</value>
> +    </property>
>      <property key="SfaDocuments">
>          <value xml:lang="en">Documents</value>
>      </property>
>      <property key="SfaEvents">
>          <value xml:lang="en">Events</value>
> +    </property>
> +    <property key="SfaFindLeads">
> +        <value xml:lang="en">Find Leads</value>
>      </property>
>      <property key="SfaForecasts">
>          <value xml:lang="en">Forecast</value>
>
> Modified: ofbiz/trunk/applications/marketing/data/MarketingTypeData.xml
> URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/marketing/data/MarketingTypeData.xml?rev=651848&r1=651847&r2=651848&view=diff
> ==============================================================================
> --- ofbiz/trunk/applications/marketing/data/MarketingTypeData.xml (original)
> +++ ofbiz/trunk/applications/marketing/data/MarketingTypeData.xml Sat Apr 26 12:15:00 2008
> @@ -58,4 +58,6 @@
>      <EnumerationType description="Tracking Code Source" enumTypeId="TRACKINGCODE_SRC" hasTable="N" parentTypeId=""/>
>      <Enumeration description="Cookie" enumCode="COOKIE" enumId="TKCDSRC_COOKIE" sequenceId="01" enumTypeId="TRACKINGCODE_SRC"/>
>      <Enumeration description="URL Parameter" enumCode="URL_PARAM" enumId="TKCDSRC_URL_PARAM" sequenceId="01" enumTypeId="TRACKINGCODE_SRC"/>  
> +
> +    <DataSourceType dataSourceTypeId="LEAD_SOURCE" description="Lead Source"/>
>  </entity-engine-xml>
>
> Added: ofbiz/trunk/applications/marketing/script/org/ofbiz/sfa/lead/LeadServices.xml
> URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/marketing/script/org/ofbiz/sfa/lead/LeadServices.xml?rev=651848&view=auto
> ==============================================================================
> --- ofbiz/trunk/applications/marketing/script/org/ofbiz/sfa/lead/LeadServices.xml (added)
> +++ ofbiz/trunk/applications/marketing/script/org/ofbiz/sfa/lead/LeadServices.xml Sat Apr 26 12:15:00 2008
> @@ -0,0 +1,67 @@
> +<?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.
> +-->
> +
> +<simple-methods xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> +    xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/simple-methods.xsd">
> +
> +    <simple-method method-name="createLead"  short-description="create Lead Person or Lead Group">
> +        <if-not-empty field-name="parameters.leadType">
> +            <set field="leadType" from-field="parameters.leadType"/>
> +            <else>
> +                <set field="leadType" value="PERSON"/>
> +            </else>
> +        </if-not-empty>
> +    
> +        <set field="parameters.roleTypeId" value="LEAD"/>
> +        <if-compare field-name="leadType" operator="equals" value="PERSON">
> +            <call-simple-method method-name="createPersonRoleAndContactMechs" xml-resource="org/ofbiz/party/party/PartySimpleMethods.xml"/>
> +        
> +            <if-not-empty field-name="parameters.partyIdFrom">
> +                <set field="partyRelationshipContext.partyIdFrom" from-field="parameters.partyIdFrom"/>
> +                <set field="partyRelationshipContext.partyIdTo" from-field="partyId"/>
> +                <set field="partyRelationshipContext.roleTypeIdFrom" value="LEAD"/>
> +                <set field="partyRelationshipContext.roleTypeIdTo" value="LEAD"/>
> +                <set field="partyRelationshipContext.partyRelationshipTypeId" value="GROUP_ROLLUP"/>
> +                <call-service service-name="createPartyRelationship" in-map-name="partyRelationshipContext"/>
> +            </if-not-empty>
> +        </if-compare>
> +    
> +        <if-compare field-name="leadType" operator="equals" value="GROUP">
> +            <call-simple-method method-name="createPartyGroupRoleAndContactMechs" xml-resource="org/ofbiz/party/party/PartySimpleMethods.xml"/>
> +        </if-compare>
> +    
> +        <if-not-empty field-name="parameters.leadSource">
> +            <make-value entity-name="DataSource" value-name="dataSource"/>
> +            <sequenced-id-to-env sequence-name="DataSource" env-name="dataSourceId"/>
> +            <set field="dataSource.dataSourceId" from-field="dataSourceId"/>
> +            <set field="dataSource.dataSourceTypeId" value="LEAD_SOURCE"/>
> +            <set field="dataSource.description" from-field="parameters.leadSource"/>
> +            <create-value value-name="dataSource"/>
> +        
> +            <make-value entity-name="PartyDataSource" value-name="partyDataSource"/>
> +            <set field="partyDataSource.partyId" from-field="partyId"/>
> +            <set field="partyDataSource.dataSourceId" from-field="dataSourceId"/>
> +            <now-timestamp-to-env env-name="nowTimestamp"/>
> +            <set field="partyDataSource.fromDate" from-field="nowTimestamp"/>
> +            <set field="partyDataSource.isCreate" value="Y"/>
> +            <create-value value-name="partyDataSource"/>
> +        </if-not-empty>
> +    </simple-method>
> +</simple-methods>
>
> Propchange: ofbiz/trunk/applications/marketing/script/org/ofbiz/sfa/lead/LeadServices.xml
> ------------------------------------------------------------------------------
>     svn:eol-style = native
>
> Propchange: ofbiz/trunk/applications/marketing/script/org/ofbiz/sfa/lead/LeadServices.xml
> ------------------------------------------------------------------------------
>     svn:keywords = Date Rev Author URL Id
>
> Propchange: ofbiz/trunk/applications/marketing/script/org/ofbiz/sfa/lead/LeadServices.xml
> ------------------------------------------------------------------------------
>     svn:mime-type = text/xml
>
> Modified: ofbiz/trunk/applications/marketing/servicedef/services.xml
> URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/marketing/servicedef/services.xml?rev=651848&r1=651847&r2=651848&view=diff
> ==============================================================================
> --- ofbiz/trunk/applications/marketing/servicedef/services.xml (original)
> +++ ofbiz/trunk/applications/marketing/servicedef/services.xml Sat Apr 26 12:15:00 2008
> @@ -384,4 +384,26 @@
>          <auto-attributes mode="IN" include="pk" optional="false"/>
>          <auto-attributes mode="IN" include="nonpk" optional="true"/>
>      </service>
> +
> +    <!-- lead services -->
> +    <service name="createLead" engine="simple"
> +        location="org/ofbiz/sfa/lead/LeadServices.xml" invoke="createLead">
> +        <description>Create a Lead Person or Group</description>
> +        <auto-attributes entity-name="Person" mode="IN" optional="true">
> +            <exclude field-name="partyId"/>
> +        </auto-attributes>
> +        <auto-attributes entity-name="PartyGroup" mode="IN" optional="true">
> +            <exclude field-name="partyId"/>
> +        </auto-attributes>
> +        <auto-attributes entity-name="PostalAddress" mode="IN" optional="true">
> +            <exclude field-name="contactMechId"/>
> +        </auto-attributes>
> +        <auto-attributes entity-name="TelecomNumber" mode="IN" optional="true">
> +            <exclude field-name="contactMechId"/>
> +        </auto-attributes>
> +        <attribute name="emailAddress" type="String" mode="IN" optional="true"/>
> +        <attribute name="partyIdFrom" type="String" mode="IN" optional="true"/>
> +        <attribute name="leadType" type="String" mode="IN" optional="false"/><!-- can be PERSON OR GROUP -->
> +        <attribute name="leadSource" type="String" mode="IN" optional="true"/>
> +    </service>
>   </services>
>
> Modified: ofbiz/trunk/applications/marketing/webapp/sfa/WEB-INF/controller.xml
> URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/marketing/webapp/sfa/WEB-INF/controller.xml?rev=651848&r1=651847&r2=651848&view=diff
> ==============================================================================
> --- ofbiz/trunk/applications/marketing/webapp/sfa/WEB-INF/controller.xml (original)
> +++ ofbiz/trunk/applications/marketing/webapp/sfa/WEB-INF/controller.xml Sat Apr 26 12:15:00 2008
> @@ -82,6 +82,22 @@
>          <security https="true" auth="true"/>
>          <response name="success" type="view" value="ViewAccount"/>
>      </request-map>
> +
> +    <!-- Lead Requests -->
> +    <request-map uri="FindLead">
> +        <security https="true" auth="true"/>
> +        <response name="success" type="view" value="FindLead"/>
> +    </request-map>
> +    <request-map uri="CreateLead">
> +        <security https="true" auth="true"/>
> +        <response name="success" type="view" value="CreateLead"/>
> +    </request-map>
> +    <request-map uri="createLead">
> +        <security https="true" auth="true"/>
> +        <event type="service" invoke="createLead"/>
> +        <response name="success" type="view" value="FindLead"/>
> +        <response name="error" type="view" value="CreateLead"/>
> +    </request-map>
>      <!-- end of request mappings -->
>  
>      <!-- View Mappings -->
> @@ -93,5 +109,7 @@
>      <view-map name="FindAccounts" type="screen" page="component://marketing/widget/sfa/AccountScreens.xml#FindAccounts"/>
>      <view-map name="NewAccounts" type="screen" page="component://marketing/widget/sfa/AccountScreens.xml#NewAccounts"/>
>      <view-map name="ViewAccount" type="screen" page="component://marketing/widget/sfa/AccountScreens.xml#ViewAccount"/>
> +    <view-map name="FindLead" type="screen" page="component://marketing/widget/sfa/LeadScreens.xml#FindLead"/>
> +    <view-map name="CreateLead" type="screen" page="component://marketing/widget/sfa/LeadScreens.xml#CreateLead"/>
>      <!-- end of view mappings -->
>  </site-conf>
>
> Added: ofbiz/trunk/applications/marketing/webapp/sfa/findSfaParty.ftl
> URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/marketing/webapp/sfa/findSfaParty.ftl?rev=651848&view=auto
> ==============================================================================
> --- ofbiz/trunk/applications/marketing/webapp/sfa/findSfaParty.ftl (added)
> +++ ofbiz/trunk/applications/marketing/webapp/sfa/findSfaParty.ftl Sat Apr 26 12:15:00 2008
> @@ -0,0 +1,148 @@
> +<#--
> +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.
> +-->
> +
> +<#assign extInfo = parameters.extInfo?default("N")>
> +<#if roleTypeId=="LEAD">
> +  <#assign currentUrl="FindLead"/>
> +  <#assign title="${uiLabelMap.SfaFindLeads}">
> +</#if>
> +<div id="findPartyParameters" class="screenlet">
> +  <div class="screenlet-title-bar">
> +    <ul>
> +      <li class="h3">${title?if_exists}</li>
> +      <#if parameters.hideFields?default("N") == "Y">
> +        <li><a href="<@ofbizUrl>${currentUrl?if_exists}?hideFields=N${paramList}</@ofbizUrl>">${uiLabelMap.CommonShowLookupFields}</a></li>
> +      <#else>
> +        <#if partyList?exists><li><a href="<@ofbizUrl>${currentUrl?if_exists}?hideFields=Y${paramList}</@ofbizUrl>">${uiLabelMap.CommonHideFields}</a></li></#if>
> +        <li><a href="javascript:document.lookupparty.submit();">${uiLabelMap.PartyLookupParty}</a></li>
> +      </#if>
> +    </ul>
> +    <br/><br/>
> +  </div>
> +  <#if parameters.hideFields?default("N") != "Y">
> +    <div class="screenlet-body">
> +      <#-- NOTE: this form is setup to allow a search by partial partyId or userLoginId; to change it to go directly to
> +          the viewprofile page when these are entered add the follow attribute to the form element:
> +          
> +           onsubmit="javascript:lookupParty('<@ofbizUrl>viewprofile</@ofbizUrl>');"
> +       -->
> +      <form method="post" name="lookupparty" action="<@ofbizUrl>${currentUrl?if_exists}</@ofbizUrl>" class="basic-form">
> +        <input type="hidden" name="lookupFlag" value="Y"/>
> +        <input type="hidden" name="hideFields" value="Y"/>
> +        <input type="hidden" name="roleTypeId" value="${roleTypeId}"/>
> +        <table cellspacing="0">
> +          <tr>
> +            <td class="label">${uiLabelMap.PartyContactInformation}</td>
> +            <td>
> +              <input type="radio" name="extInfo" value="N" onclick="javascript:refreshInfo();" <#if extInfo == "N">checked="checked"</#if>/>${uiLabelMap.CommonNone}&nbsp;
> +              <input type="radio" name="extInfo" value="P" onclick="javascript:refreshInfo();" <#if extInfo == "P">checked="checked"</#if>/>${uiLabelMap.PartyPostal}&nbsp;
> +              <input type="radio" name="extInfo" value="T" onclick="javascript:refreshInfo();" <#if extInfo == "T">checked="checked"</#if>/>${uiLabelMap.PartyTelecom}&nbsp;
> +              <input type="radio" name="extInfo" value="O" onclick="javascript:refreshInfo();" <#if extInfo == "O">checked="checked"</#if>/>${uiLabelMap.CommonOther}&nbsp;
> +            </td>
> +          </tr>
> +          <tr>
> +            <td class="label">${uiLabelMap.PartyPartyId}</td>
> +            <td><input type="text" name="partyId" value="${parameters.partyId?if_exists}"/></td>
> +          </tr>
> +          <tr>
> +            <td class="label">${uiLabelMap.PartyLastName}</td>
> +            <td><input type="text" name="lastName" value="${parameters.lastName?if_exists}"/></td>
> +          </tr>
> +          <tr>
> +            <td class="label">${uiLabelMap.PartyFirstName}</td>
> +            <td><input type="text" name="firstName" value="${parameters.firstName?if_exists}"/></td>
> +          </tr>
> +          <tr>
> +            <td class="label">${uiLabelMap.PartyPartyGroupName}</td>
> +            <td><input type="text" name="groupName" value="${parameters.groupName?if_exists}"/></td>
> +          </tr>
> +          <#if extInfo == "P">
> +            <tr><td colspan="3"><hr/></td></tr>
> +            <tr>
> +              <td class="label">${uiLabelMap.CommonAddress1}</td>
> +              <td><input type="text" name="address1" value="${parameters.address1?if_exists}"/></td>
> +            </tr>
> +            <tr>
> +              <td class="label">${uiLabelMap.CommonAddress2}</td>
> +              <td><input type="text" name="address2" value="${parameters.address2?if_exists}"/></td>
> +            </tr>
> +            <tr>
> +              <td class="label">${uiLabelMap.CommonCity}</td>
> +              <td><inputmsg type="text" name="city" value="${parameters.city?if_exists}"/></td>
> +            </tr>
> +            <tr>
> +              <td class="label">${uiLabelMap.CommonStateProvince}</td>
> +              <td>
> +                <select name="stateProvinceGeoId">
> +                  <#if currentStateGeo?has_content>
> +                    <option value="${currentStateGeo.geoId}">${currentStateGeo.geoName?default(currentStateGeo.geoId)}</option>
> +                    <option value="${currentStateGeo.geoId}">---</option>
> +                  </#if>
> +                  <option value="ANY">${uiLabelMap.CommonAnyStateProvince}</option>
> +                  ${screens.render("component://common/widget/CommonScreens.xml#states")}
> +                </select>
> +              </td>
> +            </tr>
> +            <tr>
> +              <td class="label">${uiLabelMap.PartyPostalCode}</td>
> +              <td><input type="text" name="postalCode" value="${parameters.postalCode?if_exists}"/></td>
> +            </tr>
> +          </#if>
> +          <#if extInfo == "T">
> +            <tr><td colspan="3"><hr/></td></tr>
> +            <tr>
> +              <td class="label">${uiLabelMap.PartyCountryCode}</td>
> +              <td><input type="text" name="countryCode" value="${parameters.countryCode?if_exists}"/></td>
> +            </tr>
> +            <tr>
> +              <td class="label">${uiLabelMap.PartyAreaCode}</td>
> +              <td><input type="text" name="areaCode" value="${parameters.areaCode?if_exists}"/></td>
> +            </tr>
> +            <tr>
> +              <td class="label">${uiLabelMap.PartyContactNumber}</td>
> +              <td><input type="text" name="contactNumber" value="${parameters.contactNumber?if_exists}"/></td>
> +            </tr>
> +          </#if>
> +          <#if extInfo == "O">
> +            <tr><td colspan="3"><hr/></td></tr>
> +            <tr>
> +              <td class="label">${uiLabelMap.PartyContactInformation}</td>
> +              <td><input type="text" name="infoString" value="${parameters.infoString?if_exists}"/></td>
> +            </tr>
> +          </#if>
> +          <tr><td colspan="3"><hr/></td></tr>
> +          <tr align="center">
> +            <td>&nbsp;</td>
> +            <td>
> +              <input type="submit" value="${uiLabelMap.PartyLookupParty}" onClick="javascript:document.lookupparty.submit();"/>
> +            </td>
> +          </tr>
> +        </table>
> +      </form>
> +    </div>
> +  </#if>
> +</div>
> +
> +<#if parameters.hideFields?default("N") != "Y">
> +  <script language="JavaScript" type="text/javascript">
> +    <!--//
> +      document.lookupparty.partyId.focus();
> +    //-->
> +  </script>
> +</#if>
>
> Propchange: ofbiz/trunk/applications/marketing/webapp/sfa/findSfaParty.ftl
> ------------------------------------------------------------------------------
>     svn:eol-style = native
>
> Propchange: ofbiz/trunk/applications/marketing/webapp/sfa/findSfaParty.ftl
> ------------------------------------------------------------------------------
>     svn:keywords = Date Rev Author URL Id
>
> Propchange: ofbiz/trunk/applications/marketing/webapp/sfa/findSfaParty.ftl
> ------------------------------------------------------------------------------
>     svn:mime-type = text/plain
>
> Added: ofbiz/trunk/applications/marketing/webapp/sfa/lead/LeadForms.xml
> URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/marketing/webapp/sfa/lead/LeadForms.xml?rev=651848&view=auto
> ==============================================================================
> --- ofbiz/trunk/applications/marketing/webapp/sfa/lead/LeadForms.xml (added)
> +++ ofbiz/trunk/applications/marketing/webapp/sfa/lead/LeadForms.xml Sat Apr 26 12:15:00 2008
> @@ -0,0 +1,92 @@
> +<?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="ListLeads" type="list" list-name="partyList" list-entry-name="partyRow" paginate-target="FindLead">
> +        <row-actions>
> +            <entity-one entity-name="PartyGroup" value-name="partyGroup">
> +                <field-map field-name="partyId" env-name="partyRow.partyId"/>
> +            </entity-one>
> +            <entity-one entity-name="Person" value-name="person">
> +                <field-map field-name="partyId" env-name="partyRow.partyId"/>
> +            </entity-one>
> +            <entity-one entity-name="PartyType" value-name="partyType">
> +                <field-map field-name="partyTypeId" env-name="partyRow.partyTypeId"/>
> +            </entity-one>
> +        </row-actions>
> +        <field name="partyId" title="${uiLabelMap.PartyPartyId}">
> +            <hyperlink target="/partymgr/control/viewprofile?partyId=${partyRow.partyId}" description="${partyRow.partyId}" target-type="inter-app"/>
> +        </field>
> +        <field name="partyName" title="${uiLabelMap.PartyName}" use-when="partyGroup != null"><display description="${partyGroup.groupName}"/></field>
> +        <field name="partyName" title="${uiLabelMap.PartyName}" use-when="person != null"><display description="${person.lastName}, ${person.firstName}"/></field>
> +        <field name="partyTypeId" title="${uiLabelMap.PartyType}"><display description="${partyType.description}"/> </field>
> +    </form>
> +    <form name="createLead" type="single" target="createLead" header-row-style="header-row" default-table-style="basic-table">
> +        <field name="leadType"><hidden value="${leadType}"/></field>
> +        <field name="firstName" use-when="leadType.equals(&quot;PERSON&quot;)" tooltip="${uiLabelMap.CommonRequired}" widget-style="required"><text/></field>
> +        <field name="lastName" use-when="leadType.equals(&quot;PERSON&quot;)" tooltip="${uiLabelMap.CommonRequired}" widget-style="required"><text/></field>
> +        <field name="suffix" use-when="leadType.equals(&quot;PERSON&quot;)"><text/></field>
> +        <field name="groupName" use-when="leadType.equals(&quot;GROUP&quot;)" title="${uiLabelMap.PartyGroupName}" tooltip="${uiLabelMap.CommonRequired}" widget-style="required"><text size="30" maxlength="60"/></field>
> +        <field name="numEmployees" use-when="leadType.equals(&quot;GROUP&quot;)" title="${uiLabelMap.MarketingEmployees}"><text size="30"/></field>
> +        <field name="siteName" use-when="leadType.equals(&quot;GROUP&quot;)" title="${uiLabelMap.FormFieldTitle_officeSiteName}"><text size="30" maxlength="60"/></field>
> +        <field name="postalAddressTitle" title="${uiLabelMap.PartyGeneralCorrespondenceAddress}" title-area-style="group-label"><display description=" " also-hidden="false"/></field>
> +        <field name="address1" title="${uiLabelMap.CommonAddress1}" tooltip="${uiLabelMap.CommonRequired}" widget-style="required"><text size="50" maxlength="60"/></field>
> +        <field name="address2" title="${uiLabelMap.CommonAddress2}"><text size="50" maxlength="60"/></field>
> +        <field name="city" title="${uiLabelMap.CommonCity}" tooltip="${uiLabelMap.CommonRequired}" widget-style="required"><text size="30" maxlength="60"/></field>
> +        <field name="state" title="${uiLabelMap.CommonState}" tooltip="${uiLabelMap.CommonRequired}" widget-style="required">
> +            <drop-down allow-empty="true">
> +                <entity-options entity-name="Geo" key-field-name="geoId" description="${geoId} - ${geoName}">
> +                    <entity-constraint name="geoTypeId" operator="in" value="STATE,PROVINCE"/>
> +                    <entity-order-by field-name="geoId"/>
> +                </entity-options>
> +            </drop-down>
> +        </field>
> +        <field name="postalCode" title="${uiLabelMap.CommonZipPostalCode}" tooltip="${uiLabelMap.CommonRequired}" widget-style="required"><text size="10" maxlength="30"/></field>
> +        <field name="country" title="${uiLabelMap.CommonCountry}" tooltip="${uiLabelMap.CommonRequired}" widget-style="required">
> +            <drop-down allow-empty="false" no-current-selected-key="${defaultCountryGeoId}">
> +                <entity-options entity-name="Geo" key-field-name="geoId" description="${geoId}: ${geoName}">
> +                    <entity-constraint name="geoTypeId" value="COUNTRY"/>
> +                    <entity-order-by field-name="geoId"/>
> +                </entity-options>
> +            </drop-down>
> +        </field>
> +        <field name="phoneTitle" title="${uiLabelMap.PartyPrimaryPhone}" title-area-style="group-label"><display/></field>
> +        <field name="countryCode" title="${uiLabelMap.PartyCountryCode}"><text size="4" maxlength="10"/></field>
> +        <field name="areaCode" title="${uiLabelMap.PartyAreaCode}"><text size="4" maxlength="10"/></field>
> +        <field name="contactNumber" title="${uiLabelMap.PartyPhoneNumber}"><text size="15" maxlength="15"/></field>
> +        <field name="extensionCode" title="${uiLabelMap.PartyContactExt}"><text size="6" maxlength="10"/></field>
> +        <field name="emailAddressTitle" title="${uiLabelMap.PartyEmailAddress}" title-area-style="group-label"><display/></field>
> +        <field name="emailAddress" title="${uiLabelMap.CommonEmail}"><text size="50" maxlength="60"/></field>
> +        <field name="leadSourceTitle" title="${uiLabelMap.SfaLeadSource}" title-area-style="group-label"><display/></field>
> +        <field name="leadSource" title="${uiLabelMap.SfaLeadSource}"><text size="50" maxlength="60"/></field>
> +        <field name="leadGroupTitle" title="${uiLabelMap.SfaLeadGroup}" use-when="leadType.equals(&quot;PERSON&quot;)" title-area-style="group-label"><display/></field>
> +        <field name="partyIdFrom" title="Lead Group" use-when="leadType.equals(&quot;PERSON&quot;)">
> +            <drop-down allow-empty="true">
> +                <entity-options entity-name="PartyRoleAndPartyDetail" description="${groupName} [${partyId}]" key-field-name="partyId">
> +                    <entity-constraint name="roleTypeId" operator="equals" value="LEAD"/>
> +                    <entity-constraint name="partyTypeId" operator="equals" value="PARTY_GROUP"/>
> +                </entity-options>
> +            </drop-down>
> +</field>
> +        <field name="submitButton" title="${uiLabelMap.CommonSave}" widget-style="smallSubmit"><submit button-type="button"/></field>
> +    </form>
> +</forms>
>
> Propchange: ofbiz/trunk/applications/marketing/webapp/sfa/lead/LeadForms.xml
> ------------------------------------------------------------------------------
>     svn:eol-style = native
>
> Propchange: ofbiz/trunk/applications/marketing/webapp/sfa/lead/LeadForms.xml
> ------------------------------------------------------------------------------
>     svn:keywords = Date Rev Author URL Id
>
> Propchange: ofbiz/trunk/applications/marketing/webapp/sfa/lead/LeadForms.xml
> ------------------------------------------------------------------------------
>     svn:mime-type = text/xml
>
> Modified: ofbiz/trunk/applications/marketing/widget/sfa/CommonScreens.xml
> URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/marketing/widget/sfa/CommonScreens.xml?rev=651848&r1=651847&r2=651848&view=diff
> ==============================================================================
> --- ofbiz/trunk/applications/marketing/widget/sfa/CommonScreens.xml (original)
> +++ ofbiz/trunk/applications/marketing/widget/sfa/CommonScreens.xml Sat Apr 26 12:15:00 2008
> @@ -29,6 +29,8 @@
>                  <property-map resource="PartyUiLabels" map-name="uiLabelMap" global="true"/>
>                  <property-map resource="OrderUiLabels" map-name="uiLabelMap" global="true"/>
>                  <property-map resource="MarketingUiLabels" map-name="uiLabelMap" global="true"/>
> +                <set field="layoutSettings.javaScripts[]" value="/partymgr/static/partymgr.js" global="true"/>
> +                <set field="layoutSettings.styleSheets[]" value="/partymgr/static/partymgr.css" global="true"/>
>                  <set field="layoutSettings.companyName" from-field="uiLabelMap.SfaCompanyName" global="true"/>
>                  <set field="layoutSettings.companySubtitle" from-field="uiLabelMap.MarketingCompanySubtitle" global="true"/>
>                  <set field="applicationMenuName" value="SfaAppBar" global="true"/>
>
> Added: ofbiz/trunk/applications/marketing/widget/sfa/LeadScreens.xml
> URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/marketing/widget/sfa/LeadScreens.xml?rev=651848&view=auto
> ==============================================================================
> --- ofbiz/trunk/applications/marketing/widget/sfa/LeadScreens.xml (added)
> +++ ofbiz/trunk/applications/marketing/widget/sfa/LeadScreens.xml Sat Apr 26 12:15:00 2008
> @@ -0,0 +1,114 @@
> +<?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.
> +-->
> +
> +<screens xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> +        xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/widget-screen.xsd">
> +
> +     <screen name="FindLead">
> +        <section>
> +            <actions>
> +                <set field="roleTypeId" value="LEAD"/>
> +            </actions>
> +            <widgets>
> +                <decorator-screen name="main-decorator" location="${parameters.mainDecoratorLocation}">
> +                    <decorator-section name="body">
> +                        <section>
> +                            <actions>
> +                                <service service-name="findParty" auto-field-map="true"/>
> +                            </actions>
> +                            <widgets>
> +                               <container><link target="CreateLead?leadType=PERSON" text="${uiLabelMap.CommonCreate} ${uiLabelMap.SfaLeadPerson}" style="buttontext"/><link target="CreateLead?leadType=GROUP" text="${uiLabelMap.CommonCreate} ${uiLabelMap.SfaLeadGroup}" style="buttontext"/></container>                              
> +                               <section>
> +                                    <widgets>
> +                                        <platform-specific>
> +                                            <html><html-template location="component://marketing/webapp/sfa/findSfaParty.ftl"/></html>
> +                                        </platform-specific>
> +                                        <container style="screenlet">
> +                                           <container style="screenlet-title-bar">
> +                                               <container style="h3">
> +                                                   <label text="${uiLabelMap.SfaFindResults}"/>
> +                                               </container>
> +                                           </container>
> +                                           <container style="screenlet-body">
> +                                               <section>
> +                                                   <condition>
> +                                                       <not>
> +                                                           <if-empty field-name="partyList"/>
> +                                                       </not>
> +                                                   </condition>
> +                                                   <widgets>
> +                                                       <include-form name="ListLeads" location="component://marketing/webapp/sfa/lead/LeadForms.xml"/>
> +                                                   </widgets>
> +                                                   <fail-widgets>
> +                                                       <container style="h3">
> +                                                           <label text="${uiLabelMap.PartyNoPartiesFound}"/>
> +                                                       </container>
> +                                                   </fail-widgets>
> +                                               </section>
> +                                           </container>
> +                                        </container>
> +                                    </widgets>
> +                                </section>
> +                            </widgets>
> +                        </section>
> +                    </decorator-section>
> +                </decorator-screen>
> +            </widgets>
> +        </section>  
> +    </screen>
> +    <screen name="CreateLead">
> +        <section>
> +            <actions>
> +                <set field="titleProperty" value="PageTitleCreateLead"/>
> +                <set field="leadType" from-field="parameters.leadType"/>
> +            </actions>
> +            <widgets>
> +                <decorator-screen name="main-decorator" location="${parameters.mainDecoratorLocation}">
> +                    <decorator-section name="body">
> +                          <container style="screenlet">
> +                                <container style="screenlet-title-bar">
> +                                    <container style="h3">
> +                                        <section>
> +                                            <condition>
> +                                                <if-compare value="PERSON" field-name="leadType" operator="equals"/>
> +                                            </condition>
> +                                            <widgets>
> +                                                <label text="${uiLabelMap.CommonCreate} ${uiLabelMap.SfaLeadPerson}"/>
> +                                            </widgets>
> +                                            <fail-widgets>
> +                                                <label text="${uiLabelMap.CommonCreate} ${uiLabelMap.SfaLeadGroup}"/>
> +                                            </fail-widgets>
> +                                        </section>
> +                                    </container>
> +                                </container>
> +                                <container style="screenlet-body">
> +                                    <section>
> +                                        <widgets>
> +                                            <include-form name="createLead" location="component://marketing/webapp/sfa/lead/LeadForms.xml"/>
> +                                        </widgets>
> +                                    </section>
> +                                </container>
> +                            </container>
> +                    </decorator-section>
> +                </decorator-screen>
> +            </widgets>
> +        </section>
> +    </screen>
> +</screens>
>
> Propchange: ofbiz/trunk/applications/marketing/widget/sfa/LeadScreens.xml
> ------------------------------------------------------------------------------
>     svn:eol-style = native
>
> Propchange: ofbiz/trunk/applications/marketing/widget/sfa/LeadScreens.xml
> ------------------------------------------------------------------------------
>     svn:keywords = Date Rev Author URL Id
>
> Propchange: ofbiz/trunk/applications/marketing/widget/sfa/LeadScreens.xml
> ------------------------------------------------------------------------------
>     svn:mime-type = text/xml
>
> Modified: ofbiz/trunk/applications/marketing/widget/sfa/SfaMenus.xml
> URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/marketing/widget/sfa/SfaMenus.xml?rev=651848&r1=651847&r2=651848&view=diff
> ==============================================================================
> --- ofbiz/trunk/applications/marketing/widget/sfa/SfaMenus.xml (original)
> +++ ofbiz/trunk/applications/marketing/widget/sfa/SfaMenus.xml Sat Apr 26 12:15:00 2008
> @@ -23,7 +23,7 @@
>          <menu-item name="Main" title="${uiLabelMap.MarketingMainPage}"><link target="main"/></menu-item>
>          <menu-item name="Accounts" title="${uiLabelMap.SfaAcccounts}"><link target="FindAccounts"/></menu-item>
>          <menu-item name="Contacts" title="${uiLabelMap.SfaContacts}"><link target=""/></menu-item>
> -        <menu-item name="Leads" title="${uiLabelMap.SfaLeads}"><link target=""/></menu-item>
> +        <menu-item name="Leads" title="${uiLabelMap.SfaLeads}"><link target="FindLead"/></menu-item>
>          <menu-item name="Competitors" title="${uiLabelMap.SfaCompetitors}"><link target=""/></menu-item>
>          <menu-item name="Events" title="${uiLabelMap.SfaEvents}"><link target=""/></menu-item>
>          <menu-item name="Documents" title="${uiLabelMap.SfaDocuments}"><link target=""/></menu-item>
> @@ -50,4 +50,4 @@
>          <menu-item name="viewAccount" title="${uiLabelMap.PageTitleAccountSummary}"><link target="ViewAccount?partyId=${partyId}"/></menu-item>
>          <menu-item name="editAccount" title="${uiLabelMap.PageTitleEditAccount}"><link target=""/></menu-item>
>      </menu>
> -</menus>
> \ No newline at end of file
> +</menus>
>
> Modified: ofbiz/trunk/applications/party/config/PartyUiLabels.xml
> URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/party/config/PartyUiLabels.xml?rev=651848&r1=651847&r2=651848&view=diff
> ==============================================================================
> --- ofbiz/trunk/applications/party/config/PartyUiLabels.xml (original)
> +++ ofbiz/trunk/applications/party/config/PartyUiLabels.xml Sat Apr 26 12:15:00 2008
> @@ -3406,6 +3406,15 @@
>          <value xml:lang="th">เพศ</value>
>          <value xml:lang="zh">性别</value>
>      </property>
> +    <property key="PartyGeneralCorrespondenceAddress">
> +        <value xml:lang="en">General Correspondence Address</value>
> +        <value xml:lang="fr">Adresse principale</value>
> +        <value xml:lang="it">Indirizzo Generale Corrispondenza</value>
> +        <value xml:lang="ro">Adresa Generala Corespondenta</value>
> +        <value xml:lang="ru">Адрес для корреспонденции</value>
> +        <value xml:lang="th">ที่อยู่ทั่วไปที่ติดต่อกันทางจดหมาย</value>
> +        <value xml:lang="zh">通信地址</value>
> +    </property>
>      <property key="PartyGoToParent">
>          <value xml:lang="en">Go to Parent</value>
>          <value xml:lang="th">ไปยังผู้ดูแล</value>
> @@ -5048,6 +5057,15 @@
>          <value xml:lang="ru">Цена</value>
>          <value xml:lang="th">ราคา</value>
>          <value xml:lang="zh">ä»·æ ¼</value>
> +    </property>
> +    <property key="PartyPrimaryPhone">
> +        <value xml:lang="en">Primary Phone Number</value>
> +        <value xml:lang="fr">Numéro de téléphone principal</value>
> +        <value xml:lang="it">Numero Telefono Principale</value>
> +        <value xml:lang="ro">Numero Telefon Principal</value>
> +        <value xml:lang="ru">Основной телефонный номер</value>
> +        <value xml:lang="th">เบอร์โทรศัพท์ที่สำคัญ</value>
> +        <value xml:lang="zh">ç¬¬ä¸€ä¸ªç”µè¯å·ç </value>
>      </property>
>      <property key="PartyProduct">
>          <value xml:lang="en">Product</value>
>
> Modified: ofbiz/trunk/applications/party/script/org/ofbiz/party/party/PartySimpleMethods.xml
> URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/party/script/org/ofbiz/party/party/PartySimpleMethods.xml?rev=651848&r1=651847&r2=651848&view=diff
> ==============================================================================
> --- ofbiz/trunk/applications/party/script/org/ofbiz/party/party/PartySimpleMethods.xml (original)
> +++ ofbiz/trunk/applications/party/script/org/ofbiz/party/party/PartySimpleMethods.xml Sat Apr 26 12:15:00 2008
> @@ -91,4 +91,143 @@
>          <field-to-result field-name="newUserLogin"/>
>          <field-to-result field-name="createUlInMap.partyId" result-name="partyId"/>
>      </simple-method>
> +
> +    <!-- Simple method to create a person, its role and basic contact mechs -->
> +    <simple-method method-name="createPersonRoleAndContactMechs" short-description="Creates a person, role and contactMechs">
> +        <call-map-processor processor-name="person" in-map-name="parameters" out-map-name="personContext"
> +            xml-resource="org/ofbiz/party/party/PartyMapProcs.xml"/>
> +    
> +        <call-map-processor processor-name="postalAddress" in-map-name="parameters" out-map-name="postalAddressContext"
> +            xml-resource="org/ofbiz/party/contact/PartyContactMechMapProcs.xml"/>
> +    
> +        <if-not-empty field-name="parameters.contactNumber">
> +            <call-map-processor processor-name="telecomNumber" in-map-name="parameters" out-map-name="telecomNumberContext"
> +                xml-resource="org/ofbiz/party/contact/PartyContactMechMapProcs.xml"/>
> +        </if-not-empty>
> +    
> +        <if-not-empty field-name="parameters.emailAddress">
> +            <call-map-processor in-map-name="parameters" out-map-name="emailAddressContext">
> +                <simple-map-processor name="emailAddress">
> +                    <process field="emailAddress">
> +                        <copy/>
> +                        <validate-method method="isEmail"><fail-property resource="PartyUiLabels" property="PartyEmailAddressNotFormattedCorrectly"/></validate-method>
> +                    </process>
> +                </simple-map-processor>
> +            </call-map-processor>
> +        </if-not-empty>
> +        <check-errors/>
> +    
> +        <call-service service-name="createPerson" in-map-name="personContext">
> +            <result-to-field result-name="partyId" field-name="partyId"/>
> +        </call-service>
> +    
> +        <if-not-empty field-name="parameters.roleTypeId">
> +            <set field="createPartyRoleCtx.partyId" from-field="partyId"/>
> +            <set field="createPartyRoleCtx.roleTypeId" from-field="parameters.roleTypeId"/>
> +            <call-service service-name="createPartyRole" in-map-name="createPartyRoleCtx"/>
> +        </if-not-empty>
> +    
> +        <set field="postalAddContactMechPurpTypeId" from-field="parameters.postalAddContactMechPurpTypeId"/>
> +        <set field="contactNumber" from-field="parameters.contactNumber"/>
> +        <set field="phoneContactMechPurpTypeId" from-field="parameters.phoneContactMechPurpTypeId"/>
> +        <set field="emailAddress" from-field="parameters.emailAddress"/>
> +        <set field="emailContactMechPurpTypeId" from-field="parameters.emailContactMechPurpTypeId"/>
> +        <call-simple-method method-name="createPartyContactMechs"/>        
> +    </simple-method>
> +
> +    <!-- Simple method to create a party group, its role and basic contact mechs -->
> +    <simple-method method-name="createPartyGroupRoleAndContactMechs" short-description="Creates a party group, role and contactMechs">
> +        <call-map-processor processor-name="partyGroup" in-map-name="parameters" out-map-name="partyGroupContext"
> +            xml-resource="org/ofbiz/party/party/PartyMapProcs.xml"/>
> +    
> +        <call-map-processor processor-name="postalAddress" in-map-name="parameters" out-map-name="postalAddressContext"
> +            xml-resource="org/ofbiz/party/contact/PartyContactMechMapProcs.xml"/>
> +    
> +        <if-not-empty field-name="parameters.contactNumber">
> +            <call-map-processor processor-name="telecomNumber" in-map-name="parameters" out-map-name="telecomNumberContext"
> +                xml-resource="org/ofbiz/party/contact/PartyContactMechMapProcs.xml"/>
> +        </if-not-empty>
> +    
> +        <if-not-empty field-name="parameters.emailAddress">
> +            <call-map-processor in-map-name="parameters" out-map-name="emailAddressContext">
> +                <simple-map-processor name="emailAddress">
> +                    <process field="emailAddress">
> +                        <copy/>
> +                        <validate-method method="isEmail"><fail-property resource="PartyUiLabels" property="PartyEmailAddressNotFormattedCorrectly"/></validate-method>
> +                    </process>
> +                </simple-map-processor>
> +            </call-map-processor>
> +        </if-not-empty>
> +        <check-errors/>
> +    
> +        <set field="partyGroupContext.partyTypeId" value="PARTY_GROUP"/>
> +        <call-service service-name="createPartyGroup" in-map-name="partyGroupContext">
> +            <result-to-field result-name="partyId" field-name="partyId"/>
> +        </call-service>
> +    
> +        <if-not-empty field-name="parameters.roleTypeId">
> +            <set field="createPartyRoleCtx.partyId" from-field="partyId"/>
> +            <set field="createPartyRoleCtx.roleTypeId" from-field="parameters.roleTypeId"/>
> +            <call-service service-name="createPartyRole" in-map-name="createPartyRoleCtx"/>
> +        </if-not-empty>
> +    
> +        <set field="postalAddContactMechPurpTypeId" from-field="parameters.postalAddContactMechPurpTypeId"/>
> +        <set field="contactNumber" from-field="parameters.contactNumber"/>
> +        <set field="phoneContactMechPurpTypeId" from-field="parameters.phoneContactMechPurpTypeId"/>
> +        <set field="emailAddress" from-field="parameters.emailAddress"/>
> +        <set field="emailContactMechPurpTypeId" from-field="parameters.emailContactMechPurpTypeId"/>
> +        <call-simple-method method-name="createPartyContactMechs"/>        
> +    </simple-method>
> +
> +    <!-- Simple method to create Party Postal Address, Telecom Number and Email Address, to be used by
> +         createPersonRoleAndContactMechs and createPartyGroupRoleAndContactMechs simple methods -->
> +    <simple-method method-name="createPartyContactMechs" short-description="Create Contact Mechs">
> +        <!-- Create Party Postal Address and set purpose -->
> +        <set field="postalAddressContext.partyId" from-field="partyId"/>
> +        <call-service service-name="createPartyPostalAddress" in-map-name="postalAddressContext">
> +            <result-to-field result-name="contactMechId" field-name="addressContactMechId"/>
> +        </call-service>
> +    
> +        <set field="postalAddressPurposeCtx.partyId" from-field="partyId"/>
> +        <set field="postalAddressPurposeCtx.contactMechId" from-field="addressContactMechId"/>
> +        <set field="postalAddressPurposeCtx.contactMechPurposeTypeId" value="GENERAL_LOCATION"/>
> +        <call-service service-name="createPartyContactMechPurpose" in-map-name="postalAddressPurposeCtx"/>
> +    
> +        <if-not-empty field-name="postalAddContactMechPurpTypeId">
> +            <set field="postalAddressPurposeCtx.contactMechPurposeTypeId" from-field="postalAddContactMechPurpTypeId"/>
> +            <call-service service-name="createPartyContactMechPurpose" in-map-name="postalAddressPurposeCtx"/>
> +        </if-not-empty>
> +    
> +        <!-- Create Party Telecom Number and set purpose -->
> +        <if-not-empty field-name="contactNumber">
> +            <set field="telecomNumberContext.partyId" from-field="partyId"/>
> +            <call-service service-name="createPartyTelecomNumber" in-map-name="telecomNumberContext">
> +                <result-to-field result-name="contactMechId" field-name="phoneContactMechId"/>
> +            </call-service>
> +        
> +            <set field="phonePurposeContext.partyId" from-field="partyId"/>
> +            <set field="phonePurposeContext.contactMechId" from-field="phoneContactMechId"/>
> +            <set field="phonePurposeContext.contactMechPurposeTypeId" from-field="phoneContactMechPurpTypeId"/>
> +            <if-empty field-name="phonePurposeContext.contactMechPurposeTypeId">
> +                <set field="phonePurposeContext.contactMechPurposeTypeId" value="PRIMARY_PHONE"/>
> +            </if-empty>
> +            <call-service service-name="createPartyContactMechPurpose" in-map-name="phonePurposeContext"/>
> +        </if-not-empty>
> +    
> +        <!-- Create Party Email Address and set purpose -->
> +        <if-not-empty field-name="emailAddress">
> +            <set field="emailAddressContext.partyId" from-field="partyId"/>
> +            <call-service service-name="createPartyEmailAddress" in-map-name="emailAddressContext">
> +                <result-to-field result-name="contactMechId" field-name="emailContactMechId"/>
> +            </call-service>
> +        
> +            <set field="emailPurposeContext.partyId" from-field="partyId"/>
> +            <set field="emailPurposeContext.contactMechId" from-field="emailContactMechId"/>
> +            <set field="emailPurposeContext.contactMechPurposeTypeId" from-field="emailContactMechPurpTypeId"/>
> +            <if-empty field-name="emailPurposeContext.contactMechPurposeTypeId">
> +                 <set field="emailPurposeContext.contactMechPurposeTypeId" value="PRIMARY_EMAIL"/>
> +            </if-empty>
> +            <call-service service-name="createPartyContactMechPurpose" in-map-name="emailPurposeContext"/>
> +        </if-not-empty>
> +    </simple-method>
>  </simple-methods>
>
>
>
--
AntWebsystems.com: Quality OFBiz services for competitive rates.....

Reply | Threaded
Open this post in threaded view
|

Re: svn commit: r651848 - in /ofbiz/trunk/applications: marketing/config/ marketing/data/ marketing/script/org/ofbiz/sfa/lead/ marketing/servicedef/ marketing/webapp/sfa/ marketing/webapp/sfa/WEB-INF/ marketing/webapp/sfa/lead/ marketing/widget/sfa/ party/...

Anil Patel-3
Hans,
thanks for your comments. Can you please help with further details of  
PartyRelationship that we need to setup?

Regards
Anil Patel

On Apr 26, 2008, at 9:41 PM, Hans Bakker wrote:

> First of all a nice addition to the SFA application....however:
>
> the issue states:
> Lead is both a Person and PartyGroup (related by a PartyRelationship)
> because much of the information in a lead translates directly into
> Account and Contact information and this way the Lead records can  
> either
> be duplicated, or simply modified adding the Account and Contact  
> roles.
> For the Person and Party-Group parties will be in the Lead role.
>
> and in the leadcreation I have to create a lead (person) and
> leadgroup(account/company) seperately....
>
> why using a ftl and not a form? we had this discussion before in the
> projectmanager.....
>
> In general a good start....and co-operation?
>
> we are currently extending the account/opportunity screens.
>
> Regards,
> Hans
>
>
> On Sat, 2008-04-26 at 19:15 +0000, [hidden email] wrote:
>> Author: apatel
>> Date: Sat Apr 26 12:15:00 2008
>> New Revision: 651848
>>
>> URL: http://svn.apache.org/viewvc?rev=651848&view=rev
>> Log:
>> New events and services and Forms for adding leads. Thanks Mridul  
>> Pathak, Jyotsna Rathore, Sumit Pandit, Rathnesh, Awdesh Parihar and  
>> others for helping.
>>
>> Added:
>>    ofbiz/trunk/applications/marketing/script/org/ofbiz/sfa/lead/
>>    ofbiz/trunk/applications/marketing/script/org/ofbiz/sfa/lead/
>> LeadServices.xml   (with props)
>>    ofbiz/trunk/applications/marketing/webapp/sfa/findSfaParty.ftl    
>> (with props)
>>    ofbiz/trunk/applications/marketing/webapp/sfa/lead/
>>    ofbiz/trunk/applications/marketing/webapp/sfa/lead/
>> LeadForms.xml   (with props)
>>    ofbiz/trunk/applications/marketing/widget/sfa/LeadScreens.xml    
>> (with props)
>> Modified:
>>    ofbiz/trunk/applications/marketing/config/MarketingUiLabels.xml
>>    ofbiz/trunk/applications/marketing/data/MarketingTypeData.xml
>>    ofbiz/trunk/applications/marketing/servicedef/services.xml
>>    ofbiz/trunk/applications/marketing/webapp/sfa/WEB-INF/
>> controller.xml
>>    ofbiz/trunk/applications/marketing/widget/sfa/CommonScreens.xml
>>    ofbiz/trunk/applications/marketing/widget/sfa/SfaMenus.xml
>>    ofbiz/trunk/applications/party/config/PartyUiLabels.xml
>>    ofbiz/trunk/applications/party/script/org/ofbiz/party/party/
>> PartySimpleMethods.xml
>>
>> Modified: ofbiz/trunk/applications/marketing/config/
>> MarketingUiLabels.xml
>> URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/marketing/config/MarketingUiLabels.xml?rev=651848&r1=651847&r2=651848&view=diff
>> =
>> =
>> =
>> =
>> =
>> =
>> =
>> =
>> =
>> =====================================================================
>> --- ofbiz/trunk/applications/marketing/config/MarketingUiLabels.xml  
>> (original)
>> +++ ofbiz/trunk/applications/marketing/config/MarketingUiLabels.xml  
>> Sat Apr 26 12:15:00 2008
>> @@ -1125,11 +1125,23 @@
>>     <property key="SfaCompetitors">
>>         <value xml:lang="en">Competitors &amp; Partners </value>
>>     </property>
>> +    <property key="SfaLeadGroup">
>> +        <value xml:lang="en">Lead Group</value>
>> +    </property>
>> +    <property key="SfaLeadPerson">
>> +        <value xml:lang="en">Lead Person</value>
>> +    </property>
>> +    <property key="SfaLeadSource">
>> +        <value xml:lang="en">Lead Source</value>
>> +    </property>
>>     <property key="SfaDocuments">
>>         <value xml:lang="en">Documents</value>
>>     </property>
>>     <property key="SfaEvents">
>>         <value xml:lang="en">Events</value>
>> +    </property>
>> +    <property key="SfaFindLeads">
>> +        <value xml:lang="en">Find Leads</value>
>>     </property>
>>     <property key="SfaForecasts">
>>         <value xml:lang="en">Forecast</value>
>>
>> Modified: ofbiz/trunk/applications/marketing/data/
>> MarketingTypeData.xml
>> URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/marketing/data/MarketingTypeData.xml?rev=651848&r1=651847&r2=651848&view=diff
>> =
>> =
>> =
>> =
>> =
>> =
>> =
>> =
>> =
>> =====================================================================
>> --- ofbiz/trunk/applications/marketing/data/MarketingTypeData.xml  
>> (original)
>> +++ ofbiz/trunk/applications/marketing/data/MarketingTypeData.xml  
>> Sat Apr 26 12:15:00 2008
>> @@ -58,4 +58,6 @@
>>     <EnumerationType description="Tracking Code Source"  
>> enumTypeId="TRACKINGCODE_SRC" hasTable="N" parentTypeId=""/>
>>     <Enumeration description="Cookie" enumCode="COOKIE"  
>> enumId="TKCDSRC_COOKIE" sequenceId="01"  
>> enumTypeId="TRACKINGCODE_SRC"/>
>>     <Enumeration description="URL Parameter" enumCode="URL_PARAM"  
>> enumId="TKCDSRC_URL_PARAM" sequenceId="01"  
>> enumTypeId="TRACKINGCODE_SRC"/>
>> +
>> +    <DataSourceType dataSourceTypeId="LEAD_SOURCE"  
>> description="Lead Source"/>
>> </entity-engine-xml>
>>
>> Added: ofbiz/trunk/applications/marketing/script/org/ofbiz/sfa/lead/
>> LeadServices.xml
>> URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/marketing/script/org/ofbiz/sfa/lead/LeadServices.xml?rev=651848&view=auto
>> =
>> =
>> =
>> =
>> =
>> =
>> =
>> =
>> =
>> =====================================================================
>> --- ofbiz/trunk/applications/marketing/script/org/ofbiz/sfa/lead/
>> LeadServices.xml (added)
>> +++ ofbiz/trunk/applications/marketing/script/org/ofbiz/sfa/lead/
>> LeadServices.xml Sat Apr 26 12:15:00 2008
>> @@ -0,0 +1,67 @@
>> +<?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.
>> +-->
>> +
>> +<simple-methods xmlns:xsi="http://www.w3.org/2001/XMLSchema- 
>> instance"
>> +    xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/simple-methods.xsd 
>> ">
>> +
>> +    <simple-method method-name="createLead"  short-
>> description="create Lead Person or Lead Group">
>> +        <if-not-empty field-name="parameters.leadType">
>> +            <set field="leadType" from-field="parameters.leadType"/>
>> +            <else>
>> +                <set field="leadType" value="PERSON"/>
>> +            </else>
>> +        </if-not-empty>
>> +
>> +        <set field="parameters.roleTypeId" value="LEAD"/>
>> +        <if-compare field-name="leadType" operator="equals"  
>> value="PERSON">
>> +            <call-simple-method method-
>> name="createPersonRoleAndContactMechs" xml-resource="org/ofbiz/
>> party/party/PartySimpleMethods.xml"/>
>> +
>> +            <if-not-empty field-name="parameters.partyIdFrom">
>> +                <set field="partyRelationshipContext.partyIdFrom"  
>> from-field="parameters.partyIdFrom"/>
>> +                <set field="partyRelationshipContext.partyIdTo"  
>> from-field="partyId"/>
>> +                <set  
>> field="partyRelationshipContext.roleTypeIdFrom" value="LEAD"/>
>> +                <set field="partyRelationshipContext.roleTypeIdTo"  
>> value="LEAD"/>
>> +                <set  
>> field="partyRelationshipContext.partyRelationshipTypeId"  
>> value="GROUP_ROLLUP"/>
>> +                <call-service service-
>> name="createPartyRelationship" in-map-
>> name="partyRelationshipContext"/>
>> +            </if-not-empty>
>> +        </if-compare>
>> +
>> +        <if-compare field-name="leadType" operator="equals"  
>> value="GROUP">
>> +            <call-simple-method method-
>> name="createPartyGroupRoleAndContactMechs" xml-resource="org/ofbiz/
>> party/party/PartySimpleMethods.xml"/>
>> +        </if-compare>
>> +
>> +        <if-not-empty field-name="parameters.leadSource">
>> +            <make-value entity-name="DataSource" value-
>> name="dataSource"/>
>> +            <sequenced-id-to-env sequence-name="DataSource" env-
>> name="dataSourceId"/>
>> +            <set field="dataSource.dataSourceId" from-
>> field="dataSourceId"/>
>> +            <set field="dataSource.dataSourceTypeId"  
>> value="LEAD_SOURCE"/>
>> +            <set field="dataSource.description" from-
>> field="parameters.leadSource"/>
>> +            <create-value value-name="dataSource"/>
>> +
>> +            <make-value entity-name="PartyDataSource" value-
>> name="partyDataSource"/>
>> +            <set field="partyDataSource.partyId" from-
>> field="partyId"/>
>> +            <set field="partyDataSource.dataSourceId" from-
>> field="dataSourceId"/>
>> +            <now-timestamp-to-env env-name="nowTimestamp"/>
>> +            <set field="partyDataSource.fromDate" from-
>> field="nowTimestamp"/>
>> +            <set field="partyDataSource.isCreate" value="Y"/>
>> +            <create-value value-name="partyDataSource"/>
>> +        </if-not-empty>
>> +    </simple-method>
>> +</simple-methods>
>>
>> Propchange: ofbiz/trunk/applications/marketing/script/org/ofbiz/sfa/
>> lead/LeadServices.xml
>> ------------------------------------------------------------------------------
>>    svn:eol-style = native
>>
>> Propchange: ofbiz/trunk/applications/marketing/script/org/ofbiz/sfa/
>> lead/LeadServices.xml
>> ------------------------------------------------------------------------------
>>    svn:keywords = Date Rev Author URL Id
>>
>> Propchange: ofbiz/trunk/applications/marketing/script/org/ofbiz/sfa/
>> lead/LeadServices.xml
>> ------------------------------------------------------------------------------
>>    svn:mime-type = text/xml
>>
>> Modified: ofbiz/trunk/applications/marketing/servicedef/services.xml
>> URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/marketing/servicedef/services.xml?rev=651848&r1=651847&r2=651848&view=diff
>> =
>> =
>> =
>> =
>> =
>> =
>> =
>> =
>> =
>> =====================================================================
>> --- ofbiz/trunk/applications/marketing/servicedef/services.xml  
>> (original)
>> +++ ofbiz/trunk/applications/marketing/servicedef/services.xml Sat  
>> Apr 26 12:15:00 2008
>> @@ -384,4 +384,26 @@
>>         <auto-attributes mode="IN" include="pk" optional="false"/>
>>         <auto-attributes mode="IN" include="nonpk" optional="true"/>
>>     </service>
>> +
>> +    <!-- lead services -->
>> +    <service name="createLead" engine="simple"
>> +        location="org/ofbiz/sfa/lead/LeadServices.xml"  
>> invoke="createLead">
>> +        <description>Create a Lead Person or Group</description>
>> +        <auto-attributes entity-name="Person" mode="IN"  
>> optional="true">
>> +            <exclude field-name="partyId"/>
>> +        </auto-attributes>
>> +        <auto-attributes entity-name="PartyGroup" mode="IN"  
>> optional="true">
>> +            <exclude field-name="partyId"/>
>> +        </auto-attributes>
>> +        <auto-attributes entity-name="PostalAddress" mode="IN"  
>> optional="true">
>> +            <exclude field-name="contactMechId"/>
>> +        </auto-attributes>
>> +        <auto-attributes entity-name="TelecomNumber" mode="IN"  
>> optional="true">
>> +            <exclude field-name="contactMechId"/>
>> +        </auto-attributes>
>> +        <attribute name="emailAddress" type="String" mode="IN"  
>> optional="true"/>
>> +        <attribute name="partyIdFrom" type="String" mode="IN"  
>> optional="true"/>
>> +        <attribute name="leadType" type="String" mode="IN"  
>> optional="false"/><!-- can be PERSON OR GROUP -->
>> +        <attribute name="leadSource" type="String" mode="IN"  
>> optional="true"/>
>> +    </service>
>>  </services>
>>
>> Modified: ofbiz/trunk/applications/marketing/webapp/sfa/WEB-INF/
>> controller.xml
>> URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/marketing/webapp/sfa/WEB-INF/controller.xml?rev=651848&r1=651847&r2=651848&view=diff
>> =
>> =
>> =
>> =
>> =
>> =
>> =
>> =
>> =
>> =====================================================================
>> --- ofbiz/trunk/applications/marketing/webapp/sfa/WEB-INF/
>> controller.xml (original)
>> +++ ofbiz/trunk/applications/marketing/webapp/sfa/WEB-INF/
>> controller.xml Sat Apr 26 12:15:00 2008
>> @@ -82,6 +82,22 @@
>>         <security https="true" auth="true"/>
>>         <response name="success" type="view" value="ViewAccount"/>
>>     </request-map>
>> +
>> +    <!-- Lead Requests -->
>> +    <request-map uri="FindLead">
>> +        <security https="true" auth="true"/>
>> +        <response name="success" type="view" value="FindLead"/>
>> +    </request-map>
>> +    <request-map uri="CreateLead">
>> +        <security https="true" auth="true"/>
>> +        <response name="success" type="view" value="CreateLead"/>
>> +    </request-map>
>> +    <request-map uri="createLead">
>> +        <security https="true" auth="true"/>
>> +        <event type="service" invoke="createLead"/>
>> +        <response name="success" type="view" value="FindLead"/>
>> +        <response name="error" type="view" value="CreateLead"/>
>> +    </request-map>
>>     <!-- end of request mappings -->
>>
>>     <!-- View Mappings -->
>> @@ -93,5 +109,7 @@
>>     <view-map name="FindAccounts" type="screen" page="component://
>> marketing/widget/sfa/AccountScreens.xml#FindAccounts"/>
>>     <view-map name="NewAccounts" type="screen" page="component://
>> marketing/widget/sfa/AccountScreens.xml#NewAccounts"/>
>>     <view-map name="ViewAccount" type="screen" page="component://
>> marketing/widget/sfa/AccountScreens.xml#ViewAccount"/>
>> +    <view-map name="FindLead" type="screen" page="component://
>> marketing/widget/sfa/LeadScreens.xml#FindLead"/>
>> +    <view-map name="CreateLead" type="screen" page="component://
>> marketing/widget/sfa/LeadScreens.xml#CreateLead"/>
>>     <!-- end of view mappings -->
>> </site-conf>
>>
>> Added: ofbiz/trunk/applications/marketing/webapp/sfa/findSfaParty.ftl
>> URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/marketing/webapp/sfa/findSfaParty.ftl?rev=651848&view=auto
>> =
>> =
>> =
>> =
>> =
>> =
>> =
>> =
>> =
>> =====================================================================
>> --- ofbiz/trunk/applications/marketing/webapp/sfa/findSfaParty.ftl  
>> (added)
>> +++ ofbiz/trunk/applications/marketing/webapp/sfa/findSfaParty.ftl  
>> Sat Apr 26 12:15:00 2008
>> @@ -0,0 +1,148 @@
>> +<#--
>> +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.
>> +-->
>> +
>> +<#assign extInfo = parameters.extInfo?default("N")>
>> +<#if roleTypeId=="LEAD">
>> +  <#assign currentUrl="FindLead"/>
>> +  <#assign title="${uiLabelMap.SfaFindLeads}">
>> +</#if>
>> +<div id="findPartyParameters" class="screenlet">
>> +  <div class="screenlet-title-bar">
>> +    <ul>
>> +      <li class="h3">${title?if_exists}</li>
>> +      <#if parameters.hideFields?default("N") == "Y">
>> +        <li><a href="<@ofbizUrl>${currentUrl?if_exists}?
>> hideFields=N${paramList}</@ofbizUrl>">$
>> {uiLabelMap.CommonShowLookupFields}</a></li>
>> +      <#else>
>> +        <#if partyList?exists><li><a href="<@ofbizUrl>${currentUrl?
>> if_exists}?hideFields=Y${paramList}</@ofbizUrl>">$
>> {uiLabelMap.CommonHideFields}</a></li></#if>
>> +        <li><a href="javascript:document.lookupparty.submit();">$
>> {uiLabelMap.PartyLookupParty}</a></li>
>> +      </#if>
>> +    </ul>
>> +    <br/><br/>
>> +  </div>
>> +  <#if parameters.hideFields?default("N") != "Y">
>> +    <div class="screenlet-body">
>> +      <#-- NOTE: this form is setup to allow a search by partial  
>> partyId or userLoginId; to change it to go directly to
>> +          the viewprofile page when these are entered add the  
>> follow attribute to the form element:
>> +
>> +            
>> onsubmit="javascript:lookupParty('<@ofbizUrl>viewprofile</
>> @ofbizUrl>');"
>> +       -->
>> +      <form method="post" name="lookupparty" action="<@ofbizUrl>$
>> {currentUrl?if_exists}</@ofbizUrl>" class="basic-form">
>> +        <input type="hidden" name="lookupFlag" value="Y"/>
>> +        <input type="hidden" name="hideFields" value="Y"/>
>> +        <input type="hidden" name="roleTypeId" value="$
>> {roleTypeId}"/>
>> +        <table cellspacing="0">
>> +          <tr>
>> +            <td class="label">$
>> {uiLabelMap.PartyContactInformation}</td>
>> +            <td>
>> +              <input type="radio" name="extInfo" value="N"  
>> onclick="javascript:refreshInfo();" <#if extInfo ==  
>> "N">checked="checked"</#if>/>${uiLabelMap.CommonNone}&nbsp;
>> +              <input type="radio" name="extInfo" value="P"  
>> onclick="javascript:refreshInfo();" <#if extInfo ==  
>> "P">checked="checked"</#if>/>${uiLabelMap.PartyPostal}&nbsp;
>> +              <input type="radio" name="extInfo" value="T"  
>> onclick="javascript:refreshInfo();" <#if extInfo ==  
>> "T">checked="checked"</#if>/>${uiLabelMap.PartyTelecom}&nbsp;
>> +              <input type="radio" name="extInfo" value="O"  
>> onclick="javascript:refreshInfo();" <#if extInfo ==  
>> "O">checked="checked"</#if>/>${uiLabelMap.CommonOther}&nbsp;
>> +            </td>
>> +          </tr>
>> +          <tr>
>> +            <td class="label">${uiLabelMap.PartyPartyId}</td>
>> +            <td><input type="text" name="partyId" value="$
>> {parameters.partyId?if_exists}"/></td>
>> +          </tr>
>> +          <tr>
>> +            <td class="label">${uiLabelMap.PartyLastName}</td>
>> +            <td><input type="text" name="lastName" value="$
>> {parameters.lastName?if_exists}"/></td>
>> +          </tr>
>> +          <tr>
>> +            <td class="label">${uiLabelMap.PartyFirstName}</td>
>> +            <td><input type="text" name="firstName" value="$
>> {parameters.firstName?if_exists}"/></td>
>> +          </tr>
>> +          <tr>
>> +            <td class="label">${uiLabelMap.PartyPartyGroupName}</td>
>> +            <td><input type="text" name="groupName" value="$
>> {parameters.groupName?if_exists}"/></td>
>> +          </tr>
>> +          <#if extInfo == "P">
>> +            <tr><td colspan="3"><hr/></td></tr>
>> +            <tr>
>> +              <td class="label">${uiLabelMap.CommonAddress1}</td>
>> +              <td><input type="text" name="address1" value="$
>> {parameters.address1?if_exists}"/></td>
>> +            </tr>
>> +            <tr>
>> +              <td class="label">${uiLabelMap.CommonAddress2}</td>
>> +              <td><input type="text" name="address2" value="$
>> {parameters.address2?if_exists}"/></td>
>> +            </tr>
>> +            <tr>
>> +              <td class="label">${uiLabelMap.CommonCity}</td>
>> +              <td><inputmsg type="text" name="city" value="$
>> {parameters.city?if_exists}"/></td>
>> +            </tr>
>> +            <tr>
>> +              <td class="label">${uiLabelMap.CommonStateProvince}</
>> td>
>> +              <td>
>> +                <select name="stateProvinceGeoId">
>> +                  <#if currentStateGeo?has_content>
>> +                    <option value="${currentStateGeo.geoId}">$
>> {currentStateGeo.geoName?default(currentStateGeo.geoId)}</option>
>> +                    <option value="${currentStateGeo.geoId}">---</
>> option>
>> +                  </#if>
>> +                  <option value="ANY">$
>> {uiLabelMap.CommonAnyStateProvince}</option>
>> +                  ${screens.render("component://common/widget/
>> CommonScreens.xml#states")}
>> +                </select>
>> +              </td>
>> +            </tr>
>> +            <tr>
>> +              <td class="label">${uiLabelMap.PartyPostalCode}</td>
>> +              <td><input type="text" name="postalCode" value="$
>> {parameters.postalCode?if_exists}"/></td>
>> +            </tr>
>> +          </#if>
>> +          <#if extInfo == "T">
>> +            <tr><td colspan="3"><hr/></td></tr>
>> +            <tr>
>> +              <td class="label">${uiLabelMap.PartyCountryCode}</td>
>> +              <td><input type="text" name="countryCode" value="$
>> {parameters.countryCode?if_exists}"/></td>
>> +            </tr>
>> +            <tr>
>> +              <td class="label">${uiLabelMap.PartyAreaCode}</td>
>> +              <td><input type="text" name="areaCode" value="$
>> {parameters.areaCode?if_exists}"/></td>
>> +            </tr>
>> +            <tr>
>> +              <td class="label">${uiLabelMap.PartyContactNumber}</
>> td>
>> +              <td><input type="text" name="contactNumber" value="$
>> {parameters.contactNumber?if_exists}"/></td>
>> +            </tr>
>> +          </#if>
>> +          <#if extInfo == "O">
>> +            <tr><td colspan="3"><hr/></td></tr>
>> +            <tr>
>> +              <td class="label">$
>> {uiLabelMap.PartyContactInformation}</td>
>> +              <td><input type="text" name="infoString" value="$
>> {parameters.infoString?if_exists}"/></td>
>> +            </tr>
>> +          </#if>
>> +          <tr><td colspan="3"><hr/></td></tr>
>> +          <tr align="center">
>> +            <td>&nbsp;</td>
>> +            <td>
>> +              <input type="submit" value="$
>> {uiLabelMap.PartyLookupParty}"  
>> onClick="javascript:document.lookupparty.submit();"/>
>> +            </td>
>> +          </tr>
>> +        </table>
>> +      </form>
>> +    </div>
>> +  </#if>
>> +</div>
>> +
>> +<#if parameters.hideFields?default("N") != "Y">
>> +  <script language="JavaScript" type="text/javascript">
>> +    <!--//
>> +      document.lookupparty.partyId.focus();
>> +    //-->
>> +  </script>
>> +</#if>
>>
>> Propchange: ofbiz/trunk/applications/marketing/webapp/sfa/
>> findSfaParty.ftl
>> ------------------------------------------------------------------------------
>>    svn:eol-style = native
>>
>> Propchange: ofbiz/trunk/applications/marketing/webapp/sfa/
>> findSfaParty.ftl
>> ------------------------------------------------------------------------------
>>    svn:keywords = Date Rev Author URL Id
>>
>> Propchange: ofbiz/trunk/applications/marketing/webapp/sfa/
>> findSfaParty.ftl
>> ------------------------------------------------------------------------------
>>    svn:mime-type = text/plain
>>
>> Added: ofbiz/trunk/applications/marketing/webapp/sfa/lead/
>> LeadForms.xml
>> URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/marketing/webapp/sfa/lead/LeadForms.xml?rev=651848&view=auto
>> =
>> =
>> =
>> =
>> =
>> =
>> =
>> =
>> =
>> =====================================================================
>> --- ofbiz/trunk/applications/marketing/webapp/sfa/lead/
>> LeadForms.xml (added)
>> +++ ofbiz/trunk/applications/marketing/webapp/sfa/lead/
>> LeadForms.xml Sat Apr 26 12:15:00 2008
>> @@ -0,0 +1,92 @@
>> +<?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="ListLeads" type="list" list-name="partyList" list-
>> entry-name="partyRow" paginate-target="FindLead">
>> +        <row-actions>
>> +            <entity-one entity-name="PartyGroup" value-
>> name="partyGroup">
>> +                <field-map field-name="partyId" env-
>> name="partyRow.partyId"/>
>> +            </entity-one>
>> +            <entity-one entity-name="Person" value-name="person">
>> +                <field-map field-name="partyId" env-
>> name="partyRow.partyId"/>
>> +            </entity-one>
>> +            <entity-one entity-name="PartyType" value-
>> name="partyType">
>> +                <field-map field-name="partyTypeId" env-
>> name="partyRow.partyTypeId"/>
>> +            </entity-one>
>> +        </row-actions>
>> +        <field name="partyId" title="${uiLabelMap.PartyPartyId}">
>> +            <hyperlink target="/partymgr/control/viewprofile?
>> partyId=${partyRow.partyId}" description="${partyRow.partyId}"  
>> target-type="inter-app"/>
>> +        </field>
>> +        <field name="partyName" title="${uiLabelMap.PartyName}"  
>> use-when="partyGroup != null"><display description="$
>> {partyGroup.groupName}"/></field>
>> +        <field name="partyName" title="${uiLabelMap.PartyName}"  
>> use-when="person != null"><display description="${person.lastName},  
>> ${person.firstName}"/></field>
>> +        <field name="partyTypeId" title="$
>> {uiLabelMap.PartyType}"><display description="$
>> {partyType.description}"/> </field>
>> +    </form>
>> +    <form name="createLead" type="single" target="createLead"  
>> header-row-style="header-row" default-table-style="basic-table">
>> +        <field name="leadType"><hidden value="${leadType}"/></field>
>> +        <field name="firstName" use-
>> when="leadType.equals(&quot;PERSON&quot;)" tooltip="$
>> {uiLabelMap.CommonRequired}" widget-style="required"><text/></field>
>> +        <field name="lastName" use-
>> when="leadType.equals(&quot;PERSON&quot;)" tooltip="$
>> {uiLabelMap.CommonRequired}" widget-style="required"><text/></field>
>> +        <field name="suffix" use-
>> when="leadType.equals(&quot;PERSON&quot;)"><text/></field>
>> +        <field name="groupName" use-
>> when="leadType.equals(&quot;GROUP&quot;)" title="$
>> {uiLabelMap.PartyGroupName}" tooltip="${uiLabelMap.CommonRequired}"  
>> widget-style="required"><text size="30" maxlength="60"/></field>
>> +        <field name="numEmployees" use-
>> when="leadType.equals(&quot;GROUP&quot;)" title="$
>> {uiLabelMap.MarketingEmployees}"><text size="30"/></field>
>> +        <field name="siteName" use-
>> when="leadType.equals(&quot;GROUP&quot;)" title="$
>> {uiLabelMap.FormFieldTitle_officeSiteName}"><text size="30"  
>> maxlength="60"/></field>
>> +        <field name="postalAddressTitle" title="$
>> {uiLabelMap.PartyGeneralCorrespondenceAddress}" title-area-
>> style="group-label"><display description=" " also-hidden="false"/></
>> field>
>> +        <field name="address1" title="$
>> {uiLabelMap.CommonAddress1}" tooltip="${uiLabelMap.CommonRequired}"  
>> widget-style="required"><text size="50" maxlength="60"/></field>
>> +        <field name="address2" title="$
>> {uiLabelMap.CommonAddress2}"><text size="50" maxlength="60"/></field>
>> +        <field name="city" title="${uiLabelMap.CommonCity}"  
>> tooltip="${uiLabelMap.CommonRequired}" widget-
>> style="required"><text size="30" maxlength="60"/></field>
>> +        <field name="state" title="${uiLabelMap.CommonState}"  
>> tooltip="${uiLabelMap.CommonRequired}" widget-style="required">
>> +            <drop-down allow-empty="true">
>> +                <entity-options entity-name="Geo" key-field-
>> name="geoId" description="${geoId} - ${geoName}">
>> +                    <entity-constraint name="geoTypeId"  
>> operator="in" value="STATE,PROVINCE"/>
>> +                    <entity-order-by field-name="geoId"/>
>> +                </entity-options>
>> +            </drop-down>
>> +        </field>
>> +        <field name="postalCode" title="$
>> {uiLabelMap.CommonZipPostalCode}" tooltip="$
>> {uiLabelMap.CommonRequired}" widget-style="required"><text  
>> size="10" maxlength="30"/></field>
>> +        <field name="country" title="${uiLabelMap.CommonCountry}"  
>> tooltip="${uiLabelMap.CommonRequired}" widget-style="required">
>> +            <drop-down allow-empty="false" no-current-selected-
>> key="${defaultCountryGeoId}">
>> +                <entity-options entity-name="Geo" key-field-
>> name="geoId" description="${geoId}: ${geoName}">
>> +                    <entity-constraint name="geoTypeId"  
>> value="COUNTRY"/>
>> +                    <entity-order-by field-name="geoId"/>
>> +                </entity-options>
>> +            </drop-down>
>> +        </field>
>> +        <field name="phoneTitle" title="$
>> {uiLabelMap.PartyPrimaryPhone}" title-area-style="group-
>> label"><display/></field>
>> +        <field name="countryCode" title="$
>> {uiLabelMap.PartyCountryCode}"><text size="4" maxlength="10"/></
>> field>
>> +        <field name="areaCode" title="$
>> {uiLabelMap.PartyAreaCode}"><text size="4" maxlength="10"/></field>
>> +        <field name="contactNumber" title="$
>> {uiLabelMap.PartyPhoneNumber}"><text size="15" maxlength="15"/></
>> field>
>> +        <field name="extensionCode" title="$
>> {uiLabelMap.PartyContactExt}"><text size="6" maxlength="10"/></field>
>> +        <field name="emailAddressTitle" title="$
>> {uiLabelMap.PartyEmailAddress}" title-area-style="group-
>> label"><display/></field>
>> +        <field name="emailAddress" title="$
>> {uiLabelMap.CommonEmail}"><text size="50" maxlength="60"/></field>
>> +        <field name="leadSourceTitle" title="$
>> {uiLabelMap.SfaLeadSource}" title-area-style="group-label"><display/
>> ></field>
>> +        <field name="leadSource" title="$
>> {uiLabelMap.SfaLeadSource}"><text size="50" maxlength="60"/></field>
>> +        <field name="leadGroupTitle" title="$
>> {uiLabelMap.SfaLeadGroup}" use-
>> when="leadType.equals(&quot;PERSON&quot;)" title-area-style="group-
>> label"><display/></field>
>> +        <field name="partyIdFrom" title="Lead Group" use-
>> when="leadType.equals(&quot;PERSON&quot;)">
>> +            <drop-down allow-empty="true">
>> +                <entity-options entity-
>> name="PartyRoleAndPartyDetail" description="${groupName} [$
>> {partyId}]" key-field-name="partyId">
>> +                    <entity-constraint name="roleTypeId"  
>> operator="equals" value="LEAD"/>
>> +                    <entity-constraint name="partyTypeId"  
>> operator="equals" value="PARTY_GROUP"/>
>> +                </entity-options>
>> +            </drop-down>
>> +</field>
>> +        <field name="submitButton" title="$
>> {uiLabelMap.CommonSave}" widget-style="smallSubmit"><submit button-
>> type="button"/></field>
>> +    </form>
>> +</forms>
>>
>> Propchange: ofbiz/trunk/applications/marketing/webapp/sfa/lead/
>> LeadForms.xml
>> ------------------------------------------------------------------------------
>>    svn:eol-style = native
>>
>> Propchange: ofbiz/trunk/applications/marketing/webapp/sfa/lead/
>> LeadForms.xml
>> ------------------------------------------------------------------------------
>>    svn:keywords = Date Rev Author URL Id
>>
>> Propchange: ofbiz/trunk/applications/marketing/webapp/sfa/lead/
>> LeadForms.xml
>> ------------------------------------------------------------------------------
>>    svn:mime-type = text/xml
>>
>> Modified: ofbiz/trunk/applications/marketing/widget/sfa/
>> CommonScreens.xml
>> URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/marketing/widget/sfa/CommonScreens.xml?rev=651848&r1=651847&r2=651848&view=diff
>> =
>> =
>> =
>> =
>> =
>> =
>> =
>> =
>> =
>> =====================================================================
>> --- ofbiz/trunk/applications/marketing/widget/sfa/CommonScreens.xml  
>> (original)
>> +++ ofbiz/trunk/applications/marketing/widget/sfa/CommonScreens.xml  
>> Sat Apr 26 12:15:00 2008
>> @@ -29,6 +29,8 @@
>>                 <property-map resource="PartyUiLabels" map-
>> name="uiLabelMap" global="true"/>
>>                 <property-map resource="OrderUiLabels" map-
>> name="uiLabelMap" global="true"/>
>>                 <property-map resource="MarketingUiLabels" map-
>> name="uiLabelMap" global="true"/>
>> +                <set field="layoutSettings.javaScripts[]" value="/
>> partymgr/static/partymgr.js" global="true"/>
>> +                <set field="layoutSettings.styleSheets[]" value="/
>> partymgr/static/partymgr.css" global="true"/>
>>                 <set field="layoutSettings.companyName" from-
>> field="uiLabelMap.SfaCompanyName" global="true"/>
>>                 <set field="layoutSettings.companySubtitle" from-
>> field="uiLabelMap.MarketingCompanySubtitle" global="true"/>
>>                 <set field="applicationMenuName" value="SfaAppBar"  
>> global="true"/>
>>
>> Added: ofbiz/trunk/applications/marketing/widget/sfa/LeadScreens.xml
>> URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/marketing/widget/sfa/LeadScreens.xml?rev=651848&view=auto
>> =
>> =
>> =
>> =
>> =
>> =
>> =
>> =
>> =
>> =====================================================================
>> --- ofbiz/trunk/applications/marketing/widget/sfa/LeadScreens.xml  
>> (added)
>> +++ ofbiz/trunk/applications/marketing/widget/sfa/LeadScreens.xml  
>> Sat Apr 26 12:15:00 2008
>> @@ -0,0 +1,114 @@
>> +<?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.
>> +-->
>> +
>> +<screens xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>> +        xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/widget-screen.xsd 
>> ">
>> +
>> +     <screen name="FindLead">
>> +        <section>
>> +            <actions>
>> +                <set field="roleTypeId" value="LEAD"/>
>> +            </actions>
>> +            <widgets>
>> +                <decorator-screen name="main-decorator" location="$
>> {parameters.mainDecoratorLocation}">
>> +                    <decorator-section name="body">
>> +                        <section>
>> +                            <actions>
>> +                                <service service-name="findParty"  
>> auto-field-map="true"/>
>> +                            </actions>
>> +                            <widgets>
>> +                               <container><link target="CreateLead?
>> leadType=PERSON" text="${uiLabelMap.CommonCreate} $
>> {uiLabelMap.SfaLeadPerson}" style="buttontext"/><link  
>> target="CreateLead?leadType=GROUP" text="${uiLabelMap.CommonCreate}  
>> ${uiLabelMap.SfaLeadGroup}" style="buttontext"/></container>
>> +                               <section>
>> +                                    <widgets>
>> +                                        <platform-specific>
>> +                                            <html><html-template  
>> location="component://marketing/webapp/sfa/findSfaParty.ftl"/></html>
>> +                                        </platform-specific>
>> +                                        <container  
>> style="screenlet">
>> +                                           <container  
>> style="screenlet-title-bar">
>> +                                               <container  
>> style="h3">
>> +                                                   <label text="$
>> {uiLabelMap.SfaFindResults}"/>
>> +                                               </container>
>> +                                           </container>
>> +                                           <container  
>> style="screenlet-body">
>> +                                               <section>
>> +                                                   <condition>
>> +                                                       <not>
>> +                                                           <if-
>> empty field-name="partyList"/>
>> +                                                       </not>
>> +                                                   </condition>
>> +                                                   <widgets>
>> +                                                       <include-
>> form name="ListLeads" location="component://marketing/webapp/sfa/
>> lead/LeadForms.xml"/>
>> +                                                   </widgets>
>> +                                                   <fail-widgets>
>> +                                                       <container  
>> style="h3">
>> +                                                           <label  
>> text="${uiLabelMap.PartyNoPartiesFound}"/>
>> +                                                       </container>
>> +                                                   </fail-widgets>
>> +                                               </section>
>> +                                           </container>
>> +                                        </container>
>> +                                    </widgets>
>> +                                </section>
>> +                            </widgets>
>> +                        </section>
>> +                    </decorator-section>
>> +                </decorator-screen>
>> +            </widgets>
>> +        </section>
>> +    </screen>
>> +    <screen name="CreateLead">
>> +        <section>
>> +            <actions>
>> +                <set field="titleProperty"  
>> value="PageTitleCreateLead"/>
>> +                <set field="leadType" from-
>> field="parameters.leadType"/>
>> +            </actions>
>> +            <widgets>
>> +                <decorator-screen name="main-decorator" location="$
>> {parameters.mainDecoratorLocation}">
>> +                    <decorator-section name="body">
>> +                          <container style="screenlet">
>> +                                <container style="screenlet-title-
>> bar">
>> +                                    <container style="h3">
>> +                                        <section>
>> +                                            <condition>
>> +                                                <if-compare  
>> value="PERSON" field-name="leadType" operator="equals"/>
>> +                                            </condition>
>> +                                            <widgets>
>> +                                                <label text="$
>> {uiLabelMap.CommonCreate} ${uiLabelMap.SfaLeadPerson}"/>
>> +                                            </widgets>
>> +                                            <fail-widgets>
>> +                                                <label text="$
>> {uiLabelMap.CommonCreate} ${uiLabelMap.SfaLeadGroup}"/>
>> +                                            </fail-widgets>
>> +                                        </section>
>> +                                    </container>
>> +                                </container>
>> +                                <container style="screenlet-body">
>> +                                    <section>
>> +                                        <widgets>
>> +                                            <include-form  
>> name="createLead" location="component://marketing/webapp/sfa/lead/
>> LeadForms.xml"/>
>> +                                        </widgets>
>> +                                    </section>
>> +                                </container>
>> +                            </container>
>> +                    </decorator-section>
>> +                </decorator-screen>
>> +            </widgets>
>> +        </section>
>> +    </screen>
>> +</screens>
>>
>> Propchange: ofbiz/trunk/applications/marketing/widget/sfa/
>> LeadScreens.xml
>> ------------------------------------------------------------------------------
>>    svn:eol-style = native
>>
>> Propchange: ofbiz/trunk/applications/marketing/widget/sfa/
>> LeadScreens.xml
>> ------------------------------------------------------------------------------
>>    svn:keywords = Date Rev Author URL Id
>>
>> Propchange: ofbiz/trunk/applications/marketing/widget/sfa/
>> LeadScreens.xml
>> ------------------------------------------------------------------------------
>>    svn:mime-type = text/xml
>>
>> Modified: ofbiz/trunk/applications/marketing/widget/sfa/SfaMenus.xml
>> URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/marketing/widget/sfa/SfaMenus.xml?rev=651848&r1=651847&r2=651848&view=diff
>> =
>> =
>> =
>> =
>> =
>> =
>> =
>> =
>> =
>> =====================================================================
>> --- ofbiz/trunk/applications/marketing/widget/sfa/SfaMenus.xml  
>> (original)
>> +++ ofbiz/trunk/applications/marketing/widget/sfa/SfaMenus.xml Sat  
>> Apr 26 12:15:00 2008
>> @@ -23,7 +23,7 @@
>>         <menu-item name="Main" title="$
>> {uiLabelMap.MarketingMainPage}"><link target="main"/></menu-item>
>>         <menu-item name="Accounts" title="$
>> {uiLabelMap.SfaAcccounts}"><link target="FindAccounts"/></menu-item>
>>         <menu-item name="Contacts" title="$
>> {uiLabelMap.SfaContacts}"><link target=""/></menu-item>
>> -        <menu-item name="Leads" title="$
>> {uiLabelMap.SfaLeads}"><link target=""/></menu-item>
>> +        <menu-item name="Leads" title="$
>> {uiLabelMap.SfaLeads}"><link target="FindLead"/></menu-item>
>>         <menu-item name="Competitors" title="$
>> {uiLabelMap.SfaCompetitors}"><link target=""/></menu-item>
>>         <menu-item name="Events" title="$
>> {uiLabelMap.SfaEvents}"><link target=""/></menu-item>
>>         <menu-item name="Documents" title="$
>> {uiLabelMap.SfaDocuments}"><link target=""/></menu-item>
>> @@ -50,4 +50,4 @@
>>         <menu-item name="viewAccount" title="$
>> {uiLabelMap.PageTitleAccountSummary}"><link target="ViewAccount?
>> partyId=${partyId}"/></menu-item>
>>         <menu-item name="editAccount" title="$
>> {uiLabelMap.PageTitleEditAccount}"><link target=""/></menu-item>
>>     </menu>
>> -</menus>
>> \ No newline at end of file
>> +</menus>
>>
>> Modified: ofbiz/trunk/applications/party/config/PartyUiLabels.xml
>> URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/party/config/PartyUiLabels.xml?rev=651848&r1=651847&r2=651848&view=diff
>> =
>> =
>> =
>> =
>> =
>> =
>> =
>> =
>> =
>> =====================================================================
>> --- ofbiz/trunk/applications/party/config/PartyUiLabels.xml  
>> (original)
>> +++ ofbiz/trunk/applications/party/config/PartyUiLabels.xml Sat Apr  
>> 26 12:15:00 2008
>> @@ -3406,6 +3406,15 @@
>>         <value xml:lang="th">เพศ</value>
>>         <value xml:lang="zh">性别</value>
>>     </property>
>> +    <property key="PartyGeneralCorrespondenceAddress">
>> +        <value xml:lang="en">General Correspondence Address</value>
>> +        <value xml:lang="fr">Adresse principale</value>
>> +        <value xml:lang="it">Indirizzo Generale Corrispondenza</
>> value>
>> +        <value xml:lang="ro">Adresa Generala Corespondenta</value>
>> +        <value xml:lang="ru">Адрес для  
>> корреспонденции</
>> value>
>> +        <value xml:lang="th">ที่ภà¸
>> ¢à¸¹à¹ˆà¸—ั่วไปท
>> ี่ติดต่ภกà¸
>> ±à¸™à¸—างจดหมาย</
>> value>
>> +        <value xml:lang="zh">通信地址</value>
>> +    </property>
>>     <property key="PartyGoToParent">
>>         <value xml:lang="en">Go to Parent</value>
>>         <value xml:lang="th">ไปยà¸
>> ±à¸‡à¸œà¸¹à¹‰à¸”ูแล</value>
>> @@ -5048,6 +5057,15 @@
>>         <value xml:lang="ru">Цена</value>
>>         <value xml:lang="th">ราคา</value>
>>         <value xml:lang="zh">ä»·æ ¼</value>
>> +    </property>
>> +    <property key="PartyPrimaryPhone">
>> +        <value xml:lang="en">Primary Phone Number</value>
>> +        <value xml:lang="fr">Numéro de téléphone  
>> principal</value>
>> +        <value xml:lang="it">Numero Telefono Principale</value>
>> +        <value xml:lang="ro">Numero Telefon Principal</value>
>> +        <value xml:lang="ru">Основной  
>> телефонный номер</
>> value>
>> +        <value xml:lang="th">เบภà¸
>> £à¹Œà¹‚ทรศัพท์ท
>> ี่สำคัญ</value>
>> +        <value xml:lang="zh">第ä¸
>> €ä¸ªç”µè¯å·ç </value>
>>     </property>
>>     <property key="PartyProduct">
>>         <value xml:lang="en">Product</value>
>>
>> Modified: ofbiz/trunk/applications/party/script/org/ofbiz/party/
>> party/PartySimpleMethods.xml
>> URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/party/script/org/ofbiz/party/party/PartySimpleMethods.xml?rev=651848&r1=651847&r2=651848&view=diff
>> =
>> =
>> =
>> =
>> =
>> =
>> =
>> =
>> =
>> =====================================================================
>> --- ofbiz/trunk/applications/party/script/org/ofbiz/party/party/
>> PartySimpleMethods.xml (original)
>> +++ ofbiz/trunk/applications/party/script/org/ofbiz/party/party/
>> PartySimpleMethods.xml Sat Apr 26 12:15:00 2008
>> @@ -91,4 +91,143 @@
>>         <field-to-result field-name="newUserLogin"/>
>>         <field-to-result field-name="createUlInMap.partyId" result-
>> name="partyId"/>
>>     </simple-method>
>> +
>> +    <!-- Simple method to create a person, its role and basic  
>> contact mechs -->
>> +    <simple-method method-name="createPersonRoleAndContactMechs"  
>> short-description="Creates a person, role and contactMechs">
>> +        <call-map-processor processor-name="person" in-map-
>> name="parameters" out-map-name="personContext"
>> +            xml-resource="org/ofbiz/party/party/PartyMapProcs.xml"/>
>> +
>> +        <call-map-processor processor-name="postalAddress" in-map-
>> name="parameters" out-map-name="postalAddressContext"
>> +            xml-resource="org/ofbiz/party/contact/
>> PartyContactMechMapProcs.xml"/>
>> +
>> +        <if-not-empty field-name="parameters.contactNumber">
>> +            <call-map-processor processor-name="telecomNumber" in-
>> map-name="parameters" out-map-name="telecomNumberContext"
>> +                xml-resource="org/ofbiz/party/contact/
>> PartyContactMechMapProcs.xml"/>
>> +        </if-not-empty>
>> +
>> +        <if-not-empty field-name="parameters.emailAddress">
>> +            <call-map-processor in-map-name="parameters" out-map-
>> name="emailAddressContext">
>> +                <simple-map-processor name="emailAddress">
>> +                    <process field="emailAddress">
>> +                        <copy/>
>> +                        <validate-method method="isEmail"><fail-
>> property resource="PartyUiLabels"  
>> property="PartyEmailAddressNotFormattedCorrectly"/></validate-method>
>> +                    </process>
>> +                </simple-map-processor>
>> +            </call-map-processor>
>> +        </if-not-empty>
>> +        <check-errors/>
>> +
>> +        <call-service service-name="createPerson" in-map-
>> name="personContext">
>> +            <result-to-field result-name="partyId" field-
>> name="partyId"/>
>> +        </call-service>
>> +
>> +        <if-not-empty field-name="parameters.roleTypeId">
>> +            <set field="createPartyRoleCtx.partyId" from-
>> field="partyId"/>
>> +            <set field="createPartyRoleCtx.roleTypeId" from-
>> field="parameters.roleTypeId"/>
>> +            <call-service service-name="createPartyRole" in-map-
>> name="createPartyRoleCtx"/>
>> +        </if-not-empty>
>> +
>> +        <set field="postalAddContactMechPurpTypeId" from-
>> field="parameters.postalAddContactMechPurpTypeId"/>
>> +        <set field="contactNumber" from-
>> field="parameters.contactNumber"/>
>> +        <set field="phoneContactMechPurpTypeId" from-
>> field="parameters.phoneContactMechPurpTypeId"/>
>> +        <set field="emailAddress" from-
>> field="parameters.emailAddress"/>
>> +        <set field="emailContactMechPurpTypeId" from-
>> field="parameters.emailContactMechPurpTypeId"/>
>> +        <call-simple-method method-name="createPartyContactMechs"/>
>> +    </simple-method>
>> +
>> +    <!-- Simple method to create a party group, its role and basic  
>> contact mechs -->
>> +    <simple-method method-
>> name="createPartyGroupRoleAndContactMechs" short-
>> description="Creates a party group, role and contactMechs">
>> +        <call-map-processor processor-name="partyGroup" in-map-
>> name="parameters" out-map-name="partyGroupContext"
>> +            xml-resource="org/ofbiz/party/party/PartyMapProcs.xml"/>
>> +
>> +        <call-map-processor processor-name="postalAddress" in-map-
>> name="parameters" out-map-name="postalAddressContext"
>> +            xml-resource="org/ofbiz/party/contact/
>> PartyContactMechMapProcs.xml"/>
>> +
>> +        <if-not-empty field-name="parameters.contactNumber">
>> +            <call-map-processor processor-name="telecomNumber" in-
>> map-name="parameters" out-map-name="telecomNumberContext"
>> +                xml-resource="org/ofbiz/party/contact/
>> PartyContactMechMapProcs.xml"/>
>> +        </if-not-empty>
>> +
>> +        <if-not-empty field-name="parameters.emailAddress">
>> +            <call-map-processor in-map-name="parameters" out-map-
>> name="emailAddressContext">
>> +                <simple-map-processor name="emailAddress">
>> +                    <process field="emailAddress">
>> +                        <copy/>
>> +                        <validate-method method="isEmail"><fail-
>> property resource="PartyUiLabels"  
>> property="PartyEmailAddressNotFormattedCorrectly"/></validate-method>
>> +                    </process>
>> +                </simple-map-processor>
>> +            </call-map-processor>
>> +        </if-not-empty>
>> +        <check-errors/>
>> +
>> +        <set field="partyGroupContext.partyTypeId"  
>> value="PARTY_GROUP"/>
>> +        <call-service service-name="createPartyGroup" in-map-
>> name="partyGroupContext">
>> +            <result-to-field result-name="partyId" field-
>> name="partyId"/>
>> +        </call-service>
>> +
>> +        <if-not-empty field-name="parameters.roleTypeId">
>> +            <set field="createPartyRoleCtx.partyId" from-
>> field="partyId"/>
>> +            <set field="createPartyRoleCtx.roleTypeId" from-
>> field="parameters.roleTypeId"/>
>> +            <call-service service-name="createPartyRole" in-map-
>> name="createPartyRoleCtx"/>
>> +        </if-not-empty>
>> +
>> +        <set field="postalAddContactMechPurpTypeId" from-
>> field="parameters.postalAddContactMechPurpTypeId"/>
>> +        <set field="contactNumber" from-
>> field="parameters.contactNumber"/>
>> +        <set field="phoneContactMechPurpTypeId" from-
>> field="parameters.phoneContactMechPurpTypeId"/>
>> +        <set field="emailAddress" from-
>> field="parameters.emailAddress"/>
>> +        <set field="emailContactMechPurpTypeId" from-
>> field="parameters.emailContactMechPurpTypeId"/>
>> +        <call-simple-method method-name="createPartyContactMechs"/>
>> +    </simple-method>
>> +
>> +    <!-- Simple method to create Party Postal Address, Telecom  
>> Number and Email Address, to be used by
>> +         createPersonRoleAndContactMechs and  
>> createPartyGroupRoleAndContactMechs simple methods -->
>> +    <simple-method method-name="createPartyContactMechs" short-
>> description="Create Contact Mechs">
>> +        <!-- Create Party Postal Address and set purpose -->
>> +        <set field="postalAddressContext.partyId" from-
>> field="partyId"/>
>> +        <call-service service-name="createPartyPostalAddress" in-
>> map-name="postalAddressContext">
>> +            <result-to-field result-name="contactMechId" field-
>> name="addressContactMechId"/>
>> +        </call-service>
>> +
>> +        <set field="postalAddressPurposeCtx.partyId" from-
>> field="partyId"/>
>> +        <set field="postalAddressPurposeCtx.contactMechId" from-
>> field="addressContactMechId"/>
>> +        <set  
>> field="postalAddressPurposeCtx.contactMechPurposeTypeId"  
>> value="GENERAL_LOCATION"/>
>> +        <call-service service-name="createPartyContactMechPurpose"  
>> in-map-name="postalAddressPurposeCtx"/>
>> +
>> +        <if-not-empty field-name="postalAddContactMechPurpTypeId">
>> +            <set  
>> field="postalAddressPurposeCtx.contactMechPurposeTypeId" from-
>> field="postalAddContactMechPurpTypeId"/>
>> +            <call-service service-
>> name="createPartyContactMechPurpose" in-map-
>> name="postalAddressPurposeCtx"/>
>> +        </if-not-empty>
>> +
>> +        <!-- Create Party Telecom Number and set purpose -->
>> +        <if-not-empty field-name="contactNumber">
>> +            <set field="telecomNumberContext.partyId" from-
>> field="partyId"/>
>> +            <call-service service-name="createPartyTelecomNumber"  
>> in-map-name="telecomNumberContext">
>> +                <result-to-field result-name="contactMechId" field-
>> name="phoneContactMechId"/>
>> +            </call-service>
>> +
>> +            <set field="phonePurposeContext.partyId" from-
>> field="partyId"/>
>> +            <set field="phonePurposeContext.contactMechId" from-
>> field="phoneContactMechId"/>
>> +            <set  
>> field="phonePurposeContext.contactMechPurposeTypeId" from-
>> field="phoneContactMechPurpTypeId"/>
>> +            <if-empty field-
>> name="phonePurposeContext.contactMechPurposeTypeId">
>> +                <set  
>> field="phonePurposeContext.contactMechPurposeTypeId"  
>> value="PRIMARY_PHONE"/>
>> +            </if-empty>
>> +            <call-service service-
>> name="createPartyContactMechPurpose" in-map-
>> name="phonePurposeContext"/>
>> +        </if-not-empty>
>> +
>> +        <!-- Create Party Email Address and set purpose -->
>> +        <if-not-empty field-name="emailAddress">
>> +            <set field="emailAddressContext.partyId" from-
>> field="partyId"/>
>> +            <call-service service-name="createPartyEmailAddress"  
>> in-map-name="emailAddressContext">
>> +                <result-to-field result-name="contactMechId" field-
>> name="emailContactMechId"/>
>> +            </call-service>
>> +
>> +            <set field="emailPurposeContext.partyId" from-
>> field="partyId"/>
>> +            <set field="emailPurposeContext.contactMechId" from-
>> field="emailContactMechId"/>
>> +            <set  
>> field="emailPurposeContext.contactMechPurposeTypeId" from-
>> field="emailContactMechPurpTypeId"/>
>> +            <if-empty field-
>> name="emailPurposeContext.contactMechPurposeTypeId">
>> +                 <set  
>> field="emailPurposeContext.contactMechPurposeTypeId"  
>> value="PRIMARY_EMAIL"/>
>> +            </if-empty>
>> +            <call-service service-
>> name="createPartyContactMechPurpose" in-map-
>> name="emailPurposeContext"/>
>> +        </if-not-empty>
>> +    </simple-method>
>> </simple-methods>
>>
>>
>>
> --
> AntWebsystems.com: Quality OFBiz services for competitive rates.....
>


smime.p7s (3K) Download Attachment