Top Description Inners Fields Constructors Methods
javax.faces.component.html

public Class HtmlOutputText

extends UIOutput
Class Inheritance
Imports
java.io.IOException, java.util.ArrayList, .Arrays, .List, javax.faces.context.FacesContext, javax.el.MethodExpression, .ValueExpression

Renders the component value as text, optionally wrapping in a span element if I18N attributes, CSS styles or style classes are specified.

If you are using h:outputText (or an equivalent inline EL expression) within a script or style block the value is NOT escaped by default.

By default, the rendererType property must be set to "javax.faces.Text". This value can be changed by calling the setRendererType() method.

Nested and Inner Type Summary

Modifier and TypeClass and Description
protected static enum

Field Summary

Modifier and TypeField and Description
public static final String
COMPONENT_TYPE

Hides javax.faces.component.UIOutput.COMPONENT_TYPE.

The standard component type for this component.

private static final String
Inherited from javax.faces.component.UIOutput:
COMPONENT_FAMILY

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public String

Returns:

the property value

Contents: Direction indication for text that does not inherit directionality. Valid values are "LTR" (left-to-right) and "RTL" (right-to-left). These attributes are case sensitive when rendering to XHTML, so care must be taken to have the correct case.

getDir
()

Return the value of the dir property.

public String

Returns:

the property value

Contents: Code describing the language used in the generated markup for this component.

getLang
()

Return the value of the lang property.

public String

Returns:

the property value

Contents:

Per the WAI-ARIA spec and its relationship to HTML5 (Section title ARIA Role Attriubute), every HTML element may have a "role" attribute whose value must be passed through unmodified on the element on which it is declared in the final rendered markup. The attribute, if specified, must have a value that is a string literal that is, or an EL Expression that evaluates to, a set of space-separated tokens representing the various WAI-ARIA roles that the element belongs to.

It is the page author's responsibility to ensure that the user agent is capable of correctly interpreting the value of this attribute.

getRole
()

Return the value of the role property.

public String

Returns:

the property value

Contents: CSS style(s) to be applied when this component is rendered.

getStyle
()

Return the value of the style property.

public String

Returns:

the property value

Contents: Space-separated list of CSS style class(es) to be applied when this element is rendered. This value must be passed through as the "class" attribute on generated markup.

getStyleClass
()

Return the value of the styleClass property.

public String

Returns:

the property value

Contents: Advisory title information about markup elements generated for this component.

getTitle
()

Return the value of the title property.

private void
public boolean

Returns:

the property value

Contents: Flag indicating that characters that are sensitive in HTML and XML markup must be escaped. This flag is set to "true" by default.

isEscape
()

Return the value of the escape property.

public void
setDir(String
the new property value
dir
)

Set the value of the dir property.

public void
setEscape(boolean
the new property value
escape
)

Set the value of the escape property.

public void
setLang(String
the new property value
lang
)

Set the value of the lang property.

public void
setRole(String
the new property value
role
)

Set the value of the role property.

public void
setStyle(String
the new property value
style
)

Set the value of the style property.

public void
setStyleClass(String
the new property value
styleClass
)

Set the value of the styleClass property.

public void
setTitle(String
the new property value
title
)

Set the value of the title property.

Inherited from javax.faces.component.UIOutput:
clearInitialStategetConvertergetFamilygetLocalValuegetValuemarkInitialStateresetValuerestoreStatesaveStatesetConvertersetValue

Field Detail

COMPONENT_TYPEback to summary
public static final String COMPONENT_TYPE

Hides javax.faces.component.UIOutput.COMPONENT_TYPE.

The standard component type for this component.

OPTIMIZED_PACKAGEback to summary
private static final String OPTIMIZED_PACKAGE

Constructor Detail

HtmlOutputTextback to summary
public HtmlOutputText()

Method Detail

getDirback to summary
public String getDir()

Return the value of the dir property.

Returns:String

the property value

Contents: Direction indication for text that does not inherit directionality. Valid values are "LTR" (left-to-right) and "RTL" (right-to-left). These attributes are case sensitive when rendering to XHTML, so care must be taken to have the correct case.

getLangback to summary
public String getLang()

Return the value of the lang property.

Returns:String

the property value

Contents: Code describing the language used in the generated markup for this component.

getRoleback to summary
public String getRole()

Return the value of the role property.

Returns:String

the property value

Contents:

