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

Thread: DynaScrollTable

  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
    537
    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
    537
    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 , you have right
    with previous version i use [MERGE] with the scroll table

    var scrollTable = new DynaScrollTable(page1Group, stocksSchema,"MERGE");

    when i use

    var scrollSubscription = new Subscription("MERGE",page1Group,stocksSchema);

    <table class="scrollContainer" id="scrollTable1" data-source="lightstreamer" border="1">
    <tr>
    <td>
    <span data-source="lightstreamer" data-field="o_Sym"></span>
    </td>
    <td>
    <span data-source="lightstreamer" data-field="o_ddeItem"></span>
    </td>
    <td>
    <span data-source="lightstreamer" data-field="o_Last"></span>
    </td>
    <td>
    <span data-source="lightstreamer" data-field="o_Bid"></span>
    </td>
    <td>
    <span data-source="lightstreamer" data-field="o_Ask"></span>
    </td>
    </tr>
    </table>

    then in a scroll table i get the items but when i get update in a item its not scrolling but is update it in the all ready inserted row
    how i can make the new value to scroll on the table and not to update the cell !!??

  8. #8
    Power Member
    Join Date
    Jul 2006
    Location
    Cesano Maderno, Italy
    Posts
    784
    Well, that was unexpected.

    Because of the nature of DISTINCT and MERGE subscriptions we decided to force the "scroll behavior" on the grid for DISTINCT subscription and the "table behavior" for MERGE subscriptions:
    a DISTINCT item ideally is used to represent a list of things while a MERGE item represents something whose status changes. See section 3.1 of http://www.lightstreamer.com/distros...20Concepts.pdf for details.

    In any case, if you can describe us your use case, why you want to use a MERGE subscription to feed a scrolling grid, we may re-evaluate our initial decision (well that's what the beta is for) or show you how to obtain the same effect without modifying the library on our side.

  9. #9
    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

  10. #10
    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

 

 

Similar Threads

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