You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by ha...@apache.org on 2008/06/27 11:11:26 UTC

svn commit: r672194 - in /ofbiz/trunk/applications/party: config/ entitydef/ script/org/ofbiz/party/communication/ webapp/partymgr/WEB-INF/ webapp/partymgr/communication/ webapp/partymgr/lookup/ widget/partymgr/

Author: hansbak
Date: Fri Jun 27 02:11:26 2008
New Revision: 672194

URL: http://svn.apache.org/viewvc?rev=672194&view=rev
Log:
created a new form to create an email with email lookup only showing required fields, internal form will follow

Modified:
    ofbiz/trunk/applications/party/config/PartyUiLabels.xml
    ofbiz/trunk/applications/party/entitydef/entitygroup.xml
    ofbiz/trunk/applications/party/entitydef/entitymodel.xml
    ofbiz/trunk/applications/party/script/org/ofbiz/party/communication/CommunicationEventServices.xml
    ofbiz/trunk/applications/party/webapp/partymgr/WEB-INF/controller.xml
    ofbiz/trunk/applications/party/webapp/partymgr/communication/CommForms.xml
    ofbiz/trunk/applications/party/webapp/partymgr/communication/CommMenus.xml
    ofbiz/trunk/applications/party/webapp/partymgr/lookup/LookupForms.xml
    ofbiz/trunk/applications/party/widget/partymgr/CommunicationScreens.xml
    ofbiz/trunk/applications/party/widget/partymgr/LookupScreens.xml

Modified: ofbiz/trunk/applications/party/config/PartyUiLabels.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/party/config/PartyUiLabels.xml?rev=672194&r1=672193&r2=672194&view=diff
==============================================================================
--- ofbiz/trunk/applications/party/config/PartyUiLabels.xml (original)
+++ ofbiz/trunk/applications/party/config/PartyUiLabels.xml Fri Jun 27 02:11:26 2008
@@ -4200,6 +4200,9 @@
         <value xml:lang="th">การติดต่อใหม่</value>
         <value xml:lang="zh">新建沟通</value>
     </property>
+    <property key="PartyNewEmail">
+        <value xml:lang="en">New Email</value>
+    </property>
     <property key="PartyNewEvent">
         <value xml:lang="en">New Event</value>
         <value xml:lang="es">Nuevo evento</value>

Modified: ofbiz/trunk/applications/party/entitydef/entitygroup.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/party/entitydef/entitygroup.xml?rev=672194&r1=672193&r2=672194&view=diff
==============================================================================
--- ofbiz/trunk/applications/party/entitydef/entitygroup.xml (original)
+++ ofbiz/trunk/applications/party/entitydef/entitygroup.xml Fri Jun 27 02:11:26 2008
@@ -127,6 +127,7 @@
     <entity-group group="org.ofbiz" entity="PartyInvitation" />
     <entity-group group="org.ofbiz" entity="PartyInvitationGroupAssoc" />
     <entity-group group="org.ofbiz" entity="PartyInvitationRoleAssoc" />
+    <entity-group group="org.ofbiz" entity="PartyNameContactMechView" />
     <entity-group group="org.ofbiz" entity="PartyNameHistory" />
     <entity-group group="org.ofbiz" entity="PartyNameView" />
     <entity-group group="org.ofbiz" entity="PartyNote" />

Modified: ofbiz/trunk/applications/party/entitydef/entitymodel.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/party/entitydef/entitymodel.xml?rev=672194&r1=672193&r2=672194&view=diff
==============================================================================
--- ofbiz/trunk/applications/party/entitydef/entitymodel.xml (original)
+++ ofbiz/trunk/applications/party/entitydef/entitymodel.xml Fri Jun 27 02:11:26 2008
@@ -1920,7 +1920,48 @@
             <key-map field-name="partyInvitationId"/>
         </relation>
     </entity>
