← Playground index

AjaxSlim wonder-slim WebObjects

wonder-slim element reference

The elements of wonder-slim's ERExtensions: its additions, and its patches and replacements of WebObjects' own elements. A replacement answers to the WebObjects element's name in templates (ERXWOString is what WOString renders). Rendered from the .apiext files (the extended API format).

Passthrough forwards any attribute it doesn't handle itself (data-*, aria-*, role, class, …) verbatim onto the rendered tag. Container usually used as a container element, wrapping content.
A • marks a required binding.
On a binding's type: ↓ pulled (read), ↑ pushed (written back), ↕ two-way. A binding whose pulled and pushed types differ shows them on two rows.

ERXElse Container

Renders its content when the conditional just before it didn't: the "else" of an ERXWOConditional (<wo:if>). Written as <wo:else>.

<wo:if condition="$hasItems">…</wo:if>
<wo:else>No items</wo:else>

It must follow a conditional; used without one it throws.

BindingTypeDescription

The binding set is closed: only the bindings listed above are accepted.

ERXErrorLayout Container

The layout of the framework's error pages, for error pages of your own: a whole HTML page with a centered card, an icon, a heading, the content, and the application's name. ERXErrorPage, and the pages WebObjects shows when a session has expired, a page can't be restored or a session can't be created, are built on it.

<wo:ERXErrorLayout title="Not found" heading="That page doesn't exist">
	<p>The link may be old, or mistyped.</p>
	<p class="actions"><wo:link directActionName="default" class="button">Return to the front page</wo:link></p>
</wo:ERXErrorLayout>

It's self-contained (inline CSS and icon, no resources or scripts), so it renders even when what went wrong is the resources. Inside the content, class="muted" gives secondary text, class="actions" a paragraph of actions and class="button" a button.

BindingTypeDescription
title ↓ String

The document's title. The heading, if not bound.

heading ↓ String

The card's heading.

default: Something went wrong

The binding set is closed: only the bindings listed above are accepted.

ERXJavaScript Passthrough

