svn commit: r758522 [1/3] - in /ofbiz/trunk: applications/party/config/ applications/party/data/ applications/party/script/org/ofbiz/party/communication/ applications/party/webapp/partymgr/WEB-INF/ applications/party/webapp/partymgr/WEB-INF/actions/com...

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

svn commit: r758522 [1/3] - in /ofbiz/trunk: applications/party/config/ applications/party/data/ applications/party/script/org/ofbiz/party/communication/ applications/party/webapp/partymgr/WEB-INF/ applications/party/webapp/partymgr/WEB-INF/actions/com...

hansbak-2
Author: hansbak
Date: Thu Mar 26 06:06:12 2009
New Revision: 758522

URL: http://svn.apache.org/viewvc?rev=758522&view=rev
Log:
 rather big change which contains the following:
1. created a new function in the partyManager called 'myCommunications'
This function enables the sending and receiving of email and internal communications to/from the current userlogin. It looks like an email client for internal and external email.
2. merged the party/webapp/partymgr/communication/CommMenus.xml and party/widget/partymgr/PartyMenus.xml
3. moved all forms/screens from my portal back into the party component
4. fixed some more problems with myportal
5. added 'save-home' and save 'current' in the same pattern as 'save-last' function in the controler.xml
6. added 'view-home' in the same pattern as 'view-last'
7. moved all related uilabels from myportal to party
8. This update needs a re-creation of the portlet/portal entities.



Added:
    ofbiz/trunk/applications/party/script/org/ofbiz/party/communication/CommunicationEventEvents.xml   (with props)
    ofbiz/trunk/applications/party/webapp/partymgr/WEB-INF/actions/communication/GetMyCommunicationEventRole.groovy   (with props)
    ofbiz/trunk/applications/party/webapp/partymgr/communication/addAttachFile.ftl   (with props)
    ofbiz/trunk/applications/party/webapp/partymgr/communication/attachFileList.ftl   (with props)
Removed:
    ofbiz/trunk/applications/party/webapp/partymgr/communication/CommMenus.xml
    ofbiz/trunk/applications/party/widget/Menus.xml
    ofbiz/trunk/specialpurpose/myportal/webapp/addAttachFile.ftl
    ofbiz/trunk/specialpurpose/myportal/webapp/attachFileList.ftl
    ofbiz/trunk/specialpurpose/myportal/webapp/myportal/WEB-INF/actions/GetMyCommunicationEventRole.groovy
    ofbiz/trunk/specialpurpose/myportal/webapp/myportal/addAttachFile.ftl
    ofbiz/trunk/specialpurpose/myportal/webapp/myportal/attachFileList.ftl
Modified:
    ofbiz/trunk/applications/party/config/PartyUiLabels.xml
    ofbiz/trunk/applications/party/data/PartyPortletData.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/widget/partymgr/CommonScreens.xml
    ofbiz/trunk/applications/party/widget/partymgr/CommunicationScreens.xml
    ofbiz/trunk/applications/party/widget/partymgr/PartyMenus.xml
    ofbiz/trunk/framework/common/config/CommonUiLabels.xml
    ofbiz/trunk/framework/common/entitydef/entitymodel.xml
    ofbiz/trunk/framework/common/webcommon/WEB-INF/actions/includes/GetParentPortalPageId.groovy
    ofbiz/trunk/framework/common/webcommon/WEB-INF/actions/includes/ListPortalPages.groovy
    ofbiz/trunk/framework/common/webcommon/WEB-INF/portal-controller.xml
    ofbiz/trunk/framework/example/data/ExamplePortalSeedData.xml
    ofbiz/trunk/framework/webapp/dtd/site-conf.xsd
    ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/control/ConfigXMLReader.java
    ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/control/RequestHandler.java
    ofbiz/trunk/specialpurpose/mypage/webapp/mypage/WEB-INF/controller.xml
    ofbiz/trunk/specialpurpose/myportal/config/MyPortalUiLabels.xml
    ofbiz/trunk/specialpurpose/myportal/data/MyPortalTypeData.xml
    ofbiz/trunk/specialpurpose/myportal/script/org/ofbiz/myportal/Events.xml
    ofbiz/trunk/specialpurpose/myportal/webapp/myportal/WEB-INF/controller.xml
    ofbiz/trunk/specialpurpose/myportal/widget/CommonScreens.xml
    ofbiz/trunk/specialpurpose/myportal/widget/MyPortalForms.xml
    ofbiz/trunk/specialpurpose/myportal/widget/MyPortalMenus.xml
    ofbiz/trunk/specialpurpose/myportal/widget/MyPortalScreens.xml

Modified: ofbiz/trunk/applications/party/config/PartyUiLabels.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/party/config/PartyUiLabels.xml?rev=758522&r1=758521&r2=758522&view=diff
==============================================================================
--- ofbiz/trunk/applications/party/config/PartyUiLabels.xml (original)
+++ ofbiz/trunk/applications/party/config/PartyUiLabels.xml Thu Mar 26 06:06:12 2009
@@ -2498,6 +2498,10 @@
         <value xml:lang="ru">Присоединить содержание</value>
         <value xml:lang="th">หัวข้อติดกัน</value>
     </property>
+    <property key="PartyAttachFile">
+        <value xml:lang="en">Attach File</value>
+        <value xml:lang="it">Allega file</value>
+    </property>
     <property key="PartyAttentionName">
         <value xml:lang="cs">Jméno</value>
         <value xml:lang="de">Zu Händen von</value>
@@ -4116,6 +4120,10 @@
         <value xml:lang="th">เปลี่ยนแปลงชื่อที่อยู่เป็นผลสำเร็จ</value>
         <value xml:lang="zh">已成功更新域名。</value>
     </property>
+    <property key="PartyDraftEmails">
+        <value xml:lang="en">Draft Emails</value>
+        <value xml:lang="it">Bozze emails</value>
+    </property>
     <property key="PartyEditCommCustRequest">
         <value xml:lang="de">Kommunikation Kundenanfrage bearbeiten</value>
         <value xml:lang="en">Edit Communication Customer Request</value>
@@ -4514,6 +4522,10 @@
         <value xml:lang="th">หมายเลขแฟกซ์</value>
         <value xml:lang="zh">传真号码</value>
     </property>
+    <property key="PartyFileAttach">
+        <value xml:lang="en">File Attach.</value>
+        <value xml:lang="it">Allega file</value>
+    </property>
     <property key="PartyFinancialHistory">
         <value xml:lang="en">Fin. History</value>
         <value xml:lang="es">Histórico financiero</value>
@@ -5746,9 +5758,8 @@
         <value xml:lang="th">ข้อมูลการติดต่อไม่ใช่ของคุณ, คุณไม่อาจจะดูหรือแก้ไขมันได้</value>
         <value xml:lang="zh">指定的联系信息不属于你,你不能浏览或编辑它。</value>
     </property>
-    <property key="PartyDraftEmails">
-        <value xml:lang="en">Draft Emails</value>
-        <value xml:lang="it">Bozze emails</value>
+    <property key="PartyMyCommunications">
+        <value xml:lang="en">My Communications</value>
     </property>
     <property key="PartyName">
         <value xml:lang="cs">Jméno</value>
@@ -6045,6 +6056,12 @@
         <value xml:lang="th">ชื่อเล่น</value>
         <value xml:lang="zh">昵称</value>
     </property>
+    <property key="PartyNoAccess">
+        <value xml:lang="en">You do not have access to this information</value>
+        <value xml:lang="fr">Vous n'avez pas accès à cette information</value>
+        <value xml:lang="it">Non hai l'accesso a queste informazioni</value>
+        <value xml:lang="th">คุณไม่มีข้อมูลอยู่ในระบบ</value>
+    </property>
     <property key="PartyNoBillingAddress">
         <value xml:lang="cs">Nebyla vybrána fakturační adresa</value>
         <value xml:lang="de">Sie haben keine Rechnungsadresse ausgewählt</value>

Modified: ofbiz/trunk/applications/party/data/PartyPortletData.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/party/data/PartyPortletData.xml?rev=758522&r1=758521&r2=758522&view=diff
==============================================================================
--- ofbiz/trunk/applications/party/data/PartyPortletData.xml (original)
+++ ofbiz/trunk/applications/party/data/PartyPortletData.xml Thu Mar 26 06:06:12 2009
@@ -23,8 +23,8 @@
     <PortalPortlet portalPortletId="party" portletName="Party Info" screenName="Party" screenLocation="component://party/widget/partymgr/ProfileScreens.xml" description="General information about a person or party group" />
 
     <!-- communications -->
