简体   繁体   English

JSF / Primefaces-Ajax请求有时会跳过JSF阶段

[英]JSF/Primefaces - Ajax request sometimes skips JSF phases

Been at this problem for a while and I am kind of stuck. 在这个问题上待了一段时间,我有点卡住了。

Using: JSF 2.0, Primefaces 3.5, Weblogic Server 10.35, IE 9 使用:JSF 2.0,Primefaces 3.5,Weblogic Server 10.35,IE 9

Problem: Sometimes ajax request are not processed correctly and you need to click multiple times to get the desired outcome. 问题:有时ajax请求未正确处理,您需要多次单击才能获得所需的结果。

When I debug JSF phases I can see that after phase 1, restore view, the render response phase is executed skipping update model and the invoke application phase. 当我调试JSF阶段时,我可以看到在阶段1(还原视图)之后,渲染响应阶段是跳过更新模型和调用应用程序阶段而执行的。 I have striped my application to the bare minimum and the problem still occurs. 我已经将我的应用程序最小化,问题仍然存在。

xhtml: xhtml:

<h:form id="searchForm" >
    <p:commandLink id="searchLink" 
        value="#{message['menu.search']}"
        actionListener="#{searchController.search}"
        update=":searchForm:searchContainer"/>

    <h:panelGroup id="searchContainer" layout="block">
            <h:outputText value="#{searchForm.searchResult}" />
    </h:panelGroup>
</h:form>

Ajax request faild atempt: Ajax请求失败失败:

Request 
javax.faces.partial.ajax=true&javax.faces.source=searchForm%3AsearchLink&javax.faces.partial.execute=%40all&javax.faces.partial.render=searchForm%3AsearchContainer&searchForm%3AsearchLink=searchForm%3AsearchLink&searchForm=searchForm&javax.faces.ViewState=-2472092625767957060%3A2001152572050371116

Response:
<?xml version='1.0' encoding='UTF-8'?>
<partial-response><changes><update id="javax.faces.ViewState"><![CDATA[3781425509483626748:3390680605459134566]]></update></changes></partial-response>

This only occurs in our test environments in IE9 and not locally or dev environment which leads me to believe it has something to do with the weblogic server and how it is configured or IE. 这仅在我们在IE9中的测试环境中发生,而不在本地或开发环境中发生,这使我相信它与weblogic服务器以及它的配置或IE有关。 But I am at a loss here and any help on where I could start looking for a solution would be appreciated. 但是我在这里茫然无措,在我可以开始寻找解决方案的任何帮助将不胜感激。

The problem turned out to be IE and authentication. 问题原来是IE和身份验证。 Solved thanks to this post 解决了这个帖子

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM