i'm building a kind of chat project
I have a list dinamically built by using a Rest service.Each list item contains a grid with labels.
The rest is called (by a timout every x seconds).
One of the data i get from the rest service is the user status (online, offline etc.) and i mapped this data to a label [label_status] in the grid contained in the list item component.
I would like to change the text (online, offline) with an icon. and it should happen everytime the rest is run by the timeout
I tried by adding all the icons (set to invisible) in the grid cell where the [label_status] is.
and i would like to run a js like
if (Tiggr('label_status').text() == "online") {
Tiggr('ico_online').show();
}
to test if it is possible in the mapping page of my rest service I added a JS to the label_status component (label_status)
but what i get is
How can i solve my problem????????