更新时间:2022-10-14 20:20:32
一个模拟的场景是定义的页面项放置在Page TITLE
字段中,但值当页面运行时不会显示。
排除更明显开发人员错误,如拼写错误或应用不一致的页面项目名称,可能根本没有任何错误...除了自定义应用程序模板/主题已经排除或意外地将必要的html块从其定义中删除:
< TITLE>< / TITLE>
。通过查看SHARED COMPONENTS
部分中定义的应用程序主题或模板,可以轻松搜索和确认。
<!DOCTYPE html PUBLIC - // W3C // DTD HTML 4.01 Transitional // EN>
< head>
#HEAD#
< title>#TITLE#< / title>
< / head>
< body#ONLOAD#>#FORM_OPEN#< a name =PAGETOP>< / a>
请注意以下行: < title>#TITLE#< ; / title>>
,没有它,如果使用这个模板,将不会有页面标题。为了验证,模板脚本/ html被重写并且该行被删除。结果:
修改页面模板
将修改后的页面模板关联到Apex Page
设置页面项目的值与页面标题相关
尝试为与页面标题相关联的页面项目设置备用值。 无论对关联的页面项设置了什么值,TITLE的页面属性都不会填充(请参阅与演示页面关联的标签标题)。 如果问题不在自定义模板,或者如果选择的模板是默认模板或Oracle标准模板,还有其他注意事项: 这是破损Apex页面的设计布局,其中HTML TITLE属性由存在于同一页面上的页面级项目定义:
在寻找应用程序设计中已定义的缺失属性时,可以首先查看页面模板和输出渲染过程。 使用替代页面设置HTML
TITLE
页面属性
& P12_PAGE_TITLE。
。如果页面项目 SOURCE
值显式设置为title,这不起作用。我通过使用在另一页上设置的计算
操作来设置项目 P12_PAGE_TITLE
,从而找到了一个可行的解决方案。 / p>
这是testing外部页面的布局,它在前设置 P12_PAGE_TITLE
项目值 em>目标页面被重定向,并呈现TITLE html属性。
P14_PICK_PAGE_TITLE
P14_SUBMIT_TITLE_CHOICE
,其中 SUBMIT
动作。 COMPUTATION
设计 AFTER SUBMIT
传输在测试页上输入的值(P14),并在目标页面P12上设置该值。 action被定义为运行 AFTER PROCESSING
(以及 AFTER COMPUTATIONS
和 AFTER SUBMIT
)
BRANCH
这是结果:
在替代页面上设计的用于收集指定页面标题的表单。 b
这是基于存储在在最终目标页面的TITLE SELECTION区域中显示的只显示页面项目。
其他讨论: COMPUTATION
字段可以帮助确保在其他页面呈现活动之前为页面级别的项目分配其值。否则,只有在大部分页面被渲染后才会读取源或分配的数据值。
当 >分配/设置页面项目值与放入其中的数据值一样重要。
This is a follow-up to a discussion originating from another oracle-apex tagged SO question where the author could not customize their Apex page with a variable TITLE
value (the equivalent to setting the html <TITLE></TITLE>
definition block).
The accepted solution posted under: Changing Page Title Based on an Item suggests that using an "Apex substitution value" in the appropriate field should accomplish this:
If any value is set for the TITLE
page property (substitution values, static literals, etc.), what can cause the setting not to display?
A mocked up scenario would be where a defined page item is placed in the Page TITLE
field, but the value does not show up when the page is "run".
Excluding more obvious developer errors such as misspelled or inconsistently applied page item names, it is possible that there is nothing wrong at all... except that a custom application template/theme has excluded or accidentally left out the necessary html block from its definition:
<TITLE></TITLE>
. This is easily searchable and confirmed by viewing the Application Theme or Template defined under theSHARED COMPONENTS
section.
Applying a custom PAGE typed template to an example where the page title does not display, we get an original templated html script, complete with placeholders for all the input data values that are a part of the output display:
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<head>
#HEAD#
<title>#TITLE#</title>
</head>
<body #ONLOAD#>#FORM_OPEN#<a name="PAGETOP"></a>
Note the line: <title>#TITLE#</title>
, without it, there would be no page title if this template were used. To verify, the template script/html is rewritten and the line is deleted. The result:
Modifying a Page Template
Associating the Modified Page Template to the Apex Page
Setting the Value for the Page Item Associated with the page title.
Trying to Set an alternate Value for the Page Item Associated with the page title.
No matter what value is set to the associated page item, the page attribute of "TITLE" does not populate (see the title of the tab associated with the demo pages).
Page templates and output rendering processes are possible places to look first when troubleshooting a missing attribute already defined within the application design.
TITLE
Page PropertyIf the problem is not with a custom template or if the template selected is a default or Oracle "standard" template, there are other considerations:
This is the design layout of a "broken" Apex page where the html TITLE property is defined by a page level item that exists on the same page:
&P12_PAGE_TITLE.
.P12_PAGE_TITLE
is defined as a Display Only type.If the page item SOURCE
value is set to the "title" explicitly, this does not work. I figured out a working solution by setting the item, P12_PAGE_TITLE
by using a COMPUTATION
operation set up on another page.
This is the layout of the "testing" external page that sets the P12_PAGE_TITLE
item value before the target page is redirected and the TITLE html property is rendered.
P14_PICK_PAGE_TITLE
P14_SUBMIT_TITLE_CHOICE
with a SUBMIT
action.COMPUTATION
designed AFTER SUBMIT
transfers the value entered on the test page (P14) and sets the value on the target page, P12.BRANCH
action is defined to run AFTER PROCESSING
(as well as AFTER COMPUTATIONS
and AFTER SUBMIT
)BRANCH
action is set to trigger when the button defined in step (2) is selected.This is the result:
The form designed on an alternate page for collecting the designated page title.
This is the target page based on the selected title stored in the display-only page item displayed in the TITLE SELECTION region of the final target page.
Additional Discussion: COMPUTATION
fields can assist with ensuring that page level items are assigned their value in advance of other page rendering activities. Otherwise, the source or assigned data value is not read until after most of the page has been rendered.
When a page item value is assigned/set is just as important as the data value put into it.