-    <entity entity-name="PartyNameHistory"
+  <view-entity entity-name="PartyNameContactMechView"
+    package-name="org.ofbiz.party.party"
+    title="Party Name Contact Mech View Entity">
+    <member-entity entity-alias="PTY" entity-name="Party"/>
+    <member-entity entity-alias="PER" entity-name="Person"/>
+    <member-entity entity-alias="PTYGRP" entity-name="PartyGroup"/>
+    <member-entity entity-alias="PTYPCM" entity-name="PartyContactMech"/>
+    <member-entity entity-alias="PTYCM" entity-name="ContactMech"/>
+    <alias entity-alias="PTY" name="partyId"/>
+    <alias entity-alias="PTY" name="partyTypeId"/>
+    <alias entity-alias="PTY" name="description"/>
+    <alias entity-alias="PER" name="firstName"/>
+    <alias entity-alias="PER" name="middleName"/>
+    <alias entity-alias="PER" name="lastName"/>
+    <alias entity-alias="PER" name="firstNameLocal"/>
+    <alias entity-alias="PER" name="lastNameLocal"/>
+    <alias entity-alias="PER" name="personalTitle"/>
+    <alias entity-alias="PER" name="suffix"/>
+    <alias entity-alias="PTYGRP" name="groupName"/>
+    <alias entity-alias="PTYGRP" name="groupNameLocal"/>
+    <alias entity-alias="PTYPCM" name="contactMechId"/>
+    <alias entity-alias="PTYPCM" name="fromDate"/>
+    <alias entity-alias="PTYPCM" name="thruDate"/>
+    <alias entity-alias="PTYCM" name="contactMechTypeId"/>
+    <alias entity-alias="PTYCM" name="infoString"/>
+    <view-link entity-alias="PTY" rel-entity-alias="PER" rel-optional="true">
+      <key-map field-name="partyId"/>
+    </view-link>
+    <view-link entity-alias="PTY" rel-entity-alias="PTYGRP" rel-optional="true">
+      <key-map field-name="partyId"/>
+    </view-link>
+    <view-link entity-alias="PTY" rel-entity-alias="PTYPCM" rel-optional="false">
+      <key-map field-name="partyId"/>
+    </view-link>
+    <view-link entity-alias="PTYPCM" rel-entity-alias="PTYCM" rel-optional="false">
+      <key-map field-name="contactMechId"/>
+    </view-link>
+    <relation type="one-nofk" rel-entity-name="Party">
+      <key-map field-name="partyId"/>
+    </relation>
+  </view-entity>
+  <entity entity-name="PartyNameHistory"
         package-name="org.ofbiz.party.party"
         title="Party Note Entity">
         <field name="partyId" type="id-ne"></field>

Modified: ofbiz/trunk/applications/party/script/org/ofbiz/party/communication/CommunicationEventServices.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/party/script/org/ofbiz/party/communication/CommunicationEventServices.xml?rev=672194&r1=672193&r2=672194&view=diff
==============================================================================
--- ofbiz/trunk/applications/party/script/org/ofbiz/party/communication/CommunicationEventServices.xml (original)
+++ ofbiz/trunk/applications/party/script/org/ofbiz/party/communication/CommunicationEventServices.xml Fri Jun 27 02:11:26 2008
@@ -37,6 +37,19 @@
         </if-empty>
         <field-to-result field-name="newEntity.communicationEventId" result-name="communicationEventId"/>
         
+        <!-- if only contactmechid and no partyTo is provided for creation email address create it -->
+        <if-empty field="parameters.partyIdTo">
+            <if-not-empty field="parameters.contactMechIdTo">
+                <entity-and entity-name="PartyAndContactMech" list-name="partyContactMechs">
+                    <field-map field-name="contactMechId" env-name="parameters.contactMechIdTo"/>
+                    <field-map field-name="contactMechTypeId" value="EMAIL_ADDRESS"/>
+                </entity-and>
+                <filter-list-by-date list-name="partyContactMechs"/>
+                <first-from-list entry-name="partyContactMech" list-name="partyContactMechs"/>
+                <set field="newEntity.partyIdTo" from-field="partyContactMech.partyId"/>
+            </if-not-empty>
+        </if-empty>
+        
         <now-timestamp-to-env env-name="newEntity.entryDate"/>
         
         <create-value value-name="newEntity"/>

Modified: ofbiz/trunk/applications/party/webapp/partymgr/WEB-INF/controller.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/party/webapp/partymgr/WEB-INF/controller.xml?rev=672194&r1=672193&r2=672194&view=diff
==============================================================================
--- ofbiz/trunk/applications/party/webapp/partymgr/WEB-INF/controller.xml (original)
+++ ofbiz/trunk/applications/party/webapp/partymgr/WEB-INF/controller.xml Fri Jun 27 02:11:26 2008
@@ -672,7 +672,9 @@
     <request-map uri="ViewCommunicationEvent"><security https="true" auth="true"/><response name="success" type="view" value="ViewCommunicationEvent"/></request-map>
     <request-map uri="AddCommContent"><security https="true" auth="true"/><response name="success" type="view" value="AddCommContent"/></request-map>
     <request-map uri="EditCommContent"><security https="true" auth="true"/><response name="success" type="view" value="EditCommContent"/></request-map>
