myfaces-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jakob Korherr (JIRA)" <>
Subject [jira] Resolved: (MYFACES-2641) Use the application's ViewHandler to create the view in FaceletViewMetadata
Date Fri, 02 Apr 2010 15:48:32 GMT


Jakob Korherr resolved MYFACES-2641.

       Resolution: Fixed
    Fix Version/s: 2.0.0-beta-4

> Use the application's ViewHandler to create the view in FaceletViewMetadata
> ---------------------------------------------------------------------------
>                 Key: MYFACES-2641
>                 URL:
>             Project: MyFaces Core
>          Issue Type: Bug
>          Components: JSR-314
>    Affects Versions: 2.0.0-beta-3
>         Environment: MyFaces core trunk + Trinidad jsf2_ajax.3 branch
>            Reporter: Jakob Korherr
>            Assignee: Jakob Korherr
>             Fix For: 2.0.0-beta-4
> When the current VDL is FaceletViewDeclarationLanguage, the ViewMetadata impl for facelets
(FaceletViewMetadata) is used to create the view the following way in RestoreViewExecutor:
> viewRoot = metadata.createMetadataView(facesContext);
> The method createMetadataView() then directly invokes createView() in the surrounding
class (FaceletViewDeclarationLanguage) to create the view. This works for most cases, because
normally when using FaceletViewMetadata as the ViewMetadata impl, FaceletViewDeclarationLanguage
will be the VDL and the default ViewHandler implementation only redirects the call to createView()
to the right VDL.
> However in Trinidad's AJAX branch (jsf2_ajax.3) another ViewHandler implementation is
used (org.apache.myfaces.trinidadinternal.application.ViewHandlerImpl), which does some work
before calling createView() on the right VDL. This work is storing the last modified date
of the accessed file to discover any modifications of it.
> If we now not call createView() on Trinidad's ViewHandler impl but directly on the FaceletVDL,
this work will not happen and the last modified date will not be available for the next request.
So the next request, which will be a postback to this view, has no last modified information
about the requested view and thus it will throw a ViewExpiredException like this one:
> javax.faces.application.ViewExpiredException: /index.jspxNo saved view
> state could be found for the view identifier: /index.jspx
>        at org.apache.myfaces.lifecycle.RestoreViewExecutor.execute(
>        at org.apache.myfaces.lifecycle.LifecycleImpl.executePhase(
>        at org.apache.myfaces.lifecycle.LifecycleImpl.execute(
>        at javax.faces.webapp.FacesServlet.service(
>        at org.mortbay.jetty.servlet.ServletHolder.handle(
>        at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(
>        at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl._doFilterImpl(
>        at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl.doFilter(
>        at org.apache.myfaces.trinidad.webapp.TrinidadFilter.doFilter(
>        at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(
>        at org.apache.myfaces.trinidaddemo.webapp.RedirectFilter.doFilter(
>        at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(
>        at org.mortbay.jetty.servlet.ServletHandler.handle(
>        at
>        at org.mortbay.jetty.servlet.SessionHandler.handle(
>        at org.mortbay.jetty.handler.ContextHandler.handle(
>        at org.mortbay.jetty.webapp.WebAppContext.handle(
>        at org.mortbay.jetty.handler.ContextHandlerCollection.handle(
>        at org.mortbay.jetty.handler.HandlerCollection.handle(
>        at org.mortbay.jetty.handler.HandlerWrapper.handle(
>        at org.mortbay.jetty.Server.handle(
>        at org.mortbay.jetty.HttpConnection.handleRequest(
>        at org.mortbay.jetty.HttpConnection$RequestHandler.content(
>        at org.mortbay.jetty.HttpParser.parseNext(
>        at org.mortbay.jetty.HttpParser.parseAvailable(
>        at org.mortbay.jetty.HttpConnection.handle(
>        at
>        at org.mortbay.thread.QueuedThreadPool$
> The related thread to this issue from the mailing list can be found here:

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

View raw message