portals-jetspeed-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From smi...@apache.org
Subject svn commit: r469307 [3/3] - in /portals/jetspeed-2/trunk: applications/gems/src/java/org/apache/portals/gems/dojo/ applications/j2-admin/src/java/org/apache/jetspeed/portlets/security/permissions/ applications/j2-admin/src/webapp/WEB-INF/ applications/...
Date Mon, 30 Oct 2006 22:35:57 GMT
Modified: portals/jetspeed-2/trunk/jetspeed-api/src/java/org/apache/jetspeed/headerresource/HeaderResource.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/trunk/jetspeed-api/src/java/org/apache/jetspeed/headerresource/HeaderResource.java?view=diff&rev=469307&r1=469306&r2=469307
==============================================================================
--- portals/jetspeed-2/trunk/jetspeed-api/src/java/org/apache/jetspeed/headerresource/HeaderResource.java (original)
+++ portals/jetspeed-2/trunk/jetspeed-api/src/java/org/apache/jetspeed/headerresource/HeaderResource.java Mon Oct 30 14:35:55 2006
@@ -25,15 +25,277 @@
  */
 public interface HeaderResource
 {
+    // header section types
+    public final static String HEADER_TYPE_SCRIPT_BLOCK_START = "script-start";
+    public final static int HEADER_TYPE_ID_SCRIPT_BLOCK_START = 1;
+    
+    public final static String HEADER_TYPE_SCRIPT_BLOCK = "script";
+    public final static int HEADER_TYPE_ID_SCRIPT_BLOCK = 2;
+    
+    public final static String HEADER_TYPE_SCRIPT_BLOCK_END = "script-end";
+    public final static int HEADER_TYPE_ID_SCRIPT_BLOCK_END = 3;
+    
+    public final static String HEADER_TYPE_SCRIPT_TAG = "script-tag";
+    public final static int HEADER_TYPE_ID_SCRIPT_TAG = 4;
+    
+    public final static String HEADER_TYPE_STYLE_BLOCK = "style";
+    public final static int HEADER_TYPE_ID_STYLE_BLOCK = 5;
+    
+    public final static String HEADER_TYPE_LINK_TAG = "link-tag";
+    public final static int HEADER_TYPE_ID_LINK_TAG = 6;
+    
+    public final static String HEADER_TYPE_BASE_TAG = "base-tag";
+    public final static int HEADER_TYPE_ID_BASE_TAG = 7;
+    
+    // header section configuration
+    public final static String HEADER_CONFIG_ORDER = "header.order";
+    public final static String HEADER_CONFIG_TYPES = "header.types";
+    public final static String HEADER_CONFIG_REQUIREDFLAG = "header.requiredflag";
+    public final static String HEADER_CONFIG_DOJO = "dojo";
+    
+    public final static String HEADER_INTERNAL_INCLUDED_NAMES = "header.internal.names";  // not a configuration entry name
+    
+    
+    // header section predefined names
+    public final static String HEADER_SECTION_BASE_TAG = "header.basetag";
+    public final static String HEADER_SECTION_NAME_PREFIX_DOJO = "header.dojo.";
+    public final static String HEADER_SECTION_DOJO_PARAMETERS = "header.dojo.parameters";
+    public final static String HEADER_SECTION_DOJO_PREINIT = "header.dojo.preinit";
+    public final static String HEADER_SECTION_DOJO_CONFIG = "header.dojo.config";
+    public final static String HEADER_SECTION_DOJO_INIT = "header.dojo.init";
+    public final static String HEADER_SECTION_DOJO_REQUIRES_CORE = "header.dojo.requires.core";
+    public final static String HEADER_SECTION_DOJO_MODULES_PATH = "header.dojo.modules.path";
+    public final static String HEADER_SECTION_DOJO_REQUIRES_MODULES = "header.dojo.requires.modules";
+    public final static String HEADER_SECTION_DOJO_WRITEINCLUDES = "header.dojo.writeincludes";
+    public final static String HEADER_SECTION_DOJO_MODULES_NAMESPACE = "header.dojo.modules.namespace";
+    public final static String HEADER_SECTION_DOJO_STYLE_BODYEXPAND = "header.dojo.style.bodyexpand";
+    public final static String HEADER_SECTION_DOJO_STYLE_BODYEXPAND_NOSCROLL = "header.dojo.style.bodyexpand.noscroll";
+    public final static String HEADER_SECTION_DESKTOP_STYLE_DESKTOPTHEME = "header.desktop.style.desktoptheme";
+    public final static String HEADER_SECTION_DESKTOP_INIT = "header.desktop.init";
+    
+    /**
+     * Output all content (that has not already been output)
+     * 
+     * @return content string for inclusion in html <head>
+     */
+    public String toString();
 
     /**
-     * Returns tags to put them into <head> tag.
+     * Output all content (that has not already been output)
+     * 
+     * @return content string for inclusion in html <head>
+     */
+    public String getContent();
+    
+    /**
+     * Output all unnamed content (that has not already been output)
+     * 
+     * @return content string for inclusion in html <head>
+     */
+    public String getUnnamedContent();
+    
+    /**
+     * Output all getHeaderSections() content (that has not already been output)
+     * 
+     * @return content string for inclusion in html <head>
+     */
+    public String getNamedContent();
+    
+    /**
+     * Output the one getHeaderSections() content entry with a key that matches headerName (if it has not already been output)
      * 
-     * @return
+     * @return content string for inclusion in html <head>
      */
-    public abstract String toString();
+    public String getNamedContent( String headerName );
+    
+    /**
+     * Output getHeaderSections() content entries with key prefixes that match headerNamePrefix (if it has not already been output)
+     * 
+     * @return content string for inclusion in html <head>
+     */
+    public String getNamedContentForPrefix( String headerNamePrefix );
+        
+    /**
+     * Add text argument to the getHeaderSections() content entry with a key that matches addToHeaderName argument
+     * 
+     */
+    public void addHeaderSectionFragment( String addToHeaderName, String text );
+    
+    /**
+     * If no previous call using value of headerFragmentName argument has been added to any getHeaderSections() content entry,
+     * add text argument to the getHeaderSections() content entry with a key that matches addToHeaderName argument
+     * 
+     */
+    public void addHeaderSectionFragment( String headerFragmentName, String addToHeaderName, String text );
+    
+    /**
+     * Indicate whether value of headerFragmentName argument has been used to add to any getHeaderSections() content entry
+     * 
+     * @return true if headerFragmentName argument has been used to add to any getHeaderSections() content entry
+     */
+    public boolean hasHeaderSectionFragment( String headerFragmentName );
+        
+    /**
+     * Indicate whether value of headerName is an included header section
+     * 
+     * @return true if headerName argument is an included header section
+     */
+    public boolean isHeaderSectionIncluded( String headerName );
 
     /**
+     * Get the type of the getHeaderSections() content entry with a key that matches headerName argument
+     * 
+     * @return type of header section
+     */
+    public String getHeaderSectionType( String headerName );
+    
+    /**
+     * Set the type of the getHeaderSections() content entry with a key that matches headerName argument
+     * to the value of the headerType argument
+     */
+    public void setHeaderSectionType( String headerName, String headerType  );
+    
+    /**
+     * Get the requiredflag of the getHeaderSections() content entry with a key that matches headerName argument
+     * 
+     * @return requiredflag for header section
+     */
+    public String getHeaderSectionRequiredFlag( String headerName );
+    
+    
+    /**
+     * Set the requiredflag of the getHeaderSections() content entry with a key that matches headerName argument
+     * to the value of the headerReqFlag argument
+     */
+    public void setHeaderSectionRequiredFlag( String headerName, String headerReqFlag );
+    
+    /**
+     * Access modifiable header configuration settings
+     * 
+     * @return Map containing modifiable header configuration settings 
+     */
+    public Map getHeaderDynamicConfiguration();
+    
+    /**
+     * Access complete header configuration settings
+     * 
+     * @return unmodifiable Map containing complete header configuration settings
+     */
+    public Map getHeaderConfiguration();
+    
+    /**
+     * Is request for /desktop rather than /portal
+     * 
+     * @return true if request is for /desktop, false if request is for /portal
+     */
+    public boolean isDesktop();
+    
+    /**
+     * Portal base url ( e.g. http://localhost:8080/jetspeed )
+     * 
+     * @return portal base url
+     */
+    public String getPortalBaseUrl();
+    
+    /**
+     * Portal base url ( e.g. http://localhost:8080/jetspeed )
+     * 
+     * @return portal base url
+     */
+    public String getPortalBaseUrl( boolean encode );
+    
+    /**
+     * Portal base url with relativePath argument appended ( e.g. http://localhost:8080/jetspeed/javascript/dojo/ )
+     * 
+     * @return portal base url with relativePath argument appended
+     */
+    public String getPortalResourceUrl( String relativePath );
+    
+    /**
+     * Portal base url with relativePath argument appended ( e.g. http://localhost:8080/jetspeed/javascript/dojo/ )
+     * 
+     * @return portal base url with relativePath argument appended
+     */
+    public String getPortalResourceUrl( String relativePath, boolean encode );
+    
+    /**
+     * Portal base servlet url ( e.g. http://localhost:8080/jetspeed/desktop/ )
+     * 
+     * @return portal base servlet url
+     */
+    public String getPortalUrl();
+    
+    /**
+     * Portal base servlet url ( e.g. http://localhost:8080/jetspeed/desktop/ )
+     * 
+     * @return portal base servlet url
+     */
+    public String getPortalUrl( boolean encode );
+    
+    /**
+     * Portal base servlet url with relativePath argument appended ( e.g. http://localhost:8080/jetspeed/desktop/default-page.psml )
+     * 
+     * @return portal base servlet url with relativePath argument appended
+     */
+    public String getPortalUrl( String relativePath );
+    
+    /**
+     * Portal base servlet url with relativePath argument appended ( e.g. http://localhost:8080/jetspeed/desktop/default-page.psml )
+     * 
+     * @return portal base servlet url with relativePath argument appended
+     */
+    public String getPortalUrl( String relativePath, boolean encode );
+    
+    
+    
+    //  dojo - special convenience methods
+    
+    /**
+     * If no previous call using value of dojoRequire argument has been added to any getHeaderSections() content entry,
+     * add text argument to getHeaderSections() content entry for dojo core require statements
+     * 
+     */
+    public void dojoAddCoreLibraryRequire( String dojoRequire );
+    
+    /**
+     * Split dojoRequires argument using ';' delimiter and for each resulting dojoRequire value, if no previous call
+     * using dojoRequire value has been added to any getHeaderSections() content entry,
+     * add text argument to getHeaderSections() content entry for dojo core require statements
+     * 
+     */
+    public void dojoAddCoreLibraryRequires( String dojoRequires );
+    
+    /**
+     * If no previous call using value of dojoRequire argument has been added to any getHeaderSections() content entry,
+     * add text argument to getHeaderSections() content entry for dojo library module require statements
+     * 
+     */
+    public void dojoAddModuleLibraryRequire( String dojoRequire );
+    
+    /**
+     * Split dojoRequires argument using ';' delimiter and for each resulting dojoRequire value, if no previous call
+     * using dojoRequire value has been added to any getHeaderSections() content entry,
+     * add text argument to getHeaderSections() content entry for dojo library module require statements
+     * 
+     */
+    public void dojoAddModuleLibraryRequires( String dojoRequires );
+    
+    /**
+     * Assure that header section name for dojo body expand style is included
+     * 
+     */
+    public void dojoAddBodyExpandStyle( boolean omitWindowScrollbars );
+    
+    /**
+     * Enable dojo by setting appropriate modifiable header configuration setting
+     * 
+     */
+    public void dojoEnable();
+    
+    
+    
+    
+    /**
      * Add tag information to this instance.
      * 
      * For example, if you want to add the following tag into <head>,
@@ -51,7 +313,7 @@
      * @param attributes Tag's attributes
      * @param text Tag's content
      */
-    public abstract void addHeaderInfo(String elementName, Map attributes, String text);
+    public void addHeaderInfo(String elementName, Map attributes, String text);
 
     /**
      * Convenient method to add <script> tag with defer option.
@@ -59,20 +321,19 @@
      * @param path Javascript file path
      * @param defer defer attributes for <script> tag.
      */
-    public abstract void addJavaScript(String path, boolean defer);
+    public void addJavaScript(String path, boolean defer);
 
     /**
      * Convenient method to add <script> tag.
      * 
      * @param path Javascript file path
      */
-    public abstract void addJavaScript(String path);
+    public void addJavaScript(String path);
 
     /**
      * Convenient method to add <link> tag.
      * 
      * @param path CSS file path
      */
-    public abstract void addStyleSheet(String path);
-
+    public void addStyleSheet(String path);
 }