-
+    <request-map uri="newEmail"><security https="true" auth="true"/><response name="success" type="view" value="newEmail"/></request-map>
+    <request-map uri="newInternalNote"><security https="true" auth="true"/><response name="success" type="view" value="newInternalNote"/></request-map>
+    
     <request-map uri="EditCommunication"><security https="true" auth="true"/><response name="success" type="view" value="EditCommunicationEvent"/></request-map>
     <request-map uri="createCommunicationEvent">
         <security https="true" auth="true"/>
@@ -1019,6 +1021,7 @@
                 
     <!-- Lookup request mappings -->
     <request-map uri="LookupPartyName"><security https="true" auth="true"/><response name="success" type="view" value="LookupPartyName"/></request-map>
+    <request-map uri="LookupPartyEmail"><security https="true" auth="true"/><response name="success" type="view" value="LookupPartyEmail"/></request-map>
     <request-map uri="LookupPerson"><security https="true" auth="true"/><response name="success" type="view" value="LookupPerson"/></request-map>
     <request-map uri="LookupPartyAndUserLoginAndPerson"><security https="true" auth="true"/><response name="success" type="view" value="LookupPartyAndUserLoginAndPerson"/></request-map>
     <request-map uri="LookupUserLoginAndPartyDetails"><security https="true" auth="true"/><response name="success" type="view" value="LookupUserLoginAndPartyDetails"/></request-map>
@@ -1083,7 +1086,9 @@
     <view-map name="EditCommEventWorkEffort" type="screen" page="component://party/widget/partymgr/CommunicationScreens.xml#EditCommEventWorkEffort"/>
     <view-map name="AddCommContent" type="screen" page="component://party/widget/partymgr/CommunicationScreens.xml#AddCommContent"/>
     <view-map name="EditCommContent" type="screen" page="component://party/widget/partymgr/CommunicationScreens.xml#EditCommContent"/>
-
+    <view-map name="newEmail" type="screen" page="component://party/widget/partymgr/CommunicationScreens.xml#newEmail"/>
+    <view-map name="newInternalNote" type="screen" page="component://party/widget/partymgr/CommunicationScreens.xml#newInternalNote"/>
+    
     <view-map name="CreateNewParty" type="screen" page="component://party/widget/partymgr/PartyScreens.xml#CreateNewParty"/>
     <view-map name="NewCustomer" type="screen" page="component://party/widget/partymgr/PartyScreens.xml#NewCustomer"/>
     <view-map name="NewProspect" type="screen" page="component://party/widget/partymgr/PartyScreens.xml#NewProspect"/>
@@ -1106,6 +1111,7 @@
     <view-map name="visitdetail" type="screen" page="component://party/widget/partymgr/VisitScreens.xml#visitdetail"/>
 
     <view-map name="LookupPartyName" type="screen" page="component://party/widget/partymgr/LookupScreens.xml#LookupPartyName"/>
+    <view-map name="LookupPartyEmail" type="screen" page="component://party/widget/partymgr/LookupScreens.xml#LookupPartyEmail"/>
     <view-map name="LookupPartyClassificationGroup" type="screen" page="component://party/widget/partymgr/LookupScreens.xml#LookupPartyClassificationGroup"/>
     <view-map name="LookupPerson" type="screen" page="component://party/widget/partymgr/LookupScreens.xml#LookupPerson"/>
     <view-map name="LookupPartyAndUserLoginAndPerson" type="screen" page="component://party/widget/partymgr/LookupScreens.xml#LookupPartyAndUserLoginAndPerson"/>

Modified: ofbiz/trunk/applications/party/webapp/partymgr/communication/CommForms.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/party/webapp/partymgr/communication/CommForms.xml?rev=672194&r1=672193&r2=672194&view=diff
==============================================================================
--- ofbiz/trunk/applications/party/webapp/partymgr/communication/CommForms.xml (original)
+++ ofbiz/trunk/applications/party/webapp/partymgr/communication/CommForms.xml Fri Jun 27 02:11:26 2008
@@ -31,7 +31,7 @@
         
         <alt-target target="createCommunicationEvent" use-when="communicationEvent==null"/>
         <field name="partyId" map-name="parameters"><hidden/></field>
