Results 1 to 6 of 6
  1. #1
    Member
    Join Date
    Sep 2009
    Location
    London
    Posts
    14

    Adding/Removing items dynamically

    Hi,

    I have a scenario where I need to add new items or remove existing ones from my NonVisualTable subscription. I could not see any API for this; am I supposed to re-subscribe (pushPage.addTable) again every time I need to modify the list of items that I need to subscribe.

    If that is the way, how would client library behave; will it actually make the calculation and remove/add the necessary ones or remove everything and add everything again?

  2. #2
    Administrator
    Join Date
    Jul 2006
    Location
    Milan
    Posts
    1,089
    The tables are always managed atomically and if you reissue addTable all the previous content is unsubscribed first.
    You can simply define multiple tables, one for each item, so that you can remove and add table instances directly.
    This may introduce some redundancy, but the Web Client library is able to manage the case in an optimized way.

    Note that you would have to create multiple NonVisualTable object, but you could still reuse the same callbacks for all of them.

  3. #3
    Member
    Join Date
    Sep 2009
    Location
    London
    Posts
    14
    If I subscribe an item that has been already subscribed to a different table; when there is an update on this item, will the same callback method of these tables fire twice?

  4. #4
    Member
    Join Date
    Sep 2009
    Location
    London
    Posts
    14
    Also if I use like 100 tables (each one is for one single item), would that be a problem?
    (I have multiple grids and windows using the same information and they can be closed/opened indivdually)

  5. #5
    Administrator
    Join Date
    Jul 2006
    Location
    Milan
    Posts
    1,089
    Yes, multiple subscriptions for the same item are managed independently from one another.
    If the same callback method is used and you still need to distinguish the two subscriptions, you could add custom attributes to the two NonVisualTable instances.

    If you have a lot of items, the screen update activity is more likely to become the main bottleneck.
    In this perspective, using one multi-item table or multiple mono-item tables does not change the performances.
    Performing 100 mono-item table subscriptions in a burst does not cause 100 HTTP requests to be issued to the Server, as the requests are batched; so, the performances are not expected to degrade.
    Resubscribing upon page changes is then very light, as shown by our Grid Demo.

  6. #6
    Member
    Join Date
    Sep 2009
    Location
    London
    Posts
    14
    Many thanks for detailed clarification.

 

 

Similar Threads

  1. Adding or Removing Subscriptions
    By subuta in forum Client SDKs
    Replies: 4
    Last Post: December 27th, 2011, 04:03 PM
  2. Adding items to a NonVisualTable
    By webfg in forum Client SDKs
    Replies: 2
    Last Post: June 30th, 2010, 01:28 PM
  3. dynamically subscribe items
    By rd2008 in forum General
    Replies: 9
    Last Post: October 10th, 2008, 11:38 AM
  4. Dynamically size a table
    By Mone in forum Client SDKs
    Replies: 2
    Last Post: May 7th, 2007, 03:59 PM
  5. Adding/Removing item in subscribed group
    By rsouissi in forum Adapter SDKs
    Replies: 4
    Last Post: January 10th, 2007, 07:11 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 06:27 AM.