-    <PortalPortlet portalPortletId="communications" portletName="Communications"  description="Communication list"
-        screenName="Communications" screenLocation="component://party/widget/partymgr/CommunicationScreens.xml"
+    <PortalPortlet portalPortletId="MyCommunications" portletName="My Communications"  description="Communication list"
+        screenName="MyCommunicationEvents" screenLocation="component://party/widget/partymgr/CommunicationScreens.xml"
         editFormName="EditPartyId" editFormLocation="component://party/webapp/partymgr/communication/CommForms.xml" />
     
 

Added: ofbiz/trunk/applications/party/script/org/ofbiz/party/communication/CommunicationEventEvents.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/party/script/org/ofbiz/party/communication/CommunicationEventEvents.xml?rev=758522&view=auto
==============================================================================
--- ofbiz/trunk/applications/party/script/org/ofbiz/party/communication/CommunicationEventEvents.xml (added)
+++ ofbiz/trunk/applications/party/script/org/ofbiz/party/communication/CommunicationEventEvents.xml Thu Mar 26 06:06:12 2009
@@ -0,0 +1,194 @@
+<?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="setCommEventToRead" short-description="">
+        <entity-one entity-name="CommunicationEventRole" value-field="eventRole"/>
+        <if-compare operator="equals" value="COM_ROLE_CREATED" field="eventRole.statusId">
+            <call-simple-method method-name="checkCommEventAccess"/>
+            <if-compare operator="equals" value="true" field="found">
+                <entity-one entity-name="UserLogin" value-field="userLogin">
+                    <field-map field-name="userLoginId" value="system"/>
+                </entity-one>
+                <set-service-fields service-name="setCommunicationEventRoleStatus"
+                    map="parameters" to-map="updStat"/>
+                <set field="updStat.statusId" value="COM_ROLE_READ"/>
+                <set field="updStat.userLogin" from-field="userLogin"/>
+                <call-service service-name="setCommunicationEventRoleStatus" in-map-name="updStat"
+                    include-user-login="false"/>
+                <else>
+                    <add-error>
+                        <fail-property property="MyPortalNoAccess" resource="MyPortalUiLabels"/>
+                    </add-error>
+                </else>
+            </if-compare>
+        </if-compare>
+    </simple-method>
+    
+    <simple-method method-name="checkCommEventAccess"
+        short-description="check if the user has access to the email of this party">
+        <set field="found" value="false"/>
+        <if-compare-field operator="not-equals" field="parameters.partyId"
+            to-field="userLogin.partyId">
+            <entity-and list="emailOwners" entity-name="PartyRelationship"
+                filter-by-date="true">
+                <field-map field-name="partyIdFrom" value="${userLogin.partyId}"/>
+                <field-map field-name="roleTypeIdFrom" value="EMAIL_ADMIN"/>
+            </entity-and>
+            <iterate entry="emailOwners" list="emailOwner">
+                <if-compare operator="equals" value="${userLogin.partyId}"
+                    field="emailOwner.partyIdTo">
+                    <set field="found" value="true"/>
+                </if-compare>
+            </iterate>
+            <else>
+                <set field="found" value="true"/>
+            </else>
+        </if-compare-field>
+    </simple-method>
+    <simple-method method-name="addContentToCommEvent"
+        short-description="Add content to email communication">
+        <!-- Call layout to get field -->
+        <call-class-method class-name="org.ofbiz.content.layout.LayoutWorker"
+            method-name="uploadImageAndParameters" ret-field="formInput">
+            <field field="request" type="javax.servlet.http.HttpServletRequest"/>
+            <string value="partyId"/>
+        </call-class-method>
+        
+        <!-- Create party content -->
+        <set-service-fields service-name="createPartyContent" map="formInput.formInput"
+            to-map="partycontent"/>
+        <set field="partycontent.contentId" from-field="formInput.formInput.contentId"/>
+        <set field="partycontent.partyContentTypeId"
+            from-field="formInput.formInput.partyContentTypeId"/>
+        <set field="partycontent.partyId" from-field="formInput.formInput.partyId"/>
+        <call-service service-name="createPartyContent" in-map-name="partycontent"/>
+        
+        <!-- Create communication event and content association -->
+        <set-service-fields service-name="createCommEventContentAssoc"
+            map="formInput.formInput" to-map="contentAssoc"/>
+        <set field="contentAssoc.contentId" from-field="formInput.formInput.contentId"/>
+        <set field="contentAssoc.communicationEventId"
+            from-field="formInput.formInput.communicationEventId"/>
+        <call-service service-name="createCommEventContentAssoc" in-map-name="contentAssoc">
+            <result-to-field result-name="fromDate" field="fromDate"/>
+        </call-service>
+        
+        <!-- Return to request -->
+        <set field="communicationEventTypeId"
+            from-field="formInput.formInput.communicationEventTypeId"/>
+        <set field="communicationEventId" from-field="formInput.formInput.communicationEventId"/>
+        <field-to-request field="communicationEventTypeId"
+            request-name="communicationEventTypeId"/>
+        <field-to-request field="communicationEventId" request-name="communicationEventId"/>
+    </simple-method>
+    <simple-method method-name="createCommunicationContent"
+        short-description="Upload Content and Create Communication Content Association">
+        <!-- Call layout to get field -->
+        <call-class-method class-name="org.ofbiz.content.layout.LayoutWorker"
+            method-name="uploadImageAndParameters" ret-field="formInput">
+            <field field="request" type="javax.servlet.http.HttpServletRequest"/>
+            <string value="uploadedFile"/>
+        </call-class-method>
+        <set field="parameters.imageFileName" from-field="formInput.imageFileName"/>
+        
+        <!-- Call bsh get file type -->
+        <call-bsh><![CDATA[
+            String fileName = parameters.get("imageFileName");
+            String mimeTypeId = fileName.substring(fileName.indexOf(".")+1,fileName.length());
+            parameters.put("mimeType",mimeTypeId);
+            ]]>
+        </call-bsh>
+        
+        <!-- Get mime type from FileExtention -->
+        <set field="fileMap.fileExtensionId" value="${parameters.mimeType}"/>
+        <find-by-primary-key map="fileMap" value-field="mimeType" entity-name="FileExtension"/>
+        
+        <!-- Create Data Resource -->
+        <set-service-fields service-name="createContentFromUploadedFile"
+            map="formInput.formInput" to-map="data"/>
+        <set field="data.dataResourceTypeId" value="LOCAL_FILE"/>
+        <set field="data.dataTemplateTypeId" value="NONE"/>
+        <set field="data.dataCategoryId" from-field="formInput.formInput.dataCategoryId"/>
+        
+        <set field="data.statusId" from-field="formInput.formInput.statusId"/>
+        <set field="data.dataResourceName" from-field="formInput.imageFileName"/>
+        <set field="data.mimeTypeId" from-field="mimeType.mimeTypeId"/>
+        <set field="data.uploadedFile" from-field="formInput.imageData"/>
+        <set field="data._uploadedFile_fileName" from-field="formInput.imageFileName"/>
+        <set field="data._uploadedFile_contentType" from-field="formInput.formInput.mimeTypeId"/>
+        <call-service service-name="createDataResource" in-map-name="data">
+            <result-to-field result-name="dataResourceId" field="parameters.dataResourceId"/>
+        </call-service>
+        <log level="always" message=" DataResource : ${parameters.dataResourceId}"/>
+        
+        <!-- Create attach upload to data resource -->
+        <set-service-fields service-name="attachUploadToDataResource" map="formInput.formInput"
+            to-map="attachMap"/>
+        <set field="attachMap.uploadedFile" from-field="formInput.imageData"/>
+        <set field="attachMap._uploadedFile_fileName" from-field="formInput.imageFileName"/>
+        <set field="attachMap._uploadedFile_contentType" from-field="formInput.formInput.mimeTypeId"/>
+        <set field="attachMap.dataResourceId" from-field="parameters.dataResourceId"/>
+        <set field="attachMap.mimeTypeId" from-field="mimeType.mimeTypeId"/>
+        <call-service service-name="attachUploadToDataResource" in-map-name="attachMap"/>
+        
+        <!-- Create content from dataResource -->
+        <set-service-fields service-name="createContentFromDataResource"
+            map="formInput.formInput" to-map="contentMap"/>
+        <set field="contentMap.roleTypeId" from-field="formInput.formInput.roleTypeId"/>
+        <set field="contentMap.partyId" from-field="formInput.formInput.partyId"/>
+        <set field="contentMap.contentTypeId" from-field="formInput.formInput.contentTypeId"/>
+        <set field="contentMap.dataResourceId" from-field="parameters.dataResourceId"/>
+        <call-service service-name="createContentFromDataResource" in-map-name="contentMap">
+            <result-to-field result-name="contentId" field="parameters.contentId"/>
+        </call-service>
+        <log level="always" message=" Content : ${parameters.contentId}"/>
+        
+        <!-- Create party content -->
+        <set-service-fields service-name="createPartyContent" map="formInput.formInput"
+            to-map="partycontent"/>
+        <set field="partycontent.contentId" from-field="parameters.contentId"/>
+        <set field="partycontent.partyContentTypeId"
+            from-field="formInput.formInput.partyContentTypeId"/>
+        <set field="partycontent.partyId" from-field="formInput.formInput.partyId"/>
+        <call-service service-name="createPartyContent" in-map-name="partycontent"/>
+        
+        <!-- Create communication event and content association -->
+        <set-service-fields service-name="createCommEventContentAssoc"
+            map="formInput.formInput" to-map="contentAssoc"/>
+        <set field="contentAssoc.contentId" from-field="parameters.contentId"/>
+        <set field="contentAssoc.communicationEventId"
+            from-field="formInput.formInput.communicationEventId"/>
+        <call-service service-name="createCommEventContentAssoc" in-map-name="contentAssoc">
+            <result-to-field result-name="fromDate" field="fromDate"/>
+        </call-service>
+        
+        <!-- Return to request -->
+        <set field="communicationEventTypeId"
+            from-field="formInput.formInput.communicationEventTypeId"/>
+        <set field="communicationEventId" from-field="formInput.formInput.communicationEventId"/>
+        <field-to-request field="communicationEventId" request-name="communicationEventId"/>
+        <field-to-request field="communicationEventTypeId"
+            request-name="communicationEventTypeId"/>
+    </simple-method>
+    
+</simple-methods>

