ビジネス・コンポーネント・データソース内で編集する行を選択するJSPページでは、処理のためにHTTP Requestオブジェクトを介して発行用ページにポストする必要があります。
この操作をアプリケーション・モジュール・インスタンスとビュー・オブジェクトのデータソースに対して実行するには、後述のビジネス・コンポーネント・データ・タグを使用して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>
データ・タグを使用して、必要なビジネス・コンポーネント識別子を渡します。
<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
イベントを使用してビジネス・コンポーネントの<jbo:OnEvent>
データ・タグを追加し、Get
アクションを使用してビジネス・コンポーネントの<jbo:Row>
データ・タグをネストし、編集用ページで指定したのと同じデータソースのHTTP Requestオブジェクトを処理します。
<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
属性により制御されます。
ビジネス・コンポーネント・データ・タグについて
ビジネス・コンポーネント・データ・タグを使用した行の編集について
ビジネス・コンポーネント・フォームのInputデータ・タグについて
ビジネス・コンポーネント・データ・タグについては次のリファレンスを参照してください。
リファレンス: ビジネス・コンポーネント・データ・タグ・ライブラリ
Copyright © 1997, 2006, Oracle. All rights reserved.