Configuring Siebel Business Applications > Configuring Siebel Web Templates and Siebel Tags > Customizing Siebel Web Templates and Siebel Tags >

Displaying Different Sections of a Template Depending on the Browser Type


You use the Web Browser Administration views in the Siebel client to define capabilities for various browsers. FrameSupport is an example of a capability. It indicates that a browser can support frames. You can modify the records that define each browser as a new browser or if you introduce a new version of a current browser. For more information, see Siebel Applications Administration Guide.

You can use conditions in the swe:if tag to display different sections of a template, depending on which browser the user uses with the Siebel client. These conditions use the following format:

<service>, <method>, <args> ...

For more information, see If Conditional Tag.

NOTE:  This topic includes the term User Agent. This term is a synonym for browser. The User Agent header property of an HTTP request provides a unique identifier for the type of client that makes the request. For example, Mozilla/4.0 (compatible; MSIE 5.0; Windows NT 4.0) for Microsoft Internet Explorer 5.0.

Example of Creating Mappings for Specific Browser Types

A swe:if tag in the template conditionally executes blocks of code. The Web Layout Editor provides a visual approximation of how Siebel CRM renders the applet in the Siebel client. In the Siebel client, the current browser determines the conditional sections in the template that Siebel CRM executes.

For example, you can associate a template with a view that contains the following tags:

  <swe:if condition="Web Engine User Agent, TestCapability, 'FrameSupport:TRUE'">

<swe:frameset htmlAttr="cols='33%,66%'' border='1' frameborder='Yes'">

<swe:frame type="Applet" htmlAttr="marginheight='0' marginwidth='0' scrolling='Auto'">

<swe:applet id="101" hintText="Applet" var="Parent">

<swe:this property="FormattedHtml"/>

</swe:applet>

</swe:frame>

</swe:frameset>

  </swe:if>

Example of Identifying the Type of Browser

You can use the following example code to identify which type of browser the user is currently using. In this example, the condition evaluates to TRUE for the Microsoft Internet Explorer 5.5 browser and FALSE for all other browsers:

<swe:if condition="Web Engine User Agent, IsUserAgent, 'UserAgent:MSIE 5.5'">

...

</swe:if>

This example uses the following objects:

  • Web Engine User Agent business service
  • IsUserAgent business service method
  • UserAgent business service method argument. To identify the browser type, this argument uses the following format:

    UserAgent:<A user agent name that is defined in the UA.INI file>

Example of Determining Browser Capabilities

You can use the following example code to determine browser capabilities. In this example, the condition evaluates to TRUE for any browser that supports JavaScript and Java Applets:

<swe:if condition="Web Engine User Agent, TestCapability, 'JavaScript:TRUE', 'JavaApplets:TRUE'">

...

</swe:if>

This example uses the following objects:

  • Web Engine User Agent business service
  • TestCapability business service method
  • Capability Name:Capability Value business service method argument. If you provide more than one capability as an argument, and if the browser supports all these capabilities, then the condition evaluates to TRUE.

Capabilities of an Example Browser

This topic lists the capabilities that the Microsoft Internet Explorer version 5.0 browser supports. You can use this information as input to the TestCapability business service method:

  • CookiesAllowed=TRUE
  • HighInteract=TRUE
  • ActiveX=TRUE
  • Browser=IE
  • Version=5
  • DefaultMarkup=HTML
  • VBScript=TRUE
  • JavaScript=TRUE
  • JavaApplets=TRUE
  • User-Agent=Mozilla/4.0 (compatible; MSIE 5.0
  • SynchExternalContent=TRUE
  • FramesSupport=TRUE
  • TablesSupport=TRUE
Capabilities of the Extended Sections of Microsoft Internet Explorer

This topic lists the capabilities that the extended sections of the Microsoft Internet Explorer browser supports. You can determine the following capabilities for Microsoft Internet Explorer version 5.0:

  • User-Agent=Mozilla/4.0 (compatible; MSIE 5.0
  • Parent=IE 5.0
  • Accept=image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/vnd.ms-powerpoint, application/vnd.ms-excel, application/msword, */*

You can determine the following capabilities for Microsoft Internet Explorer version 5.5:

  • User-Agent=Mozilla/4.0 (compatible; MSIE 5.5
  • Parent=IE 5.0
  • Version=5.5
  • Accept=image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/vnd.ms-powerpoint, application/vnd.ms-excel, application/msword, */*
  • XML=TRUE
  • WAP=FALSE
  • StyleSheets=TRUE
  • JavaScriptVer=1.3
  • DHTML=TRUE
Configuring Siebel Business Applications Copyright © 2011, Oracle and/or its affiliates. All rights reserved. Legal Notices.