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 2009/05/30 09:50:56 UTC

svn commit: r780196 - in /ofbiz/branches/release09.04: ./ applications/party/script/org/ofbiz/party/communication/ applications/party/script/org/ofbiz/party/party/ applications/party/src/org/ofbiz/party/communication/ applications/party/webapp/partymgr...

Author: hansbak
Date: Sat May 30 07:50:53 2009
New Revision: 780196

URL: http://svn.apache.org/viewvc?rev=780196&view=rev
Log:
merge from trunk 779477,779496,779834,779856,779866: corrections on communicationevents

Removed:
    ofbiz/branches/release09.04/applications/party/webapp/partymgr/WEB-INF/actions/communication/PrepCommEventForward.groovy
    ofbiz/branches/release09.04/applications/party/webapp/partymgr/WEB-INF/actions/communication/PrepCommEventReply.groovy
Modified:
    ofbiz/branches/release09.04/   (props changed)
    ofbiz/branches/release09.04/applications/party/script/org/ofbiz/party/communication/CommunicationEventServices.xml
    ofbiz/branches/release09.04/applications/party/script/org/ofbiz/party/party/PartyServices.xml
    ofbiz/branches/release09.04/applications/party/src/org/ofbiz/party/communication/CommunicationEventServices.java
    ofbiz/branches/release09.04/applications/party/webapp/partymgr/communication/CommForms.xml
    ofbiz/branches/release09.04/applications/party/widget/partymgr/CommunicationScreens.xml
    ofbiz/branches/release09.04/applications/party/widget/partymgr/PartyMenus.xml

Propchange: ofbiz/branches/release09.04/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Sat May 30 07:50:53 2009
@@ -1 +1 @@
-/ofbiz/trunk:765933,766011,766015,766293,766307,766316,766325,766462,766522,766800,767060,767072,767093,767098-767099,767102,767123,767125,767127,767279,767287,767671,767688,767694,767822,767845,768358,768490,768550,768675,768686,768705,768811,768815,768960,769030,769500,770272,770997,771073,772401,772464-772465,773076,773557,773628,773659,773697,774014,774632,774661,774995,775292,775667,776227,776594,776620,776922,777004,777020,777768,777792,777893,777947,778078,778094,778107,778278,778280,778364,778374,778402,778576,778594,778628,779020,779639,779873,780111,780138,780180
+/ofbiz/trunk:765933,766011,766015,766293,766307,766316,766325,766462,766522,766800,767060,767072,767093,767098-767099,767102,767123,767125,767127,767279,767287,767671,767688,767694,767822,767845,768358,768490,768550,768675,768686,768705,768811,768815,768960,769030,769500,770272,770997,771073,772401,772464-772465,773076,773557,773628,773659,773697,774014,774632,774661,774995,775292,775667,776227,776594,776620,776922,777004,777020,777768,777792,777893,777947,778078,778094,778107,778278,778280,778364,778374,778402,778576,778594,778628,779020,779477,779496,779639,779834,779856,779866,779873,780111,780138,780180

Modified: ofbiz/branches/release09.04/applications/party/script/org/ofbiz/party/communication/CommunicationEventServices.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/release09.04/applications/party/script/org/ofbiz/party/communication/CommunicationEventServices.xml?rev=780196&r1=780195&r2=780196&view=diff
==============================================================================
--- ofbiz/branches/release09.04/applications/party/script/org/ofbiz/party/communication/CommunicationEventServices.xml (original)
+++ ofbiz/branches/release09.04/applications/party/script/org/ofbiz/party/communication/CommunicationEventServices.xml Sat May 30 07:50:53 2009
@@ -60,7 +60,7 @@
         <field-to-result field="newEntity.communicationEventId" result-name="communicationEventId"/>
 
         <!-- check for reply -->
-        <if-compare field="parameters.userLogin.userLoginId" value="system" operator="not-equals">
+        <if-compare field="parameters.userLogin.userLoginId" value="system" operator="not-equals"><!-- not apply on incoming emails -->
             <if-not-empty field="parameters.parentCommEventId">
                 <entity-one entity-name="CommunicationEvent" value-field="parentCommEvent">
                     <field-map field-name="communicationEventId" from-field="parameters.parentCommEventId"/>
