Author: jacopoc
Date: Sat Jul 22 23:37:15 2006 New Revision: 424684 URL: http://svn.apache.org/viewvc?rev=424684&view=rev Log: Implemented new screen, forms and services to manage order terms for existing orders. Modified: incubator/ofbiz/trunk/applications/order/script/org/ofbiz/order/order/OrderServices.xml incubator/ofbiz/trunk/applications/order/servicedef/services.xml incubator/ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/controller.xml incubator/ofbiz/trunk/applications/order/webapp/ordermgr/entry/orderterms.ftl incubator/ofbiz/trunk/applications/order/webapp/ordermgr/order/OrderForms.xml incubator/ofbiz/trunk/applications/order/widget/ordermgr/OrderViewScreens.xml Modified: incubator/ofbiz/trunk/applications/order/script/org/ofbiz/order/order/OrderServices.xml URL: http://svn.apache.org/viewvc/incubator/ofbiz/trunk/applications/order/script/org/ofbiz/order/order/OrderServices.xml?rev=424684&r1=424683&r2=424684&view=diff ============================================================================== --- incubator/ofbiz/trunk/applications/order/script/org/ofbiz/order/order/OrderServices.xml (original) +++ incubator/ofbiz/trunk/applications/order/script/org/ofbiz/order/order/OrderServices.xml Sat Jul 22 23:37:15 2006 @@ -496,5 +496,38 @@ <create-value value-name="adjustment"/> </iterate> </simple-method> + + <simple-method method-name="createOrderTerm" short-description="Create an OrderTerm"> + <check-permission permission="ORDERMGR" action="_CREATE"> + <fail-property resource="OrderErrorUiLabels" property="OrderSecurityErrorToRunCreateOrderTerm"/> + </check-permission> + <check-errors/> + + <make-value value-name="newEntity" entity-name="OrderTerm"/> + <set-pk-fields map-name="parameters" value-name="newEntity"/> + <set value="_NA_" set-if-empty="true" field="newEntity.orderItemSeqId"/> + <set-nonpk-fields map-name="parameters" value-name="newEntity"/> + + <create-value value-name="newEntity"/> + </simple-method> + <simple-method method-name="updateOrderTerm" short-description="Update OrderTerm"> + <check-permission permission="ORDERMGR" action="_DELETE"> + <fail-property resource="OrderErrorUiLabels" property="OrderSecurityErrorToRunUpdateOrderTerm"/> + </check-permission> + <check-errors/> + + <entity-one entity-name="OrderTerm" value-name="lookedUpValue"/> + <set-nonpk-fields map-name="parameters" value-name="lookedUpValue"/> + <store-value value-name="lookedUpValue"/> + </simple-method> + <simple-method method-name="removeOrderTerm" short-description="Remove OrderTerm"> + <check-permission permission="ORDERMGR" action="_DELETE"> + <fail-property resource="OrderErrorUiLabels" property="OrderSecurityErrorToRunRemoveOrderTerm"/> + </check-permission> + <check-errors/> + + <entity-one entity-name="OrderTerm" value-name="lookedUpValue"/> + <remove-value value-name="lookedUpValue"/> + </simple-method> </simple-methods> Modified: incubator/ofbiz/trunk/applications/order/servicedef/services.xml URL: http://svn.apache.org/viewvc/incubator/ofbiz/trunk/applications/order/servicedef/services.xml?rev=424684&r1=424683&r2=424684&view=diff ============================================================================== --- incubator/ofbiz/trunk/applications/order/servicedef/services.xml (original) +++ incubator/ofbiz/trunk/applications/order/servicedef/services.xml Sat Jul 22 23:37:15 2006 @@ -502,5 +502,25 @@ <description>Remove a Communication Event Order</description> <auto-attributes entity-name="CommunicationEventOrder" include="pk" mode="IN" optional="false"/> </service> + + <!-- OrderTerms --> + <service name="createOrderTerm" engine="simple" + location="org/ofbiz/order/order/OrderServices.xml" invoke="createOrderTerm" auth="true"> + <description>Create an Order Term</description> + <auto-attributes entity-name="OrderTerm" include="pk" mode="IN" optional="false"/> + <auto-attributes entity-name="OrderTerm" include="nonpk" mode="IN" optional="true"/> + <override name="orderItemSeqId" optional="true"/> + </service> + <service name="updateOrderTerm" engine="simple" + location="org/ofbiz/order/order/OrderServices.xml" invoke="updateOrderTerm" auth="true"> + <description>Update an Order Term</description> + <auto-attributes entity-name="OrderTerm" include="pk" mode="IN" optional="false"/> + <auto-attributes entity-name="OrderTerm" include="nonpk" mode="IN" optional="true"/> + </service> + <service name="removeOrderTerm" engine="simple" + location="org/ofbiz/order/order/OrderServices.xml" invoke="removeOrderTerm" auth="true"> + <description>Remove an Order Term</description> + <auto-attributes entity-name="OrderTerm" include="pk" mode="IN" optional="false"/> + </service> </services> Modified: incubator/ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/controller.xml URL: http://svn.apache.org/viewvc/incubator/ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/controller.xml?rev=424684&r1=424683&r2=424684&view=diff ============================================================================== --- incubator/ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/controller.xml (original) +++ incubator/ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/controller.xml Sat Jul 22 23:37:15 2006 @@ -306,6 +306,30 @@ <response name="error" type="view" value="createnewnote"/> </request-map> + <!-- Order Term Requests --> + <request-map uri="ListOrderTerms"> + <security https="true" auth="true"/> + <response name="success" type="view" value="ListOrderTerms"/> + </request-map> + <request-map uri="createOrderTerm"> + <security https="true" auth="true"/> + <event type="service" invoke="createOrderTerm"/> + <response name="success" type="view" value="ListOrderTerms"/> + <response name="error" type="view" value="ListOrderTerms"/> + </request-map> + <request-map uri="updateOrderTerm"> + <security https="true" auth="true"/> + <event type="service" invoke="updateOrderTerm"/> + <response name="success" type="view" value="ListOrderTerms"/> + <response name="error" type="view" value="ListOrderTerms"/> + </request-map> + <request-map uri="removeOrderTerm"> + <security https="true" auth="true"/> + <event type="service" invoke="removeOrderTerm"/> + <response name="success" type="view" value="ListOrderTerms"/> + <response name="error" type="view" value="ListOrderTerms"/> + </request-map> + <!-- Order Entry Requests --> <request-map uri="orderentry"> <security https="true" auth="true"/> @@ -761,7 +785,7 @@ <response name="success" type="view" value="orderTerm"/> <response name="error" type="view" value="orderTerm"/> </request-map> - <request-map uri="removeOrderTerm"> + <request-map uri="removeCartOrderTerm"> <security https="true" auth="true"/> <event type="java" path="org.ofbiz.order.shoppingcart.ShoppingCartEvents" invoke="removeOrderTerm"/> <response name="success" type="view" value="orderTerm"/> @@ -1271,6 +1295,7 @@ <view-map name="receivepayment" type="screen" page="component://order/widget/ordermgr/OrderViewScreens.xml#OrderReceivePayment"/> <view-map name="ordertasklist" type="screen" page="component://order/widget/ordermgr/OrderTaskScreens.xml#OrderTaskList"/> <view-map name="viewimage" type="screen" page="component://order/widget/ordermgr/OrderViewScreens.xml#ViewImage"/> + <view-map name="ListOrderTerms" type="screen" page="component://order/widget/ordermgr/OrderViewScreens.xml#ListOrderTerms"/> <view-map name="survey" type="screen" page="component://order/widget/ordermgr/setOrderCurrencyAgreementShipDatesCartScreens.xml#survey"/> <view-map name="showcart" type="screen" page="component://order/widget/ordermgr/OrderEntryCartScreens.xml#ShowCart"/> Modified: incubator/ofbiz/trunk/applications/order/webapp/ordermgr/entry/orderterms.ftl URL: http://svn.apache.org/viewvc/incubator/ofbiz/trunk/applications/order/webapp/ordermgr/entry/orderterms.ftl?rev=424684&r1=424683&r2=424684&view=diff ============================================================================== --- incubator/ofbiz/trunk/applications/order/webapp/ordermgr/entry/orderterms.ftl (original) +++ incubator/ofbiz/trunk/applications/order/webapp/ordermgr/entry/orderterms.ftl Sat Jul 22 23:37:15 2006 @@ -46,7 +46,7 @@ <td align="right"> <a href="<@ofbizUrl>setOrderTerm?termIndex=${index}&createNew=Y</@ofbizUrl>" class="buttontext">${uiLabelMap.CommonUpdate}</a> - <a href="<@ofbizUrl>removeOrderTerm?termIndex=${index}</@ofbizUrl>" class="buttontext">${uiLabelMap.CommonRemove}</a> + <a href="<@ofbizUrl>removeCartOrderTerm?termIndex=${index}</@ofbizUrl>" class="buttontext">${uiLabelMap.CommonRemove}</a> </td> </tr> <#if orderTerms.size()<index > Modified: incubator/ofbiz/trunk/applications/order/webapp/ordermgr/order/OrderForms.xml URL: http://svn.apache.org/viewvc/incubator/ofbiz/trunk/applications/order/webapp/ordermgr/order/OrderForms.xml?rev=424684&r1=424683&r2=424684&view=diff ============================================================================== --- incubator/ofbiz/trunk/applications/order/webapp/ordermgr/order/OrderForms.xml (original) +++ incubator/ofbiz/trunk/applications/order/webapp/ordermgr/order/OrderForms.xml Sat Jul 22 23:37:15 2006 @@ -21,13 +21,13 @@ <form name="EditOrderHeader" type="single" target="updateOrderHeader" title="" default-title-style="tableheadtext" default-widget-style="inputBox" default-tooltip-style="tabletext" > - <alt-target target="createOrderHeader" use-when="orderHeader==null"/> - <auto-fields-entity entity-name="OrderHeader" /> <actions> <entity-one entity-name="StatusItem" value-name="currentStatus" auto-field-map="false"> <field-map field-name="statusId" env-name="orderHeader.statusId"/> </entity-one> </actions> + <alt-target target="createOrderHeader" use-when="orderHeader==null"/> + <auto-fields-entity entity-name="OrderHeader" /> <field name="orderId" use-when="orderHeader!=null" ><display/></field> <field name="orderId" use-when="orderHeader==null" ><ignored/></field> @@ -81,16 +81,41 @@ <form name="ListOrderHeaders" type="single" target="" title="" default-title-style="tableheadtext" default-widget-style="inputBox" default-tooltip-style="tabletext" > - <auto-fields-entity entity-name="OrderHeader" default-field-type="display"/> <actions> <entity-and entity-name="OrderHeader"> <field-map field-name="orderId"/> </entity-and> </actions> + <auto-fields-entity entity-name="OrderHeader" default-field-type="display"/> <field name="orderId" widget-style="buttontext"> <hyperlink target="EditOrderHeader?orderId=${orderId}" description="[${orderId}]" /> </field> <field name="statusId"> <display-entity entity-name="StatusItem"/> </field> <field name="productStoreId"> <display-entity entity-name="ProductStore"/> </field> + </form> + <form name="ListOrderTerms" type="list" list-name="orderTerms" + target="updateOrderTerm" paginate-target="ListOrderTerms" title="" + default-title-style="tableheadtext" default-tooltip-style="tabletext" default-widget-style="tabletext"> + <auto-fields-entity entity-name="OrderTerm" default-field-type="edit"/> + <field name="termTypeId"><display-entity also-hidden="true" entity-name="TermType"/></field> + <field name="orderId"><hidden/></field> + <field name="orderItemSeqId"><display/></field> + <field name="submitButton" title="${uiLabelMap.CommonUpdate}" widget-style="smallSubmit"><submit button-type="button"/></field> + <field name="deleteLink" title="" widget-style="buttontext"> + <hyperlink target="removeOrderTerm?orderId=${orderId}&termTypeId=${termTypeId}&orderItemSeqId=${orderItemSeqId}" description="${uiLabelMap.CommonRemove}" also-hidden="false"/> + </field> + </form> + <form name="AddOrderTerm" type="single" target="createOrderTerm" title="" + default-title-style="tableheadtext" default-widget-style="inputBox" default-tooltip-style="tabletext"> + <auto-fields-entity entity-name="OrderTerm" default-field-type="edit"/> + <field name="orderId"><hidden value="${parameters.orderId}"/></field> + <field name="termTypeId"> + <drop-down allow-empty="false"> + <entity-options entity-name="TermType" description="${description}"> + <entity-order-by field-name="description"/> + </entity-options> + </drop-down> + </field> + <field name="addButton" widget-style="smallSubmit"><submit button-type="button"/></field> </form> </forms> Modified: incubator/ofbiz/trunk/applications/order/widget/ordermgr/OrderViewScreens.xml URL: http://svn.apache.org/viewvc/incubator/ofbiz/trunk/applications/order/widget/ordermgr/OrderViewScreens.xml?rev=424684&r1=424683&r2=424684&view=diff ============================================================================== --- incubator/ofbiz/trunk/applications/order/widget/ordermgr/OrderViewScreens.xml (original) +++ incubator/ofbiz/trunk/applications/order/widget/ordermgr/OrderViewScreens.xml Sat Jul 22 23:37:15 2006 @@ -142,7 +142,7 @@ <actions> <set field="titleProperty" value="OrderViewEditDeliveryScheduleInfo"/> <set field="headerItem" value="findorders"/> - <property-map resource="OrderUiLabels" map-name="uiLabelMap" global="true"/> + <property-map resource="OrderUiLabels" map-name="uiLabelMap" global="true"/> <property-map resource="AccountingUiLabels" map-name="uiLabelMap" global="true"/> <property-map resource="ProductUiLabels" map-name="uiLabelMap" global="true"/> <property-map resource="CommonUiLabels" map-name="uiLabelMap" global="true"/> @@ -219,6 +219,25 @@ <platform-specific> <html><html-template location="component://order/webapp/ordermgr/order/sendconfirmationemail.ftl"/></html> </platform-specific> + </decorator-section> + </decorator-screen> + </widgets> + </section> + </screen> + <screen name="ListOrderTerms"> + <section> + <actions> + <set field="titleProperty" value="ListOrderTerms"/> + <set field="headerItem" value="findorders"/> + <entity-and entity-name="OrderTerm" list-name="orderTerms"> + <field-map field-name="orderId" env-name="parameters.orderId"/> + </entity-and> + </actions> + <widgets> + <decorator-screen name="CommonOrderViewDecorator"> + <decorator-section name="body"> + <include-form name="ListOrderTerms" location="component://order/webapp/ordermgr/order/OrderForms.xml"/> + <include-form name="AddOrderTerm" location="component://order/webapp/ordermgr/order/OrderForms.xml"/> </decorator-section> </decorator-screen> </widgets> |
Free forum by Nabble | Edit this page |