portals-jetspeed-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From woon...@apache.org
Subject svn commit: r881415 - in /portals/jetspeed-2/portal/trunk: components/jetspeed-portal/src/main/java/org/apache/jetspeed/ui/Jetui.java jetspeed-api/src/main/java/org/apache/jetspeed/portlet/HeaderPhaseSupportConstants.java
Date Tue, 17 Nov 2009 18:07:00 GMT
Author: woonsan
Date: Tue Nov 17 18:07:00 2009
New Revision: 881415

URL: http://svn.apache.org/viewvc?rev=881415&view=rev
Log:
JS2-1083: Adding YUI head element id constant

Modified:
    portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/ui/Jetui.java
    portals/jetspeed-2/portal/trunk/jetspeed-api/src/main/java/org/apache/jetspeed/portlet/HeaderPhaseSupportConstants.java

Modified: portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/ui/Jetui.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/ui/Jetui.java?rev=881415&r1=881414&r2=881415&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/ui/Jetui.java
(original)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/ui/Jetui.java
Tue Nov 17 18:07:00 2009
@@ -31,6 +31,7 @@
 import org.apache.jetspeed.om.page.Fragment;
 import org.apache.jetspeed.pipeline.PipelineException;
 import org.apache.jetspeed.portlet.HeadElement;
+import org.apache.jetspeed.portlet.HeaderPhaseSupportConstants;
 import org.apache.jetspeed.portlets.layout.ColumnLayout;
 import org.apache.jetspeed.request.RequestContext;
 import org.apache.jetspeed.util.HeadElementUtils;
@@ -147,7 +148,7 @@
        List<KeyValue<String, HeadElement>> headers = context.getMergedHeadElements();
        for (KeyValue<String, HeadElement> pair : headers)
        {
-           if (!pair.getKey().equals("header.dojo.library.include"))
+           if (!HeaderPhaseSupportConstants.CONTAINER_HEAD_ELEMENT_CONTRIBUTION_ELEMENT_ID_SET.contains(pair.getKey()))
            {
                HeadElement headElement = pair.getValue();
                result.append(HeadElementUtils.toHtmlString(headElement)).append('\n');

Modified: portals/jetspeed-2/portal/trunk/jetspeed-api/src/main/java/org/apache/jetspeed/portlet/HeaderPhaseSupportConstants.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/jetspeed-api/src/main/java/org/apache/jetspeed/portlet/HeaderPhaseSupportConstants.java?rev=881415&r1=881414&r2=881415&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/jetspeed-api/src/main/java/org/apache/jetspeed/portlet/HeaderPhaseSupportConstants.java
(original)
+++ portals/jetspeed-2/portal/trunk/jetspeed-api/src/main/java/org/apache/jetspeed/portlet/HeaderPhaseSupportConstants.java
Tue Nov 17 18:07:00 2009
@@ -16,6 +16,11 @@
  */
 package org.apache.jetspeed.portlet;
 
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.HashSet;
+import java.util.Set;
+
 /**
  * This interface defines some constants for attribute name or value of contributed head
elements.
  * This constant values are used by Jetspeed portal to optimize the head elements aggregation.
@@ -61,6 +66,17 @@
     public static final String HEAD_ELEMENT_CONTRIBUTION_ELEMENT_ID_DOJO_LIBRARY_INCLUDE
= "header.dojo.library.include";
     
     /**
+     * An ID attribute value for YUI library inclusion which can be used in head elements
merging by portal.  
+     */
+    public static final String HEAD_ELEMENT_CONTRIBUTION_ELEMENT_ID_YUI_LIBRARY_INCLUDE =
"header.yui.library.include";
+
+    /**
+     * ID attribute values set for script libraries included by the container.
+     */
+    public static final Set<String> CONTAINER_HEAD_ELEMENT_CONTRIBUTION_ELEMENT_ID_SET
= 
+        Collections.unmodifiableSet(new HashSet<String>(Arrays.asList(new String []
{ HEAD_ELEMENT_CONTRIBUTION_ELEMENT_ID_DOJO_LIBRARY_INCLUDE, HEAD_ELEMENT_CONTRIBUTION_ELEMENT_ID_YUI_LIBRARY_INCLUDE})));
+    
+    /**
      * An attribute name of head element contributed to the portal page aggregation by a
portlet.
      * The value of this attribute can be used by portal to merge contents of each contributed
head element
      * into centralized element(s).



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