Component Index

org.apache.tapestry.corelib.base.AbstractComponentActionLink

[JavaDoc]

Component inheritance

Parameters

NameTypeFlagsDefaultDefault PrefixDescription
anchorStringliteralAn anchor value to append to the generated URL (the hash separator will be added automatically).
contextjava.util.ListpropThe context for the link (optional parameter). This list of values will be converted into strings and included in the URI. The strings will be coerced back to whatever their values are and made available to event handler methods.
disabledbooleanfalsepropIf true, then then no link element is rendered (and no informal parameters as well). The body is, however, still rendered.
zoneStringliteralBinding zone turns the link into a an Ajax control that causes the related zone to be updated.

org.apache.tapestry.corelib.base.AbstractField

Provides initialization of the clientId and elementName properties. In addition, adds the org.apache.tapestry.corelib.mixins.RenderInformals, org.apache.tapestry.corelib.mixins.RenderDisabled and org.apache.tapestry.corelib.mixins.DiscardBody mixins.[JavaDoc]

Parameters

NameTypeFlagsDefaultDefault PrefixDescription
clientIdStringprop:componentResources.idliteralThe id used to generate a page-unique client-side identifier for the component. If a component renders multiple times, a suffix will be appended to the to id to ensure uniqueness. The uniqued value may be accessed via the clientId property.
disabledbooleanfalsepropIf true, then the field will render out with a disabled attribute (to turn off client-side behavior). Further, a disabled field ignores any value in the request when the form is submitted.
labelStringliteralThe user presentable label for the field. If not provided, a reasonable label is generated from the component's id, first by looking for a message key named "id-label" (substituting the component's actual id), then by converting the actual id to a presentable string (for example, "userId" to "User Id").

org.apache.tapestry.corelib.base.AbstractLink

Provides base utilities for classes that generate clickable links.[JavaDoc]

Parameters

NameTypeFlagsDefaultDefault PrefixDescription
anchorStringliteralAn anchor value to append to the generated URL (the hash separator will be added automatically).

org.apache.tapestry.corelib.base.AbstractPropertyOutput

Base class for components that output a property value using a org.apache.tapestry.beaneditor.PropertyModel. There's a relationship between such a component and its container, as the container may provide messages in its message catalog needed by the org.apache.tapestry.Blocks that render the values. In addition, the component may be passed Block parameters that are output overrides for specified properties. Subclasses will implement a beginRender() method that invokes org.apache.tapestry.corelib.base.AbstractPropertyOutput#renderPropertyValue(MarkupWriter, String).[JavaDoc]

Parameters

NameTypeFlagsDefaultDefault PrefixDescription
modelorg.apache.tapestry.beaneditor.PropertyModelRequiredpropModel for property displayed by the cell.
objectObjectRequiredpropIdentifies the object being rendered. The component will extract a property from the object and render its value (or delegate to a org.apache.tapestry.Block that will do so).
overridesorg.apache.tapestry.ComponentResourcesRequiredpropResources used to search for block parameter overrides (this is normally the enclosing Grid component's resources).

org.apache.tapestry.corelib.base.AbstractTextField

Abstract class for a variety of components that render some variation of a text field. Most of the hooks for user input validation are in this class. In particular, all subclasses support the "toclient" and "parseclient" events. These two events allow the normal org.apache.tapestry.Translator (specified by the translate parameter, but often automatically derived by Tapestry) to be augmented. If the component container (i.e., the page) provides an event handler method for the "toclient" event, and that handler returns a non-null string, that will be the string value sent to the client. The context passed to the event handler method is t he current value of the value parameter. Likewise, on a form submit, the "parseclient" event handler method will be passed the string provided by the client, and may provide a non-null value as the parsed value. Returning null allows the normal translator to operate. The event handler may also throw org.apache.tapestry.ValidationException.[JavaDoc]

Component inheritance

Parameters

NameTypeFlagsDefaultDefault PrefixDescription
clientIdStringprop:componentResources.idliteralThe id used to generate a page-unique client-side identifier for the component. If a component renders multiple times, a suffix will be appended to the to id to ensure uniqueness. The uniqued value may be accessed via the clientId property.
disabledbooleanfalsepropIf true, then the field will render out with a disabled attribute (to turn off client-side behavior). Further, a disabled field ignores any value in the request when the form is submitted.
labelStringliteralThe user presentable label for the field. If not provided, a reasonable label is generated from the component's id, first by looking for a message key named "id-label" (substituting the component's actual id), then by converting the actual id to a presentable string (for example, "userId" to "User Id").
nullsorg.apache.tapestry.NullFieldStrategydefaultnullfieldstrategyDefines how nulls on the server side, or sent from the client side, are treated. The selected strategy may replace the nulls with some other value. The default strategy leaves nulls alone. Another built-in strategy, zero, replaces nulls with the value 0.
translateorg.apache.tapestry.TranslatorRequiredpropThe object which will perform translation between server-side and client-side representations. If not specified, a value will usually be generated based on the type of the value parameter.
validateorg.apache.tapestry.FieldValidatorvalidateThe object that will perform input validation (which occurs after translation). The translate binding prefix is generally used to provide this object in a declarative fashion.
valueObjectRequiredpropThe value to be read and updated. This is not necessarily a string, a translator may be provided to convert between client side and server side representations. If not bound, a default binding is made to a property of the container matching the component's id. If no such property exists, then you will see a runtime exception due to the unbound value parameter.

org.apache.tapestry.corelib.components.ActionLink

Component that triggers an action on the server with a subsequent full page refresh.[JavaDoc]

Component inheritance

Parameters

NameTypeFlagsDefaultDefault PrefixDescription
anchorStringliteralAn anchor value to append to the generated URL (the hash separator will be added automatically).
contextjava.util.ListpropThe context for the link (optional parameter). This list of values will be converted into strings and included in the URI. The strings will be coerced back to whatever their values are and made available to event handler methods.
disabledbooleanfalsepropIf true, then then no link element is rendered (and no informal parameters as well). The body is, however, still rendered.
zoneStringliteralBinding zone turns the link into a an Ajax control that causes the related zone to be updated.

