Hi,
You currently can't automatically fill different values on the same html element. You have to choose what to update and update just that. I'll keep in mind for the future but I can't assure it will be implemented.
You have several options though:
- the onVisualUpdate event will give you the DOM element that is being updated. You can use that to mopdify the html yourself
- use a third-party library to update the html elements. I think Angular.js should be able to do that with something like this:
[SYNTAX=HTML]<div ng-controller="Controller">
<div ng-repeat="item in items">
<div attrib1="{{item.field1}}" attrib2="{{item.field2}}" attrib3="{{item.field3}}">{{item.fieldN}}</div>
</div>
</div>
[/SYNTAX]
[SYNTAX=JS]function Controller($scope) {
$scope.items = {
};
require(["LightstreamerClient","Subscription"], function(LightstreamerClient,Subscription) {
[...]
var subscription = new Subscription(...);
[...]
subscription.addListener({
onItemUpdate: function(info) {
var itemName = info.getItemName();
if (!$scope.items[itemName]) {
$scope.items[itemName] = {};
}
info.forEachChangedField(function(fieldName,fieldPos,val) {
$scope.items[itemName][fieldName] = val;
});
$scope.$apply();
}
});
[...]
});
}[/SYNTAX]