Siebel Object Interfaces Reference > Interfaces Reference > Applet Events >

WebApplet_ShowListColumn


This event allows scripts to modify the HTML generated by the Siebel Web Engine to render a list column on a Web page in an application running in High Interactivity mode.

Syntax

WebApplet_ShowListColumn (columnName, property, mode, HTML)

Parameter
Description
columnName
A string indicating the name of the list column to be rendered
property
A string indicating the value of the property attribute of the swe:control or swe:this tag that triggers this event; it can also be a empty string if this attribute is not specified for the tag.
mode
The mode of the applet that is being shown; possible modes are:
  • Base
  • Edit
  • New
  • Query
  • Sort
HTML
The HTML generated by the Siebel Web Engine for the swe:control or swe:this tag that triggers this event

Returns

Not applicable

Usage

The generated HTML depends on the list column, the property being shown, and the mode of the applet. The script can modify the value of the HTML parameter, and the Siebel Web Engine sends the modified value back to the Web browser.

Customer applications render the layout of applets using template files (.swt files). These are HTML files that contain special placeholder tags that indicate where a control is to be rendered. These control placeholder tags (<swe:control>) can be included in the following two ways:

In the first instance, if the list column ID is mapped to a list column in the applet using Siebel Tools, Siebel Web Engine renders the DisplayName property of the list column at the point where this tag is placed in the template file.

In the second instance, the Siebel Web Engine renders the DisplayName property of the list column at the point where the <swe:this> tag is placed in the template file. The outer <swe:control> tag in this case is used only to check if the list column ID is mapped to an actual list column in the applet.

The Siebel Web Engine converts these tags into HTML to render the list columns on the Web page. The WebApplet_ShowListColumn event is triggered for each of these tags after the Siebel Web Engine has generated the HTML for rendering the list column, but before the generated HTML is sent back to the browser. This gives the scripts a chance to modify the generated HTML before it is shown.

In the first example, the event fires only once, after the HTML for the <swe:control> tag is generated by the Siebel Web Engine. In the second example, this event is triggered twice. The event is first triggered when the Siebel Web Engine has generated the HTML for the <swe:this> tag. The event is fired again when the Siebel Web Engine has generated the HTML for the outer <swe:control> tag; that is, after everything between the <swe:control> and </swe:control> tags, including the <swe:this> tag, is converted into HTML. The script can distinguish between these two event calls by the value of the property attribute of the tag that is passed as a parameter to the event.

The WebApplet_ShowListColumn event is supported in Standard Activity applications only.

Used With

Server Script

Example

This Siebel VB script displays negative amounts in a list in red.

Sub WebApplet_ShowListColumn (ColumnName As String, Property As String, Mode As String, HTML As String)

   Dim BC as BusComp
   Dim amount as Double

   Set BC = me.BusComp

   If ColumnName = "Amount" and Mode = "Base" and Property = _
   "FormattedHTML" Then
         If HTML < 0 Then
         HTML = "<FONT Color=Red> " + HTML + " </FONT>"
      End If
End If

End Sub

Here is an example in eScript:

function WebApplet_ShowListColumn (ColumnName, Property, Mode, &HTML)
{
   var bc = this.BusComp();
   if ((ColumnName == 'Amount') && (Mode == "Base") && (Property == "FormattedHTML")) {
         var val - HTML.valueOf();
         if (val < 0)
            HTML = "<FONT Color=Red> " + HTML + " </FONT>";
         }
}


 Siebel Object Interfaces Reference 
 Published: 18 June 2003