org.apache.tapestry.corelib.components.BeanDisplay

Used to display the properties of a bean, using an underlying org.apache.tapestry.beaneditor.BeanModel. The output is a series of div elements for the property names and property values.[JavaDoc]

Parameters

NameTypeFlagsDefaultDefault PrefixDescription
modelorg.apache.tapestry.beaneditor.BeanModelpropThe model that identifies the parameters to be displayed, their order, and every other aspect. If not specified, a default bean model will be created from the type of the object bound to the object parameter.
objectObjectRequiredpropThe object to be rendered; if not explicitly bound, a default binding to a property whose name matches this component's id will be used.
overridesorg.apache.tapestry.ComponentResourcescomponentResourcespropWhere to search for local overrides of property display blocks as block parameters. Further, the container of the overrides is used as the source for overridden validation messages. This is normally the component itself, but when the component is used within a BeanEditForm, it will be the BeanEditForm's block parameter that will be searched.
removeStringliteralA comma-separated list of property names to be removed from the org.apache.tapestry.beaneditor.BeanModel. The names are case-insensitive.
reorderStringliteralA comma-separated list of property names indicating the order in which the properties should be presented. The names are case insensitive. Any properties not indicated in the list will be appended to the end of the display order.

org.apache.tapestry.corelib.components.BeanEditForm

A component that creates an entire form editing the properties of a particular bean. Inspired by Trails and BeanForm (both for Tapestry 4). Generates a simple UI for editing the properties of a JavaBean, with the flavor of UI for each property (text field, checkbox, drop down list) determined from the property type, and the order and validation for the properties determined from annotations on the property's getter and setter methods. You may add t:parameters to the component; when the name matches (case insensitive) the name of a property, then the corresponding Block is renderered, rather than any of the built in property editor blocks. This allows you to override specific properties with your own customized UI, for cases where the default UI is insufficient, or no built-in editor type is appropriate. This component is likely to change more than any other thing in Tapestry! What's available now is a very limited preview of its eventual functionality.[JavaDoc]

Parameters

NameTypeFlagsDefaultDefault PrefixDescription
clientValidationbooleanpropIf true, the default, then the embedded Form component will use client-side validation.
modelorg.apache.tapestry.beaneditor.BeanModelpropThe model that identifies the parameters to be edited, their order, and every other aspect. If not specified, a default bean model will be created from the type of the object bound to the object parameter.
objectObjectRequiredpropThe object to be edited by the BeanEditor. This will be read when the component renders and updated when the form for the component is submitted. Typically, the container will listen for a "prepare" event, in order to ensure that a non-null value is ready to be read or updated.
removeStringliteralA comma-separated list of property names to be removed from the org.apache.tapestry.beaneditor.BeanModel. The names are case-insensitive.
reorderStringliteralA comma-separated list of property names indicating the order in which the properties should be presented. The names are case insensitive. Any properties not indicated in the list will be appended to the end of the display order.
submitLabelStringmessage:submit-labelliteralThe text label for the submit button of the form, by default "Create/Update".

org.apache.tapestry.corelib.components.BeanEditor

A component that generates a user interface for editing the properties of a bean. This is the central component of the org.apache.tapestry.corelib.components.BeanEditForm, and utilizes a org.apache.tapestry.corelib.components.PropertyEditor for much of its functionality.[JavaDoc]

Parameters

NameTypeFlagsDefaultDefault PrefixDescription
modelorg.apache.tapestry.beaneditor.BeanModelpropThe model that identifies the parameters to be edited, their order, and every other aspect. If not specified, a default bean model will be created from the type of the object bound to the object parameter.
objectObjectpropThe object to be edited by the BeanEditor. This will be read when the component renders and updated when the form for the component is submitted. Typically, the container will listen for a "prepare" event, in order to ensure that a non-null value is ready to be read or updated.
overridesorg.apache.tapestry.ComponentResourcescomponentResourcespropWhere to search for local overrides of property editing blocks as block parameters. Further, the container of the overrides is used as the source for overridden validation messages. This is normally the component itself, but when the component is used within a BeanEditForm, it will be the BeanEditForm's block parameter that will be searched.
removeStringliteralA comma-separated list of property names to be removed from the org.apache.tapestry.beaneditor.BeanModel. The names are case-insensitive.
reorderStringliteralA comma-separated list of property names indicating the order in which the properties should be presented. The names are case insensitive. Any properties not indicated in the list will be appended to the end of the display order.

org.apache.tapestry.corelib.components.Checkbox

A Checkbox component is simply a input type="checkbox".[JavaDoc]

Component inheritance

Parameters

NameTypeFlagsDefaultDefault PrefixDescription
clientIdStringprop:componentResources.idliteralThe id used to generate a page-unique client-side identifier for the component. If a component renders multiple times, a suffix will be appended to the to id to ensure uniqueness. The uniqued value may be accessed via the clientId property.
disabledbooleanfalsepropIf true, then the field will render out with a disabled attribute (to turn off client-side behavior). Further, a disabled field ignores any value in the request when the form is submitted.
labelStringliteralThe user presentable label for the field. If not provided, a reasonable label is generated from the component's id, first by looking for a message key named "id-label" (substituting the component's actual id), then by converting the actual id to a presentable string (for example, "userId" to "User Id").
valuebooleanRequiredpropThe value to be read or updated. If not bound, the Checkbox will attempt to edit a property of its container whose name matches the component's id.

org.apache.tapestry.corelib.components.DateField

A component used to collect a provided date from the user. This is a wrapper around the LGPL dynarch.com DHTML/JavaScript Calendar.[JavaDoc]

Component inheritance

Parameters

