<netui:content> Tag

Displays text or the result of an expression.

Syntax

<netui:content
    [defaultValue="defaultValue"]
    value="value" />

Description

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 '&amp;' to a <netui:label> tag, the string '&amp;amp;' will be written to the HTML source file, and the following will be displayed in the browser: '&amp;'.

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="&amp;"/> &amp; &
<netui:label value="&amp;"/> &amp;amp; &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.

 
Example

In this sample, the Content tag displays the Form Bean's lastName property.

 <netui:content value="{actionForm.lastName}" />