1 Reply Latest reply on Mar 15, 2010 4:30 PM by Nick Belaevski

    FaceletFactory.getInstance() returns NULL?

    Sandeep Gowda Newbie
      Hi,

      I am using Richfaces in JSF, whenever i try with below method, it returns NULL.

        • 1. Re: FaceletFactory.getInstance() returns NULL?
          Nick Belaevski Master

          Hi,

           

          That doesn't depend in RichFaces. Here is the piece of code (com.sun.facelets.FaceletViewHandler#buildView(FacesContext, UIViewRoot)) that explains why this happens:

           

                  Facelet f = null;
                  FaceletFactory.setInstance(this.faceletFactory);
                  try {
                      f = this.faceletFactory.getFacelet(viewToRender.getViewId());
                  } finally {
                      FaceletFactory.setInstance(null);
                  }