myfaces-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dennisby...@apache.org
Subject svn commit: r414132 - in /myfaces/core/branches/jsf12/api/src/main/java/javax/faces/webapp: UIComponentClassicTagBase.java UIComponentTagBase.java
Date Wed, 14 Jun 2006 07:14:50 GMT
Author: dennisbyrne
Date: Wed Jun 14 00:14:50 2006
New Revision: 414132

URL: http://svn.apache.org/viewvc?rev=414132&view=rev
Log:
fleshed out a dozen accessors

Modified:
    myfaces/core/branches/jsf12/api/src/main/java/javax/faces/webapp/UIComponentClassicTagBase.java
    myfaces/core/branches/jsf12/api/src/main/java/javax/faces/webapp/UIComponentTagBase.java

Modified: myfaces/core/branches/jsf12/api/src/main/java/javax/faces/webapp/UIComponentClassicTagBase.java
URL: http://svn.apache.org/viewvc/myfaces/core/branches/jsf12/api/src/main/java/javax/faces/webapp/UIComponentClassicTagBase.java?rev=414132&r1=414131&r2=414132&view=diff
==============================================================================
--- myfaces/core/branches/jsf12/api/src/main/java/javax/faces/webapp/UIComponentClassicTagBase.java
(original)
+++ myfaces/core/branches/jsf12/api/src/main/java/javax/faces/webapp/UIComponentClassicTagBase.java
Wed Jun 14 00:14:50 2006
@@ -5,7 +5,9 @@
 
 import javax.faces.component.UIComponent;
 import javax.faces.component.UIOutput;
+import javax.faces.component.UIViewRoot;
 import javax.faces.context.FacesContext;
+import javax.faces.context.ResponseWriter;
 import javax.servlet.jsp.JspException;
 import javax.servlet.jsp.JspWriter;
 import javax.servlet.jsp.PageContext;
