Siebel Developer's Reference > SWE 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. 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 is automatically selected. Users can unselect this record 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, multirecord selection is not enabled for list applets. To enable multirecord selection on a list applet, in Siebel Tools set to TRUE the HTML Multi Row Select attribute of the applet's List object.

To render the check boxes to select multiple rows in list applet templates, use the <swe:select-row> tag. With this tag, you can create a generic list applet template that can be used with list applets that support multirecord selection and list applets 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 with the <swe:this> tag to conditionally put in a <td> that contains the check box.

NOTE:  You need to place your list applet controls and list columns within a <swe:form> tag when you enable the multiselect feature, as any invoke method on the applet requires the form that contains the row selection check boxes to be submitted.

The HTML Client framework marks 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 are not disabled. This is because there is no server call when selecting multiple records. Instead, when the control is activated the user gets a message 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 check box is rendered if the applet is enabled for multirecord selection in Siebel Tools. When <swe:select-row> tag is used without the property attribute, the tag acts as a conditional tag to show its body if the applet is enabled for multirecord selection.

Example

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

or

<swe:select-row>

<swe:this property="FormattedHtml" />

</swe:select-row>

Siebel Developer's Reference