@@ -68,7 +68,10 @@
                 <entity-one entity-name="PartyNameView" value-field="partyNameView">
                     <field-map field-name="partyId" from-field="parentCommEvent.partyIdFrom"/>
                 </entity-one>
-                
+                <set field="newEntity.communicationEventTypeId" from-field="parentComEvent.communicationEventTypeId"/>
+                <if-compare field="newEntity.communicationEventTypeId" value="AUTO_EMAIL_COMM" operator="equals">
+                    <set field="newEntity.communicationEventTypeId" value="EMAIL_COMMUNICATION"/>
+                </if-compare>
                 <set field="newEntity.partyIdFrom" from-field="parameters.partyIdFrom" default-value="parameters.userLogin.partyId"/>
                 <set field="newEntity.partyIdTo" from-field="parentCommEvent.partyIdFrom"/>
                 
@@ -108,32 +111,56 @@
             </if-not-empty>
         </if-compare>
         
-        <if-empty field="parameters.statusId">
-            <set value="COM_ENTERED" field="parameters.statusId"/>
+        <if-empty field="newEntity.statusId">
+            <set value="COM_ENTERED" field="newEntity.statusId"/>
         </if-empty>
 
-        <!-- if only contactMechId and no partyIdTo is provided for creation email address find the related party -->
-        <if-empty field="parameters.partyIdTo">
-            <if-not-empty field="parameters.contactMechIdTo">
-                <entity-and entity-name="PartyAndContactMech" list="partyContactMechs" filter-by-date="true">
-                    <field-map field-name="contactMechId" from-field="parameters.contactMechIdTo"/>
-                    <field-map field-name="contactMechTypeId" value="EMAIL_ADDRESS"/>
-                </entity-and>
-                <first-from-list entry="partyContactMech" list="partyContactMechs"/>
-                <set field="newEntity.partyIdTo" from-field="partyContactMech.partyId"/>
+        <if-compare field="newEntity.communicationEventTypeId" value="EMAIL_COMMUNICATION" operator="equals">
+            <!-- if only contactMechIdFrom and no partyIdFrom is provided for creation email address find the related party -->
+            <if-empty field="newEntity.partyIdFrom">
+                <if-not-empty field="newEntity.contactMechIdFrom">
+                    <entity-and entity-name="PartyAndContactMech" list="partyContactMechs" filter-by-date="true">
+                        <field-map field-name="contactMechId" from-field="newEntity.contactMechIdFrom"/>
+                        <field-map field-name="contactMechTypeId" value="EMAIL_ADDRESS"/>
+                    </entity-and>
+                    <first-from-list entry="partyContactMech" list="partyContactMechs"/>
+                    <set field="newEntity.partyIdFrom" from-field="partyContactMech.partyId"/>
+                </if-not-empty>
+            </if-empty>
+            
+            <!-- if partyIdFrom provided but no contactMechIdFrom get emailAddress -->
+            <if-not-empty field="newEntity.partyIdFrom">
+                <if-empty field="newEntity.contactMechIdFrom">
+                    <set field="getEmail.partyId" from-field="newEntity.partyIdFrom"/>
+                    <call-service service-name="getPartyEmail" in-map-name="getEmail">
+                        <result-to-field result-name="contactMechId" field="newEntity.contactMechIdFrom"/>
+                    </call-service>
+                </if-empty>
             </if-not-empty>
-        </if-empty>
-
-        <!-- if partyId provided but no contactMechIdTo get emailAddress -->
-        <if-not-empty field="parameters.partyIdTo">
-            <if-empty field="parameters.contactMechIdTo">
-                <set field="getEmail.partyId" from-field="parameters.partyIdTo"/>
-                <call-service service-name="getPartyEmail" in-map-name="getEmail">
-                    <result-to-field result-name="contacMechId" field="newEntity.contactMechIdTo"/>
-                </call-service>
+            
+            <!-- if only contactMechIdTo and no partyIdTo is provided for creation email address find the related party -->
+            <if-empty field="newEntity.partyIdTo">
+                <if-not-empty field="newEntity.contactMechIdTo">
+                    <entity-and entity-name="PartyAndContactMech" list="partyContactMechs" filter-by-date="true">
+                        <field-map field-name="contactMechId" from-field="newEntity.contactMechIdTo"/>
+                        <field-map field-name="contactMechTypeId" value="EMAIL_ADDRESS"/>
+                    </entity-and>
+                    <first-from-list entry="partyContactMech" list="partyContactMechs"/>
+                    <set field="newEntity.partyIdTo" from-field="partyContactMech.partyId"/>
+                </if-not-empty>
             </if-empty>
