- Components
- OutputText
OutputText
Extension of the outputText element
In addition to the normal rendered
attribute, there is also a show
attribute that has the same semantics, but instead of entirely
omitting the element in the markup, show=false
will render an empty placeholder element.
This is especially neat for the cases where you would normally need to add an outer wrapper to AJAX update a conditionally rendered element.
The outputText will render as a span
by default, but you can render it as any tag name by specifiying the tag
attribute.
Example
Documentation
<t:outputText id="mytext" show="#{controller.show}" value="Hello world!"/>
<t:commandButton value="Show" action="#{controller.setShow(true)}" render="mytext"/>
Extension of the outputText element
Info
Tag name | outputText |
---|---|
Component type | io.tornadofaces.component.OutputText |
Renderer type | io.tornadofaces.component.OutputTextRenderer |
Attributes
Name | Description | Required |
---|---|---|
styleClass | CSS Classes to apply to the element | false |
style | CSS Style attribute | false |
tag | Tag name to render as. Defaults to span. | false |
show | Show this component normally, or render an empty placeholder element. Defaults to true. | false |
emptyClass | Style class to append to the element if the empty attribute is true. In this case, no other attributes or child elements will be rendered. | false |
rendered | Should this component be rendered? | false |