myfaces-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lu4...@apache.org
Subject svn commit: r1098572 - /myfaces/core/branches/2.1.x/impl/src/main/java/org/apache/myfaces/view/facelets/tag/composite/CompositeResourceLibrary.java
Date Mon, 02 May 2011 13:59:24 GMT
Author: lu4242
Date: Mon May  2 13:59:24 2011
New Revision: 1098572

URL: http://svn.apache.org/viewvc?rev=1098572&view=rev
Log:
MYFACES-3103 Composite component using new .view.xml mapping does not work (fix when ViewHandler
default extensions does not include it but facelets default extension does)

Modified:
    myfaces/core/branches/2.1.x/impl/src/main/java/org/apache/myfaces/view/facelets/tag/composite/CompositeResourceLibrary.java

Modified: myfaces/core/branches/2.1.x/impl/src/main/java/org/apache/myfaces/view/facelets/tag/composite/CompositeResourceLibrary.java
URL: http://svn.apache.org/viewvc/myfaces/core/branches/2.1.x/impl/src/main/java/org/apache/myfaces/view/facelets/tag/composite/CompositeResourceLibrary.java?rev=1098572&r1=1098571&r2=1098572&view=diff
==============================================================================
--- myfaces/core/branches/2.1.x/impl/src/main/java/org/apache/myfaces/view/facelets/tag/composite/CompositeResourceLibrary.java
(original)
+++ myfaces/core/branches/2.1.x/impl/src/main/java/org/apache/myfaces/view/facelets/tag/composite/CompositeResourceLibrary.java
Mon May  2 13:59:24 2011
@@ -34,6 +34,7 @@ import javax.faces.view.facelets.Tag;
 import javax.faces.view.facelets.TagConfig;
 import javax.faces.view.facelets.TagHandler;
 
+import org.apache.myfaces.shared_impl.util.ArrayUtils;
 import org.apache.myfaces.shared_impl.util.StringUtils;
 import org.apache.myfaces.shared_impl.util.WebConfigParamUtils;
 import org.apache.myfaces.view.facelets.tag.TagLibrary;
@@ -67,6 +68,20 @@ public class CompositeResourceLibrary im
         String defaultSuffixes = WebConfigParamUtils.getStringInitParameter(externalContext,
ViewHandler.DEFAULT_SUFFIX_PARAM_NAME, ViewHandler.DEFAULT_SUFFIX );
         
         _defaultSuffixesArray = StringUtils.splitShortString(defaultSuffixes, ' ');
+        
+        boolean faceletsExtensionFound = false;
+        for (String ext : _defaultSuffixesArray)
+        {
+            if (_extension.equals(ext))
+            {
+                faceletsExtensionFound = true;
+                break;
+            }
+        }
+        if (!faceletsExtensionFound)
+        {
+            _defaultSuffixesArray = (String[]) ArrayUtils.concat(_defaultSuffixesArray, new
String[]{_extension});
+        }
     }
     
     /**



Mime
View raw message