NameTypeFlagsDefaultDefault PrefixDescription
clientIdStringprop:componentResources.idliteralThe id used to generate a page-unique client-side identifier for the component. If a component renders multiple times, a suffix will be appended to the to id to ensure uniqueness. The uniqued value may be accessed via the clientId property.
disabledbooleanfalsepropIf true, then the field will render out with a disabled attribute (to turn off client-side behavior). Further, a disabled field ignores any value in the request when the form is submitted.
editTimebooleanpropIf true, then the client-side calendar will show the time as well as the date. You will probably need to bind the format parameter as well when this is true, say to %m/%d/%y %H:%M.
formatStringliteral
labelStringliteralThe user presentable label for the field. If not provided, a reasonable label is generated from the component's id, first by looking for a message key named "id-label" (substituting the component's actual id), then by converting the actual id to a presentable string (for example, "userId" to "User Id").
validateorg.apache.tapestry.FieldValidatorvalidateThe object that will perform input validation (which occurs after translation). The translate binding prefix is generally used to provide this object in a declarative fashion.
valuejava.util.DateRequiredpropThe value parameter of a DateField must be a java.util.Date.

org.apache.tapestry.corelib.components.Delegate

A component that does not do any rendering of its own, but will delegate to some other object that can do rendering. This other object may be a component or a org.apache.tapestry.Block (among other things).[JavaDoc]

Parameters

NameTypeFlagsDefaultDefault PrefixDescription
toObjectRequiredpropTh object which will be rendered in place of the Delegate component. This is typically a specific component instance, or a org.apache.tapestry.Block.

org.apache.tapestry.corelib.components.Errors

Standard validation error presenter. Must be enclosed by a org.apache.tapestry.corelib.components.Form component. If errors are present, renders a div element around a banner message and around an unnumbered list of error messages. Renders nothing if the org.apache.tapestry.ValidationTracker shows no errors.[JavaDoc]

Parameters

NameTypeFlagsDefaultDefault PrefixDescription
bannerStringmessage:default-bannerpropThe banner message displayed above the errors. The default value is "You must correct the following errors before you may continue.".
classStringpropThe CSS class for the div element rendered by the component. The default value is "t-error".

org.apache.tapestry.corelib.components.EventLink

A close relative of org.apache.tapestry.corelib.components.ActionLink except in two ways. First, the event that it triggers is explicitly controlled, rather than always "action". Second, the event is triggered in its container. This allows slightly shorter URLs but also allows multiple components within the same container to generate identical URLs for common actions.[JavaDoc]

Component inheritance

Parameters

NameTypeFlagsDefaultDefault PrefixDescription
anchorStringliteralAn anchor value to append to the generated URL (the hash separator will be added automatically).
contextjava.util.ListpropThe context for the link (optional parameter). This list of values will be converted into strings and included in the URI. The strings will be coerced back to whatever their values are and made available to event handler methods.
disabledbooleanfalsepropIf true, then then no link element is rendered (and no informal parameters as well). The body is, however, still rendered.
eventStringRequiredliteralThe name of the event to be triggered in the parent component. An org.apache.tapestry.corelib.components.ActionLink triggers an "action" event on itself, and EventLink component triggers any arbitrary event on its container.
zoneStringliteralBinding zone turns the link into a an Ajax control that causes the related zone to be updated.

org.apache.tapestry.corelib.components.Form

An HTML form, which will enclose other components to render out the various types of fields. A Form emits many notification events. When it renders, it fires a org.apache.tapestry.corelib.components.Form#PREPARE_FOR_RENDER notification, followed by a org.apache.tapestry.corelib.components.Form#PREPARE notification. When the form is submitted, the component emits several notifications: first a org.apache.tapestry.corelib.components.Form#PREPARE_FOR_SUBMIT, then a org.apache.tapestry.corelib.components.Form#PREPARE: these allow the page to update its state as necessary to prepare for the form submission, then (after components enclosed by the form have operated), a org.apache.tapestry.corelib.components.Form#VALIDATEevent is emitted, to allow for cross-form validation. After that, either a org.apache.tapestry.corelib.components.Form#SUCCESS OR org.apache.tapestry.corelib.components.Form#FAILURE event (depending on whether the org.apache.tapestry.ValidationTracker has recorded any errors). Lastly, a org.apache.tapestry.corelib.components.Form#SUBMIT event, for any listeners that care only about form submission, regardless of success or failure. For all of these notifications, the event context is derived from the context parameter. This context is encoded into the form's action URI (the parameter is not read when the form is submitted, instead the values encoded into the form are used).[JavaDoc]

Parameters

NameTypeFlagsDefaultDefault PrefixDescription
clientValidationbooleantruepropIf true (the default) then client validation is enabled for the form, and the default set of JavaScript libraries (Prototype, Scriptaculous and the Tapestry library) will be added to the rendered page, and the form will register itself for validation. This may be turned off when client validation is not desired; for example, when many validations are used that do not operate on the client side at all.
contextjava.util.ListpropThe context for the link (optional parameter). This list of values will be converted into strings and included in the URI. The strings will be coerced back to whatever their values are and made available to event handler methods.
trackerorg.apache.tapestry.ValidationTrackerdefaultTrackerpropThe object which will record user input and validation errors. The object must be persistent between requests (since the form submission and validation occurs in an component event request and the subsequent render occurs in a render request). The default is a persistent property of the Form component and this is sufficient for nearly all purposes (except when a Form is rendered inside a loop).

org.apache.tapestry.corelib.components.Grid

A grid presents tabular data. It is a composite component, created in terms of several sub-components. The sub-components are statically wired to the Grid, as it provides access to the data and other models that they need. A Grid may operate inside a org.apache.tapestry.corelib.components.Form. By overriding the cell renderers of properties, the default output only behavior can be changed to produce a complex form with individual control for editing properties of each row. This is currently workable but less than ideal -- if the order of rows provided by the org.apache.tapestry.grid.GridDataSource changes between render and form submission, then there's the possibility that data will be applied to the wrong server-side objects.[JavaDoc]

