A list control with content that comes from a com.webmethods.caf.faces.data.ITableContentProvider
object.
Standard list-like containers are wrapped automatically as an ITableContentProvider
. The following containers are wrapped automatically:
java.lang.Object
arrayjava.util.List
javax.sql.rowset.CachedRowset
Each item in the data model is mapped to a row in the list. The content of the list is rendered multiple times, once for each row displayed. The difference between the async list and a regular list is that the async list pages asynchronously. See the Async Table control (caf_h\dataAsyncTable) for more information about configuring its asynchronous properties.
To enable restful paging, you must set the list's firstParamName
property to the name of the request parameter from which the list derives its first
property. For example, consider a case where the list binds the myFirst request parameter to its first
property, where an example URL is /myTable?myFirst=10. Using a value binding expression, #{param.myFirst}
, you would set the value of the list's firstParamName
property to "myFirst". Note that to bind the value of a request parameter to the list's first
property, you must manually convert the request parameter value to a primitive int (see the getMyFirst()
method below). The list does not need to be contained within a Command Form to do restful paging.
To enable restful page sizing, you must set the list's rowsParamName
property to the name of the request parameter from which the list derives its rows
property. For example, if the list binds the myRows request parameter to its rows
property, where an example URL might be /myTable?myRows=10, you would set the value of the list's rowsParamName
property to "myRows". To bind the value of a request parameter to the list's rows
property, you must manually convert the request parameter value to a primitive int, see the getMyRows()
method below for an example. The list does not need to be contained within a Command Form to do restful paging.
// Convert "myFirst" request parameter to a primitive int.
public int getMyFirst() {
FacesContext context = FacesContext.getCurrentInstance();
String s = (String) context.getExternalContext().getRequestParameterMap().get("myFirst");
if (s != null)
return Integer.parseInt(s);
return 0;
}
// Convert "myRows" request parameter to a primitive int.
public int getMyRows() {
FacesContext context = FacesContext.getCurrentInstance();
String s = (String) context.getExternalContext().getRequestParameterMap().get("myRows");
if (s != null)
return Integer.parseInt(s);
return 10;
}
marker
attribute does not apply to "ol" or "ul" types. Supported values can be a selection from the drop-down list on the Display tab in the control's Properties view, or any raw html string. Default is no marker.
layout
attribute supported values can be selected from the drop-down list on the Display tab in the control's Properties view. Default is vertical.
Children
Any.
Info | Value |
---|---|
Component Type | com.webmethods.caf.faces.list.DataList |
Handler Class | None |
Renderer Type | com.webmethods.caf.faces.list.Simple |
Description | Displays data model as list |
Palette Location | CAF Html/Control/List/Simple List |
Client-Side Model | CAF.List.Model |
Name | Required | Type | Description |
---|---|---|---|
customRowClass | false | javax.el.ValueExpression
(must evaluate to java.lang.String )
| Binding expression that specifies a custom CSS class name to add to the current row |
dir | false | javax.el.ValueExpression
(must evaluate to java.lang.String )
|
Specifies the directionality of the flow of the content for the current element
Valid values are:
|
filter | false | javax.el.ValueExpression
(must evaluate to java.lang.String )
| Filter expression |
filterParamName | false | javax.el.ValueExpression
(must evaluate to java.lang.String )
| Name of request parameter that specifies table's filter expression |
first | true | javax.el.ValueExpression
(must evaluate to java.lang.Integer )
|
Index of first item in model to display (zero-based)
If not specified, the default value is "0". |
firstParamName | false | javax.el.ValueExpression
(must evaluate to java.lang.String )
| Name of request parameter that specifies table's first row |
id | false | java.lang.String | Control identifier |
lang | false | javax.el.ValueExpression
(must evaluate to java.lang.String )
| Specifies the language of the enclosed content |
layout | false | javax.el.ValueExpression
(must evaluate to java.lang.String )
|
List layout
If not specified, the default value is "vertical". Valid values are:
|
marker | false | javax.el.ValueExpression
(must evaluate to java.lang.String )
|
Marker to display before each list item
Valid values are:
|
rendered | false | javax.el.ValueExpression
(must evaluate to boolean )
|
True to render control; false to ignore it
If not specified, the default value is "true". |
rowClasses | false | javax.el.ValueExpression
(must evaluate to java.lang.String )
| A comma separated list of CSS classes for the table rows. The classes are used for the <tr> elements in the order they are listed, repeating the list over all rows in the table. |
rowHeight | false | javax.el.ValueExpression
(must evaluate to java.lang.String )
| Row height in pixels (ex '20px') or ems (ex '2em') |
rows | true | javax.el.ValueExpression
(must evaluate to java.lang.Integer )
| Number of rows to display per page |
rowsParamName | false | javax.el.ValueExpression
(must evaluate to java.lang.String )
| Name of request parameter that specifies number of rows for the table to display |
selected | false | javax.el.ValueExpression
(must evaluate to boolean )
|
True if control is displayed as selected (use an expression to select/unselect on a per-row basis)
If not specified, the default value is "false". |
selectedRowClass | false | javax.el.ValueExpression
(must evaluate to java.lang.String )
| CSS class name for selected rows |
style | false | javax.el.ValueExpression
(must evaluate to java.lang.String )
| HTML "style" attribute value |
styleClass | false | javax.el.ValueExpression
(must evaluate to java.lang.String )
|
HTML "class" attribute value
Valid values are:
|
title | false | javax.el.ValueExpression
(must evaluate to java.lang.String )
| HTML "title" attribute value (often displayed as a tooltip) |
value | true | javax.el.ValueExpression
(must evaluate to null )
| Data model |
var | true | javax.el.ValueExpression
(must evaluate to java.lang.String )
| Name of variable reference to the current row object |
Output generated by Vdldoc View Declaration Language Documentation Generator.