You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by ha...@apache.org on 2009/02/15 16:36:59 UTC

svn commit: r744679 - in /ofbiz/trunk: framework/common/webcommon/WEB-INF/actions/includes/GetParentPortalPageId.groovy specialpurpose/myportal/widget/MyPortalMenus.xml

Author: hansbak
Date: Sun Feb 15 15:36:59 2009
New Revision: 744679

URL: http://svn.apache.org/viewvc?rev=744679&view=rev
Log:
small corrections on last commit

Modified:
    ofbiz/trunk/framework/common/webcommon/WEB-INF/actions/includes/GetParentPortalPageId.groovy
    ofbiz/trunk/specialpurpose/myportal/widget/MyPortalMenus.xml

Modified: ofbiz/trunk/framework/common/webcommon/WEB-INF/actions/includes/GetParentPortalPageId.groovy
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/common/webcommon/WEB-INF/actions/includes/GetParentPortalPageId.groovy?rev=744679&r1=744678&r2=744679&view=diff
==============================================================================
--- ofbiz/trunk/framework/common/webcommon/WEB-INF/actions/includes/GetParentPortalPageId.groovy (original)
+++ ofbiz/trunk/framework/common/webcommon/WEB-INF/actions/includes/GetParentPortalPageId.groovy Sun Feb 15 15:36:59 2009
@@ -22,19 +22,18 @@
 import org.ofbiz.entity.condition.*;
 
 // executes only on startup when no parameters.portalPageId is available
-if (parameters.parentPortalPageId && !parameters.portalPageId) {
+if (userLogin && parameters.parentPortalPageId && !parameters.portalPageId) {
 	// look for system page according the current securitygroup
 	//get the security group
 	userLoginSecurityGroupId = null;
 	condSec = EntityCondition.makeCondition([
 			EntityCondition.makeCondition("groupId", EntityOperator.LIKE, parameters.parentPortalPageId + "%"),
-			EntityCondition.makeCondition("userLoginId", EntityOperator.EQUALS, parameters.userLogin.userLoginId)
+			EntityCondition.makeCondition("userLoginId", EntityOperator.EQUALS, userLogin.userLoginId)
 			],EntityOperator.AND);
 	userLoginSecurityGroups = delegator.findList("UserLoginSecurityGroup", condSec, null, null, null, false);
 	if (UtilValidate.isNotEmpty(userLoginSecurityGroups)) {
 		userLoginSecurityGroupId = userLoginSecurityGroups.get(0).get("groupId");
 	}
-	Debug.log("=====security group found: " + userLoginSecurityGroupId);
 	//get the portal page
 	cond1 = EntityCondition.makeCondition([
 			EntityCondition.makeCondition("portalPageId", EntityOperator.LIKE, parameters.parentPortalPageId + "%"),
@@ -45,7 +44,6 @@
 	portalMainPages = delegator.findList("PortalPage", cond1, null, null, null, false);
 	if (portalMainPages) {
 		portalPage = portalMainPages.get(0);
-		Debug.log("=====page found: " + portalPage.portalPageId);
 		if ("_NA_".equals(portalPage.ownerUserLoginId)) {
 			context.parameters.parentPortalPageId = portalPage.portalPageId;
 		} else {

Modified: ofbiz/trunk/specialpurpose/myportal/widget/MyPortalMenus.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/myportal/widget/MyPortalMenus.xml?rev=744679&r1=744678&r2=744679&view=diff
==============================================================================
--- ofbiz/trunk/specialpurpose/myportal/widget/MyPortalMenus.xml (original)
+++ ofbiz/trunk/specialpurpose/myportal/widget/MyPortalMenus.xml Sun Feb 15 15:36:59 2009
@@ -20,7 +20,7 @@
 
 <menus xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
         xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/widget-menu.xsd">      
-    <menu name="MyPortalAppBar" title="${uiLabelMap.PageTitleMyPortal} ${partyNameView.personalTitle?if_exists} ${partyNameView.firstName?if_exists} ${partyNameView.middleName?if_exists} ${partyNameView.lastName?if_exists} ${partyNameView.groupName?if_exists}" 
+    <menu name="MyPortalAppBar" title="${uiLabelMap.PageTitleMyPortal} ${partyNameView.personalTitle} ${partyNameView.firstName} ${partyNameView.middleName} ${partyNameView.lastName} ${partyNameView.groupName}" 
         extends="CommonAppBarMenu" extends-resource="component://common/widget/CommonMenus.xml">
         <menu-item name="main" parent-portal-page-value="${parameters.parentPortalPageId}"/>
         <menu-item name="Help" title="${uiLabelMap.CommonHelp}" align-style="opposed">