Page 1 of 2 12 LastLast
Results 1 to 10 of 16

Thread: DynaScrollTable

Hybrid View

  1. #1
    Member
    Join Date
    Dec 2009
    Location
    athens
    Posts
    14

    DynaScrollTable

    Hi
    is there a class DynaScrollTable or something like that
    on new version Lightstreamer JavaScript Client 6.0 b4 API !!??

    Thanks

  2. #2
    Administrator
    Join Date
    Feb 2012
    Location
    Milano
    Posts
    716
    Hi,

    the functionalities that you could find in DynaScrollTable in the new JavaScript Client API have been divided, for a better logical model, into two separate classes:Subscription and DynaGrid.

    With Subscription object you can specify what information you need and how to obtain them from the Lightstreamer server. DynaGrid can be used to display the values from the internal model in a dynamically created grid.

    Please refer to JavaScript Client API Reference for fully description of the new classes and to the source code of Basic Chat Demo that replaced a DynaSrollTable with a Subscription and a DynaGrid while updating to the new version of the Lightstreamer JavaScript Client 6.0 API.

  3. #3
    Member
    Join Date
    Dec 2009
    Location
    athens
    Posts
    14
    Hi ,
    i did it with DynaGrid and looks working, but there is a problem with the update , no all subscribe items working,
    the same subscribes works fine on a html table but on scroll many items don't
    ETE and PPC are working fine in both the "IX129775350","EI09CAC","EI09CCMP","EI09FTSEMI B" are not working with Scroll table

    var stocksSchema = ["o_Sym","o_ddeItem","o_Last","o_Bid","o_Ask"];
    var page2Group = ["ETE","PPC","IX129775350","EI09CAC","EI09CCMP","EI 09FTSEMIB"];

    var scrollSubscription = new Subscription("DISTINCT",page2Group,stocksSchema);
    scrollSubscription.setDataAdapter(myDataAdapter);
    scrollSubscription.setRequestedSnapshot("no");
    scrollSubscription.setRequestedBufferSize("unlimit ed");

    scrollSubscription.addListener(scrollGrid);
    sharingClient.subscribe(scrollSubscription);


    Thanks

  4. #4
    Power Member
    Join Date
    Jul 2006
    Location
    Cesano Maderno, Italy
    Posts
    784
    Hi Betasec,

    What do you mean with "works fine on a html table"?
    We need to understand where the problem lies;
    Do you see any error on the server log?
    Is it possible that the same items are subscribed somewhere else in MERGE mode?

    try to log all the data received by the Subscription. Is data already missing there?
    (you may use a piece of code like this to log updates on the browser console)


  5. #5
    Member
    Join Date
    Dec 2009
    Location
    athens
    Posts
    14
    Hi
    actually the problem is that the same items are subscribed in more pages with MERGE and DISTINCT mode
    what i am doing is to have tables with stocks and a scroll table where scrolling all the updates for all items
    so if an item is subscribed in MERGE table is not available in DISTINCT table and the opposite.
    Is this normal !!?? because with the previous versions I didn't have a problem.
    Thanks

  6. #6
    Administrator
    Join Date
    Feb 2012
    Location
    Milano
    Posts
    716
    Hi betasec,

    I think you have just to change the subscription mode from DISTINCT to MERGE in this statement:

    var scrollSubscription = new Subscription("DISTGINCT",page2Group,stocksSchema);

    Please note that DISTINCT and MERGE are subscription modes not compatible between them, so you can not subscribe the same item both in MERGE and DISTINCT mode. I confirm you that this was not changed from previous Lightstreamer version.
    For this reason it is good practice to implement the method modeMayBeAllowed of MetadataProvider to define
    precisely subscription mode allowed for each item according to the nature of the data.

  7. #7
    Member
    Join Date
    Dec 2009
    Location
    athens
    Posts
    14
    Hi,

    what i am doing is that i have a grid-table with stocks where i get the updates for the symbols

    GRID-TABLE
    ------------------------------------------------------
    |StockName1 | Last | Bid | Ask | High| Low|Open|Close|
    |StockName2 | Last | Bid | Ask | High| Low|Open|Close|
    |StockName3 | Last | Bid | Ask | High| Low|Open|Close|
    ------------------------------------------------------

    and at the same time i have a scroll-table where i get the trades for the symbols
    SCROLL-TABLE
    -----------------------------
    |StockName1 , Price , Volume|
    |StockName2 , Price , Volume|
    |StockName1 , Price , Volume|
    |StockName1 , Price , Volume|
    |StockName3 , Price , Volume|
    -----------------------------

    so the reason that i need to have the same symbols for Grid and for Scroll
    is that i need to display information's for the same symbol at the same time with different view
    i think for trade programs is useful

    Thanks

  8. #8
    Power Member
    Join Date
    Jul 2006
    Location
    Cesano Maderno, Italy
    Posts
    784
    Thank you for the explanation.

    We decided to add a new method to StaticGrid and DynaGrid that can be used to force the behavior of the grid (overwrite vs scroll) regardless of the Subscription mode of the associated Subscription.
    I will let you know as soon as you can use it.

    In the meanwhile, assuming you're using build 1561 of the client you can force the scroll behavior with the following code




    The code is build-dependant, let me know if you're using a different build. You can check the build you're using by opening the lightstreamer.js file and watching its "header".
    If you're using an older build you can download the latest one here: http://www.lightstreamer.com/distros...ghtstreamer.js

    HTH

  9. #9
    Member
    Join Date
    Dec 2009
    Location
    athens
    Posts
    14
    Hi ,
    first off all thanks it will be very helpful to add the method , the code is not working even with the latest build 1561,
    in the meanwhile i am ok because i use the old client on the pages i want to scroll table
    I expecting news
    Thanks

  10. #10
    Power Member
    Join Date
    Jul 2006
    Location
    Cesano Maderno, Italy
    Posts
    784
    Hi,
    I just deployed the rc version of the JS library including the promised method on our website.
    You can download the lib from here http://www.lightstreamer.com/demo/co...ghtstreamer.js or just wait a week or so for the final official release.

    You can use the method like this:



    (call it before setting the grid as listener for a Subscription as for the method call to be accepted you need to have an empty grid)

 

 

Similar Threads

  1. Formatting of unchanged values in "DynaScrollTable"
    By hofmanna in forum Client SDKs
    Replies: 5
    Last Post: January 14th, 2010, 10:02 AM
  2. DynaScrollTable
    By georgeeapen in forum Client SDKs
    Replies: 2
    Last Post: April 9th, 2009, 12:19 PM
  3. DynaScrollTable
    By georgeeapen in forum Adapter SDKs
    Replies: 0
    Last Post: April 8th, 2009, 09:22 AM
  4. DynaScrollTable example
    By kastis in forum Client SDKs
    Replies: 2
    Last Post: April 3rd, 2007, 06:58 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 07:57 AM.