|
Author: ashish
Date: Tue Dec 15 13:32:38 2009 New Revision: 890793 URL: http://svn.apache.org/viewvc?rev=890793&view=rev Log: Applied patch from jira issue OFBIZ-3344 - Adding Calendar event gives error in Accounting Manager. Steps to produce the bug: 1) Go to https://demo.ofbiz.org/assetmaint/control/ListFixedAssets 2) Find fixed assets 3) Select DEMO_PROJECTOR 4) Now click on calendar menu 5) Click on "Add new" for adding new event in calendar. 6) Give the event name on Add/modify a calendar event and then click on "Add" button 7) Error page is displayed. Thanks Divesh for the contribution and I totally agree that it is better to add single controller entry from workeffort instead of adding the whole controller at the top of accounting's controller.xml file. Modified: ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/controller.xml ofbiz/trunk/applications/workeffort/widget/CalendarForms.xml Modified: ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/controller.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/controller.xml?rev=890793&r1=890792&r2=890793&view=diff ============================================================================== --- ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/controller.xml (original) +++ ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/controller.xml Tue Dec 15 13:32:38 2009 @@ -2478,6 +2478,12 @@ <security auth="true" https="true"/> <response name="success" type="view" value="GlAccountBalanceByCostCenterPdf"/> </request-map> + <request-map uri="createWorkEffortAndPartyAssign"> + <security https="true" auth="true"/> + <event type="service" invoke="createWorkEffortAndPartyAssign"/> + <response name="success" type="view-last"/> + <response name="error" type="view-last"/> + </request-map> <!-- end of request mappings --> <!-- View Mappings --> Modified: ofbiz/trunk/applications/workeffort/widget/CalendarForms.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/workeffort/widget/CalendarForms.xml?rev=890793&r1=890792&r2=890793&view=diff ============================================================================== --- ofbiz/trunk/applications/workeffort/widget/CalendarForms.xml (original) +++ ofbiz/trunk/applications/workeffort/widget/CalendarForms.xml Tue Dec 15 13:32:38 2009 @@ -1,126 +1,127 @@ -<?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. ---> - -<forms xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/widget-form.xsd"> - <!-- Forms Specific to portlet --> - <form name="EditCalendar" extends="CommonPortletEdit" extends-resource="component://common/widget/PortletEditForms.xml"> - <field name="initialView" entry-name="attributeMap.initialView"> - <drop-down> - <option key="day" description="${uiLabelMap.WorkEffortDayView}"/> - <option key="week" description="${uiLabelMap.WorkEffortWeekView}"/> - <option key="month" description="${uiLabelMap.WorkEffortMonthView}"/> - </drop-down> - </field> - <field name="updateButton"><submit/></field> - </form> - <form name="editCalEvent" type="single" target="createWorkEffortAndPartyAssign" default-map-name="workEffort"> - <alt-target use-when="workEffort!=null" target="updateWorkEffort"/> - <field name="workEffortId" use-when="workEffort!=null"><hidden/></field> - <field name="partyId"><hidden value="${parameters.userLogin.partyId}"/></field> - <field name="roleTypeId" use-when="workEffort==null"><hidden value="CAL_OWNER"/></field> - <field name="statusId" use-when="workEffort==null"><hidden value="PRTYASGN_ASSIGNED"/></field> - <field name="workEffortName" title="${uiLabelMap.WorkEffortEventName}"><text/></field> - <field name="description" title="${uiLabelMap.CommonDescription}"><text/></field> - <field name="workEffortTypeId"> - <drop-down no-current-selected-key="MEETING"> - <entity-options entity-name="WorkEffortType" description="${description}"> - <entity-constraint name="parentTypeId" value="${parameters.parentTypeId}"/> - <entity-order-by field-name="description"/> - </entity-options> - </drop-down> - </field> - <field name="currentStatusId" use-when="workEffort!=null"> - <display-entity entity-name="StatusItem" description="${description}" key-field-name="statusId"/> - </field> - <field name="currentStatusId" use-when="workEffort==null"><hidden value="CAL_TENTATIVE"/></field> - <field name="scopeEnumId"> - <drop-down no-current-selected-key="WES_PRIVATE"> - <entity-options entity-name="Enumeration" key-field-name="enumId" description="${description}"> - <entity-constraint name="enumTypeId" value="WORK_EFF_SCOPE"/> - <entity-order-by field-name="description"/> - </entity-options> - </drop-down> - </field> - <field name="estimatedStartDate"><date-time input-method="time-dropdown" /></field> - <field name="estimatedCompletionDate"><date-time input-method="time-dropdown"/></field> - <field name="actualStartDate" use-when="parentWorkEffortId!=null"><display type="date-time"/></field> - <field name="actualCompletionDate" use-when="parentWorkEffortId!=null"><display type="date-time"/></field> - <field name="addButton" use-when="workEffort==null"><submit/></field> - <field name="updateButton" use-when="workEffort!=null"><submit/></field> - </form> - <form name="cancelEvent" type="single" target="updateWorkEffort"> - <field name="workEffortId"><hidden value="${parameters.workEffortId}"/></field> - <field name="currentStatusId"><hidden value="CAL_CANCELLED"/></field> - <field name="cancel" title="${uiLabelMap.WorkEffortCancelCalendarEvent}"><submit/></field> - </form> - <form name="showCalEvent" type="single" default-map-name="workEffort"> - <field name="workEffortName" title="${uiLabelMap.WorkEffortEventName}"><display/></field> - <field name="description" title="${uiLabelMap.CommonDescription}"><display/></field> - <field name="workEffortTypeId"> - <display-entity entity-name="WorkEffortType" description="${description}"/> - </field> - <field name="currentStatusId" use-when="workEffort!=null"> - <display-entity entity-name="StatusItem" description="${description}" key-field-name="statusId"/> - </field> - <field name="scopeEnumId"> - <display-entity entity-name="Enumeration" key-field-name="enumId" description="${description}"/> - </field> - <field name="estimatedStartDate"><display type="date-time"></display></field> - <field name="estimatedCompletionDate"><display type="date-time"></display></field> - <field name="actualStartDate" use-when="parentWorkEffortId!=null"><display type="date-time"/></field> - <field name="actualCompletionDate" use-when="parentWorkEffortId!=null"><display type="date-time"/></field> - </form> - <form name="showCalEventRoles" type="list" list-name="roles" - odd-row-style="alternate-row" header-row-style="header-row-2" default-table-style="basic-table hover-bar"> - <actions> - <entity-and entity-name="WorkEffortPartyAssignment" list="roles" filter-by-date="true"> - <field-map field-name="workEffortId" from-field="parameters.workEffortId"/> - </entity-and> - </actions> - <field name="workEffortId"><hidden value="${parameters.workEffortId}"/></field> - <field name="fromDate"><hidden/></field> - <field name="partyId" > - <display-entity entity-name="PartyNameView" key-field-name="partyId" description="${groupName}${lastName} ${firstName} ${middleName}"/> - </field> - <field name="roleTypeId"><display-entity entity-name="RoleType" description="${description}"/></field> - <field name="statusId" use-when="workEffort!=null"> - <display-entity entity-name="StatusItem" description="${description}"/> - </field> - </form> - <form name="showCalEventRolesDel" type="list" extends="showCalEventRoles" target="deleteWorkEffortPartyAssign"> - <field name="remove" title="${uiLabelMap.CommonRemove}"><submit/></field> - </form> - <form name="addCalEventRole" type="single" target="createWorkEffortPartyAssign"> - <field name="workEffortId"><hidden value="${parameters.workEffortId}"/></field> - <field name="statusId"><hidden value="PRTYASGN_ASSIGNED"/></field> - <field name="partyId" position="1"><lookup target-form-name="LookupPartyName" size="10"></lookup></field> - <field name="roleTypeId" position="2"> - <drop-down no-current-selected-key="CAL_ATTENDEE"> - <entity-options entity-name="RoleType" description="${description}"> - <entity-constraint name="parentTypeId" value="CALENDAR_ROLE"/> - <entity-order-by field-name="description"/> - </entity-options> - </drop-down> - </field> - <field name="add" title="${uiLabelMap.CommonAdd}"><submit/></field> - </form> - +<?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. +--> + +<forms xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/widget-form.xsd"> + <!-- Forms Specific to portlet --> + <form name="EditCalendar" extends="CommonPortletEdit" extends-resource="component://common/widget/PortletEditForms.xml"> + <field name="initialView" entry-name="attributeMap.initialView"> + <drop-down> + <option key="day" description="${uiLabelMap.WorkEffortDayView}"/> + <option key="week" description="${uiLabelMap.WorkEffortWeekView}"/> + <option key="month" description="${uiLabelMap.WorkEffortMonthView}"/> + </drop-down> + </field> + <field name="updateButton"><submit/></field> + </form> + <form name="editCalEvent" type="single" target="createWorkEffortAndPartyAssign" default-map-name="workEffort"> + <alt-target use-when="workEffort!=null" target="updateWorkEffort"/> + <field name="workEffortId" use-when="workEffort!=null"><hidden/></field> + <field name="partyId"><hidden value="${parameters.userLogin.partyId}"/></field> + <field name="fixedAssetId"><hidden value="${parameters.fixedAssetId}"/></field> + <field name="roleTypeId" use-when="workEffort==null"><hidden value="CAL_OWNER"/></field> + <field name="statusId" use-when="workEffort==null"><hidden value="PRTYASGN_ASSIGNED"/></field> + <field name="workEffortName" title="${uiLabelMap.WorkEffortEventName}"><text/></field> + <field name="description" title="${uiLabelMap.CommonDescription}"><text/></field> + <field name="workEffortTypeId"> + <drop-down no-current-selected-key="MEETING"> + <entity-options entity-name="WorkEffortType" description="${description}"> + <entity-constraint name="parentTypeId" value="${parameters.parentTypeId}"/> + <entity-order-by field-name="description"/> + </entity-options> + </drop-down> + </field> + <field name="currentStatusId" use-when="workEffort!=null"> + <display-entity entity-name="StatusItem" description="${description}" key-field-name="statusId"/> + </field> + <field name="currentStatusId" use-when="workEffort==null"><hidden value="CAL_TENTATIVE"/></field> + <field name="scopeEnumId"> + <drop-down no-current-selected-key="WES_PRIVATE"> + <entity-options entity-name="Enumeration" key-field-name="enumId" description="${description}"> + <entity-constraint name="enumTypeId" value="WORK_EFF_SCOPE"/> + <entity-order-by field-name="description"/> + </entity-options> + </drop-down> + </field> + <field name="estimatedStartDate"><date-time input-method="time-dropdown" /></field> + <field name="estimatedCompletionDate"><date-time input-method="time-dropdown"/></field> + <field name="actualStartDate" use-when="parentWorkEffortId!=null"><display type="date-time"/></field> + <field name="actualCompletionDate" use-when="parentWorkEffortId!=null"><display type="date-time"/></field> + <field name="addButton" use-when="workEffort==null"><submit/></field> + <field name="updateButton" use-when="workEffort!=null"><submit/></field> + </form> + <form name="cancelEvent" type="single" target="updateWorkEffort"> + <field name="workEffortId"><hidden value="${parameters.workEffortId}"/></field> + <field name="currentStatusId"><hidden value="CAL_CANCELLED"/></field> + <field name="cancel" title="${uiLabelMap.WorkEffortCancelCalendarEvent}"><submit/></field> + </form> + <form name="showCalEvent" type="single" default-map-name="workEffort"> + <field name="workEffortName" title="${uiLabelMap.WorkEffortEventName}"><display/></field> + <field name="description" title="${uiLabelMap.CommonDescription}"><display/></field> + <field name="workEffortTypeId"> + <display-entity entity-name="WorkEffortType" description="${description}"/> + </field> + <field name="currentStatusId" use-when="workEffort!=null"> + <display-entity entity-name="StatusItem" description="${description}" key-field-name="statusId"/> + </field> + <field name="scopeEnumId"> + <display-entity entity-name="Enumeration" key-field-name="enumId" description="${description}"/> + </field> + <field name="estimatedStartDate"><display type="date-time"></display></field> + <field name="estimatedCompletionDate"><display type="date-time"></display></field> + <field name="actualStartDate" use-when="parentWorkEffortId!=null"><display type="date-time"/></field> + <field name="actualCompletionDate" use-when="parentWorkEffortId!=null"><display type="date-time"/></field> + </form> + <form name="showCalEventRoles" type="list" list-name="roles" + odd-row-style="alternate-row" header-row-style="header-row-2" default-table-style="basic-table hover-bar"> + <actions> + <entity-and entity-name="WorkEffortPartyAssignment" list="roles" filter-by-date="true"> + <field-map field-name="workEffortId" from-field="parameters.workEffortId"/> + </entity-and> + </actions> + <field name="workEffortId"><hidden value="${parameters.workEffortId}"/></field> + <field name="fromDate"><hidden/></field> + <field name="partyId" > + <display-entity entity-name="PartyNameView" key-field-name="partyId" description="${groupName}${lastName} ${firstName} ${middleName}"/> + </field> + <field name="roleTypeId"><display-entity entity-name="RoleType" description="${description}"/></field> + <field name="statusId" use-when="workEffort!=null"> + <display-entity entity-name="StatusItem" description="${description}"/> + </field> + </form> + <form name="showCalEventRolesDel" type="list" extends="showCalEventRoles" target="deleteWorkEffortPartyAssign"> + <field name="remove" title="${uiLabelMap.CommonRemove}"><submit/></field> + </form> + <form name="addCalEventRole" type="single" target="createWorkEffortPartyAssign"> + <field name="workEffortId"><hidden value="${parameters.workEffortId}"/></field> + <field name="statusId"><hidden value="PRTYASGN_ASSIGNED"/></field> + <field name="partyId" position="1"><lookup target-form-name="LookupPartyName" size="10"></lookup></field> + <field name="roleTypeId" position="2"> + <drop-down no-current-selected-key="CAL_ATTENDEE"> + <entity-options entity-name="RoleType" description="${description}"> + <entity-constraint name="parentTypeId" value="CALENDAR_ROLE"/> + <entity-order-by field-name="description"/> + </entity-options> + </drop-down> + </field> + <field name="add" title="${uiLabelMap.CommonAdd}"><submit/></field> + </form> + </forms> \ No newline at end of file |
| Free forum by Nabble | Edit this page |
