Share via


Methods

The ListSheet HTC supports the following methods:

  • reload

  • selectAllRows

  • unselectAllRows

reload(sOp, sArgs)

The reload method reloads the data into the ListSheet HTC using an operation configured in the MetaXML data-island. This type of operation, known as an XMLHTTP operation, retrieves and displays new data from the server without reloading the current page.

The operation is identified by the required sOp parameter, which specifies the name of a child element of the operations element in the MetaXML data-island. The element name can be one of the pre-defined operations: page, sort, or sublist, or it can be a completely custom operation.

The formid attribute of the matching operation element identifies the form that is posted as a result of this operation. The action attribute of the form specifies the page to which the form is posted.

Since the form will be posted in XML format, response pages should use the utility routine dGetRequestXMLAsDict to retrieve the posted XML as a Dictionary object. In addition, response pages should include the file BDXMLHeader.asp, which sets the response.contentType to 'text/xml' and inserts the processing instruction node to set the XML version and charset.

The sArgs parameter specifies a list of URL-encoded page arguments that are passed to the page being posted. In addition, any child elements of the form are sent with the form posting.

Finally, the pre-defined operations result in certain, pre-defined arguments being included:

  • Page operations: 'op', 'prevpage', 'page', 'column', and 'direction'

  • Sort operations: 'op', 'page', 'column' and 'direction'

  • SubList operation: 'op' and 'xmlrecord'

This method returns False if any error nodes are present in the returned XML, or if nothing is returned. It returns True if a valid XML record list is returned with no error nodes.

Example:

bRetVal = elListSheet.reload("double_sort")

The Sort operation automatically resets the current page number to 1 (one) and will execute automatically when a column header is clicked. The Page operation automatically resets the current page number to whatever new page is requested and executes automatically when any of the page controls are clicked or if a new page number is entered into the page number input field. For some custom operations, it may be necessary to set the current page number of the ListSheet HTC to some new value before calling the reload method, based on the nature of the custom operation. The page property of the ListSheet HTC is provided for this purpose. For more information about the page property, see page.

Return to top

selectAllRows

The selectAllRows method selects all rows in the list. It does not take any parameters and does not have any return value.

This method selects all rows, including those on pages not currently being displayed.

Return to top

unselectAllRows

The unselectAllRows method unselects all rows in the list. It does not take any parameters and does not have any return value.

This method unselects all rows, including those on pages not currently being displayed.

Return to top


All rights reserved.