|
|||
TAG LIBRARIES: <netui> | <netui-data> | <netui-template> | |||
DETAIL: Syntax | Description | Attributes | Example | Implementing Class: org.apache.beehive.netui.tags.html.Span |
Generates styled text based on a String literal or data binding expression.
Syntax |
<netui:span
[defaultValue="defaultValue"]
[dir="dir"]
[escapeWhiteSpaceForHtml="escapeWhiteSpaceForHtml"]
[formatDefaultValue="formatDefaultValue"]
[lang="lang"]
[onClick="onClick"]
[onDblClick="onDblClick"]
[onKeyDown="onKeyDown"]
[onKeyPress="onKeyPress"]
[onKeyUp="onKeyUp"]
[onMouseDown="onMouseDown"]
[onMouseMove="onMouseMove"]
[onMouseOut="onMouseOut"]
[onMouseOver="onMouseOver"]
[onMouseUp="onMouseUp"]
[style="style"]
[styleClass="styleClass"]
[tagId="tagId"]
[title="title"]
value="value" />
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 |
|
||||||
dir |
|
||||||
escapeWhiteSpaceForHtml |
|
||||||
formatDefaultValue |
|
||||||
lang |
|
||||||
onClick |
|
||||||
onDblClick |
|
||||||
onKeyDown |
|
||||||
onKeyPress |
|
||||||
onKeyUp |
|
||||||
onMouseDown |
|
||||||
onMouseMove |
|
||||||
onMouseOut |
|
||||||
onMouseOver |
|
||||||
onMouseUp |
|
||||||
style |
|
||||||
styleClass |
|
||||||
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: getNetuiTagName( "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[getNetuiTagName( "bar", this )] To retreive the value entered into a <netui:textBox> within the <netui:form> tag, use the following JavaScript expression. document[getNetuiTagName("bar", this)][getNetuiTagName("foo", this)].value The second parameter ensures that the JavaScript function
begins its search within the correct Portlet scope. Pass the
JavaScript keyword |
||||||
title |
|
||||||
value |
|
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 LIBRARIES: <netui> | <netui-data> | <netui-template> | |||
DETAIL: Syntax | Description | Attributes | Example | Implementing Class: org.apache.beehive.netui.tags.html.Span |