Results 1 to 3 of 3
  1. #1
    Senior Member
    Join Date
    Jul 2009
    Location
    not
    Posts
    41

    the "addField" method

    in the documentation:it's said that
    a field name different than the name of any subscribed field
    For example, in the stocklist page, there's:
    updateInfo.addField("#trend_color",redColor,true);
    or
    updateInfo.addField("#fade","ON",true);
    but there isin't a table row with a "field" named "#trend_color" or "#fade" like for the "#arrow " field !!
    <span source="lightstreamer" table="main" item="'+i+'" field="#arrow">
    what the method "addField" is used for ???

  2. #2
    Administrator
    Join Date
    Jul 2006
    Location
    Milan
    Posts
    975
    In the reported cases, we use extra fields just as "decorators".

    In fact, we want to format some fields in a way that depends on the previous value of the field.
    However, in the onChangingValues callback (the place where formatting instructions can be given to the VisualTable), the previous values of the updated fields are not available.
    On the other hand, they are available in the onItemUpdate callback.

    By using extra fields, we can store the needed information (for instance, the price trend) in the current update within onItemUpdate and retrieve it in the subsequent call to the formatting callback onChangingValues.

  3. #3
    Senior Member
    Join Date
    Jul 2009
    Location
    not
    Posts
    41
    thank you

 

 

Similar Threads

  1. Replies: 1
    Last Post: July 10th, 2012, 07:06 PM
  2. Replies: 2
    Last Post: March 1st, 2012, 02:53 PM
  3. Replies: 3
    Last Post: February 19th, 2010, 12:14 AM
  4. Replies: 1
    Last Post: September 18th, 2009, 10:13 AM

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 07:16 PM.