-        </if-not-empty>
-
+            
+            <!-- if partyId provided but no contactMechIdTo get emailAddress -->
+            <if-not-empty field="newEntity.partyIdTo">
+                <if-empty field="newEntity.contactMechIdTo">
+                    <set field="getEmail.partyId" from-field="newEntity.partyIdTo"/>
+                    <call-service service-name="getPartyEmail" in-map-name="getEmail">
+                        <result-to-field result-name="contactMechId" field="newEntity.contactMechIdTo"/>
+                    </call-service>
+                </if-empty>
+            </if-not-empty>
+        </if-compare>
+        
         <now-timestamp field="newEntity.entryDate"/>
         <create-value value-field="newEntity"/>
 
@@ -162,13 +189,7 @@
             <set field="commRole.partyId" from-field="newEntity.partyIdTo"/>
             <set field="commRole.roleTypeId" value="ADDRESSEE"/>
             <set field="commRole.contactMechId" from-field="newEntity.contactMechIdTo"/>
-            <set field="commRole.statusId" value="COM_ROLE_CREATED"/>
-            <if-compare field="parameters.permission" value="true" operator="equals">
-                <call-service service-name="createCommunicationEventRole" in-map-name="commRole"/>
-                <else>
-                    <call-service service-name="createCommunicationEventRoleWithoutPermission" in-map-name="commRole"/>
-                </else>
-            </if-compare>
+            <call-service service-name="createCommunicationEventRoleWithoutPermission" in-map-name="commRole"/>
         </if-not-empty>
 
         <!-- partyIdFrom role-->
@@ -178,12 +199,7 @@
             <set field="commRole.roleTypeId" value="ORIGINATOR"/>
             <set field="commRole.contactMechId" from-field="newEntity.contactMechIdFrom"/>
             <set field="commRole.statusId" value="COM_ROLE_COMPLETED"/>
-            <if-compare field="parameters.permission" value="true" operator="equals">
-                <call-service service-name="createCommunicationEventRole" in-map-name="commRole"/>
-                <else>
-                    <call-service service-name="createCommunicationEventRoleWithoutPermission" in-map-name="commRole"/>
-                </else>
-            </if-compare>
+            <call-service service-name="createCommunicationEventRoleWithoutPermission" in-map-name="commRole"/>
         </if-not-empty>
     </simple-method>
 
@@ -431,7 +447,7 @@
         </entity-condition>
         <iterate entry="communicationEvent" list="communicationEvents">
             <set-service-fields service-name="sendCommEventAsEmail" map="communicationEvent" to-map="inMap"/>
-            <call-service service-name="sendCommEventAsEmail" in-map-name="inMap" require-new-transaction="true"/>
+            <call-service service-name="sendCommEventAsEmail" in-map-name="inMap" require-new-transaction="true" break-on-error="false"/>
         </iterate>
     </simple-method>
 

Modified: ofbiz/branches/release09.04/applications/party/script/org/ofbiz/party/party/PartyServices.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/release09.04/applications/party/script/org/ofbiz/party/party/PartyServices.xml?rev=780196&r1=780195&r2=780196&view=diff
==============================================================================
--- ofbiz/branches/release09.04/applications/party/script/org/ofbiz/party/party/PartyServices.xml (original)
+++ ofbiz/branches/release09.04/applications/party/script/org/ofbiz/party/party/PartyServices.xml Sat May 30 07:50:53 2009
@@ -661,7 +661,7 @@
         <!-- first try to find primary email Address when not found get other email -->
         <entity-and entity-name="PartyContactWithPurpose" list="emailAddressesPurposes">
             <field-map field-name="partyId" from-field="parameters.partyId"/>
