好的,我會給你一個提示如何實現你的場景。你需要
事情,使其工作:
custom tabular
爲 - 你已經擁有它
on demand process
是去抓取產品的價格從DB
dynamic action
聽,如果在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;
動力作用
你必須傾聽對jQuery選擇:input[name=f03]
事件變化創建名爲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。 如果回答您的問題,請不要忘記標記爲有幫助。