处理表格形式

发布表格形式时,每个记录中的项目可通过“APEX_APPLICATION.G_Fnn”数组用于 PL / SQL 代码。G_F01 对应于第一个可编辑列,G_F02 对应于第二个,依此类推。例如,你可以遍历每个记录并访问每个字段的已发布值,如下所示:

FOR i IN 1..APEX_APPLICATION.G_F01.COUNT LOOP 
  htp.p('Column A row '||I||' has a value of '||APEX_APPLICATION.G_F01(i)); 
  htp.p('Column B row '||I||' has a value of '||APEX_APPLICATION.G_F02(i)); 
END LOOP;

如果第一列是复选框,则只有已选中的复选框才会在数组中包含一个条目:

FOR i IN 1..APEX_APPLICATION.G_F01.COUNT LOOP 
  htp.p('Checkbox on row '||APEX_APPLICATION.G_F01(i)||' was checked');
  htp.p('Column B on that row has a value of '
        ||APEX_APPLICATION.G_F02(APEX_APPLICATION.G_F01(i))); 
END LOOP;