【发布时间】:2018-04-15 19:15:21
【问题描述】:
这里既不是新手也不是高级 apex 用户,
但是,
我对主要的客户端网络语言非常天真,现在我需要面对它。很快。
我有一个示例 here - 用户:test 和密码 test。
我基于来自here 的完全相同的 jquery 和 javascript 函数,由 Tony Andrews 先生回答。
在我的应用示例中,当 priority 字段发生更改时,它会放入 A 字段 的值,当它不是 0 或 null 时。它只是将该字段中的结果相乘。
我试图在更改优先级字段时从优先级字段中放置更改优先级脚本。例如:当将 id=1 的优先级改为 1 时,id=2 的优先级必须改为 3 - id=1 的原始优先级。
我知道这是一个非常基本的算法,但我不知道如何及时完成,在 javascript 或 jQuery 上调用 apex。我一直在尝试对报告进行更复杂的操作,但我需要先了解基础知识。
为了澄清我的查询报告和javascript执行是:
select distinct
apex_item.checkbox2(10,r.ID) ID,
apex_item.text(11,r.ID) ID_2,
apex_item.text(20,r.PRIORIDADE) PRIORITY,
apex_item.text(30,1) a,
apex_item.SELECT_LIST_FROM_LOV(31,r.PRIORIDADE,'LISTAPRIORIDADES',NULL,'NO') PRIORITY_LOV,
apex_item.text(40,null) b,
(select seq_id from apex_collections c where collection_name = 'COLECAO' AND c001 = r.id
)sequencial
from REPRIORIZA r
order by id;
//javascript execution, on dynamic action:
var target = apex.jQuery(this.triggeringElement).closest('tr').find('input[name="f30"]')
console.log(target)
var source = apex.jQuery(this.triggeringElement).closest('tr').find('input[name="f20"]')
console.log(source)
var result = target.val() * source.val();
target.val(result);
console.log(target)
var target2 = apex.jQuery(this.triggeringElement).closest('tr').find('input[name="f40"]')
console.log(target)
var source2 = apex.jQuery(this.triggeringElement).closest('tr').find('input[name="f11"]')
console.log(source2)
var result2 = source2.val();
target2.val(result2);
问候,
【问题讨论】:
标签: javascript jquery oracle-apex-5.1