Siebel Developer's Reference > Tags >

swe:select-row


Multiselect list applets provide a way to select multiple items for a transaction. The check boxes in the left column are used to select the items.

SWE supports selection of multiple records in list applets for invoking methods that act on these selected records. This is similar to pressing CTRL and selecting records on the dedicated client. The selection of rows is done using check boxes that are placed on each row.

This is different from positioning the current record using the "PositionOnRow" control. You can have both the "PositionOnRow" control and "Multiple Row Selection" on the same list applet. When you initially navigate to a list applet the record on which the business component is positioned will be automatically selected. Users can unselect this using the check box if desired.

Unlike "PositionOnRow," when you select rows using the check box there is no server round trip. The selected records are marked as selected on the business component only when a method is invoked on the applet. You can select records across multiple pages (that is, you can navigate using the "Next" and "Previous" controls and select records from different working sets).

By default, multi-record selection is not enabled for list applets. To enable this feature on list applets where this needs to be supported, set the new attribute of the "List" object in Siebel Tools called "HTML Multi Row Select" to "TRUE."

To render the check boxes to select multiple rows in list applet templates, a new tag, <swe:select-row>, has been introduced. Using this tag you can create a generic list applet template that can be used with list applets that support multirecord selection and those that do not. In the list header, use the <swe:select-row> tag to conditionally put in a <td> for the header for the row selection check box column, and in the list body use the <swe:select-row> tag along with the <swe:this> tag to conditionally put in a <td> that will contain the check box.

NOTE:  You need to place your list applet controls and list columns within a <swe:form> tag when you enable the multi-select feature, as any invoke method on the applet will require the form which will contain the row selection check boxes to be submitted.

The HTML Client framework will mark the records as selected in the buscomp when a method is invoked on the applet. This happens in CSSSWEFrame::PrepareToInvokeMethod before the CSSSWEFrame::DoInvokeMethod is called. The sequence of events when the framework gets a command to invoke a method on an applet are:

  1. The parent business component of the applet (if there are any) are positioned on the correct records.
  2. The applet's business component is positioned on the currently active record (if needed).
  3. If multiple records are marked, they are selected in the buscomp by calling CSSBusComp::SelectRowById.
  4. The method is invoked on the applet by calling CSSSWEFrame::DoInvokeMethod.

Currently none of the methods in the base CSSSWEFrame support multiple records. This may change in the future. If any specialized applet needs to support this feature, the DoInvokeMethod should be specialized. In this method you can call CSSSWEFrame::IsMultiRecSelected to check if multiple records are selected. If TRUE, you can call CSSBusComp::EnumAllSelections to get all the records that are currently selected in the buscomp.

Controls that do not support invoking methods when multiple records are selected will not be disabled as in the dedicated client when the user selects multiple records. This is because there is no server call when selecting multiple records. Instead, when the control is activated a message will be shown to the user that the action cannot be performed when multiple records are selected.

Syntax

To render the check boxes to select multiple rows in list applet templates a new tag, swe:select-row, has been introduced. The syntax of this tag is as follows:

<swe:select-row property="FormattedHtml" />

Attributes

Property. When the property attribute is set to "FormattedHtml" in either the <swe:select-row> or <swe:this> tag, the checkbox will be rendered if the applet is enabled for multi-record selection in Siebel Tools. When <swe:select-row> tag is used without the property attribute, it acts as a conditional tag to show its body if the applet is enabled for multi-record selection.

Example

<swe:select-row property="FormattedHtml" />

or

<swe:select-row>

<swe:this property="FormattedHtml" />

</swe:select-row>


 Siebel Developer's Reference 
 Published: 23 October 2003