h2c357
I am sorry if this has been asked before.
I tried searching the forums but could not find any sample code of the web client library where data from multiple data adapters is accessed in a single push page, if that is possible at all.
Please direct me to some such resource.
Thanks.
Mone
Hi,
you can access two different data adapter from the same page only if they're part of the same adapter set.
you can't connect to two different adapter sets from the same page.
The difference between the two is explained in the "Lightstreamer/DOCS-SDKs/General Concepts.pdf" file
to connect to two different data adapters simply specify them with the setDataAdapter method of the Table objects.
As an example, using our demo adapter set that contains all the data adapters for our demos, you may subscribe to the chat and stocklist in the same page:
[SYNTAX="JS"]var sldTable = new NonVisualTable(["item1","item2"], ["stock_name","last_price"], "MERGE");
sldTable.setDataAdapter("QUOTE_ADAPTER");
pushPage.addTable(sldTable, "SLD");
var chatTable = new NonVisualTable(["chat_room"], ["nick","message"], "DISTINCT");
chatTable.setDataAdapter("CHAT_ROOM");
pushPage.addTable(chatTable, "CHAT");[/SYNTAX]