On 11/14/06, Torsten Krah <[EMAIL PROTECTED]> wrote:

I am using clay - espacially i am using clay only as the html views and
the composition of components through inheritance is a dream :-), and
navigation between non clay views ( jsp ) and clay ones ( html ) is
broken - so i have to choose clay or non clay  ( wrote a post to the
list which is unanswered yet ).
I'll rename it - but this does break the evaluation of the el
expressions in the template - the error page would be useless, have i
have to use a jsp one?
If clay html templates, to render the error page, are not possible - can
i do anything to make it work?



The challenge here is that, by the time the servlet container's error
handling mechanism is invoked, the JSF lifecycle has been completed ... so
you won't be able to use any JSF technology to produce the error page.

One approach to consider would be to customize the error handling mechanism
of the view controller ... it is called each time an exception is trapped
(by default, it just queues them up), and again at the end of the request to
deal with any accumulated exceptions (by default, throws an
ApplicationException with the list of trapped exceptions).  Consider doing
an ExternalContext.dispatch() call to your "error handler" view, either as
soon as an exception has occurred or just before rendering takes place.
That way, it is just a normal JSF page rather than the servlet container's
error handler that displays the error to the user.


Torsten


Craig


Am Dienstag, den 14.11.2006, 12:38 +0000 schrieb Gary VanMatre:
> >Debugged things a little bit:
> >
> >        at
> >javax.faces.component.UIComponentBase.getRenderer(UIComponentBase.java
:738)
> >        at
> >javax.faces.component.UIComponentBase.getRendersChildren(
UIComponentBase.java:30
> >7)
> >        at
> >org.apache.shale.clay.faces.ClayViewHandler.recursiveRender(
ClayViewHandler.java
> >:462)
> >        at
> >org.apache.shale.clay.faces.ClayViewHandler.renderView(
ClayViewHandler.java:398)
> >
> >
> >At the viewhandler in line 462 all is fine, a context is there.
> >But when the children are going to be rendered, the call to
> >FacesContext.getCurrentInstance() returns null.
> >
> >Might this be a bug in the jsf implemantation or does shale destroy
> >things which it shouldn't?
> >Any help would be nice - i don't know why the context gets lost,
> >something i should look for in clay or shale which would be nice debug
> >points?
>
> It sounds as if your target error page has an .html suffix and you have
the shale-clay.jar in your web project.  If the error page has not been
dispatched thru the faces servlet, the FacesContext will not be setup.
>
> If you are not using Clay in the project, I'd try removing the clay
jar.  Otherwise, try renaming your error page to error.htm or something
that has another suffix.
>
>
> >Torsten
> >
>
> Gary



Reply via email to