Results 1 to 5 of 5
  1. #1

    Second level data adapter, in the same class as the primary

    like in the Portfolio example, I have a DynaGrid
    the adapter have events, at startup it pushes a full list of rows, at any time a new row can be added. This part is ok

    but I have other more tiny events (quote) for them the secondLevelAdapter is well suited (because I don't know the row id for them)
    but I did not managed to catch the events in the browser, probably because it's all in the same default Adapter class?

    I tried setting it or not:

    sending a UPDATE command with a random(but not existing) key make it work, but that's not really clean

    in js:
    var subscription = new Subscription("COMMAND", id, fieldList);

    ..sorry but it seems the forum doesn't handle well the Title editing
    Last edited by darch; March 29th, 2013 at 04:07 AM.

  2. #2
    Join Date
    Feb 2012
    The JavaScript code attached seems correct and so the the problem might be on the adapter side, right in the generation of updates.

    You would be able to show us a piece of Lightstreamer log capturing the begin of a subscription and some updates sent?
    Please, set the level to DEBUG for "LightstreamerLogger.pump" and "LightstreamerLogger.subscriptions" loggers in lightstreamer_log_conf.xml configuration file.

  3. #3

    yes indeed I'm seeing those "Missing mandatory parameter in command event for key null"
    that's why nothing received
    note here, I'm using a secondary "log" data-field, I know there's something dedicated for log, it's just tests

    I really need to make them work as secondary level, else, with UPDATE, they are still injected in the grid, else I will need a separate staticgrid subscription, if we don't solve that
    Last edited by darch; March 29th, 2013 at 12:22 PM.

  4. #4
    I'm trying various things to use the same subscriptions and inject those secondary events

    as it complains of missing key, or command, with command="UPDATE" I must be able to hide the new field, but this is ugly but it's better in my case than having to use another staticgrid..

    in my opinion, the problem could come from like I said, primary and secondary events are emitted from the same adapter, maybe this is why they are rejected, because it expect necessarily a key and command from this adapter

    ps: and command="DELETE" events wouldn't work (Unexpected DELETE event for key _. Event discarded)

  5. #5
    Join Date
    Feb 2012
    Hi darch,

    Sorry but I can't find the log form the posted link .

    By the way, as general concepts, I confirm you that you can send primary and secondary fields updates from the same adapter without restrictions. As regards the updates of the first level must to have the command and key fields valued; furthermore as option a subset of the fields of the first level. With regard to the second level it is important that the Item name of the update is a previously used value as a key in an event of type "ADD".




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 02:17 AM.