[OK]をクリックします。これで、シナリオの実装方法がわかります。あなたが必要とする
物事はそれを動作させるために、次のとおりです。
custom tabular
をするために - あなたが既に持っていること
f03
の値がを変更した場合に待機する
dynamic action
DBから製品の価格をfetchs
on demand process
オンデマンドプロセス
あなたはjQueryのセレクタ:input[name=f03]
にイベントの変更を聞くために持っているコード
declare
v_price number;
begin
select
price
into
v_price
from
products
where
product_id = apex_application.g_x01;
htp.p(v_price);
exception
when others then
htp.p(SQLERRM);
end;
ダイナミックなアクション
以下でgetPrice
という名前のオンデマンド・プロセスに作成します。真のアクションExecute JavaScript Code
で動的アクションを作成します。
実際のアクションでは、on demand process
にajaxコールを送信する必要があります。サンプルコード(作業中)は次のとおりです。
var
xhr2,
self = $(this.triggeringElement),
productId = self.val(),
row = self.closest('tr');
xhr = $.ajax({
url:'wwv_flow.show',
type:'post',
dataType: 'text',
traditional: true,
data: {
p_request: "APPLICATION_PROCESS=getPrice",
p_flow_id: $v('pFlowId'),
p_flow_step_id: $v('pFlowStepId'),
p_instance: $v('pInstance'),
//p_arg_names: [ item_id ],
//p_arg_values: [ itemValue ],
x01: productId
},
success: function(resultData, textStatus, ajaxObj){
//do stuff after fetching product price
row.find(':input[name=f04]').val(resultData)
},
error: function(jqXHR, textStatus, errorThrown){
alert('Error occured while retrieving AJAX data: '+textStatus+"\n"+errorThrown);
}
});
あなたの質問に答えがあります。
ps。 あなたの質問に対する回答であれば、回答を役に立つとマークすることを忘れないでください。