Results 1 to 7 of 7
  1. #1
    Senior Member
    Join Date
    Jul 2009
    Location
    not
    Posts
    41

    Pass arguments from web page to adapter ??

    it's all said in the title.
    how can i pass arguments from the web page, to the adapter ( concerning the example of stocklist) ?

    and thnx.

  2. #2
    Administrator
    Join Date
    Jul 2006
    Location
    Milan
    Posts
    972
    Your page can communicate to the Server through the sendMessage method.
    See this post, for instance.

    However, if you say "arguments" to mean information needed to identify the subscriptions you are performing,
    then you are supposed to include this information in the item names you use for subscription.
    The Metadata Adapter in getItems, can process the supplied "decorated" item names and identify the right items involved;
    the name of the user performing the request is also available in this phase.

    May you please clarify how you would apply this extension to the StockList example?

  3. #3
    Senior Member
    Join Date
    Jul 2009
    Location
    not
    Posts
    41
    thx for your quick reply.
    Consider the stocklist's example. if i wanted to show only the stocks belonging to a certain group ( the class MyProducer would have a "stockGroup" attribut).
    How can i do such a thing ? do i have to make a MetaAdapter to do it (if yes, is there's something i have to change in the DataAdapter ) ?

  4. #4
    Administrator
    Join Date
    Jul 2006
    Location
    Milan
    Posts
    972
    The current StockList demo page explicitly lists the names of all stock items to which it subscribes,
    although it uses fake names (i.e. "item1", "item2", ... to make it simple).
    Hence, you can change the list as you like.

    If the page does not know the names of the stock items to which it has to subscribe,
    but it only knows that they belong to a specific "group",
    then it can use the group name in its request and let the Metadata Adapter decode the group name into an item name list.
    The Data Adapter would not be involved, as it just provides updates based on the item names requested.
    However, this technique is only feasible if the page knows how many items are involved, so that it can allocate the needed room.

    Otherwise, the decoding of the group name into the stock items involved has to be performed in a previous step.
    Alternatively, the COMMAND mode can be leveraged, by treating your group in a way similar to a user portfolio. In this case, the PortfolioDemo could be your reference.

  5. #5
    Senior Member
    Join Date
    Jul 2009
    Location
    not
    Posts
    41
    Sorry for bothering you, but suppose that you have an input text and a button. you choose to write in that input text the value "30" (as bid quantity), then if you click on the button, another page will show only the items having their bid quantity more than the quantity you wrote in that input text ("30").
    how is it possible to do that ?

    what i want to do, is some sort of filtering.

  6. #6
    Administrator
    Join Date
    Jul 2006
    Location
    Milan, Italy
    Posts
    516
    You should implement that in COMMAND mode.

    When the user inputs 30, the application will subscribe to a COMMAND-mode item, say "bidGT30".

    Your Data Adapter will receive the subscription to the "bidGT30" and will start pushing ADD and DELETE commands, in order to manage in real time which symbols should be part of the filtered table.

    So, most of the logic would be in your custom Data Adapter.

  7. #7
    Senior Member
    Join Date
    Jul 2009
    Location
    not
    Posts
    41
    thank you

 

 

Similar Threads

  1. command line arguments passed to the JVM at startup
    By Pradeep Chahal in forum Adapter APIs
    Replies: 1
    Last Post: April 30th, 2010, 09:00 AM
  2. Tibco proxy pass issue
    By vdhinesh in forum Client APIs
    Replies: 1
    Last Post: December 7th, 2009, 12: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 02:22 AM.