[英]ADF Faces 11g ignores the template when it navigates to the same page
I'm using ADF Faces 11g\\JDeveloper 11g to develop a web application and using Weblogic 10.3 to deploy it. 我正在使用ADF Faces 11g \\ JDeveloper 11g开发一个Web应用程序,并使用Weblogic 10.3对其进行部署。
I'm having some issues when I navigate to the same JSP page. 导航到同一JSP页面时遇到一些问题。
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: 以及后台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... 我试图在查询方法中返回String并创建导航,但是它没有用...
Anyone has any tip? 有人有小费吗?
It works fine when it navigates to different pages. 导航到其他页面时,它工作正常。
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.
在我的情况下,没有发生页面重新加载,因为(我假设)ADF请求处理器正在进行一些“优化”,并确定由于需要相同的页面,因此不需要重新加载。 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. 最后,我将导航规则从adfc-config.xml移到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.
由于导航规则当时是普通的旧JSF规则(而不是ADF规则),因此没有优化,因此导航更加一致。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.