org.apache.myfaces.shared.view
Class JspViewDeclarationLanguageBase

java.lang.Object
  extended by javax.faces.view.ViewDeclarationLanguage
      extended by org.apache.myfaces.shared.view.ViewDeclarationLanguageBase
          extended by org.apache.myfaces.shared.view.JspViewDeclarationLanguageBase

public abstract class JspViewDeclarationLanguageBase
extends ViewDeclarationLanguageBase


Constructor Summary
JspViewDeclarationLanguageBase()
           
 
Method Summary
protected  boolean actuallyRenderView(javax.faces.context.FacesContext facesContext, javax.faces.component.UIViewRoot viewToRender)
          Render the view now - properly setting and resetting the response writer [MF] Modified to return a boolean so subclass that delegates can determine whether the rendering succeeded or not.
 void buildView(javax.faces.context.FacesContext context, javax.faces.component.UIViewRoot view)
           
protected  java.lang.String calculateViewId(javax.faces.context.FacesContext context, java.lang.String viewId)
          Calculates the effective view identifier for the specified raw view identifier.
protected  void flushBufferToWriter(java.lang.StringBuffer buff, java.io.Writer writer)
           
 java.beans.BeanInfo getComponentMetadata(javax.faces.context.FacesContext context, javax.faces.application.Resource componentResource)
          
 javax.faces.application.Resource getScriptComponentResource(javax.faces.context.FacesContext context, javax.faces.application.Resource componentResource)
          
 javax.faces.view.StateManagementStrategy getStateManagementStrategy(javax.faces.context.FacesContext context, java.lang.String viewId)
           
 javax.faces.view.ViewMetadata getViewMetadata(javax.faces.context.FacesContext context, java.lang.String viewId)
          
protected  boolean isViewBuilt(javax.faces.context.FacesContext facesContext, javax.faces.component.UIViewRoot view)
          Returns true if the given UIViewRoot has already been built via VDL.buildView().
protected  boolean isViewStateAlreadyEncoded(javax.faces.context.FacesContext context)
           
 void renderView(javax.faces.context.FacesContext context, javax.faces.component.UIViewRoot view)
          
protected  void setAfterViewTagResponseWrapper(javax.faces.context.ExternalContext ec, ViewResponseWrapper wrapper)
           
protected  void setViewBuilt(javax.faces.context.FacesContext facesContext, javax.faces.component.UIViewRoot view)
          Saves a flag in the attribute map of the FacesContext to indicate that the given UIViewRoot was already built with VDL.buildView().
protected  void writePartialBuffer(java.lang.StringBuffer contentBuffer, int beginIndex, int endIndex, java.io.Writer writer)
           
 
Methods inherited from class org.apache.myfaces.shared.view.ViewDeclarationLanguageBase
checkNull, createView, restoreView, sendSourceNotFound
 
Methods inherited from class javax.faces.view.ViewDeclarationLanguage
retargetAttachedObjects, retargetMethodExpressions
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JspViewDeclarationLanguageBase

public JspViewDeclarationLanguageBase()
Method Detail

buildView

public void buildView(javax.faces.context.FacesContext context,
                      javax.faces.component.UIViewRoot view)
               throws java.io.IOException
Specified by:
buildView in class javax.faces.view.ViewDeclarationLanguage
Throws:
java.io.IOException

getComponentMetadata

public java.beans.BeanInfo getComponentMetadata(javax.faces.context.FacesContext context,
                                                javax.faces.application.Resource componentResource)

Specified by:
getComponentMetadata in class javax.faces.view.ViewDeclarationLanguage

getScriptComponentResource

public javax.faces.application.Resource getScriptComponentResource(javax.faces.context.FacesContext context,
                                                                   javax.faces.application.Resource componentResource)

Specified by:
getScriptComponentResource in class javax.faces.view.ViewDeclarationLanguage

renderView

public void renderView(javax.faces.context.FacesContext context,
                       javax.faces.component.UIViewRoot view)
                throws java.io.IOException

Specified by:
renderView in class javax.faces.view.ViewDeclarationLanguage
Throws:
java.io.IOException

getViewMetadata

public javax.faces.view.ViewMetadata getViewMetadata(javax.faces.context.FacesContext context,
                                                     java.lang.String viewId)

Specified by:
getViewMetadata in class javax.faces.view.ViewDeclarationLanguage

isViewStateAlreadyEncoded

protected boolean isViewStateAlreadyEncoded(javax.faces.context.FacesContext context)

setAfterViewTagResponseWrapper

protected void setAfterViewTagResponseWrapper(javax.faces.context.ExternalContext ec,
                                              ViewResponseWrapper wrapper)

flushBufferToWriter

protected void flushBufferToWriter(java.lang.StringBuffer buff,
                                   java.io.Writer writer)
                            throws java.io.IOException
Throws:
java.io.IOException

writePartialBuffer

protected void writePartialBuffer(java.lang.StringBuffer contentBuffer,
                                  int beginIndex,
                                  int endIndex,
                                  java.io.Writer writer)
                           throws java.io.IOException
Throws:
java.io.IOException

actuallyRenderView

protected boolean actuallyRenderView(javax.faces.context.FacesContext facesContext,
                                     javax.faces.component.UIViewRoot viewToRender)
                              throws java.io.IOException
Render the view now - properly setting and resetting the response writer [MF] Modified to return a boolean so subclass that delegates can determine whether the rendering succeeded or not. TRUE means success.

Throws:
java.io.IOException

getStateManagementStrategy

public javax.faces.view.StateManagementStrategy getStateManagementStrategy(javax.faces.context.FacesContext context,
                                                                           java.lang.String viewId)
Specified by:
getStateManagementStrategy in class javax.faces.view.ViewDeclarationLanguage

calculateViewId

protected java.lang.String calculateViewId(javax.faces.context.FacesContext context,
                                           java.lang.String viewId)
Description copied from class: ViewDeclarationLanguageBase
Calculates the effective view identifier for the specified raw view identifier.

Specified by:
calculateViewId in class ViewDeclarationLanguageBase
Parameters:
context - le current FacesContext
viewId - the raw view identifier
Returns:
the effective view identifier

isViewBuilt

protected boolean isViewBuilt(javax.faces.context.FacesContext facesContext,
                              javax.faces.component.UIViewRoot view)
Returns true if the given UIViewRoot has already been built via VDL.buildView(). This is necessary because legacy ViewHandler implementations return null on getViewDeclarationLanguage() and thus VDL.buildView() is never called. So we have to check this in renderView() and, if it is false, we have to call buildView() manually before the rendering.

Parameters:
facesContext -
view -
Returns:

setViewBuilt

protected void setViewBuilt(javax.faces.context.FacesContext facesContext,
                            javax.faces.component.UIViewRoot view)
Saves a flag in the attribute map of the FacesContext to indicate that the given UIViewRoot was already built with VDL.buildView().

Parameters:
facesContext -
view -


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