Home > Contents > Index >  
Template Tags TOC   |    Alpha TOC   |    Tag Family TOC   |    Purpose TOC   |    Annotated TOC   |    Index 

 

device:load

It detects current device using device detection based on user-agent value present in system and loads the current device object in Content Server scope.

Syntax

Parameters

name (required)
Input. Name to identify the device after it is retrieved and stored as an object in memory.Following are the possible scenarios -

a) If user-agent fails to match with any device and does not match to any device group defined for user-agent regular expressions too, a default device object with name 'unknown device', matching device group name as 'Desktop' and suffix as an empty string will be loaded.

b) If user-agent fails to match with any device, but matches to a device group based on user-agent regular expression defined for that device group, a device object is loaded, with no device capabilities, but only with info about matched device group.

b)If user-agent matches to a device in current device repository, but fails to match to any device group, still a device object is loaded, with info about device properties only, no data about matched device group.

c)If user-agent matches to a device in current device repository and matches to any device group, a device object is loaded with device properties as well as info for matched device group.

A device will match to at the most one device group.

Description

The device:load It detects current device using device detection based on user-agent value present in 'system' and loads the current device object in Content Server scope.parameter.

User-agent present in system means -
If current render mode is preview or insite, it uses user-agent of device skin under which asset is being previewed.
If render mode is not preview/insite, it uses user-agent present in header of current request.

Error Numbers

Possible values of errno include:

Value
Description
-3701
Device could not be identified for current user-agent.

Example

See Also

device:hascapability
device:capability
device:get
device:if

   Home > Contents > Index >

Oracle JSP Tag Reference
Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.