In the Portfolio Demo a virtual stock portfolio, shared among all the connected users, is displayed. The columns show: instrument name, last price, quantity (number of stocks in the portfolio), last counter value (=price*quantity), time of last price.

By using the "Submit Order" panel, you can buy or sell a stock by choosing the Stock ID (within the set of 15 stocks available on this virtual market), filling in the Quantity field and pressing Buy or Sell buttons.

The displayed portfolio is updated in push, both for columns and rows (the so called "metapush" feature). You can choose by which column to sort the table by clicking on column headers.

Since this portfolio is shared among all connected users, you can submit orders from one PC and see the updates displayed on another PC.

Paginated Demo: The same as Standard Demo, but client-side dynamic pagination is shown too. You can choose how many rows per page should be displayed and the stock list will be split accordingly over the right number of pages.

Note the different kinds of client-side dynamic behavior:

1) If you sort by column such as “Time” (which provokes frequent position changes of the items), you will see that the items move among different pages at the appropriate time.

2) If you switch to another page, the new page will be displayed without the need to make a request to the web server (in other words, the page switch is completely handled on the client side).

Standard Demo: Click here to run the demo

Paginated
Demo: Click here to run the demo

The full source code for these demos (client side and server side) is available from here (for a good comprehension some knowledge of Java, JMS, servlets, Tomcat and JBoss is advised).

 
  << Go back to the list of demos    
   

HOME >> DEMOS >> PORTFOLIO DEMO