-
December 15th, 2009, 04:28 PM
#1
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?
-
December 16th, 2009, 04:01 PM
#2
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.
-
December 16th, 2009, 04:33 PM
#3
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?
-
December 16th, 2009, 04:43 PM
#4
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)
-
December 17th, 2009, 09:21 AM
#5
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.
-
December 17th, 2009, 02:15 PM
#6
Many thanks for detailed clarification.
Similar Threads
-
By subuta in forum Client SDKs
Replies: 4
Last Post: December 27th, 2011, 03:03 PM
-
By webfg in forum Client SDKs
Replies: 2
Last Post: June 30th, 2010, 12:28 PM
-
By rd2008 in forum General
Replies: 9
Last Post: October 10th, 2008, 10:38 AM
-
By Mone in forum Client SDKs
Replies: 2
Last Post: May 7th, 2007, 02:59 PM
-
By rsouissi in forum Adapter SDKs
Replies: 4
Last Post: January 10th, 2007, 06:11 PM
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
All times are GMT +1. The time now is 04:37 PM.
Bookmarks