Results 1 to 6 of 6
  1. #1
    Member
    Join Date
    Apr 2008
    Location
    East Boston
    Posts
    8

    Flex data adaptor for stock quote?

    Is there a way to currently modify the StockList demo in flex to be able to add the functionality of grabbing quotes based off of what the user enters in for a ticker symbol? Would I have to modify the code tremendously or is it something that can be done with minimal editing?

  2. #2
    Administrator
    Join Date
    Jul 2006
    Location
    Milan
    Posts
    972
    Is the question about the effort on the flex client side to add the proper subscription logic?
    Or is it about the effort on the Data Adapter side to make it accept subscriptions for any item, whatever the name?
    Note that if your front-end sticks to the items supplied by the StockListDemo Data Adapter (i.e. "item1" through "item30") no changes are needed on the Data Adapter side.

  3. #3
    Member
    Join Date
    Apr 2008
    Location
    East Boston
    Posts
    8
    What I would like to know if its possible to currently use the StockListDemo and instead of using the default ticker symbols to possibly create a view stack and have a viewstack which has about 10 input fields for 10 different ticker symbols. What I would like to have is a configure screen on the flex client which is able to accept 10 ticker symbols, and based off of these ticker symbols go to the lightstreamer server and retrieve and display the correct information in the flex client. Also could you explain what the item1 to item30 is? Can these be replaced with actual ticker symbols?

  4. #4
    Power Member
    Join Date
    Jul 2006
    Location
    Cesano Maderno, Italy
    Posts
    784
    Hello,

    from a flex point of view you can certainly create an application that lets the user select which ticker to visualize in the grid. Just change the items array composing it with user input



    Assuming you want to use the grid (automatic binding) and not the text view (manual writing), if you need to change the list dynamically you have 3 options:
    • Unsubscribe from the subscribed VisualTable and create a new one to be subscribed to
      this way each time a single item enters or exits the list you have to resubscribe the entire table.
    • Extend the ArrayCollection class to be binded with the DataGrid. This way you can control in each moment which items are visualized inside the grid and you can subscribe and unsubscribe single items internally with mono-item NonVisualTables.
      This way could be a little tricky if you're not familiar with Flex
    • You could also update an ArrayCollection externally (e.g. without extending it), you can see an example here
    From the adapter point of view, item1 - item30 are generated by the adapter code. If you need to use actual data you should implement your own data adapter to be connected with your feed.

    Let me know if you need further info

  5. #5
    Member
    Join Date
    Apr 2008
    Location
    East Boston
    Posts
    8
    Mone, I know this isn't place for flex help, but I wanted to create a configuration screen in flex which I did and this screen has 10 inputs which is what I have in the provided zip. I'm not sure how to setup my dataprovider now. I need to now set the array and pass it to the LS server correct? Any steps you could provide me that I need to take in order to get the layout correct would be great. Much appreciated. I took the HelloWorld example and created a base for this project. I also created a StockQuoteSystem dir under pages and put the index.htm under the deploy folder along with the bridge and ls folders.


    You need to rename the file without the .zip
    Attached Files Attached Files

  6. #6
    Power Member
    Join Date
    Jul 2006
    Location
    Cesano Maderno, Italy
    Posts
    784
    Hi,
    I'm sorry but I'm very busy at the moment.
    I will take a look at your code as soon as I have some time, btw I'm not able to give you an estimate now.

 

 

Similar Threads

  1. How to write my own stock list data adapter with java
    By pradeepgamage in forum General
    Replies: 1
    Last Post: January 9th, 2012, 11:39 AM
  2. Replies: 5
    Last Post: July 12th, 2010, 10:12 AM
  3. Visual Basic Example of Data Adaptor
    By dianacastillo in forum Adapter APIs
    Replies: 1
    Last Post: April 15th, 2008, 11:52 AM
  4. Replies: 4
    Last Post: January 15th, 2008, 09:15 AM

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 11:55 PM.