Parameters

NameTypeFlagsDefaultDefault PrefixDescription
emptyorg.apache.tapestry.Blockblock:emptypropA Block to render instead of the table (and pager, etc.) when the source is empty. The default is simply the text "There is no data to display". This parameter is used to customize that message, possibly including components to allow the user to create new objects.
leanbooleanpropIf true, then the CSS class on each TD and TH cell will be omitted, which can reduce the amount of output from the component overall by a considerable amount. Leave this as false, the default, when you are leveraging the CSS to customize the look and feel of particular columns.
modelorg.apache.tapestry.beaneditor.BeanModelpropThe model used to identify the properties to be presented and the order of presentation. The model may be omitted, in which case a default model is generated from the first object in the data source (this implies that the objects provided by the source are uniform). The model may be explicitly specified to override the default behavior, say to reorder or rename columns or add additional columns.
pagerPositionorg.apache.tapestry.corelib.data.GridPagerPositionbottomliteralDefines where the pager (used to navigate within the "pages" of results) should be displayed: "top", "bottom", "both" or "none".
removeStringliteralA comma-separated list of property names to be removed from the org.apache.tapestry.beaneditor.BeanModel. The names are case-insensitive.
reorderStringliteralA comma-separated list of property names indicating the order in which the properties should be presented. The names are case insensitive. Any properties not indicated in the list will be appended to the end of the display order.
rowObjectpropUsed to store the current object being rendered (for the current row). This is used when parameter blocks are provided to override the default cell renderer for a particular column ... the components within the block can use the property bound to the row parameter to know what they should render.
rowClassStringNOT CachedpropThe CSS class for the tr element for each data row. This can be used to highlight particular rows, or cycle between CSS values (for the "zebra effect"). If null or not bound, then no particular CSS class value is used.
rowsPerPageint25propThe number of rows of data displayed on each page. If there are more rows than will fit, the Grid will divide up the rows into "pages" and (normally) provide a pager to allow the user to navigate within the overall result set.
sourceObjectRequiredpropThe source of data for the Grid to display. This will usually be a List or array but can also be an explicit org.apache.tapestry.grid.GridDataSource. For Lists and Arrays, a GridDataSource is created automatically as a wrapper around the underlying List.
volatilebooleanpropIf true and the Loop is enclosed by a Form, then the normal state persisting logic is turned off. Defaults to false, enabling state saving persisting within Forms. If a Grid is present for some reason within a Form, but does not contain any form control components (such as org.apache.tapestry.corelib.components.TextField), then binding volatile to false will reduce the amount of client-side state that must be persisted.

org.apache.tapestry.corelib.components.GridCell

Part of org.apache.tapestry.corelib.components.Grid that renders the markup inside a single data cell. GridCell is used inside a pair of loops; the outer loop for each row, the inner loop for each property of the row.[JavaDoc]

Component inheritance

Parameters

NameTypeFlagsDefaultDefault PrefixDescription
modelorg.apache.tapestry.beaneditor.PropertyModelRequiredpropModel for property displayed by the cell.
objectObjectRequiredpropIdentifies the object being rendered. The component will extract a property from the object and render its value (or delegate to a org.apache.tapestry.Block that will do so).
overridesorg.apache.tapestry.ComponentResourcesRequiredpropResources used to search for block parameter overrides (this is normally the enclosing Grid component's resources).

org.apache.tapestry.corelib.components.GridColumns

Renders out the column headers for the grid. Eventually, this will include control over column sorting, perhaps even column ordering.[JavaDoc]

Parameters

NameTypeFlagsDefaultDefault PrefixDescription
dataProviderorg.apache.tapestry.grid.GridModelProvidercomponentResources.containerpropThe object that provides access to bean and data models, which is typically the enclosing Grid component.
leanbooleanpropIf true, then the CSS class on each TH cell will be omitted, which can reduce the amount of output from the component overall by a considerable amount. Leave this as false, the default, when you are leveraging the CSS to customize the look and feel of particular columns.
sortAscendingbooleanRequiredpropIf true, then the sort is ascending (A - Z), if false the descending (Z - A).
sortColumnIdStringRequiredpropThe column which is currently being sorted. This value is the column's id, not its name. This parameter may be null, in which case no column is being used for sorting.

org.apache.tapestry.corelib.components.GridPager

Generates a series of links used to jump to a particular page index within the overall data set.[JavaDoc]

Parameters

NameTypeFlagsDefaultDefault PrefixDescription
currentPageintRequiredpropThe current page number (indexed from 1).
rangeint5propNumber of pages before and after the current page in the range. The pager always displays links for 2 * range + 1 pages, unless that's more than the total number of available pages.
rowsPerPageintRequiredpropThe number of rows displayed per page.
sourceorg.apache.tapestry.grid.GridDataSourceRequiredpropThe source of the data displayed by the grid (this is used to determine how many rows are available, which in turn determines the page count).

org.apache.tapestry.corelib.components.GridRows

Renders out a series of rows within the table. Inside a org.apache.tapestry.corelib.components.Form, a series of row index numbers are stored into the form ( ). This is not ideal ... in a situation where the data set can shift between the form render and the form submission, this can cause unexpected results, including applying changes to the wrong objects.[JavaDoc]

Parameters

NameTypeFlagsDefaultDefault PrefixDescription
currentPageintRequiredpropThe current page number within the available pages (indexed from 1).
leanbooleanpropIf true, then the CSS class on each TD cell will be omitted, which can reduce the amount of output from the component overall by a considerable amount. Leave this as false, the default, when you are leveraging the CSS to customize the look and feel of particular columns.
providerorg.apache.tapestry.grid.GridModelProvidercomponentResources.containerpropObject that provides access to the bean and data models used to render the Grid.
rowObjectRequiredpropThe current row being rendered, this is primarily an output parameter used to allow the Grid, and the Grid's container, to know what object is being rendered.
rowClassStringNOT CachedpropParameter used to set the CSS class for each row (each tr element) within the tbody). This is not cached, so it will be recomputed for each row.
rowsPerPageintRequiredpropNumber of rows displayed on each page. Long result sets are split across multiple pages.
sortAscendingbooleanRequiredpropIf true, then the sort is ascending (A - Z), if false the descending (Z - A).
sortColumnIdStringRequiredpropThe column which is currently being sorted. This value is the column's id, not its name. This parameter may be null, in which case no column is being used for sorting.
volatilebooleanpropIf true and the Loop is enclosed by a Form, then the normal state saving logic is turned off. Defaults to false, enabling state saving logic within Forms.

