<netui:content> Tag
Displays text or the result of an expression.
<netui:content
[defaultValue="defaultValue"]
value="value" />
Displays text or the result of an expression.
Note that <netui:content> is similar to
<netui:label>
, except for the way
it processes HTML-sensitive text. The <netui:content> tag does not escape
HTML-sensitive characters, but the <netui:label> tag filters the input
string for characters that are senstive to
HTML interpreters and replaces these characters
with the corresponding entity strings. For example, if you pass the
string '&' to a <netui:label> tag, the string '&amp;' will be written to
the HTML source file, and the following will be displayed
in the browser: '&'.
The following table shows how the <netui:label> and <netui:content> tags treat HTML-sensitive characters.
tag |
generated HTML source |
displayed in browser |
<netui:content value="&"/> |
& |
& |
<netui:label value="&"/> |
&amp; |
& |
Attributes |
defaultValue |
Required: No | Supports
runtime evaluation: Yes | Data bindable: |
|
The String literal or expression to be used as the default output. |
value |
Required: Yes | Supports
runtime evaluation: Yes | Data bindable: |
|
The String literal or expression used to output the content. |
In this sample, the Content tag displays the Form Bean's lastName
property.
<netui:content value="{actionForm.lastName}" />