Results 1 to 7 of 7

Hybrid View

  1. #1
    Member
    Join Date
    Dec 2007
    Location
    São Paulo
    Posts
    9
    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" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

    <html xmlns="http://www.w3.org/1999/xhtml" >
    <head><title>
    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" />

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


    <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>

    <div>
    <table id="list" class="quotes"><tr>
    <th>MelhorOfertaCompra</th><th>MelhorOfertaVenda</th><th>Papel</th><th>Ultimo</th>

    </tr><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>
    </tr><tr>
    <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>
    </tr><tr>
    <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>
    </tr></table><div>

    </div>
    </div>


    <script type="text/javascript">
    <!--
    var lsPage = new PushPage();
    lsPage.context.setDebugAlertsOnClientError(true);
    lsPage.context.setDomain("localhost");
    lsPage.onEngineCreation = startEngine;
    lsPage.bind();
    lsPage.createEngine("SLEngine", "/aehomebroker/ls");

    var group = "PETR4 VALE5 BBDC4";
    var schema = "MelhorOfertaCompra MelhorOfertaVenda Papel Ultimo";
    var newTable = new OverwriteTable(group, schema,'MERGE');
    newTable.setSnapshotRequired(false);
    newTable.setPushedHtmlEnabled(true);
    lsPage.addTable(newTable, 'list');
    function startEngine(eng) {
    eng.policy.setMaxBandwidth(30);
    eng.policy.setIdleTimeout(30000);
    eng.connection.setLSHost("localhost");
    eng.connection.setLSPort("8080");
    eng.connection.setAdapterName("AETEST");
    eng.changeStatus("STREAMING");
    }
    // -->
    </script>

    </form>
    </body>
    </html>

  2. #2
    Administrator
    Join Date
    Jul 2006
    Location
    Milan
    Posts
    1,091
    Hi,

    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:
    Code:
    var group = new Array("PETR4", "VALE5", "BBDC4");
    var schema = new Array("MelhorOfertaCompra", "MelhorOfertaVenda", "Papel", "Ultimo");

  3. #3
    Member
    Join Date
    Dec 2007
    Location
    São Paulo
    Posts
    9
    Thank you so much Dario,

    Now, everything is working very fine.

 

 

Similar Threads

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