Per the WAI-ARIA spec and its relationship to HTML5 (Section title ARIA Role Attriubute), every HTML element may have a "role" attribute whose value must be passed through unmodified on the element on which it is declared in the final rendered markup. The attribute, if specified, must have a value that is a string literal that is, or an EL Expression that evaluates to, a set of space-separated tokens representing the various WAI-ARIA roles that the element belongs to.

It is the page author's responsibility to ensure that the user agent is capable of correctly interpreting the value of this attribute.

getStyleback to summary
public String getStyle()

Return the value of the style property.

Returns:String

the property value

Contents: CSS style(s) to be applied when this component is rendered.

getStyleClassback to summary
public String getStyleClass()

Return the value of the styleClass property.

Returns:String

the property value

Contents: Space-separated list of CSS style class(es) to be applied when this element is rendered. This value must be passed through as the "class" attribute on generated markup.

getTitleback to summary
public String getTitle()

Return the value of the title property.

Returns:String

the property value

Contents: Advisory title information about markup elements generated for this component.

handleAttributeback to summary
private void handleAttribute(String name, Object value)
isEscapeback to summary
public boolean isEscape()

Return the value of the escape property.

Returns:boolean

the property value

Contents: Flag indicating that characters that are sensitive in HTML and XML markup must be escaped. This flag is set to "true" by default.

setDirback to summary
public void setDir(String dir)

Set the value of the dir property.

Parameters
dir:String

the new property value

setEscapeback to summary
public void setEscape(boolean escape)

Set the value of the escape property.

Parameters
escape:boolean

the new property value

setLangback to summary
public void setLang(String lang)

Set the value of the lang property.

Parameters
lang:String

the new property value

setRoleback to summary
public void setRole(String role)

Set the value of the role property.

Parameters
role:String

the new property value

setStyleback to summary
public void setStyle(String style)

Set the value of the style property.

Parameters
style:String

the new property value

setStyleClassback to summary
public void setStyleClass(String styleClass)

Set the value of the styleClass property.

Parameters
styleClass:String

the new property value

setTitleback to summary
public void setTitle(String title)

Set the value of the title property.

Parameters
title:String

the new property value

javax.faces.component.html back to summary

protected final Enum HtmlOutputText.PropertyKeys

extends Enum<HtmlOutputText.PropertyKeys>
Class Inheritance

Field Summary

Modifier and TypeField and Description
public static final HtmlOutputText.PropertyKeys
public static final HtmlOutputText.PropertyKeys
public static final HtmlOutputText.PropertyKeys
public static final HtmlOutputText.PropertyKeys
public static final HtmlOutputText.PropertyKeys
public static final HtmlOutputText.PropertyKeys
public static final HtmlOutputText.PropertyKeys
pack-priv String

Constructor Summary

AccessConstructor and Description
private
PropertyKeys(String toString)

private

Method Summary

Modifier and TypeMethod and Description
public String
toString()

Overrides java.lang.Enum.toString.

Returns the name of this enum constant, as contained in the declaration.
public static HtmlOutputText.PropertyKeys
public static HtmlOutputText.PropertyKeys[]
Inherited from java.lang.Enum:
clonecompareTodescribeConstableequalsfinalizegetDeclaringClasshashCodenameordinalvalueOf

Field Detail

dirback to summary
public static final HtmlOutputText.PropertyKeys dir
escapeback to summary
public static final HtmlOutputText.PropertyKeys escape
langback to summary
public static final HtmlOutputText.PropertyKeys lang
roleback to summary
public static final HtmlOutputText.PropertyKeys role
styleback to summary
public static final HtmlOutputText.PropertyKeys style
styleClassback to summary
public static final HtmlOutputText.PropertyKeys styleClass
titleback to summary
public static final HtmlOutputText.PropertyKeys title
toStringback to summary
pack-priv String toString

Constructor Detail

PropertyKeysback to summary
private PropertyKeys(String toString)
PropertyKeysback to summary
private PropertyKeys()

Method Detail

toStringback to summary
public String toString()

Overrides java.lang.Enum.toString.

Doc from java.lang.Enum.toString.

Returns the name of this enum constant, as contained in the declaration. This method may be overridden, though it typically isn't necessary or desirable. An enum class should override this method when a more "programmer-friendly" string form exists.

Returns:String

the name of this enum constant

valueOfback to summary
public static HtmlOutputText.PropertyKeys valueOf(String name)
valuesback to summary
public static HtmlOutputText.PropertyKeys[] values()