Propchange: ofbiz/trunk/applications/party/script/org/ofbiz/party/communication/CommunicationEventEvents.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: ofbiz/trunk/applications/party/script/org/ofbiz/party/communication/CommunicationEventEvents.xml
------------------------------------------------------------------------------
    svn:keywords = "Date Rev Author URL Id"

Propchange: ofbiz/trunk/applications/party/script/org/ofbiz/party/communication/CommunicationEventEvents.xml
------------------------------------------------------------------------------
    svn:mime-type = text/xml

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=758522&r1=758521&r2=758522&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 Thu Mar 26 06:06:12 2009
@@ -62,7 +62,11 @@
             </else>
         </if-empty>
         <field-to-result field="newEntity.communicationEventId" result-name="communicationEventId"/>
-        
+
+        <if-empty field="newEntity.partyIdFrom">
+            <set field="newEntity.partyIdFrom" from-field="userLogin.partyId"/>            
+        </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">
@@ -74,7 +78,7 @@
                 <set field="newEntity.partyIdTo" from-field="partyContactMech.partyId"/>
             </if-not-empty>
         </if-empty>
-        
+
         <now-timestamp field="newEntity.entryDate"/>
         <create-value value-field="newEntity"/>
 
@@ -140,24 +144,32 @@
         
         <!-- if the from- or to-party changed change also the roles -->
         <if-not-empty field="parameters.partyIdFrom">
-            <if-compare operator="not-equals" value="parameters.partIdFrom" field="event.partyIdFrom">
-                <!-- check if role exist then delete old role -->
-                <entity-one entity-name="CommunicationEventRole" value-field="roleFrom">
-                    <field-map field-name="communicationEventId" from-field="event.communicationEventId" />
-                    <field-map field-name="partyId" from-field="parameters.partyIdFrom" />
-                    <field-map field-name="roleTypeId" value="ORIGINATOR" />
-                </entity-one>
-                <if-not-empty field="roleFrom">
-                    <remove-value value-field="roleFrom" />
-                </if-not-empty>
-                <!-- add new role -->
-                <set field="newRoleFrom.communicationEventId" from-field="event.communicationEventId" />
-                <set field="newRoleFrom.partyId" from-field="event.partyIdFrom" />
-                <set field="newRoleFrom.roleTypeId" value="ORIGINATOR" />
-                <set field="newRoleFrom.contactMechId" from-field="event.contactMechIdFrom" />
-                <call-service service-name="createCommunicationEventRole"
-                    in-map-name="newRoleFrom" />
-            </if-compare>
+            <if>
+                <condition>
+                    <or>
+                        <if-compare operator="not-equals" value="parameters.partIdFrom" field="event.partyIdFrom"/>
+                        <if-compare operator="not-equals" value="parameters.contactIdFrom" field="event.contactIdFrom"/>
+                    </or>
+                </condition>
+                <then>
+                    <!-- check if role exist then delete old role -->
+                    <entity-one entity-name="CommunicationEventRole" value-field="roleFrom">
+                        <field-map field-name="communicationEventId" from-field="event.communicationEventId" />
+                        <field-map field-name="partyId" from-field="parameters.partyIdFrom" />
+                        <field-map field-name="roleTypeId" value="ORIGINATOR" />
+                    </entity-one>
+                    <if-not-empty field="roleFrom">
+                        <remove-value value-field="roleFrom" />
+                    </if-not-empty>
+                    <!-- add new role -->
+                    <set field="newRoleFrom.communicationEventId" from-field="event.communicationEventId" />
+                    <set field="newRoleFrom.partyId" from-field="event.partyIdFrom" />
+                    <set field="newRoleFrom.roleTypeId" value="ORIGINATOR" />
+                    <set field="newRoleFrom.contactMechId" from-field="event.contactMechIdFrom" />
+                    <call-service service-name="createCommunicationEventRole"
+                        in-map-name="newRoleFrom" />
+                </then>
+            </if>
         </if-not-empty>
         <if-empty field="parameters.partyIdTo">
             <if-not-empty field="parameters.contactMechIdTo">

Added: ofbiz/trunk/applications/party/webapp/partymgr/WEB-INF/actions/communication/GetMyCommunicationEventRole.groovy
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/party/webapp/partymgr/WEB-INF/actions/communication/GetMyCommunicationEventRole.groovy?rev=758522&view=auto
==============================================================================
--- ofbiz/trunk/applications/party/webapp/partymgr/WEB-INF/actions/communication/GetMyCommunicationEventRole.groovy (added)
+++ ofbiz/trunk/applications/party/webapp/partymgr/WEB-INF/actions/communication/GetMyCommunicationEventRole.groovy Thu Mar 26 06:06:12 2009
@@ -0,0 +1,38 @@
+/*
+ * 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.
+ */
+
+import org.ofbiz.base.util.*;
+import org.ofbiz.entity.util.EntityUtil;
+
+if (parameters.communicationEventId) {
+    communicationEventRoles = delegator.findByAnd("CommunicationEventAndRole",
+           ["communicationEventId" : parameters.communicationEventId,
+            "partyId" : userLogin.partyId,
+            "statusId" : "COM_ROLE_READ"
+           ]);
+    if (!communicationEventRoles) {
+        communicationEventRoles = delegator.findByAnd("CommunicationEventAndRole",
+           ["communicationEventId" : parameters.communicationEventId,
+            "partyId" : userLogin.partyId
+           ]);
+    }
+    if (communicationEventRoles) {
+        context.myCommunicationEventRole = communicationEventRoles.get(0);
+    }
+}
\ No newline at end of file

Propchange: ofbiz/trunk/applications/party/webapp/partymgr/WEB-INF/actions/communication/GetMyCommunicationEventRole.groovy
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: ofbiz/trunk/applications/party/webapp/partymgr/WEB-INF/actions/communication/GetMyCommunicationEventRole.groovy
------------------------------------------------------------------------------
    svn:keywords = "Date Rev Author URL Id"

Propchange: ofbiz/trunk/applications/party/webapp/partymgr/WEB-INF/actions/communication/GetMyCommunicationEventRole.groovy
------------------------------------------------------------------------------
    svn:mime-type = text/plain

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=758522&r1=758521&r2=758522&view=diff
==============================================================================
--- ofbiz/trunk/applications/party/webapp/partymgr/WEB-INF/controller.xml (original)
+++ ofbiz/trunk/applications/party/webapp/partymgr/WEB-INF/controller.xml Thu Mar 26 06:06:12 2009
@@ -46,7 +46,7 @@
 
     <request-map uri="main"><security https="true" auth="true"/><response name="success" type="view" value="main"/></request-map>
 
-    <request-map uri="viewprofile"><security https="true" auth="true"/><response name="success" type="view" value="viewprofile" save-last-view="true"/></request-map>
+    <request-map uri="viewprofile"><security https="true" auth="true"/><response name="success" type="view" value="viewprofile" save-current-view="true"/></request-map>
     <request-map uri="EditPartyRelationships"><security https="true" auth="true"/><response name="success" type="view" value="EditPartyRelationships"/></request-map>
     <request-map uri="viewroles"><security https="true" auth="true"/><response name="success" type="view" value="viewroles"/></request-map>
     <request-map uri="linkparty"><security https="true" auth="true"/><response name="success" type="view" value="linkparty"/></request-map>
@@ -684,38 +684,95 @@
     </request-map>
 
     <!-- communication event requests -->
