cpr.controls.Item

Item. An item class with label and value. Used in lists, combo boxes, checkbox groups, radio buttons, and so on.

Index

Properties
Name Type Description
icon String Get the URL of the icon representing the item.
label String Returns the text to be displayed for the item.
row Row For items bound to the dataset, it returns a Row.
tooltip String Get the tooltip value for an item.
value String Returns the value of item.
Methods
Name Return Type Description
bind IBindFactory Bind that attribute.
getBindContext BindContext Returns the bind context.
isBindable Boolean Returns whether the property is bound.
toExpressionContext BindContext Creates an input context object to execute an expression expression that takes a given item as input.

Constructor

Item(label, value)
Create an item.
Parameters
name type description
label String the displayed text of the item
value String the value of the item

Properties

icon
type String
get
Get the URL of the icon representing the item.
set
Specifies the URL of the icon representing the item.
label
type String
get
Returns the text to be displayed for the item.
set
Sets the text to be displayed for the item.
row
type Row
readonly
For items bound to the dataset, it returns a Row. If none, it returns null.
tooltip
type String
get
Get the tooltip value for an item.
set
Set a tooltip on the item.
value
type String
get
Returns the value of item.
set
Set the value of item.

Methods

bind(name)
Bind that attribute. Items in datasets do not support binding.
Parameters
name type description
name String The attribute name to bind.
return IBindFactory
getBindContext()
Returns the bind context.
return BindContext bind context
isBindable(name)
Returns whether the property is bound. Items in datasets do not support binding.
Parameters
name type description
name String Attribute name
return Boolean
toExpressionContext(control)
Creates an input context object to execute an expression expression that takes a given item as input.
Parameters
name type description
controloptional UIControl defaultnull Own control. If this value is not given, the ID selector within the expression will not work.
return BindContext