SFLIST
** This class will not be supported in 2015.
All functionalities of sfList class are more improved, integrating with CAPH. Therefore sfList class is not supported since 2015 Smart TV. To use functions of sfList class, refer to here.
This is the class for List UI components.
Add the following line for sfList 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 sfList class like this : ex) $('#div ID').sfList('method Name', parm1, parm2); |
Methods
blur | ||
Description | ||
This function blurs the list items. | ||
Parameters | none | |
Return | ■Object - jQuery object | |
Emulator Support | N | |
SDK Constraint | None | |
Example | ||
//Blur list items $('#list').sfList('blur'); |
clear | ||
Description | ||
This function clears the list. | ||
Parameters | none | |
Return | ■Object - jQuery object | |
Emulator Support | N | |
SDK Constraint | None | |
Example | ||
//Clear the list $('#list').sfList('clear'); |
focus | ||
Description | ||
This function sets the focus on the list items. | ||
Parameters | none | |
Return | ■Object - jQuery object | |
Emulator Support | N | |
SDK Constraint | None | |
Example | ||
//Set focus on list items $('#list').sfList('focus'); |
getIndex | ||
Description | ||
This function gets the index of selected/focused list item. | ||
Parameters | none | |
Return | ■Number - Current selected index (0-based) | |
Emulator Support | N | |
SDK Constraint | None | |
Example | ||
//Get the index of selected/focused list item var currentFocused = $('#list').sfList('getIndex'); |
getSelectedItem | ||
Description | ||
This function gets the value from the data property for the selected/focused list item. | ||
Parameters | none | |
Return | ■Object - jQuery object | |
Emulator Support | N | |
SDK Constraint | None | |
Example | ||
//Get the value from the data property for selected/focused list item. $('#list').sfList('getSelectedItem'); |
move | ||
Description | ||
This function moves the focus to the requested index. If the value is out of range, the move function has no effect. It does not change the list state, so if the list is cleared, no item is focused. | ||
Parameters | ■value - Number - The list index to move | |
Return | ■Object - jQuery object | |
Emulator Support | N | |
SDK Constraint | None | |
Example | ||
$('#list').sfList('move', 3); |
next | ||
Description | ||
This function moves focus to the next list item. If the list is blurred or cleared, this item gains focus. If index is set to the last item, the first item is focused. | ||
Parameters | none | |
Return | ■Object - jQuery object | |
Emulator Support | N | |
SDK Constraint | None | |
Example | ||
//Move focus to next list item $('#list').sfList('next'); |
prev | ||
Description | ||
This function moves focus to the previous list item. If the list is blurred or cleared, this item gains focus. If index is set to the first item, the last item is focused. | ||
Parameters | none | |
Return | ■Object - jQuery object | |
Emulator Support | N | |
SDK Constraint | None | |
Example | ||
$('#list').sfList('prev'); |
hide | ||
Description | ||
This function hides the sfList component. | ||
Parameters | none | |
Return | ■Void | |
Emulator Support | N | |
SDK Constraint | None | |
Example | ||
$('#list').sfList('hide'); |
show | ||
Description | ||
This function shows the sfList component. | ||
Parameters | none | |
Return | ■Void | |
Emulator Support | N | |
SDK Constraint | None | |
Example | ||
$('#list').sfList('show'); |