Page 2 of 3 FirstFirst 123 LastLast
Results 11 to 20 of 30
  1. #11
    Member
    Join Date
    Feb 2009
    Location
    KL
    Posts
    29
    Did you see all those data in the direct loading case and none of them in the iFrame case?
    Yes, I can see all those data in the direct loading case but not in the iFrame case.

    Is it a full log or is it a compound of various log snippets?
    It is a full logs.

    Is it possible that your Data Adapter reuses the Maps it sends through "update" or "smartUpdate"?
    Sorry, I don't understand "Maps" case . And I don't see anything in the Web Server logs.

    But I finally found out the problem which it was caused the iFrame. I was unaware of there was a Javascript function which will amend the iFrame height each time an event was pushed, the iFrame height remain unchanged due to the push table structure because it couldn't detect the row of the table.

    I have modified the function and put it under the formatValues funtion and it works nicely now. Thank you very much for all your kind replies.

    And I am planning to do a grouping feature, when a user select certain events from the 1st page, the 2nd page will shows all the sub-events of the selected events. Do you have any idea on how to do this? Thanks

    1st page:
    ===========
    Event1
    ----------------
    Event2
    ----------------
    Event3
    ----------------

    if user select Event1 and Event2, it will navigate to the 2nd page and shows all the sub-events of Event1 and Event2

    2nd page:
    =============================
    Event1 | Sub-Event1
    ----------------------------------------
    Event1 | Sub-Event2
    ----------------------------------------
    Event2 | Sub-Event1
    ----------------------------------------
    Event2 | Sub-Event2
    ----------------------------------------

  2. #12
    Administrator
    Join Date
    Jul 2006
    Location
    Milan
    Posts
    1,089
    I'm glad it works. If the data you see is what you expect, I won't investigate on the apparent inconsistencies in the Server log.

    About the grouping feature, I suppose that the list shown in the first page is dynamical (i.e. it can grow and shrink in time) and it is produced by a COMMAND mode item.
    Is the list of sub-events for each event also dynamical? Then I think you need to introduce a new COMMAND mode item for each event in order to list all the sub-events.
    Your second page can explicitly subscribe to the details of all the events needed.
    You can take advantage of the DynaMetapushTable support and subscribe to multiple items in the same table; all the rows belonging to different items will be listed.
    You can have those rows sorted primarily by event, then by sub-event, by playing on the sort configuration and using an extra hidden field, that you can determine on the client side, as the sort key.

  3. #13
    Member
    Join Date
    Feb 2009
    Location
    KL
    Posts
    29
    The first page isn't shown dynamical. The events will be retrieve from the database and list on the page together with their correspond ID. When user select certain events, the page will send these selected event IDs (e.g 123,234) to the second page, the push page, and it will shows the sub-events according to the Event IDs passed. This push page is dynamical where it can grow and shrink in time.

    The push page that I am testing currently was using DynaMetaPushTable with COMMAND mode (the second page mentioned was this page actually), just that it doesn't has the grouping feature, it will receive and show all the pushed sub-events. And I would like to add the grouping feature into it.

    I'm thinking since the Event ID(s) was passed from the first page, can the sub-event(s) shows according to the Event ID(s)? Can this be done?
    I have try to add some validation checking on the onChangingValues and onItemUpdate handler but it seems not working
    Is there any demo on this kind of circumstances and MultiDynaMetaPushTable?

    Thank you.

  4. #14
    Administrator
    Join Date
    Jul 2006
    Location
    Milan
    Posts
    1,089
    The solution on my previous post still applies.
    It requires that your Data Adapter supplies an item for each event. The second page subscribes to exactly the required items. Each item supplies a list of sub-events and all lists are collected by the DynaMetapushTable (or MultiDynaMetapushTable).
    Upon a change of the event selection on the first page, the second page would be reloaded or would remove the table and readd a new table with the new selection.

    If the above is not acceptable and you need to dynamically filter the events and sub-events in your second page, then I'm afraid you cannot take advantage of a DynaMetapushTable or MultiDynaMetapushTable.
    You should resort to a NonVisualTable and display its contents according to the filtering policy; the NonVisualTable also supports COMMAND mode and two level push (see setCommandLogic).

    Of course, I may be missing better solutions.

  5. #15
    Member
    Join Date
    Feb 2009
    Location
    KL
    Posts
    29
    If the above is not acceptable and you need to dynamically filter the events and sub-events in your second page, then I'm afraid you cannot take advantage of a DynaMetapushTable or MultiDynaMetapushTable.
    Did you mean after user have selected certain Event from the first page, the second page will subscribes to required item (sub-events) but any new pushed item that came after second page has subscribed which is not the required one will also show on the second page?

    If I really have to use the NonVisualtable, where can I get the demo? and perhaps, the MultiDynaMetaPushTable as well. Thank you.

  6. #16
    Administrator
    Join Date
    Jul 2006
    Location
    Milan
    Posts
    1,089
    The whole discussion is becoming complex and I would like to avoid any misunderstanding.
    Let me go back one step.

    What you cannot do with a DynaMetapushTable or MultiDynaMetapushTable is to filter rows on the client side. These tables show all the rows they receive, according to the items they subscribe to.
    Hence, if the item you use on the first page lists all the possible events, you cannot use the same item to feed the second page, where you need to show only a subset of events.

    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.
    Then, if the user selects also event E and you want it to appear in the second page, you have to replace the table with a new table which subscribes to "eventAdetails", "eventCdetails" and "eventEdetails".
    Is that acceptable?
    Otherwise, you must resort to a NonVisualTable.

    Your specific scenario is not covered by our examples.
    You can see a MultiDynaMetapushTable in the sample installation of Lightstreamer in the Portfolio Demo. The Drop-Down Demo uses a NonVisualTable with COMMAND mode.

  7. #17
    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.

  8. #18
    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).

  9. #19
    Administrator
    Join Date
    Jul 2006
    Location
    Milan
    Posts
    1,089
    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?

  10. #20
    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.

 

 

Similar Threads

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