From daebecd9d54ceb21e9116e3bbc98e89e14fc3c96 Mon Sep 17 00:00:00 2001 From: Hans Bakker Date: Thu, 12 Feb 2009 07:26:16 +0000 Subject: [PATCH] created a new attribute on the menu widget: portal-page. With this change the example component is now changed back to use the menu widget again however also serving the portal page buttons git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@743639 13f79535-47bb-0310-9956-ffa450edef68 --- .../actions/includes/ShowPortalPage.groovy | 3 ++ .../example/widget/example/CommonScreens.xml | 6 ++-- .../example/widget/example/ExampleMenus.xml | 5 +-- framework/widget/dtd/widget-menu.xsd | 1 + .../src/org/ofbiz/widget/menu/ModelMenu.java | 36 ++++++++++++++++--- .../org/ofbiz/widget/menu/ModelMenuItem.java | 5 +++ 6 files changed, 47 insertions(+), 9 deletions(-) diff --git a/framework/common/webcommon/WEB-INF/actions/includes/ShowPortalPage.groovy b/framework/common/webcommon/WEB-INF/actions/includes/ShowPortalPage.groovy index 261e618ffe..4eb6feda70 100644 --- a/framework/common/webcommon/WEB-INF/actions/includes/ShowPortalPage.groovy +++ b/framework/common/webcommon/WEB-INF/actions/includes/ShowPortalPage.groovy @@ -29,6 +29,9 @@ if(!portalPageId){ if (portalPageId) { portalPage = delegator.findByPrimaryKey("PortalPage", [portalPageId : portalPageId]); + if (portalPage.parentPortalPageId && !parameters.parentPortalPageId) { + parameters.parentPortalPageId = portalPage.parentPortalPageId; + } } if (!portalPage) { diff --git a/framework/example/widget/example/CommonScreens.xml b/framework/example/widget/example/CommonScreens.xml index 33ab125597..a1a6830f2e 100644 --- a/framework/example/widget/example/CommonScreens.xml +++ b/framework/example/widget/example/CommonScreens.xml @@ -40,9 +40,9 @@ under the License. - - + + +