public class ViewTag
extends javax.faces.webapp.UIComponentELTag
| Modifier and Type | Field and Description |
|---|---|
protected javax.el.MethodExpression |
afterPhase |
protected javax.el.MethodExpression |
beforePhase |
protected javax.el.ValueExpression |
locale |
protected javax.el.ValueExpression |
renderKitId |
bodyContent, pageContext, UNIQUE_ID_PREFIX| Constructor and Description |
|---|
ViewTag() |
| Modifier and Type | Method and Description |
|---|---|
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: |
String |
getComponentType()
Return the component type for the component that is or will be
bound to this tag.
|
protected int |
getDoEndValue()
Return the flag value that should be returned from the
doEnd() method when it is called. |
protected int |
getDoStartValue()
Return the flag value that should be returned from the
doStart() method when it is called. |
protected Locale |
getLocaleFromString(String localeExpr)
Returns the locale represented by the expression.
|
String |
getRendererType()
Return the
rendererType property that selects the
Renderer to be used for encoding this component, or
null to ask the component to render itself directly. |
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)
Override properties and attributes of the specified component,
if the corresponding properties of this tag handler instance were
explicitly set.
|
void |
setRenderKitId(javax.el.ValueExpression renderKitId) |
createComponent, getELContext, hasBinding, release, setBinding, setRenderedaddChild, 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, setupResponseWriterprotected javax.el.ValueExpression renderKitId
protected javax.el.ValueExpression locale
protected javax.el.MethodExpression beforePhase
protected javax.el.MethodExpression afterPhase
public void setRenderKitId(javax.el.ValueExpression renderKitId)
public void setLocale(javax.el.ValueExpression newLocale)
public void setBeforePhase(javax.el.MethodExpression newBeforePhase)
public void setAfterPhase(javax.el.MethodExpression newAfterPhase)
protected int getDoStartValue()
throws javax.servlet.jsp.JspException
javax.faces.webapp.UIComponentClassicTagBaseReturn the flag value that should be returned from the
doStart() method when it is called. Subclasses
may override this method to return the appropriate value.
getDoStartValue in class javax.faces.webapp.UIComponentClassicTagBasedoStart()javax.servlet.jsp.JspException - to cause doStart() to
throw an exceptionpublic int doStartTag()
throws javax.servlet.jsp.JspException
Override parent doStartTag() to do the following:
Reflect the response object for a method called flushContentToWrappedResponse and invoke it. This causes any content that appears before the view to be written out to the response. This is necessary to allow proper ordering to happen.
doStartTag in interface javax.servlet.jsp.tagext.TagdoStartTag in class javax.faces.webapp.UIComponentClassicTagBasejavax.servlet.jsp.JspException - if an error occurspublic 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.
doAfterBody in interface javax.servlet.jsp.tagext.IterationTagdoAfterBody in class javax.faces.webapp.UIComponentClassicTagBasejavax.servlet.jsp.JspException - if an error is encounteredpublic 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.
doEndTag in interface javax.servlet.jsp.tagext.TagdoEndTag in class javax.faces.webapp.UIComponentClassicTagBasejavax.servlet.jsp.JspException - if an error occurspublic String getComponentType()
javax.faces.webapp.UIComponentTagBaseReturn the component type for the component that is or will be
bound to this tag. This value can be passed to
Application.createComponent(java.lang.String) to create
the UIComponent instance for this tag. Subclasses must
override this method to return the appropriate value.
getComponentType in class javax.faces.webapp.UIComponentTagBasepublic String getRendererType()
javax.faces.webapp.UIComponentTagBaseReturn the rendererType property that selects the
Renderer to be used for encoding this component, or
null to ask the component to render itself directly.
Subclasses must override this method to return the appropriate value.
getRendererType in class javax.faces.webapp.UIComponentTagBaseprotected int getDoEndValue()
throws javax.servlet.jsp.JspException
javax.faces.webapp.UIComponentClassicTagBaseReturn the flag value that should be returned from the
doEnd() method when it is called. Subclasses
may override this method to return the appropriate value.
getDoEndValue in class javax.faces.webapp.UIComponentClassicTagBasedoEnd()javax.servlet.jsp.JspException - to cause doEnd() to
throw an exceptionprotected void setProperties(javax.faces.component.UIComponent component)
javax.faces.webapp.UIComponentELTagOverride properties and attributes of the specified component,
if the corresponding properties of this tag handler instance were
explicitly set. This method must be called ONLY
if the specified UIComponent was in fact created during
the execution of this tag handler instance, and this call will occur
BEFORE the UIComponent is added to
the view.
Tag subclasses that want to support additional set properties
must ensure that the base class setProperties()
method is still called. A typical implementation that supports
extra properties foo and bar would look
something like this:
protected void setProperties(UIComponent component) {
super.setProperties(component);
if (foo != null) {
component.setAttribute("foo", foo);
}
if (bar != null) {
component.setAttribute("bar", bar);
}
}
The default implementation overrides the following properties:
rendered - Set if a value for the
rendered property is specified for
this tag handler instance.rendererType - Set if the getRendererType()
method returns a non-null value.setProperties in class javax.faces.webapp.UIComponentELTagcomponent - UIComponent whose properties are to be
overriddenprotected Locale getLocaleFromString(String localeExpr)
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 (???_???)."Copyright © 2010–2019 JBoss by Red Hat. All rights reserved.