Adds a script to the page: a <script> tag for a script resource (filename, optionally in a framework) or a URL (a filename that's a complete URL), rendered where the element is.

<wo:ERXJavaScript filename="app.js" defer />
<wo:ERXJavaScript filename="https://cdn.example/lib.js" integrity="sha384-…" crossorigin="anonymous" />

Every other attribute is rendered on the <script> tag. A bound type (such as module) replaces the default text/javascript. The element has no content: put inline script in a <script> tag.

BindingTypeDescription
filename ↓ String

Name of the script resource, or the script's complete URL.

framework ↓ String

Name of the framework containing the script resource. The application if not bound.

scriptSource deprecated ↓ String

Older name for filename, used only when filename isn't bound.

Use filename instead.

scriptFramework deprecated ↓ String

Older name for framework, used only when framework isn't bound.

Use framework instead.

Any other attribute (data-*, aria-*, role, class, …) is passed through verbatim onto the rendered tag.

At least one of 'filename' and 'scriptSource' must be bound.

ERXStyleSheet Passthrough

Adds a stylesheet to the page: a <link> tag for a stylesheet resource (filename, optionally in a framework) or a URL (href). The tag goes before the page's </head>, or where the element is (see inline), and a stylesheet already added to the page isn't added again.

<wo:ERXStyleSheet filename="wonder-select.css" framework="AjaxSlim" />
<wo:ERXStyleSheet href="https://cdn.example/lib.css" integrity="sha384-…" crossorigin="anonymous" />

Every other attribute is rendered on the <link> tag. The element has no content: put inline CSS in a <style> tag.

BindingTypeDescription
filename ↓ String

Name of the stylesheet resource.

framework ↓ String

Name of the framework containing the stylesheet resource. The application if not bound.

href ↓ String

URL of the stylesheet, instead of filename/framework.

media ↓ String

The stylesheet's media query.

inline ↓ Boolean

true renders the tag where the element is, false before the page's </head>. When not bound: inline for Ajax requests, in the head otherwise.

styleSheetName deprecated ↓ String

Older name for filename, used only when filename isn't bound.

Use filename instead.

styleSheetFrameworkName deprecated ↓ String

Older name for framework, used only when framework isn't bound.

Use framework instead.

styleSheetUrl deprecated ↓ String

Older name for href, used only when href isn't bound.

Use href instead.

Any other attribute (data-*, aria-*, role, class, …) is passed through verbatim onto the rendered tag.

Exactly one of ('filename' or 'styleSheetName') and ('href' or 'styleSheetUrl') must be bound.

ERXWOBrowser Passthrough

Renders a <select> list (multiple choice with multiple), one option per item of list, and sets selections from the chosen options. Patch of WOBrowser, installed in its place, so it's what WOBrowser renders. Differences from WO's: list accepts any java.util.List or array (null renders no options), and anything else throws, where WO silently renders no options. selections receives a mutable array, and is always set: WO fails to set it, silently, when list is an immutable list such as List.of().

Every other attribute is rendered on the tag.

BindingTypeDescription
list • ↓ List | Object[]

The items to choose from.

item ↑ Object

Receives each item while its option renders.

displayString ↓ String

Text of each option. The item's toString() if not bound.

value ↓ String

Value attribute of each option.

selections ↕ List

The chosen items: selects their options, and receives the chosen items when submitted.

selectedValues ↓ List

Values of the options to select, instead of selections.

multiple ↓ Boolean

Allow choosing several options.

escapeHTML ↓ Boolean

Whether to HTML-escape the option texts. Defaults to true.

name ↓ String

The field's name. Generated from the element ID if not bound.

disabled ↓ Object (truthy)

If true, the field is rendered disabled and its value isn't taken.

otherTagString ↓ String

Raw text added inside the tag. Prefer passing attributes directly.

Any other attribute (data-*, aria-*, role, class, …) is passed through verbatim onto the rendered tag.

'list' must be a keypath, not a constant.

'item' must be bound when 'displayString' or 'value' is bound.

'item' must be settable (assignable, not a constant).

At most one of 'selections' and 'selectedValues' may be bound.

ERXWOCase

One case of an ERXWOSwitch: its content renders when the switch's value equals this case's case. Only valid as a direct child of ERXWOSwitch.

BindingTypeDescription
case • ↓ Object

The value this case matches. Must be a constant (case="open", case=2): the switch reads every case's value once, when the template is parsed. "default" marks the case that renders when no other case matches, or when the switch's value is null.

The binding set is closed: only the bindings listed above are accepted.

ERXWOCheckBoxList Passthrough

Renders a checkbox for each item of list, and sets selections from the checked ones. Patch of WOCheckBoxList, installed in its place, so it's what WOCheckBoxList renders. Differences from WO's: list accepts any java.util.List or array (null renders no options), and anything else throws, where WO silently renders no options. selections receives a mutable array, and is always set: WO fails to set it, silently, when list is an immutable list such as List.of().

Every other attribute is rendered on the tag.

BindingTypeDescription
list • ↓ List | Object[]

The items to choose from.

item ↑ Object

Receives each item while its checkbox renders.

index ↑ Integer

Receives the index of each item.

displayString ↓ String

Label of each checkbox. The item's toString() if not bound.

value ↓ String

Value attribute of each checkbox.

selections ↕ List

The checked items: checks their boxes, and receives the checked items when submitted.

prefix ↓ String

Text rendered before each checkbox.

suffix ↓ String

Text rendered after each checkbox.

name ↓ String

The field's name. Generated from the element ID if not bound.

disabled ↓ Object (truthy)

If true, the field is rendered disabled and its value isn't taken.

otherTagString ↓ String

Raw text added inside the tag. Prefer passing attributes directly.

Any other attribute (data-*, aria-*, role, class, …) is passed through verbatim onto the rendered tag.

'list' must be a keypath, not a constant.

'item' must be bound when 'displayString' is bound.

'item' must be settable (assignable, not a constant).

ERXWOComponentContent

Renders the content a component was given, like WOComponentContent, but can pick one named part of it. For wrapper components that take more than one piece of content: the parent passes named ERXWOTemplates, and each ERXWOComponentContent in the wrapper renders the one whose templateName matches.

<!-- in the wrapper -->
<header><wo:ERXWOComponentContent templateName="header">Default header</wo:ERXWOComponentContent></header>
<main><wo:ERXWOComponentContent /></main>

Without templateName it renders all of the given content except the ERXWOTemplates, so named parts aren't rendered twice. Its own content renders when the given content has no part with that name.

BindingTypeDescription
templateName ↓ String

Name of the ERXWOTemplate to render. When not bound: everything that isn't an ERXWOTemplate.

The binding set is closed: only the bindings listed above are accepted.

ERXWOComponentInstance Passthrough

Embeds an already constructed component instance. Where <wo:MyComponent> (and WOSwitchComponent) construct the component themselves by name - leaving bindings as the only way to initialize it and giving you no handle to it - this element takes the instance from you: construct it (ERXComponentUtilities.instantiate(MyComponent.class, context())), configure it, keep a reference, call methods on it, and bind it to instance.

<wo:ERXWOComponentInstance instance="$inspector" selectedObject="$object">
  ...optional wrapped content, rendered by the instance's <wo:content />...
</wo:ERXWOComponentInstance>

Every other attribute is passed to the instance as a binding, exactly as on a normally embedded component. The instance is registered as a subcomponent of the page on first render, so it survives across requests (page cache, back button) like any embedded component. The binding is evaluated on every phase: bind a different instance and it is adopted immediately, the old one dropped from the page.

Rules, enforced with an exception: instance must not evaluate to null; the instance must not be stateless (stateless instances are pooled and shared); an instance already embedded in another parent is refused. Construct with ERXComponentUtilities.instantiate(), not pageWithName() - the latter awakens the instance and flags it as a page.

BindingTypeDescription
instance • ↓ WOComponent

The component instance to embed. Evaluated on every request-response phase; binding a different instance replaces the embedded component.

Any other attribute (data-*, aria-*, role, class, …) is passed through verbatim onto the rendered tag.

ERXWOConditional Container

Renders its content when condition is true (negate flips it). Installed in place of WOConditional, so it's what <wo:if>, <wo:conditional> and WOConditional render. Unlike WO's, it records whether it rendered, so an ERXElse that follows it can render the alternative:

<wo:if condition="$hasItems">…</wo:if>
<wo:else>No items</wo:else>
BindingTypeDescription
condition • ↓ Object (truthy)

Whether the content renders. Read with WOAssociation.booleanValueInComponent(): null, false, zero, and the string "false" are false.

negate ↓ Object (truthy)

If true, the content renders when condition is false.

The binding set is closed: only the bindings listed above are accepted.

ERXWOForm Container Passthrough

Renders a <form>. Installed in place of WOForm, so it's what <wo:form> and WOForm render. Submits to its action, a direct action (directActionName/actionClass) or an href; without any of them, to the page's component action URL, where the submitted buttons decide the action. The method is post unless bound. As in WO's, a form inside another form is left out (browsers don't support nested forms), and an off-screen default submit button can be added (addDefaultSubmitButton), so pressing return submits. Differences from WO's:

