Results 1 to 7 of 7

Hybrid View

  1. #1
    Join Date
    Sep 2006

    NonVisualTable - no data received from server

    Hi there,

    We wish to use the NonVisualTable for updates that can be dealt with in JavaScript via the onItemUpdate event handler. We have the following code for initialising the NonVisualTable:

    var dataTable = new NonVisualTable("a string to subscribe to", "our schema", "DISTINCT");
    dataTable.onItemUpdate = updateItem;

    ...where lsPage is a pushPage instance. It looks from our logs that we are subscribing successfully, but no data is sent from the server - the onItemUpdate callback is not being fired. Have you experienced this? Is there something wrong with the code above that is causing this issue?

    Thanks in advance for your help,


  2. #2
    Join Date
    Jul 2006
    Hi Sam,

    the code is correct.
    Usually, when no data reaches the client, there is some mismatch in the field names. To check this, you can set as DEBUG the priority of the "LightstreamerLogger.subscriptions" and "LightstreamerLogger.pump" loggers on the Server logging configuration file. The former logger shows the updates as they are received from the Data Adapter, while the latter shows the updates as they are being sent to the client.
    Let me know.


  3. #3
    Join Date
    Dec 2007
    São Paulo
    Hi Dario,
    As you said me in other forum I activated the LS logs and I had the results as follow:

    03-Mar-08 15:24:10,894 |TRACE|LightstreamerLogger.pump |PUMP POOLED THREAD 1 |Pumping event in session S-287967797N2: d(0,1,1,"25672087257061.7856","5947.3678","","");
    03-Mar-08 15:24:10,914 |DEBUG|mote.request_reply.NotifyReceiver|ockListDa ta Notify Receiver|Received notify: '1204557850914|UD3|S|PETR4|S|10000011875e22403|B|0 |S|MelhorOfertaVenda|S|28147503641.7206|S|Ultimo|S |81.7|S|Papel|S|PETR4|S|MelhorOfertaCompra|S|25667 524283806.5152'...
    03-Mar-08 15:24:10,915 |TRACE|LightstreamerLogger.subscriptions|ockListDa ta Notify Receiver|INCOMING DATA for PETR4 --> {MelhorOfertaCompra=25667524283806.5152, MelhorOfertaVenda=28147503641.7206, Papel=PETR4, Ultimo=81.7}
    03-Mar-08 15:24:10,916 |DEBUG|LightstreamerLogger.subscriptions|ockListDa ta Notify Receiver|Manager: com.lightstreamer.h.u@16917ee
    03-Mar-08 15:24:11,113 |DEBUG|mote.request_reply.NotifyReceiver|ockListDa ta Notify Receiver|Received notify: '1204557851113|UD3|S|PETR4|S|10000011875e22403|B|0 |S|MelhorOfertaVenda|S|28147503641.7206|S|Ultimo|S |81.7|S|Papel|S|PETR4|S|MelhorOfertaCompra|S|25667 524283806.5152'...
    03-Mar-08 15:24:11,114 |TRACE|LightstreamerLogger.subscriptions|ockListDa ta Notify Receiver|INCOMING DATA for PETR4 --> {MelhorOfertaCompra=25667524283806.5152, MelhorOfertaVenda=28147503641.7206, Papel=PETR4, Ultimo=81.7}
    03-Mar-08 15:24:11,115 |DEBUG|LightstreamerLogger.subscriptions|ockListDa ta Notify Receiver|Manager: com.lightstreamer.h.u@16917ee
    03-Mar-08 15:24:11,116 |DEBUG|mote.request_reply.NotifyReceiver|ockListDa ta Notify Receiver|Received notify: '1204557851113|UD3|S|VALE5|S|20000011875e22403|B|0 |S|MelhorOfertaVenda|S|5947.3638|S|Ultimo|S|49.93| S|Papel|S|VALE5|S|MelhorOfertaCompra|S|25667781999 683.1744'...
    03-Mar-08 15:24:11,117 |TRACE|LightstreamerLogger.subscriptions|ockListDa ta Notify Receiver|INCOMING DATA for VALE5 --> {MelhorOfertaCompra=25667781999683.1744, MelhorOfertaVenda=5947.3638, Papel=VALE5, Ultimo=49.93}
    03-Mar-08 15:24:11,118 |DEBUG|LightstreamerLogger.subscriptions|ockListDa ta Notify Receiver|Manager: com.lightstreamer.h.u@cf829d
    03-Mar-08 15:24:11,118 |DEBUG|mote.request_reply.NotifyReceiver|ockListDa ta Notify Receiver|Received notify: '1204557851114|UD3|S|VALE5|S|20000011875e22403|B|0 |S|MelhorOfertaVenda|S|5947.3678|S|Ultimo|S|49.93| S|Papel|S|VALE5|S|MelhorOfertaCompra|S|25672087257 061.7856'...
    03-Mar-08 15:24:11,118 |TRACE|LightstreamerLogger.pump |PUMP POOLED THREAD 2 |Pumping event in session S-287967797N2: d(0,1,2,"25667781999683.1744","5947.3638","","");

    I was not able to understand these lines:
    03-Mar-08 15:24:11,118 |TRACE|LightstreamerLogger.pump |PUMP POOLED THREAD 2 |Pumping event in session S-287967797N2: d(0,1,2,"25.1744","5947.3638","","");

    Could you explain? In your point of view, the system is working correctly?

  4. #4
    Join Date
    Jul 2006
    Yes, the log lines by the "LightstreamerLogger.pump" logger show the update commands that are sent to the client. The empty strings are the condings for unchanged values.
    The updates received at 03-Mar-08 15:24:10,914 and at 03-Mar-08 15:24:11,113 are not sent, but then the update received at 03-Mar-08 15:24:11,116 is sent. This may be due to a frequency filter setting or the <max_delay_millis> setting.
    Hence, if you still don't see any data and don't get your callback called, we definitely have to check the client side code.

    Note that the "Ultimo" field seems to be missing from the last update; this may still be correct, or may be caused by a typo in the subscription, but we would need the full log of the client session in order to clarify this.

  5. #5
    Join Date
    Dec 2007
    São Paulo
    Hi Dario,

    I think that I'm almost there, hehehehe, and I need to put these application to work very quickly. The pressure is big.
    Below I'm sending my webclient code. In this code, I took the script of for UpdateItem, because I read that the update is done automatically. But even without the script, nothing happens in my browser.

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">

    <html xmlns="" >
    Untitled Page
    </title><link href="StyleSheet.css" rel="stylesheet" type="text/css" />
    <script type="text/javascript" src="ls/lscommons.js" />
    <script type="text/javascript" src="ls/lspushpage.js" />

    <form name="form1" method="post" action="default.aspx" id="form1">
    <input type="hidden" name="__VIEWSTATE" id="__VIEWSTATE" value="/wEPDwUJLTUzNzgxOTg3D2QWAgIDD2QWAgIBDzwrAA0BCxYEHgh Dc3NDbGFzcwUGcXVvdGVzHgRfIVNCAgJkGAEFBGxpc3QPZ2Q9l/FTp7WWeMvBW1XfoFT5A3riIA==" />

    <script src="/AEHomebroker/WebResource.axd?d=kT85M_vgGAr4ZF9K91oyBbsJ56Xgw_9y yB3pIXESA-85usLondLjOMzr6FyzcNh6wNEEZdMjPlaCosELNUewNQ2&amp; t=633402231780434684" type="text/javascript"></script>
    <script src="/AEHomebroker/WebResource.axd?d=kT85M_vgGAr4ZF9K91oyBbsJ56Xgw_9y yB3pIXESA-85usLondLjOMzr6FyzcNh69JGgZh8vhVtlFgXGe3UOgA2&amp; t=633402231780434684" type="text/javascript"></script>

    <table id="list" class="quotes"><tr>

    <td><div source="lightstreamer" table="list" item="PETR4" field="MelhorOfertaCompra"></div></td><td><div source="lightstreamer" table="list" item="PETR4" field="MelhorOfertaVenda"></div></td><td><div source="lightstreamer" table="list" item="PETR4" field="Papel"></div></td><td><div source="lightstreamer" table="list" item="PETR4" field="Ultimo"></div></td>
    <td><div source="lightstreamer" table="list" item="VALE5" field="MelhorOfertaCompra"></div></td><td><div source="lightstreamer" table="list" item="VALE5" field="MelhorOfertaVenda"></div></td><td><div source="lightstreamer" table="list" item="VALE5" field="Papel"></div></td><td><div source="lightstreamer" table="list" item="VALE5" field="Ultimo"></div></td>
    <td><div source="lightstreamer" table="list" item="BBDC4" field="MelhorOfertaCompra"></div></td><td><div source="lightstreamer" table="list" item="BBDC4" field="MelhorOfertaVenda"></div></td><td><div source="lightstreamer" table="list" item="BBDC4" field="Papel"></div></td><td><div source="lightstreamer" table="list" item="BBDC4" field="Ultimo"></div></td>


    <script type="text/javascript">
    var lsPage = new PushPage();
    lsPage.onEngineCreation = startEngine;
    lsPage.createEngine("SLEngine", "/aehomebroker/ls");

    var group = "PETR4 VALE5 BBDC4";
    var schema = "MelhorOfertaCompra MelhorOfertaVenda Papel Ultimo";
    var newTable = new OverwriteTable(group, schema,'MERGE');
    lsPage.addTable(newTable, 'list');
    function startEngine(eng) {
    // -->


  6. #6
    Join Date
    Jul 2006

    In your table cells, you put the item and field names in the "item" and "field" properties, respectively.
    This only works when your OverwriteTable constructor takes arrays of names as groups and schema arguments. The space-separated strings cannot be used in this case, as they just represent a "group name" and a "schema name", whose interpretation in terms of item names and field names is left to the Metadata Adapter.
    Just replace the involved lines with:
    var group = new Array("PETR4", "VALE5", "BBDC4");
    var schema = new Array("MelhorOfertaCompra", "MelhorOfertaVenda", "Papel", "Ultimo");



Similar Threads

  1. NonVisualTable - simple tutorial
    By Mone in forum Client SDKs
    Replies: 13
    Last Post: September 9th, 2010, 06:51 PM
  2. Adding items to a NonVisualTable
    By webfg in forum Client SDKs
    Replies: 2
    Last Post: June 30th, 2010, 01:28 PM
  3. Log data (on server & monitor)
    By Heritage in forum General
    Replies: 1
    Last Post: April 9th, 2010, 11:12 AM
  4. Error 110 Received in the browser
    By ctranfd in forum Client SDKs
    Replies: 10
    Last Post: September 21st, 2009, 12:06 PM
  5. NonVisualTable with COMMAND mode
    By Alessandro in forum Client SDKs
    Replies: 2
    Last Post: June 17th, 2009, 12:50 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
All times are GMT +1. The time now is 12:56 PM.