myfaces-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Henry Eduardo Iguaro" <henry.edua...@gmail.com>
Subject Re: [Trinidad] Rendering Context
Date Wed, 05 Mar 2008 14:52:28 GMT
I also had this problem before, but after playing around with the
configuration files the 'issue' stop showing... to tell you the truth i
don't know what i did, but check my configuration files, maybe there is
something you're missing

---------------------------------------------------------------------------------
faces-config.xml:
---------------------------------------------------------------------------------

<faces-config>
    <application>
        <default-render-kit-id>
            org.apache.myfaces.trinidad.core
        </default-render-kit-id>
    </application>

   ... Standar config stuff (managed-beans, navigation rules) ...

</faces-config>


---------------------------------------------------------------------------------
trinidad-config.xml
---------------------------------------------------------------------------------

<?xml version="1.0"?>

<trinidad-config xmlns="http://myfaces.apache.org/trinidad/config">
    <debug-output>true</debug-output>
    <skin-family>someSkin</skin-family>
</trinidad-config>

---------------------------------------------------------------------------------
web.xml
---------------------------------------------------------------------------------

<!--
////////////////////////////////////////////////////////////////////////////////////
-->
<!-- TRINIDAD CONFIGURATION SECTION
              -->
<!--
////////////////////////////////////////////////////////////////////////////////////
-->
    <context-param>
        <description>
            Trinidad supports two dialog implementations. The default
implementation pops a new browser window, but may be subject to popup
blocking issues depending on the browser. The alternative lightweight
implementation uses a skinnable modal iframe that hovers over the existing
page. This flag can be set to turn on lightweight dialogs.
        </description>
        <param-name>org.apache.myfaces.trinidad.ENABLE_LIGHTWEIGHT_DIALOGS
</param-name>
        <param-value>true</param-value>
    </context-param>

    <!-- Use client-side state saving.  In Trinidad, it is an
        optimized, token-based mechanism that is almost always a
        better choice than the standard JSF server-side state saving. -->
    <context-param>
        <param-name>javax.faces.STATE_SAVING_METHOD</param-name>
        <param-value>client</param-value>
        <!--param-value>server</param-value-->
    </context-param>

    <context-param>
        <param-name>javax.faces.DEFAULT_SUFFIX</param-name>
        <param-value>.jsp</param-value>
    </context-param>

    <!-- For debuggin purposes -->
    <context-param>
        <param-name>
            org.apache.myfaces.trinidad.resource.DEBUG
        </param-name>
        <param-value>true</param-value>
    </context-param>

    <!-- Trinidad by default uses an optimized client-side state saving
        mechanism. To disable that, uncomment the following -->
<!--
    <context-param>
        <param-name>org.apache.myfaces.trinidad.CLIENT_STATE_METHOD
