Information Pane

The Information Pane for the list provides additional details about the row that is currently selected in the list. When the user selects a row, the GeneratePreviewPaneXML procedure for the list is called. This procedure builds an XML file that displays detailed information about the selected row.

The layout of the Information Pane depends on the type of list being displayed. For transaction lists, the Information Pane contains up to three columns in the header section. Within each column are a series of label-value pairs that display information about the selected item. The layout also typically contains a set of line items that describe details of the selected list item, such as the line items for a transaction.

The following illustration shows the Information Pane for the Contact History transaction list.

[spacer]

The GeneratePreviewPaneXML procedure for the list is run each time a user selects a row in the list. This procedure has the following parameters:

inout ListObjState list_object;
inout string XMLFilePath;
inout string sTitle; 

First, the title used for the Information Pane content is constructed. This value will be passed out through the last parameter for the procedure. Then the XMLDoc_Create procedure of the syListObj form starts the process of creating the Information Pane content. To create the items in the header section, the XMLDoc_AddHeaderField procedure of the syListObj form is used. This procedure adds a data item to the end of the specified column.

To create line items, the XMLDoc_AddColumn procedure is used to add the columns that will be displayed. Next, the XMLDoc_AddLineItem procedure is called to add a new line item. The XMLDoc_AddLineItemValue procedure is used to add the individual items to the line item.

Finally, the XMLDoc_Save procedure of the syListObje form completes the XML document used for the Information Pane.

The following is the GeneratePreviewPaneXML procedure for the Contact History list. It displays complete contact information about the selected customer.

inout ListObjState list_object;
inout string XMLFilePath;
inout string sTitle;

local ListPrevPaneXMLState XMLState;
local string sName;
local string sValue;
local reference RowValuesElement;
local reference Contact_History_MSTR_Temp;

{Get the reference for the temporary table used by the list}
Contact_History_MSTR_Temp = list_object:'Table Reference';

sTitle = str('Customer Number' of table(Contact_History_MSTR_Temp)) +  CH_SPACE + CH_COLON + CH_SPACE +  'Customer Name' of table(Contact_History_MSTR_Temp);

{ Build up basic XML file }
call XMLDoc_Create of form syListObj, XMLState, XMLFilePath, sTitle;

{Add the fields that will be displayed}

{--Column 1--}

{Customer ID}
sValue = 'Customer Number' of table(Contact_History_MSTR_Temp);
call XMLDoc_AddHeaderField of form syListObj, XMLState, "Customer ID", sValue, 1;

{Columns for line items}
call XMLDoc_AddColumn of form syListObj, XMLState, "Contact", false;
call XMLDoc_AddColumn of form syListObj, XMLState, "Date", false;
call XMLDoc_AddColumn of form syListObj, XMLState, "Salesperson", false;

{Add the line items}
{First Contact}
call XMLDoc_AddLineItem of form syListObj, XMLState, RowValuesElement;
sValue = "First Contact";
call XMLDoc_AddLineItemValue of form syListObj, XMLState, RowValuesElement, sValue, false;

sValue = List_FormatDate('First Contact Date' of table(Contact_History_MSTR_Temp), LIST_FORMATFOR_PREVPANE) of form syListObj;
call XMLDoc_AddLineItemValue of form syListObj, XMLState, RowValuesElement, sValue, false;

sValue = 'Contact Salesperson ID' of table(Contact_History_MSTR_Temp);
call XMLDoc_AddLineItemValue of form syListObj, XMLState, RowValuesElement, sValue, false;

{Last Contact}
call XMLDoc_AddLineItem of form syListObj, XMLState, RowValuesElement;

sValue = "Last Contact";
call XMLDoc_AddLineItemValue of form syListObj, XMLState, RowValuesElement, sValue, false;

sValue = List_FormatDate('Last Contact Date' of table(Contact_History_MSTR_Temp), LIST_FORMATFOR_PREVPANE) of form syListObj;
call XMLDoc_AddLineItemValue of form syListObj, XMLState, RowValuesElement, sValue, false;

sValue = 'Contact Salesperson ID 2' of table(Contact_History_MSTR_Temp);
call XMLDoc_AddLineItemValue of form syListObj, XMLState, RowValuesElement, sValue, false;

{Save the XML document.}
call XMLDoc_Save of form syListObj, XMLState;


Documentation Feedback