You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

APEX Cards:如何获取应用所有页面列表并生成动态导航卡片

APEX动态卡片导航列表解决方案

原查询无结果的原因

你使用的apex_application_page_items视图是存储**页面项(如文本框、复选框、按钮)**的系统视图,和导航菜单的列表条目完全无关,因此查询返回空结果是正常的。

正确的动态查询方案

导航菜单的条目通常存储在APEX的列表相关系统视图中,以下分两种场景给出查询:

场景1:导航基于共享组件的「列表(List)」

  1. 先查询目标导航列表的ID(替换成你的导航列表名称):
select list_id, list_name
from apex_application_lists
where application_id = :APP_ID
and list_name = '你的导航列表名称';
  1. 用获取到的list_id查询符合要求的列表条目(排除Admin、Home):
select 
  entry_text as item_name,
  target as item_value
from apex_application_list_entries
where application_id = :APP_ID
and list_id = 12345 -- 替换成上面查到的实际列表ID
and entry_text not in ('Admin', 'Home')
and is_current_for_navigation = 'Y'; -- 仅保留导航用有效条目

场景2:导航基于全局导航栏

如果你的导航是全局导航栏,直接查询全局导航条目视图:

select 
  label as item_name,
  target as item_value
from apex_appl_global_nav_entries
where application_id = :APP_ID
and label not in ('Admin', 'Home')
and is_active = 'Y'; -- 仅保留激活状态的条目

配置动态卡片区域

  1. 在Home页(页面1)创建「卡片」区域
  2. 数据源选择「SQL查询」,粘贴上述对应场景的查询语句
  3. 卡片配置:
    • 标题字段选择ITEM_NAME
    • 链接目标设置为ITEM_VALUE(直接绑定字段即可)
  4. 调整卡片的样式(如颜色、图标),匹配原导航菜单的视觉风格

额外优化建议

  • 如果列表条目有权限控制,可在查询中添加权限校验:
    and apex_util.public_check_authorization(entry_permission_scheme) = 'TRUE'
    
  • 若目标为页面ID,可手动构造标准APEX链接格式:f?p=&APP_ID.:[页面ID]:&APP_SESSION.

内容的提问来源于stack exchange,提问作者Bob Veitch

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.07.10 13:47:27