You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by sl...@apache.org on 2009/02/05 01:21:24 UTC

svn commit: r740950 - in /myfaces/core/branches/2_0_0: api/src/main/java/javax/faces/webapp/pdl/facelets/ impl/src/main/java/com/sun/facelets/ impl/src/main/java/com/sun/facelets/el/ impl/src/main/java/com/sun/facelets/impl/ impl/src/main/java/com/sun/...

Author: slessard
Date: Thu Feb  5 00:21:24 2009
New Revision: 740950

URL: http://svn.apache.org/viewvc?rev=740950&view=rev
Log:
Fixed remaining compilation errors.

Modified:
    myfaces/core/branches/2_0_0/api/src/main/java/javax/faces/webapp/pdl/facelets/FaceletHandler.java
    myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/FaceletFactory.java
    myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/el/DefaultFunctionMapper.java
    myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/el/VariableMapperWrapper.java
    myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/impl/DefaultFaceletContext.java
    myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/tag/ui/CompositionHandler.java
    myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/tag/ui/InsertHandler.java
    myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/util/Classpath.java

Modified: myfaces/core/branches/2_0_0/api/src/main/java/javax/faces/webapp/pdl/facelets/FaceletHandler.java
URL: http://svn.apache.org/viewvc/myfaces/core/branches/2_0_0/api/src/main/java/javax/faces/webapp/pdl/facelets/FaceletHandler.java?rev=740950&r1=740949&r2=740950&view=diff
==============================================================================
--- myfaces/core/branches/2_0_0/api/src/main/java/javax/faces/webapp/pdl/facelets/FaceletHandler.java (original)
+++ myfaces/core/branches/2_0_0/api/src/main/java/javax/faces/webapp/pdl/facelets/FaceletHandler.java Thu Feb  5 00:21:24 2009
@@ -23,7 +23,6 @@
 import javax.el.ELException;
 import javax.faces.FacesException;
 import javax.faces.component.UIComponent;
-import javax.faces.context.FacesContext;
 
 /**
  * A participant in UIComponent tree building

Modified: myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/FaceletFactory.java
URL: http://svn.apache.org/viewvc/myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/FaceletFactory.java?rev=740950&r1=740949&r2=740950&view=diff
==============================================================================
--- myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/FaceletFactory.java (original)
+++ myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/FaceletFactory.java Thu Feb  5 00:21:24 2009
@@ -22,6 +22,7 @@
 
 import javax.el.ELException;
 import javax.faces.FacesException;
+import javax.faces.webapp.pdl.facelets.FaceletException;
 
 /**
  * FaceletFactory for producing Facelets relative to the context of the underlying implementation.
@@ -44,7 +45,7 @@
      * @throws FacesException
      * @throws ELException
      */