-                
+        
         <field name="communicationEventId" use-when="communicationEvent!=null"><display/></field>
         <field name="communicationEventTypeId" use-when="${bsh:communicationEvent==null||communicationEvent.getString(&quot;statusId&quot;).equals(&quot;COM_ENTERED&quot;)}">
             <drop-down>
@@ -43,7 +43,7 @@
         <field name="communicationEventTypeId" use-when="${bsh:(communicationEvent!=null&amp;&amp;!communicationEvent.getString(&quot;statusId&quot;).equals(&quot;COM_ENTERED&quot;))}">
             <display-entity entity-name="CommunicationEventType" description="${description}" key-field-name="communicationEventTypeId"/>
         </field>
-
+        
         <field name="parentCommEventId">
             <lookup target-form-name="LookupCommEvent">
                 <sub-hyperlink use-when="&quot;${communicationEvent.parentCommEventId}&quot;.length()>0" link-style="buttontext" target="EditCommunicationEvent?communicationEventId=${communicationEvent.parentCommEventId}" description="${uiLabelMap.PartyGoToParent}"/>
@@ -67,7 +67,7 @@
                 </entity-options>
             </drop-down>
         </field>
-
+        
         <!-- auto email fields -->
         <field name="fromString" use-when="${bsh:communicationEvent!=null&amp;&amp;communicationEvent.getString(&quot;fromString&quot;)!=null}">
             <display/>
@@ -89,7 +89,7 @@
         <field name="partyIdTo" title="${uiLabelMap.PartyPartyTo}">
             <lookup target-form-name="LookupPartyName"/>
         </field>
-
+        
         <!-- contact mech type -->
         <field name="contactMechTypeId" use-when="${bsh:communicationEvent==null||communicationEvent.getString(&quot;statusId&quot;).equals(&quot;COM_ENTERED&quot;)}">
             <drop-down>
@@ -101,7 +101,7 @@
         <field name="contactMechTypeId" use-when="${bsh:communicationEvent!=null&amp;&amp;!communicationEvent.getString(&quot;statusId&quot;).equals(&quot;COM_ENTERED&quot;)}">
             <display-entity entity-name="ContactMechType" description="${description}" key-field-name="contactMechTypeId"/>
         </field>
-
+        
         <!-- this is an example of how to display different types of contact mech to the user -->
         <field name="contactMechIdFrom" title="${uiLabelMap.PartyFromEmailAddress}"
             use-when="${bsh:(parameters.get(&quot;communicationEventTypeId&quot;)!=null)&amp;&amp;(parameters.get(&quot;communicationEventTypeId&quot;).equals(&quot;EMAIL_COMMUNICATION&quot;)||parameters.get(&quot;communicationEventTypeId&quot;).equals(&quot;AUTO_EMAIL_COMM&quot;))}">
@@ -119,13 +119,13 @@
         <field name="contactMechIdTo" title="${uiLabelMap.PartyToEmailAddress}"
             use-when="${bsh:(parameters.get(&quot;communicationEventTypeId&quot;)!=null)&amp;&amp;(parameters.get(&quot;communicationEventTypeId&quot;).equals(&quot;EMAIL_COMMUNICATION&quot;))}">
             <drop-down allow-empty="false" current="selected" no-current-selected-key="${parameters.contactMechIdTo}">
-              <list-options key-name="contactMechId" list-name="targetEmailAddresses" description="${infoString}"/>
+                <list-options key-name="contactMechId" list-name="targetEmailAddresses" description="${infoString}"/>
             </drop-down>            
         </field>
         <field name="contactMechIdTo" title="${uiLabelMap.PartyToContactMech}"
             use-when="${bsh:(parameters.get(&quot;communicationEventTypeId&quot;)==null)||!(parameters.get(&quot;communicationEventTypeId&quot;).equals(&quot;EMAIL_COMMUNICATION&quot;))}">
             <lookup target-form-name="LookupPreferredContactMech" target-parameter="partyIdTo"/></field>
-
+        
         <!-- role type info -->
         <field name="roleTypeIdFrom" use-when="${bsh:communicationEvent==null||communicationEvent.getString(&quot;statusId&quot;).equals(&quot;COM_ENTERED&quot;)}">
             <drop-down no-current-selected-key="_NA_">
