我有Oracle APEX 4.我手动创建了一个表格形式(使用apex_item
包)。它包含三个字段。
select name display, product_id return from products
)在选择产品名称(... f03)后,我想在f04中看到产品的价格。 SQL语句是这样的:
select price from products where product_id = {..from f03}.
如何使用动态动作或javascript函数?
好的,我会给你一个如何实现你的场景的提示。
你需要的是使它工作:
custom tabular
- 你已经拥有它on demand process
听取dynamic action
的价值变化使用以下代码创建名为f03
的按需流程
getPrice
你必须在jQuery选择器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;
上监听事件更改。使用真实动作:input[name=f03]
创建动态动作。
在真正的行动中,你必须对Execute JavaScript Code
进行ajax调用。示例代码(工作)如下:
on demand process
将这些东西放在一起,你就可以回答你的问题。
PS。如果答案是您的问题,请不要忘记将答案标记为有帮助。