TabSheetModel.getImagesJSON

Syntax

getImagesJSON();

Description

The getImagesJSON method gets all table icons in the JSON format.

Comments

This method returns a JSON object that has the following fields: ConditionIcons - contains data of object icons, TabImages - contains data of the icons shown in table cells.

Example

To execute the example, the HTML page must contain the TabSheet component named tabSheet (see Example of Creating the TabSheet Component), and a PP.Ui.TabSheetCellPicture icon named picture must be shown in the cell under coordinates (0, 1) (see the TabSheetCellPicture Constructor page). Get names of icons stored in table cells and their indexes:

// Get table model
var model = tabSheet.getModel();
// Get all table icons in the JSON format
var imagesJSON = model.getImagesJSON();
// Get table icons
var tabImage = imagesJSON.TabImages.TabImage;
if (tabImage != Null) {
    for (var i in tabImage) {
        var image = tabImage[i];
        console.log("name of icon with the index " + image.I + ": «" + image.$ + "»")
    }
};

After executing the example the browser console shows names of icons stored in table cells and their indexes:

Name of icon with the index 0: img/filter/sort-desc.png
Name of icon with the index 1: img/filter/sort-asc.png
Name of icon with the index 2: img/filter/sort-desc.png
Name of icon with the index 3: img/filter/sort-asc.png

See also:

TabSheetModel