@@ -137,7 +137,7 @@
         <field name="roleTypeIdFrom" use-when="${bsh:communicationEvent!=null&amp;&amp;!communicationEvent.getString(&quot;statusId&quot;).equals(&quot;COM_ENTERED&quot;)}">
             <display-entity entity-name="RoleType" description="${description}" key-field-name="roleTypeId"/>
         </field>
-
+        
         <field name="roleTypeIdTo" use-when="${bsh:communicationEvent==null||communicationEvent.getString(&quot;statusId&quot;).equals(&quot;COM_ENTERED&quot;)}">
             <drop-down no-current-selected-key="_NA_">
                 <entity-options description="${description}" entity-name="RoleType" key-field-name="roleTypeId">
@@ -148,7 +148,7 @@
         <field name="roleTypeIdTo" use-when="${bsh:communicationEvent!=null&amp;&amp;!communicationEvent.getString(&quot;statusId&quot;).equals(&quot;COM_ENTERED&quot;)}">
             <display-entity entity-name="RoleType" description="${description}" key-field-name="roleTypeId"/>
         </field>
-
+        
         <!-- contact list -->
         <field name="contactListId" use-when="${bsh:communicationEvent==null||communicationEvent.getString(&quot;statusId&quot;).equals(&quot;COM_ENTERED&quot;)}">
             <lookup size="20" target-form-name="LookupContactList">
@@ -156,13 +156,13 @@
             </lookup>
         </field>
         <field name="contactListId" use-when="${bsh:communicationEvent!=null&amp;&amp;communicationEvent.getString(&quot;contactListId&quot;)!=null&amp;&amp;!communicationEvent.getString(&quot;statusId&quot;).equals(&quot;COM_ENTERED&quot;)}"><display/></field>
-
+        
         <field name="datetimeStarted" title="${uiLabelMap.CommonStartDate}"><date-time/></field>
         <field name="datetimeEnded" title="${uiLabelMap.CommonFinishDate}"><date-time/></field>
-
+        
         <field name="subject" use-when="${bsh:communicationEvent==null||communicationEvent.getString(&quot;statusId&quot;).equals(&quot;COM_ENTERED&quot;)}"><text size="60"/></field>
         <field name="subject" use-when="${bsh:communicationEvent!=null&amp;&amp;!communicationEvent.getString(&quot;statusId&quot;).equals(&quot;COM_ENTERED&quot;)}"><display/></field>
-
+        
         <field name="reasonEnumId">
             <drop-down no-current-selected-key="" allow-empty="true">
                 <entity-options entity-name="Enumeration" description="${description}" key-field-name="enumId">
@@ -179,15 +179,39 @@
             </drop-down>
         </field>
         <field name="contentMimeTypeId" use-when="${bsh:communicationEvent!=null&amp;&amp;!communicationEvent.getString(&quot;statusId&quot;).equals(&quot;COM_ENTERED&quot;)}"><display/></field>
-
+        
         <field name="content" title="${uiLabelMap.CommonContent}" use-when="${bsh:communicationEvent==null||communicationEvent.getString(&quot;statusId&quot;).equals(&quot;COM_ENTERED&quot;)}"><textarea cols="60" rows="10"/></field>
         <field name="content" title="${uiLabelMap.CommonContent}" use-when="${bsh:communicationEvent!=null&amp;&amp;!communicationEvent.getString(&quot;statusId&quot;).equals(&quot;COM_ENTERED&quot;)}"><textarea cols="60" rows="10" read-only="true"/></field>
-
+        
         <field name="note" title="${uiLabelMap.CommonNote}"><textarea cols="60" rows="3"/></field>
         <field name="messageId" use-when="${bsh:communicationEvent!=null&amp;&amp;communicationEvent.getString(&quot;messageId&quot;)!=null}"><display/></field>
         <field name="submitButton" title="${uiLabelMap.CommonSave}"><submit button-type="button"/></field>
     </form>
