JSF / Primefaces - Ajax请求有时会跳过JSF阶段 [英] JSF/Primefaces - Ajax request sometimes skips JSF phases

查看:267
本文介绍了JSF / Primefaces - Ajax请求有时会跳过JSF阶段的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

去过这个问题了一会儿,我有种被卡住。

Been at this problem for a while and I am kind of stuck.

使用:JSF 2.0,Primefaces 3.5,WebLogic Server将10.35,IE 9

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

问题:有时候Ajax请求不能正确处理,您需要点击多次,以获得期望的结果。

Problem: Sometimes ajax request are not processed correctly and you need to click multiple times to get the desired outcome.

当我调试JSF阶段我可以看到,第一阶段后,恢复来看,呈现响应阶段执行跳过更新模型,并调用应用程序阶段。 我有条纹我的应用程序,以最低限度和问题仍然存在。

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. I have striped my application to the bare minimum and the problem still occurs.

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请求faild atempt:

Ajax request faild atempt:

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>

这只能发生在IE9我们的测试环境中,而不是在本地或这使我相信它有事可做与WebLogic Server和它的配置或IE浏览器的开发环境。 但是我在这里的损失,并在那里我可以开始寻找一个解决办法是AP preciated任何帮助。

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. But I am at a loss here and any help on where I could start looking for a solution would be appreciated.

推荐答案

原来,这个问题是IE浏览器和认证。解决了由于这种<一个href="http://blogs.msdn.com/b/ieinternals/archive/2010/11/22/internet-explorer-post-bodies-are-zero-bytes-in-length-when-authentication-challenges-are-expected.aspx"相对=nofollow>帖子

The problem turned out to be IE and authentication. Solved thanks to this post

这篇关于JSF / Primefaces - Ajax请求有时会跳过JSF阶段的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