-            <field-map field-name="contactMechPurposeTypeId" from-field="PRIMARY_EMAIL"/>
+            <field-map field-name="contactMechPurposeTypeId" value="PRIMARY_EMAIL"/>
         </entity-and>
         <filter-list-by-date list="emailAddressesPurposes" to-list="emailAddressesPurposes1" from-field-name="purposeFromDate" thru-field-name="purposeThruDate"/>
         <filter-list-by-date list="emailAddressesPurposes1" to-list="emailAddresses" from-field-name="contactFromDate" thru-field-name="contactThruDate"/>

Modified: ofbiz/branches/release09.04/applications/party/src/org/ofbiz/party/communication/CommunicationEventServices.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/release09.04/applications/party/src/org/ofbiz/party/communication/CommunicationEventServices.java?rev=780196&r1=780195&r2=780196&view=diff
==============================================================================
--- ofbiz/branches/release09.04/applications/party/src/org/ofbiz/party/communication/CommunicationEventServices.java (original)
+++ ofbiz/branches/release09.04/applications/party/src/org/ofbiz/party/communication/CommunicationEventServices.java Sat May 30 07:50:53 2009
@@ -595,6 +595,25 @@
                 contentIndex = "";
                 commEventMap = addMessageBody(commEventMap, (Multipart) messageContent);
             }
+            
+            // select the plain text bodypart
+            String messageBody = null;
+            if (wrapper.getMainPartCount() > 1) {
+            	for (int ind=0; ind < wrapper.getMainPartCount(); ind++) {
+            		BodyPart p = wrapper.getPart(ind + "");
+            		if (p.getContentType().toLowerCase().indexOf("text/plain") > -1) {
+            			messageBody = (String) p.getContent();
+            			break;
+            		}
+            	}
+            }
+            
+            if (messageBody == null ) {
+            	messageBody = wrapper.getMessageBody();
+            }
+                        
+            commEventMap.put("content", messageBody);
+            commEventMap.put("contentMimeTypeId", messageBodyContentType.toLowerCase());            
 
             // check for for a reply to communication event (using in-reply-to the parent messageID)
             String[] inReplyTo = message.getHeader("In-Reply-To");

Modified: ofbiz/branches/release09.04/applications/party/webapp/partymgr/communication/CommForms.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/release09.04/applications/party/webapp/partymgr/communication/CommForms.xml?rev=780196&r1=780195&r2=780196&view=diff
==============================================================================
--- ofbiz/branches/release09.04/applications/party/webapp/partymgr/communication/CommForms.xml (original)
+++ ofbiz/branches/release09.04/applications/party/webapp/partymgr/communication/CommForms.xml Sat May 30 07:50:53 2009
@@ -144,18 +144,18 @@
         </actions>
         <alt-target use-when="communicationEvent!=null" target="updateCommunicationEvent"/>
         <field name="communicationEventId"><hidden/></field>
-        <field name="communicationEventTypeId"><hidden value="AUTO_EMAIL_COMM"/></field>
+        <field name="communicationEventTypeId"><hidden value="EMAIL_COMMUNICATION"/></field>
         <field name="statusId"><hidden value="COM_IN_PROGRESS"/></field>
         <field name="parentCommEventId" use-when="parentCommEventId != null"><hidden value="${parameters.parentCommEventId}"/></field>
         <field name="parentCommEventId" use-when="originalCommEventId != null"><hidden value="${parameters.originalCommEventId}"/></field>
         <field name="partyIdFrom"><hidden/></field>
-        <field name="emailAddress" parameter-name="contactMechIdFrom">
+        <field name="fromEmailAddr" parameter-name="contactMechIdFrom">
             <drop-down>
                 <list-options list-name="emailAddresses" description="${infoString}" key-name="contactMechId"/>
             </drop-down>
         </field>
-        <field name="contactMechIdTo" title="${uiLabelMap.PartyEmailTo}">
-            <lookup target-form-name="LookupPartyEmail" default-value="${parameters.contactMechIdTo}"/>
+        <field name="partyIdTo">
+            <lookup target-form-name="LookupPartyName" default-value="${partyIdTo}"/>
         </field>
         <field name="datetimeStarted" title="${uiLabelMap.CommonSendDate}"><date-time/></field>
         <field name="subject"><text size="60" default-value="${parameters.subject}"/></field>
