-
November 26th, 2007, 05:52 PM
#2
The items and fields related to a table are decided server side by the MetadataProvider.
When you subscribe a table you're not sending to the server item and field names, but a group name and a schema name.
Usually group and schema names are composed by space-separated item and field names. This special case is handled by the LiteralBasedProvider that is a MetadataProvider implementation distributed with the server.
If you implement your own MetadataProvider class (maybe extending an existing one)
you can completely change this logic implementing two methods: getItems and getSchema.
Look the following example. I will use "ALL" as group name and I will be returned with the 30 items of the StockListDemo.
First I change the adapters.xml file of the classic StockListDemo as follows (note that the only difference is the metadata_provider class name:
This is the AllMetaExampleimplementation:
and finally a simple client:
Note that once you give to the Table constructor a String instead of an Array (as in this case) you can't no more acces items by name but you must handle item indexes.
Some useful links:
http://www.lightstreamer.com/docs/client_web_jsdoc/Table.html#Table()
http://www.lightstreamer.com/docs/cl...eItemInfo.html
http://www.lightstreamer.com/vb/show...lBasedProvider
Please check the FileBasedProvider before starting implement your own MetadataProvider. Maybe it already fit your needs.
Hope that helps.
Similar Threads
-
By mnenchev in forum General
Replies: 3
Last Post: November 25th, 2009, 02:27 PM
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
All times are GMT +1. The time now is 09:12 PM.
Bookmarks