org.apache.tapestry.corelib.components.If

Conditionally renders its body.[JavaDoc]

Parameters

NameTypeFlagsDefaultDefault PrefixDescription
elseorg.apache.tapestry.BlockpropAn alternate org.apache.tapestry.Block to render if the test parameter is false. The default, null, means render nothing in that situation.
negatebooleanpropOptional parameter to invert the test. If true, then the body is rendered when the test parameter is false (not true).
testbooleanRequiredpropIf true, then the body of the If component is rendered. If false, the body is omitted.

org.apache.tapestry.corelib.components.Label

Generates a label element for a particular field.[JavaDoc]

Parameters

NameTypeFlagsDefaultDefault PrefixDescription
fororg.apache.tapestry.FieldRequiredcomponentThe for parameter is used to identify the org.apache.tapestry.Field linked to this label (it is named this way because it results in the for attribute of the label element).

org.apache.tapestry.corelib.components.Loop

Basic looping class; loops over a number of items (provided by its source parameter), rendering its body for each one. It turns out that gettting the component to not store its state in the Form is very tricky and, in fact, a series of commands for starting and ending heartbeats, and advancing through the iterator, are still stored. For a non-volatile Loop inside the form, the Loop stores a series of commands that start and end heartbeats and store state (either as full objects when there is not encoder, or as client-side objects when there is an encoder).[JavaDoc]

Parameters

NameTypeFlagsDefaultDefault PrefixDescription
elementNameStringprop:componentResources.elementNameliteralThe element to render. If not null, then the loop will render the indicated element around its body (on each pass through the loop). The default is derived from the component template.
encoderorg.apache.tapestry.PrimaryKeyEncoderpropOptional primary key converter; if provided and inside a form and not volatile, then each iterated value is converted and stored into the form.
indexintpropThe index into the source items.
sourceIterableRequiredpropDefines the collection of values for the loop to iterate over.
valueObjectpropThe current value, set before the component renders its body.
volatilebooleanpropIf true and the Loop is enclosed by a Form, then the normal state saving logic is turned off. Defaults to false, enabling state saving logic within Forms.

org.apache.tapestry.corelib.components.Output

A component for formatting output. If the component is represented in the template using an element, then the element (plus any informal parameters) will be output around the formatted value.[JavaDoc]

Parameters

NameTypeFlagsDefaultDefault PrefixDescription
elementNameStringcomponentResources.elementNamepropThe element name, derived from the component template. This can even be overridden manually if desired (for example, to sometimes render a surrounding element and other times not).
formatjava.text.FormatRequiredpropThe format to be applied to the object.
valueObjectRequiredpropThe value to be output (before formatting). If the formatted value is blank, no output is produced.

org.apache.tapestry.corelib.components.OutputRaw

Used to output raw markup to the client. Unlike, say, an expansion, the output from OutputRaw is unfiltered, with any special characters or entities left exactly as is. This is used in situations where the markup is provided externally, rather than constructed within Tapestry.[JavaDoc]

Parameters

NameTypeFlagsDefaultDefault PrefixDescription
valueStringRequiredpropThe value to to render. If unbound, and a property of the container matches the component's id, then that property will be the source of the value.

org.apache.tapestry.corelib.components.PageLink

Generates a render request link to some other page in the application. If an activation context is supplied (as the context parameter), then the context values will be encoded into the URL. If no context is supplied, then the target page itself will supply the context via a passivate event. Pages are not required to have an activation context. When a page does have an activation context, the value typically represents the identity of some object displayed or otherwise manipulated by the page.[JavaDoc]

Component inheritance

Parameters

NameTypeFlagsDefaultDefault PrefixDescription
anchorStringliteralAn anchor value to append to the generated URL (the hash separator will be added automatically).
contextjava.util.ListpropIf provided, this is the activation context for the target page (the information will be encoded into the URL). If not provided, then the target page will provide its own activation context.
disabledbooleanfalsepropIf true, then then no link element is rendered (and no informal parameters as well). The body is, however, still rendered.
pageStringRequiredliteralThe logical name of the page to link to.

org.apache.tapestry.corelib.components.Palette

Multiple selection component. Generates a UI consisting of two select elements configured for multiple selection; the one on the left is the list of "available" elements, the one on the right is "selected". Elements can be moved between the lists by clicking a button, or double clicking an option (and eventually, via drag and drop). The items in the available list are kept ordered as per org.apache.tapestry.SelectModel order. When items are moved from the selected list to the available list, they items are inserted back into their proper positions. The Palette may operate in normal or re-orderable mode, controlled by the reorder parameter. In normal mode, the items in the selected list are kept in the same "natural" order as the items in the available list. In re-order mode, items moved to the selected list are simply added to the bottom of the list. In addition, two extra buttons appear to move items up and down within the selected list. Much of the look and feel is driven by CSS, the default Tapestry CSS is used to set up the columns, etc. By default, the select element's widths are driven by the length of the longest option, and it is common to override this to a fixed value: style DIV.t-palette SELECT { width: 300px; } /style This ensures that the two columns are the same width, and that the column widths don't change as items move back and forth. Option groups within the org.apache.tapestry.SelectModel will be rendered, but are not supported by the many browsers, and are not fully handled on the client side.[JavaDoc]

