Hello,
On Our stocks ticks page, I get his error "Uncaught [|IllegalStateException|Please specify at least one cell|]"
After ajax call, my DIV element will populated with html table with necessary attribute in td (data-source, data-item ... )
example :
<td style="text-align:right;" id="abc123"><span data-source="lightstreamer" data-grid="aTable" data-item="abc_x_123" data-field="last">123.456</span></td>
then we are making a call to light streamer code as follow
require(["LightstreamerClient","Subscription","StaticGrid"],function(LightstreamerClient,Subscription,StaticGrid) {
var client = new LightstreamerClient("https://xxx.yyyyyyy.com","TEST");
client.connect();
var grid = new StaticGrid("aTable", true);
grid.addListener({
onVisualUpdate: function(key, info, domNode) {
if (info == null) {
return;
}
var myField;
info.setHotTime(2000);
info.forEachChangedField(function (field, value) {
if(field == "time" || field == "da" || field == "dp") {
return;
}
myField = field;
var lastPrice = value;
if (lastPrice !== null) {
var prevPrice = grid.getValue(key, myField);
if (!prevPrice || lastPrice > prevPrice) {
info.setCellAttribute(myField, greenColor, null,"backgroundColor");
info.setCellAttribute(myField, hotTxtCol, null,"color");
} else {
info.setCellAttribute(myField, redColor, null, "backgroundColor");
info.setCellAttribute(myField, hotTxtCol, null,"color");
}
}
});
}
});
subscription = new Subscription("MERGE", grid.extractItemList(), fieldList);
subscription.addListener(grid);
client.subscribe(subscription);
});
let me know, How can I fix it?
Thanks in advance.