Results 1 to 10 of 22

Hybrid View

  1. #1
    Senior Member
    Join Date
    Sep 2007
    Location
    des plaines
    Posts
    41
    Yes, I have gotten my modified HelloWord sample working. But what I need in reality is the following:
    I am going to have let's say 10 HelloWord like programs that are listening to 10 external processes to get data. Then I need LS to push data being collected from 10 adapters to the same html page. In order to achive that what I do? Just
    describing all 10 adapters in my ProxyHelloWorld\adapters.xml file and that's all?

    Thanks for all your hlep.

  2. #2
    Administrator
    Join Date
    Jul 2006
    Location
    Milan
    Posts
    1,092
    Defining multiple Data Adapters and sending all their data to a single client page is not possible at the moment, though it will become possible with the next release of the software.
    However, you can connect to all your external processes from a single Data Adapter and assign to each flow a different item name. Your client would be able to ask for all data by specifying all the item names, in a way similar to the StockList demo example provided in Lightstreamer package.

  3. #3
    Senior Member
    Join Date
    Sep 2007
    Location
    des plaines
    Posts
    41
    Alright, I uderstand.
    I want to show a code fragment from my modified Hello World:
    <script>
    /////////////////PushPage Configuration
    var debugAlerts = true;
    var remoteAlerts = false;

    var page = new PushPage();
    page.context.setDomain("ufandd.local");
    page.onEngineCreation = function(lsEngine) {
    lsEngine.connection.setLSHost("ufdcrdev0005.ufandd .local");
    lsEngine.connection.setLSPort(8080);
    lsEngine.context.setDebugAlertsOnClientError(debug Alerts);
    lsEngine.context.setRemoteAlertsOnClientError(remo teAlerts);

    lsEngine.connection.setAdapterName("PROXY_HELLOWOR LD");
    lsEngine.changeStatus("STREAMING");
    }
    page.bind();
    page.createEngine("HelloWorldApp", "LS", "SHARE_SESSION");

    var pushtable = new OverwriteTable(null, null, "MERGE");
    page.addTable(pushtable, "hellotable");
    pushtable.onItemUpdate =
    function(itemPos, updateInfo, itemName)
    {
    // send completed scan to the front-end
    alert(updateInfo.getNewValue(itemPos));
    serverData(updateInfo.getNewValue(itemPos));
    };
    </script>
    As you can see I am overriding onItemUpdate because I also want to send data to somewherre else. It works fine, sort of. For the very first time alert box will pop up only once (as expected), but next data update will trigger the alert box twice: first with an empty value, second with the real value.

    Can you tell me what am I doing wrong here?

    BTW, my adapter's console shows one value every time.

  4. #4
    Administrator
    Join Date
    Jul 2006
    Location
    Milan
    Posts
    1,092
    The snippet does not fully describe the test, because the
    new OverwriteTable(null, null, "MERGE");
    instruction asks the library to find all items and fields defined in the push cells, which are in the HTML part of the page.

    To get a better idea of the update flow, please show us a Server log taken after modifying the log configuration file, by setting the priority of the "LightstreamerLogger.subscriptions" and "LightstreamerLogger.pump" categories to DEBUG.

  5. #5
    Senior Member
    Join Date
    Sep 2007
    Location
    des plaines
    Posts
    41
    While I am working on that I have another question:
    Is it possible to hide these DIVs so they will not take any space on a page:
    <div source="lightstreamer" table="hellotable" item="greetings" field="message">loading...</div>
    <div source="lightstreamer" table="hellotable" item="greetings" field="timestamp">loading...</div>

    Thanks

  6. #6
    Power Member
    Join Date
    Jul 2006
    Location
    Cesano Maderno, Italy
    Posts
    784
    yes of course, you can set to their css the display:none value and then in the onChangingValues callback add such style to their hot and cold statuses:



    Btw note that if those are the only fields in your table (ie you don't want that LS shows any cells) you can use a NonVisualTable instead of the OverwriteTable:



    HTH.

 

 

Similar Threads

  1. Database Feed
    By mode_vigilante in forum Adapter SDKs
    Replies: 16
    Last Post: January 27th, 2012, 03:58 PM
  2. .NET web service as Data Feed
    By icaiozzi in forum Adapter SDKs
    Replies: 1
    Last Post: November 19th, 2010, 11:52 AM
  3. How to deploy on an external Web Server?
    By AndyKelly in forum Client SDKs
    Replies: 1
    Last Post: July 7th, 2010, 10:50 AM
  4. How And Where To Specify Database As Data Feed?
    By devidasan in forum Adapter SDKs
    Replies: 1
    Last Post: March 17th, 2009, 11:00 AM
  5. External deployment
    By markgoldin in forum General
    Replies: 6
    Last Post: September 28th, 2007, 01:15 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT +1. The time now is 05:02 AM.