@@ -218,6 +218,8 @@
         </field>
         <field name="communicationEventTypeId"><display-entity entity-name="CommunicationEventType" description="${description}"/></field>
         <field name="partyIdFrom" use-when="partyIdFrom!=void">
+        <field name="contactListId" use-when="communicationEvent.get(&quot;contactListId&quot;)!=null"><display/></field>
+        <field name="partyIdFrom" use-when="communicationEvent.get(&quot;partyIdFrom&quot;)!=null">
             <display-entity entity-name="PartyNameView" key-field-name="partyId" description="${firstName} ${middleName} ${lastName} ${groupName} (${contactMechFrom.infoString})">
                 <sub-hyperlink description=" [${communicationEvent.partyIdFrom}]" target="/partymgr/control/viewprofile" target-type="inter-app">
                     <parameter param-name="partyIdFrom"/>
@@ -332,9 +334,9 @@
         </row-actions>
         <field name="communicationEventId"><hidden/></field>
         <field name="subject">
-            <hyperlink description="${subject}" target="ViewCommunicationEvent">
+            <hyperlink description="${subject}[${communicationEventId}]" target="ViewCommunicationEvent">
                 <parameter param-name="communicationEventId"/>
-                <parameter param-name="partyId"/>
+                <parameter param-name="partyIdFrom" from-field="partyId"/>
                 <parameter param-name="roleTypeId"/>
             </hyperlink>
         </field>
@@ -372,7 +374,7 @@
         <field name="subject" widget-style="buttontext" widget-area-style="fieldWidth300">
             <hyperlink description="${subject} " target="ViewCommunicationEvent">
                 <parameter param-name="communicationEventId"/>
-                <parameter param-name="partyId"/>
+                <parameter param-name="partyIdFrom" from-field="partyId"/>
                 <parameter param-name="roleTypeId"/>
                 <parameter param-name="my"/>
             </hyperlink>

Modified: ofbiz/branches/release09.04/applications/party/widget/partymgr/CommunicationScreens.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/release09.04/applications/party/widget/partymgr/CommunicationScreens.xml?rev=780196&r1=780195&r2=780196&view=diff
==============================================================================
--- ofbiz/branches/release09.04/applications/party/widget/partymgr/CommunicationScreens.xml (original)
+++ ofbiz/branches/release09.04/applications/party/widget/partymgr/CommunicationScreens.xml Sat May 30 07:50:53 2009
@@ -137,6 +137,7 @@
                 <set field="headerItem" value="comm"/>
                 <set field="tabButtonItem" value="Find"/>
                 <set field="entityName" value="CommunicationEvent"/>
+                <set field="partyId" from-field="userLogin.partyId"/>
             </actions>
             <widgets>
                 <decorator-screen location="${parameters.mainDecoratorLocation}" name="main-decorator">
@@ -175,6 +176,7 @@
                 <set field="tabButtonItem" value="OverView"/>
                 <set field="parentCommEventId" from-field="parameters.parentCommEventId"/>
                 <entity-one entity-name="CommunicationEvent" value-field="communicationEvent"/>
+                <set field="my" from-field="parameters.my"/>
             </actions>
             <widgets>
                 <section>
@@ -378,22 +380,21 @@
         <section>
             <actions>
                 <set field="titleProperty" value="PageTitleEditCommunication"/>
+                <set field="tabButtonItem" value="CommunicationEvent"/>
                 <set field="my" from-field="parameters.my" default-value=""/>
                 <entity-one entity-name="CommunicationEvent" value-field="communicationEvent"/>
-                <set field="partyIdFrom" from-field="parameters.partyIdFrom" default-value="parameters.userLogin.partyId"/>
+                <set field="partyIdFrom" from-field="communicationEvent.partyIdFrom" default-value="${userLogin.partyId}"/>
                 <set field="parameters.communicationEventTypeId" from-field="parameters.communicationEventTypeId" default-value="${communicationEvent.communicationEventTypeId}"/>
