Author: hansbak
Date: Fri Jun 26 06:34:45 2009 New Revision: 788605 URL: http://svn.apache.org/viewvc?rev=788605&view=rev Log: moved the portlet editscreen to the top of the page and improved error handling Modified: ofbiz/trunk/framework/common/script/org/ofbiz/common/PortalPageServices.xml ofbiz/trunk/framework/common/widget/PortalPageScreens.xml Modified: ofbiz/trunk/framework/common/script/org/ofbiz/common/PortalPageServices.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/common/script/org/ofbiz/common/PortalPageServices.xml?rev=788605&r1=788604&r2=788605&view=diff ============================================================================== --- ofbiz/trunk/framework/common/script/org/ofbiz/common/PortalPageServices.xml (original) +++ ofbiz/trunk/framework/common/script/org/ofbiz/common/PortalPageServices.xml Fri Jun 26 06:34:45 2009 @@ -96,9 +96,10 @@ <if-empty field="parameters.ownerUserLoginId"> <if-empty field="parameters.portalPageId"> <log level="error" message="Service getPortletAttributes did not receive either ownerUserLoginId OR portalPageId"></log> - <return response-code="error"/> + <string-to-list string="Service getPortletAttributes did not receive either ownerUserLoginId OR portalPageId" list="error_list"/> </if-empty> </if-empty> + <check-errors/> <!-- if userLogin provided get the portalPageId with the required portlet --> <if-not-empty field="parameters.ownerUserLoginId"> <entity-and entity-name="PortalPageAndPortlet" list="ppList"> Modified: ofbiz/trunk/framework/common/widget/PortalPageScreens.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/common/widget/PortalPageScreens.xml?rev=788605&r1=788604&r2=788605&view=diff ============================================================================== --- ofbiz/trunk/framework/common/widget/PortalPageScreens.xml (original) +++ ofbiz/trunk/framework/common/widget/PortalPageScreens.xml Fri Jun 26 06:34:45 2009 @@ -108,9 +108,29 @@ <screenlet title="${uiLabelMap.CommonPortalPagesForApplication}: ${parameters.parentPortalPageId}"> <include-form name="ListPortalPages" location="component://common/widget/PortalPageForms.xml"/> </screenlet> - <screenlet title="${uiLabelMap.CommonPortalNewPage}"> - <include-form name="NewPortalPage" location="component://common/widget/PortalPageForms.xml"/> - </screenlet> + <section> + <condition> + <and> + <not><if-empty field="portalPage"/></not> + <not><if-empty field="parameters.editAttributes"/></not> + </and> + </condition> + <actions> + <property-map resource="CommonUiLabels" map-name="uiLabelMap"/> + <set field="originalPortalPageId" from-field="parameters.originalPortalPageId"/> + <entity-one entity-name="PortalPortlet" value-field="portalPortlet"/> + </actions> + <widgets> + <screenlet title="${uiLabelMap.CommonEditPortletAttributes}: ${portalPortlet.portletName}"> + <include-form name="${portalPortlet.editFormName}" location="${portalPortlet.editFormLocation}"/> + </screenlet> + </widgets> + <fail-widgets> + <screenlet title="${uiLabelMap.CommonPortalNewPage}"> + <include-form name="NewPortalPage" location="component://common/widget/PortalPageForms.xml"/> + </screenlet> + </fail-widgets> + </section> <section> <condition> <not><if-empty field="portalPage"/></not> @@ -136,24 +156,6 @@ </screenlet> </widgets> </section> - <section> - <condition> - <and> - <not><if-empty field="portalPage"/></not> - <not><if-empty field="parameters.editAttributes"/></not> - </and> - </condition> - <actions> - <property-map resource="CommonUiLabels" map-name="uiLabelMap"/> - <set field="originalPortalPageId" from-field="parameters.originalPortalPageId"/> - <entity-one entity-name="PortalPortlet" value-field="portalPortlet"/> - </actions> - <widgets> - <screenlet title="${uiLabelMap.CommonEditPortletAttributes}: ${portalPortlet.portletName}"> - <include-form name="${portalPortlet.editFormName}" location="${portalPortlet.editFormLocation}"/> - </screenlet> - </widgets> - </section> </decorator-section> </decorator-screen> </widgets> |
Free forum by Nabble | Edit this page |