-
+    
+    <form name="NewEmail" type="single" target="createCommunicationEvent" default-map-name="communicationEvent">
+        <field name="communicationEventTypeId"><hidden/></field>
+        <field name="parentCommEventId"><hidden value="${parentCommEventId}"/></field>
+        <field name="statusId"><hidden value="COM_ENTERED"/></field>
+        <field name="partyIdFrom"><hidden value="${partyIdFrom}"/></field>
+        <field name="emailAddress" parameter-name="contactMechIdFrom">
+            <drop-down>
+                <entity-options entity-name="PartyAndContactMech" description="${infoString}" key-field-name="contactMechId">
+                    <entity-constraint name="partyId" value="${userLogin.partyId}"/>
+                    <entity-constraint name="contactMechTypeId" value="EMAIL_ADDRESS"/>
+                </entity-options>
+            </drop-down>
+        </field>
+        <field name="contactMechIdTo" title="${uiLabelMap.PartyPartyTo}">
+            <lookup target-form-name="LookupPartyEmail"/>
+        </field>
+        <field name="datetimeStarted" title="${uiLabelMap.CommonSendDate}"><date-time/></field>
+        <field name="subject"><text size="60"/></field>
+        <field name="contentMimeTypeId"><hidden value="text/plain"/></field>
+        <field name="content" title="${uiLabelMap.CommonContent}"><textarea cols="60" rows="10"/></field>
+        <field name="note" title="${uiLabelMap.CommonNote}"><textarea cols="60" rows="3"/></field>
+        <field name="sendButton"><submit button-type="button"/></field>
+    </form>
+    
     <form name="ViewCommEvent" type="single" default-map-name="communicationEvent"
         header-row-style="header-row" default-table-style="basic-table">
         <field name="communicationEventId"><display/></field>
@@ -294,8 +318,6 @@
         <field name="roleTypeIdTo"><display-entity description="${description}" entity-name="RoleType" key-field-name="roleTypeId"/></field>
         -->
         <field name="datetimeStarted" title="${uiLabelMap.CommonStartDate}"><display/></field>
-        <field name="datetimeEnded" title="${uiLabelMap.CommonFinishDate}"><display/></field>
-        <field name="custRequestId" widget-style="smallSubmit"><hyperlink target="/ordermgr/control/EditRequest?custRequestId=${custRequestId}" target-type="inter-app"/></field>
     </form>
 
     <form name="ListPartyCommEvents" type="list"  extends="ListCommEvents" odd-row-style="alternate-row" default-table-style="basic-table hover-bar">

Modified: ofbiz/trunk/applications/party/webapp/partymgr/communication/CommMenus.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/party/webapp/partymgr/communication/CommMenus.xml?rev=672194&r1=672193&r2=672194&view=diff
==============================================================================
--- ofbiz/trunk/applications/party/webapp/partymgr/communication/CommMenus.xml (original)
+++ ofbiz/trunk/applications/party/webapp/partymgr/communication/CommMenus.xml Fri Jun 27 02:11:26 2008
@@ -57,6 +57,12 @@
         <menu-item name="new" title="${uiLabelMap.PartyNewCommunication}">
             <link target="EditCommunicationEvent?partyId=${partyId}&amp;partyIdFrom=${partyId}"/>
         </menu-item>
+        <menu-item name="newEmail" title="${uiLabelMap.PartyNewEmail}">
+            <link target="newEmail?partyIdFrom=${partyId}"/>
+        </menu-item>
+        <!--menu-item name="newInternalNote" title="${uiLabelMap.PartyNewInternalNote}">
+            <link target="newInternalNote?partyIdFrom=${partyId}"/>
+        </menu-item-->
         <menu-item name="reply" title="${uiLabelMap.PartyReply}">
             <condition>
                 <not><if-empty field-name="communicationEventId"/></not>

Modified: ofbiz/trunk/applications/party/webapp/partymgr/lookup/LookupForms.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/party/webapp/partymgr/lookup/LookupForms.xml?rev=672194&r1=672193&r2=672194&view=diff
==============================================================================
--- ofbiz/trunk/applications/party/webapp/partymgr/lookup/LookupForms.xml (original)
+++ ofbiz/trunk/applications/party/webapp/partymgr/lookup/LookupForms.xml Fri Jun 27 02:11:26 2008
@@ -36,7 +36,7 @@
         <field name="noConditionFind"><hidden value="Y"/><!-- if this isn't there then with all fields empty no query will be done --></field> 
         <field name="submitButton" title="${uiLabelMap.CommonLookup}"><submit button-type="button"/></field>
     </form>
-
+    
     <form name="listLookupPartyName" type="list" list-name="listIt" paginate-target="LookupPartyName"
         odd-row-style="alternate-row" default-table-style="basic-table hover-bar">
         <actions>
