public class ViewTag
extends jakarta.faces.webapp.UIComponentELTag
| Modifier and Type | Field and Description |
|---|---|
protected jakarta.el.MethodExpression |
afterPhase |
protected jakarta.el.MethodExpression |
beforePhase |
protected jakarta.el.ValueExpression |
locale |
protected jakarta.el.ValueExpression |
renderKitId |
bodyContent, pageContext, UNIQUE_ID_PREFIXEVAL_BODY_INCLUDE, EVAL_PAGE, SKIP_BODY, SKIP_PAGE| 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(jakarta.el.MethodExpression newAfterPhase) |
void |
setBeforePhase(jakarta.el.MethodExpression newBeforePhase) |
void |
setLocale(jakarta.el.ValueExpression newLocale) |
protected void |
setProperties(jakarta.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(jakarta.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 jakarta.el.ValueExpression renderKitId
protected jakarta.el.ValueExpression locale
protected jakarta.el.MethodExpression beforePhase
protected jakarta.el.MethodExpression afterPhase
public void setRenderKitId(jakarta.el.ValueExpression renderKitId)
public void setLocale(jakarta.el.ValueExpression newLocale)
public void setBeforePhase(jakarta.el.MethodExpression newBeforePhase)
public void setAfterPhase(jakarta.el.MethodExpression newAfterPhase)
protected int getDoStartValue()
throws jakarta.servlet.jsp.JspException
jakarta.faces.webapp.UIComponentClassicTagBase
Return 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 jakarta.faces.webapp.UIComponentClassicTagBasedoStart()jakarta.servlet.jsp.JspException - to cause doStart() to throw an exceptionpublic int doStartTag()
throws jakarta.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 jakarta.servlet.jsp.tagext.TagdoStartTag in class jakarta.faces.webapp.UIComponentClassicTagBasejakarta.servlet.jsp.JspException - if an error occurspublic int doAfterBody()
throws jakarta.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 jakarta.servlet.jsp.tagext.IterationTagdoAfterBody in class jakarta.faces.webapp.UIComponentClassicTagBasejakarta.servlet.jsp.JspException - if an error is encounteredpublic int doEndTag()
throws jakarta.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 jakarta.servlet.jsp.tagext.TagdoEndTag in class jakarta.faces.webapp.UIComponentClassicTagBasejakarta.servlet.jsp.JspException - if an error occurspublic String getComponentType()
jakarta.faces.webapp.UIComponentTagBase
Return 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 jakarta.faces.webapp.UIComponentTagBasepublic String getRendererType()
jakarta.faces.webapp.UIComponentTagBase
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. Subclasses must override this method
to return the appropriate value.
getRendererType in class jakarta.faces.webapp.UIComponentTagBaseprotected int getDoEndValue()
throws jakarta.servlet.jsp.JspException
jakarta.faces.webapp.UIComponentClassicTagBase
Return 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 jakarta.faces.webapp.UIComponentClassicTagBasedoEnd()jakarta.servlet.jsp.JspException - to cause doEnd() to throw an exceptionprotected void setProperties(jakarta.faces.component.UIComponent component)
jakarta.faces.webapp.UIComponentELTag
Override 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 jakarta.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–2022 JBoss by Red Hat. All rights reserved.