Author: buscob
Date: Fri Sep 10 20:43:37 2010 New Revision: 995975 URL: http://svn.apache.org/viewvc?rev=995975&view=rev Log: Added UiLabels resources loading in Porlets. All Portlet screens should always load all needed UI resources since they can be rendered in different PortalPages that cannot be aware of what resources are needed. This change will allow to eliminate all UI label resources loading in MyPortal decorators so that MyPortal will not depend on so many other components. Modified: ofbiz/trunk/applications/party/widget/partymgr/ProfileScreens.xml ofbiz/trunk/framework/example/widget/example/PortletScreens.xml ofbiz/trunk/specialpurpose/projectmgr/widget/TaskScreens.xml Modified: ofbiz/trunk/applications/party/widget/partymgr/ProfileScreens.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/party/widget/partymgr/ProfileScreens.xml?rev=995975&r1=995974&r2=995975&view=diff ============================================================================== --- ofbiz/trunk/applications/party/widget/partymgr/ProfileScreens.xml (original) +++ ofbiz/trunk/applications/party/widget/partymgr/ProfileScreens.xml Fri Sep 10 20:43:37 2010 @@ -23,6 +23,7 @@ <screen name="Party"> <section> <actions> + <property-map resource="PartyUiLabels" map-name="uiLabelMap" global="true"/> <set field="parameters.partyId" from-field="parameters.partyId" default-value="${userLogin.partyId}"/> <entity-and entity-name="PartyNameHistory" list="partyNameHistoryList"> <field-map field-name="partyId" from-field="parameters.partyId"/> @@ -124,6 +125,7 @@ <screen name="Contact"> <section> <actions> + <property-map resource="PartyUiLabels" map-name="uiLabelMap" global="true"/> <set field="partyId" from-field="parameters.partyId" default-value="${userLogin.partyId}"/> <script location="component://party/webapp/partymgr/WEB-INF/actions/party/GetContactMechs.groovy"/> <script location="component://party/webapp/partymgr/WEB-INF/actions/party/GetUserLoginPrimaryEmail.groovy"/> @@ -141,6 +143,7 @@ <screen name="PartyIdentifications"> <section> <actions> + <property-map resource="PartyUiLabels" map-name="uiLabelMap" global="true"/> <set field="partyId" from-field="parameters.partyId"/> </actions> <widgets> @@ -155,6 +158,7 @@ <screen name="PaymentMethods"> <section> <actions> + <property-map resource="PartyUiLabels" map-name="uiLabelMap" global="true"/> <script location="component://party/webapp/partymgr/WEB-INF/actions/party/GetPaymentMethods.groovy"/> </actions> <widgets> @@ -170,6 +174,7 @@ <screen name="Attributes"> <section> <actions> + <property-map resource="PartyUiLabels" map-name="uiLabelMap" global="true"/> <set field="partyId" from-field="parameters.partyId" default-value="${userLogin.partyId}"/> <entity-one entity-name="Party" value-field="party"/> <entity-and entity-name="PartyAttribute" list="attributes"> @@ -189,6 +194,7 @@ <screen name="AvsSettings"> <section> <actions> + <property-map resource="PartyUiLabels" map-name="uiLabelMap" global="true"/> <set field="partyId" from-field="parameters.partyId" default-value="${userLogin.partyId}"/> <entity-one entity-name="Party" value-field="party"/> <entity-and entity-name="PartyIcsAvsOverride" list="avsOverride"> @@ -223,6 +229,7 @@ <screen name="LoyaltyPoints"> <section> <actions> + <property-map resource="PartyUiLabels" map-name="uiLabelMap" global="true"/> <script location="component://party/webapp/partymgr/WEB-INF/actions/party/GetLoyaltyPoints.groovy"/> </actions> <widgets> @@ -238,6 +245,7 @@ <screen name="UserLogin"> <section> <actions> + <property-map resource="PartyUiLabels" map-name="uiLabelMap" global="true"/> <set field="partyId" from-field="parameters.partyId" default-value="${userLogin.partyId}"/> <entity-one entity-name="Party" value-field="party"/> <entity-and entity-name="UserLogin" list="userLogins"> @@ -257,6 +265,7 @@ <screen name="Visits"> <section> <actions> + <property-map resource="PartyUiLabels" map-name="uiLabelMap" global="true"/> <set field="partyId" from-field="parameters.partyId" default-value="${userLogin.partyId}"/> <entity-and entity-name="Visit" list="visits"> <field-map field-name="partyId" from-field="partyId"/> @@ -401,6 +410,7 @@ <screen name="Content"> <section> <actions> + <property-map resource="PartyUiLabels" map-name="uiLabelMap" global="true"/> <entity-condition entity-name="PartyContentType" list="partyContentTypes"> <order-by field-name="description"/> </entity-condition> @@ -446,6 +456,7 @@ <screen name="Notes"> <section> <actions> + <property-map resource="PartyUiLabels" map-name="uiLabelMap" global="true"/> <set field="partyId" from-field="parameters.partyId" default-value="${userLogin.partyId}"/> <entity-and entity-name="PartyNoteView" list="notes"> <field-map field-name="targetPartyId" from-field="partyId"/> @@ -523,6 +534,7 @@ <screen name="partyRelAccounts"> <section> <actions> + <property-map resource="PartyUiLabels" map-name="uiLabelMap" global="true"/> <entity-and list="accounts" entity-name="PartyRelationship" filter-by-date="true"> <field-map field-name="partyIdTo" from-field="parameters.partyId"/> <field-map field-name="roleTypeIdFrom" value="ACCOUNT"/> @@ -557,6 +569,7 @@ <screen name="mytasks"> <section> <condition> + <property-map resource="WorkEffortUiLabels" map-name="uiLabelMap" global="true"/> <if-compare-field field="parameters.partyId" operator="equals" to-field="userLogin.partyId"/> </condition> <actions> @@ -591,6 +604,8 @@ <screen name="ProductStores"> <section> <actions> + <property-map resource="PartyUiLabels" map-name="uiLabelMap" global="true"/> + <property-map resource="ProductUiLabels" map-name="uiLabelMap" global="true"/> <set field="partyId" from-field="parameters.partyId" default-value="${userLogin.partyId}"/> <entity-and entity-name="ProductStoreRole" list="productStoreRoles" filter-by-date="true"> <field-map field-name="partyId" from-field="partyId"/> Modified: ofbiz/trunk/framework/example/widget/example/PortletScreens.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/example/widget/example/PortletScreens.xml?rev=995975&r1=995974&r2=995975&view=diff ============================================================================== --- ofbiz/trunk/framework/example/widget/example/PortletScreens.xml (original) +++ ofbiz/trunk/framework/example/widget/example/PortletScreens.xml Fri Sep 10 20:43:37 2010 @@ -24,6 +24,7 @@ under the License. <screen name="ExamplePortlet1"> <section> <actions> + <property-map resource="ExampleUiLabels" map-name="uiLabelMap" global="true"/> <!-- TODO: figure out why this isn't getting the request object and requestAttributes is not updated either: <script location="component://common/script/org/ofbiz/common/PortalPageMethods.xml#getPortletAttributes"/>--> <script location="component://common/webcommon/WEB-INF/actions/includes/retrievePortletAttributes.groovy"/> </actions> @@ -36,6 +37,9 @@ under the License. <screen name="ExamplePortlet2"> <section> + <actions> + <property-map resource="ExampleUiLabels" map-name="uiLabelMap" global="true"/> + </actions> <widgets> <label text="${uiLabelMap.ExamplePortletSecond}"/> </widgets> @@ -45,6 +49,7 @@ under the License. <screen name="ExamplePortlet3"> <section> <actions> + <property-map resource="ExampleUiLabels" map-name="uiLabelMap" global="true"/> <script location="component://common/webcommon/WEB-INF/actions/includes/retrievePortletAttributes.groovy"/> </actions> <widgets> Modified: ofbiz/trunk/specialpurpose/projectmgr/widget/TaskScreens.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/projectmgr/widget/TaskScreens.xml?rev=995975&r1=995974&r2=995975&view=diff ============================================================================== --- ofbiz/trunk/specialpurpose/projectmgr/widget/TaskScreens.xml (original) +++ ofbiz/trunk/specialpurpose/projectmgr/widget/TaskScreens.xml Fri Sep 10 20:43:37 2010 @@ -125,6 +125,7 @@ under the License. <screen name="MyTaskList"> <section> <actions> + <property-map resource="ProjectMgrUiLabels" map-name="uiLabelMap" global="true"/> <entity-and entity-name="WorkEffortAndPartyAssign" list="tasks" filter-by-date="true"> <field-map field-name="partyId" from-field="userLogin.partyId"/> <field-map field-name="workEffortTypeId" value="TASK"/> |
Free forum by Nabble | Edit this page |