Results 1 to 3 of 3
  1. #1
    Member
    Join Date
    Mar 2009
    Location
    Madrid
    Posts
    16

    Adding items to a NonVisualTable

    Hi,

    i have a NonVisualTable and i would like to add/remove items in the table dinamically. Is there any way for doing it? I`ve been searching in the documentation some appropiate method but i haven't found anything.

    I've seen in another thread that an option is to create a table for every item and add/remove tables when i need add or remove some item... but in my case, i could ever need a hundred of items... that would mean a hundred of tables created.

    When a table is added, i can see that is done a request to control.html.. if i have 100 tables, would be done 100 requests?

    On the other hand, could I use setCommandLogic to achive the behaviour i want?

    Thanks.

  2. #2
    Power Member
    Join Date
    Jul 2006
    Location
    Cesano Maderno, Italy
    Posts
    784
    I've seen in another thread that an option is to create a table for every item and add/remove tables when i need add or remove some item... but in my case, i could ever need a hundred of items... that would mean a hundred of tables created.
    I confirm that's the way to go

    When a table is added, i can see that is done a request to control.html.. if i have 100 tables, would be done 100 requests?
    no, you will get less control requests as such requests will be batched together. How many batches will be produced for 100 tables depends on an heuristic algorithm on the client and on the <request_limit> element of the Lightstreamer server configuration.

    Please note that control.html requests are obsolete and are used by the client library only as a backup. So either you're using an old client library or are in a strange scenario.
    In case you're using an old library please upgrade it if possible.


    On the other hand, could I use setCommandLogic to achive the behaviour i want?
    to enable the command logic you need first an adapter that produces a COMMAND item, that's a completely different scenario; the "row" to be shown must be decided on the server through such COMMAND item. Please check out the desctiption of the COMMAND mode in the General Concepts.pdf file you can find under the DOCS-SDKs folder of Lightstreamer distribution to check if it can fit your needs. Let me know if you need clarifications on this.

  3. #3
    Member
    Join Date
    Mar 2009
    Location
    Madrid
    Posts
    16
    Quote Originally Posted by Mone
    I confirm that's the way to go

    ...no, you will get less control requests as such requests will be batched together. How many batches will be produced for 100 tables depends on an heuristic algorithm on the client and on the <request_limit> element of the Lightstreamer server configuration.
    ok, I've done in this way and it seems to work fine.

    By the way, you're right with regard to the number of requests. For 35 tables i only have 2 requests.


 

 

Similar Threads

  1. Adding or Removing Subscriptions
    By subuta in forum Client APIs
    Replies: 4
    Last Post: December 27th, 2011, 03:03 PM
  2. NonVisualTable - simple tutorial
    By Mone in forum Client APIs
    Replies: 13
    Last Post: September 9th, 2010, 05:51 PM
  3. Adding/Removing items dynamically
    By Otake in forum Client APIs
    Replies: 5
    Last Post: December 17th, 2009, 02:15 PM
  4. NonVisualTable with COMMAND mode
    By Alessandro in forum Client APIs
    Replies: 2
    Last Post: June 17th, 2009, 11:50 AM
  5. NonVisualTable - no data received from server
    By igindex in forum Client APIs
    Replies: 6
    Last Post: March 5th, 2008, 05:06 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 08:23 AM.