indrajit
In Index.html - web client page using javascript - we need to get all updated items in one attempt
Currently we are using updateInfo.isValueChanged(1) to know whether 1st field is updated and then we do our action over it.
Here we are having 256 fields in our item, so it became very time consuming to do the same check for for 256 fields and get the updated information.
So please any one suggest us any method that can help us to get those all updated fields in one attempt?
Thanks,
Mone
Hi,
at the moment there is no way to get all the updated items with one call.
Why are you saying that the check is very time consuming? Have you observed a big delay between the call and the response?
Could you show us your callback?
Please let me know.
indrajit
Thanks Mone for the reply,
Actually there a mistake in my question sorry for that,
my question is I want all the fields data at a time suppose I am having a single item(Row) which has 256 fields we need to get all updated data of those fields in one attempt.
Thanks,
Mone
hello,
the only way is to get updates field by field:
[syntax="JS"]myTable.onItemUpdate = function(itemIndex,update,itemName) {
for (var i=1; i<=update.getNumFields(); i++) {
if (update.isValueChanged(i)) {
//field i has a new value
update.getNewValue(i);
}
}
};[/syntax]
if you are using field names you could do
[syntax="JS"]var schema = ["stock_name","time","last_price"];
var myTable = new Lightstreamer.NonVisualTable(group, schema, "MERGE");
myTable.onItemUpdate = function(itemIndex,update,itemName) {
for (var i=0; i<schema.length; i++) {
if (update.isValueChanged(schema)) {
//field schema has a new value
update.getNewValue(schema);
}
}
};
[/syntax] do: