ADF Faces 11g 在导航到同一页面时会忽略模板
我使用 ADF Faces 11g\JDeveloper 11g 来开发 Web 应用程序,并使用 Weblogic 10.3 来部署它。
当我导航到同一个 JSP 页面时遇到一些问题。
示例:
我有一个使用模板的页面:
<f:view>
<af:document id="d1">
<af:form id="f1">
<af:pageTemplate viewId="/base/templase.jspx" id="pt1">
<f:facet name="body">
(...)
<af:commandButton action="#{listPersons.query}"
text="Search"
id="buttonSeachPersons"/>
(...)
以及支持 bean 中的查询方法:
public void query() {
this.persons = findPersons(filter);
}
它重定向到同一页面,但不包含模板页面内容。
我尝试在查询方法中返回 String 并创建导航,但它不起作用......
有人有任何提示吗?
当它导航到不同的页面时它工作得很好。
I'm using ADF Faces 11g\JDeveloper 11g to develop a web application and using Weblogic 10.3 to deploy it.
I'm having some issues when I navigate to the same JSP page.
Example:
I have a page using a template:
<f:view>
<af:document id="d1">
<af:form id="f1">
<af:pageTemplate viewId="/base/templase.jspx" id="pt1">
<f:facet name="body">
(...)
<af:commandButton action="#{listPersons.query}"
text="Search"
id="buttonSeachPersons"/>
(...)
and the query method in the backing bean:
public void query() {
this.persons = findPersons(filter);
}
It redirects to the same page, but does not includes the template page content.
I tried to return String in the query method and create a navigation, but it did not worked...
Anyone has any tip?
It works fine when it navigates to different pages.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我曾经在重定向回同一页面时遇到过类似的问题。在我的例子中,页面重新加载没有发生,因为(我假设)ADF 请求处理器正在进行一些“优化”,并决定由于需要相同的页面,因此不需要重新加载。我尝试了所有我能想到的方法来尝试强制刷新页面,但没有任何效果。
最后,我通过将导航规则从 adfc-config.xml 移动到 faces-config.xml 解决了我的问题。由于导航规则当时是普通的旧 JSF 规则(而不是 ADF 规则),因此没有进行优化,并且导航更加一致。
I once had similar problems when redirecting back to the same page. In my case the page reload was not occurring because (I assume) the ADF request processor was doing some 'optimization' and deciding that since the the same page was required, that a reload wasn't needed. I tried everything I could think of to try and force a page refresh but nothing worked.
In the end, I solved my problem by moving the navigation rules from the adfc-config.xml into the faces-config.xml. Since the navigation rules were then plain old JSF rules (rather than ADF rules), there was no optimization, and the navigation was then more consistent.