Package org.apache.myfaces.view.facelets

Public Facelet API.

See:
          Description

Interface Summary
TemplateClient FaceletHandlers can implement this contract and push themselves into the FaceletContext for participating in templating.
 

Class Summary
AbstractFaceletContext This class contains methods that belongs to original FaceletContext shipped in facelets code before 2.0, but does not take part from api, so are considered implementation details.
DefaultFaceletsStateManagementStrategy This class implements partial state saving feature when facelets is used to render pages.
DefaultFaceletsStateManagementStrategy.PostAddPreRemoveFromViewListener  
DefaultFaceletsStateManagementStrategy.TreeStructComponent  
Facelet The parent or root object in a FaceletHandler composition.
FaceletFactory FaceletFactory for producing Facelets relative to the context of the underlying implementation.
FaceletViewDeclarationLanguage This class represents the abstraction of Facelets as a ViewDeclarationLanguage.
FaceletViewDeclarationLanguageStrategy  
FaceletViewHandler Deprecated. code refactored to FaceletViewDeclarationLanguage
FaceletViewHandler.NullWriter  
PostBuildComponentTreeOnRestoreViewEvent  
StateWriter A class for handling state insertion.
 

Package org.apache.myfaces.view.facelets Description

Public Facelet API. Most developers should be able to utilizing the framework using the public classes and interfaces.

An application that wishes to use Facelets as a ViewHandler, they must specify the following in their faces-config.xml (@see com.sun.facelets.FaceletViewHandler).


<application>
  <view-handler>com.sun.facelets.FaceletViewHandler</view-handler>
</application>

Below is sample code for using Facelets at the API level with JavaServer Faces.


// get the view to render
FacesContext context = FacesContext.getCurrentInstance();
UIViewRoot viewToRender = context.getViewRoot();

// grab our FaceletFactory and create a Facelet
FaceletFactory factory = FaceletFactory.getInstance();
Facelet f = factory.getFacelet(viewToRender.getViewId());

// populate UIViewRoot
f.apply(context, viewToRender);



Copyright © 2009 The Apache Software Foundation. All Rights Reserved.