myfaces-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mat...@apache.org
Subject svn commit: r889131 - in /myfaces/trinidad/branches/trinidad-2.0.x/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal: io/ renderkit/core/ppr/
Date Thu, 10 Dec 2009 08:22:28 GMT
Author: matzew
Date: Thu Dec 10 08:22:25 2009
New Revision: 889131

URL: http://svn.apache.org/viewvc?rev=889131&view=rev
Log:
TRINIDAD-1649 - UnsupportedOperationException when rendering 'updates' for the render target
on postback

Modified:
    myfaces/trinidad/branches/trinidad-2.0.x/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/io/HtmlResponseWriter.java
    myfaces/trinidad/branches/trinidad-2.0.x/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/io/ResponseWriterDecorator.java
    myfaces/trinidad/branches/trinidad-2.0.x/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/io/XhtmlResponseWriter.java
    myfaces/trinidad/branches/trinidad-2.0.x/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/ppr/XmlResponseWriter.java

Modified: myfaces/trinidad/branches/trinidad-2.0.x/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/io/HtmlResponseWriter.java
URL: http://svn.apache.org/viewvc/myfaces/trinidad/branches/trinidad-2.0.x/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/io/HtmlResponseWriter.java?rev=889131&r1=889130&r2=889131&view=diff
==============================================================================
--- myfaces/trinidad/branches/trinidad-2.0.x/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/io/HtmlResponseWriter.java
(original)
+++ myfaces/trinidad/branches/trinidad-2.0.x/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/io/HtmlResponseWriter.java
Thu Dec 10 08:22:25 2009
@@ -69,6 +69,26 @@
   {
   }
 
+  /**
+   * Writes out CDATA start.
+   * @throws IOException on any read/write error
+   */
+  public void startCDATA() throws IOException 
+  {
+    _closeStartIfNecessary();
+    _out.write("<![CDATA[");
+
+  }
+
+  /**
+   * Writes out an end CDATA element.
+   * @throws IOException on any read/write error
+   */
+  public void endCDATA() throws IOException 
+  {
+    _out.write("]]>");
+  }
+
 
   @Override
   public void endDocument() throws IOException

Modified: myfaces/trinidad/branches/trinidad-2.0.x/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/io/ResponseWriterDecorator.java
URL: http://svn.apache.org/viewvc/myfaces/trinidad/branches/trinidad-2.0.x/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/io/ResponseWriterDecorator.java?rev=889131&r1=889130&r2=889131&view=diff
==============================================================================
--- myfaces/trinidad/branches/trinidad-2.0.x/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/io/ResponseWriterDecorator.java
(original)
+++ myfaces/trinidad/branches/trinidad-2.0.x/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/io/ResponseWriterDecorator.java
Thu Dec 10 08:22:25 2009
@@ -18,17 +18,15 @@
  */
 package org.apache.myfaces.trinidadinternal.io;
 
-import java.io.IOException;
-import java.io.Writer;
-
-import javax.faces.component.UIComponent;
 import javax.faces.context.ResponseWriter;
+import javax.faces.context.ResponseWriterWrapper;
 
 /**
  * ResponseWriter abstract base used to decorate another ResponseWriter.
- * 
+ *
+ * @Deprecated Use ResponseWriterWrapper direcly
  */
