|
Author: hansbak
Date: Thu Jan 21 07:30:40 2010 New Revision: 901582 URL: http://svn.apache.org/viewvc?rev=901582&view=rev Log: adding a role should preserve communication event input Modified: ofbiz/trunk/applications/party/script/org/ofbiz/party/communication/CommunicationEventEvents.xml ofbiz/trunk/applications/party/webapp/partymgr/WEB-INF/controller.xml ofbiz/trunk/applications/party/widget/partymgr/CommunicationEventForms.xml Modified: 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=901582&r1=901581&r2=901582&view=diff ============================================================================== --- ofbiz/trunk/applications/party/script/org/ofbiz/party/communication/CommunicationEventEvents.xml (original) +++ ofbiz/trunk/applications/party/script/org/ofbiz/party/communication/CommunicationEventEvents.xml Thu Jan 21 07:30:40 2010 @@ -29,6 +29,7 @@ <field field="request" type="javax.servlet.http.HttpServletRequest"/> <string value="uploadedFile"/> </call-class-method> + <if-empty field="formInput.formInput.contentId"> <if-empty field="formInput.imageFileName"> <add-error><fail-message message="Upload file is missing..."/></add-error> @@ -85,6 +86,10 @@ <set field="partycontent.partyId" from-field="formInput.formInput.partyId"/> <call-service service-name="createPartyContent" in-map-name="partycontent"/> + <!-- save header fields --> + <set-service-fields service-name="updateCommunicationEvent" map="formInput.formInput" to-map="updateMap"/> + <call-service service-name="updateCommunicationEvent" in-map-name="updateMap"/> + <!-- Create communication event and content association --> <set-service-fields service-name="createCommEventContentAssoc" map="formInput.formInput" to-map="contentAssoc"/> @@ -95,10 +100,6 @@ <result-to-field result-name="fromDate" field="fromDate"/> </call-service> - <!-- save header fields --> - <set-service-fields service-name="updateCommunicationEvent" map="formInput.formInput" to-map="updateMap"/> - <call-service service-name="updateCommunicationEvent" in-map-name="updateMap"/> - <!-- create ContentAssoc--> <set-service-fields service-name="createContentAssoc" map="formInput.formInput" to-map="contentMap"/> <if-not-empty field="formInput.formInput.contentIdFrom"> @@ -122,6 +123,24 @@ <field-to-request field="my"/> </simple-method> + <simple-method method-name="createCommunicationEventRole" + short-description="Add a role to a communictaion event and save communication event itseld"> + + <!-- save header fields --> + <set-service-fields service-name="updateCommunicationEvent" map="formInput" to-map="updateMap"/> + <set field="updateMap.communicationEventId" from-field="parameters.communicationEventId"/> + <call-service service-name="updateCommunicationEvent" in-map-name="updateMap"/> + + <!-- add role --> + <set-service-fields service-name="createCommunicationEventRole" to-map="createRole" map="parameters"/> + <call-service service-name="createCommunicationEventRole" in-map-name="createRole"/> + + <!-- Return to request --> + <field-to-request field="parameters.communicationEventId" request-name="communicationEventId"/> + <set field="my" value="My"/> + <field-to-request field="my"/> + </simple-method> + <simple-method method-name="allocateMsgToParty" short-description="Allocate an emailaddress to an existing/new party, update the communication event accordingly"> <entity-one entity-name="CommunicationEvent" value-field="communicationEvent"/> 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=901582&r1=901581&r2=901582&view=diff ============================================================================== --- ofbiz/trunk/applications/party/webapp/partymgr/WEB-INF/controller.xml (original) +++ ofbiz/trunk/applications/party/webapp/partymgr/WEB-INF/controller.xml Thu Jan 21 07:30:40 2010 @@ -898,9 +898,9 @@ </request-map> <request-map uri="createCommunicationEventRole"> <security https="true" auth="true"/> - <event type="service" invoke="createCommunicationEventRole"/> - <response name="success" type="view-last"/> - <response name="error" type="view-last"/> + <event type="simple" invoke="createCommunicationEventRole" path="component://party/script/org/ofbiz/party/communication/CommunicationEventEvents.xml"/> + <response name="success" type="view-home" value="EditCommunicationEvent"/> + <response name="error" type="view-home" value="EditCommunicationEvent"/> </request-map> <request-map uri="RemoveCommunicationEventRole"> <security https="true" auth="true"/> Modified: ofbiz/trunk/applications/party/widget/partymgr/CommunicationEventForms.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/party/widget/partymgr/CommunicationEventForms.xml?rev=901582&r1=901581&r2=901582&view=diff ============================================================================== --- ofbiz/trunk/applications/party/widget/partymgr/CommunicationEventForms.xml (original) +++ ofbiz/trunk/applications/party/widget/partymgr/CommunicationEventForms.xml Thu Jan 21 07:30:40 2010 @@ -648,6 +648,12 @@ <form name="AddEventRole" type="single" target="createCommunicationEventRole" header-row-style="header-row" default-table-style="basic-table"> + <field name="subject"><hidden/></field> + <field name="content"><hidden/></field> + <field name="partyIdTo"><hidden/></field> + <field name="datetimeStarted"><hidden/></field> + <field name="my"><hidden value="${my}"/></field> + <field name="datetimeStarted"><hidden/></field> <field name="communicationEventId"><hidden/></field> <field name="partyId" title="${uiLabelMap.PartyPartyId}" position="1"><lookup target-form-name="LookupPartyName"/></field> <field name="roleTypeId" position="2"> @@ -659,7 +665,11 @@ </entity-options> </drop-down> </field> - <field name="submitButton" title="${uiLabelMap.PartyAddRole}"><submit button-type="text-link"/></field> + <field name="submitButton" title=" "> + <hyperlink also-hidden="true" + target-type="plain" description="${uiLabelMap.PartyAddRole}" + target="javascript:(document.AddEventRole.communicationEventId.value=document.EditEmail.communicationEventId.value),(document.AddEventRole.datetimeStarted.value=document.EditEmail.datetimeStarted.value),(document.AddEventRole.partyIdTo.value=document.EditEmail.partyIdTo.value),(document.AddEventRole.subject.value=document.EditEmail.subject.value),(document.AddEventRole.content.value=document.EditEmail.content.value),(document.AddEventRole.submit())"/> + </field> </form> <form name="listCommContent" type="list" list-name="contentDataResourceList" paginate-target="/ListCommContent" target="removeAttachFile" |
| Free forum by Nabble | Edit this page |