-    <request-map uri="FindCommunicationEvents"><security https="true" auth="true"/><response name="success" type="view" value="FindCommunicationEvents"/></request-map>
-    <request-map uri="ListCommContent"><security https="true" auth="true"/><response name="success" type="view" value="ListCommContent"/></request-map>
-    <request-map uri="PendingCommunications"><security https="true" auth="true"/><response name="success" type="view" value="PendingCommunications"/></request-map>
-    <request-map uri="EditCommunicationEvent"><security https="true" auth="true"/><response name="success" type="view" value="EditCommunicationEvent"/></request-map>
-    <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="EditCommunication"><security https="true" auth="true"/><response name="success" type="view" value="EditCommunicationEvent"/></request-map>
+    <request-map uri="setCommunicationEventRoleStatus">
+        <security https="true" auth="true"/>
+        <event type="service" invoke="setCommunicationEventRoleStatus"/>
+        <response name="success" type="view-last"/>
+        <response name="error" type="view-last"/>
+    </request-map>
+    <request-map uri="MyCommunicationEvents">
+        <security https="true" auth="true"/>
+        <response name="success" type="view" value="MyCommunicationEvents" save-home-view="true"/>
+    </request-map>
+    <request-map uri="FindCommunicationEvents">
+        <security https="true" auth="true"/>
+        <response name="success" type="view" value="FindCommunicationEvents" save-home-view="true"/>
+    </request-map>
+    <request-map uri="ListCommContent">
+        <security https="true" auth="true"/>
+        <response name="success" type="view" value="ListCommContent"/>
+    </request-map>
+    <request-map uri="PendingCommunications">
+        <security https="true" auth="true"/>
+        <response name="success" type="view" value="PendingCommunications"/>
+    </request-map>
+    <request-map uri="EditCommunicationEvent">
+        <security https="true" auth="true"/>
+        <response name="success" type="view" value="EditCommunicationEvent" save-current-view="true"/>
+    </request-map>
+    <request-map uri="ViewCommunicationEvent">
+        <security https="true" auth="true"/>
+        <event  type="simple" invoke="setCommEventToRead" path="org/ofbiz/party/communication/CommunicationEventEvents.xml"/>
+        <response name="success" type="view" value="ViewCommunicationEvent" save-last-view="true"/>
+    </request-map>
+    <request-map uri="addContentToCommEvent">
+        <security https="true" auth="true"/>        
+        <event type="simple" invoke="addContentToCommEvent" path="org/ofbiz/party/communication/CommunicationEventEvents.xml"/>
+        <response name="success" type="request" value="NewCommunicationEvent"/>
+        <response name="error" type="view" value="EditCommunicationEvent"/>
+    </request-map>
+    <request-map uri="addAttachmentEmail">
+        <security https="true" auth="true"/>        
+        <response name="success" type="view" value="addAttachmentEmail"/>
+    </request-map>
+    <request-map uri="uploadAttachFiletoEmail">
+        <security https="true" auth="true"/>        
+        <event type="simple" invoke="createCommunicationContent" path="org/ofbiz/party/communication/CommunicationEventEvents.xml"/>
+        <response name="success" type="request" value="EditCommunicationEvent"/>
+        <response name="error" type="view" value="addAttachmentEmail"/>
+    </request-map>
+    <request-map uri="removeAttachFile">
+        <security https="true" auth="true"/>
+        <event type="service" invoke="removeCommEventContentAssoc"/>        
+        <response name="success" type="request" value="EditCommunicationEvent"/>
+        <response name="error" type="view" value="EditCommunicationEvent"/>
+    </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="NewDraftCommunicationEvent">
+        <security https="true" auth="true"/>
+        <event type="service" invoke="createCommunicationEvent"/>
+        <response name="success" type="view" value="EditCommunicationEvent" save-current-view="true"/>
+    </request-map>
     <request-map uri="createCommunicationEvent">
         <security https="true" auth="true"/>
         <event type="service" invoke="createCommunicationEvent"/>
-        <response name="success" type="view" value="EditCommunicationEvent"/>
-        <response name="error" type="view" value="ViewCommunicationEvent"/>
+        <response name="success" type="view-last"/>
+        <response name="error" type="view" value="EditCommunicationEvent"/>
     </request-map>
     <request-map uri="updateCommunicationEvent">
         <security https="true" auth="true"/>
         <event type="service" invoke="updateCommunicationEvent"/>
-        <response name="success" type="view" value="EditCommunicationEvent"/>
-        <response name="error" type="view" value="ViewCommunicationEvent"/>
+        <response name="success" type="view-home"/>
+        <response name="error" type="view" value="EditCommunicationEvent"/>
     </request-map>
     <request-map uri="deleteCommunicationEvent">
         <security https="true" auth="true"/>
         <event type="service" invoke="deleteCommunicationEvent"/>
-        <response name="success" type="view" value="FindCommunicationEvents"/>
-        <response name="error" type="view" value="ViewCommunicationEvent"/>
+        <response name="success" type="view-home" value="MyCommunicationEvents"/>
+        <response name="error" type="view-last"/>
     </request-map>
     <request-map uri="deleteUnknownCommunicationEvent">
         <security https="true" auth="true"/>
         <event type="service" invoke="deleteCommunicationEvent"/>
-        <response name="success" type="view" value="FindCommunicationEvents"/>
-        <response name="error" type="view" value="ViewCommunicationEvent"/>
+        <response name="success" type="view-last" save-last-view="true"/>
+        <response name="error" type="view-last" save-last-view="true"/>
     </request-map>
     <request-map uri="deleteCommunicationEvents">
         <security https="true" auth="true"/>
@@ -731,27 +788,20 @@
     </request-map>
     <request-map uri="editRequestFromCommEvent">
         <security https="true" auth="true" />
-        <response name="success" type="view" value="EditRequestFromCommEvent" />
+        <response name="success" type="view" value="EditRequestFromCommEvent" save-last-view="true"/>
     </request-map>
     <request-map uri="createRequestFromCommEvent">
         <security https="true" auth="true"/>
         <event type="service" invoke="createCustRequestFromCommEvent"/>
-        <response name="success" type="view" value="ViewRequest"/>
-        <response name="error" type="view" value="EditRequestFromCommEvent"/>
+        <response name="success" type="view-last"/>
+        <response name="error" type="view-last"/>
     </request-map>
 
-    <request-map uri="deletePartyCommunicationEvent">
-        <security https="true" auth="true"/>
-        <event type="service" invoke="deleteCommunicationEvent"/>
-        <response name="success" type="view" value="ListPartyCommEvents"/>
-        <response name="error" type="view" value="ListPartyCommEvents"/>
-    </request-map>
-    
     <request-map uri="allocateMsgToParty">
         <security https="true" auth="true"/>
         <event type="simple" path="org/ofbiz/party/communication/CommunicationEventServices.xml" invoke="allocateMsgToParty"/>
-        <response name="success" type="view" value="ViewCommunicationEvent"/>
-        <response name="error" type="view" value="ViewCommunicationEvent"/>
+        <response name="success" type="view-last" save-last-view="true"/>
+        <response name="error" type="view-last" save-last-view="true"/>
     </request-map>
 
     <request-map uri="createCommContentDataResource">
@@ -771,8 +821,8 @@
     <request-map uri="uploadCommEventContent">
         <security https="true" auth="true"/>
         <event type="service" invoke="persistContentAndAssoc"/>
-        <response name="success" type="view" value="EditCommContent"/>
-        <response name="error" type="view" value="EditCommContent"/>
+        <response name="success" type="view-last"/>
+        <response name="error" type="view-last"/>
     </request-map>
     
     <request-map uri="UpdateCommPurposes"><security https="true" auth="true"/><response name="success" type="view" value="UpdateCommPurposes"/></request-map>
@@ -793,16 +843,15 @@
     <request-map uri="createCommunicationEventRole">
         <security https="true" auth="true"/>
         <event type="service" invoke="createCommunicationEventRole"/>
-        <response name="success" type="view" value="UpdateCommRoles"/>
-        <response name="error" type="view" value="UpdateCommRoles"/>
+        <response name="success" type="view-last"/>
+        <response name="error" type="view-last"/>
     </request-map>
     <request-map uri="RemoveCommunicationEventRole">
         <security https="true" auth="true"/>
         <event type="service" invoke="removeCommunicationEventRole"/>
-        <response name="success" type="view" value="UpdateCommRoles"/>
-        <response name="error" type="view" value="UpdateCommRoles"/>
+        <response name="success" type="view-last"/>
+        <response name="error" type="view-last"/>
     </request-map>
-
     <request-map uri="ListPartyCommEvents"><security https="true" auth="true"/><response name="success" type="view" value="ListPartyCommEvents"/></request-map>
     
     <!-- TODO
