JSDO properties, methods, and events reference : setListView( ) method
  

setListView( ) method

Defines a list view for a referenced JSDO table.
Return type: null
Applies to: progress.ui.UIHelper class, table reference property (UIHelper class)

Syntax

uihelper-ref.setListView( object )
uihelper-ref.table-ref.setListView( object )
uihelper-ref
A reference to a UIHelper instance. You can call the method on uihelper-ref if the JSDO associated with the instance has only a single table reference.
table-ref
A table reference on the JSDO associated with the UIHelper instance, and that table reference has the records to be displayed in the list view.
object
A JavaScript object that contains one or more of the following properties:
*name — A string set to the id attribute of the HTML div (or other) element that contains the list view.
*format — (Optional) A string that specifies the fields shown for each item and the line breaks between them. If the format property is omitted, the UIHelper instance uses the list item in the HTML ListView as a template.
*autoLink — A boolean that specifies whether events are automatically generated to display the corresponding form on the detail page when an item is clicked.
*itemTemplate — A string value set to an HTML string that overrides, for the specified list view, the item format in the default item template or any item format specified by the setItemTemplate( ) method.

Example

The following code fragment sets the list view page to the HTML element with an id attribute value of 'listview' with a list item formatted to display five specified fields and supported with events generated to display the corresponding detail page when the list item is clicked:
dataSet = new progress.data.JSDO( 'dsCustomerOrder' );
uihelper = new progress.ui.UIHelper({ jsdo: dataSet });
uihelper.eCustomer.setListView({
name:'listview',
format: '{CustNum}<br>{Name}<br>{Phone}<br>{Address}<br>{State}',
autoLink: true
});

See also:

setItemTemplate( ) method, showListView( ) method