OK, ich gebe Ihnen einen Hinweis, wie Sie Ihr Szenario implementieren.
Dinge, die Sie brauchen, sind, damit es funktioniert:
custom tabular
für - Sie können es bereits
on demand process
, die von Preis des Produkts fetchs db
dynamic action
zu hören, wenn der Wert in f03
geändert
auf Anfrage Prozess
erstellen auf Anfrage Prozess namens getPrice
mit Code folgenden
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;
dynamische Aktion
Sie haben Ereignis Änderung auf jQuery-Selektor :input[name=f03]
hört. Erstellen Sie dynamische Aktion mit True Action Execute JavaScript Code
.
Innerhalb der richtigen Aktion müssen Sie Ajax Anruf an on demand process
tun. Der Beispielcode (funktioniert) ist unten:
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);
}
});
Setzen Sie die Sachen zusammen und Sie werden Antwort auf Ihre Frage haben.
Ps. Vergessen Sie nicht, die Antwort als hilfreich zu markieren, wenn es sich um eine Antwort auf Ihre Frage handelt.