Component inheritance

Parameters

NameTypeFlagsDefaultDefault PrefixDescription
clientIdStringprop:componentResources.idliteralThe id used to generate a page-unique client-side identifier for the component. If a component renders multiple times, a suffix will be appended to the to id to ensure uniqueness. The uniqued value may be accessed via the clientId property.
deselectorg.apache.tapestry.Assetasset:deselect.pngpropThe image to use for the deselect button (the default is a left pointing arrow).
disabledbooleanfalsepropIf true, then the field will render out with a disabled attribute (to turn off client-side behavior). Further, a disabled field ignores any value in the request when the form is submitted.
encoderorg.apache.tapestry.ValueEncoderRequiredpropEncoder used to translate between server-side objects and client-side strings.
labelStringliteralThe user presentable label for the field. If not provided, a reasonable label is generated from the component's id, first by looking for a message key named "id-label" (substituting the component's actual id), then by converting the actual id to a presentable string (for example, "userId" to "User Id").
modelorg.apache.tapestry.SelectModelRequiredpropModel used to define the values and labels used when rendering.
moveDownorg.apache.tapestry.Assetasset:move_down.pngpropThe image to use for the move down button (the default is a downward pointing arrow).
moveUporg.apache.tapestry.Assetasset:move_up.pngpropThe image to use for the move up button (the default is an upward pointing arrow).
reorderbooleanfalsepropIf true, then additional buttons are provided on the client-side to allow for re-ordering of the values.
selectorg.apache.tapestry.Assetasset:select.pngpropThe image to use for the select button (the default is a right pointing arrow).
selectedjava.util.ListRequiredpropThe list of selected values from the org.apache.tapestry.SelectModel. This will be updated when the form is submitted. If the value for the parameter is null, a new list will be created, otherwise the existing list will be cleared. If unbound, defaults to a property of the container matching this component's id.
sizeint10propNumber of rows to display.

org.apache.tapestry.corelib.components.PasswordField

A version of org.apache.tapestry.corelib.components.TextField, but rendered out as an input type="password" element. Further, the output value for a PasswordField is always blank.[JavaDoc]

Component inheritance

Parameters

NameTypeFlagsDefaultDefault PrefixDescription
clientIdStringprop:componentResources.idliteralThe id used to generate a page-unique client-side identifier for the component. If a component renders multiple times, a suffix will be appended to the to id to ensure uniqueness. The uniqued value may be accessed via the clientId property.
disabledbooleanfalsepropIf true, then the field will render out with a disabled attribute (to turn off client-side behavior). Further, a disabled field ignores any value in the request when the form is submitted.
labelStringliteralThe user presentable label for the field. If not provided, a reasonable label is generated from the component's id, first by looking for a message key named "id-label" (substituting the component's actual id), then by converting the actual id to a presentable string (for example, "userId" to "User Id").
nullsorg.apache.tapestry.NullFieldStrategydefaultnullfieldstrategyDefines how nulls on the server side, or sent from the client side, are treated. The selected strategy may replace the nulls with some other value. The default strategy leaves nulls alone. Another built-in strategy, zero, replaces nulls with the value 0.
translateorg.apache.tapestry.TranslatorRequiredpropThe object which will perform translation between server-side and client-side representations. If not specified, a value will usually be generated based on the type of the value parameter.
validateorg.apache.tapestry.FieldValidatorvalidateThe object that will perform input validation (which occurs after translation). The translate binding prefix is generally used to provide this object in a declarative fashion.
valueObjectRequiredpropThe value to be read and updated. This is not necessarily a string, a translator may be provided to convert between client side and server side representations. If not bound, a default binding is made to a property of the container matching the component's id. If no such property exists, then you will see a runtime exception due to the unbound value parameter.

org.apache.tapestry.corelib.components.PropertyDisplay

Outputs a single property value. Overrides for individual properties come from block parameters whose name matches the . This component is rarely used on its own, but is a critical piece of the org.apache.tapestry.corelib.components.BeanDisplay component.[JavaDoc]

Component inheritance

Parameters

NameTypeFlagsDefaultDefault PrefixDescription
modelorg.apache.tapestry.beaneditor.PropertyModelRequiredpropModel for property displayed by the cell.
objectObjectRequiredpropIdentifies the object being rendered. The component will extract a property from the object and render its value (or delegate to a org.apache.tapestry.Block that will do so).
overridesorg.apache.tapestry.ComponentResourcesRequiredpropResources used to search for block parameter overrides (this is normally the enclosing Grid component's resources).

org.apache.tapestry.corelib.components.PropertyEditor

Used to edit a single property of a bean. This is used primarily by org.apache.tapestry.corelib.components.BeanEditForm. Unlike BeanEditForm, the object to be edited must already exist and the must be passed in explicitly.[JavaDoc]

Parameters

NameTypeFlagsDefaultDefault PrefixDescription
modelorg.apache.tapestry.beaneditor.BeanModelRequiredpropThe model that identifies the parameters to be edited, their order, and every other aspect.
objectObjectRequiredpropThe object to be edited by the BeanEditor. This will be read when the component renders and updated when the form for the component is submitted. Typically, the container will listen for a "prepare" event, in order to ensure that a non-null value is ready to be read or updated.
overridesorg.apache.tapestry.ComponentResourcescomponentResourcespropWhere to search for local overrides of property editing blocks as block parameters. Further, the container of the overrides is used as the source for overridden validation messages. This is normally the component itself, but when the component is used within a BeanEditForm, it will be the BeanEditForm's block parameter that will be searched.
propertyStringRequiredpropIdentifies the property to be edited by the editor.

org.apache.tapestry.corelib.components.Radio

A radio button (i.e., input type="radio"). Radio buttons must operate within a org.apache.tapestry.RadioContainer (normally, the org.apache.tapestry.corelib.components.RadioGroup component). If the value parameter is not bound, then the default value is a property of the container component whose name matches the Radio component's id.[JavaDoc]

Parameters

NameTypeFlagsDefaultDefault PrefixDescription
disabledbooleanfalsepropIf true, then the field will render out with a disabled attribute (to turn off client-side behavior). Further, a disabled field ignores any value in the request when the form is submitted.
labelStringliteralThe user presentable label for the field. If not provided, a reasonable label is generated from the component's id, first by looking for a message key named "id-label" (substituting the component's actual id), then by converting the actual id to a presentable string (for example, "userId" to "User Id").
valueObjectRequiredpropThe value associated with this radio button. This is used to determine which radio button will be selected when the page is rendered, and also becomes the value assigned when the form is submitted.