@@ -57,7 +57,44 @@
         <field name="lastName"  title="${uiLabelMap.PartyLastName}"><display/></field>
         <field name="groupName" title="${uiLabelMap.PartyGroupName}"><display/></field>
     </form>
-
+    
+    <form name="lookupPartyEmail" target="LookupPartyName" type="single"
+        header-row-style="header-row" default-table-style="basic-table">
+        <field name="partyId" title="${uiLabelMap.PartyPartyId}"><text-find/></field>
+        <field name="partyTypeId" title="${uiLabelMap.PartyTypeId}">
+            <drop-down allow-empty="true">
+                <entity-options description="${description}" entity-name="PartyType"/>
+            </drop-down>
+        </field>
+        <field name="firstName" title="${uiLabelMap.PartyFirstName}"><text-find/></field>
+        <field name="lastName"  title="${uiLabelMap.PartyLastName}"><text-find/></field>
+        <field name="groupName" title="${uiLabelMap.PartyGroupName}"><text-find/></field>
+        <field name="noConditionFind"><hidden value="Y"/><!-- if this isn't there then with all fields empty no query will be done --></field> 
+        <field name="submitButton" title="${uiLabelMap.CommonLookup}"><submit button-type="button"/></field>
+    </form>
+    
+    <form name="listLookupPartyEmail" type="list" list-name="listIt" paginate-target="LookupPartyEmail"
+        odd-row-style="alternate-row" default-table-style="basic-table hover-bar">
+        <actions>
+            <set field="parameters.contactMechTypeId" value="EMAIL_ADDRESS"/>
+            <set field="filterByDate" value="Y"/>
+            <service service-name="performFind" result-map-name="result" result-map-list-name="listIt">
+                <field-map field-name="inputFields" env-name="parameters"/>
+                <field-map field-name="orderBy" value="partyId"/>
+                <field-map field-name="entityName" value="PartyNameContactMechView"/>
+            </service>
+        </actions>
+        <row-actions>
+            <set field="name" value="${firstName} ${middleName} ${lastName} ${groupName}"/>
+        </row-actions>
+        <!--<auto-fields-entity entity-name="PartyNameView" default-field-type="display"/>-->
+        <field name="partyId" title="${uiLabelMap.PartyPartyId}"  widget-style="smallSubmit">
+            <hyperlink also-hidden="false" target-type="plain" description="${partyId}" target="javascript:set_value('${contactMechId}')"/>
+        </field>
+        <field name="name" title="${uiLabelMap.PartyName}"><display/></field>
+        <field name="infoString" title="${uiLabelMap.PartyEmailAddress}"><display/></field>
+    </form>
+    
     <form name="lookupCustomerName" target="LookupCustomerName" type="single"
         header-row-style="header-row" default-table-style="basic-table">
         <field name="roleTypeId"><hidden value="CUSTOMER"/></field>

Modified: ofbiz/trunk/applications/party/widget/partymgr/CommunicationScreens.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/party/widget/partymgr/CommunicationScreens.xml?rev=672194&r1=672193&r2=672194&view=diff
==============================================================================
--- ofbiz/trunk/applications/party/widget/partymgr/CommunicationScreens.xml (original)
+++ ofbiz/trunk/applications/party/widget/partymgr/CommunicationScreens.xml Fri Jun 27 02:11:26 2008
@@ -217,17 +217,17 @@
                 <set field="tabButtonItem" value="PartyCommEvents"/>
                 <set field="subTabButtonItem" value="CommunicationEvent"/>
                 <set field="entityName" value="CommunicationEvent"/>
-
+                
                 <set field="communicationEventId" from-field="parameters.communicationEventId"/>
                 <set field="parentCommEventId" from-field="parameters.parentCommEventId"/>
-
+                
                 <set field="partyId" from-field="parameters.partyId"/>
                 <set field="partyIdFrom" from-field="parameters.partyIdFrom" default-value="${userLogin.partyId}"/>
                 <set field="partyIdTo" from-field="parameters.partyIdTo"/>
                 <set field="contactMechIdFrom" from-field="parameters.contactMechIdFrom"/>
                 <set field="contactMechIdTo" from-field="parameters.contactMechIdTo"/>
                 <set field="contactMechTypeId" from-field="parameters.contactMechTypeId"/>