-                <!--script location="component://party/webapp/partymgr/WEB-INF/actions/communication/PrepCommEventReply.groovy"/>
-                <script location="component://party/webapp/partymgr/WEB-INF/actions/communication/PrepCommEventForward.groovy"/-->
             </actions>
             <widgets>
                 <decorator-screen name="Common${my}CommunicationEventDecorator" location="${parameters.mainDecoratorLocation}">
                     <decorator-section name="body">
                         <section><!-- Email -->
                             <condition>
-                                <or><!-- have for e-mails a special form -->
+                                <and>
                                     <if-compare field="parameters.communicationEventTypeId" operator="equals" value="EMAIL_COMMUNICATION"/>
-                                    <if-compare field="parameters.communicationEventTypeId" operator="equals" value="AUTO_EMAIL_COMM"/>
-                                </or>
+                                    <if-compare field="my" operator="equals" value="My"/>
+                                </and>
                             </condition>
                             <widgets>
                                 <section>
@@ -428,7 +429,10 @@
                         </section>
                         <section>
                             <condition><!-- internal note -->
-                                <if-compare field="parameters.communicationEventTypeId" operator="equals" value="COMMENT_NOTE"/>
+                                <and>
+                                    <if-compare field="parameters.communicationEventTypeId" operator="equals" value="COMMENT_NOTE"/>
+                                    <if-compare field="my" operator="equals" value="My"/>
+                                </and>
                             </condition>
                             <widgets>
                                 <section>
@@ -461,12 +465,15 @@
                             </widgets>
                         </section>
                         <section>
-                            <condition><!-- others -->
-                                <and>
-                                    <if-compare field="parameters.communicationEventTypeId" operator="not-equals" value="COMMENT_NOTE"/>
-                                    <if-compare field="parameters.communicationEventTypeId" operator="not-equals" value="EMAIL_COMMUNICATION"/>
-                                    <if-compare field="parameters.communicationEventTypeId" operator="not-equals" value="AUTO_EMAIL_COMM"/>
-                                </and>
+                            <condition><!-- others and general communications in party-->
+                                <or>
+                                    <if-empty field="my"/>
+                                    <and>
+                                        <if-compare field="parameters.communicationEventTypeId" operator="not-equals" value="COMMENT_NOTE"/>
+                                        <if-compare field="parameters.communicationEventTypeId" operator="not-equals" value="EMAIL_COMMUNICATION"/>
+                                        <if-compare field="parameters.communicationEventTypeId" operator="not-equals" value="AUTO_EMAIL_COMM"/>
+                                    </and>
+                                </or>
                             </condition>
                             <widgets>
                                 <screenlet id="EditCommunicationEventPanel" title="${uiLabelMap.PartyEditCommunicationEvent} ${parameters.communicationEventId}">
@@ -553,8 +560,6 @@
                 <entity-one entity-name="Party" use-cache="true" value-field="party"/>
                 <entity-one entity-name="Person" use-cache="true" value-field="lookupPerson"/>
                 <entity-one entity-name="CommunicationEvent" value-field="communicationEvent"/>
-                <set field="viewIndex" from-field="parameters.VIEW_INDEX" type="Integer"/>
-                <set field="viewSize" from-field="parameters.VIEW_SIZE" type="Integer" default-value="20"/>
             </actions>
             <widgets>
                 <decorator-screen name="CommonCommunicationEventDecorator" location="${parameters.mainDecoratorLocation}">
@@ -578,14 +583,12 @@
             <actions>
                 <set field="titleProperty" value="PageTitleListCommWorkEfforts"/>
                 <set field="tabButtonItem" value="UpdateCommWorkEfforts"/>
-
                 <set field="communicationEventId" from-field="parameters.communicationEventId"/>
                 <set field="partyId" value="${parameters.partyId}"/>
                 <set field="partyIdFrom" value="${parameters.partyIdFrom}"/>
                 <set field="partyIdTo" value="${parameters.partyIdTo}"/>
                 <set field="entityName" value="CommunicationEvent"/>