</param-name>
        <param-value>all</param-value>
    </context-param>
 -->

    <!-- Trinidad also supports an optimized strategy for caching some
        view state at an application level, which significantly improves
        scalability.  However, it makes it harder to develop (updates to
        pages will not be noticed until the server is restarted), and in
        some rare cases cannot be used for some pages (see Trinidad
        documentation for more information) -->
    <context-param>
        <param-name>
            org.apache.myfaces.trinidad.USE_APPLICATION_VIEW_CACHE
        </param-name>
        <param-value>false</param-value>
    </context-param>

    <!-- If this parameter is enabled, Trinidad will automatically
        check the modification date of your JSPs, and discard saved
        state when they change;  this makes development easier,
        but adds overhead that should be avoided when your application
        is deployed -->
    <context-param>
        <param-name>
            org.apache.myfaces.trinidad.CHECK_FILE_MODIFICATION
        </param-name>
        <param-value>true</param-value>
    </context-param>

    <!-- Enables Change Persistence at a session scope.  By default,
        Change Persistence is entirely disabled. The ChangeManager is
        an API, which can persist component modifications (like,
        is a showDetail or tree expanded or collapsed). For providing
        a custom Change Persistence implementation inherit from the
        Trinidad API's ChangeManager class. As the value you have
        to use the fullqualified class name. -->
    <context-param>
        <param-name>
            org.apache.myfaces.trinidad.CHANGE_PERSISTENCE
        </param-name>
        <param-value>session</param-value>
    </context-param>

    <filter>
        <filter-name>trinidad</filter-name>
        <filter-class>
            org.apache.myfaces.trinidad.webapp.TrinidadFilter
        </filter-class>
    </filter>

    <filter-mapping>
        <filter-name>trinidad</filter-name>
        <servlet-name>faces</servlet-name>
    </filter-mapping>

    <!-- Resource Loader Servlet -->
    <servlet>
        <servlet-name>resources</servlet-name>
        <servlet-class>
            org.apache.myfaces.trinidad.webapp.ResourceServlet
        </servlet-class>
    </servlet>

    <servlet-mapping>
        <servlet-name>resources</servlet-name>
        <url-pattern>/adf/*</url-pattern>
    </servlet-mapping>

<!--
////////////////////////////////////////////////////////////////////////////////////
-->
<!-- STANDARD JSF CONFIGURATION SECTION
              -->
<!--
////////////////////////////////////////////////////////////////////////////////////
-->

    <!-- Faces Servlet -->
    <servlet>
        <servlet-name>faces</servlet-name>
        <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
    </servlet>

    <!-- Faces Servlet Mappings -->
    <servlet-mapping>
        <servlet-name>faces</servlet-name>
        <url-pattern>/faces/*</url-pattern>
    </servlet-mapping>

Additional, i added the tomahawk-1.1.6 and
tomahawk-sandbox-1.1.7-SNAPSHOTjars to the project, but without adding
any configuration statements in the
web.xml file

Check if there is anything here that removes the warning

2008/3/5, Shane Petroff <shane@mayet.ca>:
>
> Hello,
>
> I have what seems to be a configuration problem. It doesn't seem to
> affect much (although it isn't the only issue I have at the moment, so
> I'm not sure), but it is unnerving to see in the trace.
>
> Mar 4, 2008 4:52:58 PM
> org.apache.myfaces.trinidad.context.RenderingContext attach
> WARNING: Trying to attach RenderingContext to a thread that already had
> one.
> Mar 4, 2008 4:53:01 PM
> org.apache.myfaces.trinidadinternal.context.RequestContextImpl
> _createChangeManager
> INFO: Apache Trinidad is using HTTPSession for change persistence
> Mar 4, 2008 4:53:02 PM
> org.apache.myfaces.trinidadinternal.renderkit.core.CoreRenderKit
> encodeFinally
> WARNING: No RenderingContext available
> Mar 4, 2008 4:53:02 PM
> org.apache.myfaces.trinidad.context.RenderingContext attach
> WARNING: Trying to attach RenderingContext to a thread that already had
> one.
> Mar 4, 2008 4:53:02 PM
> org.apache.myfaces.trinidadinternal.renderkit.core.CoreRenderKit
> encodeFinally
> WARNING: No RenderingContext available
>
> The RenderingContext warnings appear in every page, regardless of
> whether or not I have any Trinidad components.
>
> The obvious faces-config setting is correct (I've tried trinidadinternal
> as well)
>
>
> <default-render-kit-id>org.apache.myfaces.trinidad.core
> </default-render-kit-id>
>
> web.xml is configured as
>
>     <context-param>
>       <param-name>org.apache.myfaces.trinidad.CACHE_VIEW_ROOT</param-name>
>       <param-value>false</param-value>
>     </context-param>
>     <context-param>
>
> <param-name>org.apache.myfaces.trinidad.USE_APPLICATION_VIEW_CACHE
> </param-name>
>       <param-value>false</param-value>
>     </context-param>
>     <context-param>
>
> <param-name>org.apache.myfaces.trinidad.CHECK_FILE_MODIFICATION
> </param-name>
>       <param-value>true</param-value>
>     </context-param>
>     <context-param>
>
> <param-name>org.apache.myfaces.trinidad.CHANGE_PERSISTENCE</param-name>
>       <param-value>session</param-value>
>     </context-param>
>     <context-param>
>        <param-name>javax.faces.DEFAULT_SUFFIX</param-name>
>        <param-value>.jsp</param-value>
>     </context-param>
>     <context-param>
>
> <param-name>org.apache.myfaces.trinidad.ENABLE_LIGHTWEIGHT_DIALOGS
> </param-name>
>       <param-value>true</param-value>
>     </context-param>
>
> Obviously, the filter, servlet and mappings are set up too.
>
> This app is being 'ported' from tomahawk to trinidad (I'm dropping
> tomahawk in favour of trinidad). To that end, the changes to jsp pages
> have been minimal apart from converting to tr:document and tr:form
> (which means that I do have trinidad components on every page, but I had
> the same warnings before converting on pages which did not yet use any
> trinidad components). The few trinidad components that I've tried do
> seem to work, I'd just like to get a handle on what the warnings mean
> before trying to figure out my other issues.
>
> Thanks.
>
> --
>
> Shane
>
>


-- 
-----BEGIN GEEK CODE BLOCK-----
Version: 3.1
GCS/O G++@ s-:+>:+ a25 tv+ d++> t+ C+++>+ U++>+++ P+ L++>+++ W+++ E---- w++$
5 X R-@ b+>++ D+ e>++ o? O? h--@ r+ y++ K? M PS+
------END GEEK CODE BLOCK------

Mime
View raw message