-
+                
                 <entity-one entity-name="Party" use-cache="true" value-name="party"/>
                 <entity-one entity-name="Person" use-cache="true" value-name="lookupPerson"/>
                 <entity-one entity-name="CommunicationEvent" value-name="communicationEvent"/>
@@ -270,6 +270,40 @@
         </section>
     </screen>
     
+    <screen name="newEmail">
+        <section>
+            <actions>
+                <set field="titleProperty" value="PageTitleEditCommunication"/>
+                <set field="tabButtonItem" value="PartyCommEvents"/>
+                <set field="subTabButtonItem" value="CommunicationEvent"/>
+                <set field="entityName" value="CommunicationEvent"/>
+                
+                <set field="parentCommEventId" from-field="parameters.parentCommEventId"/>
+                <set field="partyId" from-field="parameters.partyId"/>
+                <set field="partyIdFrom" from-field="parameters.partyIdFrom" default-value="${userLogin.partyId}"/>
+                <set field="partyIdTo" from-field="parameters.partyIdTo"/>
+                <set field="contactMechIdFrom" from-field="parameters.contactMechIdFrom"/>
+                <set field="contactMechIdTo" from-field="parameters.contactMechIdTo"/>
+                <set field="contactMechTypeId" from-field="parameters.contactMechTypeId"/>
+                
+                <entity-one entity-name="Party" use-cache="true" value-name="party"/>
+                <entity-one entity-name="Person" use-cache="true" value-name="lookupPerson"/>
+                <entity-one entity-name="CommunicationEvent" value-name="communicationEvent"/>
+                <script location="component://party/webapp/partymgr/WEB-INF/actions/communication/FindCommEventContactMechs.groovy"/>
+            </actions>
+            <widgets>
+                <decorator-screen name="CommonCommunicationEventDecorator" location="${parameters.mainDecoratorLocation}">
+                    <decorator-section name="body">
+                        <include-menu name="CommSubTabBar" location="component://party/webapp/partymgr/communication/CommMenus.xml"/>
+                        <screenlet id="EditCommunicationEventPanel" title="${uiLabelMap.PartyEditCommunicationEvent}" collapsible="true">
+                            <include-form location="component://party/webapp/partymgr/communication/CommForms.xml" name="NewEmail"/>
+                        </screenlet>
+                    </decorator-section>
+                </decorator-screen>
+            </widgets>
+        </section>
+    </screen>
+    
     <screen name="UpdateCommRoles">
         <section>
             <actions>

Modified: ofbiz/trunk/applications/party/widget/partymgr/LookupScreens.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/party/widget/partymgr/LookupScreens.xml?rev=672194&r1=672193&r2=672194&view=diff
==============================================================================
--- ofbiz/trunk/applications/party/widget/partymgr/LookupScreens.xml (original)
+++ ofbiz/trunk/applications/party/widget/partymgr/LookupScreens.xml Fri Jun 27 02:11:26 2008
@@ -46,6 +46,32 @@
             </widgets>
         </section>
     </screen>
+    <screen name="LookupPartyEmail">
+        <section>
+            <condition>
+                <or>
+                    <if-has-permission permission="PARTYMGR" action="_VIEW"/>
+                </or>
+            </condition>
+            <actions>
+                <property-map resource="PartyUiLabels" map-name="uiLabelMap" global="true"/>
+                <set field="title" value="${uiLabelMap.PartyLookupPartyByName}"/>
+                <set field="queryString" from-field="result.queryString"/>
+                <set field="viewIndex" from-field="parameters.VIEW_INDEX" type="Integer" default-value="0"/>
+                <set field="viewSize" from-field="parameters.VIEW_SIZE" type="Integer" default-value="20"/>
+            </actions>
+            <widgets>
+                <decorator-screen name="LookupDecorator" location="component://common/widget/CommonScreens.xml">
+                    <decorator-section name="search-options">
+                        <include-form name="lookupPartyEmail" location="component://party/webapp/partymgr/lookup/LookupForms.xml"/>
+                    </decorator-section>
+                    <decorator-section name="search-results">
+                        <include-form name="listLookupPartyEmail" location="component://party/webapp/partymgr/lookup/LookupForms.xml"/>
+                    </decorator-section>
+                </decorator-screen>
+            </widgets>
+        </section>
+    </screen>
     <screen name="LookupCustomerName">
         <section>
             <condition>