Hi all!
My goal is to understand if LS can be used for an application that will publish real time emissions data in a Web Page.
I've created my DataAdapter, now I've a problem in the Web Page (an ASP .NET page).
I would like to add a not fixed number of items in the page, reading some data in a DB and creating dinamically the controls in the server side code behind, and use a NonVisualTable to manage data changes, in the 'onItemUpdate' event, beacuse in some case I've to change some icons.
I put the item list in an hidden field, and I pass this list to the table, like in the NonVisualTable example, my table:
var pushtable = new NonVisualTable(group, schema, "MERGE");
pushtable.setSnapshotRequired(true);
page.addTable(pushTable, "AnalogicTable");
pushtable.onItemUpdate = function(item, itemUpdate, itemName) {
//Here I will manage changes
}
'group' is an Array, and contain something like 'Measure#1' 'Measure#2' etc etc, is not empty, checked by alert.
'schema' is an Array and contain 'SampleValue' 'SampleTime'.
In order to use 'itemName', I'm following the 'Approach 2' in the NonVisualTable example.
So, in my DataAdapter i'm launching a LiteralBasedProvider too, in a separate thread:
MetadataProviderServer serverLit = new MetadataProviderServer();
serverLit.Adapter = new Lightstreamer.Adapters.Metadata.LiteralBasedProvider();
and I start this in a thread.
And My Adapter:
DataProviderServer server = new DataProviderServer();
server.Adapter = new ADASAdapter();
and I start this in another thread.
In both case I set host and ports.
Everything was working with a fixed number of items, with an OverwriteTable and subscribing form the HTML controls with right attributes (source, item, field...).
Now, with the introduction of NonVisualTable, the two arrays schema and group and the LiteralBasedProvider, when i launch my page I've the following error:
'ER GroupListDescriptor Item Names cannot be empty'
I can't understand what I miss, please can you help me?
Hope I've explained well the situation, and sorry for my english.
Thank you, grazie mille, spero che potrĂ² usare LS nella mia applicazione, mi piace molto!
Danilo Verzolini