Modified: portals/jetspeed-2/trunk/jetspeed-api/src/java/org/apache/jetspeed/headerresource/HeaderResourceFactory.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/trunk/jetspeed-api/src/java/org/apache/jetspeed/headerresource/HeaderResourceFactory.java?view=diff&rev=469307&r1=469306&r2=469307
==============================================================================
--- portals/jetspeed-2/trunk/jetspeed-api/src/java/org/apache/jetspeed/headerresource/HeaderResourceFactory.java (original)
+++ portals/jetspeed-2/trunk/jetspeed-api/src/java/org/apache/jetspeed/headerresource/HeaderResourceFactory.java Mon Oct 30 14:35:55 2006
@@ -15,8 +15,11 @@
  */
 package org.apache.jetspeed.headerresource;
 
+import java.util.Map;
+
 import javax.portlet.PortletRequest;
 
+import org.apache.jetspeed.container.url.BasePortalURL;
 import org.apache.jetspeed.request.RequestContext;
 
 /**
@@ -40,6 +43,14 @@
      * @return
      */
     public abstract HeaderResource getHeaderResouce(RequestContext requestContext);
+    
+    /**
+     * Provides HeaderResource instance from RequestContext.
+     * 
+     * @param requestContext
+     * @return
+     */
+    public abstract HeaderResource getHeaderResource( RequestContext requestContext, BasePortalURL baseUrlAccess, boolean isDesktop, Map headerConfiguration );
 
     /**
      * Provides HeaderResource instance from PortletRequest.

Added: portals/jetspeed-2/trunk/jetspeed-api/src/java/org/apache/jetspeed/headerresource/HeaderResourceLib.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/trunk/jetspeed-api/src/java/org/apache/jetspeed/headerresource/HeaderResourceLib.java?view=auto&rev=469307
==============================================================================
--- portals/jetspeed-2/trunk/jetspeed-api/src/java/org/apache/jetspeed/headerresource/HeaderResourceLib.java (added)
+++ portals/jetspeed-2/trunk/jetspeed-api/src/java/org/apache/jetspeed/headerresource/HeaderResourceLib.java Mon Oct 30 14:35:55 2006
@@ -0,0 +1,237 @@
+/*
+ * Copyright 2000-2004 The Apache Software Foundation.
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.jetspeed.headerresource;
+
+import javax.servlet.http.HttpServletRequest;
+
+import org.apache.jetspeed.container.url.BasePortalURL;
+import org.apache.jetspeed.request.RequestContext;
+
+/**
+ * HeaderResourceLib static utility methods
+ * 
+ * @author <a href="mailto:smilek@apache.org">Steve Milek</a>
+ * @version $Id: HeaderResourceLib.java 188569 2006-10-21 13:35:18Z smilek $
+ */
+public class HeaderResourceLib
+{
+    public static int getHeaderTypeId( String headerType )
+    {
+        int headerTypeNumber = -1;
+        if ( headerType != null )
+        {
+            if ( headerType.equals( HeaderResource.HEADER_TYPE_SCRIPT_BLOCK ) )
+            {
+                headerTypeNumber = HeaderResource.HEADER_TYPE_ID_SCRIPT_BLOCK;
+            }
+            else if ( headerType.equals( HeaderResource.HEADER_TYPE_SCRIPT_BLOCK_START ) )
+            {
+                headerTypeNumber = HeaderResource.HEADER_TYPE_ID_SCRIPT_BLOCK_START;
+            }
+            else if ( headerType.equals( HeaderResource.HEADER_TYPE_SCRIPT_TAG ) )
+            {
+                headerTypeNumber = HeaderResource.HEADER_TYPE_ID_SCRIPT_TAG;
+            }
+            else if ( headerType.equals( HeaderResource.HEADER_TYPE_SCRIPT_BLOCK_END ) )
+            {
+                headerTypeNumber = HeaderResource.HEADER_TYPE_ID_SCRIPT_BLOCK_END;
+            }
+            else if ( headerType.equals( HeaderResource.HEADER_TYPE_STYLE_BLOCK ) )
+            {
+                headerTypeNumber = HeaderResource.HEADER_TYPE_ID_STYLE_BLOCK;
+            }
+            else if ( headerType.equals( HeaderResource.HEADER_TYPE_LINK_TAG ) )
+            {
+                headerTypeNumber = HeaderResource.HEADER_TYPE_ID_LINK_TAG;
+            }
+            else if ( headerType.equals( HeaderResource.HEADER_TYPE_BASE_TAG ) )
+            {
+                headerTypeNumber = HeaderResource.HEADER_TYPE_ID_BASE_TAG;
+            }
+        }
+        return headerTypeNumber;
+    }
+    
+    public static String getHeaderType( Integer headerTypeId )
+    {
+        String headerType = null;
+        if ( headerTypeId != null )
+        {
+            int typeid = headerTypeId.intValue();
+            if ( typeid == HeaderResource.HEADER_TYPE_ID_SCRIPT_BLOCK )
+            {
+                headerType = HeaderResource.HEADER_TYPE_SCRIPT_BLOCK;
+            }
+            else if ( typeid == HeaderResource.HEADER_TYPE_ID_SCRIPT_BLOCK_START )
+            {
+                headerType = HeaderResource.HEADER_TYPE_SCRIPT_BLOCK_START ;
+            }
+            else if ( typeid == HeaderResource.HEADER_TYPE_ID_SCRIPT_TAG )
+            {
+                headerType = HeaderResource.HEADER_TYPE_SCRIPT_TAG;
+            }
+            else if ( typeid == HeaderResource.HEADER_TYPE_ID_SCRIPT_BLOCK_END )
+            {
+                headerType = HeaderResource.HEADER_TYPE_SCRIPT_BLOCK_END;
+            }
+            else if ( typeid == HeaderResource.HEADER_TYPE_ID_STYLE_BLOCK )
+            {
+                headerType = HeaderResource.HEADER_TYPE_STYLE_BLOCK;
+            }
+            else if ( typeid == HeaderResource.HEADER_TYPE_ID_LINK_TAG )
+            {
+                headerType = HeaderResource.HEADER_TYPE_LINK_TAG;
+            }
+            else if ( typeid == HeaderResource.HEADER_TYPE_ID_BASE_TAG )
+            {
+                headerType = HeaderResource.HEADER_TYPE_BASE_TAG;
+            }
+        }
+        return headerType;
+    }
+    
+    // get portal urls - these are here as an attempt to reduce as much code duplication as possible
+    //                 - some of the methods are constructed oddly due to their dual goal of reducing
+    //                   duplication while allowing for caller caching
+    
+    /**
+     * Portal base url ( e.g. http://localhost:8080/jetspeed )
+     * 
+     * @return portal base url
+     */
+    public static String getPortalBaseUrl( RequestContext requestContext )
+    {
+        return getPortalBaseUrl( requestContext, null );
+    }
+    
+    /**
+     * Portal base url ( e.g. http://localhost:8080/jetspeed )
+     * 
+     * The optional BasePortalURL argument is provided to allow the common BasePortalURL usage by various jetspeed components 
+     * to be properly supported in this url generation
+     * 
+     * @return portal base url
+     */
+    public static String getPortalBaseUrl( RequestContext requestContext, BasePortalURL baseUrlAccessOverride )
+    {
+        HttpServletRequest request = requestContext.getRequest();
+        StringBuffer baseurl = new StringBuffer();
+        if ( baseUrlAccessOverride == null )
+        {
+            baseurl.append( request.getScheme() ).append( "://" ).append( request.getServerName() ).append( ":" ).append( request.getServerPort() ).append( request.getContextPath() );
+        }
+        else
+        {
+            baseurl.append( baseUrlAccessOverride.getServerScheme() ).append( "://" ).append( baseUrlAccessOverride.getServerName() ).append( ":" ).append( baseUrlAccessOverride.getServerPort() ).append( request.getContextPath() );
+        }
+        return baseurl.toString();
+    }
+    
+    /**
+     * Portal base servlet url ( e.g. http://localhost:8080/jetspeed/desktop/ )
+     * Expects portalBaseUrl argument to be defined (ie. it does not call getPortalBaseUrl)
+     * 
+     * @return portal base servlet url
+     */
+    public static String getPortalUrl( String portalBaseUrl, RequestContext requestContext )
+    {
+        HttpServletRequest request = requestContext.getRequest();
+        StringBuffer portalurl = new StringBuffer();
+        return portalurl.append( portalBaseUrl ).append( request.getServletPath() ).toString();
+    }
+    
+    /**
+     * Portal base servlet url with relativePath argument appended ( e.g. http://localhost:8080/jetspeed/desktop/default-page.psml )
+     * Expects portalUrl argument to be defined (ie. it does not call getPortalUrl)
+     * 
+     * @return portal base servlet url with relativePath argument appended
+     */
+    public static String getPortalUrl( String relativePath, String portalUrl )
+    {
+        return getPortalUrl( relativePath, portalUrl, false, null );
+    }
+    
+    /**
+     * Portal base servlet url with relativePath argument appended ( e.g. http://localhost:8080/jetspeed/desktop/default-page.psml )
+     * Expects portalUrl argument to be defined (ie. it does not call getPortalUrl)
+     * RequestContext argument is needed only when encode argument is true (it's needed to call HttpServletResponse.encodeURL())
+     * 
+     * Method signature/behavior is a bit strange because this is a static method trying to accomodate
+     * callers that lazy cache portalUrl string
+     * 
+     * @return portal base servlet url with relativePath argument appended
+     */
+    public static String getPortalUrl( String relativePath, String portalUrl, boolean encode, RequestContext requestContext )
+    {
+        if ( relativePath == null )
+            relativePath = "";
+        if ( relativePath.indexOf( "://" ) == -1 && relativePath.indexOf( "mailto:" ) == -1 )
+        {
+            StringBuffer path = new StringBuffer();
+            String portalurl = path.append( portalUrl ).append( relativePath ).toString();
+            if ( encode && requestContext != null )
+            {
+                return requestContext.getResponse().encodeURL( portalurl );
+            }
+            else
+            {
+                return portalurl;
+            }
+        }
+        return relativePath;
+    }
+    
+    /**
+     * Portal base url with relativePath argument appended ( e.g. http://localhost:8080/jetspeed/javascript/dojo/ )
+     * Expects portalBaseUrl argument to be defined (ie. it does not call getPortalBaseUrl)
+     * 
+     * @return portal base url with relativePath argument appended
+     */
+    public static String getPortalResourceUrl( String relativePath, String portalBaseUrl )
+    {
+        return getPortalResourceUrl( relativePath, portalBaseUrl, false, null );
+    }
+    
+    /**
+     * Portal base url with relativePath argument appended ( e.g. http://localhost:8080/jetspeed/javascript/dojo/ )
+     * Expects portalBaseUrl argument to be defined (ie. it does not call getPortalBaseUrl)
+     * RequestContext argument is needed only when encode argument is true (it's needed to call HttpServletResponse.encodeURL())
+     * 
+     * Method signature/behavior is a bit strange because this is a static method trying to accomodate
+     * callers that lazy cache portalBaseUrl string
+     * 
+     * @return portal base url with relativePath argument appended
+     */
+    public static String getPortalResourceUrl( String relativePath, String portalBaseUrl, boolean encode, RequestContext requestContext )
+    {
+        if ( relativePath == null )
+            relativePath = "";
+        if ( relativePath.indexOf( "://" ) == -1 && relativePath.indexOf( "mailto:" ) == -1 )
+        {
+            StringBuffer path = new StringBuffer();
+            String resourceurl = path.append( portalBaseUrl ).append( relativePath ).toString();
+            if ( encode && requestContext != null )
+            {
+                return requestContext.getResponse().encodeURL( resourceurl );
+            }
+            else
+            {
+                return resourceurl;
+            }
+        }
+        return relativePath;
+    }
+}
\ No newline at end of file

Modified: portals/jetspeed-2/trunk/jetspeed-api/src/java/org/apache/jetspeed/portlet/PortletHeaderRequest.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/trunk/jetspeed-api/src/java/org/apache/jetspeed/portlet/PortletHeaderRequest.java?view=diff&rev=469307&r1=469306&r2=469307
==============================================================================
--- portals/jetspeed-2/trunk/jetspeed-api/src/java/org/apache/jetspeed/portlet/PortletHeaderRequest.java (original)
+++ portals/jetspeed-2/trunk/jetspeed-api/src/java/org/apache/jetspeed/portlet/PortletHeaderRequest.java Mon Oct 30 14:35:55 2006
@@ -38,9 +38,7 @@
     PortletPreferences getPreferences();
     
     /**
-     * Determine if its a /desktop encoder
-     * @return true if its a /desktop encoder, false if /portal encoder
+     * Get the init parameter by name
      */
-    boolean isDesktopEncoder();
-    
+    String getInitParameter( String name );
 }

Modified: portals/jetspeed-2/trunk/jetspeed-api/src/java/org/apache/jetspeed/portlet/PortletHeaderResponse.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/trunk/jetspeed-api/src/java/org/apache/jetspeed/portlet/PortletHeaderResponse.java?view=diff&rev=469307&r1=469306&r2=469307
==============================================================================
--- portals/jetspeed-2/trunk/jetspeed-api/src/java/org/apache/jetspeed/portlet/PortletHeaderResponse.java (original)
+++ portals/jetspeed-2/trunk/jetspeed-api/src/java/org/apache/jetspeed/portlet/PortletHeaderResponse.java Mon Oct 30 14:35:55 2006
@@ -15,7 +15,7 @@
  */
 package org.apache.jetspeed.portlet;
 
-import java.io.Writer;
+import java.util.Map;
 
 import javax.portlet.PortletException;
 
@@ -26,16 +26,40 @@
 {    
     /**
      * Retrieves the header resource for this request
+     * 
      * @return a per request HeaderResource
      */
     HeaderResource getHeaderResource();
     
     /**
+     * Is request for /desktop rather than /portal
+     * 
+     * @return true if request is for /desktop, false if request is for /portal
+     */
+    boolean isDesktop();
+    
+    
+    /**
+     * Configuration data for use by HeaderResource
+     * 
+     * @return an immutable Map
+     */
+    Map getHeaderConfiguration();
+    
+    /**
+     * Map containing overrides of content for header statements
+     * 
+     * @return an immutable Map
+     */
+    Map getHeaderResourceRegistry();
+    
+    /**
      * Temporary solution: get the content after calling include
      * this will be deprecated
      * 
      */
     String getContent();
+
     
     /**
      * Dispatch to a servlet or resource to generate and include the header content

Modified: portals/jetspeed-2/trunk/src/webapp/WEB-INF/assembly/aggregation.xml
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/trunk/src/webapp/WEB-INF/assembly/aggregation.xml?view=diff&rev=469307&r1=469306&r2=469307
==============================================================================
--- portals/jetspeed-2/trunk/src/webapp/WEB-INF/assembly/aggregation.xml (original)
+++ portals/jetspeed-2/trunk/src/webapp/WEB-INF/assembly/aggregation.xml Mon Oct 30 14:35:55 2006
@@ -109,16 +109,45 @@
           
     </bean>
 
-    <bean id="org.apache.jetspeed.aggregator.HeaderAggregator" class="org.apache.jetspeed.aggregator.impl.HeaderAggregatorImpl">
+    <bean id="HeaderAggregatorPortal" class="org.apache.jetspeed.aggregator.impl.HeaderAggregatorImpl">
         <constructor-arg index="0">
             <ref bean="portletFactory" />
         </constructor-arg>
-        <constructor-arg index='1'>
+        <constructor-arg index="1">
             <ref bean="PortletWindowAccessor"/>
         </constructor-arg>
         <constructor-arg index="2">
             <ref bean="org.apache.jetspeed.headerresource.HeaderResourceFactory" />
-        </constructor-arg>                  
+        </constructor-arg>
+        <constructor-arg index="3" type="boolean">
+            <value>false</value>   <!-- isDesktop == false -->
+        </constructor-arg>
+        <constructor-arg index="4">
+            <ref bean="HeaderResourceConfigurationPortal"/>
+        </constructor-arg>
+        <constructor-arg index="5">
+            <ref bean="HeaderResourceRegistry"/>
+        </constructor-arg>
+    </bean>
+           
+    <bean id="HeaderAggregatorDesktop" class="org.apache.jetspeed.aggregator.impl.HeaderAggregatorImpl">
+        <constructor-arg index="0">
+            <ref bean="portletFactory" />
+        </constructor-arg>
+        <constructor-arg index="1">
+            <ref bean="PortletWindowAccessor"/>
+        </constructor-arg>
+        <constructor-arg index="2">
+            <ref bean="org.apache.jetspeed.headerresource.HeaderResourceFactory" />
+        </constructor-arg>
+        <constructor-arg index="3" type="boolean">
+            <value>true</value>   <!-- isDesktop == true -->
+        </constructor-arg>
+        <constructor-arg index="4">
+            <ref bean="HeaderResourceConfigurationDesktop"/>
+        </constructor-arg>
+        <constructor-arg index="5">
+            <ref bean="HeaderResourceRegistry"/>
+        </constructor-arg>
     </bean>
-            
 </beans>

Modified: portals/jetspeed-2/trunk/src/webapp/WEB-INF/assembly/desktop.xml
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/trunk/src/webapp/WEB-INF/assembly/desktop.xml?view=diff&rev=469307&r1=469306&r2=469307
==============================================================================
--- portals/jetspeed-2/trunk/src/webapp/WEB-INF/assembly/desktop.xml (original)
+++ portals/jetspeed-2/trunk/src/webapp/WEB-INF/assembly/desktop.xml Mon Oct 30 14:35:55 2006
@@ -31,12 +31,15 @@
         <!-- Default Theme  (if not specified in page) -->
         <constructor-arg index="1">
             <value>blue</value>
-        </constructor-arg>       
-        <!-- Default Theme file extension --> 
+        </constructor-arg>
+        <!-- Default Theme file extension -->
         <constructor-arg index="2">
             <value>.jsp</value>
-        </constructor-arg>        
+        </constructor-arg>
+        <constructor-arg index="3">
+            <ref bean="org.apache.jetspeed.headerresource.HeaderResourceFactory" />
+        </constructor-arg>
  	    <!-- Uncomment this to HARD CODE your portal URL -->
-        <!-- <constructor-arg><ref bean="BasePortalURL"/></constructor-arg>  -->        
+        <!-- <constructor-arg><ref bean="BasePortalURL"/></constructor-arg>  -->
      </bean>    
 </beans>

Added: portals/jetspeed-2/trunk/src/webapp/WEB-INF/assembly/headtag.xml
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/trunk/src/webapp/WEB-INF/assembly/headtag.xml?view=auto&rev=469307
==============================================================================
--- portals/jetspeed-2/trunk/src/webapp/WEB-INF/assembly/headtag.xml (added)
+++ portals/jetspeed-2/trunk/src/webapp/WEB-INF/assembly/headtag.xml Mon Oct 30 14:35:55 2006
@@ -0,0 +1,318 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd">
+<!--
+    Copyright 2004 The Apache Software Foundation
+    
+    Licensed under the Apache License, Version 2.0 (the "License");
+    you may not use this file except in compliance with the License.
+    You may obtain a copy of the License at
+    
+    http://www.apache.org/licenses/LICENSE-2.0
+    
+    Unless required by applicable law or agreed to in writing, software
+    distributed under the License is distributed on an "AS IS" BASIS,
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+    See the License for the specific language governing permissions and
+    limitations under the License.
+-->
+<beans>
+    <!--  header (html <head>) configuration  -->
+
+    <!--  *****  -->
+    <!--  /desktop header configuration  -->
+    <!--  *****  -->
+    <bean id="HeaderResourceConfigurationDesktop" class="java.util.HashMap">
+        <constructor-arg index="0">
+            <map>
+                <entry key="dojo">
+                    <ref bean="DojoConfigurationDesktop" />
+                </entry>
+                <entry key="header.order">
+                    <list>
+                        <value>header.dojo.parameters</value>            <!-- djConfig definition -->
+                        <value>header.dojo.preinit</value>               <!-- generated djConfig.baseScriptUri definition -->
+                        <value>header.dojo.config</value>                <!-- for adding statements prior to dojo.js load -->
+                        <value>header.dojo.init</value>                  <!-- <script src=".../dojo.js"> -->
+                        <value>header.dojo.requires.core</value>         <!-- dojo.require statements for dojo core modules -->
+                        <value>header.dojo.modules.path</value>           <!-- dojo.hostenv.setModulePrefix statements    dojo.registerModulePath   -->   
+                        <value>header.dojo.requires.modules</value>      <!-- dojo.require statements for dojo add-on modules -->
+                        <value>header.dojo.writeincludes</value>         <!-- generated dojo.hostenv.writeIncludes() statement -->
+                        <value>header.dojo.modules.namespace</value>      <!-- dojo.widget.manager.registerWidgetPackage statements    dojo.registerNamespace  -->
+                        <value>header.dojo.style.bodyexpand</value>      <!-- css for body 100% height/width (for some dojo widgets) -->
+                        <value>header.basetag</value>                    <!-- generated <base href=".../jetspeed/"> -->
+                        <value>header.desktop.style.desktoptheme</value> <!-- generated <link href=".../styles.css"> for desktop-theme -->
+                        <value>header.desktop.init</value>               <!-- generated desktop startup javascript -->
+                    </list>
+                </entry>
+                <entry key="header.types">
+                    <ref bean="HeaderTypes" />
+                </entry>
+            </map>
+        </constructor-arg>
+    </bean>
+
+    <bean id="DojoConfigurationDesktop" class="java.util.HashMap">
+        <constructor-arg index="0">
+            <map>
+                <entry key="dojo.enable">
+                    <!-- dojo headers only included if dojo.enable is true -->
+                    <value>true</value>
+                </entry>
+                <entry key="dojo.path">
+                    <!-- path to dojo root from portal context path -->
+                    <!-- used in constructing <script src=".../dojo.js"> and djConfig.baseScriptUri -->
+                    <value>/javascript/dojo/</value>  
+                </entry>
+                <entry key="dojo.parameter.isDebug">
+                    <!-- value for djConfig variable isDebug -->
+                    <value>true</value>
+                </entry>
+                <entry key="dojo.parameter.debugAtAllCosts">
+                    <!-- value for djConfig variable debugAtAllCosts -->
+                    <value>true</value>
+                </entry>
+                <entry key="dojo.parameters">
+                    <!-- additional djConfig variables expressed as a json object fragment: -->
+                    <!--    key: value[, key: value]*     -->
+                    <!-- if an entry "dojo.parameters" is defined in HeaderResourceRegistry, its value replaces value -->
+                    <!--    built from the value here as well as dojo.parameter.isDebug and dojo.parameter.debugAtAllCosts -->
+                    <!-- template: var djConfig = { ${value} }; -->
+                    <!-- header section: header.dojo.parameters -->
+                    <value></value>
+                </entry>
+                <entry key="dojo.requires.core">
+                    <!-- list of dojo core modules -->
+                    <!-- template: dojo.require( "${value}" ); -->
+                    <!-- header section: header.dojo.requires.core -->
+                    <ref bean="DojoRequiresDesktop" />
+                </entry>
+                <entry key="dojo.modules">
+                    <!-- list of statements intended to be dojo.hostenv.setModulePrefix calls -->
+                    <!-- template: none -->
+                    <!-- values can reference entries in HeaderResourceRegistry -->
+                    <!-- header section: header.dojo.modules -->
+                    <list>
+                        <value>dojo.module.jetspeed.ui.widget</value>
+                        <value>dojo.module.jetspeed.desktop</value>
+                    </list>
+                </entry>
+                <entry key="dojo.requires.modules">
+                    <!-- list of dojo add-on modules -->
+                    <!-- template: dojo.require( "${value}" ); -->
+                    <!-- header section: header.dojo.requires.modules -->
+                    <ref bean="DojoRequiresModulesDesktop" />
+                </entry>
+                <entry key="dojo.modules.widget">
+                    <!-- list of statements intended to be dojo.widget.manager.registerWidgetPackage calls -->
+                    <!-- template: none -->
+                    <!-- values can reference entries in HeaderResourceRegistry -->
+                    <!-- header section: header.dojo.modules.widget -->
+                    <list>
+                        <value>dojo.module.widget.jetspeed.ui.widget</value>
+                    </list>
+                </entry>
+            </map>
+        </constructor-arg>
+    </bean>
+
+    <bean id="DojoRequiresDesktop" class="java.util.ArrayList">
+        <constructor-arg index="0">
+            <list>
+                <value>dojo.lang.*</value>
+                <value>dojo.event.*</value>
+                <value>dojo.io.*</value>
+                <value>dojo.widget.*</value>
+                <value>dojo.collections.ArrayList</value>
+                <value>dojo.collections.Set</value>
+                <value>dojo.widget.TaskBar</value>
+                <value>dojo.widget.FloatingPane</value>
+                <value>dojo.widget.TabContainer</value>
+                <value>dojo.widget.AccordionPane</value>
+                <value>dojo.widget.Menu2</value>
+                <value>dojo.widget.Checkbox</value>
+                <value>dojo.widget.Dialog</value>
+                <value>dojo.widget.Button</value>
+                <value>dojo.widget.LayoutContainer</value>
+                <value>dojo.widget.ContentPane</value>
+                <value>dojo.widget.LinkPane</value>
+                <value>dojo.widget.SplitContainer</value>
+                <value>dojo.widget.Tree</value>
+                <value>dojo.lfx.html</value>
+                <value>dojo.dnd.HtmlDragMove</value>
+                <value>dojo.dnd.HtmlDragSource</value>
+            </list>
+        </constructor-arg>
+    </bean>
+
+    <bean id="DojoRequiresModulesDesktop" class="java.util.ArrayList">
+        <constructor-arg index="0">
+            <list>
+                <value>jetspeed.desktop.core</value>
+                <value>jetspeed.ui.widget.PortalTaskBar</value>
+                <value>jetspeed.ui.widget.PortletWindow</value>
+                <value>jetspeed.ui.widget.PortalTabContainer</value>
+                <value>jetspeed.ui.widget.PortalAccordionContainer</value>
+                <value>jetspeed.ui.widget.PortletDefContainer</value>
+            </list>
+        </constructor-arg>
+    </bean>
+
+
+    <!--  *****  -->
+    <!--  /portal header configuration  -->
+    <!--  *****  -->
+    <bean id="HeaderResourceConfigurationPortal" class="java.util.HashMap">
+        <constructor-arg index="0">
+            <map>
+                <entry key="dojo">
+                    <ref bean="DojoConfigurationPortal" />
+                </entry>
+                <entry key="header.order">
+                    <list>  <!-- note: these are only included if dojo.enable is set to true (below or at runtime) -->
+                        <value>header.dojo.parameters</value>            <!-- djConfig definition -->
+                        <value>header.dojo.preinit</value>               <!-- generated djConfig.baseScriptUri definition -->
+                        <value>header.dojo.config</value>                <!-- for adding statements prior to dojo.js load -->
+                        <value>header.dojo.init</value>                  <!-- <script src=".../dojo.js"> -->
+                        <value>header.dojo.requires.core</value>         <!-- dojo.require statements for dojo core modules -->
+                        <value>header.dojo.modules.path</value>           <!-- dojo.hostenv.setModulePrefix statements -->
+                        <value>header.dojo.requires.modules</value>      <!-- dojo.require statements for dojo add-on modules -->
+                        <value>header.dojo.writeincludes</value>         <!-- generated dojo.hostenv.writeIncludes() statement -->
+                        <value>header.dojo.modules.namespace</value>      <!-- dojo.widget.manager.registerWidgetPackage statements -->
+                        <value>header.dojo.style.bodyexpand</value>      <!-- css for body 100% height/width (for some dojo widgets) -->
+                    </list>
+                </entry>
+                <entry key="header.types">
+                    <ref bean="HeaderTypes" />
+                </entry>
+            </map>
+        </constructor-arg>
+    </bean>
+    <bean id="DojoConfigurationPortal" class="java.util.HashMap">
+        <constructor-arg index="0">
+            <map>
+                <entry key="dojo.enable">
+                    <!-- dojo headers only included if dojo.enable is true; leaving it up to one or more portlets to set this -->
+                    <value>false</value>
+                </entry>
+                <entry key="dojo.path">
+                    <!-- path to dojo root from portal context path -->
+                    <!-- used in constructing <script src=".../dojo.js"> and djConfig.baseScriptUri -->
+                    <value>/javascript/dojo/</value>
+                </entry>
+                <entry key="dojo.parameter.isDebug">
+                    <!-- value for djConfig variable isDebug -->
+                    <value>true</value>
+                </entry>
+                <entry key="dojo.parameter.debugAtAllCosts">
+                    <!-- value for djConfig variable debugAtAllCosts -->
+                    <value>true</value>
+                </entry>
+                <entry key="dojo.parameters">
+                    <!-- additional djConfig variables expressed as a json object fragment: -->
+                    <!--    key: value[, key: value]*     -->
+                    <!-- if an entry "dojo.parameters" is defined in HeaderResourceRegistry, its value replaces value -->
+                    <!--    built from the value here as well as dojo.parameter.isDebug and dojo.parameter.debugAtAllCosts -->
+                    <!-- template: var djConfig = { ${value} }; -->
+                    <!-- header section: header.dojo.parameters -->
+                    <value></value>
+                </entry>
+                <entry key="dojo.requires.core">
+                    <!-- list of dojo core modules -->
+                    <!-- template: dojo.require( "${value}" ); -->
+                    <!-- header section: header.dojo.requires.core -->
+                    <list>
+                        <value>dojo.lang.*</value>
+                        <value>dojo.event.*</value>
+                        <value>dojo.io.*</value>
+                        <value>dojo.widget.*</value>
+                    </list>
+                </entry>
+                <entry key="dojo.modules">
+                    <!-- list of statements intended to be dojo.hostenv.setModulePrefix calls -->
+                    <!-- template: none -->
+                    <!-- values can reference entries in HeaderResourceRegistry -->
+                    <!-- header section: header.dojo.modules -->
+                    <list>
+                        <value>dojo.module.jetspeed.ui.widget</value>
+                        <value>dojo.module.jetspeed.desktop</value>
+                    </list>
+                </entry>
+                <entry key="dojo.requires.modules">
+                    <!-- list of dojo add-on modules -->
+                    <!-- template: dojo.require( "${value}" ); -->
+                    <!-- header section: header.dojo.requires.modules -->
+                    <list>
+                        <value>jetspeed.desktop.compatibility</value>
+                    </list>
+                </entry>
+                <entry key="dojo.modules.widget">
+                    <!-- list of statements intended to be dojo.widget.manager.registerWidgetPackage calls -->
+                    <!-- template: none -->
+                    <!-- values can reference entries in HeaderResourceRegistry -->
+                    <!-- header section: header.dojo.modules.widget -->
+                    <list>
+                        <value>dojo.module.widget.jetspeed.ui.widget</value>
+                    </list>
+                </entry>
+            </map>
+        </constructor-arg>
+    </bean>
+
+
+    <!--  *****  -->
+    <!--  shared /portal and /desktop header configuration  -->
+    <!--  *****  -->
+    <bean id="HeaderResourceRegistry" class="java.util.HashMap">
+        <constructor-arg index="0">
+            <map>
+                <!-- override of content for header fragments added with specified key -->
+                <!-- also acts as way to refer to a shared value within these header configuration settings -->
+                <!-- also, when generating final content, if a header section is included in header.order -->
+                <!--    and it has empty content, then an entry here matching the header section name will -->
+                <!--    be used for content -->
+                <entry key="dojo.module.jetspeed.ui.widget">
+                    <value>dojo.hostenv.setModulePrefix('jetspeed.ui.widget', '../desktop/widget');</value>
+                </entry>
+                <entry key="dojo.module.jetspeed.desktop">
+                    <value>dojo.hostenv.setModulePrefix('jetspeed.desktop', '../desktop/core');</value>
+                </entry>
+                <entry key="dojo.module.widget.jetspeed.ui.widget">
+                    <value>dojo.widget.manager.registerWidgetPackage('jetspeed.ui.widget');</value>
+                </entry>
+                <entry key="header.dojo.style.bodyexpand">   <!-- dojo.style.bodyexpand.noscroll -->
+                    <!-- make the body expand to fill the visible window -->
+                    <value>html, body { width: 100%; height: 100%; padding: 0 0 0 0; margin: 0 0 0 0; }</value>
+                </entry>
+                <entry key="header.dojo.style.bodyexpand.noscroll">   <!-- dojo.style.bodyexpand.noscroll -->
+                    <!-- make the body expand to fill the visible window - erase window level scrollbars -->
+                    <value>html, body { width: 100%; height: 100%; overflow: hidden; padding: 0 0 0 0; margin: 0 0 0 0; }</value>
+                </entry>
+            </map>
+        </constructor-arg>
+    </bean>
+
+    <!-- this example HeaderTypes definition can be removed -->
+    <!--    types for all predefined header section names are set automatically -->
+    <!-- supported header types: 
+            script-start
+            script
+            script-end
+            script-tag
+            style
+            link-tag
+            base-tag
+    -->
+    <bean id="HeaderTypes" class="java.util.HashMap">
+        <constructor-arg index="0">
+            <map>
+                <entry key="header.dojo.style.bodyexpand">
+                    <value>style</value>
+                </entry>
+                <entry key="header.dojo.style.bodyexpand.noscroll">
+                    <value>style</value>
+                </entry>
+            </map>
+        </constructor-arg>
+    </bean>
+
+</beans>

Modified: portals/jetspeed-2/trunk/src/webapp/WEB-INF/assembly/pipelines.xml
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/trunk/src/webapp/WEB-INF/assembly/pipelines.xml?view=diff&rev=469307&r1=469306&r2=469307
==============================================================================
--- portals/jetspeed-2/trunk/src/webapp/WEB-INF/assembly/pipelines.xml (original)
+++ portals/jetspeed-2/trunk/src/webapp/WEB-INF/assembly/pipelines.xml Mon Oct 30 14:35:55 2006
@@ -179,12 +179,21 @@
    </constructor-arg>
   </bean> 
 
-  <bean id="headerAggregatorValve"
+  <bean id="headerAggregatorValvePortal"
         class="org.apache.jetspeed.aggregator.HeaderAggregatorValve"
         init-method="initialize"
   >
    <constructor-arg>
-       <ref bean="org.apache.jetspeed.aggregator.HeaderAggregator"/>
+       <ref bean="HeaderAggregatorPortal"/>
+   </constructor-arg>
+  </bean> 
+
+  <bean id="headerAggregatorValveDesktop"
+        class="org.apache.jetspeed.aggregator.HeaderAggregatorValve"
+        init-method="initialize"
+  >
+   <constructor-arg>
+       <ref bean="HeaderAggregatorDesktop"/>
    </constructor-arg>
   </bean> 
       
@@ -250,7 +259,7 @@
       <ref bean="containerValve"/>
       <ref bean="actionValve"/>
       <ref bean="DecorationValve" />
-      <ref bean="headerAggregatorValve"/>  
+      <ref bean="headerAggregatorValvePortal"/>  
       <ref bean="aggregatorValve"/>
       <ref bean="cleanUpValve"/>
     </list>
@@ -386,7 +395,7 @@
         <ref bean="securityValve"/>                
         <ref bean="localizationValve"/>
         <ref bean="profilerValve"/>                        
-        <ref bean="headerAggregatorValve"/>          
+        <ref bean="headerAggregatorValveDesktop"/>          
         <ref bean="desktopValve"/>
     </list>
     </constructor-arg>
@@ -411,7 +420,7 @@
             <entry key='/fileserver'>
                 <value>fileserver-pipeline</value>
             </entry>                        
-            <entry key='/desktop'>
+            <entry key='/desktop'>   <!-- the key "/desktop" cannot be changed without editing core.js (at least) -->
                 <value>desktop-pipeline</value>
             </entry>                                    
             <entry key='/action'>

Modified: portals/jetspeed-2/trunk/src/webapp/WEB-INF/jetspeed_macros.vm
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/trunk/src/webapp/WEB-INF/jetspeed_macros.vm?view=diff&rev=469307&r1=469306&r2=469307
==============================================================================
--- portals/jetspeed-2/trunk/src/webapp/WEB-INF/jetspeed_macros.vm (original)
+++ portals/jetspeed-2/trunk/src/webapp/WEB-INF/jetspeed_macros.vm Mon Oct 30 14:35:55 2006
@@ -64,12 +64,39 @@
  #end
 #end
 
-#* Adds additional style sheets and java script from portlet *#
+#* Adds additional style sheets and java script from portlets *#
 #macro (includeHeaderResource)
  #set($resourceHeaderFactory = $jetspeed.getComponent("org.apache.jetspeed.headerresource.HeaderResourceFactory"))
- #set($resourceHeader = $resourceHeaderFactory.getHeaderResouce($JS2RequestContext))
- $resourceHeader
+ #if ( $resourceHeader )
+$resourceHeader.getContent()
+ #else
+     #set($resourceHeader = $resourceHeaderFactory.getHeaderResouce($JS2RequestContext))
+$resourceHeader.getContent()
+ #end
 #end
+
+#* Adds additional style sheets and java script from portlets - desktop version *#
+#macro (desktopIncludeDojoHeaderContent)
+ #set($resourceHeaderFactory = $JS2ComponentManager.getComponent("org.apache.jetspeed.headerresource.HeaderResourceFactory"))
+ #if ( $resourceHeader )
+$resourceHeader.getNamedContentForPrefix( "header.dojo" )
+ #else
+     #set($resourceHeader = $resourceHeaderFactory.getHeaderResouce($JS2RequestContext))
+$resourceHeader.getNamedContentForPrefix( "header.dojo" )
+ #end
+#end
+
+#* Adds additional style sheets and java script from portlets - desktop version *#
+#macro (desktopIncludeHeaderContent)
+ #set($resourceHeaderFactory = $JS2ComponentManager.getComponent("org.apache.jetspeed.headerresource.HeaderResourceFactory"))
+ #if ( $resourceHeader )
+$resourceHeader.getContent()
+ #else
+     #set($resourceHeader = $resourceHeaderFactory.getHeaderResouce($JS2RequestContext))
+$resourceHeader.getContent()
+ #end
+#end
+
 
 #*
 * Returns the base CSS class to use in top level tags

Modified: portals/jetspeed-2/trunk/src/webapp/desktop-themes/blue/blue.jsp
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/trunk/src/webapp/desktop-themes/blue/blue.jsp?view=diff&rev=469307&r1=469306&r2=469307
==============================================================================
--- portals/jetspeed-2/trunk/src/webapp/desktop-themes/blue/blue.jsp (original)
+++ portals/jetspeed-2/trunk/src/webapp/desktop-themes/blue/blue.jsp Mon Oct 30 14:35:55 2006
@@ -44,92 +44,10 @@
 <head>
 <meta http-equiv="Content-type" content="text/html; charset=UTF-8" />
 <meta http-equiv="Content-style-type" content="text/css" />
-<script src="http://maps.google.com/maps?file=api&amp;v=2&amp;key=ABQIAAAAisHr-hr7f_yfo_m3teTC5RQXGaCFRGWXJQavRKQcb1Ew_fwkKRQ26QnpXVIkxSMwwTECWDV23ZDaLQ"
-        type="text/javascript"></script> 
-<!-- 
-  DOJO Config Script ( djConfig )
-  -->
-<script type="text/javascript">
-    var djConfig = {isDebug: true, debugAtAllCosts: true};
-    //var djConfig = {isDebug: false, debugAtAllCosts: false};
-    // needed for js debuggers (both venkman and visual studio)
-    function de_jsessionid_url( url )
-    {   // presence of ;jsessionid in dojo baseScriptUri is bad news
-        var tEnds = url.indexOf(";jsessionid=");
-        if (tEnds > 0) url = url.substring(0, tEnds);
-        return url;
-    }
-    djConfig.baseScriptUri = de_jsessionid_url( '<%= desktop.getPortalResourceUrl("/javascript/dojo/") %>' );
-    djConfig.desktopThemeRootUrl = de_jsessionid_url( '<%= desktop.getDesktopThemeRootUrl() %>' );
-</script>
-<!-- 
-  DOJO Script
-  -->
-<script type="text/javascript" src="<%= desktop.getPortalResourceUrl("/javascript/dojo/dojo.js") %>"></script>
-<script language="JavaScript" type="text/javascript">
-    dojo.require("dojo.lang.*");
-    dojo.require("dojo.dnd.HtmlDragMove");
-    dojo.require("dojo.dnd.HtmlDragSource");
-    dojo.require("dojo.event.*");    
-    dojo.require("dojo.io");
-    dojo.require("dojo.collections.ArrayList");
-    dojo.require("dojo.collections.Set");
-    dojo.require("dojo.widget.Manager");
-    dojo.require("dojo.widget.TaskBar");
-    dojo.require("dojo.widget.FloatingPane");
-    dojo.require("dojo.widget.TabContainer");
-    dojo.require("dojo.widget.AccordionPane");
-    dojo.require("dojo.widget.Menu2");
-    dojo.require('dojo.widget.Checkbox');
-    dojo.require('dojo.widget.Dialog');
-    dojo.require('dojo.widget.Button');
-    dojo.require("dojo.lfx.html");
 
-    dojo.require('dojo.widget.LayoutContainer');
-    dojo.require('dojo.widget.ContentPane');
-    dojo.require('dojo.widget.LinkPane');
-    dojo.require('dojo.widget.SplitContainer');
-    dojo.require('dojo.widget.TabContainer');
-    dojo.require('dojo.widget.Tree');
-
-    dojo.hostenv.setModulePrefix('jetspeed.ui.widget', '../desktop/widget');
-    dojo.hostenv.setModulePrefix('jetspeed.desktop', '../desktop/core');
-
-    dojo.require("jetspeed.desktop.core");
-
-    dojo.require("jetspeed.ui.widget.PortalTaskBar");
-    dojo.require("jetspeed.ui.widget.PortletWindow");
-    dojo.require("jetspeed.ui.widget.PortalTabContainer");
-    dojo.require("jetspeed.ui.widget.PortalAccordionContainer");
-    dojo.require("jetspeed.ui.widget.PortletDefContainer");
-    dojo.require("jetspeed.ui.widget.EditorTable");
-</script>
-<script language="JavaScript" type="text/javascript">
-    dojo.hostenv.writeIncludes();
-</script>
-<script language="JavaScript" type="text/javascript">
-    dojo.widget.manager.registerWidgetPackage('jetspeed.ui.widget');
-</script>
-<base id="basetag" href="<%= desktop.getPortalResourceUrl("/") %>">  <!-- http://localhost:8080/jetspeed/ --> 
-     <!-- <base> tag must appear after dojo load in IE6 ( see http://trac.dojotoolkit.org/ticket/557 ) -->
-<link rel="stylesheet" type="text/css" media="screen, projection" href='<%= desktop.getDesktopThemeResourceUrl("css/styles.css") %>'/>
-
-<script language="JavaScript" type="text/javascript">
-    function jsDesktopInit()
-    {
-        jetspeed.initializeDesktop( '<%= desktop.getDesktopTheme() %>', de_jsessionid_url( '<%= desktop.getDesktopThemeRootUrl() %>' ) );
-    }
-    function doRender( bindArgs, portletEntityId )
-    {
-        jetspeed.doRender( bindArgs, portletEntityId );
-    }
-    function doAction( bindArgs, portletEntityId )
-    {
-        jetspeed.doAction( bindArgs, portletEntityId );
-    }
-    dojo.addOnLoad( window.jsDesktopInit );
-</script>
+<%= desktop.getHeaderResource().getNamedContentForPrefix( "header.dojo" )%>
 
+<%= desktop.getHeaderResource().getContent()%>
 
 <script language="JavaScript" type="text/javascript">
     function notifyRetrieveAllMenusFinished()
@@ -138,17 +56,6 @@
     }
     dojo.event.connect( jetspeed, "notifyRetrieveAllMenusFinished", "notifyRetrieveAllMenusFinished" );
 </script>
-<style>
-
-html, body, #jetspeedDesktop
-{	
-    width: 100%;	/* make the body expand to fill the visible window */
-    height: 100%;
-    margin: 0 0 0 0;
-}
-
-</style>
-
 </head>
 
 <body class="<%= desktopThemeStyleClass %>">

Modified: portals/jetspeed-2/trunk/src/webapp/desktop-themes/blue/blue.vm
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/trunk/src/webapp/desktop-themes/blue/blue.vm?view=diff&rev=469307&r1=469306&r2=469307
==============================================================================
--- portals/jetspeed-2/trunk/src/webapp/desktop-themes/blue/blue.vm (original)
+++ portals/jetspeed-2/trunk/src/webapp/desktop-themes/blue/blue.vm Mon Oct 30 14:35:55 2006
@@ -13,97 +13,14 @@
 See the License for the specific language governing permissions and
 limitations under the License.
 *#
-
 <html> <!-- .vm --> <!-- NOTE: do not use strict doctype - see dojo svn log for FloatingPane.js -->
 <head>
 <meta http-equiv="Content-type" content="text/html; charset=UTF-8" />
 <meta http-equiv="Content-style-type" content="text/css" />
-<script src="http://maps.google.com/maps?file=api&amp;v=2&amp;key=ABQIAAAAisHr-hr7f_yfo_m3teTC5RQXGaCFRGWXJQavRKQcb1Ew_fwkKRQ26QnpXVIkxSMwwTECWDV23ZDaLQ"
-        type="text/javascript"></script> 
-<!-- 
-  DOJO Config Script ( djConfig )
-  -->
-<script type="text/javascript">
-    var djConfig = {isDebug: true, debugAtAllCosts: true};
-    //var djConfig = {isDebug: false, debugAtAllCosts: false};
-    // needed for js debuggers (both venkman and visual studio)
-    function de_jsessionid_url( url )
-    {   // presence of ;jsessionid in dojo baseScriptUri is bad news
-        var tEnds = url.indexOf(";jsessionid=");
-        if (tEnds > 0) url = url.substring(0, tEnds);
-        return url;
-    }
-    djConfig.baseScriptUri = de_jsessionid_url( '$jetspeedDesktop.getPortalResourceUrl("/javascript/dojo/")' );
-    djConfig.desktopThemeRootUrl = de_jsessionid_url( "$jetspeedDesktop.getDesktopThemeRootUrl()" );
-</script>
-<!-- 
-  DOJO Script
-  -->
-<script type="text/javascript" src='$jetspeedDesktop.getPortalResourceUrl("/javascript/dojo/dojo.js")'></script>
-<script language="JavaScript" type="text/javascript">
-    dojo.require("dojo.lang.*");
-    dojo.require("dojo.dnd.HtmlDragMove");
-    dojo.require("dojo.dnd.HtmlDragSource");
-    dojo.require("dojo.event.*");    
-    dojo.require("dojo.io");
-    dojo.require("dojo.collections.ArrayList");
-    dojo.require("dojo.collections.Set");
-    dojo.require("dojo.widget.Manager");
-    dojo.require("dojo.widget.TaskBar");
-    dojo.require("dojo.widget.FloatingPane");
-    dojo.require("dojo.widget.TabContainer");
-    dojo.require("dojo.widget.AccordionPane");
-    dojo.require("dojo.widget.Menu2");
-    dojo.require('dojo.widget.Checkbox');
-    dojo.require('dojo.widget.Dialog');
-    dojo.require('dojo.widget.Button');
-    dojo.require("dojo.lfx.html");
-
-    dojo.require('dojo.widget.LayoutContainer');
-    dojo.require('dojo.widget.ContentPane');
-    dojo.require('dojo.widget.LinkPane');
-    dojo.require('dojo.widget.SplitContainer');
-    dojo.require('dojo.widget.TabContainer');
-    dojo.require('dojo.widget.Tree');
-
-    dojo.hostenv.setModulePrefix('jetspeed.ui.widget', '../desktop/widget');
-    dojo.hostenv.setModulePrefix('jetspeed.desktop', '../desktop/core');
-
-    dojo.require("jetspeed.desktop.core");
-
-    dojo.require("jetspeed.ui.widget.PortalTaskBar");
-    dojo.require("jetspeed.ui.widget.PortletWindow");
-    dojo.require("jetspeed.ui.widget.PortalTabContainer");
-    dojo.require("jetspeed.ui.widget.PortalAccordionContainer");
-    dojo.require("jetspeed.ui.widget.PortletDefContainer");
-    dojo.require("jetspeed.ui.widget.EditorTable");
-</script>
-<script language="JavaScript" type="text/javascript">
-    dojo.hostenv.writeIncludes();
-</script>
-<script language="JavaScript" type="text/javascript">
-    dojo.widget.manager.registerWidgetPackage('jetspeed.ui.widget');
-</script>
-<base href="$jetspeedDesktop.getPortalResourceUrl('/')"> <!-- http://localhost:8080/jetspeed/ -->
-     <!-- <base> tag must appear after dojo load in IE6 ( see http://trac.dojotoolkit.org/ticket/557 ) -->
-<link rel="stylesheet" type="text/css" media="screen, projection" href="$jetspeedDesktop.getDesktopThemeResourceUrl('css/styles.css')"/>
 
-<script language="JavaScript" type="text/javascript">
-    function jsDesktopInit()
-    {
-        jetspeed.initializeDesktop( "$jetspeedDesktop.getDesktopTheme()", de_jsessionid_url( "$jetspeedDesktop.getDesktopThemeRootUrl()" ) );
-    }
-    function doRender( bindArgs, portletEntityId )
-    {
-        jetspeed.doRender( bindArgs, portletEntityId );
-    }
-    function doAction( bindArgs, portletEntityId )
-    {
-        jetspeed.doAction( bindArgs, portletEntityId );
-    }
-    dojo.addOnLoad( window.jsDesktopInit );
-</script>
+#desktopIncludeDojoHeaderContent()
 
+#desktopIncludeHeaderContent()
 
 <script language="JavaScript" type="text/javascript">
     function notifyRetrieveAllMenusFinished()
@@ -112,17 +29,6 @@
     }
     dojo.event.connect( jetspeed, "notifyRetrieveAllMenusFinished", "notifyRetrieveAllMenusFinished" );
 </script>
-<style>
-
-html, body, #jetspeedDesktop
-{	
-    width: 100%;	/* make the body expand to fill the visible window */
-    height: 100%;
-    margin: 0 0 0 0;
-}
-
-</style>
-
 </head>
 
 <body class="layout-${jetspeedDesktop.getDesktopTheme()}">

Modified: portals/jetspeed-2/trunk/src/webapp/desktop-themes/tigris/tigris.jsp
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/trunk/src/webapp/desktop-themes/tigris/tigris.jsp?view=diff&rev=469307&r1=469306&r2=469307
==============================================================================
--- portals/jetspeed-2/trunk/src/webapp/desktop-themes/tigris/tigris.jsp (original)
+++ portals/jetspeed-2/trunk/src/webapp/desktop-themes/tigris/tigris.jsp Mon Oct 30 14:35:55 2006
@@ -44,90 +44,10 @@
 <head>
 <meta http-equiv="Content-type" content="text/html; charset=UTF-8" />
 <meta http-equiv="Content-style-type" content="text/css" />
-<!-- 
-  DOJO Config Script ( djConfig )
-  -->
-<script type="text/javascript">
-    var djConfig = {isDebug: true, debugAtAllCosts: true};
-    //var djConfig = {isDebug: false, debugAtAllCosts: false};
-    // needed for js debuggers (both venkman and visual studio)
-    function de_jsessionid_url( url )
-    {   // presence of ;jsessionid in dojo baseScriptUri is bad news
-        var tEnds = url.indexOf(";jsessionid=");
-        if (tEnds > 0) url = url.substring(0, tEnds);
-        return url;
-    }
-    djConfig.baseScriptUri = de_jsessionid_url( '<%= desktop.getPortalResourceUrl("/javascript/dojo/") %>' );
-    djConfig.desktopThemeRootUrl = de_jsessionid_url( '<%= desktop.getDesktopThemeRootUrl() %>' );
-</script>
-<!-- 
-  DOJO Script
-  -->
-<script type="text/javascript" src="<%= desktop.getPortalResourceUrl("/javascript/dojo/dojo.js") %>"></script>
-<script language="JavaScript" type="text/javascript">
-    dojo.require("dojo.lang.*");
-    dojo.require("dojo.dnd.HtmlDragMove");
-    dojo.require("dojo.dnd.HtmlDragSource");
-    dojo.require("dojo.event.*");    
-    dojo.require("dojo.io");
-    dojo.require("dojo.collections.ArrayList");
-    dojo.require("dojo.collections.Set");
-    dojo.require("dojo.widget.Manager");
-    dojo.require("dojo.widget.TaskBar");
-    dojo.require("dojo.widget.FloatingPane");
-    dojo.require("dojo.widget.TabContainer");
-    dojo.require("dojo.widget.AccordionPane");
-    dojo.require("dojo.widget.Menu2");
-    dojo.require('dojo.widget.Checkbox');
-    dojo.require('dojo.widget.Dialog');
-    dojo.require('dojo.widget.Button');
-    dojo.require("dojo.lfx.html");
 