org.apache.tapestry.corelib.components.RadioGroup

[JavaDoc]

Parameters

NameTypeFlagsDefaultDefault PrefixDescription
disabledbooleanfalsepropIf true, then the field will render out with a disabled attribute (to turn off client-side behavior). Further, a disabled field ignores any value in the request when the form is submitted.
encoderorg.apache.tapestry.ValueEncoderRequiredpropAllows a specific implementation of org.apache.tapestry.ValueEncoder to be supplied. This is used to create client-side string values for the different radio button values.
valueObjectRequiredpropThe property read and updated by the group as a whole.

org.apache.tapestry.corelib.components.RenderObject

Renders out an object using the org.apache.tapestry.services.ObjectRenderer service. Used primarily on the org.apache.tapestry.corelib.pages.ExceptionReport page. This is focused on objects that have a specific org.apache.tapestry.services.ObjectRenderer strategy. The org.apache.tapestry.corelib.components.BeanDisplay component is used for displaying the contents of arbitrary objects in terms of a series of property names and values.[JavaDoc]

Parameters

NameTypeFlagsDefaultDefault PrefixDescription
objectObjectRequiredprop

org.apache.tapestry.corelib.components.Select

Select an item from a list of values, using an [X]HTML select element on the client side. An validation decorations will go around the entire select element. A core part of this component is the org.apache.tapestry.ValueEncoder (the encoder parameter) that is used to convert between server-side values and client-side strings. In many cases, a org.apache.tapestry.ValueEncoder can be generated automatically from the type of the value parameter. The org.apache.tapestry.services.ValueEncoderSource service provides an encoder in these situations; it can be overriden by binding the encoder parameter, or extended by contributing a org.apache.tapestry.services.ValueEncoderFactory into the service's configuration.

[JavaDoc]

Component inheritance

Parameters

NameTypeFlagsDefaultDefault PrefixDescription
clientIdStringprop:componentResources.idliteralThe id used to generate a page-unique client-side identifier for the component. If a component renders multiple times, a suffix will be appended to the to id to ensure uniqueness. The uniqued value may be accessed via the clientId property.
disabledbooleanfalsepropIf true, then the field will render out with a disabled attribute (to turn off client-side behavior). Further, a disabled field ignores any value in the request when the form is submitted.
encoderorg.apache.tapestry.ValueEncoderpropAllows a specific implementation of org.apache.tapestry.ValueEncoder to be supplied. This is used to create client-side string values for the different options.
labelStringliteralThe user presentable label for the field. If not provided, a reasonable label is generated from the component's id, first by looking for a message key named "id-label" (substituting the component's actual id), then by converting the actual id to a presentable string (for example, "userId" to "User Id").
modelorg.apache.tapestry.SelectModelRequiredpropThe model used to identify the option groups and options to be presented to the user. This can be generated automatically for Enum types.
validateorg.apache.tapestry.FieldValidatorvalidatePerforms input validation on the value supplied by the user in the form submission.
valueObjectRequiredpropThe value to read or update.

org.apache.tapestry.corelib.components.Submit

Corresponds to input type="submit", a client-side element that can force the enclosing form to submit. The submit responsible for the form submission will post a notification that allows the application to know that it was the responsible entity. The notification is named "selected" and has no context.[JavaDoc]

Component inheritance

Parameters

NameTypeFlagsDefaultDefault PrefixDescription
clientIdStringprop:componentResources.idliteralThe id used to generate a page-unique client-side identifier for the component. If a component renders multiple times, a suffix will be appended to the to id to ensure uniqueness. The uniqued value may be accessed via the clientId property.
deferbooleanpropIf true, then any notification sent by the component will be deferred until the end of the form submission (this is usually desirable).
disabledbooleanfalsepropIf true, then the field will render out with a disabled attribute (to turn off client-side behavior). Further, a disabled field ignores any value in the request when the form is submitted.
labelStringliteralThe user presentable label for the field. If not provided, a reasonable label is generated from the component's id, first by looking for a message key named "id-label" (substituting the component's actual id), then by converting the actual id to a presentable string (for example, "userId" to "User Id").

org.apache.tapestry.corelib.components.TextArea

TextArea component corresponds to a textarea element. The value parameter is almost always bound to a string, but this is not an absolute requirement.[JavaDoc]

Component inheritance

Parameters