@@ -1165,11 +1214,13 @@
     <view-map name="PendingCommunications" type="screen" page="component://party/widget/partymgr/CommunicationScreens.xml#PendingCommunications"/>
     <view-map name="ListPartyCommEvents" type="screen" page="component://party/widget/partymgr/CommunicationScreens.xml#ListPartyCommEvents"/>
     <view-map name="ListUnknownPartyComms" type="screen" page="component://party/widget/partymgr/CommunicationScreens.xml#ListUnknownPartyComms"/>
+    <view-map name="MyCommunicationEvents" type="screen" page="component://party/widget/partymgr/CommunicationScreens.xml#PartyCommunicationEvents"/>
     <view-map name="FindCommunicationEvents" type="screen" page="component://party/widget/partymgr/CommunicationScreens.xml#FindCommunicationEvents"/>
     <view-map name="EditCommunicationEvent" type="screen" page="component://party/widget/partymgr/CommunicationScreens.xml#EditCommunicationEvent"/>
     <view-map name="ViewCommunicationEvent" type="screen" page="component://party/widget/partymgr/CommunicationScreens.xml#ViewCommunicationEvent"/>
     <view-map name="UpdateCommPurposes" type="screen" page="component://party/widget/partymgr/CommunicationScreens.xml#UpdateCommPurposes"/>
     <view-map name="UpdateCommRoles" type="screen" page="component://party/widget/partymgr/CommunicationScreens.xml#UpdateCommRoles"/>
+    <view-map name="addAttachmentEmail" type="screen" page="component://party/widget/partymgr/CommunicationScreens.xml#addAttachmentEmail"/>
     
     <!-- TODO
     <view-map name="ListCommCustRequests" type="screen" page="component://party/widget/partymgr/CommunicationScreens.xml#ListCommCustRequests"/>

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=758522&r1=758521&r2=758522&view=diff
==============================================================================
--- ofbiz/trunk/applications/party/webapp/partymgr/communication/CommForms.xml (original)
+++ ofbiz/trunk/applications/party/webapp/partymgr/communication/CommForms.xml Thu Mar 26 06:06:12 2009
@@ -117,8 +117,7 @@
         <field name="messageId"><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">
+    <form name="EditEmail" type="single" target="createCommunicationEvent" default-map-name="communicationEvent">
         <actions>
             <set field="nowDate" value="${bsh:org.ofbiz.base.util.UtilDateTime.nowDateString(&quot;yyyy-MM-dd HH:mm:ss.S&quot;)}" type="String"/>            
             <entity-condition entity-name="PartyContactWithPurpose" list="emailAddresses">
@@ -140,7 +139,8 @@
                 <order-by field-name="infoString"/>
             </entity-condition>
         </actions>
-        <field name="donePage"><hidden/></field>
+        <alt-target use-when="communicationEvent!=null" target="updateCommunicationEvent"/>
+        <field name="communicationEventId"><hidden/></field>
         <field name="communicationEventTypeId"><hidden value="AUTO_EMAIL_COMM"/></field>
         <field name="statusId"><hidden value="COM_IN_PROGRESS"/></field>
         <field name="parentCommEventId" use-when="parentCommEventId != null"><hidden value="${parameters.parentCommEventId}"/></field>
@@ -152,14 +152,49 @@
             </drop-down>
         </field>
         <field name="contactMechIdTo" title="${uiLabelMap.PartyEmailTo}">
-            <lookup target-form-name="LookupPartyEmail"/>
+            <lookup target-form-name="LookupPartyEmail" default-value="${parameters.contactMechIdTo}"/>
         </field>
         <field name="datetimeStarted" title="${uiLabelMap.CommonSendDate}"><date-time/></field>
         <field name="subject"><text size="60" default-value="${parameters.subject}"/></field>
         <field name="contentMimeTypeId"><hidden value="text/plain"/></field>
-        <field name="content" title="${uiLabelMap.CommonContent}"><textarea cols="80" rows="20" default-value="${parameters.content}"/></field>
-        <field name="sendButton"><submit button-type="button"/></field>
+        <field name="content" title="${uiLabelMap.CommonContent}"><textarea cols="60" rows="10" default-value="${parameters.content}"/></field>
+        <field name="send" title="&amp;nbsp;" position="1" use-when="communicationEvent!=null">
+            <hyperlink also-hidden="true" target-type="plain" description="${uiLabelMap.CommonSend}" target="javascript:(document.EditEmail.submit())"/>
+        </field>
+        <field name="save" title="&amp;nbsp;" position="2" use-when="communicationEvent!=null">
+            <hyperlink also-hidden="true" target-type="plain" description="${uiLabelMap.CommonSave}" target="javascript:(document.EditEmail.statusId.value='COM_PENDING'),(document.EditEmail.submit())"/>
+        </field>
+        <field name="createButton" use-when="communicationEvent==null"><submit/></field>
+        <field name="dummy" position="320"><hidden/></field>
+    </form>
+    <form name="EditInternalNote" type="single" target="createCommunicationEvent" default-map-name="communicationEvent">
+        <actions>
+            <script location="component://party/webapp/partymgr/WEB-INF/actions/communication/recentVisitor.groovy"/>
+        </actions>
+        <alt-target use-when="communicationEvent!=null" target="updateCommunicationEvent"/>
+        <field name="communicationEventId"><hidden/></field>
+        <field name="communicationEventTypeId"><hidden value="COMMENT_NOTE"/></field>
+        <field name="parentCommEventId"><hidden value="${parameters.parentCommEventId}"/></field>
+        <field name="statusId"><hidden value="COM_PENDING"/></field>
+        <field name="partyIdFrom"><hidden value="${userLogin.partyId}"/></field>
+        <field name="partyIdTo" title="${uiLabelMap.PartyPartyTo}">
+            <drop-down>
+                <list-options list-name="recentParties" key-name="partyId" description="${firstName} ${middleName} ${lastName} ${groupName}"/>
+            </drop-down>
+        </field>
+        <field name="subject"><text size="60" default-value="${parameters.subject}"/></field>
+        <field name="contentMimeTypeId"><hidden value="text/plain"/></field>
+        <field name="content" title="${uiLabelMap.CommonContent}"><textarea cols="60" rows="10" default-value="${parameters.content}"/></field>
+        <field name="send" title="&amp;nbsp;" position="1" use-when="communicationEvent!=null">
+            <hyperlink also-hidden="true" target-type="plain" description="${uiLabelMap.CommonSend}" target="javascript:(document.EditInternalNote.statusId.value='COM_COMPLETED'),(document.EditInternalNote.submit())"/>
+        </field>
+        <field name="save" title="&amp;nbsp;" position="2" use-when="communicationEvent!=null">
+            <hyperlink also-hidden="true" target-type="plain" description="${uiLabelMap.CommonSave}" target="javascript:(document.EditInternalNote.submit())"/>
+        </field>
+        <field name="createButton" use-when="communicationEvent==null"><submit/></field>
+        <field name="dummy" position="320"><hidden/></field>
     </form>
+    
     <form name="ViewEmail" type="single" default-map-name="communicationEvent">
         <actions>
             <entity-one entity-name="ContactMech"  value-field="contactMechFrom">
@@ -190,52 +225,28 @@
         <field name="note" title="${uiLabelMap.CommonNote}"><display/></field>
     </form>
     