-    dojo.require('dojo.widget.LayoutContainer');
-    dojo.require('dojo.widget.ContentPane');
-    dojo.require('dojo.widget.LinkPane');
-    dojo.require('dojo.widget.SplitContainer');
-    dojo.require('dojo.widget.TabContainer');
-    dojo.require('dojo.widget.Tree');
-
-    dojo.hostenv.setModulePrefix('jetspeed.ui.widget', '../desktop/widget');
-    dojo.hostenv.setModulePrefix('jetspeed.desktop', '../desktop/core');
-
-    dojo.require("jetspeed.desktop.core");
-
-    dojo.require("jetspeed.ui.widget.PortalTaskBar");
-    dojo.require("jetspeed.ui.widget.PortletWindow");
-    dojo.require("jetspeed.ui.widget.PortalTabContainer");
-    dojo.require("jetspeed.ui.widget.PortalAccordionContainer");
-    dojo.require("jetspeed.ui.widget.PortletDefContainer");
-    dojo.require("jetspeed.ui.widget.EditorTable");
-</script>
-<script language="JavaScript" type="text/javascript">
-    dojo.hostenv.writeIncludes();
-</script>
-<script language="JavaScript" type="text/javascript">
-    dojo.widget.manager.registerWidgetPackage('jetspeed.ui.widget');
-</script>
-<base id="basetag" href="<%= desktop.getPortalResourceUrl("/") %>">  <!-- http://localhost:8080/jetspeed/ --> 
-     <!-- <base> tag must appear after dojo load in IE6 ( see http://trac.dojotoolkit.org/ticket/557 ) -->
-<link rel="stylesheet" type="text/css" media="screen, projection" href='<%= desktop.getDesktopThemeResourceUrl("css/styles.css") %>'/>
-
-<script language="JavaScript" type="text/javascript">
-    function jsDesktopInit()
-    {
-        jetspeed.initializeDesktop( '<%= desktop.getDesktopTheme() %>', de_jsessionid_url( '<%= desktop.getDesktopThemeRootUrl() %>' ) );
-    }
-    function doRender( bindArgs, portletEntityId )
-    {
-        jetspeed.doRender( bindArgs, portletEntityId );
-    }
-    function doAction( bindArgs, portletEntityId )
-    {
-        jetspeed.doAction( bindArgs, portletEntityId );
-    }
-    dojo.addOnLoad( window.jsDesktopInit );
-</script>
+<%= desktop.getHeaderResource().getNamedContentForPrefix( "header.dojo" )%>
 
+<%= desktop.getHeaderResource().getContent()%>
 
 <script language="JavaScript" type="text/javascript">
     function notifyRetrieveAllMenusFinished()
@@ -136,17 +56,6 @@
     }
     dojo.event.connect( jetspeed, "notifyRetrieveAllMenusFinished", "notifyRetrieveAllMenusFinished" );
 </script>
