generateInvoice2.jsp
<%@ page contentType="text/html; charset=euc-jp" %>
<%@ page errorPage="errors.jsp" %>
<html>
<jsp:useBean
id="invoiceBean" scope="application"
class="com.allaire.samples.invoice.InvoiceBean2">
</jsp:useBean>
<jsp:setProperty name="invoiceBean" property="clientCompany" />
<jsp:setProperty name="invoiceBean" property="weekEnding" />
<% invoiceBean.initialize(); %>
<head>
<title>
PSG 請求書: 週:
<jsp:getProperty name="invoiceBean" property="weekEnding" />
</title>
</head>
<body>
<center>
<p>
<%@ include file="psgHeader.html" %>
<p>
<table border=1 cellspacing=3 cellpadding=5>
<tr>
<th align="right">請求書発効日:</th>
<td>
<jsp:getProperty
name="invoiceBean" property="invoiceDate" />
</td>
</tr>
<tr>
<th align="right">コンサルティング サービス発注元:</th>
<td>
<jsp:getProperty
name="invoiceBean" property="clientCompany" />
</td>
</tr>
<tr>
<th align="right">住所: </th>
<td>
<jsp:getProperty
name="invoiceBean" property="clientAddress" />
</td>
</tr>
<tr>
<th align="right">発注番号:</th>
<td>
<jsp:getProperty
name="invoiceBean" property="clientPO" />
</td>
</tr>
<tr>
<th align="right">週:</th>
<td>
<jsp:getProperty
name="invoiceBean" property="weekEnding" />
</td>
</tr>
<tr>
<th align="right">開発者:</th>
<td>
<jsp:getProperty
name="invoiceBean" property="developerName" />
</td>
</tr>
<tr>
<th align="right">レート:</th>
<td>
$<jsp:getProperty
name="invoiceBean" property="developerRate" />
</td>
</tr>
</table>
<p> 実働時間:
<table border=1 cellspacing=3 cellpadding=5>
<% String dayName;
String hours;
for ( int index=0; index < 7; index++ ) {
dayName = invoiceBean.getDayName(index);
hours = invoiceBean.getHours(index); %>
<tr>
<th align="right"><%= dayName %>: </th>
<td><%= hours %></td>
</tr>
<% } %>
<tr>
<th align="right">合計時間: </th>
<td>
<jsp:getProperty
name="invoiceBean" property="totalHours" />
</td>
</tr>
<tr><th></th><td></td></tr>
<tr>
<th align="right">合計額: </th>
<td>$<%= invoiceBean.getBalanceDue() %></td>
</tr>
</table>
</center>
</body>
</html>