我正在使用ADF (JDeveloper 11.1.2.4)开发web应用程序。我已经创建了一个模板,我有panelGroupLayout。对于这个分组,我设置了一个背景图像,并创建了一个测试。JSF页面。
当我直接运行这个页面时,背景图像正在浏览器中显示。我把这个页面放在一个有界的任务流中。
我的问题是,当我从有界任务流运行此页面时,背景图像没有显示。
正在显示这个URL的图像:
不可靠的本地IPv4 URL"登录"
这个URL没有显示图像:
不可靠的本地IPv4 URL "admin-flow-definition"
<f:facet name="top">
<af:panelGroupLayout id="pt_pgl1" layout="horizontal" valign="top">
<af:panelGroupLayout id="pt_pgl20">
<af:image source="#{resource['images:EasyRUN_Banner_1Part.png']}" shortDesc="EasyRUN Banner "
id="pt_i1"/>
</af:panelGroupLayout>
<af:panelGroupLayout id="pt_pgl21" layout="horizontal"
inlineStyle='background-image:url("ERUnBPart2.png");'>
<af:spacer width="37" height="103" id="pt_s45"/>
</af:panelGroupLayout>
<af:panelGroupLayout id="pt_pgl19" layout="vertical"
inlineStyle='background-repeat:no-repeat; background-image:url("ERUnBPart2.png");'
halign="left">
<af:spacer width="145" height="20" id="pt_s42"/>
<af:outputText value="#{attrs.user}" id="pt_ot1"/>
<af:spacer width="10" height="20" id="pt_s43"/>
<af:commandLink text="Logout" id="pt_cl1"/>
<af:spacer width="100" height="35" id="pt_s44"/>
</af:panelGroupLayout>
</af:panelGroupLayout>
</f:facet>
确保你的图片不在WEB-INF文件夹下,而是在public_html文件夹下。
如果您的图像在文件夹结构下,如:
MyApplication/MyViewController/public_html/images
你的页面可以这样引用:
<af:commandMenuItem [..] icon="../images/GlobalSearch/key.gif"/>