-<style>
-
-html, body, #jetspeedDesktop
-{	
-    width: 100%;	/* make the body expand to fill the visible window */
-    height: 100%;
-    margin: 0 0 0 0;
-}
-
-</style>
-
 </head>
 
 <body class="<%= desktopThemeStyleClass %>">

Modified: portals/jetspeed-2/trunk/src/webapp/desktop-themes/tigris/tigris.vm
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/trunk/src/webapp/desktop-themes/tigris/tigris.vm?view=diff&rev=469307&r1=469306&r2=469307
==============================================================================
--- portals/jetspeed-2/trunk/src/webapp/desktop-themes/tigris/tigris.vm (original)
+++ portals/jetspeed-2/trunk/src/webapp/desktop-themes/tigris/tigris.vm Mon Oct 30 14:35:55 2006
@@ -13,95 +13,14 @@
 See the License for the specific language governing permissions and
 limitations under the License.
 *#
-
 <html> <!-- .vm --> <!-- NOTE: do not use strict doctype - see dojo svn log for FloatingPane.js -->
 <head>
 <meta http-equiv="Content-type" content="text/html; charset=UTF-8" />
 <meta http-equiv="Content-style-type" content="text/css" />
-<!-- 
-  DOJO Config Script ( djConfig )
-  -->
-<script type="text/javascript">
-    var djConfig = {isDebug: true, debugAtAllCosts: true};
-    //var djConfig = {isDebug: false, debugAtAllCosts: false};
-    // needed for js debuggers (both venkman and visual studio)
-    function de_jsessionid_url( url )
-    {   // presence of ;jsessionid in dojo baseScriptUri is bad news
-        var tEnds = url.indexOf(";jsessionid=");
-        if (tEnds > 0) url = url.substring(0, tEnds);
-        return url;
-    }
-    djConfig.baseScriptUri = de_jsessionid_url( '$jetspeedDesktop.getPortalResourceUrl("/javascript/dojo/")' );
-    djConfig.desktopThemeRootUrl = de_jsessionid_url( "$jetspeedDesktop.getDesktopThemeRootUrl()" );
-</script>
-<!-- 
-  DOJO Script
-  -->
-<script type="text/javascript" src='$jetspeedDesktop.getPortalResourceUrl("/javascript/dojo/dojo.js")'></script>
-<script language="JavaScript" type="text/javascript">
-    dojo.require("dojo.lang.*");
-    dojo.require("dojo.dnd.HtmlDragMove");
-    dojo.require("dojo.dnd.HtmlDragSource");
-    dojo.require("dojo.event.*");    
-    dojo.require("dojo.io");
-    dojo.require("dojo.collections.ArrayList");
-    dojo.require("dojo.collections.Set");
-    dojo.require("dojo.widget.Manager");
-    dojo.require("dojo.widget.TaskBar");
-    dojo.require("dojo.widget.FloatingPane");
-    dojo.require("dojo.widget.TabContainer");
-    dojo.require("dojo.widget.AccordionPane");
-    dojo.require("dojo.widget.Menu2");
-    dojo.require('dojo.widget.Checkbox');
-    dojo.require('dojo.widget.Dialog');
-    dojo.require('dojo.widget.Button');
-    dojo.require("dojo.lfx.html");
-
-    dojo.require('dojo.widget.LayoutContainer');
-    dojo.require('dojo.widget.ContentPane');
-    dojo.require('dojo.widget.LinkPane');
-    dojo.require('dojo.widget.SplitContainer');
-    dojo.require('dojo.widget.TabContainer');
-    dojo.require('dojo.widget.Tree');
-
-    dojo.hostenv.setModulePrefix('jetspeed.ui.widget', '../desktop/widget');
-    dojo.hostenv.setModulePrefix('jetspeed.desktop', '../desktop/core');
-
-    dojo.require("jetspeed.desktop.core");
-
-    dojo.require("jetspeed.ui.widget.PortalTaskBar");
-    dojo.require("jetspeed.ui.widget.PortletWindow");
-    dojo.require("jetspeed.ui.widget.PortalTabContainer");
-    dojo.require("jetspeed.ui.widget.PortalAccordionContainer");
-    dojo.require("jetspeed.ui.widget.PortletDefContainer");
-    dojo.require("jetspeed.ui.widget.EditorTable");
-</script>
-<script language="JavaScript" type="text/javascript">
-    dojo.hostenv.writeIncludes();
-</script>
-<script language="JavaScript" type="text/javascript">
-    dojo.widget.manager.registerWidgetPackage('jetspeed.ui.widget');
-</script>
-<base href="$jetspeedDesktop.getPortalResourceUrl('/')"> <!-- http://localhost:8080/jetspeed/ -->
-     <!-- <base> tag must appear after dojo load in IE6 ( see http://trac.dojotoolkit.org/ticket/557 ) -->
-<link rel="stylesheet" type="text/css" media="screen, projection" href="$jetspeedDesktop.getDesktopThemeResourceUrl('css/styles.css')"/>
 
-<script language="JavaScript" type="text/javascript">
-    function jsDesktopInit()
-    {
-        jetspeed.initializeDesktop( "$jetspeedDesktop.getDesktopTheme()", de_jsessionid_url( "$jetspeedDesktop.getDesktopThemeRootUrl()" ) );
-    }
-    function doRender( bindArgs, portletEntityId )
-    {
-        jetspeed.doRender( bindArgs, portletEntityId );
-    }
-    function doAction( bindArgs, portletEntityId )
-    {
-        jetspeed.doAction( bindArgs, portletEntityId );
-    }
-    dojo.addOnLoad( window.jsDesktopInit );
-</script>
+#desktopIncludeDojoHeaderContent()
 
+#desktopIncludeHeaderContent()
 
 <script language="JavaScript" type="text/javascript">
     function notifyRetrieveAllMenusFinished()
@@ -110,17 +29,6 @@
     }
     dojo.event.connect( jetspeed, "notifyRetrieveAllMenusFinished", "notifyRetrieveAllMenusFinished" );
 </script>
-<style>
-
-html, body, #jetspeedDesktop
-{	
-    width: 100%;	/* make the body expand to fill the visible window */
-    height: 100%;
-    margin: 0 0 0 0;
-}
-
-</style>
-
 </head>
 
 <body class="layout-${jetspeedDesktop.getDesktopTheme()}">



---------------------------------------------------------------------
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