-    <form name="NewInternalNote" type="single" target="createCommunicationEvent" default-map-name="communicationEvent">
-        <actions>
-            <script location="component://party/webapp/partymgr/WEB-INF/actions/communication/recentVisitor.groovy"/>
-        </actions>
-        <field name="donePage"><hidden/></field>
-        <field name="communicationEventTypeId"><hidden value="COMMENT_NOTE"/></field>
-        <field name="parentCommEventId"><hidden value="${parameters.parentCommEventId}"/></field>
-        <field name="statusId"><hidden value="COM_COMPLETE"/></field>
-        <field name="partyIdFrom"><hidden value="${userLogin.partyId}"/></field>
-        <field name="partyIdTo" title="${uiLabelMap.PartyPartyTo}">
-            <drop-down>
-                <list-options list-name="recentParties" key-name="partyId" description="${firstName} ${middleName} ${lastName} ${groupName}"/>
-            </drop-down>
-        </field>
-        <field name="subject"><text size="60" default-value="${parameters.subject}"/></field>
-        <field name="contentMimeTypeId"><hidden value="text/plain"/></field>
-        <field name="content" title="${uiLabelMap.CommonContent}"><textarea cols="60" rows="10" default-value="${parameters.content}"/></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="donePage"><hidden/></field>
-        <field name="communicationEventId">
-            <hyperlink description="${communicationEventId}" target="ViewCommunicationEvent?communicationEventId=${communicationEventId}"/>
-        </field>
-        <field name="partyIdFrom" title="${uiLabelMap.PartyPartyFrom}"><display-entity entity-name="PartyNameView"  key-field-name="partyId" description="${firstName} ${middleName} ${lastName} ${groupName}"><sub-hyperlink target="viewprofile?partyId=${partyIdFrom}" description="[${partyIdFrom}]"/></display-entity></field>
-        <field name="partyIdTo" title="${uiLabelMap.PartyPartyTo}"><display-entity entity-name="PartyNameView"  key-field-name="partyId" description="${firstName} ${middleName} ${lastName} ${groupName}"><sub-hyperlink target="viewprofile?partyId=${communicationEvent.partyIdTo}" description="[${communicationEvent.partyIdTo}]"/></display-entity></field>
+        <field name="communicationEventId"><display/></field>
+        <field name="partyIdFrom" use-when="&quot;my&quot;==void" title="${uiLabelMap.PartyPartyFrom}"><display-entity entity-name="PartyNameView"  key-field-name="partyId" description="${firstName} ${middleName} ${lastName} ${groupName}"><sub-hyperlink target="viewprofile?partyId=${partyIdFrom}" description="[${partyIdFrom}]"/></display-entity></field>
+        <field name="partyIdTo" use-when="&quot;my&quot;==void" title="${uiLabelMap.PartyPartyTo}"><display-entity entity-name="PartyNameView"  key-field-name="partyId" description="${firstName} ${middleName} ${lastName} ${groupName}"><sub-hyperlink target="viewprofile?partyId=${communicationEvent.partyIdTo}" description="[${communicationEvent.partyIdTo}]"/></display-entity></field>
         <field name="statusId"><display-entity description="${description}" entity-name="StatusItem" key-field-name="statusId"/></field>
-        <field name="contactMechTypeId"><display-entity description="${description}" entity-name="ContactMechType" key-field-name="contactMechTypeId"/></field>
-        <field name="contactMechIdFrom" title="${uiLabelMap.PartyFromContactMech}"><display/></field>
-        <field name="contactMechIdTo" title="${uiLabelMap.PartyToEmailAddress}">
+        <field name="contactMechTypeId" use-when="&quot;my&quot;==void"><display-entity description="${description}" entity-name="ContactMechType" key-field-name="contactMechTypeId"/></field>
+        <field name="contactMechIdFrom" use-when="&quot;my&quot;==void" title="${uiLabelMap.PartyFromContactMech}"><display/></field>
+        <field name="contactMechIdTo" use-when="&quot;my&quot;==void" title="${uiLabelMap.PartyToEmailAddress}">
             <display-entity entity-name="ContactMech" key-field-name="contactMechId" description="${infoString}"/>
         </field>
-        <field name="roleTypeIdFrom"><display-entity description="${description}" entity-name="RoleType" key-field-name="roleTypeId"/></field>
-        <field name="roleTypeIdTo"><display-entity description="${description}" entity-name="RoleType" key-field-name="roleTypeId"/></field>
+        <field name="roleTypeIdFrom" use-when="&quot;my&quot;==void"><display-entity description="${description}" entity-name="RoleType" key-field-name="roleTypeId"/></field>
+        <field name="roleTypeIdTo" use-when="&quot;my&quot;==void"><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="reasonEnumId"><display-entity entity-name="Enumeration" description="${description}" key-field-name="enumId"/></field>
         <field name="subject"><display/></field>
         <field map-name="subjectMap" name="eventNote" title="${uiLabelMap.CommonNote}"><display/></field>
-        <field name="contentMimeTypeId"><display/></field>
+        <field name="contentMimeTypeId" use-when="&quot;my&quot;==void"><display/></field>
         <field name="content" title="${uiLabelMap.CommonContent}"><textarea cols="60" rows="10" read-only="true"/></field>
     </form>
 
-    <form name="findCommEvents" type="single" target="FindCommunicationEvents" paginate="true"
+    <form name="findCommEvents" type="single" target="FindCommunicationEvents" paginate="true" focus-field-name="submitButton"  
         header-row-style="header-row" default-table-style="basic-table">
         <field name="communicationEventId" position="1"><text-find/></field>
         <field name="parentCommEventId" position="2"><text-find/></field>
@@ -293,7 +304,7 @@
         </row-actions>
         <field name="communicationEventId"><hidden/></field>
         <field name="subject">
-            <hyperlink description="${subject}" target="ViewCommunicationEvent?communicationEventId=${communicationEventId}"/>
+            <hyperlink description="${subject}" target="View${my}CommunicationEvent?communicationEventId=${communicationEventId}&amp;partyId=${partyId}&amp;roleTypeId=${roleTypeId}"/>
         </field>
         <field name="communicationEventTypeId" title="${uiLabelMap.CommonType}"><display-entity description="${description}" entity-name="CommunicationEventType" key-field-name="communicationEventTypeId"/></field>
         <field name="partyIdFrom" title="${uiLabelMap.CommonPartyID} ${uiLabelMap.CommonFrom}">
@@ -310,22 +321,33 @@
         <field name="createdStamp" title="${uiLabelMap.CommonCreated}"><display type="date"/></field>
         <field name="datetimeStarted" title="${uiLabelMap.CommonSend}"><display type="date"/></field>
     </form>
-
-    <form name="ListPartyCommEvents" type="list" extends="ListCommEvents"
-        header-row-style="header-row-2" odd-row-style="alternate-row" default-table-style="basic-table hover-bar">
-        <actions>
-            <entity-condition entity-name="CommunicationEventAndRole" list="commEvents">
-                <condition-list combine="and">
-                    <condition-expr field-name="partyId" operator="equals" value="${partyId}"/>
-                </condition-list>
-                <order-by field-name="-entryDate"/>
-            </entity-condition>
-        </actions>
-        <field name="removeLink" title="${uiLabelMap.CommonDelete}" widget-style="smallSubmit">
-            <hyperlink also-hidden="false" description="${uiLabelMap.CommonDelete}" target="deletePartyCommunicationEvent?partyId=${partyId}&amp;communicationEventId=${communicationEventId}"/>
+    <form name="ListPartyCommEvents" extends="ListCommEvents" extends-resource="component://party/webapp/partymgr/communication/CommForms.xml" type="list" target="RemoveCommunicationEventRole">
+        <row-actions>
+            <set field="toComplete" value="${bsh:&quot;COM_ROLE_READ&quot;.equals(roleStatusId)?&quot;PartyToComplete&quot;:&quot;&quot;}"/>
+        </row-actions>
+        <field name="partyId"><hidden/></field>
+        <field name="communicationEventId"><hidden/></field>
+        <field name="roleTypeId"><hidden/></field>
+        <field name="deleteCommEventIfLast"><hidden value="Y"/></field>        
+        <field name="delContentDataResource"><hidden value="Y"/></field>
+        <field name="roleTypeId"><display-entity entity-name="RoleType" description="${description}"/></field>
+        <field name="removeButton" widget-style="smallSubmit"><submit/></field>
+        <field name="subject" widget-style="buttontext" widget-area-style="fieldWidth300">
+            <hyperlink description="${subject} " target="ViewCommunicationEvent?communicationEventId=${communicationEventId}&amp;partyId=${partyId}&amp;roleTypeId=${roleTypeId}&amp;my=${my}"/>
+        </field>
+        <field name="statusId" entry-name="roleStatusId" widget-style="buttontext" widget-area-style="fieldWidth300">
+            <display-entity entity-name="StatusItem" description="${description}">
+                <sub-hyperlink target="setCommunicationEventRoleStatus"
+                    description="${uiLabelMap.${toComplete}}">
+                    <parameter param-name="communicationEventId"/>
+                    <parameter param-name="partyId"/>
+                    <parameter param-name="roleTypeId"/>
+                    <parameter param-name="statusId" value="COM_ROLE_COMPLETED"/>
+                </sub-hyperlink>
+            </display-entity>
         </field>
+        <field name="createdStamp" entry-name="entryDate"/>
     </form>
-
     <form name="ListPendingCommEvents" type="list" extends="ListCommEvents" odd-row-style="alternate-row" default-table-style="basic-table hover-bar">
         <actions>
             <entity-condition entity-name="CommunicationEvent" list="commEvents">
@@ -343,9 +365,9 @@
     <form name="ListUnknownPartyEmails" extends="ListCommEvents" type="multi" use-row-submit="true" separate-columns="true"
            target="deleteCommunicationEvents?communicationEventId=${communicationEventId}&amp;delContentDataResource=Y">
         <actions>
-            <entity-and  list="commEvents" entity-name="CommunicationEvent">
+            <entity-and  list="commEvents" entity-name="CommunicationEventAndRole">
                 <field-map field-name="statusId" value="COM_UNKNOWN_PARTY"/>