-                <set field="viewIndex" from-field="parameters.VIEW_INDEX" type="Integer"/>
-                <set field="viewSize" from-field="parameters.VIEW_SIZE" type="Integer" default-value="20"/>
+                <entity-one entity-name="CommunicationEvent" value-field="communicationEvent"/>
             </actions>
             <widgets>
                 <decorator-screen name="CommonCommunicationEventDecorator" location="${parameters.mainDecoratorLocation}">
@@ -656,6 +659,7 @@
                 <set default-value="${userLogin.partyId}" field="partyIdFrom" value="${parameters.partyIdFrom}"/>
                 <set default-value="${userLogin.partyId}" field="partyIdTo" value="${parameters.partyIdTo}"/>
                 <set field="communicationEventId" value="${parameters.communicationEventId}"/>
+                <entity-one entity-name="CommunicationEvent" value-field="communicationEvent"/>
             </actions>
             <widgets>
                 <decorator-screen  name="CommonCommunicationEventDecorator" location="${parameters.mainDecoratorLocation}">
@@ -818,9 +822,10 @@
             <actions>
                 <set field="titleProperty" value="PageTitleCommEvents"/>
                 <set field="headerItem" value="mycomm"/>
+                <set field="my" value="My" global="true"/>
             </actions>
             <widgets>
-                <decorator-screen  name="CommonMyCommunicationEventDecorator" location="${parameters.mainDecoratorLocation}">
+                <decorator-screen  name="main-decorator" location="${parameters.mainDecoratorLocation}">
                     <decorator-section name="body">
                         <include-screen name="MyCommunicationEvents"/>
                     </decorator-section>

Modified: ofbiz/branches/release09.04/applications/party/widget/partymgr/PartyMenus.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/release09.04/applications/party/widget/partymgr/PartyMenus.xml?rev=780196&r1=780195&r2=780196&view=diff
==============================================================================
--- ofbiz/branches/release09.04/applications/party/widget/partymgr/PartyMenus.xml (original)
+++ ofbiz/branches/release09.04/applications/party/widget/partymgr/PartyMenus.xml Sat May 30 07:50:53 2009
@@ -558,29 +558,17 @@
         <menu-item name="new" title="${uiLabelMap.PartyNewCommunication}">
             <link target="EditCommunicationEvent"/>
         </menu-item>
-        <menu-item name="newEmail" title="${uiLabelMap.PartyNewEmail}">
-            <link target="EditCommunicationEvent">
-                <parameter param-name="communicationEventTypeId" value="EMAIL_COMMUNICATION"/>
-                <parameter param-name="partyIdFrom" from-field="parameters.userLogin.partyId"/>
-            </link>
-        </menu-item>
-        <menu-item name="newInternalNote" title="${uiLabelMap.PartyNewInternalNote}">
-            <link target="EditCommunicationEvent">
-                <parameter param-name="communicationEventTypeId" value="COMMENT_NOTE"/>
-                <parameter param-name="partyIdFrom" from-field="parameters.userLogin.partyId"/>
-            </link>
-        </menu-item>
         <menu-item name="reply" title="${uiLabelMap.PartyReply}">
             <condition>
                 <and>
                     <not><if-empty field="parameters.communicationEventId"/></not>
                     <not><if-empty field="communicationEvent.partyIdFrom"/></not>
-                    <if-compare field="communicationEvent.partyIdFrom" operator="not-equals" value="${userLogin.partyId}"/>
                     <if-compare field="communicationEvent.statusId" operator="not-equals" value="COM_UNKNOWN_PARTY"/>
                 </and>
             </condition>
             <link target="EditCommunicationEvent">
                 <parameter param-name="parentCommEventId" from-field="parameters.communicationEventId"/>
+                <parameter param-name="partyIdFrom" from-field="parameters.partyId"/>
             </link>
         </menu-item>
         <menu-item name="forward" title="${uiLabelMap.PartyForward}">
@@ -588,7 +576,6 @@
                 <and>
                     <not><if-empty field="parameters.communicationEventId"/></not>
                     <not><if-empty field="communicationEvent.partyIdFrom"/></not>
-                    <if-compare field="communicationEvent.partyIdFrom" operator="not-equals" value="${userLogin.partyId}"/>
                     <if-compare field="communicationEvent.statusId" operator="not-equals" value="COM_UNKNOWN_PARTY"/>
                 </and>
             </condition>