oracle - 根据 Oracle APEX 4.0 中的项目更改页面标题

标签 oracle oracle-apex

在 Oracle APEX 4.0 中,我有一个客户数据库,我希望将页面标题更改为我选择编辑的客户的名称。我这样输入标题: /image/Bo0cy.png

但是,该选项卡显示如下: /image/Z41H4.jpg

我做错了什么?

最佳答案

使用替换字符串设置变量 Apex 页面属性

This solution was developed on a system hosted by Oracle Corp. at apex.oracle.com, where the APEX (Oracle Application Express) version is currently 4.2.5. Although the OP is requesting advice for release 4.0, the functionality requested has been possible since the late 3.x versions of Apex through to the present.

此解决方案使用 substitution strings 。任何应用程序项或页面项都可以通过替换字符串引用。任何以与号 (&) 开头、以点 (.) 结尾、并且其间包含项目名称(全部大写字母)的字符串都将被解释为替换字符串,并将被替换为当前项目中的值。 session /上下文。

这很有用,因为可以通过 PL/SQL 代码、SQL 查询和用户输入来操作引用项的值。

替换字符串表示法:

您可以引用页面项PX_SAMPLE_ITEM与替换字符串 &PX_SAMPLE_ITEM. .

需要注意的是,末尾的点是必需的。

设置可变页面标题

这是可以设置可变应用程序 ITEM 的地方(页面标题属性):

Variable Page Title Set Up

下面是几个屏幕截图,其中我使用了页面级项目,定义为变量 SELECT LIST 表单元素。选择列表项还有一个 REDIRECT设置属性,以便每次选择或更改新值时页面都会自动刷新并更新页面标题属性。

Variable Page Title Property Example One

Variable Page Title Property Example Two

验证页面配置和设置

如果您在创建页面及其内容时从第一遍开始工作时遇到任何困难,请验证以下设置摘要:

  1. 请注意,在应用程序的 View 中,PAGE 11是包含我的可变页面标题值示例的页面。

Application Layout of Pages

  • 深入查看第 11 页的布局属性。P11_PAGE_TITLE是包含您想要的页面标题的任何内容的存储桶。这可以是静态定义、用户选择的结果等。请确保创建此项目并在页面标题定义部分中引用它时使用相同的名称(在下面的部分/步骤 3 中突出显示)
  • Individual Apex Application Page Definition

  • 注意圆圈区域。这些是需要上面步骤 2 中提到的页面项目的定义/引用的字段。第一个字段“页面名称”不如第二个字段重要,第二个字段是“页面显示”属性的一部分。我填写了两者,但您可能只需要后者。
  • Substitution Value Placement Within Page Attributes

    打开 Display Attributes > Title 的项目帮助文本属性,内联文档说无论插入到 TITLE 中,字段放在 <TITLE></TITLE> 内渲染页面 HTML 代码块:

    More Page Title Definition Detail: Help Text

    对此解决方案版本兼容性的扩展讨论

    我无法确定该方法仍然有效的确切版本,如上所述。我在下面做了一些注释,以回应 OP 作者 @MNT 关于保持其实例及其 Apex 版本最新的评论。

    No problem @MNT, I mentioned possible compatibility between the method tried in 4.25 (my solution) and 4.00 (your version), but keep in mind, the gap in time between these versions is probably more than two years of upgrades and also a jump between backend databases versions (Oracle 10g to Oracle 11g R1... and even 11g R2) Lots has happened. I suppose that isn't very assuring from your situation, but consider upgrading. All APEX patch and release upgrades are free and it's important to keep up.

    Why It's important to keep up your upgrades and patch sets (an example) The hop from 4.20 to 4.25 alone (from my experience) was an arduous one as actual internal columns were dropped and index keys disappeared... rendering my repository of exported scripts useless. Make sure you leave yourself a back door or a sound upgrade plan (if you have existing applications) for that kind of event. Once you upgrade, there really is no going back :(

    关于oracle - 根据 Oracle APEX 4.0 中的项目更改页面标题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24659852/

    相关文章:

    oracle - 来自 Oracle 的 Lucene 索引 :ORA-01652: unable to extend temp segment

    oracle - 创建返回 XML 和 JSON 的 Oracle APEX Restful 服务

    java - 如何将字符从 Oracle 编码为 XML?

    sql - Oracle - 可以使用 concat 进行子查询吗?

    sql - Oracle MERGE NOT MATCHED THEN UPDATE 可能吗?

    javascript - 循环遍历 oracle apex 中的列

    javascript - 动态选中/取消选中复选框

    session 状态值导致的 Oracle Apex 性能问题

    javascript - 使用 jQuery 检测选择字段的选项值的变化

    sql - 将过滤条件放在 join on 语句中是否等效?