BC4Jデータソースで編集する行の選択を行うJSPページは、HTTPリクエスト・オブジェクトを介して、送信ページでの処理のために次のものをフォワードする必要があります。
アプリケーション・モジュール・インスタンスおよびビュー・オブジェクト・データソースに対してこれを実行するには、これらのBC4Jデータ・タグで2つのJSPページを作成します。
編集JSPページ
<form name="edit" action="formSubmit.jsp" method="post">
<table>
<%-- Iterate through all the attributes of the current record --%>
<jbo:AttributeIterate id="def" datasource="ds">
<tr>
<%-- Display attribute name and render value --%>
<td align="right"><jbo:ShowHint hintname="LABEL" /></td>
<td align="right"><jbo:RenderValue datasource="ds" /></td>
</tr>
</jbo:AttributeIterate>
</table>
</form>
<jbo:UrlEvent>
データ・タグを使用し、必要なBC4J識別子を渡します。
<form name="edit" action="formSubmit.jsp" method="post">
<table>
<%-- Iterate through all the attributes of the current record --%>
<jbo:AttributeIterate id="def" datasource="ds">
<tr>
<%-- Display attribute name and render value--%>
<td align="right"><jbo:ShowHint hintname="LABEL" /></td>
<td align="right"><jbo:RenderValue datasource="ds" /></td>
<%-- Submit the jboEvent with the URL --%>
<td> <a href="<jbo:UrlEvent targeturlparam='formSubmit.jsp'
event='Edit' datasource='ds' addrowkey='true'/>">Edit</a> </td>
</tr>
</jbo:AttributeIterate>
</table>
</form>
送信JSPページ
Edit
イベントを使用してBC4J <jbo:OnEvent>
データ・タグを追加し、編集ページで指定したものと同じデータソース上でHTTPリクエスト・オブジェクトを処理するGet
アクションを使用して、BC4J <jbo:Row>
データ・タグをネストします。
<jbo:OnEvent name="Edit" datasource="ds">
<jbo:Row id="delrow" rowkeyparam="jboRowKey" action="Get" </jbo:Row>
</jbo:OnEvent>
<form name="submit" action="formSubmit.jsp" method="post">
<table>
<%-- Iterate through all the attributes of the current record --%>
<jbo:AttributeIterate id="def" datasource="ds">
<tr>
<%-- Display attribute name --%>
<td align="right"><jbo:ShowHint hintname="LABEL" /></td>
<%-- Display input field with current value --%>
<td><jbo:InputRender formname="edit" /></td>
</tr>
</jbo:AttributeIterate>
</table>
</form>
タスク実行時にJSPページでアクセスするアプリケーション・モジュール・オブジェクトには、送信JSPページが更新を完了するまで、リザーブ・モードでアクセスする必要があります。JSPページに追加する<jbo:ApplicationModule>
データ・タグのreleasemode
属性が、この動作を制御します。