org.jboss.seam.faces.view
Class SeamViewMetadata

java.lang.Object
  extended by javax.faces.view.ViewMetadata
      extended by org.jboss.seam.faces.view.SeamViewMetadata

public class SeamViewMetadata
extends ViewMetadata

Wrap the built-in ViewMetadata implementation for the purpose of adding a UIViewParameter placeholder component if necessary.

In JSF 2.0, the view metadata facet was introduced for the purpose of providing front-controller behavior in JSF. On an initial request, the full JSF lifecycle is executed on a partial view consisting of the components in the view metadata facet. However, there is one big caveat! The lifecycle is only executed if the view metadata contains at least one UIViewParameter.

This wrapper intercepts the call to ViewMetadata.createMetadataView(FacesContext) and adds a placeholder UIViewParameter if the view metadata is non-empty and there are no other UIViewParameter components.

Author:
Dan Allen

Constructor Summary
SeamViewMetadata(ViewMetadata delegate)
           
 
Method Summary
 UIViewRoot createMetadataView(FacesContext context)
           
 String getViewId()
           
 
Methods inherited from class javax.faces.view.ViewMetadata
getViewParameters
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SeamViewMetadata

public SeamViewMetadata(ViewMetadata delegate)
Method Detail

getViewId

public String getViewId()
Specified by:
getViewId in class ViewMetadata

createMetadataView

public UIViewRoot createMetadataView(FacesContext context)
Specified by:
createMetadataView in class ViewMetadata


Copyright © 2009-2011 Seam Framework. All Rights Reserved.