You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by ha...@apache.org on 2008/07/27 15:08:54 UTC
svn commit: r680098 - in /ofbiz/trunk/specialpurpose/mypage:
script/org/ofbiz/mypage/Events.xml webapp/mypage/WEB-INF/controller.xml
widget/CommonScreens.xml widget/MyPageForms.xml widget/MyPageMenus.xml
widget/MyPageScreens.xml
Author: hansbak
Date: Sun Jul 27 06:08:53 2008
New Revision: 680098
URL: http://svn.apache.org/viewvc?rev=680098&view=rev
Log:
reduced the amount of code a lot by using the 'donepage' principle. Added the possibility of only showing 'open' communication events by default
Modified:
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
ofbiz/trunk/specialpurpose/mypage/widget/MyPageScreens.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=680098&r1=680097&r2=680098&view=diff
==============================================================================
--- ofbiz/trunk/specialpurpose/mypage/script/org/ofbiz/mypage/Events.xml (original)
+++ ofbiz/trunk/specialpurpose/mypage/script/org/ofbiz/mypage/Events.xml Sun Jul 27 06:08:53 2008
@@ -173,5 +173,17 @@
</iterate>
<log level="always" message="========${count} records updated" />
</simple-method>
+
+ <simple-method method-name="getToNextDonePage" short-description="return the requestValue 'donePage' as a resultcode to the controller">
+ <set field="donePage" from-field="parameters.donePage" default-value="${parameters.DONE_PAGE}"/>
+ <if-not-empty field="donePage">
+ <log level="info" message="Next request: ${donePage}"/>
+ <return response-code="${donePage}"/>
+ <else>
+ <log level="info" message="Next 'donePage' variable not provided, returning 'error'"/>
+ <return response-code="error"/>
+ </else>
+ </if-not-empty>
+ </simple-method>
</simple-methods>
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=680098&r1=680097&r2=680098&view=diff
==============================================================================
--- ofbiz/trunk/specialpurpose/mypage/webapp/mypage/WEB-INF/controller.xml (original)
+++ ofbiz/trunk/specialpurpose/mypage/webapp/mypage/WEB-INF/controller.xml Sun Jul 27 06:08:53 2008
@@ -50,16 +50,10 @@
<request-map uri="statusToComplete">
<security https="true" auth="true"/>
<event type="service" invoke="updateTimesheet"/>
- <response name="success" type="view" value="main"/>
- <response name="error" type="view" value="main"/>
+ <response name="success" type="request" value="getToNextDonePage"/>
+ <response name="error" type="request" value="getToNextDonePage"/>
</request-map>
- <request-map uri="statusToCompleteKey">
- <security https="true" auth="true"/>
- <event type="service" invoke="updateTimesheet"/>
- <response name="success" type="view" value="myTimesheet"/>
- <response name="error" type="view" value="myTimesheet"/>
- </request-map>
-
+
<!-- MY TASKS -->
<request-map uri="myTasks">
<security https="true" auth="true"/>
@@ -68,14 +62,8 @@
<request-map uri="updateTaskAssigment">
<security https="true" auth="true"/>
<event type="service" invoke="updateTaskAssigment"/>
- <response name="success" type="view" value="main"/>
- <response name="error" type="view" value="main"/>
- </request-map>
- <request-map uri="updateTaskAssigmentKey">
- <security https="true" auth="true"/>
- <event type="service" invoke="updateTaskAssigment"/>
- <response name="success" type="view" value="myTasks"/>
- <response name="error" type="view" value="myTasks"/>
+ <response name="success" type="request" value="getToNextDonePage"/>
+ <response name="error" type="request" value="getToNextDonePage"/>
</request-map>
<!-- COMPANY COMMUNICATION -->
@@ -90,26 +78,14 @@
<request-map uri="createEvent">
<security https="true" auth="true"/>
<event type="service" invoke="createWorkEffort"/>
- <response name="success" type="view" value="main"/>
- <response name="error" type="view" value="newEvent"/>
- </request-map>
- <request-map uri="createEventKey">
- <security https="true" auth="true"/>
- <event type="service" invoke="createWorkEffort"/>
- <response name="success" type="view" value="myCompanyComms"/>
+ <response name="success" type="request" value="getToNextDonePage"/>
<response name="error" type="view" value="newEvent"/>
</request-map>
<request-map uri="deleteEvent">
<security https="true" auth="true"/>
<event type="service" invoke="deleteWorkEffort"/>
- <response name="success" type="view" value="main"/>
- <response name="error" type="view" value="main"/>
- </request-map>
- <request-map uri="deleteEventKey">
- <security https="true" auth="true"/>
- <event type="service" invoke="deleteWorkEffort"/>
- <response name="success" type="view" value="myCompanyComms"/>
- <response name="error" type="view" value="myCompanyComms"/>
+ <response name="success" type="request" value="getToNextDonePage"/>
+ <response name="error" type="request" value="getToNextDonePage"/>
</request-map>
<!-- MY COMMUNICATIONS -->
@@ -120,87 +96,33 @@
<request-map uri="createCommunicationEvent">
<security https="true" auth="true"/>
<event type="service" invoke="createCommunicationEvent"/>
- <response name="success" type="view" value="main"/>
+ <response name="success" type="request" value="getToNextDonePage"/>
<response name="error" type="view" value="main"/>
</request-map>
<request-map uri="deletePartyCommunicationEvent">
<security https="true" auth="true"/>
<event type="service" invoke="deleteCommunicationEvent"/>
- <response name="success" type="view" value="main"/>
+ <response name="success" type="request" value="getToNextDonePage"/>
<response name="error" type="view" value="main"/>
</request-map>
- <request-map uri="deletePartyCommunicationEventRole">
+ <request-map uri="RemoveCommunicationEventRole">
<security https="true" auth="true"/>
<event type="service" invoke="removeCommunicationEventRole"/>
- <response name="success" type="view" value="main"/>
- <response name="error" type="view" value="main"/>
- </request-map>
- <request-map uri="deletePartyCommunicationEventMy">
- <security https="true" auth="true"/>
- <event type="service" invoke="deleteCommunicationEvent"/>
- <response name="success" type="view" value="myCommunications"/>
- <response name="error" type="view" value="myCommunications"/>
- </request-map>
- <request-map uri="deletePartyCommunicationEventMyRole">
- <security https="true" auth="true"/>
- <event type="service" invoke="removeCommunicationEventRole"/>
- <response name="success" type="view" value="myCommunications"/>
- <response name="error" type="view" value="myCommunications"/>
- </request-map>
- <request-map uri="deletePartyCommunicationEvent">
- <security https="true" auth="true"/>
- <event type="service" invoke="deleteCommunicationEvent"/>
- <response name="success" type="view" value="main"/>
+ <response name="success" type="request" value="getToNextDonePage"/>
<response name="error" type="view" value="main"/>
</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="main"/>
- <response name="error" type="view" value="ViewCommunicationEvent"/>
- </request-map>
- <request-map uri="allocateMyMsgToParty">
- <security https="true" auth="true"/>
- <event type="simple" path="org/ofbiz/party/communication/CommunicationEventServices.xml" invoke="allocateMsgToParty"/>
- <response name="success" type="view" value="myCommunications"/>
- <response name="error" type="view" value="ViewCommunicationEvent"/>
- </request-map>
- <request-map uri="deleteUnknownCommunicationEvent">
- <security https="true" auth="true"/>
- <event type="service" invoke="deleteCommunicationEvent"/>
- <response name="success" type="view" value="main"/>
- <response name="error" type="view" value="ViewCommunicationEvent"/>
- </request-map>
- <request-map uri="deleteMyUnknownCommunicationEvent">
- <security https="true" auth="true"/>
- <event type="service" invoke="deleteCommunicationEvent"/>
- <response name="success" type="view" value="myCommunications"/>
- <response name="error" type="view" value="ViewCommunicationEvent"/>
+ <response name="success" type="request" value="getToNextDonePage"/>
+ <response name="error" type="request" value="getToNextDonePage"/>
</request-map>
<request-map uri="deleteCommunicationEvents">
<security https="true" auth="true"/>
<event type="service-multi" invoke="deleteCommunicationEventWorkEffort"/>
- <response name="success" type="view"
- value="main"/>
- <response name="error" type="view"
- value="main"/>
- </request-map>
- <request-map uri="deleteMyCommunicationEvents">
- <security https="true" auth="true"/>
- <event type="service-multi" invoke="deleteCommunicationEventWorkEffort"/>
- <response name="success" type="view"
- value="myCommunications"/>
- <response name="error" type="view"
- value="myCommunications"/>
- </request-map>
- <request-map uri="deleteOtherCommunicationEvents">
- <security https="true" auth="true"/>
- <event type="service-multi" invoke="deleteCommunicationEventWorkEffort"/>
- <response name="success" type="view"
- value="otherCommunications"/>
- <response name="error" type="view"
- value="otherCommunications"/>
+ <response name="success" type="request" value="getToNextDonePage"/>
+ <response name="error" type="view" value="main"/>
</request-map>
<!-- PREFERENCES -->
@@ -220,46 +142,16 @@
<security https="true" auth="true"/>
<response name="success" type="view" value="otherCommunications"/>
</request-map>
- <request-map uri="deletePartyCommunicationEventOthers">
- <security https="true" auth="true"/>
- <event type="service" invoke="deleteCommunicationEvent"/>
- <response name="success" type="view" value="otherCommunications"/>
- <response name="error" type="view" value="otherCommunications"/>
- </request-map>
- <request-map uri="allocateOtherMsgToParty">
+ <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="otherCommunications"/>
- <response name="error" type="view" value="ViewCommunicationEvent"/>
- </request-map>
- <request-map uri="deleteOtherCommunicationEvent">
- <security https="true" auth="true"/>
- <event type="service" invoke="deleteCommunicationEvent"/>
- <response name="success" type="view" value="otherCommunications"/>
- <response name="error" type="view" value="ViewCommunicationEvent"/>
- </request-map>
- <request-map uri="deleteOtherCommunicationEventRole">
- <security https="true" auth="true"/>
- <event type="service" invoke="removeCommunicationEventRole"/>
- <response name="success" type="view" value="otherCommunications"/>
- <response name="error" type="view" value="ViewCommunicationEvent"/>
- </request-map>
- <request-map uri="setOtherCommEventRoleToComplete">
- <security https="true" auth="true"/>
- <event type="simple" path="org/ofbiz/mypage/Events.xml" invoke="setCommEventRoleToComplete"/>
- <response name="success" type="view" value="otherCommunications"/>
- <response name="error" type="view" value="otherCommunications"/>
- </request-map>
- <request-map uri="setMyCommEventRoleToComplete">
- <security https="true" auth="true"/>
- <event type="simple" path="org/ofbiz/mypage/Events.xml" invoke="setCommEventRoleToComplete"/>
- <response name="success" type="view" value="myCommunications"/>
- <response name="error" type="view" value="myCommunications"/>
+ <response name="success" type="request" value="getToNextDonePage"/>
+ <response name="error" type="request" value="getToNextDonePage"/>
</request-map>
<request-map uri="setCommEventRoleToComplete">
<security https="true" auth="true"/>
<event type="simple" path="org/ofbiz/mypage/Events.xml" invoke="setCommEventRoleToComplete"/>
- <response name="success" type="view" value="main"/>
+ <response name="success" type="request" value="getToNextDonePage"/>
<response name="error" type="view" value="main"/>
</request-map>
<request-map uri="ViewCommunicationEvent">
@@ -269,14 +161,35 @@
<response name="error" type="view" value="main"/>
</request-map>
+ <request-map uri="deleteUnknownCommunicationEvent">
+ <security https="true" auth="true"/>
+ <event type="service" invoke="deleteCommunicationEvent"/>
+ <response name="success" type="request" value="getToNextDonePage"/>
+ <response name="error" type="view" value="ViewCommunicationEvent"/>
+ </request-map>
+
<!-- to clean up old data -->
<request-map uri="createCommEventRoles">
<security https="true" auth="true"/>
<event type="simple" invoke="createCommunicationEventRoles" path="org/ofbiz/mypage/Events.xml"/>
- <response name="success" type="view" value="main"/>
+ <response name="success" type="request" value="getToNextDonePage"/>
+ <response name="error" type="view" value="main"/>
+ </request-map>
+
+ <request-map uri="getToNextDonePage">
+ <security https="true" auth="true"/>
+ <event type="simple" invoke="getToNextDonePage" path="org/ofbiz/mypage/Events.xml"/>
+ <response name="main" type="request" value="main"/>
+ <response name="viewCommunicationEvent" type="request" value="ViewCommunicationEvent"/>
+ <response name="myCommunications" type="request" value="myCommunications"/>
+ <response name="otherCommunications" type="request" value="otherCommunications"/>
+ <response name="myTimesheet" type="request" value="myTimesheet"/>
+ <response name="myTasks" type="request" value="myTasks"/>
+ <response name="myCompanyComms" type="request" value="myCompanyComms"/>
<response name="error" type="view" value="main"/>
</request-map>
+
<view-map name="main" type="screen" page="component://mypage/widget/CommonScreens.xml#main"/>
<view-map name="preferences" type="screen" page="component://mypage/widget/CommonScreens.xml#preferences"/>
<view-map name="myTasks" type="screen" page="component://mypage/widget/CommonScreens.xml#MyTasks"/>
Modified: ofbiz/trunk/specialpurpose/mypage/widget/CommonScreens.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/mypage/widget/CommonScreens.xml?rev=680098&r1=680097&r2=680098&view=diff
==============================================================================
--- ofbiz/trunk/specialpurpose/mypage/widget/CommonScreens.xml (original)
+++ ofbiz/trunk/specialpurpose/mypage/widget/CommonScreens.xml Sun Jul 27 06:08:53 2008
@@ -100,6 +100,9 @@
<screen name="CommonTimesheetDecorator">
<section>
+ <actions>
+ <set field="headerItem" value="${parameters.donePage}"/>
+ </actions>
<widgets>
<decorator-screen name="main-decorator" location="${parameters.mainDecoratorLocation}">
<decorator-section name="body"/>
@@ -109,6 +112,9 @@
</screen>
<screen name="CommonCommunicationEventDecorator">
<section>
+ <actions>
+ <set field="headerItem" value="${parameters.donePage}"/>
+ </actions>
<widgets>
<decorator-screen name="main-decorator" location="${parameters.mainDecoratorLocation}">
<decorator-section name="body">
@@ -123,6 +129,9 @@
<screen name="CommonMyTaskDecorator">
<section>
+ <actions>
+ <set field="headerItem" value="${parameters.donePage}"/>
+ </actions>
<widgets>
<decorator-screen name="main-decorator" location="${parameters.mainDecoratorLocation}">
<decorator-section name="body"/>
@@ -134,6 +143,7 @@
<section>
<actions>
<set field="headerItem" value="main" />
+ <set field="donePage" value="main"/>
<!-- refresh every 3 minutes -->
<!--
set field="layoutSettings.extraHead" value="<META
Modified: ofbiz/trunk/specialpurpose/mypage/widget/MyPageForms.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/mypage/widget/MyPageForms.xml?rev=680098&r1=680097&r2=680098&view=diff
==============================================================================
--- ofbiz/trunk/specialpurpose/mypage/widget/MyPageForms.xml (original)
+++ ofbiz/trunk/specialpurpose/mypage/widget/MyPageForms.xml Sun Jul 27 06:08:53 2008
@@ -22,21 +22,19 @@
xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/widget-form.xsd">
<form name="MyTasks" extends="MyTasks" extends-resource="component://projectmgr/widget/forms/TaskForms.xml">
- <alt-target use-when="!headerItem.equals("main")" target="updateTaskAssigmentKey"/>
+ <field name="donePage"><hidden value="${parameters.donePage}"/></field>
<field name="workEffortName" title="${uiLabelMap.ProjectMgrTaskName}" widget-style="buttontext">
<hyperlink also-hidden="false" description="${workEffortName}" target="/projectmgr/control/taskView?workEffortId=${workEffortId}" target-type="inter-app" target-window="_BLANK"/>
</field>
<field name="projectName" title="${uiLabelMap.ProjectMgrProjectName}"><hyperlink target="/projectmgr/control/projectView?projectId=${resultProject.projectId}" target-type="inter-app" target-window="_BLANK" description="${resultProject.projectName}"/></field>
<field name="roleTypeId" parameter-name="newRoleTypeId" title="${uiLabelMap.PartyRole}"><hidden value="${roleTypeId}"/></field>
- <field use-when="!headerItem.equals("main")" name="remove" title="${uiLabelMap.CommonRemove}"><hyperlink target="updateTaskAssigmentKey?workEffortId=${workEffortId}&partyId=${partyId}&roleTypeId=${roleTypeId}&fromDate=${fromDate}&statusId=PAS_ENDED" description="${uiLabelMap.CommonRemove}"/></field>
- <field use-when="headerItem.equals("main")" name="remove" title="${uiLabelMap.CommonRemove}"><hyperlink target="updateTaskAssigment?workEffortId=${workEffortId}&partyId=${partyId}&roleTypeId=${roleTypeId}&fromDate=${fromDate}&statusId=PAS_ENDED" description="${uiLabelMap.CommonRemove}"/></field>
- <field use-when="!headerItem.equals("main")" name="toComplete" title="${uiLabelMap.CommonStatustoComplete}"><hyperlink target="updateTaskAssigmentKey?workEffortId=${workEffortId}&partyId=${partyId}&roleTypeId=${roleTypeId}&fromDate=${fromDate}&statusId=PAS_COMPLETED" description="${uiLabelMap.CommonStatustoComplete}"/></field>
- <field use-when="headerItem.equals("main")" name="toComplete" title="${uiLabelMap.CommonStatustoComplete}"><hyperlink target="updateTaskAssigment?workEffortId=${workEffortId}&partyId=${partyId}&roleTypeId=${roleTypeId}&fromDate=${fromDate}&statusId=PAS_COMPLETED" description="${uiLabelMap.CommonStatustoComplete}"/></field>
+ <field name="remove" title="${uiLabelMap.CommonRemove}"><hyperlink target="updateTaskAssigment?workEffortId=${workEffortId}&partyId=${partyId}&roleTypeId=${roleTypeId}&fromDate=${fromDate}&statusId=PAS_ENDED&donePage=${parameters.donePage}" description="${uiLabelMap.CommonRemove}"/></field>
+ <field name="toComplete" title="${uiLabelMap.CommonStatustoComplete}"><hyperlink target="updateTaskAssigment?workEffortId=${workEffortId}&partyId=${partyId}&roleTypeId=${roleTypeId}&fromDate=${fromDate}&statusId=PAS_COMPLETED&donePage=${parameters.donePage}" description="${uiLabelMap.CommonStatustoComplete}"/></field>
</form>
<form name="EditWeekTimesheet" extends="EditWeekTimesheet" extends-resource="component://projectmgr/widget/forms/TimeSheetForms.xml">
- <alt-target use-when="!headerItem.equals("main")" target="updateTimesheetKey"/>
- <field name="workEffortId" title="${uiLabelMap.ProjectMgrTaskName}">
+ <alt-target use-when="!headerItem.equals("main")" target="updateTimesheetKey"/>
+ <field name="workEffortId" title="${uiLabelMap.ProjectMgrTaskName}">
<drop-down allow-empty="true">
<entity-options entity-name="ProjectPartyAndPhaseAndTask" description="${workEffortName} -- ${phaseName} -- ${projectName}">
<entity-constraint name="workEffortTypeId" operator="not-equals" value="TASK_TEMPLATE"/>
@@ -72,7 +70,7 @@
</form>
<form name="newEvent" type="single" target="createEvent">
- <alt-target use-when="!headerItem.equals("main")" target="createEventKey"/>
+ <field name="donePage"><hidden/></field>
<field name="workEffortTypeId"><hidden value="COMPANY_EVENT"/></field>
<field name="currentStatusId"><hidden value="_NA_"/></field>
<field name="workEffortName" title="${uiLabelMap.WorkEffortEventName}"><text/></field>
@@ -93,40 +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)?"":"toComplete"}"/>
+ <set field="toComplete" value="${bsh:"COM_ROLE_COMPLETED".equals(roleStatusId)?"":"->Complete"}"/>
</row-actions>
+ <field name="donePage"><hidden/></field>
<field name="roleTypeId"><display-entity entity-name="RoleType" description="${description}"/></field>
- <field use-when="headerItem.equals("main")" name="removeLink" title="${uiLabelMap.CommonEmptyHeader}" widget-style="smallSubmit">
- <hyperlink also-hidden="false" description="${uiLabelMap.CommonDelete}" target="deletePartyCommunicationEventRole?partyId=${partyId}&communicationEventId=${communicationEventId}&roleTypeId=${roleTypeId}&deleteCommEventIfLast=Y&delContentDataResource=Y"/>
+ <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}"/>
</field>
- <field use-when="headerItem.equals("myCommunications")" name="removeLink" title="${uiLabelMap.CommonEmptyHeader}" widget-style="smallSubmit">
- <hyperlink also-hidden="false" description="${uiLabelMap.CommonDelete}" target="deletePartyCommunicationEventMyRole?partyId=${partyId}&communicationEventId=${communicationEventId}&roleTypeId=${roleTypeId}&deleteCommEventIfLast=Y&delContentDataResource=Y"/>
+ <field name="subject" widget-style="buttontext" widget-area-style="fieldWidth300">
+ <hyperlink description="${subject} " target="ViewCommunicationEvent?communicationEventId=${communicationEventId}&partyId=${partyId}&roleTypeId=${roleTypeId}&donePage=${donePage}"/>
</field>
- <field use-when="headerItem.equals("otherCommunications")" name="removeLink" title="${uiLabelMap.CommonEmptyHeader}" widget-style="smallSubmit">
- <hyperlink also-hidden="false" description="${uiLabelMap.CommonDelete}" target="deletePartyCommunicationEventOthersRole?partyId=${partyId}&communicationEventId=${communicationEventId}&roleTypeId=${roleTypeId}&deleteCommEventIfLast=Y&delContentDataResource=Y"/>
- </field>
- <field use-when="headerItem.equals("main")" name="subject" widget-style="buttontext" widget-area-style="fieldWidth300">
- <hyperlink description="${subject} " target="ViewCommunicationEvent?communicationEventId=${communicationEventId}&partyId=${partyId}&roleTypeId=${roleTypeId}&type=main"/>
- </field>
- <field use-when="headerItem.equals("myCommunications")" name="subject" widget-style="buttontext" widget-area-style="fieldWidth300">
- <hyperlink description="${subject} " target="ViewCommunicationEvent?communicationEventId=${communicationEventId}&partyId=${partyId}&roleTypeId=${roleTypeId}&type=my" />
- </field>
- <field use-when="headerItem.equals("otherCommunications")" name="subject" widget-style="buttontext" widget-area-style="fieldWidth300">
- <hyperlink description="${subject} " target="ViewCommunicationEvent?communicationEventId=${communicationEventId}&partyId=${partyId}&roleTypeId=${roleTypeId}&type=other" />
- </field>
- <field use-when="headerItem.equals("main")" 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}"/>
- </display-entity>
- </field>
- <field use-when="headerItem.equals("myCommunications")" name="statusId" entry-name="roleStatusId" widget-style="buttontext" widget-area-style="fieldWidth300">
+ <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="setMyCommEventRoleToComplete?communicationEventId=${communicationEventId}&partyId=${partyId}&roleTypeId=${roleTypeId}" />
- </display-entity>
- </field>
- <field use-when="headerItem.equals("otherCommunications")" 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="setOtherCommEventRoleToComplete?communicationEventId=${communicationEventId}&partyId=${partyId}&roleTypeId=${roleTypeId}" />
+ <sub-hyperlink description="${uiLabelMap.${toComplete}}" target="setCommEventRoleToComplete?communicationEventId=${communicationEventId}&partyId=${partyId}&roleTypeId=${roleTypeId}&donePage=${donePage}"/>
</display-entity>
</field>
<field name="statusId" entry-name="roleStatusId"/>
@@ -134,17 +111,9 @@
</form>
<form name="ListMyUnknownPartyEmails" type="multi"
extends="ListMyUnknownPartyEmails" extends-resource="component://party/webapp/partymgr/communication/CommForms.xml" use-row-submit="true">
- <alt-target use-when=""otherCommunications".equals(headerItem)" target="deleteOtherCommunicationEvents"/>
- <alt-target use-when=""myCommunications".equals(headerItem)" target="deleteMyCommunicationEvents"/>
-
- <field use-when="headerItem.equals("main")" name="subject" widget-style="buttontext" widget-area-style="fieldWidth300">
- <hyperlink description="${subject}" target="ViewCommunicationEvent?communicationEventId=${communicationEventId}&type=main"/>
- </field>
- <field use-when="headerItem.equals("myCommunications")" name="subject" widget-style="buttontext" widget-area-style="fieldWidth300">
- <hyperlink description="${subject}" target="ViewCommunicationEvent?communicationEventId=${communicationEventId}&type=my" />
- </field>
- <field use-when="headerItem.equals("otherCommunications")" name="subject" widget-style="buttontext" widget-area-style="fieldWidth300">
- <hyperlink description="${subject}" target="ViewCommunicationEvent?communicationEventId=${communicationEventId}&type=other" />
+ <field name="donePage"><hidden/></field>
+ <field name="subject" widget-style="buttontext" widget-area-style="fieldWidth300">
+ <hyperlink description="${subject}" target="ViewCommunicationEvent?communicationEventId=${communicationEventId}&donePage=${donePage}"/>
</field>
<field name="_rowSubmit" title="S">
<check />
@@ -154,22 +123,4 @@
</field>
</form>
- <form name="allocateMsgToPartyForm"
- extends="allocateMsgToPartyForm" extends-resource="component://party/webapp/partymgr/communication/CommForms.xml">
- <alt-target use-when=""otherCommunications".equals(headerItem)" target="allocateOtherMsgToParty"/>
- <alt-target use-when=""myCommunications".equals(headerItem)" target="allocateMyMsgToParty"/>
- <field name="type"><hidden value="${parameters.type}"/></field>
- </form>
- <form name="deleteEmail" type="single" title="delete the email"
- target="deleteUnknownCommunicationEvent">
- <alt-target use-when=""otherCommunications".equals(headerItem)" target="deleteOtherUnknownCommunicationEvent"/>
- <alt-target use-when=""myCommunications".equals(headerItem)" target="deleteMyUnknownCommunicationEvent"/>
- <field name="type"><hidden value="${parameters.type}"/></field>
- <field name="communicationEventId"><hidden value="${parameters.communicationEventId}"/></field>
- <field name="delContentDataResource"><hidden value="Y"/></field>
- <field name="" position="1"><display/></field>
- <field name=" " position="2"><display/></field>
- <field name="deleteEmail" title="Delete email" widget-style="smallSubmit" position="3"><submit/></field>
- </form>
-
</forms>
\ No newline at end of file
Modified: ofbiz/trunk/specialpurpose/mypage/widget/MyPageMenus.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/mypage/widget/MyPageMenus.xml?rev=680098&r1=680097&r2=680098&view=diff
==============================================================================
--- ofbiz/trunk/specialpurpose/mypage/widget/MyPageMenus.xml (original)
+++ ofbiz/trunk/specialpurpose/mypage/widget/MyPageMenus.xml Sun Jul 27 06:08:53 2008
@@ -25,7 +25,7 @@
<condition>
<not><if-empty field-name="userLogin"/></not>
</condition>
- <link target="main?status=open"/>
+ <link target="main?status=open&donePage=main"/>
</menu-item>
<menu-item name="viewprofile" title="${uiLabelMap.MyProfile}">
<condition>
@@ -40,7 +40,7 @@
<if-compare field-name="preferences.userPrefMap.myCommunications" operator="not-equals" value="Y"/>
</and>
</condition>
- <link target="myCommunications?status=open"/>
+ <link target="myCommunications?status=open&donePage=myCommunications"/>
</menu-item>
<menu-item name="otherCommunications" title="${uiLabelMap.OtherCommunications}">
<condition>
@@ -49,7 +49,7 @@
<if-compare field-name="preferences.userPrefMap.otherCommunications" operator="not-equals" value="Y"/>
</and>
</condition>
- <link target="otherCommunications?status=open"/>
+ <link target="otherCommunications?status=open&donePage=otherCommunications"/>
</menu-item>
<menu-item name="myCompanyComms" title="${uiLabelMap.MyCompanyComms}">
<condition>
@@ -67,7 +67,7 @@
<if-compare field-name="preferences.userPrefMap.myTimesheet" operator="not-equals" value="Y"/>
</and>
</condition>
- <link target="myTimesheet"/>
+ <link target="myTimesheet?donePage=myTimeSheet"/>
</menu-item>
<menu-item name="myTasks" title="${uiLabelMap.myTasks}">
<condition>
@@ -76,7 +76,7 @@
<if-compare field-name="preferences.userPrefMap.myTasks" operator="not-equals" value="Y"/>
</and>
</condition>
- <link target="myTasks"/>
+ <link target="myTasks?donePage=myTasks"/>
</menu-item>
<!--menu-item name="help" title="${uiLabelMap.CommonHelp}" align-style="opposed">
<condition><not><if-empty field-name="userLogin"/></not></condition>
@@ -99,89 +99,32 @@
</menu>
<menu name="MyCompanyCommsMenu">
- <menu-item name="newEventKey" title="${uiLabelMap.WorkEffortNewEvent}">
- <condition><if-compare field-name="headerItem" operator="not-equals" value="main"/></condition>
- <link target="newEvent?Key=Y"/>
- </menu-item>
<menu-item name="newEvent" title="${uiLabelMap.WorkEffortNewEvent}">
- <condition><if-compare field-name="headerItem" operator="equals" value="main"/></condition>
- <link target="newEvent"/>
+ <link target="newEvent?donePage=${donePage}"/>
</menu-item>
</menu>
<menu name="communicationsMenu">
<menu-item name="newEmail" title="${uiLabelMap.PartyNewEmail}">
<link
- target="EditCommunicationEvent?communicationEventTypeId=EMAIL_COMMUNICATION" />
+ target="EditCommunicationEvent?communicationEventTypeId=EMAIL_COMMUNICATION&donePage=${donePage}" />
</menu-item>
<menu-item name="newNote" title="${uiLabelMap.PartyNewInternalNote}">
- <link target="EditCommunicationEvent?communicationEventTypeId=COMMENT_NOTE" />
+ <link
+ target="EditCommunicationEvent?communicationEventTypeId=COMMENT_NOTE&donePage=${donePage}" />
+ </menu-item>
+ <menu-item name="openEvents" title="${uiLabelMap.OpenEvents}">
+ <condition>
+ <if-empty field-name="parameters.status"/>
+ </condition>
+ <link target="${donePage}?status=open" />
+ </menu-item>
+ <menu-item name="allOtherEvents" title="${uiLabelMap.AllEvents}">
+ <condition>
+ <if-compare field-name="parameters.status" operator="equals"
+ value="open" />
+ </condition>
+ <link target="${donePage}" />
</menu-item>
- <menu-item name="openOtherEvents" title="${uiLabelMap.OpenEvents}">
- <condition>
- <and>
- <if-compare field-name="parameters.status" operator="equals"
- value="%" />
- <if-compare field-name="headerItem" operator="equals"
- value="otherCommunications" />
- </and>
- </condition>
- <link target="otherCommunications?status=open" />
- </menu-item>
- <menu-item name="allOtherEvents" title="${uiLabelMap.AllEvents}">
- <condition>
- <and>
- <if-compare field-name="parameters.status" operator="equals"
- value="open" />
- <if-compare field-name="headerItem" operator="equals"
- value="otherCommunications" />
- </and>
- </condition>
- <link target="otherCommunications" />
- </menu-item>
- <menu-item name="openMyEvents" title="${uiLabelMap.OpenEvents}">
- <condition>
- <and>
- <if-compare field-name="status" operator="equals"
- value="%" />
- <if-compare field-name="headerItem" operator="equals"
- value="myCommunications" />
- </and>
- </condition>
- <link target="myCommunications?status=open" />
- </menu-item>
- <menu-item name="allMyEvents" title="${uiLabelMap.AllEvents}">
- <condition>
- <and>
- <if-compare field-name="parameters.status" operator="equals"
- value="open" />
- <if-compare field-name="headerItem" operator="equals"
- value="myCommunications" />
- </and>
- </condition>
- <link target="myCommunications" />
- </menu-item>
- <menu-item name="openEvents" title="${uiLabelMap.OpenEvents}">
- <condition>
- <and>
- <if-compare field-name="status" operator="equals"
- value="%" />
- <if-compare field-name="headerItem" operator="equals"
- value="main" />
- </and>
- </condition>
- <link target="main?status=open" />
- </menu-item>
- <menu-item name="allEvents" title="${uiLabelMap.AllEvents}">
- <condition>
- <and>
- <if-compare field-name="parameters.status" operator="equals"
- value="open" />
- <if-compare field-name="headerItem" operator="equals"
- value="main" />
- </and>
- </condition>
- <link target="main" />
- </menu-item>
</menu>
<menu name="MyTasksMenu" type="simple" menu-container-style="button-bar button-style-2" default-selected-style="selected" selected-menuitem-context-field-name="tabButtonItem">
Modified: ofbiz/trunk/specialpurpose/mypage/widget/MyPageScreens.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/mypage/widget/MyPageScreens.xml?rev=680098&r1=680097&r2=680098&view=diff
==============================================================================
--- ofbiz/trunk/specialpurpose/mypage/widget/MyPageScreens.xml (original)
+++ ofbiz/trunk/specialpurpose/mypage/widget/MyPageScreens.xml Sun Jul 27 06:08:53 2008
@@ -22,26 +22,12 @@
xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/widget-screen.xsd">
<screen name="newEvent">
<section>
+ <actions>
+ <set field="donePage" from-field="donePage" default-value="myCompanyComms"/>
+ <set field="headerItem" from-field="parameters.donePage"/>
+ </actions>
<widgets>
<section>
- <condition>
- <if-empty field-name="parameters.Key" />
- </condition>
- <actions>
- <set field="headerItem" value="main" />
- </actions>
- <widgets />
- </section>
- <section>
- <condition>
- <not><if-empty field-name="parameters.Key" /></not>
- </condition>
- <actions>
- <set field="headerItem" value="myCompanyComms" />
- </actions>
- <widgets />
- </section>
- <section>
<widgets>
<decorator-screen name="main-decorator"
location="${parameters.mainDecoratorLocation}">
@@ -60,6 +46,7 @@
<screen name="MyTimesheet">
<section>
<actions>
+ <set field="donePage" value="myTimesheet"/>
<script location="component://projectmgr/webapp/projectmgr/WEB-INF/actions/EditWeekTimesheet.bsh"/>
</actions>
<widgets>
@@ -107,6 +94,7 @@
<screen name="MyTasks">
<section>
<actions>
+ <set field="donePage" value="myTasks"/>
<entity-and entity-name="WorkEffortAndPartyAssign"
list-name="tasks" filter-by-date="true">
<field-map field-name="partyId" env-name="userLogin.partyId" />
@@ -177,6 +165,9 @@
<screen name="MyCompanyComms">
<section>
+ <actions>
+ <set field="donePage" from-field="donePage" default-value="myCompanyComms"/>
+ </actions>
<widgets>
<screenlet title="Company events" navigation-menu-name="MyCompanyCommsMenu" name="companyEvents" collapsible="true">
<include-menu name="MyCompanyCommsMenu" location="component://mypage/widget/MyPageMenus.xml"/>
@@ -189,6 +180,7 @@
<section>
<actions>
<set field="partyId" from-field="userLogin.partyId" />
+ <set field="donePage" from-field="donePage" default-value="myCommunications"/>
</actions>
<widgets>
<include-screen name="Communications"/>
@@ -262,6 +254,7 @@
<screen name="OtherCommunications">
<section>
<actions>
+ <set field="donePage" value="otherCommunications"/>
<entity-and list-name="emailOwners" entity-name="PartyRelationship" filter-by-date="true">
<field-map field-name="partyIdFrom" value="${userLogin.partyId}" />
<field-map field-name="roleTypeIdFrom" value="EMAIL_ADMIN" />
@@ -284,43 +277,14 @@
<screen name="ViewCommunicationEvent">
<section>
<actions>
+ <set field="donePage" value="viewCommunication"/>
<set field="titleProperty" value="PageTitleViewCommunication" />
<set field="tabButtonItem" value="OverView" />
<set field="parentCommEventId" from-field="parameters.parentCommEventId" />
<entity-one entity-name="CommunicationEvent" value-name="communicationEvent" />
+ <set field="headerItem" value="donePage" />
</actions>
<widgets>
- <section>
- <condition>
- <if-compare field-name="parameters.type" operator="equals"
- value="main" />
- </condition>
- <actions>
- <set field="headerItem" value="main" />
- </actions>
- <widgets />
- </section>
- <section>
- <condition>
- <if-compare field-name="parameters.type" operator="equals"
- value="my" />
- </condition>
- <actions>
- <set field="headerItem" value="myCommunications" />
- </actions>
- <widgets />
- </section>
- <section>
- <condition>
- <if-compare field-name="parameters.type" operator="equals"
- value="other" />
- </condition>
- <actions>
- <set field="headerItem" value="otherCommunications" />
- </actions>
- <widgets />
- </section>
- <section><widgets>
<decorator-screen name="CommonCommunicationEventDecorator"
location="${parameters.mainDecoratorLocation}">
<decorator-section name="body">
@@ -329,7 +293,8 @@
<widgets>
<label style="h1"
text="Communication Event id: ${parameters.communicationEventId}"></label>
- <include-screen name="commEvent" />
+ <include-screen name="commEvent"
+ location="component://party/widget/partymgr/CommunicationScreens.xml" />
</widgets>
</section>
<section>
@@ -354,6 +319,9 @@
<container style="righthalf">
<label style="h1" text="${uiLabelMap.CommonRelatedInformation}" />
<section>
+ <actions>
+ <set field="donePage" value="viewCommunicationEvent"/>
+ </actions>
<widgets>
<screenlet title="${uiLabelMap.PartyCommEventRoles}">
<include-form name="ListCommRoles"
@@ -362,6 +330,9 @@
</widgets>
</section>
<section>
+ <actions>
+ <set field="donePage" value="viewCommunicationEvent"/>
+ </actions>
<widgets>
<screenlet title="${uiLabelMap.PartyCommContent}">
<include-form name="listCommContent"
@@ -400,62 +371,8 @@
</decorator-section>
</decorator-screen>
</widgets>
- </section></widgets>
- </section>
- </screen>
- <screen name="commEvent">
- <section>
- <widgets>
- <screenlet title="${parent} ${uiLabelMap.PartyCommunicationEvent}">
- <section>
- <condition>
- <or><!-- have for e-mails a special form -->
- <if-compare field-name="communicationEvent.communicationEventTypeId"
- operator="equals" value="EMAIL_COMMUNICATION" />
- <if-compare field-name="communicationEvent.communicationEventTypeId"
- operator="equals" value="AUTO_EMAIL_COMM" />
- </or>
- </condition>
- <widgets>
- <section>
- <condition>
- <and>
- <if-compare field-name="communicationEvent.statusId"
- operator="equals" value="COM_UNKNOWN_PARTY" />
- <if-empty field-name="communicationEvent.partyIdFrom" />
- </and>
- </condition>
- <widgets>
- <screenlet>
- <container>
- <label style="h1" text="Origin Email address not known!" />
- </container>
- <container>
- <label style="h2"
- text="Allocate this message to a existing or new party and add an email address" />
- </container>
- <include-form name="allocateMsgToPartyForm"
- location="component://mypage/widget/MyPageForms.xml" />
- <include-form name="deleteEmail"
- location="component://party/webapp/partymgr/communication/CommForms.xml" />
- </screenlet>
- </widgets>
- </section>
- <include-form
- location="component://party/webapp/partymgr/communication/CommForms.xml"
- name="ViewEmail" />
- </widgets>
- <fail-widgets>
- <include-form
- location="component://party/webapp/partymgr/communication/CommForms.xml"
- name="ViewCommEvent" />
- </fail-widgets>
- </section>
- </screenlet>
- </widgets>
</section>
</screen>
-
</screens>