myfaces-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Pavitra Subramaniam (JIRA)" <...@myfaces.apache.org>
Subject [jira] Created: (TRINIDAD-1649) UnsupportedOperationException when rendering 'updates' for the render target on postback
Date Wed, 02 Dec 2009 00:38:20 GMT
UnsupportedOperationException when rendering 'updates' for the render target on postback
----------------------------------------------------------------------------------------

                 Key: TRINIDAD-1649
                 URL: https://issues.apache.org/jira/browse/TRINIDAD-1649
             Project: MyFaces Trinidad
          Issue Type: New Feature
          Components: Components
    Affects Versions: 2.0.0-core
         Environment: Running Trinidad 2.0.x; with Facelets; no Partial State Saving and using
JSF Ajax request rather than the Trinidad PPR mechanism

            Reporter: Pavitra Subramaniam


1. Download the patch onto your Trinidad 2.0.x branch (minus the ResponseWriter class changes).
Run the page ajaxPPRDemos.jspx. Click on the "Partial Submit" button which posts back to the
server using the JSF Ajax communication channel rather than the trinidad. Notice the UnsupportedOperationException.

java.lang.UnsupportedOperationException
 at javax.faces.context.ResponseWriter.endCDATA(ResponseWriter.java:212)
 at javax.faces.context.ResponseWriterWrapper.endCDATA(ResponseWriterWrapper.java:183)
 at javax.faces.context.PartialResponseWriter.endUpdate(PartialResponseWriter.java:208)
 at com.sun.faces.context.PartialViewContextImpl$PhaseAwareVisitCallback.visit
     (PartialViewContextImpl.java:494)
 at com.sun.faces.component.visit.PartialVisitContext.invokeVisitCallback
     (PartialVisitContext.java:175)
 at javax.faces.component.UIComponent.visitTree(UIComponent.java:1443)
 at javax.faces.component.UIComponent.visitTree(UIComponent.java:1454)

2. It looks like JSF 2.0 added new methods startCDATA() and endCDATA() methods, which need
to be used by the trinidad ResponseWriterDecorator and other implemetations of ResponseWriter.


3. the ReponseWriter fixes patch makes the following fixes:

ResponseWriterDecorator.java (now extends ResponseWriterWrapper. Ideally we should remove
ResponseWriterDecorator entirely and just use JSF2.0 ResponseWriterWrapper)
HtmlResponseWriter.java (overrides 2 new methods sneakily added to javax.faces.context.ResponseWriter
but never really gives a compilation error).
XmlResponseWriter.java (same as above)
XhtmlResponseWriter.java (-do-)

Note that under normal circumstances these exceptions are not seen. Only when testing with
JSF 2.0 Ajax. 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message