Results 1 to 2 of 2
  1. #1
    Member
    Join Date
    May 2008
    Location
    Milano
    Posts
    1

    Changing subscribed topic

    Hi, in my page I have some lablels like this one:

    <asp:Label ID="Label10" runat="server" source="lightstreamer" table="BookTable" item="tit.f.mta" field="T_4300" Text="&nbsp;" />

    This label is rendered in html as a span element, than after activating the subscription to Lightstreamer Server, the label ID is changed into 'F|BookTable|TIT.F.MTA|T_4300|div' and the source, table, item and field attributes are removed.

    The question is: how can I change my subscripton to another item?
    If I have a textbox where the user puts a new item, is it possible to change the item subscribed in the label through the JS client api?
    I cannot even address directly that label any more with $get(...), as far as the id is changed.

    Thanks,
    Simone Ferri

  2. #2
    Administrator
    Join Date
    Jul 2006
    Location
    Milan
    Posts
    972
    As already clarified by direct contact:

    The push cells are not meant to be modified directly by application code; they may only be removed and replaced by newly created cells.

    However, the simplest way to have the same cells refer to different items is to reassociate the cells with different tables subsequently and tag the cells with an index.
    For instance, with the item="1" attribute, the cell always refers to the first subscribed item of the currently associated table.
    This is shown by the included StockListDemo page, where clicking on the "next 15" link reuses the same cells for different stocks.

    Note that when indexes are used for the "item" attribute, the item names must be specified in the table constructor, i.e. the form
    new OverwriteTable(null,null,"MERGE");
    cannot be used, but something like
    new OverwriteTable(["my_item1","my_item2"],null,"MERGE");
    should be used instead.

 

 

Similar Threads

  1. Replies: 1
    Last Post: August 10th, 2010, 10:33 AM
  2. Changing the row BackgroundColor ?
    By mohamida in forum Client APIs
    Replies: 1
    Last Post: June 14th, 2010, 09:23 AM
  3. Replies: 1
    Last Post: June 4th, 2007, 08:54 AM
  4. Adding/Removing item in subscribed group
    By rsouissi in forum Adapter APIs
    Replies: 4
    Last Post: January 10th, 2007, 06:11 PM
  5. Hope not to be out of topic
    By gtrop in forum General
    Replies: 2
    Last Post: September 11th, 2006, 12:55 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:56 AM.