@@ -23,60 +25,72 @@
         implements JspIdConsumer, BodyTag
 {
 
-    protected int getDoStartValue() throws JspException
+    private UIComponent component ;
+    
+    private FacesContext ctx;
+    
+    protected PageContext pageContext ;
+    
+    private Tag parent ;
+    
+    private ResponseWriter responseWriter;
+    
+    private String id;
+    
+    private BodyContent bodyContent;
+    
+    private String jspId;
+    
+    public void doInitBody() throws JspException
     {
         throw new UnsupportedOperationException("1.2");
     }
 
-    protected int getDoEndValue() throws JspException
+    public int doAfterBody() throws JspException
     {
         throw new UnsupportedOperationException("1.2");
     }
-
-    protected void encodeBegin() throws IOException
+    
+    protected String getFacesJspId()
     {
         throw new UnsupportedOperationException("1.2");
     }
 
-    protected void encodeChildren() throws IOException
+    private boolean isDuplicateId(String componentId)
     {
         throw new UnsupportedOperationException("1.2");
     }
 
-    protected void encodeEnd() throws IOException
+    private String generateIncrementedId(String componentId)
     {
         throw new UnsupportedOperationException("1.2");
     }
 
-    public void setPageContext(PageContext pageContext)
+    protected List<String> getCreatedComponents()
     {
-
         throw new UnsupportedOperationException("1.2");
-
     }
 
-    public Tag getParent()
+    private String createId() throws JspException
     {
         throw new UnsupportedOperationException("1.2");
     }
 
-    public void setParent(Tag parent)
+    public void setJspId(String id)
     {
         throw new UnsupportedOperationException("1.2");
     }
 
-    protected void setupResponseWriter()
+    private void updatePreviousJspIdAndIteratorStatus(String id)
     {
         throw new UnsupportedOperationException("1.2");
     }
 
-    private UIComponent createChild(FacesContext context, UIComponent parent,
-            String componentId) throws JspException
+    private boolean isIncludedOrForwarded()
     {
         throw new UnsupportedOperationException("1.2");
-
     }
-
+    
     private UIComponent createFacet(FacesContext context, UIComponent parent,
             String name, String newId) throws JspException
     {
@@ -86,14 +100,12 @@
     private UIComponent getChild(UIComponent component, String componentId)
     {
         throw new UnsupportedOperationException("1.2");
-
     }
 
     protected UIComponent findComponent(FacesContext context)
             throws JspException
     {
         throw new UnsupportedOperationException("1.2");
-
     }
 
     public static UIComponentClassicTagBase getParentUIComponentClassicTagBase(
@@ -136,7 +148,6 @@
 
     private void removeOldFacets()
     {
-
         throw new UnsupportedOperationException("1.2");
     }
 
@@ -184,84 +195,114 @@
         throw new UnsupportedOperationException("1.2");
     }
 
-    public void setBodyContent(BodyContent bodyContent)
+    public boolean getCreated()
     {
         throw new UnsupportedOperationException("1.2");
     }
 
-    public JspWriter getPreviousOut()
+    protected FacesContext getFacesContext()
     {
         throw new UnsupportedOperationException("1.2");
     }
 
-    public BodyContent getBodyContent()
+    protected String getFacetName()
     {
         throw new UnsupportedOperationException("1.2");
     }
-
-    public void doInitBody() throws JspException
+    
+    public JspWriter getPreviousOut()
     {
         throw new UnsupportedOperationException("1.2");
     }
+    
+    //private UIComponent createChild(FacesContext context, UIComponent parent,
+    //        String componentId) throws JspException
+    //{
+    //    
+    //    throw new UnsupportedOperationException("1.2");
+    //
+    //}
+    
+    public void setBodyContent(BodyContent bodyContent)
+    {
+        this.bodyContent = bodyContent;
+    }
+    
+    protected int getDoStartValue() throws JspException
+    {
+        return EVAL_BODY_BUFFERED;
+    }
 
-    public int doAfterBody() throws JspException
+    protected int getDoEndValue() throws JspException
     {
-        throw new UnsupportedOperationException("1.2");
+        return EVAL_PAGE;
     }
 
-    public void setId(String id)
+    protected void encodeBegin() throws IOException
     {
-        throw new UnsupportedOperationException("1.2");
+        if( component == null )
+            throw new NullPointerException("UIComponent component");
+        
+        component.encodeBegin(ctx);
     }
 
-    protected String getId()
+    protected void encodeChildren() throws IOException
     {
-        throw new UnsupportedOperationException("1.2");
+        if( component == null )
+            throw new NullPointerException("UIComponent component");
+        
+        component.encodeChildren(ctx);
     }
 
-    protected String getFacesJspId()
+    protected void encodeEnd() throws IOException
     {
-        throw new UnsupportedOperationException("1.2");
+        if( component == null )
+            throw new NullPointerException("UIComponent component");
+        
+        component.encodeEnd(ctx);
     }
 
-    private boolean isDuplicateId(String componentId)
+    public void setPageContext(PageContext pageContext)
     {
-        throw new UnsupportedOperationException("1.2");
+        this.pageContext = pageContext;
     }
 
-    private String generateIncrementedId(String componentId)
+    public Tag getParent()
     {
-        throw new UnsupportedOperationException("1.2");
+        return parent;
     }
 
-    protected List<String> getCreatedComponents()
+    public void setParent(Tag parent)
     {
-        throw new UnsupportedOperationException("1.2");
+        this.parent = parent;
     }
 
-    private String createId() throws JspException
+    protected void setupResponseWriter()
     {
-        throw new UnsupportedOperationException("1.2");
+        // intentional no-op
     }
 
-    public void setJspId(String id)
+    public BodyContent getBodyContent()
     {
-        throw new UnsupportedOperationException("1.2");
+        return bodyContent;
     }
 
-    private void updatePreviousJspIdAndIteratorStatus(String id)
+    public void setId(String id)
     {
-        throw new UnsupportedOperationException("1.2");
+        if( id != null && id.startsWith(UIViewRoot.UNIQUE_ID_PREFIX) )
+            throw new IllegalArgumentException("This is not a bug - @id may not begin w/
" + UIViewRoot.UNIQUE_ID_PREFIX);
+        
+        this.id = id;
     }
 
-    private boolean isIncludedOrForwarded()
+    protected String getId()
     {
-        throw new UnsupportedOperationException("1.2");
+        return id;
     }
 
     public String getJspId()
     {
-        throw new UnsupportedOperationException("1.2");
+        return jspId;
     }
 
     protected abstract void setProperties(UIComponent component);
@@ -273,24 +314,7 @@
 
     public UIComponent getComponentInstance()
     {
-        throw new UnsupportedOperationException("1.2");
-
-    }
-
-    public boolean getCreated()
-    {
-        throw new UnsupportedOperationException("1.2");
-    }
-
-    protected FacesContext getFacesContext()
-    {
-        throw new UnsupportedOperationException("1.2");
-
-    }
-
-    protected String getFacetName()
-    {
-        throw new UnsupportedOperationException("1.2");
+        return component;
     }
 
 }

Modified: myfaces/core/branches/jsf12/api/src/main/java/javax/faces/webapp/UIComponentTagBase.java
URL: http://svn.apache.org/viewvc/myfaces/core/branches/jsf12/api/src/main/java/javax/faces/webapp/UIComponentTagBase.java?rev=414132&r1=414131&r2=414132&view=diff
==============================================================================
--- myfaces/core/branches/jsf12/api/src/main/java/javax/faces/webapp/UIComponentTagBase.java
(original)
+++ myfaces/core/branches/jsf12/api/src/main/java/javax/faces/webapp/UIComponentTagBase.java
Wed Jun 14 00:14:50 2006
@@ -25,7 +25,7 @@
 
     protected ELContext getELContext()
     {
-        throw new UnsupportedOperationException("1.2");
+        return getFacesContext().getELContext();
     }
 
     protected abstract FacesContext getFacesContext();



Mime
View raw message