invoice2-setup.jsp
<%@ page contentType="text/html; charset=euc-jp" %>
<h1>シンプルな請求書ジェネレータ</h1>
<p>
このサンプルは、スクリプトレットおよび JRun カスタム タグ
ライブラリを使用する表現と、データ モデルを操作する Java Bean
の使用を最小限に抑えた請求書ジェネレータです。
請求書発効日は、Emacs 時間管理システムにより生成されます。
<p>
<% invoiceBean.setPageContext( pageContext ); %>
<jsp:setProperty name="invoiceBean" property="clientCompany" />
<jsp:setProperty name="invoiceBean" property="weekEnding" />
<table align="left">
<tr>
<th align="right">発注元会社の選択:</th>
<td align="left">
<select name="clientCompany"
onClick="this.form.submit()">
<jrun:foreach
item="company"
type="String"
group="<%= invoiceBean.getCompanies() %>">
<option
<jsp:setProperty name="invoiceBean" property="item" value="<%= company %>" />
<jsp:getProperty name="invoiceBean" property="selected" />
value="<%= company %>"> <%= company %>
</option>
</jrun:foreach>
</select>
</td>
</tr>
<% if ( invoiceBean.getClientCompany() != null ) { %>
<tr>
<th align="right">週の選択 (週の終わりの日付):</th>
<td align="left">
<select name="weekEnding">
<jrun:foreach
item="week"
type="String"
group="<%= invoiceBean.getWeeks() %>">
<option
<jsp:setProperty name="invoiceBean" property="item" value="<%= week %>" />
<jsp:getProperty name="invoiceBean" property="selected" />
value="<%= week %>"> <%= week %>
</option>
</jrun:foreach>
</select>
</td>
</tr>
<tr><th></th><td><hr></td></tr>
<tr>
<th></th>
<td>
<input
type="submit" name="generateInvoice" value="請求書の生成"
onClick="invoiceForm.operation.value='GENERATE';this.form.submit()">
</td>
</tr>
<% } %>
</table>