incubator-adffaces-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Stefan Podkowinski (JIRA)" <>
Subject [jira] Created: (ADFFACES-387) setting renderKitId per view does not work with facelets
Date Wed, 21 Feb 2007 17:43:07 GMT
setting renderKitId per view does not work with facelets

                 Key: ADFFACES-387
             Project: MyFaces ADF-Faces
          Issue Type: Bug
          Components: Facelets
         Environment: trinidad trunk and 1.2 branch, facelets 1.1.12, jsf ri 1.2.03
            Reporter: Stefan Podkowinski

Currently it does not seem to be possible to use trinidad with jsf1.2
ri and facelets and not having trinidad declared as default rendering



from faces-config.xml and adding the render kit declaration to the view root

<f:view ... renderKitId="org.apache.myfaces.trinidad.core">

will break the view handling process with the following error:

java.lang.IllegalStateException: No RenderingContext
       at org.apache.myfaces.trinidad.render.CoreRenderer.encodeBegin(
       at org.apache.myfaces.trinidad.component.UIXComponentBase.encodeBegin(
       at org.apache.myfaces.trinidad.component.UIXComponentBase.__encodeRecursive(
       at org.apache.myfaces.trinidad.component.UIXComponentBase.encodeAll(
       at javax.faces.component.UIComponent.encodeAll(
       at com.sun.facelets.FaceletViewHandler.renderView(
       at org.apache.myfaces.trinidadinternal.application.ViewHandlerImpl.renderView(
       at com.sun.faces.lifecycle.RenderResponsePhase.execute(

After doing some debuging, I came to the conclusion that this must be
due to the trinidad ViewHandlerImpl.renderView() method
implementation. The problem is the way the ViewHandlerImpl wraps the
delegate, but needs to setup the RenderingContext before the delegate
is executed. Creating the RenderingContext is currently done by
CoreRenderKit.encodeBegin(). But this won't never happen in this case,
because facelets did not parse the page including the <f:view
renderKitId..> element yet, so we don't know which render kit to use
before calling the facelets delegate!

So here's whats happening in ViewHandlerImpl:
160: ExtendedRenderKitService cannot be found because trinidad is not
the default anymore
172: CoreRenderKit will not be called to setup RenderingContext (thread local)
182: delegation to FaceletViewHandler
fails on non initialized thread local.

What do you think? Is there a chance to reimplement
ViewHandlerImpl.renderView() so this problem could be resolved? Any
possible side effects?

Reference to trinidad-dev thread:

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

View raw message