Author: hansbak
Date: Mon Jul 28 13:38:31 2008 New Revision: 680486 URL: http://svn.apache.org/viewvc?rev=680486&view=rev Log: added some demo data, made use of the new setcommunicatonrolestatus service Modified: ofbiz/trunk/specialpurpose/mypage/data/MyPageDemoData.xml ofbiz/trunk/specialpurpose/mypage/script/org/ofbiz/mypage/Events.xml ofbiz/trunk/specialpurpose/mypage/webapp/mypage/WEB-INF/controller.xml ofbiz/trunk/specialpurpose/mypage/widget/CommonScreens.xml ofbiz/trunk/specialpurpose/mypage/widget/MyPageForms.xml ofbiz/trunk/specialpurpose/mypage/widget/MyPageMenus.xml Modified: ofbiz/trunk/specialpurpose/mypage/data/MyPageDemoData.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/mypage/data/MyPageDemoData.xml?rev=680486&r1=680485&r2=680486&view=diff ============================================================================== --- ofbiz/trunk/specialpurpose/mypage/data/MyPageDemoData.xml (original) +++ ofbiz/trunk/specialpurpose/mypage/data/MyPageDemoData.xml Mon Jul 28 13:38:31 2008 @@ -23,4 +23,16 @@ <PartyRole partyId="admin" roleTypeId="EMAIL_ADMIN"/> <PartyRelationship partyIdFrom="admin" roleTypeIdFrom="EMAIL_ADMIN" partyIdTo="Company" roleTypeIdTo="_NA_" fromDate="2000-01-01 00:00:00"/> + <!-- incoming customer request examples --> + <CustRequest custRequestId="9000" custRequestTypeId="RF_SUPPORT" statusId="CRQ_SUBMITTED" fromPartyId="DemoCustomer" priority="9" custRequestName="Customer Request Usage" description="Could you please advise us how to use the customer request facility within ofbiz?" productStoreId="9000" createdDate="2008-07-28 11:45:31.928" createdByUserLogin="admin" lastModifiedDate="2008-07-28 11:45:31.928" lastModifiedByUserLogin="admin" lastUpdatedStamp="2008-07-28 11:45:31.984" lastUpdatedTxStamp="2008-07-28 11:45:31.83" createdStamp="2008-07-28 11:45:31.984" createdTxStamp="2008-07-28 11:45:31.83"/> + <CustRequest custRequestId="9001" custRequestTypeId="RF_SUPPORT" statusId="CRQ_SUBMITTED" fromPartyId="DemoCustAgent" priority="9" custRequestName="Hardware?" description="Please provide us with the hardware requirements of OFBiz" productStoreId="9000" createdDate="2008-07-28 11:45:31.928" createdByUserLogin="admin" lastModifiedDate="2008-07-28 11:45:31.928" lastModifiedByUserLogin="admin" lastUpdatedStamp="2008-07-28 11:45:31.984" lastUpdatedTxStamp="2008-07-28 11:45:31.83" createdStamp="2008-07-28 11:45:31.984" createdTxStamp="2008-07-28 11:45:31.83"/> + <!-- responsible employees --> + <CustRequestType custRequestTypeId="RF_SUPPORT" partyId="Company"/> + <PartyRole partyId="admin" roleTypeId="REQ_TAKER"/> + <PartyRelationship partyIdFrom="Company" roleTypeIdFrom="_NA_" partyIdTo="admin" roleTypeIdTo="REQ_TAKER" fromDate="2000-01-01 00:00:00"/> + + <!-- email from an unknown party --> + <CommunicationEvent communicationEventId="9000" communicationEventTypeId="AUTO_EMAIL_COMM" statusId="COM_UNKNOWN_PARTY" contactMechTypeId="EMAIL_ADDRESS" contactMechIdTo="admin" roleTypeIdFrom="_NA_" roleTypeIdTo="_NA_" partyIdTo="admin" entryDate="2008-07-28 13:55:55.827" datetimeStarted="2008-07-28 13:55:19.0" subject="Why i would use the OFBiz system" contentMimeTypeId="text/plain" content="Every time i think of you, only you...you are always on my mind......." note="Sent from: [hidden email]; Sent Name from: Jo Easy User; Sent to: [hidden email]; Delivered-To: [hidden email]; " fromString="[hidden email]" toString="[hidden email]"/> + <PartyRole partyId="admin" roleTypeId="ADDRESSEE"/> + <CommunicationEventRole communicationEventId="9000" partyId="admin" roleTypeId="ADDRESSEE" contactMechId="admin" statusId="COM_ROLE_CREATED"/> </entity-engine-xml> Modified: ofbiz/trunk/specialpurpose/mypage/script/org/ofbiz/mypage/Events.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/mypage/script/org/ofbiz/mypage/Events.xml?rev=680486&r1=680485&r2=680486&view=diff ============================================================================== --- ofbiz/trunk/specialpurpose/mypage/script/org/ofbiz/mypage/Events.xml (original) +++ ofbiz/trunk/specialpurpose/mypage/script/org/ofbiz/mypage/Events.xml Mon Jul 28 13:38:31 2008 @@ -56,52 +56,32 @@ <call-service service-name="setUserPreferenceGroup" in-map-name="inMap" /> </simple-method> - - <simple-method method-name="setCommEventToRead" short-description=""> - <call-simple-method method-name="checkCommEventAccess"/> - <if-compare operator="equals" value="true" field="found"> - <entity-one entity-name="CommunicationEventRole" value-name="communicationEventRole"/> - <if> - <condition> - <or> - <if-empty field="communicationEventRole.statusId"/> - <if-compare operator="equals" value="COM_ROLE_CREATED" field="communicationEventRole.statusId"/> - </or> - </condition> - <then> - <set-service-fields service-name="updateCommunicationEventRole" map-name="parameters" to-map-name="inMap"/> - <set field="inMap.statusId" value="COM_ROLE_READ" /> - <call-service service-name="updateCommunicationEventRole" in-map-name="inMap"/> - </then> - </if> - <else> - <add-error><fail-property property="NoAccess" resource="MyPageUiLabels"/></add-error> - </else> - </if-compare> - </simple-method> - <simple-method method-name="setCommEventRoleToComplete" short-description=""> - <call-simple-method method-name="checkCommEventAccess"/> - <if-compare operator="equals" value="true" field="found"> - <entity-one entity-name="CommunicationEventRole" value-name="communicationEventRole"/> - <if> - <condition> - <or> - <if-empty field="communicationEventRole.statusId"/> - <if-compare operator="equals" value="COM_ROLE_READ" field="communicationEventRole.statusId"/> - </or> - </condition> - <then> - <set-service-fields service-name="updateCommunicationEventRole" map-name="parameters" to-map-name="inMap"/> - <set field="inMap.statusId" value="COM_ROLE_COMPLETED" /> - <call-service service-name="updateCommunicationEventRole" in-map-name="inMap"/> - </then> - </if> - <else> - <add-error><fail-property property="NoAccess" resource="MyPageUiLabels"/></add-error> - </else> - </if-compare> - </simple-method> + <simple-method method-name="setCommEventToRead" + short-description=""> + <entity-one entity-name="CommunicationEventRole" + value-name="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-name="userLogin"> + <field-map field-name="userLoginId" value="system" /> + </entity-one> + <set-service-fields service-name="setCommunicationEventRoleStatus" + map-name="parameters" to-map-name="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="NoAccess" resource="MyPageUiLabels" /> + </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"/> Modified: ofbiz/trunk/specialpurpose/mypage/webapp/mypage/WEB-INF/controller.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/mypage/webapp/mypage/WEB-INF/controller.xml?rev=680486&r1=680485&r2=680486&view=diff ============================================================================== --- ofbiz/trunk/specialpurpose/mypage/webapp/mypage/WEB-INF/controller.xml (original) +++ ofbiz/trunk/specialpurpose/mypage/webapp/mypage/WEB-INF/controller.xml Mon Jul 28 13:38:31 2008 @@ -142,9 +142,9 @@ <security https="true" auth="true"/> <response name="success" type="view" value="otherCommunications"/> </request-map> - <request-map uri="setCommEventRoleToComplete"> + <request-map uri="setCommunicationEventRoleStatus"> <security https="true" auth="true"/> - <event type="simple" path="org/ofbiz/mypage/Events.xml" invoke="setCommEventRoleToComplete"/> + <event type="service" invoke="setCommunicationEventRoleStatus"/> <response name="success" type="request" value="getToNextDonePage"/> <response name="error" type="view" value="main"/> </request-map> @@ -152,7 +152,7 @@ <security https="true" auth="true"/> <event type="simple" invoke="setCommEventToRead" path="org/ofbiz/mypage/Events.xml"/> <response name="success" type="view" value="ViewCommunicationEvent"/> - <response name="error" type="view" value="main"/> + <response name="error" type="request" value="getToNextDonePage"/> </request-map> <request-map uri="deleteUnknownCommunicationEvent"> Modified: ofbiz/trunk/specialpurpose/mypage/widget/CommonScreens.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/mypage/widget/CommonScreens.xml?rev=680486&r1=680485&r2=680486&view=diff ============================================================================== --- ofbiz/trunk/specialpurpose/mypage/widget/CommonScreens.xml (original) +++ ofbiz/trunk/specialpurpose/mypage/widget/CommonScreens.xml Mon Jul 28 13:38:31 2008 @@ -143,7 +143,7 @@ <section> <actions> <set field="headerItem" value="main" /> - <set field="donePage" value="main"/> + <set field="parameters.donePage" value="main"/> <!-- refresh every 3 minutes --> <!-- set field="layoutSettings.extraHead" value="<META @@ -157,8 +157,8 @@ <entity-condition list-name="custRequests" entity-name="CustReqAndTypeAndPartyRel"> <condition-list combine="and"> <condition-expr field-name="statusId" operator="equals" value="CRQ_SUBMITTED"/> - <condition-list combine="or"> - <condition-expr field-name="partyIdFrom" operator="equals" env-name="userLogin.partyId"/> + <condition-list combine="and"> + <condition-expr field-name="roleTypeIdTo" operator="equals" value="REQ_TAKER"/> <condition-expr field-name="partyIdTo" operator="equals" env-name="userLogin.partyId"/> </condition-list> </condition-list> Modified: ofbiz/trunk/specialpurpose/mypage/widget/MyPageForms.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/mypage/widget/MyPageForms.xml?rev=680486&r1=680485&r2=680486&view=diff ============================================================================== --- ofbiz/trunk/specialpurpose/mypage/widget/MyPageForms.xml (original) +++ ofbiz/trunk/specialpurpose/mypage/widget/MyPageForms.xml Mon Jul 28 13:38:31 2008 @@ -91,19 +91,19 @@ <form name="ListPartyCommEvents" extends="ListCommEvents" extends-resource="component://party/webapp/partymgr/communication/CommForms.xml" type="list"> <row-actions> - <set field="toComplete" value="${bsh:"COM_ROLE_COMPLETED".equals(roleStatusId)?"":"->Complete"}"/> + <set field="toComplete" value="${bsh:"COM_ROLE_READ".equals(roleStatusId)?"->Complete":""}"/> </row-actions> <field name="donePage"><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}&communicationEventId=${communicationEventId}&roleTypeId=${roleTypeId}&deleteCommEventIfLast=Y&delContentDataResource=Y&donePage=${donePage}"/> + <hyperlink also-hidden="false" description="${uiLabelMap.CommonDelete}" target="RemoveCommunicationEventRole?partyId=${partyId}&communicationEventId=${communicationEventId}&roleTypeId=${roleTypeId}&deleteCommEventIfLast=Y&delContentDataResource=Y&donePage=${parameters.donePage}"/> </field> <field name="subject" widget-style="buttontext" widget-area-style="fieldWidth300"> - <hyperlink description="${subject} " target="ViewCommunicationEvent?communicationEventId=${communicationEventId}&partyId=${partyId}&roleTypeId=${roleTypeId}&donePage=${donePage}"/> + <hyperlink description="${subject} " target="ViewCommunicationEvent?communicationEventId=${communicationEventId}&partyId=${partyId}&roleTypeId=${roleTypeId}&donePage=${parameters.donePage}"/> </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.${toComplete}}" target="setCommEventRoleToComplete?communicationEventId=${communicationEventId}&partyId=${partyId}&roleTypeId=${roleTypeId}&donePage=${donePage}"/> + <sub-hyperlink description="${uiLabelMap.${toComplete}}" target="setCommunicationEventRoleStatus?communicationEventId=${communicationEventId}&partyId=${partyId}&roleTypeId=${roleTypeId}&statusId=COM_ROLE_COMPLETED&donePage=${parameters.donePage}&VIEW_SIZE=${parameters.VIEWSIZE}&VIEW_INDEX=${parameters.VIEW_INDEX}"/> </display-entity> </field> <field name="statusId" entry-name="roleStatusId"/> @@ -113,7 +113,7 @@ extends="ListMyUnknownPartyEmails" extends-resource="component://party/webapp/partymgr/communication/CommForms.xml" use-row-submit="true"> <field name="donePage"><hidden/></field> <field name="subject" widget-style="buttontext" widget-area-style="fieldWidth300"> - <hyperlink description="${subject}" target="ViewCommunicationEvent?communicationEventId=${communicationEventId}&donePage=${donePage}"/> + <hyperlink description="${subject}" target="ViewCommunicationEvent?communicationEventId=${communicationEventId}&donePage=${parameters.donePage}"/> </field> <field name="_rowSubmit" title="S"> <check /> Modified: ofbiz/trunk/specialpurpose/mypage/widget/MyPageMenus.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/mypage/widget/MyPageMenus.xml?rev=680486&r1=680485&r2=680486&view=diff ============================================================================== --- ofbiz/trunk/specialpurpose/mypage/widget/MyPageMenus.xml (original) +++ ofbiz/trunk/specialpurpose/mypage/widget/MyPageMenus.xml Mon Jul 28 13:38:31 2008 @@ -100,24 +100,24 @@ <menu name="MyCompanyCommsMenu"> <menu-item name="newEvent" title="${uiLabelMap.WorkEffortNewEvent}"> - <link target="newEvent?donePage=${donePage}"/> + <link target="newEvent?donePage=${parameters.donePage}"/> </menu-item> </menu> <menu name="communicationsMenu"> <menu-item name="newEmail" title="${uiLabelMap.PartyNewEmail}"> <link - target="EditCommunicationEvent?communicationEventTypeId=EMAIL_COMMUNICATION&donePage=${donePage}" /> + target="EditCommunicationEvent?communicationEventTypeId=EMAIL_COMMUNICATION&donePage=${parameters.donePage}" /> </menu-item> <menu-item name="newNote" title="${uiLabelMap.PartyNewInternalNote}"> <link - target="EditCommunicationEvent?communicationEventTypeId=COMMENT_NOTE&donePage=${donePage}" /> + target="EditCommunicationEvent?communicationEventTypeId=COMMENT_NOTE&donePage=${parameters.donePage}" /> </menu-item> <menu-item name="openEvents" title="${uiLabelMap.OpenEvents}"> <condition> <if-compare field-name="parameters.status" operator="equals" value="all" /> </condition> - <link target="${donePage}?status=open" /> + <link target="${parameters.donePage}?donePage=${parameters.donePage}&status=open" /> </menu-item> <menu-item name="allOtherEvents" title="${uiLabelMap.AllEvents}"> <condition> @@ -127,7 +127,7 @@ <if-empty field-name="parameters.status"/> </or> </condition> - <link target="${donePage}?status=all" /> + <link target="${parameters.donePage}?donePage=${parameters.donePage}&status=all" /> </menu-item> </menu> |
Free forum by Nabble | Edit this page |