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

 

device:if

Checks if the condition provided in terms of property value of current device is true, e.g. check if current device is touch device and if it is touch device, evaluate tag body.

Syntax

Parameters

name (required)
Input. Name of the already loaded device object.
property (required)
Input. Name of the device property for which value needs to be checked.
value (required)
Input. Expected value of device property property.
datatype (optional)
Input. Data type of the property value. Possible values are - boolean, string, number.
operator (optional)
Input. Conditional operator to check equality/inequality between actual value of device property and expected value as provided in attribute 'value'.
  • For dataype boolean, possible values for this field can be '=' . Any other value is treated as '!=' i.e. not equals.
  • For dataype string, possible values for this field can be =, !=, %, !%. Value % means like.
  • For dataype number, possible values for this field can be
    <> - Greater than or less than.
    < - Less than
    > - Greater than
    = - Equals

Description

The device:if tag evaluates a condition based on values provided in its tag attributes and if the condition is evaluated to be true for current device, it executes the code inside its tag body.

Error Numbers

Possible values of errno include:

Value
Description
-3702
No device object found with the given name.
-3700
The requested capability name is not supported by the loaded device.

Example

See Also

device:hascapability
device:capability
device:get

   Home > Contents > Index >

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