如何在oracle apex中访问表格形式的数据。我需要基于表格形式的访问数据插入数据。请任何人帮助我解决我的问题
答案 0 :(得分:0)
(function($) {
function update(model) {
var salKey = model.getFieldKey("SAL"),
total = 0;
model.forEach(function(record, index, id) {
var sal = parseInt(record[salKey], 10),
meta = model.getRecordMetadata(id);
if (!isNaN(sal) && !meta.deleted && !meta.agg) {
total += sal;
}
});
$s("P1_TOTAL_AMOUNT", total);
}
$(function() {
$("#emp").on("interactivegridviewmodelcreate", function(event, ui) {
var sid,
model = ui.model;
if ( ui.viewId === "grid" ) {
sid = model.subscribe( {
onChange: function(type, change) {
if ( type === "set" ) {
if (change.field === "SAL" ) {
update( model );
}
} else if (type !== "move" && type !== "metaChange") {
update( model );
}
},
progressView: $("#P1_TOTAL_AMOUNT")
} );
update( model );
model.fetchAll(function() {});
}
});
});
})(apex.jQuery);