myfaces-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Leis, Matthias - SID-NLKM" <Matthias.L...@sid.sachsen.de>
Subject AW: MyFaces 2.0.0 - removing facelets results in blank page
Date Wed, 23 Jun 2010 10:18:54 GMT
I got my view rendered :)

Thanks to a reader of the mailing list!

Problem was: I had PrimeFaces for JSF 1.2 on my classpath (because this works with external
facelets). When switching to internal faceletes, I had to replace it with PrimeFaces for JSF
2. This could also happen with RichFaces or IceFaces with non-JSF-2-compatible versions.



-----Ursprüngliche Nachricht-----
Von: users-return-56860-Matthias.Leis=sid.sachsen.de@myfaces.apache.org [mailto:users-return-56860-Matthias.Leis=sid.sachsen.de@myfaces.apache.org]
Im Auftrag von Simon Lessard
Gesendet: Freitag, 18. Juni 2010 15:32
An: MyFaces Discussion
Betreff: Re: MyFaces 2.0.0 - removing facelets results in blank page

Hi,

No, you're inspecting the right object. However, with JSF 2.0's Facelets
integration, the children list should not be null at that point, it should
be automatically populated by the createView method that gets called either
during restore view (for first access), after apply request values (with
navigation from an immediate button) or after invoke application (navigation
from a non immediate button).


~ Simon

On Fri, Jun 18, 2010 at 2:38 AM, Leis, Matthias - SID-NLKM <
Matthias.Leis@sid.sachsen.de> wrote:

> Hi Simon,
>
> I set a breakpoint before the RENDER_RESPONSE phase and inspected
> FacesContext.context.currentView.viewRoot. The property "childrenList" is
> null. But it's also null if I use external facelets (where everything works
> fine). So I guess I'm not inspecting the right object. So my (propably
> stupid) question is: how to inspect the component tree?
>
> Regards,
> Matthias
>
>
> -----Ursprüngliche Nachricht-----
> Von: users-return-56847-Matthias.Leis=sid.sachsen.de@myfaces.apache.org[mailto:
> users-return-56847-Matthias.Leis=sid.sachsen.de@myfaces.apache.org] Im
> Auftrag von Simon Lessard
> Gesendet: Donnerstag, 17. Juni 2010 16:16
> An: MyFaces Discussion
> Betreff: Re: MyFaces 2.0.0 - removing facelets results in blank page
>
> Hi Matthias,
>
> I meant is the tree empty, only a view root with no children, or is the
> component tree fully populated?
>
> ~ Simon
>
> On Thu, Jun 17, 2010 at 4:18 AM, Leis, Matthias - SID-NLKM <
> Matthias.Leis@sid.sachsen.de> wrote:
>
> > Hi,
> >
> > I'm not sure what you mean. The UIViewRoot built in createView() looks
> > pretty much the same, as the one in the before render Phase. But I don't
> > know if this is what you meant. Nearly all values are null, I can't see
> any
> > components.
> >
> > Matthias
> >
> > -----Ursprüngliche Nachricht-----
> > Von: users-return-56838-Matthias.Leis=sid.sachsen.de@myfaces.apache.org
> [mailto:
> > users-return-56838-Matthias.Leis=sid.sachsen.de@myfaces.apache.org] Im
> > Auftrag von Simon Lessard
> > Gesendet: Mittwoch, 16. Juni 2010 20:03
> > An: MyFaces Discussion
> > Betreff: Re: MyFaces 2.0.0 - removing facelets results in blank page
> >
> > Hi,
> >
> > Try setting the breakpoint in createView. Facelets differs from JSP at
> VDL
> > level by loading the view in the createView method, not renderView. If
> > renderView pushes nothing on the client, it should be because the
> component
> > tree is empty. You could add a PhaseListener to your application and
> > inspect
> > the component tree in the before render phase to be sure that it's what's
> > happening.
> >
> >
> > ~ Simon
> >
> > On Wed, Jun 16, 2010 at 9:11 AM, Leis, Matthias - SID-NLKM <
> > Matthias.Leis@sid.sachsen.de> wrote:
> >
> > > Hi Jakob,
> > >
> > > Yes, I am using spring :)
> > > The Application uses org.springframework.faces.webflow.FlowViewHandler,
> > > which has a delegate: org.apache.myfaces.application.ViewHandlerImpl
> > >
> > > I set a break point in the method renderView().
> > > My guess is, that in renderView(FacesContext context, UIViewRoot view)
> of
> > > org.apache.myfaces.view.facelets.FaceletViewDeclarationLanguage the
> > "writer"
> > > writes nothing. The ByteArrayOutputStream deep under this writer only
> > > contains zeros. But honestly, I don't know what going on there ;). I
> also
> > > noticed that the boolean "writtenState" evaluates to false.. But I
> don't
> > > really know what this means in this context.
> > >
> > > But we can say, that Spring isn't messing with MyFaces because it
> > delegates
> > > to MyFaces' ViewHandler, right?
> > >
> > > Regards,
> > >
> > > Matthias
> > >
> > >
> > > -----Ursprüngliche Nachricht-----
> > > Von: sethfromaustria@gmail.com [mailto:sethfromaustria@gmail.com] Im
> > > Auftrag von Jakob Korherr
> > > Gesendet: Mittwoch, 16. Juni 2010 14:33
> > > An: MyFaces Discussion
> > > Betreff: Re: MyFaces 2.0.0 - removing facelets results in blank page
> > >
> > > Hi,
> > >
> > > I guess you are using Spring, right? Maybe there is some Spring
> > > configuration messing with the JSF 2.0 ViewHandler.
> > >
> > > Or did you disable the JSF 2.0 facelets support via
> > > javax.faces.DISABLE_FACELET_JSF_VIEWHANDLER?
> > >
> > > If not, you could try to find out which ViewHandler your application
> > really
> > > uses (via facesContext.getApplication().getViewHandler()). It should be
> > > org.apache.myfaces.application.ViewHandlerImpl. If it really is
> > > ViewHandlerImpl, you could try to set a debug point into
> > > ViewHandlerImpl.renderView() and see what happens.
> > >
> > > Regards,
> > > Jakob
> > >
> > > 2010/6/16 Leis, Matthias - SID-NLKM <Matthias.Leis@sid.sachsen.de>
> > >
> > > > Hi!
> > > >
> > > > I am using MyFaces 2.0.0. Today I noticed, that jsf-facelets.jar was
> > > > still in my libs, so I removed it. I also removed the corresponding
> > > > view-handler configuration in faces-config.xml. Now I am getting a
> > blank
> > > > page whenever I try to access my application.
> > > >
> > > > I think two DEBUG-Messages could be interesting:
> > > > 14:00:08,226 DEBUG [JsfView] Asking view handler to render view
> > > > 14:00:08,226 DEBUG [JsfView] View rendering complete
> > > >
> > > > So there is a view-handler, but it seems to do nothing (also look at
> > the
> > > > time stamp).
> > > >
> > > > Any suggestions are appreciated :)
> > > >
> > >
> > >
> > >
> > > --
> > > Jakob Korherr
> > >
> > > blog: http://www.jakobk.com
> > > twitter: http://twitter.com/jakobkorherr
> > > work: http://www.irian.at
> > >
> >
>

Mime
View raw message