-                <order-by field-name="-lastUpdatedStamp" />
+                <order-by field-name="-entryDate" />
             </entity-and>
         </actions>
         <field name="_rowSubmit" title="${uiLabelMap.CommonYes}">
@@ -367,7 +389,7 @@
         </actions>
     </form>
 
-    <form name="ListLookupCommEvents" type="list" list-name="listIt" extends="ListCommEvents" header-row-style="header-row-2">
+    <form name="ListLookupCommEvents" type="list" list-name="listIt" extends="ListCommEvents" header-row-style="header-row-2" target="deleteCommunicationEvent">
         <actions>
             <service result-map-list="listIt" result-map="result" service-name="performFind">
                 <field-map from-field="parameters" field-name="inputFields"/>
@@ -375,9 +397,7 @@
                 <field-map value="-createdStamp" field-name="orderBy"/>
             </service>
         </actions>
-        <field name="removeLink" title="${uiLabelMap.CommonDelete}" widget-style="smallSubmit">
-            <hyperlink also-hidden="false" description="${uiLabelMap.CommonDelete}" target="deleteCommunicationEvent?communicationEventId=${communicationEventId}"/>
-        </field>
+        <field name="removeLink" title="${uiLabelMap.CommonDelete}"><submit/></field>
     </form>
     
     <form name="ListCommWorkEfforts" type="list" paginate-target="ListCommWorkEfforts"
@@ -439,13 +459,14 @@
         <field name="submitButton" title="${uiLabelMap.PartyAddPurpose}"><submit button-type="button"/></field>
     </form>
 
-    <form name="ListCommRoles" type="list" paginate-target="UpdateCommRoles"
+    <form name="ListCommRoles" type="list" paginate-target="UpdateCommRoles" target="RemoveCommunicationEventRole"
         odd-row-style="alternate-row" default-table-style="basic-table hover-bar">
         <actions>
             <entity-and entity-name="CommunicationEventRole" use-cache="true">
                 <field-map field-name="communicationEventId" from-field="parameters.communicationEventId"/>
             </entity-and>
         </actions>
+        <field name="communicationEventId"><hidden/></field>
         <field name="partyId" title="${uiLabelMap.PartyPartyId}">
             <display-entity description="${firstName} ${middleName} ${lastName} ${groupName}" entity-name="PartyNameView">
                 <sub-hyperlink target="viewprofile?partyId=${partyId}" link-style="smallSubmit" description="${partyId}"/>
@@ -454,22 +475,22 @@
         <field name="contactMechId"><display-entity description="${infoString}" entity-name="ContactMech"/></field>
         <field name="roleTypeId"><display-entity description="${description}" entity-name="RoleType"/></field>
         <field name="statusId"><display-entity entity-name="StatusItem" description="${description}"/></field>
-        <field name="removeLink" title="${uiLabelMap.CommonEmptyHeader}" widget-style="smallSubmit">
-            <hyperlink also-hidden="false" description="${uiLabelMap.CommonDelete}" target="/RemoveCommunicationEventRole?partyId=${partyId}&amp;roleTypeId=${roleTypeId}&amp;communicationEventId=${communicationEventId}&amp;donePage=${donePage}"/>
-        </field>
+        <field name="removeButton" widget-style="smallSubmit"><submit/></field>
     </form>
 
     <form name="ViewCommRoles" extends="ListCommRoles">
-        <field name="removeLink" title="${uiLabelMap.CommonEmptyHeader}"><ignored/></field>
+        <field name="removeButton"><ignored/></field>
     </form>
 
     <form name="AddEventRole" type="single" target="createCommunicationEventRole"
         header-row-style="header-row" default-table-style="basic-table">
         <field name="communicationEventId"><hidden/></field>
-        <field name="partyId" title="${uiLabelMap.PartyPartyId}"><lookup target-form-name="LookupPartyName"/></field>
-        <field name="roleTypeId" >
+        <field name="partyId" title="${uiLabelMap.PartyPartyId}" position="1"><lookup target-form-name="LookupPartyName"/></field>
+        <field name="roleTypeId" position="2">
             <drop-down>
                 <entity-options description="${description}" entity-name="RoleType" key-field-name="roleTypeId">
+                    <entity-constraint name="parentTypeId" value="COMMEVENT_ROLE"/>
+                    <entity-constraint name="roleTypeId" operator="not-equals" value="ORIGINATOR"/>
                     <entity-order-by field-name="description"/>
                 </entity-options>
             </drop-down>
@@ -634,7 +655,7 @@
         <field name="subject" widget-style="buttontext"
             widget-area-style="fieldWidth300">
             <hyperlink description="${subject}"
-                target="ViewCommunicationEvent?communicationEventId=${communicationEventId}" />
+                target="ViewCommunicationEvent?communicationEventId=${communicationEventId}&amp;my=My" />
         </field>
         <field name="entryDate">
             <display description="${date:dateTimeStr(entryDate, timeZone, locale)}" />
@@ -690,21 +711,6 @@
     <form name="ListRequests" extends="ListRequests" extends-resource="component://order/webapp/ordermgr/request/RequestForms.xml">
         <field name="custRequestName"><hyperlink description="${custRequestName} [${custRequestId}]" target="/ordermgr/control/ViewRequest?custRequestId=${custRequestId}" target-type="inter-app"/></field>
     </form>
-
-    <form name="ListMyUnknownPartyEmails" type="multi"
-        extends="ListMyUnknownPartyEmails" extends-resource="component://party/webapp/partymgr/communication/CommForms.xml" use-row-submit="true">
-        <field name="portalPageId"><hidden/></field>
-        <field name="subject" widget-style="buttontext" widget-area-style="fieldWidth300">
-            <hyperlink description="${subject}" target="deleteCommunicationEvents?portalPageId=${parameters.portalPageId}"/>
-        </field>
-        <field name="_rowSubmit" title="${uiLabelMap.CommonYes}">
-            <check />
-        </field>
-        <field name="deleteSelectedButton" widget-style="smallSubmit">
-            <submit />
-        </field>
-    </form>
-
     <form name="EditPartyId" extends="CommonPortletEdit" extends-resource="component://common/widget/PortletEditForms.xml">
         <field name="communicationPartyId" entry-name="attributeMap.communicationPartyId">
             <lookup target-form-name="LookupPartyName"/>
@@ -712,35 +718,7 @@
         <field name="updateButton"><submit/></field>
     </form>
 
-    <form name="ListPartyCommEvents" extends="ListCommEvents" extends-resource="component://party/webapp/partymgr/communication/CommForms.xml" type="list">
-        <row-actions>
-            <set field="toComplete" value="${bsh:&quot;COM_ROLE_READ&quot;.equals(roleStatusId)?&quot;toComplete&quot;:&quot;&quot;}"/>
-        </row-actions>
-        <field name="portalPageId"><hidden/></field>
-        <field name="roleTypeId"><display-entity entity-name="RoleType" description="${description}"/></field>
-        <field name="removeLink" title="${uiLabelMap.CommonEmptyHeader}" widget-style="smallSubmit">
-            <hyperlink also-hidden="false" description="${uiLabelMap.CommonDelete}" target="RemoveCommunicationEventRole?partyId=${partyId}&amp;communicationEventId=${communicationEventId}&amp;roleTypeId=${roleTypeId}&amp;deleteCommEventIfLast=Y&amp;delContentDataResource=Y&amp;portalPageId=${parameters.portalPageId}"/>
-        </field>
-        <field name="subject" widget-style="buttontext" widget-area-style="fieldWidth300">
-            <hyperlink description="${subject} " target="ViewCommunicationEvent?communicationEventId=${communicationEventId}&amp;partyId=${partyId}&amp;roleTypeId=${roleTypeId}&amp;portalPageId=${portalPageId}"/>
-        </field>
-        <field name="statusId" entry-name="roleStatusId" widget-style="buttontext" widget-area-style="fieldWidth300">
-            <display-entity entity-name="StatusItem" description="${description}">
-                <sub-hyperlink description="${uiLabelMap.PartyToComplete}" target="setCommunicationEventRoleStatus">
- <parameter param-name="communicationEventId"/>
- <parameter param-name="partyId"/>
- <parameter param-name="roleTypeId"/>
- <parameter param-name="statusID" value="COM_ROLE_COMPLETED"/>
- <parameter param-name="donePage" from-field="parameters.donePage"/>
- <parameter param-name="VIEWSIZE" from-field="parameters.VIEWSIZE"/>
- <parameter param-name="VIEW_INDEX" from-field="parameters.VIEW_INDEX"/>
- </sub-hyperlink>
-            </display-entity>
-        </field>
-        <field name="createdStamp" entry-name="entryDate"/>
-    </form>
-
-    <form name="ListDraftEmails" type="list" extends="ListCommEvents" extends-resource="component://party/webapp/partymgr/communication/CommForms.xml"
+    <form name="ListDraftEmails" type="list" extends="ListCommEvents" extends-resource="component://party/webapp/partymgr/communication/CommForms.xml" target="deleteCommunicationEvent"
         use-row-submit="true">
         <actions>
             <entity-condition entity-name="CommunicationEvent" list="commEvents">
