You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by lu...@apache.org on 2013/10/25 05:05:56 UTC

svn commit: r1535616 - in /myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/view/facelets: FaceletViewDeclarationLanguage.java tag/jstl/core/JstlCoreLibrary.java

Author: lu4242
Date: Fri Oct 25 03:05:54 2013
New Revision: 1535616

URL: http://svn.apache.org/r1535616
Log:
MYFACES-3807 Add http://java.sun.com/jstl/core as a valid namespace for "c" jstl library in facelets

Modified:
    myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/view/facelets/FaceletViewDeclarationLanguage.java
    myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/view/facelets/tag/jstl/core/JstlCoreLibrary.java

Modified: myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/view/facelets/FaceletViewDeclarationLanguage.java
URL: http://svn.apache.org/viewvc/myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/view/facelets/FaceletViewDeclarationLanguage.java?rev=1535616&r1=1535615&r2=1535616&view=diff
==============================================================================
--- myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/view/facelets/FaceletViewDeclarationLanguage.java (original)
+++ myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/view/facelets/FaceletViewDeclarationLanguage.java Fri Oct 25 03:05:54 2013
@@ -2484,6 +2484,7 @@ public class FaceletViewDeclarationLangu
         compiler.addTagLibrary(new HtmlLibrary());
         compiler.addTagLibrary(new UILibrary());
         compiler.addTagLibrary(new JstlCoreLibrary());
+        compiler.addTagLibrary(new JstlCoreLibrary(JstlCoreLibrary.ALTERNATIVE_NAMESPACE));
         compiler.addTagLibrary(new JstlFnLibrary());
         compiler.addTagLibrary(new CompositeLibrary());
         compiler.addTagLibrary(new CompositeResourceLibrary(context,

Modified: myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/view/facelets/tag/jstl/core/JstlCoreLibrary.java
URL: http://svn.apache.org/viewvc/myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/view/facelets/tag/jstl/core/JstlCoreLibrary.java?rev=1535616&r1=1535615&r2=1535616&view=diff
==============================================================================
--- myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/view/facelets/tag/jstl/core/JstlCoreLibrary.java (original)
+++ myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/view/facelets/tag/jstl/core/JstlCoreLibrary.java Fri Oct 25 03:05:54 2013
@@ -30,6 +30,12 @@ public final class JstlCoreLibrary exten
     public final static String NAMESPACE = "http://xmlns.jcp.org/jsp/jstl/core";
     public final static String ALIAS_NAMESPACE = "http://java.sun.com/jsp/jstl/core";
 
+    // This namespace was used in the early stages of JSF 2.0 development, but later
+    // it was fixed to use the same syntax for jsp. But some applications still
+    // uses the old syntax and it is too hard to fix them, so in JSF 2.2 it was 
+    // decided to add this namespace as an alternative synonym.
+    public final static String ALTERNATIVE_NAMESPACE = "http://java.sun.com/jstl/core";
+
     public final static JstlCoreLibrary INSTANCE = new JstlCoreLibrary();
 
     public JstlCoreLibrary()
@@ -50,5 +56,23 @@ public final class JstlCoreLibrary exten
 
         this.addTagHandler("set", SetHandler.class);
     }
+    
+    public JstlCoreLibrary(String namespace)
+    {
+        super(namespace);
+
+        this.addTagHandler("if", IfHandler.class);
+
+        this.addTagHandler("forEach", ForEachHandler.class);
+
+        this.addTagHandler("catch", CatchHandler.class);
 
+        this.addTagHandler("choose", ChooseHandler.class);
+
+        this.addTagHandler("when", ChooseWhenHandler.class);
+
+        this.addTagHandler("otherwise", ChooseOtherwiseHandler.class);
+
+        this.addTagHandler("set", SetHandler.class);
+    }
 }