Author: buscob
Date: Sat Oct 16 11:41:55 2010 New Revision: 1023257 URL: http://svn.apache.org/viewvc?rev=1023257&view=rev Log: Used the standard xxxxFormOnly pattern to handle the ajax update of this screen. No need to use this too complicated GenericScreenletAjaxWithMenu stuff. The portlet attributes must not be used to select artifact to be rendered in a portlet. This creates security issues. In next commits I will remove all the GenericPortlet stuff. Modified: ofbiz/trunk/applications/product/data/ProductPortletData.xml ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/controller.xml ofbiz/trunk/applications/product/widget/catalog/StoreForms.xml ofbiz/trunk/applications/product/widget/catalog/StoreScreens.xml Modified: ofbiz/trunk/applications/product/data/ProductPortletData.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/data/ProductPortletData.xml?rev=1023257&r1=1023256&r2=1023257&view=diff ============================================================================== --- ofbiz/trunk/applications/product/data/ProductPortletData.xml (original) +++ ofbiz/trunk/applications/product/data/ProductPortletData.xml Sat Oct 16 11:41:55 2010 @@ -30,17 +30,9 @@ <PortletCategory portletCategoryId="PRODUCTSTORE" description="ProductStore Management"/> <PortalPortlet portalPortletId="PrdStoreFacilityMgmt" portletName="Facility associated to ProductStore management" - screenName="GenericScreenletAjaxWithMenu" - screenLocation="component://common/widget/PortalPageScreens.xml" - description="Facilities associated for one productStore list and management : associate a facility, edit associate data, remove association" - securityServiceName="" securityMainAction="VIEW"/> - <PortletAttribute portalPortletId="PrdStoreFacilityMgmt" attrName="titleLabel" attrValue="ProductStoreFacilityAssocList" portalPageId="_NA_" portletSeqId="00000"/> - <PortletAttribute portalPortletId="PrdStoreFacilityMgmt" attrName="divIdRefresh" attrValue="PrdStoreFacilityMgmt_refresh" portalPageId="_NA_" portletSeqId="00000"/> - <PortletAttribute portalPortletId="PrdStoreFacilityMgmt" attrName="divIdArea" attrValue="PrdStoreFacilityMgmtArea" portalPageId="_NA_" portletSeqId="00000"/> - <PortletAttribute portalPortletId="PrdStoreFacilityMgmt" attrName="screenName" attrValue="ListProductStoreFacility" portalPageId="_NA_" portletSeqId="00000"/> - <PortletAttribute portalPortletId="PrdStoreFacilityMgmt" attrName="screenLocation" attrValue="component://product/widget/catalog/StoreScreens.xml" portalPageId="_NA_" portletSeqId="00000"/> - <PortletAttribute portalPortletId="PrdStoreFacilityMgmt" attrName="menuName" attrValue="ProductStoreFacility" portalPageId="_NA_" portletSeqId="00000"/> - <PortletAttribute portalPortletId="PrdStoreFacilityMgmt" attrName="menuLocation" attrValue="component://product/widget/catalog/CatalogMenus.xml" portalPageId="_NA_" portletSeqId="00000"/> + screenName="ListProductStoreFacility" + screenLocation="component://product/widget/catalog/StoreScreens.xml" + description="List of best selling products of the day"/> <PortletPortletCategory portalPortletId="PrdStoreFacilityMgmt" portletCategoryId="PRODUCTSTORE"/> <PortalPage portalPageId="ProductStoreFacility" sequenceNum="100" portalPageName="ProductStore Facility Management" description="The page to manage productStoreFacility data" ownerUserLoginId="_NA_" /> Modified: ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/controller.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/controller.xml?rev=1023257&r1=1023256&r2=1023257&view=diff ============================================================================== --- ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/controller.xml (original) +++ ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/controller.xml Sat Oct 16 11:41:55 2010 @@ -2308,6 +2308,10 @@ under the License. <request-map uri="ProductStoreFacilities"><security https="true" auth="true"/> <response name="success" type="view" value="ProductStoreFacilities"/> </request-map> + <request-map uri="ListProductStoreFacilityFormOnly"> + <security https="true" auth="true"/> + <response name="success" type="view" value="ListProductStoreFacilityFormOnly"/> + </request-map> <request-map uri="editProductStoreFacility"><security https="true" auth="true"/> <response name="success" type="view" value="EditProductStoreFacility"/> </request-map> @@ -2846,6 +2850,7 @@ under the License. <view-map name="EditProductStoreVendorShipments" type="screen" page="component://product/widget/catalog/StoreScreens.xml#EditProductStoreVendorShipments"/> <view-map name="ProductStoreFacilities" page="component://product/widget/catalog/StoreScreens.xml#ProductStoreFacilities" type="screen"/> <view-map name="ListProductStoreFacility" page="component://product/widget/catalog/StoreScreens.xml#ListProductStoreFacility" type="screen"/> + <view-map name="ListProductStoreFacilityFormOnly" page="component://product/widget/catalog/StoreScreens.xml#ListProductStoreFacilityFormOnly" type="screen"/> <view-map name="EditProductStoreFacility" page="component://product/widget/catalog/StoreScreens.xml#EditProductStoreFacility" type="screen"/> <view-map name="EditVendorProduct" type="screen" page="component://product/widget/catalog/ProductScreens.xml#EditVendorProduct"/> <view-map name="EditKeywordThesaurus" type="screen" page="component://product/widget/catalog/ThesaurusScreens.xml#EditKeywordThesaurus"/> Modified: ofbiz/trunk/applications/product/widget/catalog/StoreForms.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/widget/catalog/StoreForms.xml?rev=1023257&r1=1023256&r2=1023257&view=diff ============================================================================== --- ofbiz/trunk/applications/product/widget/catalog/StoreForms.xml (original) +++ ofbiz/trunk/applications/product/widget/catalog/StoreForms.xml Sat Oct 16 11:41:55 2010 @@ -151,6 +151,6 @@ under the License. <field name="submitButton" title="${groovy: productStoreFacility == null ? uiLabelMap.CommonAdd : uiLabelMap.CommonUpdate}" widget-style="smallSubmit"> <submit button-type="button"/> </field> - <on-event-update-area event-type="submit" area-id="PrdStoreFacilityMgmt_refresh" area-target="refreshPortlet?portalPortletId=PrdStoreFacilityMgmt&productStoreId=${parameters.productStoreId}"/> + <on-event-update-area event-type="submit" area-id="PrdStoreFacilityMgmtArea" area-target="ListProductStoreFacilityFormOnly?portalPortletId=PrdStoreFacilityMgmt&productStoreId=${parameters.productStoreId}"/> </form> </forms> Modified: ofbiz/trunk/applications/product/widget/catalog/StoreScreens.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/widget/catalog/StoreScreens.xml?rev=1023257&r1=1023256&r2=1023257&view=diff ============================================================================== --- ofbiz/trunk/applications/product/widget/catalog/StoreScreens.xml (original) +++ ofbiz/trunk/applications/product/widget/catalog/StoreScreens.xml Sat Oct 16 11:41:55 2010 @@ -593,16 +593,30 @@ under the License. </section> </screen> <screen name="ListProductStoreFacility"> - <section> - <widgets> - <decorator-screen name="uiLabelDecorator" location="${parameters.mainDecoratorLocation}"> - <decorator-section name="body"> - <container id="ProductStoreFacilityEditArea"/> - <include-form name="ListProductStoreFacility" location="component://product/widget/catalog/StoreForms.xml"/> - </decorator-section> - </decorator-screen> - </widgets> - </section> + <section> + <widgets> + <screenlet title="${uiLabelMap.ProductStoreFacilityAssocList}" navigation-menu-name="ProductStoreFacility"> + <include-menu name="ProductStoreFacility" location="component://product/widget/catalog/CatalogMenus.xml"/> + <container id="PrdStoreFacilityMgmtArea"> + <decorator-section name="body"> + <include-screen name="ListProductStoreFacilityFormOnly"/> + </decorator-section> + </container> + </screenlet> + </widgets> + </section> + </screen> + <screen name="ListProductStoreFacilityFormOnly"> + <section> + <actions> + <property-map resource="ProductUiLabels" map-name="uiLabelMap" global="true"/> + <property-map resource="CommonUiLabels" map-name="uiLabelMap" global="true"/> + </actions> + <widgets> + <container id="ProductStoreFacilityEditArea"/> + <include-form name="ListProductStoreFacility" location="component://product/widget/catalog/StoreForms.xml"/> + </widgets> + </section> </screen> <screen name="EditProductStoreFacility"> <section> |
Free forum by Nabble | Edit this page |