com.sun.faces.taglib.jsf_core
Class ViewTag

java.lang.Object
  extended by javax.faces.webapp.UIComponentTagBase
      extended by javax.faces.webapp.UIComponentClassicTagBase
          extended by javax.faces.webapp.UIComponentELTag
              extended by com.sun.faces.taglib.jsf_core.ViewTag
All Implemented Interfaces:
javax.servlet.jsp.tagext.BodyTag, javax.servlet.jsp.tagext.IterationTag, javax.servlet.jsp.tagext.JspIdConsumer, javax.servlet.jsp.tagext.JspTag, javax.servlet.jsp.tagext.Tag

public class ViewTag
extends javax.faces.webapp.UIComponentELTag

All JSF component tags must be nested within a f:view tag. This tag corresponds to the root of the UIComponent tree. It does not have a Renderer. It exists mainly to provide a guarantee that all faces components reside inside of this tag.

Version:
$Id: ViewTag.java,v 1.44.4.2 2007/06/01 19:41:20 edburns Exp $

Field Summary
protected  javax.el.MethodExpression afterPhase
           
protected  javax.el.MethodExpression beforePhase
           
protected  javax.el.ValueExpression locale
           
protected  javax.el.ValueExpression renderKitId
           
 
Fields inherited from class javax.faces.webapp.UIComponentClassicTagBase
bodyContent, pageContext, UNIQUE_ID_PREFIX
 
Fields inherited from class javax.faces.webapp.UIComponentTagBase
log
 
Fields inherited from interface javax.servlet.jsp.tagext.Tag
EVAL_BODY_INCLUDE, EVAL_PAGE, SKIP_BODY, SKIP_PAGE
 
Fields inherited from interface javax.servlet.jsp.tagext.BodyTag
EVAL_BODY_BUFFERED, EVAL_BODY_TAG
 
Fields inherited from interface javax.servlet.jsp.tagext.IterationTag
EVAL_BODY_AGAIN
 
Constructor Summary
ViewTag()
           
 
Method Summary
 int doAfterBody()
          Examine the body content of this tag.
 int doEndTag()
          Exercise a contract with the ViewHandler to get the character encoding from the response and set it into the session.
 int doStartTag()
          Override parent doStartTag() to do the following:
 java.lang.String getComponentType()
          This should never get called for PageTag.
protected  int getDoEndValue()
           
protected  int getDoStartValue()
           
protected  java.util.Locale getLocaleFromString(java.lang.String localeExpr)
          Returns the locale represented by the expression.
 java.lang.String getRendererType()
           
 void setAfterPhase(javax.el.MethodExpression newAfterPhase)
           
 void setBeforePhase(javax.el.MethodExpression newBeforePhase)
           
 void setLocale(javax.el.ValueExpression newLocale)
           
protected  void setProperties(javax.faces.component.UIComponent component)
           
 void setRenderKitId(javax.el.ValueExpression renderKitId)
           
 
Methods inherited from class javax.faces.webapp.UIComponentELTag
createComponent, getELContext, hasBinding, release, setBinding, setRendered
 
Methods inherited from class javax.faces.webapp.UIComponentClassicTagBase
addChild, addFacet, addVerbatimAfterComponent, addVerbatimBeforeComponent, createVerbatimComponent, createVerbatimComponentFromBodyContent, doInitBody, encodeBegin, encodeChildren, encodeEnd, findComponent, getBodyContent, getComponentInstance, getCreated, getCreatedComponents, getDoAfterBodyValue, getFacesContext, getFacesJspId, getFacetName, getId, getIndexOfNextChildTag, getJspId, getParent, getParentUIComponentClassicTagBase, getPreviousOut, setBodyContent, setId, setJspId, setPageContext, setParent, setupResponseWriter
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface javax.servlet.jsp.tagext.Tag
getParent, setPageContext, setParent
 

Field Detail

renderKitId

protected javax.el.ValueExpression renderKitId

locale

protected javax.el.ValueExpression locale

beforePhase

protected javax.el.MethodExpression beforePhase

afterPhase

protected javax.el.MethodExpression afterPhase
Constructor Detail

ViewTag

public ViewTag()
Method Detail

setRenderKitId

public void setRenderKitId(javax.el.ValueExpression renderKitId)

setLocale

public void setLocale(javax.el.ValueExpression newLocale)

setBeforePhase

public void setBeforePhase(javax.el.MethodExpression newBeforePhase)

setAfterPhase

public void setAfterPhase(javax.el.MethodExpression newAfterPhase)

getDoStartValue

protected int getDoStartValue()
                       throws javax.servlet.jsp.JspException
Overrides:
getDoStartValue in class javax.faces.webapp.UIComponentClassicTagBase
Throws:
javax.servlet.jsp.JspException

doStartTag

public int doStartTag()
               throws javax.servlet.jsp.JspException

Override parent doStartTag() to do the following:

Specified by:
doStartTag in interface javax.servlet.jsp.tagext.Tag
Overrides:
doStartTag in class javax.faces.webapp.UIComponentClassicTagBase
Throws:
javax.servlet.jsp.JspException

doAfterBody

public int doAfterBody()
                throws javax.servlet.jsp.JspException

Examine the body content of this tag. If it is non-null, non-zero length, and not an HTML comment, call UIComponentClassicTagBase.createVerbatimComponent().

Set the value of the verbatim component to be content.

Add this child to the end of the child list for UIViewRoot.

Specified by:
doAfterBody in interface javax.servlet.jsp.tagext.IterationTag
Overrides:
doAfterBody in class javax.faces.webapp.UIComponentClassicTagBase
Throws:
javax.servlet.jsp.JspException

doEndTag

public int doEndTag()
             throws javax.servlet.jsp.JspException

Exercise a contract with the ViewHandler to get the character encoding from the response and set it into the session.

Specified by:
doEndTag in interface javax.servlet.jsp.tagext.Tag
Overrides:
doEndTag in class javax.faces.webapp.UIComponentClassicTagBase
Throws:
javax.servlet.jsp.JspException

getComponentType

public java.lang.String getComponentType()
This should never get called for PageTag.

Specified by:
getComponentType in class javax.faces.webapp.UIComponentTagBase

getRendererType

public java.lang.String getRendererType()
Specified by:
getRendererType in class javax.faces.webapp.UIComponentTagBase

getDoEndValue

protected int getDoEndValue()
                     throws javax.servlet.jsp.JspException
Overrides:
getDoEndValue in class javax.faces.webapp.UIComponentClassicTagBase
Throws:
javax.servlet.jsp.JspException

setProperties

protected void setProperties(javax.faces.component.UIComponent component)
Overrides:
setProperties in class javax.faces.webapp.UIComponentELTag

getLocaleFromString

protected java.util.Locale getLocaleFromString(java.lang.String localeExpr)
Returns the locale represented by the expression.

Parameters:
localeExpr - a String in the format specified by JSTL Specification as follows: "A String value is interpreted as the printable representation of a locale, which must contain a two-letter (lower-case) language code (as defined by ISO-639), and may contain a two-letter (upper-case) country code (as defined by ISO-3166). Language and country codes must be separated by hyphen (???-???) or underscore (???_???)."
Returns:
Locale instance cosntructed from the expression.


Copyright ? 2002-2006 Sun Microsystems, Inc. All Rights Reserved.