Author: hansbak
Date: Mon Oct 30 17:56:21 2006 New Revision: 469337 URL: http://svn.apache.org/viewvc?view=rev&rev=469337 Log: add subscription attributes to services and screens/forms Modified: incubator/ofbiz/trunk/applications/product/config/ProductUiLabels.properties incubator/ofbiz/trunk/applications/product/script/org/ofbiz/product/subscription/SubscriptionServices.xml incubator/ofbiz/trunk/applications/product/servicedef/services_subscription.xml incubator/ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/controller.xml incubator/ofbiz/trunk/applications/product/widget/catalog/SubscriptionForms.xml incubator/ofbiz/trunk/applications/product/widget/catalog/SubscriptionMenus.xml incubator/ofbiz/trunk/applications/product/widget/catalog/SubscriptionScreens.xml Modified: incubator/ofbiz/trunk/applications/product/config/ProductUiLabels.properties URL: http://svn.apache.org/viewvc/incubator/ofbiz/trunk/applications/product/config/ProductUiLabels.properties?view=diff&rev=469337&r1=469336&r2=469337 ============================================================================== --- incubator/ofbiz/trunk/applications/product/config/ProductUiLabels.properties (original) +++ incubator/ofbiz/trunk/applications/product/config/ProductUiLabels.properties Mon Oct 30 17:56:21 2006 @@ -137,6 +137,7 @@ PageTitleEditProductStoreWebSites=Edit Product Store Web Sites PageTitleEditProductSubscriptionResources=Edit Product Subscription Resources PageTitleEditSubscription=Edit Subscription +PageTitleEditSubscriptionAttributes=Edit Subscription Attributes PageTitleEditSubscriptionResource=Edit Subscription Resource PageTitleEditSubscriptionResourceProducts=Edit Subscription Resource Products PageTitleEditShipmentItems=Edit Shipment Items @@ -1207,6 +1208,7 @@ ProductStyleSheet=Style Sheet ProductSubCats=SubCats ProductSubscription=Subscription +ProductSubscriptionAttributes= Subscription Attributes ProductSubscriptions=Subscriptions ProductSubscriptionResource=Subscription Resources ProductSubscriptionResources=Subscription Resources Modified: incubator/ofbiz/trunk/applications/product/script/org/ofbiz/product/subscription/SubscriptionServices.xml URL: http://svn.apache.org/viewvc/incubator/ofbiz/trunk/applications/product/script/org/ofbiz/product/subscription/SubscriptionServices.xml?view=diff&rev=469337&r1=469336&r2=469337 ============================================================================== --- incubator/ofbiz/trunk/applications/product/script/org/ofbiz/product/subscription/SubscriptionServices.xml (original) +++ incubator/ofbiz/trunk/applications/product/script/org/ofbiz/product/subscription/SubscriptionServices.xml Mon Oct 30 17:56:21 2006 @@ -126,4 +126,21 @@ <entity-one entity-name="ProductSubscriptionResource" value-name="lookedUpValue"/> <remove-value value-name="lookedUpValue"/> </simple-method> + <simple-method method-name="updateSubscriptionAttribute" short-description="Create (when not exist) or update (when exist) a Subscription attribute"> + <set value="_UPDATE" field="securityAction"/> + <check-permission permission="CATALOG" action="${securityAction}"><fail-property resource="ProductUiLabels" property="GeneralCatalogPermissionError"/></check-permission> + <check-errors/> + <field-to-result field-name="parameters.subscriptionId" result-name="subscriptionId"/> + <entity-one entity-name="SubscriptionAttribute" value-name="lookedUpValue"/> + <if-empty field-name="lookedUpValue"> + <make-value entity-name="SubscriptionAttribute" value-name="newEntity"/> + <set-pk-fields map-name="parameters" value-name="newEntity"/> + <set-nonpk-fields map-name="parameters" value-name="newEntity"/> + <create-value value-name="newEntity"/> + <else> + <set-nonpk-fields map-name="parameters" value-name="lookedUpValue"/> + <store-value value-name="lookedUpValue"/> + </else> + </if-empty> + </simple-method> </simple-methods> Modified: incubator/ofbiz/trunk/applications/product/servicedef/services_subscription.xml URL: http://svn.apache.org/viewvc/incubator/ofbiz/trunk/applications/product/servicedef/services_subscription.xml?view=diff&rev=469337&r1=469336&r2=469337 ============================================================================== --- incubator/ofbiz/trunk/applications/product/servicedef/services_subscription.xml (original) +++ incubator/ofbiz/trunk/applications/product/servicedef/services_subscription.xml Mon Oct 30 17:56:21 2006 @@ -110,4 +110,11 @@ <description>Creates or updates Subscription record</description> <attribute name="orderId" type="String" mode="IN" optional="false"/> </service> + <service name="updateSubscriptionAttribute" default-entity-name="SubscriptionAttribute" auth="true" engine="simple" + location="org/ofbiz/product/subscription/SubscriptionServices.xml" invoke="updateSubscriptionAttribute"> + <description>Create (when not exist) or update (when exist) a Subscription attribute</description> + <attribute name="subscriptionId" type="String" mode="INOUT" optional="false"/> + <attribute name="attrName" type="String" mode="IN" optional="false"/> + <attribute name="attrValue" type="String" mode="IN" optional="true"/> + </service> </services> Modified: incubator/ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/controller.xml URL: http://svn.apache.org/viewvc/incubator/ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/controller.xml?view=diff&rev=469337&r1=469336&r2=469337 ============================================================================== --- incubator/ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/controller.xml (original) +++ incubator/ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/controller.xml Mon Oct 30 17:56:21 2006 @@ -1467,6 +1467,17 @@ <response name="error" type="view" value="EditSubscriptionResourceProducts"/> </request-map> + <!-- ================ Subscription Attributes ================= --> + <request-map uri="EditSubscriptionAttributes"> + <security https="true" auth="true"/> + <response name="success" type="view" value="EditSubscriptionAttributes"/> + </request-map> + <request-map uri="UpdateSubscriptionAttribute"> + <security https="true" auth="true"/> + <event type="service" path="" invoke="updateSubscriptionAttribute"/> + <response name="success" type="view" value="EditSubscriptionAttributes"/> + </request-map> + <!-- ================ ProductPromo Rules Requests ================= --> <request-map uri="EditProductPromoRules"> <security https="true" auth="true"/> @@ -2230,6 +2241,7 @@ <view-map name="FindSubscription" type="screen" page="component://product/widget/catalog/SubscriptionScreens.xml#FindSubscription"/> <view-map name="EditSubscription" type="screen" page="component://product/widget/catalog/SubscriptionScreens.xml#EditSubscription"/> + <view-map name="EditSubscriptionAttributes" type="screen" page="component://product/widget/catalog/SubscriptionScreens.xml#EditSubscriptionAttributes"/> <view-map name="FindSubscriptionResource" type="screen" page="component://product/widget/catalog/SubscriptionScreens.xml#FindSubscriptionResource"/> <view-map name="EditSubscriptionResource" type="screen" page="component://product/widget/catalog/SubscriptionScreens.xml#EditSubscriptionResource"/> <view-map name="EditSubscriptionResourceProducts" type="screen" page="component://product/widget/catalog/SubscriptionScreens.xml#EditSubscriptionResourceProducts"/> Modified: incubator/ofbiz/trunk/applications/product/widget/catalog/SubscriptionForms.xml URL: http://svn.apache.org/viewvc/incubator/ofbiz/trunk/applications/product/widget/catalog/SubscriptionForms.xml?view=diff&rev=469337&r1=469336&r2=469337 ============================================================================== --- incubator/ofbiz/trunk/applications/product/widget/catalog/SubscriptionForms.xml (original) +++ incubator/ofbiz/trunk/applications/product/widget/catalog/SubscriptionForms.xml Mon Oct 30 17:56:21 2006 @@ -177,6 +177,19 @@ </drop-down> </field> + <field name="partyNeedId"> + <lookup target-form-name="LookupPartyName"> + <sub-hyperlink target="/partymgr/control/viewprofile?partyId=${subscription.partyNeedId}" target-type="inter-app" description="${subscription.partyId}" link-style="buttontext"/> + </lookup> + </field> + <field name="needTypeId" widget-style="selectBox"> + <drop-down allow-empty="true"> + <entity-options entity-name="NeedType" description="${description}"> + <entity-order-by field-name="description"/> + </entity-options> + </drop-down> + </field> + <field name="orderId"> <lookup target-form-name="LookupOrderHeader"> <sub-hyperlink target="/ordermgr/control/orderview?orderId=${subscription.orderId}" target-type="inter-app" description="${subscription.orderId}" link-style="buttontext"/> @@ -197,10 +210,7 @@ <sub-hyperlink target="/partymgr/control/ViewCommunicationEvent?communicationEventId=${subscription.communicationEventId}" target-type="inter-app" description="${subscription.communicationEventId}" link-style="buttontext"/> </lookup> </field> - - <field name="partyNeedId"><ignored/></field> - <field name="needTypeId"><ignored/></field> - + <field name="submitButton" title="${uiLabelMap.CommonUpdate}" widget-style="smallSubmit"><submit button-type="button"/></field> </form> @@ -316,5 +326,12 @@ </field> <field name="submitButton" title="${uiLabelMap.CommonAdd}" widget-style="smallSubmit"><submit button-type="button"/></field> + </form> + <form name="EditSubscriptionAttributes" type="list" list-name="subscriptionAttributes" target="UpdateSubscriptionAttribute" + default-title-style="tableheadtext" default-widget-style="inputBox" default-tooltip-style="tabletext"> + <auto-fields-service service-name="updateSubscriptionAttribute"/> + + <field name="subscriptionId"><hidden/></field> + <field name="updateButton" widget-style="smallSubmit"><submit button-type="button"/></field> </form> </forms> Modified: incubator/ofbiz/trunk/applications/product/widget/catalog/SubscriptionMenus.xml URL: http://svn.apache.org/viewvc/incubator/ofbiz/trunk/applications/product/widget/catalog/SubscriptionMenus.xml?view=diff&rev=469337&r1=469336&r2=469337 ============================================================================== --- incubator/ofbiz/trunk/applications/product/widget/catalog/SubscriptionMenus.xml (original) +++ incubator/ofbiz/trunk/applications/product/widget/catalog/SubscriptionMenus.xml Mon Oct 30 17:56:21 2006 @@ -25,6 +25,9 @@ <menu-item name="EditSubscription" title="${uiLabelMap.ProductSubscription}"> <link target="EditSubscription?subscriptionId=${subscriptionId}"/> </menu-item> + <menu-item name="EditSubscriptionAttributes" title="${uiLabelMap.ProductSubscriptionAttributes}"> + <link target="EditSubscriptionAttributes?subscriptionId=${subscriptionId}"/> + </menu-item> </menu> <menu name="EditSubscriptionResource" default-title-style="tabButton" default-selected-style="tabButtonSelected" default-tooltip-style="tabletext" default-widget-style="tabButton" Modified: incubator/ofbiz/trunk/applications/product/widget/catalog/SubscriptionScreens.xml URL: http://svn.apache.org/viewvc/incubator/ofbiz/trunk/applications/product/widget/catalog/SubscriptionScreens.xml?view=diff&rev=469337&r1=469336&r2=469337 ============================================================================== --- incubator/ofbiz/trunk/applications/product/widget/catalog/SubscriptionScreens.xml (original) +++ incubator/ofbiz/trunk/applications/product/widget/catalog/SubscriptionScreens.xml Mon Oct 30 17:56:21 2006 @@ -108,7 +108,28 @@ </widgets> </section> </screen> - + <screen name="EditSubscriptionAttributes"> + <section> + <actions> + <set field="titleProperty" value="PageTitleEditSubscriptionAttributes"/> + <set field="tabButtonItem" value="EditSubscriptionAttributes"/> + + <set field="subscriptionId" from-field="parameters.subscriptionId"/> + <entity-and entity-name="SubscriptionAttribute" use-cache="false" list-name="subscriptionAttributes"> + <field-map field-name="subscriptionId"/> + <order-by field-name="attrName"/> + </entity-and> + </actions> + <widgets> + <decorator-screen name="CommonSubscriptionDecorator"> + <decorator-section name="body"> + <include-form name="EditSubscriptionAttributes" location="component://product/widget/catalog/SubscriptionForms.xml"/> + </decorator-section> + </decorator-screen> + </widgets> + </section> + </screen> + <!-- SubscriptionResource Screens --> <screen name="FindSubscriptionResource"> |
Free forum by Nabble | Edit this page |