@@ -752,13 +730,8 @@
             </entity-condition>
         </actions>        
         <field name="subject">
-            <hyperlink description="${subject}" target="EditCommunicationEvent?communicationEventId=${communicationEventId}&amp;communicationEventTypeId=EMAIL_COMMUNICATION&amp;partyId=${userLogin.partyId}"/>
-        </field>
-        <field name="removeLink" title="${uiLabelMap.CommonDelete}" widget-style="smallSubmit">
-            <hyperlink also-hidden="false" description="${uiLabelMap.CommonDelete}" target="deletePartyCommunicationEvent?partyId=${partyId}&amp;communicationEventId=${communicationEventId}&amp;portalPageId=${portalPageId}"/>
+            <hyperlink description="${subject}" target="EditCommunicationEvent?communicationEventId=${communicationEventId}&amp;my=${my}"/>
         </field>
+        <field name="removeLink" title="${uiLabelMap.CommonDelete}" widget-style="smallSubmit"><submit/></field>
     </form>
-    
-    
-    
 </forms>

Added: ofbiz/trunk/applications/party/webapp/partymgr/communication/addAttachFile.ftl
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/party/webapp/partymgr/communication/addAttachFile.ftl?rev=758522&view=auto
==============================================================================
--- ofbiz/trunk/applications/party/webapp/partymgr/communication/addAttachFile.ftl (added)
+++ ofbiz/trunk/applications/party/webapp/partymgr/communication/addAttachFile.ftl Thu Mar 26 06:06:12 2009
@@ -0,0 +1,16 @@
+      <form id="uploadPartyContent" method="post" enctype="multipart/form-data" action="<@ofbizUrl>uploadAttachFiletoEmail</@ofbizUrl>">
+        <input type="hidden" name="dataCategoryId" value="PERSONAL"/>
+        <input type="hidden" name="contentTypeId" value="DOCUMENT"/>
+        <input type="hidden" name="statusId" value="CTNT_PUBLISHED"/>
+        <input type="hidden" name="partyId" value="${partyId}" id="contentPartyId"/>
+        <input type="hidden" name="partyContentTypeId" value="USERDEF"/>
+        <input type="hidden" name="roleTypeId" value="CONTENT"/>
+        <input type="hidden" name="communicationEventId" value="${communicationEventId}"/>  
+        <input type="hidden" name="communicationEventTypeId" value="${communicationEventTypeId}"/>        
+        <input type="hidden" name="parentCommEventId" value="${parameters.parentCommEventId?if_exists}"/>
+        <input type="hidden" name="originalCommEventId" value="${parameters.originalCommEventId?if_exists}"/>
+              
+        <input type="file" name="uploadedFile" size="25" id="uploadedFile"/><br/>
+        <input type="submit" value="${uiLabelMap.CommonUpload}"/><br><br>
+      </form>
+      <div id='progress_bar'><div></div></div>

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

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

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

Added: ofbiz/trunk/applications/party/webapp/partymgr/communication/attachFileList.ftl
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/party/webapp/partymgr/communication/attachFileList.ftl?rev=758522&view=auto
==============================================================================
--- ofbiz/trunk/applications/party/webapp/partymgr/communication/attachFileList.ftl (added)
+++ ofbiz/trunk/applications/party/webapp/partymgr/communication/attachFileList.ftl Thu Mar 26 06:06:12 2009
@@ -0,0 +1,32 @@
+  <div id="partyContentList">  
+      <#if commEventContent?has_content>
+        <table class="basic-table" cellspacing="0">
+          <#list commEventContent as commContent>
+              <#list partyContent as pContent>
+                   <#assign partyId = pContent.partyId/>
+                   <#if commContent.contentId == pContent.contentId>
+                       <#assign content = pContent.getRelatedOne("Content")>
+                       <#assign fromDate = commContent.fromDate>
+                       <#assign ptype = pContent.partyContentTypeId/>
+                   </#if>
+               </#list>
+            <tr>
+              <td width="30%">
+              <#if content?has_content>
+                <#if (content.contentName?has_content)>
+                    <a href="<@ofbizUrl>img/${content.contentName}?imgId=${content.dataResourceId}</@ofbizUrl>" target="blank"> ${content.contentName?if_exists}</a>
+                </#if>
+               </#if>
+               </td>
+              <td class="button-col" width="20%">
+                <a href="<@ofbizUrl>removeAttachFile/EditCommunicationEvent?partyId=${partyId}&communicationEventTypeId=EMAIL_COMMUNICATION&communicationEventId=${commContent.communicationEventId}&contentId=${commContent.contentId}&fromDate=${fromDate}</@ofbizUrl>">${uiLabelMap.CommonRemove}</a>
+              </td>
+              <td  width="20%">${commContent.fromDate?if_exists}</td>
+              <td  width="30%">&nbsp;</td>
+            </tr>
+          </#list>
+        </table>
+      <#else>
+        ${uiLabelMap.PartyNoContent}
+      </#if>
+  </div>
\ No newline at end of file

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

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

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

Modified: ofbiz/trunk/applications/party/widget/partymgr/CommonScreens.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/party/widget/partymgr/CommonScreens.xml?rev=758522&r1=758521&r2=758522&view=diff
==============================================================================
--- ofbiz/trunk/applications/party/widget/partymgr/CommonScreens.xml (original)
+++ ofbiz/trunk/applications/party/widget/partymgr/CommonScreens.xml Thu Mar 26 06:06:12 2009
@@ -48,7 +48,7 @@
                 <set field="layoutSettings.styleSheets[]" value="/partymgr/static/partymgr.css" global="true"/>
                 <set field="activeApp" value="partymgr" global="true"/>
                 <set field="applicationMenuName" value="PartyAppBar" global="true"/>
-                <set field="applicationMenuLocation" value="component://party/widget/Menus.xml" global="true"/>
+                <set field="applicationMenuLocation" value="component://party/widget/partymgr/PartyMenus.xml" global="true"/>
                 <set field="applicationTitle" value="${uiLabelMap.PartyManagerApplication}" global="true"/>
             </actions>
             <widgets>
@@ -138,7 +138,7 @@
                                 </and>
                             </condition>
                             <widgets>
-                                <include-menu name="SecurityGroupTabBar" location="component://party/widget/Menus.xml"/>
+                                <include-menu name="SecurityGroupTabBar" location="component://party/widget/partymgr/PartyMenus.xml"/>
                             </widgets>
                         </section>
                     </decorator-section>
@@ -171,6 +171,7 @@
         <section>
             <actions>
                 <set field="headerItem" value="comm"/>
+                <script location="component://party/webapp/partymgr/WEB-INF/actions/communication/GetMyCommunicationEventRole.groovy"/>
             </actions>
             <widgets>
                 <decorator-screen name="main-decorator" location="${parameters.mainDecoratorLocation}">
@@ -180,8 +181,34 @@
                                 <if-has-permission action="_VIEW" permission="PARTYMGR"/>
                             </condition>
                             <widgets>
-                                <include-menu location="component://party/webapp/partymgr/communication/CommMenus.xml" name="CommEventTabBar"/>
-                                <include-menu location="component://party/webapp/partymgr/communication/CommMenus.xml" name="CommSubTabBar"/>
+                                <include-menu location="component://party/widget/partymgr/PartyMenus.xml" name="CommEventTabBar"/>
+                                <include-menu location="component://party/widget/partymgr/PartyMenus.xml" name="CommSubTabBar"/>
+                                <decorator-section-include name="body"/>
+                            </widgets>
+                            <fail-widgets>
+                                <label style="h3">${uiLabelMap.PartyMgrViewPermissionError}</label>
+                            </fail-widgets>
+                        </section>
+                    </decorator-section>
+                </decorator-screen>
+            </widgets>
+        </section>
+    </screen>
+    <screen name="CommonMyCommunicationEventDecorator">
+        <section>
+            <actions>
+                <set field="headerItem" value="mycomm"/>
+                <set field="my" value="My" global="true"/>
+            </actions>
+            <widgets>
+                <decorator-screen name="main-decorator" location="${parameters.mainDecoratorLocation}">
+                    <decorator-section name="body">
+                        <section>
+                            <condition>
+                                <if-has-permission action="_VIEW" permission="PARTYMGR"/>
+                            </condition>
+                            <widgets>
+                                <include-menu name="MyCommSubTabBar" location="component://party/widget/partymgr/PartyMenus.xml"/>
                                 <decorator-section-include name="body"/>
                             </widgets>
                             <fail-widgets>