- A nested form is left out with a logged warning, and not at all when it's embedded.
- Every form has a name, generated when name isn't bound (WO names only forms with a bound name), and publishes it to the context, for elements that need to refer to their form.
- disabled leaves the form's tags out, and fragmentIdentifier appends # + its value to the action.

Attributes prefixed with ? become query parameters. Every other attribute is rendered on the tag.

BindingTypeDescription
action ↓ WOActionResults

Component action invoked on submit. Must not be a constant.

directActionName ↓ String

Direct action to submit to (in actionClass, or DirectAction).

actionClass ↓ String

Direct action class.

href ↓ String

URL to submit to.

queryDictionary ↓ Map

Query parameters added to the form's URL.

fragmentIdentifier ↓ String

Fragment (#…) appended to the form's URL, for example to scroll to error messages after submitting.

secure ↓ Boolean

Submit to an https URL.

method ↓ String

The HTTP method. Defaults to post.

enctype ↓ String

The form's encoding. A file upload inside the form requires multipart/form-data.

name ↓ String

The form's name, also published to the context for elements inside it.

id ↓ String

The form's id. With er.extensions.ERXWOForm.useIdInsteadOfNameTag, used as the form's name, rendered as id.

multipleSubmit ↓ Boolean

Whether the form has several submit buttons, each with its own action. Defaults to er.extensions.ERXWOForm.multipleSubmitDefault.

addDefaultSubmitButton ↓ Boolean

Add an off-screen submit button at the start of the form, so pressing return submits it. Defaults to er.extensions.ERXWOForm.addDefaultSubmitButtonDefault.

disabled ↓ Boolean

If true, the form's tags are left out and only its content renders.

embedded ↓ Boolean

Render the form even inside another form, for forms that are nested in the markup but independent for the user, such as in a modal container.

Any other attribute (data-*, aria-*, role, class, …) is passed through verbatim onto the rendered tag.

At most one of 'action', 'href' and ('directActionName' or 'actionClass') may be bound.

'action' must be a keypath, not a constant.

ERXWOHiddenField Passthrough

Renders an <input type="hidden"> and sets value from what's submitted. Patch of WOHiddenField, installed in its place, so it's what WOHiddenField renders. Differences from WO's: Adds a readonly binding: when true, the readonly attribute is rendered and the submitted value isn't taken.

Every other attribute is rendered on the tag.

BindingTypeDescription
value • ↕ Object

The field's value: rendered, and set from the submitted text.

readonly ↓ Object (truthy)

Not in WO's. If true, the readonly attribute is rendered and the submitted value isn't taken.

name ↓ String

The field's name. Generated from the element ID if not bound.

disabled ↓ Object (truthy)

If true, the field is rendered disabled and its value isn't taken.

otherTagString ↓ String

Raw text added inside the tag. Prefer passing attributes directly.

Any other attribute (data-*, aria-*, role, class, …) is passed through verbatim onto the rendered tag.

'value' must be settable (assignable, not a constant).

Renders a link, <a>: to a URL (href), a component action (action), a page (pageName), or a direct action (directActionName/actionClass). Installed in place of WOHyperlink, so it's what <wo:link> and WOHyperlink render. Differences from WO's:

- A disabled link's action returns the current page, not an empty response.
- Actions of elements inside the link (such as an onclick element) are invoked.
- The invoked action is recorded for logging.
- With er.extensions.ERXHyperlink.defaultNoFollow, links with an action get rel="nofollow".

Attributes prefixed with ? become query parameters (?id="$item.id"). Every other attribute is rendered on the tag.

BindingTypeDescription
href ↓ String

URL to link to.

action ↓ WOActionResults

Component action invoked when the link is followed.

pageName ↓ String

Name of the page to go to.

directActionName ↓ String

Direct action to link to (in actionClass, or DirectAction).

actionClass ↓ String

Direct action class. Without directActionName, its default action.

queryDictionary ↓ Map

Query parameters added to the URL.

fragmentIdentifier ↓ String

Fragment (#…) appended to the URL.

secure ↓ Boolean

Generate an https URL.

string ↓ String

Text of the link.

target ↓ String

The link's target attribute.

disabled ↓ Object (truthy)

If true, renders the content without a link.

Any other attribute (data-*, aria-*, role, class, …) is passed through verbatim onto the rendered tag.

Exactly one of 'href', 'action', 'pageName' and ('directActionName' or 'actionClass') must be bound.

ERXWOImage Passthrough

Renders an <img> tag for an image resource (filename, optionally in a framework) or a URL (src). Written as <wo:svg> for now. It's meant to become the one image element, for ng-objects as well.

<wo:svg filename="logo.svg" alt="Logo" />

Every other attribute is rendered on the tag (alt, width, height, loading, srcset, …). Unlike WOImage, it doesn't read the image to work out its dimensions: bind width/height if you want them.

BindingTypeDescription
src ↓ String

URL of the image. Used instead of filename if both are bound.

filename ↓ String

Name of the image resource.

framework ↓ String

Name of the framework containing the image resource. The application if not bound.

Any other attribute (data-*, aria-*, role, class, …) is passed through verbatim onto the rendered tag.

At least one of 'src' and 'filename' must be bound.

ERXWOPasswordField Passthrough

Renders an <input type="password"> and sets value from what's submitted. Patch of WOPasswordField, installed in its place, so it's what WOPasswordField renders. Differences from WO's: Adds a readonly binding: when true, the readonly attribute is rendered and the submitted value isn't taken.

Every other attribute is rendered on the tag.

BindingTypeDescription
value • ↕ Object

The field's value: rendered, and set from the submitted text.

readonly ↓ Object (truthy)

Not in WO's. If true, the readonly attribute is rendered and the submitted value isn't taken.

name ↓ String

The field's name. Generated from the element ID if not bound.

disabled ↓ Object (truthy)

If true, the field is rendered disabled and its value isn't taken.

otherTagString ↓ String

Raw text added inside the tag. Prefer passing attributes directly.

Any other attribute (data-*, aria-*, role, class, …) is passed through verbatim onto the rendered tag.

'value' must be settable (assignable, not a constant).

ERXWOPopUpButton Passthrough

Renders a <select> with one option per item of list, and sets selection from the chosen option. Patch of WOPopUpButton, installed in its place, so it's what WOPopUpButton renders. Differences from WO's: list accepts any java.util.List or array (null renders no options), and anything else throws, where WO silently renders no options.

Every other attribute is rendered on the tag.

BindingTypeDescription
list • ↓ List | Object[]

The items to choose from.

item ↑ Object

Receives each item while its option renders.

displayString ↓ String

Text of each option. The item's toString() if not bound.

value ↓ String

Value attribute of each option.

selection ↕ Object

The chosen item: selects its option, and receives the chosen item when submitted.

selectedValue ↓ Object

Value of the option to select, instead of selection.

noSelectionString ↓ String

Text of an extra first option that means "no selection".

escapeHTML ↓ Boolean

Whether to HTML-escape the option texts. Defaults to true.

name ↓ String

The field's name. Generated from the element ID if not bound.

disabled ↓ Object (truthy)

If true, the field is rendered disabled and its value isn't taken.

otherTagString ↓ String

Raw text added inside the tag. Prefer passing attributes directly.

Any other attribute (data-*, aria-*, role, class, …) is passed through verbatim onto the rendered tag.

'list' must be a keypath, not a constant.

'item' must be bound when 'displayString' or 'value' is bound.

'item' must be settable (assignable, not a constant).

At most one of 'selection' and 'selectedValue' may be bound.

ERXWORepetition Container

Renders its content once for every item of list, or count times. Installed in place of WORepetition, so it's what <wo:loop>, <wo:repetition> and WORepetition render.

<wo:loop list="$orders" item="$order" index="$i">…</wo:loop>
<wo:loop count="3" index="$i">…</wo:loop>

Unlike WO's, it also accepts object arrays (such as String[]), in addition to any java.util.List, and can put each item's hash code (or uniqueKey) in element IDs (checkHashCodes). An action then finds its own item even if the list changed between rendering the page and following the link, instead of acting on whatever item now sits at that position.

BindingTypeDescription
list ↓ List | Object[]

The items to iterate over. Null renders nothing.

item ↑ Object

Receives the current item.

count ↓ Number

Number of iterations, instead of a list.

index ↑ Integer

Receives the current index, from 0.

checkHashCodes ↓ Boolean

Put each item's hash code (or uniqueKey) in element IDs, so an action finds its item even if the list changed. Defaults to er.extensions.ERXWORepetition.checkHashCodes.

uniqueKey ↓ String

A key path on each item whose value identifies it, used instead of its hash code with checkHashCodes.

raiseOnUnmatchedObject ↓ Boolean

With checkHashCodes: throw when an action's item is no longer in the list, rather than using notFoundMarker. Defaults to er.extensions.ERXWORepetition.raiseOnUnmatchedObject.

notFoundMarker ↓ Object

With checkHashCodes: the item used when an action's item is no longer in the list. Don't bind it to null, which is read as false.

debugHashCodes ↓ Boolean

Log each item's hash code as the repetition is traversed.

The binding set is closed: only the bindings listed above are accepted.

Exactly one of 'list' and 'count' must be bound.

At most one of 'count' and 'item' may be bound.

'item' must be bound when 'list' is bound.

'item' must be settable (assignable, not a constant).

'index' must be settable (assignable, not a constant).

ERXWOString

Renders a value as text, HTML-escaped by default, optionally formatted. Installed in place of WOString, so it's what <wo:str> and WOString render. Unlike WO's, it formats in the current locale (ERXLocale.current()), and formats java.time values, with dateformat or a DateTimeFormatter as formatter.

<wo:str value="$order.total" numberformat="#,##0.00" />
<wo:str value="$order.date" dateformat="%d.%m.%Y" />
<wo:str value="$order.shippedOn" dateformat="dd.MM.yyyy" valueWhenEmpty="Not shipped" />

At most one of dateformat, numberformat and formatter.

BindingTypeDescription
value • ↓ Object

The value to render, with toString() unless it's formatted.

valueWhenEmpty ↓ String

Rendered instead when the value is null or renders as an empty string. Currently rendered unescaped (see #89).

escapeHTML ↓ Boolean

Whether to HTML-escape the rendered value. Defaults to true.

dateformat ↓ String

Date format pattern. For an NSTimestamp: an NSTimestampFormatter (strftime-style) pattern such as %d.%m.%Y. For a java.time value (LocalDate, LocalDateTime, ZonedDateTime, Instant, …): either that syntax, recognised by a % outside quoted text and rendered exactly as NSTimestampFormatter would, or a DateTimeFormatter pattern such as dd.MM.yyyy. A pattern that doesn't fit the value (a time on a LocalDate) throws. When bound but null: the full timestamp for an NSTimestamp, ISO toString() for a java.time value.

numberformat ↓ String

Number format pattern, such as #,##0.00, in the current locale. When bound but null: a default for the value's type.

formatter ↓ Format | DateTimeFormatter

A formatter to use instead of a pattern: a java.text.Format, or a DateTimeFormatter for java.time values.

The binding set is closed: only the bindings listed above are accepted.

At most one of 'dateformat', 'numberformat' and 'formatter' may be bound.

ERXWOSwitch Container

Renders the one ERXWOCase among its children whose case equals the value of case, a "multiple if".

<wo:ERXWOSwitch case="$status">
  <wo:ERXWOCase case="open">Open</wo:ERXWOCase>
  <wo:ERXWOCase case="closed">Closed</wo:ERXWOCase>
  <wo:ERXWOCase case="default">Unknown</wo:ERXWOCase>
</wo:ERXWOSwitch>

Its direct children must be ERXWOCase elements (whitespace between them is allowed). If no case matches, the case whose case is "default" renders, or nothing if there's none.

BindingTypeDescription
case • ↓ Object

The value to switch on, compared with each case's case using equals(). A null value selects the "default" case.

The binding set is closed: only the bindings listed above are accepted.

ERXWOSwitchComponent Passthrough

Renders the component (or dynamic element) named by WOComponentName, which can change from one render to the next. Installed in place of WOSwitchComponent. Unlike WO's, it identifies the chosen component in element IDs by a number instead of its name, which keeps component names out of URLs and makes them shorter.

Every other attribute is passed to the chosen component as a binding, and the content becomes its component content.

BindingTypeDescription
WOComponentName ↓ String

Name of the component or dynamic element to render. It must not evaluate to null or an empty string.

_componentName deprecated ↓ String

Older name for WOComponentName, used only when WOComponentName isn't bound.

Use WOComponentName instead.

Any other attribute (data-*, aria-*, role, class, …) is passed through verbatim onto the rendered tag.

At least one of 'WOComponentName' and '_componentName' must be bound.

ERXWOTemplate Container

A named piece of content passed to a wrapper component, for wrappers that take more than one piece of content. Inside the wrapper, an ERXWOComponentContent with the same templateName renders it.

<wo:MyWrapper>
  <wo:ERXWOTemplate templateName="header">Title</wo:ERXWOTemplate>
  <wo:ERXWOTemplate templateName="body">…</wo:ERXWOTemplate>
</wo:MyWrapper>

A plain WOComponentContent in the wrapper renders all of the content, the templates included.

BindingTypeDescription
templateName • ↓ String

The name an ERXWOComponentContent in the wrapper refers to, to render this content.

The binding set is closed: only the bindings listed above are accepted.

ERXWOText Passthrough

Renders an <textarea> and sets value from what's submitted. Patch of WOText, installed in its place, so it's what WOText renders. Differences from WO's: Adds a readonly binding: when true, the readonly attribute is rendered and the submitted value isn't taken.

Every other attribute is rendered on the tag.

BindingTypeDescription
value • ↕ Object

The field's value: rendered, and set from the submitted text.

readonly ↓ Object (truthy)

Not in WO's. If true, the readonly attribute is rendered and the submitted value isn't taken.

name ↓ String

The field's name. Generated from the element ID if not bound.

disabled ↓ Object (truthy)

If true, the field is rendered disabled and its value isn't taken.

otherTagString ↓ String

Raw text added inside the tag. Prefer passing attributes directly.

Any other attribute (data-*, aria-*, role, class, …) is passed through verbatim onto the rendered tag.

'value' must be settable (assignable, not a constant).

ERXWOTextField Passthrough

Renders an <input> field and, when the form is submitted, parses its text back into value, optionally through a formatter. Installed in place of WOTextField.

<wo:WOTextField value="$price" numberformat="#,##0.00" />
<wo:WOTextField value="$email" type="email" blankIsNull="true" />

Numbers and dates are formatted and parsed in the current locale (ERXLocale.current()). With an Icelandic locale, for instance, 12.50 parses as 1250, so apps must only set a locale they mean. Every other attribute is rendered on the tag. At most one of dateformat, numberformat and formatter.

BindingTypeDescription
value • ↕ Object

The field's value: rendered, and set from the submitted text.

type ↓ String

The input's type attribute, such as email, number or date. Defaults to text.

numberformat ↓ String

Number format pattern, such as #,##0.00, for rendering and parsing.

dateformat ↓ String

NSTimestampFormatter date format pattern, such as %d.%m.%Y, for rendering and parsing NSTimestamp values.

formatter ↓ Format

A formatter to use instead of a pattern.

useDecimalNumber ↓ Boolean

With a number format: set the parsed value as a BigDecimal.

blankIsNull ↓ Boolean

Set an empty submission as null rather than "". Defaults to true.

readonly ↓ Boolean

If true, the field is rendered but its submitted value isn't taken.

disabled ↓ Boolean

If true, the field is rendered disabled and its value isn't taken.

name ↓ String

The input's name. Generated from the element ID if not bound.

Any other attribute (data-*, aria-*, role, class, …) is passed through verbatim onto the rendered tag.

At most one of 'dateformat', 'numberformat' and 'formatter' may be bound.

'value' must be settable (assignable, not a constant).

WOCollapsibleComponentContent Container

Content that can be collapsed and expanded with a clickable arrow and label. Each click is a component action that toggles visibility.

Carried over from JavaWOExtensions.

BindingTypeDescription
condition ↓ Object

Whether the content starts out visible: a Boolean, a non-zero Number, or any other non-null value. Hidden if not bound.

visibility ↑ Integer

Receives the visibility after each toggle: 1 for visible, 0 for hidden.

openedLabel ↓ String

Label shown while the content is visible.

closedLabel ↓ String

Label shown while the content is hidden.

openedImageFileName ↓ String

Image resource for the arrow while visible. Defaults to the framework's own.

closedImageFileName ↓ String

Image resource for the arrow while hidden. Defaults to the framework's own.

framework ↓ String

Framework containing the arrow images. Defaults to ERExtensions.

submitActionName ↓ String

Name of an action of the parent component, performed after each toggle.

disabled ↓ Boolean

If true, the arrow and label can't be clicked.

The binding set is closed: only the bindings listed above are accepted.

WOIFrame

Renders an <iframe>. Its source is a URL (src), or a component action URL whose response is the page named by pageName, the element bound to value, or the element returned by the parent's binding named by actionName. The element's content renders inside the iframe tag, as fallback content.

Carried over from JavaWOExtensions.

BindingTypeDescription
src ↓ String

URL of the frame's content.

pageName ↓ String

Name of the page to render in the frame.

value ↓ WOElement

A component or element to render in the frame. Used if pageName isn't bound.

actionName ↓ String

Name of a binding of the parent component whose value, a component or element, renders in the frame. Used if neither pageName nor value is bound.

name ↓ String

The iframe's name attribute.

width ↓ Object

The iframe's width attribute.

height ↓ Object

The iframe's height attribute.

style ↓ String

The iframe's style attribute.

align ↓ String

The iframe's align attribute (obsolete in HTML5; use CSS).

border ↓ Object

The iframe's border attribute (obsolete in HTML5; use CSS).

frameborder ↓ Object

The iframe's frameborder attribute (obsolete in HTML5; use CSS).

marginheight ↓ Object

The iframe's marginheight attribute (obsolete in HTML5).

marginwidth ↓ Object

The iframe's marginwidth attribute (obsolete in HTML5).

scrolling ↓ Object

The iframe's scrolling attribute (obsolete in HTML5; use CSS).

longdesc ↓ String

The iframe's longdesc attribute (obsolete in HTML5).

The binding set is closed: only the bindings listed above are accepted.

At least one of 'src', 'pageName', 'value' and 'actionName' must be bound.

WOKeyValueConditional Container

Renders its content when the parent component's value for key equals value (compared with equals(); two nulls are equal). negate flips it.

Carried over from JavaWOExtensions.

BindingTypeDescription
key • ↓ String

A key path, evaluated on the parent component.

value ↓ Object

The value to compare with. Null if not bound.

negate ↓ Object

If true (a Boolean, a non-zero Integer, or the string "true"), content renders when the values differ.

The binding set is closed: only the bindings listed above are accepted.

WOMetaRefresh

Renders a <meta http-equiv="refresh"> tag that, after seconds, requests a component action URL. That action returns the page named by pageName, or the result of action.

Carried over from JavaWOExtensions.

BindingTypeDescription
seconds • ↓ Object

Seconds before the refresh, rendered with toString().

pageName ↓ String

Name of the page to go to. Used instead of action if both are bound.

action ↓ WOComponent

The action whose result is shown after the refresh.

The binding set is closed: only the bindings listed above are accepted.

At least one of 'pageName' and 'action' must be bound.