Results 1 to 10 of 30

Hybrid View

  1. #1
    Member
    Join Date
    Feb 2009
    Location
    KL
    Posts
    29
    Hi, DarioCrivelli, thanks again for your kind replied.

    If events A and C are selected, your second page should subscribe to suitable items, like "eventAdetails" and "eventCdetails", that your Data Adapter has to supply. The table is able to show rows from both items...
    What you are talking is the exactly scenario that I want. Just the thing that I don't understand is "subscribes to suitable items", what does it mean and how to do that?
    and the statement "...your Data Adapter has to supply...", does it means that I have to add something extra in the adapters.xml other than just with the simple metadata and adapter_class? Following is the content in my adapters.xml:

    <?xml version="1.0" ?>
    - <adapters_conf id="RBMS_Demo">
    - <metadata_provider>
    <adapter_class>com.lightstreamer.adapters.metadata .LiteralBasedProvider</adapter_class>
    </metadata_provider>
    - <data_provider>
    <adapter_class>com.lightstreamer.adapters.remote.d ata.NetworkedDataProvider</adapter_class>
    <param name="request_reply_port">1001</param>
    <param name="notify_port">1002</param>
    </data_provider>
    </adapters_conf>


    Sorry for such many questions, because I couldn't understand it well by just referring to the documentation. Thanks.

  2. #2
    Member
    Join Date
    Feb 2009
    Location
    KL
    Posts
    29
    Hi DarioCrivelli, sorry for another question..I'm currently testing on DynaMetapushTable, it work nicely (except the grouping feature), and when I changed to MultiDynaMetapushTable, the web client was not able to display the pushed data. I can see the table row was expanded without displaying any of the pushed data. Following is the code on my client page:
    <table>
    <tr align="center" class="greenbar">
    <td width="10%">LEAGUE</td>
    <td width="11%">TIME</td>
    <td width="11%">SCORE</td>
    <td width="28%">EVENT</td>
    <td width="18%">PRICE</td>
    <td width="18%">PRICE2</td>
    </tr>
    <tr id="news" source="lightstreamer">
    <td align="center" width="10%"><div source="lightstreamer" field="3">Loading...</div></td>
    <td align="center" width="11%"><span source="lightstreamer" field="4">Loading...</span></td>
    <td align="center" width="11%"><span source="lightstreamer" field="5">Loading...</span></td>
    <td width="28%">
    <table width="100%" border="0" cellpadding="0" cellspacing="0" class="table_noline">
    <tr><td align="left"><span source="lightstreamer" field="6">Loading...</span></td></tr>
    <tr><td align="left"><span source="lightstreamer" field="7">Loading...</span></td></tr>
    </table>
    </td>
    <td width="18%">
    <table width="100%" border="0" cellpadding="0" cellspacing="0" class="table_noline">
    <tr><td align="left"><span source="lightstreamer" field="8">Loading...</span></td><td align="right"><span source="lightstreamer" field="10">Loading...</span></td></tr>
    <tr><td align="left"><span source="lightstreamer" field="9">Loading...</span></td><td align="right"><span source="lightstreamer" field="11">Loading...</span></td></tr></table>
    </td>
    <td width="18%">
    <table width="100%" border="0" cellpadding="0" cellspacing="0" class="table_noline">
    <tr><td align="left"><span source="lightstreamer" field="12">Loading...</span></td><td align="right"><span source="lightstreamer" field="13">Loading...</span></td></tr>
    <tr><td align="left"></td><td align="right"><span source="lightstreamer" field="14">Loading...</span></td></tr></table>
    </td>
    </tr>
    </table>

    <script>
    var schema = ["command","key","eventid"];
    var undschema = ["sfe","datetime","score","teama","teamb","hhandica p","ahandicap","home","away","overunder","over","u nder","bgcolor"];
    var group = ["news"];
    var mode = "COMMAND";
    //var schemaCommand = "key command sfe datetime score teama teamb hhandicap ahandicap home away overunder over under bgcolor";

    //var commandTable = new DynaMetapushTable("NewUser", schemaCommand, "COMMAND");
    var commandTable = new MultiDynaMetapushTable(group, schema, mode, undschema);
    //TABLE
    commandTable.setSnapshotRequired(true);
    commandTable.setRequestedMaxFrequency(0.5);
    //VISUALTABLE
    commandTable.isPushedHtmlEnabled(true);
    commandTable.setPushedHtmlEnabled(true);
    commandTable.setClearOnDisconnected(true);
    commandTable.setClearOnRemove(true);
    commandTable.setClearOnAdd(true);
    //DYNAMETAPUSHTABLE
    commandTable.onChangingValues = formatValues;
    commandTable.onItemUpdate = updateItem;
    commandTable.setMaxDynaRows("unlimited");
    commandTable.setMetapushFields(2, 1);
    commandTable.setMetapushSort(4, true);

    lsPage.addTable(commandTable, "news");
    </script>

    adapters.xml:
    <?xml version="1.0" ?>
    - <adapters_conf id="RBMS_Demo">
    - <metadata_provider>
    <adapter_class>com.lightstreamer.adapters.metadata .LiteralBasedProvider</adapter_class>
    </metadata_provider>
    - <data_provider>
    <adapter_class>com.lightstreamer.adapters.remote.d ata.NetworkedDataProvider</adapter_class>
    <param name="request_reply_port">1001</param>
    <param name="notify_port">1002</param>
    </data_provider>
    </adapters_conf>

    I'm actually just change the Table type to MultiDynaMetapushtable and the schema. When I try pushing data to the client, the table row is expanding but without any data display. Just wondering if I miss anything or set something wrong on the adapters/web client/the push application (the push application is written in vb.net by referring to the .net hello world example).

  3. #3
    Administrator
    Join Date
    Jul 2006
    Location
    Milan
    Posts
    1,091
    Your Data Adapter currently supplies an item called "NewUser", i.e. the Subscribe method recognizes the "NewUser" name and supplies data accordingly. All other items needed, as "eventAdetails" and "eventCdetails" in my example, should be managed in the same way. No configuration change is needed; just an extension of the adapter source code.

    If the item for the first page supplied data for the first level events, like:
    key=eventA command=ADD name=confederation cup
    key=eventB command=ADD name=nba finals
    then the "eventAdetails" item would supply updates for second level events, like:
    key=match1 command=ADD team1=Italy team2=USA
    key=match2 command=ADD team1=Spain team2=New Zealand
    and so on.
    The Data Adapter should do all the work.

    About the MultiMetapushTable, it seems that you just tried to rewrite the client page with no modification on the Data Adapter side. The client code shown assumes that for each possible value of the "key" field coming with the "news" item, an item with that name is also supplied by the Data Adapter; this is how the MultiMetapushTable works. Have you extended your Data Adapter accordingly?

  4. #4
    Member
    Join Date
    Feb 2009
    Location
    KL
    Posts
    29
    Hi DarioCrivelli, thanks for your kind reply.
    Have you extended your Data Adapter accordingly?
    I've refer to the sample demo adapter and the documentation but not understand

    I found a tutorial on NonvisualTable with Command mode from Alessandro, it works quite well for me. Grouping and filtering can be apply since the display can be customize (I have simply tested and works well, should be OK, have to further testing though).

    I discovered a thing during testing, where the snapshot will be clear after the web client been idled sometimes (without doing anything, refresh etc.). Do you have any idea on this? Please correct me if I'm wrong. Thanks.

  5. #5
    Administrator
    Join Date
    Jul 2006
    Location
    Milan
    Posts
    1,091
    So, you have managed to get the desired behavior by resorting to a NonVisualTable, with client side filtering.
    Ok. I hope that the data that gets filtered out is not too much, because this could pose scalability issues.

    As far as I understand your new problem, we have never observed anything similar (but for the case that the Server is shut down).
    Can you please provide us with a more detailed description of what happens?
    What do you mean by "snapshot"? This word has a special meaning in Lightstreamer and I'm not sure if you mean a Lightstreamer snapshot or something else.

  6. #6
    Member
    Join Date
    Feb 2009
    Location
    KL
    Posts
    29
    Can you please provide us with a more detailed description of what happens?
    What do you mean by "snapshot"?
    Sorry for the unclear question, just ignore the "snapshot" thingy. What I mean here is once I refresh the page after some period, all the data that suppose to be displayed is all gone.

    What I did is after the page has displayed all the pushed data, I just leave it there and after sometimes I refresh the page again (shortest time was around 3+ mins), it appeared to be blank. It shows nothing and the data that I pushed previously didn't show on the page.

  7. #7
    Administrator
    Join Date
    Jul 2006
    Location
    Milan
    Posts
    1,091
    If I understand well
    1. you run your page
    2. the page loads and it is filled with pushed data
    3. you come back after more than 3 minutes
    4. the page is still full of pushed values
    5. you hit the browser refresh button
    6. the page reloads, but it is not filled with pushed data

    Note that the page uses a NonVisualTable, hence everything concerning the page appearance is managed by custom code.
    Can you monitor the invocations to "onItemUpdate" on your NonVisualTable and see if there are invocations after the page refresh?

 

 

Similar Threads

  1. How to deploy on an external Web Server?
    By AndyKelly in forum Client SDKs
    Replies: 1
    Last Post: July 7th, 2010, 10:50 AM
  2. How to deploy on an external Web Server?
    By AndyKelly in forum Adapter SDKs
    Replies: 0
    Last Post: July 6th, 2010, 10:34 AM
  3. Interaction demo source code
    By sarbao in forum General
    Replies: 1
    Last Post: April 16th, 2009, 08:59 AM
  4. Replies: 4
    Last Post: March 19th, 2008, 10:10 AM
  5. Replies: 1
    Last Post: November 5th, 2007, 01:36 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 09:47 AM.