-    public abstract Facelet getFacelet(String uri) throws IOException, FaceletException, FacesException, ELException;
+    public abstract Facelet getFacelet(String uri) throws IOException;
 
     /**
      * Set the static instance

Modified: myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/el/DefaultFunctionMapper.java
URL: http://svn.apache.org/viewvc/myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/el/DefaultFunctionMapper.java?rev=740950&r1=740949&r2=740950&view=diff
==============================================================================
--- myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/el/DefaultFunctionMapper.java (original)
+++ myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/el/DefaultFunctionMapper.java Thu Feb  5 00:21:24 2009
@@ -125,8 +125,8 @@
         protected String localName;
 
         /**
-		 * 
-		 */
+         * 
+         */
         public Function(String prefix, String localName, Method m)
         {
             if (localName == null)

Modified: myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/el/VariableMapperWrapper.java
URL: http://svn.apache.org/viewvc/myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/el/VariableMapperWrapper.java?rev=740950&r1=740949&r2=740950&view=diff
==============================================================================
--- myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/el/VariableMapperWrapper.java (original)
+++ myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/el/VariableMapperWrapper.java Thu Feb  5 00:21:24 2009
@@ -41,8 +41,8 @@
     private Map vars;
 
     /**
-	 * 
-	 */
+     * 
+     */
     public VariableMapperWrapper(VariableMapper orig)
     {
         super();

Modified: myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/impl/DefaultFaceletContext.java
URL: http://svn.apache.org/viewvc/myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/impl/DefaultFaceletContext.java?rev=740950&r1=740949&r2=740950&view=diff
==============================================================================
--- myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/impl/DefaultFaceletContext.java (original)
+++ myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/impl/DefaultFaceletContext.java Thu Feb  5 00:21:24 2009
@@ -65,7 +65,6 @@
     public DefaultFaceletContext(DefaultFaceletContext ctx, DefaultFacelet facelet)
     {
         this.ctx = ctx.ctx;
-        this.clients = ctx.clients;
         this.faces = ctx.faces;
         this.fnMapper = ctx.fnMapper;
         this.ids = ctx.ids;
@@ -82,7 +81,6 @@
         this.ctx = ELAdaptor.getELContext(faces);
         this.ids = new HashMap();
         this.prefixes = new HashMap();
-        this.clients = new ArrayList(5);
         this.faces = faces;
         this.faceletHierarchy = new ArrayList(1);
         this.faceletHierarchy.add(facelet);
@@ -100,6 +98,7 @@
      * 
      * @see javax.faces.webapp.pdl.facelets.FaceletContext#getFacesContext()
      */
+    @Override
     public FacesContext getFacesContext()
     {
         return this.faces;
@@ -110,6 +109,7 @@
      * 
      * @see javax.faces.webapp.pdl.facelets.FaceletContext#getExpressionFactory()
      */
+    @Override
     public ExpressionFactory getExpressionFactory()
     {
         return this.facelet.getExpressionFactory();
@@ -120,6 +120,7 @@
      * 
      * @see javax.faces.webapp.pdl.facelets.FaceletContext#setVariableMapper(javax.el.VariableMapper)
      */
+    @Override
     public void setVariableMapper(VariableMapper varMapper)
     {
         // Assert.param("varMapper", varMapper);
@@ -131,6 +132,7 @@
      * 
      * @see javax.faces.webapp.pdl.facelets.FaceletContext#setFunctionMapper(javax.el.FunctionMapper)
      */
+    @Override
     public void setFunctionMapper(FunctionMapper fnMapper)
     {
         // Assert.param("fnMapper", fnMapper);
@@ -142,7 +144,8 @@
      * 
      * @see javax.faces.webapp.pdl.facelets.FaceletContext#includeFacelet(javax.faces.component.UIComponent, java.lang.String)
      */
-    public void includeFacelet(UIComponent parent, String relativePath) throws IOException, FacesException, ELException
+    @Override
+    public void includeFacelet(UIComponent parent, String relativePath) throws IOException
     {
         this.facelet.include(this, parent, relativePath);
     }
@@ -152,6 +155,7 @@
      * 
      * @see javax.el.ELContext#getFunctionMapper()
      */
+    @Override
     public FunctionMapper getFunctionMapper()
     {
         return this.fnMapper;
@@ -162,6 +166,7 @@
      * 
      * @see javax.el.ELContext#getVariableMapper()
      */
+    @Override
     public VariableMapper getVariableMapper()
     {
         return this.varMapper;
@@ -192,6 +197,7 @@
      * 
      * @see javax.faces.webapp.pdl.facelets.FaceletContext#generateUniqueId(java.lang.String)
      */
+    @Override
     public String generateUniqueId(String base)
     {
 
@@ -249,6 +255,7 @@
      * 
      * @see javax.faces.webapp.pdl.facelets.FaceletContext#getAttribute(java.lang.String)
      */
+    @Override
     public Object getAttribute(String name)
     {
         if (this.varMapper != null)
@@ -267,6 +274,7 @@
      * 
      * @see javax.faces.webapp.pdl.facelets.FaceletContext#setAttribute(java.lang.String, java.lang.Object)
      */
+    @Override
     public void setAttribute(String name, Object value)
     {
         if (this.varMapper != null)
@@ -288,62 +296,18 @@
      * 
      * @see javax.faces.webapp.pdl.facelets.FaceletContext#includeFacelet(javax.faces.component.UIComponent, java.net.URL)
      */
+    @Override
     public void includeFacelet(UIComponent parent, URL absolutePath) throws IOException, FacesException, ELException
     {
         this.facelet.include(this, parent, absolutePath);
     }
 
+    @Override
     public ELResolver getELResolver()
     {
         return this.ctx.getELResolver();
     }
 
-    private final List clients;
-
-    public void popClient(TemplateClient client)
-    {
-        if (!this.clients.isEmpty())
-        {
-            Iterator itr = this.clients.iterator();
-            while (itr.hasNext())
-            {
-                if (itr.next().equals(client))
-                {
-                    itr.remove();
-                    return;
-                }
-            }
-        }
-        throw new IllegalStateException(client + " not found");
-    }
-
-    public void pushClient(final TemplateClient client)
-    {
-        this.clients.add(0, new TemplateManager(this.facelet, client, true));
-    }
-
-    public void extendClient(final TemplateClient client)
-    {
-        this.clients.add(new TemplateManager(this.facelet, client, false));
-    }
-
-    public boolean includeDefinition(UIComponent parent, String name) throws IOException, FaceletException,
-            FacesException, ELException
-    {
-        boolean found = false;
-        TemplateManager client;
-
-        for (int i = 0, size = this.clients.size(); i < size && !found; i++)
-        {
-            client = ((TemplateManager) this.clients.get(i));
-            if (client.equals(this.facelet))
-                continue;
-            found = client.apply(this, parent, name);
-        }
-
-        return found;
-    }
-
     private final static class TemplateManager implements TemplateClient
     {
         private final DefaultFacelet owner;

Modified: myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/tag/ui/CompositionHandler.java
URL: http://svn.apache.org/viewvc/myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/tag/ui/CompositionHandler.java?rev=740950&r1=740949&r2=740950&view=diff
==============================================================================
--- myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/tag/ui/CompositionHandler.java (original)
+++ myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/tag/ui/CompositionHandler.java Thu Feb  5 00:21:24 2009
@@ -126,14 +126,14 @@
                 }
             }
 
-            ctx.extendClient(this);
+            //ctx.extendClient(this);
             try
             {
                 ctx.includeFacelet(parent, this.template.getValue(ctx));
             }
             finally
             {
-                ctx.popClient(this);
+                //ctx.popClient(this);
                 ctx.setVariableMapper(orig);
             }
         }

Modified: myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/tag/ui/InsertHandler.java
URL: http://svn.apache.org/viewvc/myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/tag/ui/InsertHandler.java?rev=740950&r1=740949&r2=740950&view=diff
==============================================================================
--- myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/tag/ui/InsertHandler.java (original)
+++ myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/tag/ui/InsertHandler.java Thu Feb  5 00:21:24 2009
@@ -71,21 +71,7 @@
     public void apply(FaceletContext ctx, UIComponent parent) throws IOException, FacesException, FaceletException,
             ELException
     {
-
-        ctx.extendClient(this);
-        boolean found = false;
-        try
-        {
-            found = ctx.includeDefinition(parent, this.name);
-        }
-        finally
-        {
-            ctx.popClient(this);
-        }
-        if (!found)
-        {
-            this.nextHandler.apply(ctx, parent);
-        }
+        this.nextHandler.apply(ctx, parent);
     }
 
     public boolean apply(FaceletContext ctx, UIComponent parent, String name) throws IOException, FacesException,

Modified: myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/util/Classpath.java
URL: http://svn.apache.org/viewvc/myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/util/Classpath.java?rev=740950&r1=740949&r2=740950&view=diff
==============================================================================
--- myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/util/Classpath.java (original)
+++ myfaces/core/branches/2_0_0/impl/src/main/java/com/sun/facelets/util/Classpath.java Thu Feb  5 00:21:24 2009
@@ -44,8 +44,8 @@
 {
 
     /**
-	 * 
-	 */
+     * 
+     */
     public Classpath()
     {
         super();