| NetUI Tag Library Documentation (Version 1.0.1) | ||||||
DETAIL: Syntax | Description | Attributes | Example | Tag Info |
FRAMES NO FRAMES |
Generates styled text based on a String literal or data binding expression.
Syntax |
<netui:span
[defaultValue="string_or_expression_defaultValue"]
[dir="string_dir"]
[escapeWhiteSpaceForHtml="boolean_escapeWhiteSpace"]
[formatDefaultValue="boolean_formatDisplay"]
[lang="string_lang"]
[onClick="string_onClick"]
[onDblClick="string_onDblClick"]
[onKeyDown="string_onKeyDown"]
[onKeyPress="string_onKeyPress"]
[onKeyUp="string_onKeyUp"]
[onMouseDown="string_onMouseDown"]
[onMouseMove="string_onMouseMove"]
[onMouseOut="string_onMouseOut"]
[onMouseOver="string_onMouseOver"]
[onMouseUp="string_onMouseUp"]
[style="string_style"]
[styleClass="string_styleClass"]
[tagId="string_tagId"]
[title="string_title"]
value="string_or_expression_output" >
... JSP content ...
</netui:span>
Description |
Generates styled text based on a String literal or data binding expression.
The <netui:span> tag is similar to the <netui:content> tag, except with respect to the way that it treats characters sensitive to HTML browsers. The <netui:span> tag filters the input string for browser-sensitive characters and replaces these characters with the corresponding entity strings. For example, if you pass the string '&' to a <netui:span> 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:span> and <netui:content> tags treat HTML-sensitive characters.
tag generated HTML source displayed in browser <netui:content value="&"/> & & <netui:span value="&"/> &amp; &
Note: escaping is not applied to browser-sensitive characters in
the defaultValue
attribute.
Attributes | ||
defaultValue |
The String literal or expression to be used as the default output. If the default value is an expression all formatters will be applied, otherwise the default value will be output without being formatted. |
|
dir |
Specifies the direction of text. ( LTR | RTL ) |
|
escapeWhiteSpaceForHtml |
Sets a boolean flag indicating if we will escape white space for HTML. |
|
formatDefaultValue |
Boolean indicating whether the formatter should be applied to the defaultValue. The default is "false" meaning formatters will not be applied. |
|
lang |
Sets the language code for the base language of an element's attribute values and text content. |
|
onClick |
The onClick JavaScript event. |
|
onDblClick |
The onDblClick JavaScript event. |
|
onKeyDown |
The onKeyDown JavaScript event. |
|
onKeyPress |
The onKeyPress JavaScript event. |
|
onKeyUp |
The onKeyUp JavaScript event. |
|
onMouseDown |
The onMouseDown JavaScript event. |
|
onMouseMove |
The onMouseMove JavaScript event. |
|
onMouseOut |
The onMouseOut JavaScript event. |
|
onMouseOver |
The onMouseOver JavaScript event. |
|
onMouseUp |
The onMouseUp JavaScript event. |
|
style |
Specifies style information for the current element. |
|
styleClass |
The style class (a style sheet selector). |
|
tagId |
String value. Sets the For example, assume that some tag's <netui:textBox tagId="foo" /> Then the following JavaScript function will return the real id attribute rendered in the browser: lookupIdByTagId( "foo", this ) To get a <netui:form> element and all of its children elements in JavaScript, use
the same JavaScript function <netui:form tagId="bar" > Then the following JavaScript function will return the <netui:form> element and its children (packaged as an array). document[lookupIdByTagId( "bar", this )] To retreive the value entered into a <netui:textBox> within the <netui:form> tag, use the following JavaScript expression. document[lookupIdByTagId("bar", this)][lookupIdByTagId("foo", this)].value The second parameter ensures that the JavaScript function
begins its search within the correct Portlet scope. Pass the
JavaScript keyword |
|
title |
The title. |
|
value |
The String literal or expression used as the text of the Label. |
Example |
In this first sample, a <netui:span> tag displays the Form Bean's firstName property. The <netui:span> tag will resolve this data binding expression, and display its value.
<netui:span value="${actionForm.firstName}" />
In this next sample, the value
attribute will resolve to null.
This causes the defaultValue
to be displayed. The user will see ' '.
<netui:span value="${pageFlow.somethingNull}" defaultValue=" "/>
In this next sample, the HTML will contain the text "&nbsp;" and the user will see ' '
<netui:span value="${pageFlow.somethingNull}" defaultValue="&nbsp;"/>
Tag Information | |
Tag Class | org.apache.beehive.netui.tags.html.Span |
TagExtraInfo Class | None |
Body Content | JSP |
Display Name | None |
|
||||||
DETAIL: Syntax | Description | Attributes | Example | Tag Info |
FRAMES NO FRAMES |