%@ page
import="java.util.Collection, java.util.Iterator, org.apache.geronimo.daytrader.javaee6.core.direct.*, org.apache.geronimo.daytrader.javaee6.core.api.*, org.apache.geronimo.daytrader.javaee6.entities.*, org.apache.geronimo.daytrader.javaee6.core.beans.*, org.apache.geronimo.daytrader.javaee6.web.TradeAction"
session="true" isThreadSafe="true" isErrorPage="false"%>
<%
TradeServices tAction=null;
tAction = new TradeAction();
MarketSummaryDataBean marketSummaryData = tAction.getMarketSummary();
%>
Market Summary
<%= marketSummaryData.getSummaryDate() %> |
DayTrader Stock Index (TSIA) |
<%= marketSummaryData.getTSIA() %> <%= FinancialUtils.printGainPercentHTML(marketSummaryData.getGainPercent()) %> |
Trading
Volume |
<%= marketSummaryData.getVolume() %> |
Top Gainers |
symbol |
price |
change |
<%
Collection topGainers = marketSummaryData.getTopGainers();
Iterator gainers = topGainers.iterator();
int count=0;
while (gainers.hasNext() && (count++ < 5))
{
QuoteDataBean quoteData = (QuoteDataBean) gainers.next();
%>
<%= FinancialUtils.printQuoteLink(quoteData.getSymbol()) %>
|
<%= quoteData.getPrice() %> |
<%= FinancialUtils.printGainHTML(quoteData.getPrice().subtract(quoteData.getOpen())) /*FinancialUtils.printGainPercentHTML(FinancialUtils.computeGainPercent(quoteData.getPrice(), quoteData.getOpen()))*/ %> |
<%
}
%>
|
Top Losers |
symbol |
price |
change |
<%
Collection topLosers = marketSummaryData.getTopLosers();
Iterator losers = topLosers.iterator();
count=0;
while (losers.hasNext() && (count++ < 5))
{
QuoteDataBean quoteData = (QuoteDataBean) losers.next();
%>
<%= FinancialUtils.printQuoteLink(quoteData.getSymbol()) %>
|
<%= quoteData.getPrice() %> |
<%= FinancialUtils.printGainHTML(quoteData.getPrice().subtract(quoteData.getOpen())) /* FinancialUtils.printGainPercentHTML(FinancialUtils.computeGainPercent(quoteData.getPrice(), quoteData.getOpen())) */%> |
<%
}
%>
|