NameTypeFlagsDefaultDefault PrefixDescription
clientIdStringprop:componentResources.idliteralThe id used to generate a page-unique client-side identifier for the component. If a component renders multiple times, a suffix will be appended to the to id to ensure uniqueness. The uniqued value may be accessed via the clientId property.
disabledbooleanfalsepropIf true, then the field will render out with a disabled attribute (to turn off client-side behavior). Further, a disabled field ignores any value in the request when the form is submitted.
labelStringliteralThe user presentable label for the field. If not provided, a reasonable label is generated from the component's id, first by looking for a message key named "id-label" (substituting the component's actual id), then by converting the actual id to a presentable string (for example, "userId" to "User Id").
nullsorg.apache.tapestry.NullFieldStrategydefaultnullfieldstrategyDefines how nulls on the server side, or sent from the client side, are treated. The selected strategy may replace the nulls with some other value. The default strategy leaves nulls alone. Another built-in strategy, zero, replaces nulls with the value 0.
translateorg.apache.tapestry.TranslatorRequiredpropThe object which will perform translation between server-side and client-side representations. If not specified, a value will usually be generated based on the type of the value parameter.
validateorg.apache.tapestry.FieldValidatorvalidateThe object that will perform input validation (which occurs after translation). The translate binding prefix is generally used to provide this object in a declarative fashion.
valueObjectRequiredpropThe value to be read and updated. This is not necessarily a string, a translator may be provided to convert between client side and server side representations. If not bound, a default binding is made to a property of the container matching the component's id. If no such property exists, then you will see a runtime exception due to the unbound value parameter.

org.apache.tapestry.corelib.components.TextField

TextField component corresponds to input type="text" element. The value parameter will be editted. TextField is generally used with string values, but other values are acceptible, as long as they can be freely converted back and forth to strings.[JavaDoc]

Component inheritance

Parameters

NameTypeFlagsDefaultDefault PrefixDescription
clientIdStringprop:componentResources.idliteralThe id used to generate a page-unique client-side identifier for the component. If a component renders multiple times, a suffix will be appended to the to id to ensure uniqueness. The uniqued value may be accessed via the clientId property.
disabledbooleanfalsepropIf true, then the field will render out with a disabled attribute (to turn off client-side behavior). Further, a disabled field ignores any value in the request when the form is submitted.
labelStringliteralThe user presentable label for the field. If not provided, a reasonable label is generated from the component's id, first by looking for a message key named "id-label" (substituting the component's actual id), then by converting the actual id to a presentable string (for example, "userId" to "User Id").
nullsorg.apache.tapestry.NullFieldStrategydefaultnullfieldstrategyDefines how nulls on the server side, or sent from the client side, are treated. The selected strategy may replace the nulls with some other value. The default strategy leaves nulls alone. Another built-in strategy, zero, replaces nulls with the value 0.
translateorg.apache.tapestry.TranslatorRequiredpropThe object which will perform translation between server-side and client-side representations. If not specified, a value will usually be generated based on the type of the value parameter.
validateorg.apache.tapestry.FieldValidatorvalidateThe object that will perform input validation (which occurs after translation). The translate binding prefix is generally used to provide this object in a declarative fashion.
valueObjectRequiredpropThe value to be read and updated. This is not necessarily a string, a translator may be provided to convert between client side and server side representations. If not bound, a default binding is made to a property of the container matching the component's id. If no such property exists, then you will see a runtime exception due to the unbound value parameter.

org.apache.tapestry.corelib.components.TextOutput

Outputs paragraph oriented text, typically collected via a org.apache.tapestry.corelib.components.TextArea component. The TextArea is split into lines, and each line it output inside its own p element.[JavaDoc]

Parameters

NameTypeFlagsDefaultDefault PrefixDescription
valueStringRequiredprop

org.apache.tapestry.corelib.components.Unless

A close relative of the org.apache.tapestry.corelib.components.If component that inverts the meaning of its test. This is easier than an If component with the negate parameter set to true.[JavaDoc]

Parameters

NameTypeFlagsDefaultDefault PrefixDescription
testbooleanRequiredpropIf true, then the body of the If component is rendered. If false, the body is omitted.

org.apache.tapestry.corelib.components.Zone

A Zone is portion of the output page designed for easy dynamic updating via Ajax or other client-side effects. A Zone renders out as a div element and may have content initially, or may only get its content as a result of client side activity. Often, Zone's are initially invisible, in which case the visible parameter may be set to false (it defaults to false). When a user clicks an org.apache.tapestry.corelib.components.ActionLink whose zone parameter is set, the corresponding client-side Tapestry.Zone object is located. It will update the content of the Zone's div and then invoke either a show method (if the div is not visible) or an update method (if the div is visible). The show and update parameters are the names of functions attached to the Tapestry.ZoneEffects object. Renders informal parameters, adding CSS class "t-zone" and possibly, "t-invisible".

[JavaDoc]

Parameters

NameTypeFlagsDefaultDefault PrefixDescription
showStringpropName of a function on the client-side Tapestry.ZoneEffects object that is invoked to make the Zone's div visible before being updated. If not specified, then the basic "show" method is used.
updateStringpropName of a function on the client-side Tapestry.ZoneEffects object that is invoked after the Zone's content has been updated. If not specified, then the basic "highlight" method is used, which performs a classic "yellow fade" to indicate to the user that and update has taken place.
visiblebooleanpropIf true (the default) then the zone will render normally. If false, then the "t-invisible" CSS class is added, which will make the zone initially invisible.

org.apache.tapestry.corelib.mixins.Autocomplete

A mixin for a text field that allows for autocompletion of text fields. This is based on Prototype's autocompleter control. The mixin renders an (initially invisible) progress indicator after the field (it will also be after the error icon most fields render). The progress indicator is made visible during the request to the server. The mixin then renders a div that will be filled in on the client side with dynamically obtained selections. Multiple selection on the client is enabled by binding the tokens parameter (however, the mixin doesn't help split multiple selections up on the server, that is still your code's responsibility). The container is responsible for providing an event handler for event "providecompletions". The context will be the partial input string sent from the client. The return value should be an array or list of completions, in presentation order. I.e. String[] onProvideCompletionsFromMyField(String input) { return . . .; }

[JavaDoc]

Parameters

NameTypeFlagsDefaultDefault PrefixDescription
frequencydoubleliteralOverrides the default check frequency for determining whether to send a server request. The default is .4 seconds.
minCharsintliteralOverwrites the default minimum characters to trigger a server round trip (the default is 1).
tokensStringliteralIf given, then the autocompleter will support multiple input values, seperated by any of the individual characters in the string.