portals-jetspeed-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From woon...@apache.org
Subject svn commit: r904469 - /portals/jetspeed-2/applications/j2-admin/trunk/src/main/java/org/apache/jetspeed/portlets/spaces/PageNavigator.java
Date Fri, 29 Jan 2010 11:44:09 GMT
Author: woonsan
Date: Fri Jan 29 11:44:06 2010
New Revision: 904469

URL: http://svn.apache.org/viewvc?rev=904469&view=rev
Log:
JS2-1057: Fixing two problems: (1) page template path changed, (2) space links menu child
elements can be null in space folder navigation.

Modified:
    portals/jetspeed-2/applications/j2-admin/trunk/src/main/java/org/apache/jetspeed/portlets/spaces/PageNavigator.java

Modified: portals/jetspeed-2/applications/j2-admin/trunk/src/main/java/org/apache/jetspeed/portlets/spaces/PageNavigator.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/applications/j2-admin/trunk/src/main/java/org/apache/jetspeed/portlets/spaces/PageNavigator.java?rev=904469&r1=904468&r2=904469&view=diff
==============================================================================
--- portals/jetspeed-2/applications/j2-admin/trunk/src/main/java/org/apache/jetspeed/portlets/spaces/PageNavigator.java
(original)
+++ portals/jetspeed-2/applications/j2-admin/trunk/src/main/java/org/apache/jetspeed/portlets/spaces/PageNavigator.java
Fri Jan 29 11:44:06 2010
@@ -19,7 +19,6 @@
 import java.io.IOException;
 import java.util.ArrayList;
 import java.util.Collection;
-import java.util.LinkedList;
 import java.util.List;
 
 import javax.portlet.ActionRequest;
@@ -47,7 +46,6 @@
 import org.apache.jetspeed.portalsite.PortalSiteRequestContext;
 import org.apache.jetspeed.portlet.HeaderPhaseSupportConstants;
 import org.apache.jetspeed.request.RequestContext;
-import org.apache.jetspeed.spaces.Space;
 import org.apache.jetspeed.spaces.Spaces;
 import org.apache.portals.bridges.common.GenericServletPortlet;
 import org.apache.portals.messaging.PortletMessaging;
@@ -68,6 +66,7 @@
     public static final String DEFAULT_LINKS_MENU = "links";
     public static final String DEFAULT_SPACE_NAVS_MENU = "space-navigations";
     public static final String DEFAULT_SPACE_LINKS_MENU = "space-links";
+    public static final String DEFAULT_NEW_TEMPLATE_PAGE_PATH = "/_template/new-user/min.psml";
     
     private static Logger log = LoggerFactory.getLogger(PageNavigator.class);
     
@@ -77,6 +76,7 @@
     private BasePortalURL baseUrlAccess = null;
     private String defaultMenu = DEFAULT_SPACE_NAVS_MENU;
     private String defaultLinksMenu = DEFAULT_SPACE_LINKS_MENU;
+    private String newTemplatePagePath = DEFAULT_NEW_TEMPLATE_PAGE_PATH;
     
     protected String yuiScriptPath = "/javascript/yui/build/yui/yui-min.js";
 
@@ -111,6 +111,12 @@
         if (param != null) {
             yuiScriptPath = param;
         }
+        
+        param = config.getInitParameter("newTemplatePagePath");
+        
+        if (param != null) {
+            newTemplatePagePath = param;
+        }
     }
     
     @Override
@@ -163,7 +169,7 @@
                 {
                     String pageName = addPage.replace(' ', '_');                
                     String path = spacePath + "/" + pageName + ".psml";                 
  
-                    Page source = pageManager.getPage("/_user/template/min.psml");      
         
+                    Page source = pageManager.getPage(newTemplatePagePath);             
  
                     Page newPage = pageManager.copyPage(source, path);
                     newPage.setTitle(addPage);
                     pageManager.updatePage(newPage);                    
@@ -328,7 +334,7 @@
                 }
             }
             
-            if (spaceLinksMenu != null)
+            if (spaceLinksMenu != null && !spaceLinksMenu.isEmpty())
             {
                 for (MenuElement element : (List<MenuElement>) spaceLinksMenu.getElements())
                 {



---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-dev-unsubscribe@portals.apache.org
For additional commands, e-mail: jetspeed-dev-help@portals.apache.org


Mime
View raw message