Dynamic elements
The elements that come with the framework, and the bindings each one takes. This page is generated from ng itself: the elements its taglib declares, each documented by the .apiext file beside its class.
<wo:actionURL />
Renders the URL that invokes action on this component — for building your own links, forms or scripts around a component action. Tag name: actionURL.
| Binding | Type | Description |
|---|---|---|
action
required
|
NGActionResultsread |
The component action the rendered URL invokes. Pulled at invoke time; required. |
<wo:aof>
Container
Watches form fields for changes and, after debounce milliseconds of quiet, submits the changed field (or the whole form, with fullSubmit) over Ajax, invoking action and refreshing updateContainerID. Two modes: bind observeFieldID to watch one field (renders an invisible marker; content is ignored), or leave it unbound to wrap the tag's content in a container whose input/textarea/select descendants are all observed. Tag name: aof.
| Binding | Type | Description |
|---|---|---|
observeFieldID
|
Stringread |
The HTML |
updateContainerID
|
Stringread |
The |
action
|
NGActionResultsread |
The component action invoked when an observed field changes. Pulled at invoke time. |
fullSubmit
|
Booleanread |
When Default: |
debounce
|
Integerread |
Milliseconds to wait after the last change before submitting; Default: |
elementName
|
Stringread |
Container mode: the HTML element rendered around the content. Pulled; defaults to Default: |
id
|
Stringread |
Container mode: the HTML |
class
|
Stringread |
Container mode: the CSS class of the wrapper. Pulled. |
style
|
Stringread |
Container mode: the inline style of the wrapper. Pulled. |
<wo:asb>
Container
Submits the enclosing form over Ajax, invoking action and refreshing the AjaxUpdateContainer named by updateContainerID. Renders as an <input type="button">, or — when the tag has content — as a <button> wrapping it. Other bindings are rendered as attributes. Tag name: asb.
| Binding | Type | Description |
|---|---|---|
action
required
|
NGActionResultsread |
The component action invoked when the button is pressed. Pulled at invoke time; required (a button without one fails when pressed). |
updateContainerID
|
Stringread |
The |
<wo:auc>
Container
Wraps its content in an element (a <div> by default) with the given id, so that AjaxUpdateLink, AjaxSubmitButton and AjaxObserveField can refresh just that part of the page. Other bindings are rendered as attributes. Tag name: auc.
| Binding | Type | Description |
|---|---|---|
id
required
|
Stringread |
The HTML |
elementName
|
Stringread |
The HTML element to render as the container. Pulled; defaults to Default: |
<wo:aul>
Container
An <a> that invokes action over Ajax and replaces the AjaxUpdateContainer named by updateContainerID with the result, without a full page load. Other bindings are rendered as attributes. Tag name: aul.
| Binding | Type | Description |
|---|---|---|
action
required
|
NGActionResultsread |
The component action invoked on click. Pulled at invoke time; required. |
updateContainerID
|
Stringread |
The |
<wo:browser />
The multi-selection variant of NGPopUpButton — today an alias for it: the same element, the same bindings. To actually get a multi-select, bind multiple truthy and selections (the default is still single-select via selection). Tag name: browser.
| Binding | Type | Description |
|---|---|---|
list
required
|
List | SequencedCollectionread |
The options: a |
item
|
→ Objectwritten |
Pushed each option's object while rendering, so |
index
|
→ Integerwritten |
Pushed each option's zero-based index while rendering. |
displayString
|
Objectread |
The text shown for the current |
selection
|
Object → Objectread and written |
Single-select: the selected object. Pulled to mark the selected option (the sole authority when bound); pushed on submit with the chosen item, or |
noSelectionString
|
Stringread |
When bound, an extra first option with this label meaning "nothing selected"; choosing it pushes |
multiple
|
Objectread |
When truthy the element renders as a multi-select and works with |
selections
|
List → Listread and written |
Multi-select: the selected objects. Pulled to mark selected options; pushed on submit as a new |
name
|
Stringread |
The HTML form-field name. Pulled; auto-assigned from the element ID when unbound — bind it only when other code needs to know the field name. |
disabled
|
Objectread |
When truthy the field renders with the |
<wo:checkbox />
An <input type="checkbox"> bound two ways to checked: rendered checked when it is truthy, and on submit pushed true if the box was ticked, false otherwise (a checkbox that isn't ticked is simply absent from the form data). Other bindings are rendered as attributes. Tag name: checkbox.
| Binding | Type | Description |
|---|---|---|
checked
required
|
Object → Booleanread and written |
The checked state. Pulled by truthiness to render; pushed as a |
name
|
Stringread |
The HTML form-field name. Pulled; auto-assigned from the element ID when unbound — bind it only when other code needs to know the field name. |
disabled
|
Objectread |
When truthy the field renders with the |
<wo:container>
Container
Renders its content inside an arbitrary HTML element named by elementName. Other bindings become attributes (a null value omits the attribute). Bind omitTags truthy to render only the content. Tag name: container.
| Binding | Type | Description |
|---|---|---|
elementName
required
|
Stringread |
The HTML element name to render, e.g. |
omitTags
|
Objectread |
When truthy, only the content is rendered — no opening or closing tag. Pulled. |
<wo:content />
The place in a wrapper component's template where the content the parent template wrapped in the component tag is rendered (and takes values / invokes actions), in the parent's context. Has no bindings. Tag name: content.
<wo:element />
Renders an arbitrary self-closing HTML element named by elementName. Other bindings become attributes (a null value omits the attribute). Tag name: element.
| Binding | Type | Description |
|---|---|---|
elementName
required
|
Stringread |
The HTML element name to render, e.g. |
<wo:fileUpload />
An <input type="file">. On submit, the uploaded file's name and bytes are pushed into filename and data. Tag name: fileUpload.
| Binding | Type | Description |
|---|---|---|
filename
|
→ Stringwritten |
Receives the uploaded file's name. Push only. |
data
|
→ byte[]written |
Receives the uploaded file's bytes. Push only. |
name
|
Stringread |
The HTML form-field name. Pulled; auto-assigned from the element ID when unbound — bind it only when other code needs to know the field name. |
<wo:form>
Container
An HTML <form> for component actions. The form always posts back to the component; action is invoked when the form itself is the submitting element and no submit button claimed the submission. Bindings other than the ones below are rendered as attributes on the <form> tag.
| Binding | Type | Description |
|---|---|---|
action
|
NGActionResultsread |
The component action invoked when the form is submitted without a specific |
method
|
Stringread |
The HTTP method rendered on the form. Pulled; defaults to Default: |
<wo:if>
Container
Renders its content only when condition is truthy — and, in the same way, only lets the content take form values and invoke actions when it is. Bind negate to flip the test. Tag name: if.
| Binding | Type | Description |
|---|---|---|
condition
required
|
Objectread |
The value to test, by truthiness ( |
negate
|
Objectread |
When truthy, inverts |
<wo:img />
An <img> whose source is a webserver resource (filename), a plain URL (src), or bytes served through the dynamic-resource cache (data / dataInputStream, which require mimeType). Bind exactly one source. Other bindings are rendered as attributes. Tag name: img.
| Binding | Type | Description |
|---|---|---|
filename
|
Stringread |
The name of a webserver resource in |
namespace
|
Stringread |
The resource namespace to look |
framework
|
Stringread |
Legacy name for Deprecated.
Use |
src
|
Stringread |
A URL rendered verbatim into the |
data
|
byte[]read |
Image bytes, cached as a one-off dynamic resource and served by URL. Pulled; requires |
dataInputStream
|
InputStreamread |
A stream of image bytes, cached as a one-off dynamic resource. Pulled; requires |
dataInputStreamLength
|
Longread |
The number of bytes |
mimeType
|
Stringread |
The MIME type of the bytes given via |
<wo:link>
Container
An HTML <a> linking to a component action, a named page, or a plain URL — bind exactly one of action, pageName and href. When disabled is truthy only the content is rendered (no <a> at all) and the link cannot be invoked. Other bindings become attributes on the tag. Tag name: link.
| Binding | Type | Description |
|---|---|---|
action
|
NGActionResultsread |
A component action invoked when the link is clicked. Pulled at invoke time; its |
pageName
|
Stringread |
The name of the page component to navigate to; instantiated via |
href
|
Stringread |
A URL rendered verbatim into the |
disabled
|
Objectread |
When truthy the |
<wo:password />
An <input type="password">. The submitted text is pushed into value (null when empty); the current value is never rendered back to the browser. Other bindings are rendered as attributes. Tag name: password.
| Binding | Type | Description |
|---|---|---|
value
required
|
→ Stringwritten |
Receives the submitted password as a |
name
|
Stringread |
The HTML form-field name. Pulled; auto-assigned from the element ID when unbound — bind it only when other code needs to know the field name. |
disabled
|
Objectread |
When truthy the field renders with the |
<wo:popUpButton />
A <select> over the objects in list. Single-select by default, bound to selection; bind multiple truthy and selections for a multi-select. Options are identified by their index in list. Other bindings are rendered as attributes on the <select>. Tag name: popUpButton.
| Binding | Type | Description |
|---|---|---|
list
required
|
List | SequencedCollectionread |
The options: a |
item
|
→ Objectwritten |
Pushed each option's object while rendering, so |
index
|
→ Integerwritten |
Pushed each option's zero-based index while rendering. |
displayString
|
Objectread |
The text shown for the current |
selection
|
Object → Objectread and written |
Single-select: the selected object. Pulled to mark the selected option (the sole authority when bound); pushed on submit with the chosen item, or |
noSelectionString
|
Stringread |
When bound, an extra first option with this label meaning "nothing selected"; choosing it pushes |
multiple
|
Objectread |
When truthy the element renders as a multi-select and works with |
selections
|
List → Listread and written |
Multi-select: the selected objects. Pulled to mark selected options; pushed on submit as a new |
name
|
Stringread |
The HTML form-field name. Pulled; auto-assigned from the element ID when unbound — bind it only when other code needs to know the field name. |
disabled
|
Objectread |
When truthy the field renders with the |
<wo:repetition>
Container
Renders its content once per item of list (with item set to the current object) or, alternatively, count times. Exactly one of list and count must be bound. index receives the zero-based iteration number either way.
| Binding | Type | Description |
|---|---|---|
list
|
List | SequencedCollectionread |
The objects to iterate over: a |
item
|
→ Objectwritten |
Pushed the current object before each iteration (and reset to |
index
|
→ Integerwritten |
Pushed the zero-based number of the current iteration. |
count
|
Integerread |
Iterate this many times instead of over a list. Pulled; an integer (a numeric constant in the template is accepted). Mutually exclusive with |
<wo:resourceURL />
Renders the URL of a webserver resource, for use in your own tags and attributes. Tag name: resourceURL.
| Binding | Type | Description |
|---|---|---|
filename
required
|
Stringread |
The name of the webserver resource in |
namespace
|
Stringread |
The resource namespace to look |
framework
|
Stringread |
Legacy name for Deprecated.
Use |
<wo:script />
Renders a <script src="…"> tag for a webserver resource. Tag name: script.
| Binding | Type | Description |
|---|---|---|
filename
required
|
Stringread |
The name of the JavaScript resource in |
namespace
|
Stringread |
The resource namespace to look |
framework
|
Stringread |
Legacy name for Deprecated.
Use |
<wo:str />
Renders a value as text. Anything that isn't a string is rendered with toString() (or through formatter when bound). A null value renders nothing at all. HTML is escaped by default.
| Binding | Type | Description |
|---|---|---|
value
required
|
Objectread |
The value to render. Pulled; required. |
valueWhenEmpty
|
Objectread |
Rendered instead of |
escapeHTML
|
Booleanread |
Whether reserved HTML characters ( Default: |
formatter
|
Formatread |
A |
<wo:stylesheet />
Renders a <link rel="stylesheet"> tag for a webserver resource. Tag name: stylesheet.
| Binding | Type | Description |
|---|---|---|
filename
required
|
Stringread |
The name of the CSS resource in |
namespace
|
Stringread |
The resource namespace to look |
framework
|
Stringread |
Legacy name for Deprecated.
Use |
<wo:submit />
An <input type="submit"> inside an NGForm. When this button is the one pressed, its action is invoked instead of the form's. Other bindings are rendered as attributes (bind value for the button's label). Tag name: submit.
| Binding | Type | Description |
|---|---|---|
action
required
|
NGActionResultsread |
The component action invoked when this button submits the form. Pulled at invoke time; required. |
<wo:switch>
Container
Renders the component (or dynamic element) named by componentName, which may change between requests. Every other binding is passed on to the chosen component as its own bindings, and the tag's content becomes the component's content. Tag name: switch.
| Binding | Type | Description |
|---|---|---|
componentName
required
|
Stringread |
The name of the component or element to render. Pulled on every phase; required, and must not resolve to |
WOComponentName
|
Stringread |
Legacy WebObjects name for Deprecated.
Use |
<wo:text />
A <textarea> bound two ways to value: rendered (HTML-escaped) from it, and the submitted text pushed back as a String (null when empty). Other bindings are rendered as attributes. Tag name: text.
| Binding | Type | Description |
|---|---|---|
value
required
|
Object → Stringread and written |
The text. Pulled to render and pushed on submit as a |
name
|
Stringread |
The HTML form-field name. Pulled; auto-assigned from the element ID when unbound — bind it only when other code needs to know the field name. |
<wo:textfield />
An <input type="text"> bound two ways to value: rendered from it, and the submitted text pushed back into it (as a String, or as whatever formatter parses it to; an empty field pushes null). Other bindings are rendered as attributes. Tag name: textfield.
| Binding | Type | Description |
|---|---|---|
value
required
|
Object → Object | Stringread and written |
The field's value. Pulled to render (formatted via |
name
|
Stringread |
The HTML form-field name. Pulled; auto-assigned from the element ID when unbound — bind it only when other code needs to know the field name. |
disabled
|
Objectread |
When truthy the field renders with the |
formatter
|
Formatread |
A |