SFTEXTLIST
** This class will not be supported in 2015.
All functionalities of sfTextList class are more improved, integrating with CAPH. Therefore sfTextList class is not supported since 2015 Smart TV. To use functions of sfTextList class, refer to here.
This is the class for TextList UI components.
Add the following line for sfTextList class into a html file your own : <script type="text/javascript" src="$MANAGER_WIDGET/Common/af/2.0.0/loader.js"></script> |
You can declare sfTextList class like this : ex) $('#div ID').sfTextList('method Name', parm1, parm2); |
Contents
Methods
addItem | ||
Description | ||
This function adds text item. | ||
Parameters | ■item - Object - item to add | |
Return | ■Void | |
Emulator Support | N | |
SDK Constraint | None | |
Example | ||
$('#list').sfTextList('addItem', {text: 'new item'}); |
blur | ||
Description | ||
This function removes focus. | ||
Parameters | none | |
Return | ■Void | |
Emulator Support | N | |
SDK Constraint | None | |
Example | ||
$('#list').sfTextList('blur'); |
clear | ||
Description | ||
This function clears all text. | ||
Parameters | none | |
Return | ■Void | |
Emulator Support | N | |
SDK Constraint | None | |
Example | ||
$('#list').sfTextList('clear'); |
focus | ||
Description | ||
This function sets focus. | ||
Parameters | none | |
Return | ■Void | |
Emulator Support | N | |
SDK Constraint | None | |
Example | ||
$('#list').sfTextList('focus'); |
getIndex | ||
Description | ||
This function gets text index of focused text. | ||
Parameters | none | |
Return | ■Void | |
Emulator Support | N | |
SDK Constraint | None | |
Example | ||
var idx = $('#list').sfTextList('getIndex'); |
getItem | ||
Description | ||
This function gets inner text of focused text. | ||
Parameters | ■index - Number - Index of item to return. Current index if omitted. | |
Return | ■Void | |
Emulator Support | N | |
SDK Constraint | None | |
Example | ||
var itemObj = $('#list').sfTextList('getItem'); // gets current item object |
getSelected | ||
Description | ||
This function gets selected items. | ||
Parameters | none | |
Return | ■Array - Array of selected items or selected item if radiobox is used | |
Emulator Support | N | |
SDK Constraint | None | |
Example | ||
var aSelectedItems = $('#list').sfTextList('getSelected'); // gets selected item array (of object) |
getSelectedIds | ||
Description | ||
This function gets the IDs of selected items. | ||
Parameters | none | |
Return | ■Array - Array containing indexes of selected items or index of selected item if radio mode | |
Emulator Support | N | |
SDK Constraint | None | |
Example | ||
var indexes = $("#List").sfTextList("getSelectedIds"); |
next | ||
Description | ||
This function moves the focus to next item. | ||
Parameters | none | |
Return | ■Void | |
Emulator Support | N | |
SDK Constraint | None | |
Example | ||
$("#List").sfTextList("next"); |
prev | ||
Description | ||
This function moves the focus to previous item. | ||
Parameters | none | |
Return | ■Void | |
Emulator Support | N | |
SDK Constraint | None | |
Example | ||
$("#List").sfTextList("prev"); |
refresh | ||
Description | ||
This function refreshes the item. | ||
Parameters | none | |
Return | ■Void | |
Emulator Support | N | |
SDK Constraint | None | |
Example | ||
$("#List").sfTextList("refresh"); |
removeItem | ||
Description | ||
This function removes the item. | ||
Parameters | ■index - Number - index of item to remove. | |
Return | ■Void | |
Emulator Support | N | |
SDK Constraint | None | |
Example | ||
$("#List").sfTextList("removeItem", 3); // removes 4th item |
selectAll | ||
Description | ||
This function selects all items. | ||
Parameters | none | |
Return | ■Void | |
Emulator Support | N | |
SDK Constraint | None | |
Example | ||
$("#List").sfTextList("selectAll"); |
selectItem | ||
Description | ||
This function selects the item. | ||
Parameters | ■index - Number - index of item to select. | |
Return | ■Void | |
Emulator Support | N | |
SDK Constraint | None | |
Example | ||
$("#List").sfTextList("selectItem", 3); // selects 4th item |
toggleItem | ||
Description | ||
This function toggles the item. | ||
Parameters | ■index - Number - index of item to toggle selection. | |
Return | ■Void | |
Emulator Support | N | |
SDK Constraint | None | |
Example | ||
$("#List").sfTextList("toggleItem", 3); // toggle the 4th item's selection |
unselectAll | ||
Description | ||
This function unselects all items. | ||
Parameters | none | |
Return | ■Void | |
Emulator Support | N | |
SDK Constraint | None | |
Example | ||
$("#List").sfTextList("unselectAll"); |
unselectItem | ||
Description | ||
This function unselects the item. | ||
Parameters | ■index - Number - index of item to remove selection. | |
Return | ■Void | |
Emulator Support | N | |
SDK Constraint | None | |
Example | ||
$("#List").sfTextList("unselectItem", 3); // remove selection of the 4th item |