-
November 2nd, 2009, 07:32 PM
#1
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.
-
November 3rd, 2009, 11:47 AM
#2
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?
-
November 3rd, 2009, 01:39 PM
#3
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 ) ?
-
November 4th, 2009, 09:04 AM
#4
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.
-
November 6th, 2009, 10:08 AM
#5
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.
-
November 6th, 2009, 11:04 AM
#6
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.
-
November 12th, 2009, 03:03 PM
#7
thank you
Similar Threads
-
By Pradeep Chahal in forum Adapter SDKs
Replies: 1
Last Post: April 30th, 2010, 09:00 AM
-
By vdhinesh in forum Client SDKs
Replies: 1
Last Post: December 7th, 2009, 12:36 PM
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
All times are GMT +1. The time now is 08:46 AM.
Bookmarks