-abstract public class ResponseWriterDecorator extends ResponseWriter
+abstract public class ResponseWriterDecorator extends ResponseWriterWrapper
 {
   /**
    * Create a ResponseWriterDecorator.
@@ -48,151 +46,18 @@
     return _decorated;
   }
 
-  @Override
-  public String getCharacterEncoding()
-  {
-    return getResponseWriter().getCharacterEncoding();
-  }
-
-  @Override
-  public String getContentType()
-  {
-    return getResponseWriter().getContentType();
-  }
-
-  @Override
-  public void startDocument() throws IOException
-  {
-    getResponseWriter().startDocument();
-  }
-
-
-  @Override
-  public void endDocument() throws IOException
-  {
-    getResponseWriter().endDocument();
-  }
-
-  @Override
-  public void flush() throws IOException
-  {
-    getResponseWriter().flush();
-  }
-
-
-  @Override
-  public void close()throws IOException
-  {
-    getResponseWriter().close();
-  }
-
-  @Override
-  public void startElement(String name,
-                           UIComponent component) throws IOException
-  {
-    getResponseWriter().startElement(name, component);
-  }
-
-  
-  @Override
-  public void endElement(String name) throws IOException
-  {
-    getResponseWriter().endElement(name);
-  }
-
-
-  @Override
-  public void writeAttribute(String name,
-                             Object value,
-                             String componentPropertyName)
-        throws IOException
-  {
-    getResponseWriter().writeAttribute(name, value, componentPropertyName);
-  }
-
-
-  @Override
-  public void writeURIAttribute(String name,
-                                Object value,
-                                String componentPropertyName)
-    throws IOException
-  {
-    getResponseWriter().writeURIAttribute(name, value, componentPropertyName);
-  }
-
-  @Override
-  public void writeComment(Object comment) throws IOException
-  {
-    getResponseWriter().writeComment(comment);
-  }
-
-
-
-  @Override
-  public void writeText(Object text, UIComponent component, 
-                        String propertyName)
-    throws IOException
-  {
-    getResponseWriter().writeText(text, component, propertyName);
-  }
-  
-  @Override
-  public void writeText(Object text, String componentPropertyName) throws IOException
-  {
-    getResponseWriter().writeText(text, componentPropertyName);
-  }
-
-
-  @Override
-  public void writeText(char text[], int off, int len)
-        throws IOException
-  {
-    getResponseWriter().writeText(text, off, len);
-  }
-
-  @Override
-  public void write(char cbuf[], int off, int len) throws IOException
-  {
-    getResponseWriter().write(cbuf, off, len);
-  }
-
-  @Override
-  public void write(String str) throws IOException
-  {
-    getResponseWriter().write(str);
-  }
-
-  @Override
-  public void write(int c) throws IOException
-  {
-    getResponseWriter().write((char) c);
-  }
-
-  @Override
-  public void write(char[] cbuf)
-    throws IOException
-  {
-    getResponseWriter().write(cbuf);
-  }
-
-  @Override
-  public void write(String str, int off, int len)
-    throws IOException
-  {
-    getResponseWriter().write(str, off, len);
-  }
-
-  @Override
-  public ResponseWriter cloneWithWriter(Writer writer)
-  {
-    return getResponseWriter().cloneWithWriter(writer);
-  }
-
   public String toString()
   {
     return super.toString() + "[" + _decorated.toString() + "]";
     
   }
+  
+  @Override
+  public ResponseWriter getWrapped()
+  {
+    return getResponseWriter();
+  }  
 
   private final ResponseWriter _decorated;
+
 }

Modified: myfaces/trinidad/branches/trinidad-2.0.x/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/io/XhtmlResponseWriter.java
URL: http://svn.apache.org/viewvc/myfaces/trinidad/branches/trinidad-2.0.x/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/io/XhtmlResponseWriter.java?rev=889131&r1=889130&r2=889131&view=diff
==============================================================================
--- myfaces/trinidad/branches/trinidad-2.0.x/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/io/XhtmlResponseWriter.java
(original)
+++ myfaces/trinidad/branches/trinidad-2.0.x/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/io/XhtmlResponseWriter.java
Thu Dec 10 08:22:25 2009
@@ -67,17 +67,36 @@
     return XHTML_CONTENT_TYPE;
   }
 
+
   @Override
   public void startDocument() throws IOException
   {
   }
 
-
   @Override
   public void endDocument() throws IOException
   {
     _out.flush();
   }
+  
+  /**
+   * Writes out CDATA start.
+   * @throws IOException on any read/write error
+   */
+  public void startCDATA() throws IOException 
+  {
+    _closeStartIfNecessary();
+    _out.write("<![CDATA[");
+  }
+
+  /**
+   * Writes out an end CDATA element.
+   * @throws IOException on any read/write error
+   */
+  public void endCDATA() throws IOException 
+  {
+    _out.write("]]>");
+  }
 
   @Override
   public void flush() throws IOException
@@ -464,4 +483,5 @@
   private static final Class<?> _INTEGER_CLASS = Integer.class;
 
   static private final TrinidadLogger _LOG = TrinidadLogger.createTrinidadLogger(XhtmlResponseWriter.class);
+
 }

Modified: myfaces/trinidad/branches/trinidad-2.0.x/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/ppr/XmlResponseWriter.java
URL: http://svn.apache.org/viewvc/myfaces/trinidad/branches/trinidad-2.0.x/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/ppr/XmlResponseWriter.java?rev=889131&r1=889130&r2=889131&view=diff
==============================================================================
--- myfaces/trinidad/branches/trinidad-2.0.x/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/ppr/XmlResponseWriter.java
(original)
+++ myfaces/trinidad/branches/trinidad-2.0.x/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/ppr/XmlResponseWriter.java
Thu Dec 10 08:22:25 2009
@@ -51,6 +51,26 @@
     _out.write("<?xml version=\"1.0\" ?>\n");
   }
 
+  /**
+   * Writes out CDATA start.
+   * @throws IOException on any read/write error
+   */
+  public void startCDATA() throws IOException 
+  {
+    closeStartIfNecessary();
+    _out.write("<![CDATA[");
+
+  }
+
+  /**
+   * Writes out an end CDATA element.
+   * @throws IOException on any read/write error
+   */
+  public void endCDATA() throws IOException 
+  {
+    _out.write("]]>");
+  }
+
   public void endDocument() throws IOException
   {
   }



Mime
View raw message