问题
How can I update an Apex Tabular Form with pl/sql instead of using a multi-row update(MRU), is it even possible?
Thanks in advance.
回答1:
Yes, it is possible. You can delete (or disable) the standard processes such as ApplyMRU, and replace them with your own PL/SQL processes to handle the tabular form arrays something like this:
for i in 1..apex_application.g_f02.count loop
update dept
set dname = apex_application.g_f03(i)
where deptno = apex_application.g_f02(i);
end loop;
However, it isn't simple and there is a fair bit you need to know to get this right, such as:
- How the tabular form columns map to arrays like apex_application.g_f03 (view the page source and look for the names of the controls, e.g. "f03_0001").
- How some item types like checkboxes a work differently to others
- How to perform optimistic locking to prevent lost updates
There used to be a "how to" document on apex.oracle.com that described this in detail, but I haven't been able to locate it recently.
来源:https://stackoverflow.com/questions/3962731/update-apex-tabular-form-with-plsql