Skip Headers
Oracle® Fusion Middleware Mobile Browser Developer's Guide for Oracle Application Development Framework
11g Release 1 (

Part Number E10140-05
Go to Documentation Home
Go to Book List
Book List
Go to Table of Contents
Go to Index
Go to Feedback page
Contact Us

Go to previous page
Go to next page
PDF · Mobi · ePub

7 Narrow Screen Support and User-Agent Details Support

This chapter describes how the Trinidad infrastructure determines narrow screen support and how it uses EL expressions to expose user-agent details.

This chapter includes the following sections:

7.1 Determining Narrow Screen Support

Mobile devices come with a wide range of screen widths. As a result, the UI components of a web application may render properly on a device with a screen width measuring 240 pixels, but not align correctly when the application runs on a device that has a screen width of only 100 pixels. In such a situation, Trinidad optimizes its rendering for narrow-screen devices. Trinidad considers any device with a screen width of less than 240 pixels as a narrow screen and optimizes the rendering for the following components accordingly:

7.1.1 How Trinidad Determines Narrow-Screen Optimization

Because Trinidad only considers a device with a screen width that measures less than 240 pixels as a narrow screen, it does not consider iPods (Safari browsers) or BlackBerry smartphones (BlackBerry browsers), which usually have screens that are greater than 240 pixels, as such. For a Windows Mobile browser, Trinidad determines the screen width from the UA-pixels request header and only applies narrow screen optimization if the screen-width is less than 240 pixels. For all other user agents, however, Trinidad optimizes its rendering for a narrow screen device.

7.2 Determining User-Agent Capabilities Using EL Expressions

Trinidad exposes a requesting user-agent's details to developers using the EL expression, #{requestContext.agent}, which returns an agent object that describes the requesting user agent. By adding the detail name or capability name properties to this expression, you enable Trinidad to return details that include the user-agent's name, version, platform, the version of the platform, the model (which is applicable only to BlackBerry), and the browser's support for JavaScript and PPR (Partial Page Rendering). For information on exposing user-agent details, see Section 7.2.1, "How To Determine User-Agent Details." For information on determing browser capabilities, see Section 7.2.2, "How to Determine Browser Capabilities."

7.2.1 How To Determine User-Agent Details

When Trinidad receives a request, it parses user-agent strings for a variety of user-agent details (listed in Table 7-1) that include type, the name and version of the agent, and the agent's platform name and platform version. Trinidad uses the EL expression #{requestContext.agent.<detail-name>}to expose these details to developers. For example, to enable developers to retrieve the category appropriate to the user-agent type (that is, desktop for a desktop browser or PDA for mobile browsers), Trinidad uses the type detail in the EL expression as follows:



Trinidad may return a null value for such details as PlatformName, PlatformVersion if it cannot parse them from the user-agent string.

Table 7-1 Browser Details Exposed through EL Expressions

Detail Name Description


Identifies a user-agent type. For desktop and mobile browsers, the values are desktop and PDA, respectively. Because Safari provides all desktop browser features when it runs in a mobile device, the agent object exposes this detail as a desktop type.


The name of the agent


The version of the agent


The platform on which the agent runs


The version of the platform on which the agent runs.


The model of the mobile device


Trinidad categorizes the mobile browsers into different skin types based on their CSS capabilties. For more information, see Section, "Determining the Skin Type." Determining the Skin Type

Trinidad categorizes incoming user-agents into different skin family types based on the CSS support and exposes the skin family type to developers using the #{requestContext.agent.skinFamilyType} EL expression. For example, for a Safari user-agent running in a Windows platform, Trinidad uses this EL expression to provide developers with the value of windowswebkit. For Safari browsers running on Symbian devices, this expression returns the Nokia Webkit (nokiawebkit). Table 7-2 lists the skin family types returned by #{requestContext.agent.skinFamilyType} according to user-agent, platform, and platform version.

Table 7-2 Skin Family Types Returned by the SkinFamilyType Attribute

User-Agent Platform Skin Family Type

Windows mobile


















Unknown platforms





Blackberry (versions 4.5 and higher)



All other mobile browsers



7.2.2 How to Determine Browser Capabilities

Trinidad sends its response to a user-agent's request based on capabilities it assigns to a user agent. These capabilities include a user-agent's support for JavaScript, PPR, and so on. Some of these capabilities (listed in Table 7-3) are exposed to developers through the EL expression #{requestContext.agent.capabilities}.

Use the EL expression #{requestContext.agent.capabilities.<capability-name>}to determine the specific capability assigned to a user-agent by Trinidad. For example, to determine whether Trinidad assigns JavaScript capability to a user agent, use the following EL expression:

# {requestContext.agent.capabilities.scriptingSpeed!='none'}.

Table 7-3 Browser Capabilities Exposed through EL Expressions

Capability Name Detail


Indicates whether Trinidad optimizes is rendering for a narrow-screen device. It returns true (a boolean type) if Trinidad optimizes its rendering for a narrow-screen device.


Indicates JavaScript support for a user-agent. Returns "none"(a String type) if the user-agent does not support JavaScript.


Indicates PPR support for a user-agent. Returns true (a boolean type) if the browser supports PPR.