JSF/Primefaces - Ajax request sometimes skips JSF phases

假装没事ソ 提交于 2019-12-11 20:13:55

问题


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

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

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 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>

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.


回答1:


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



来源:https://stackoverflow.com/questions/24181315/jsf-primefaces-ajax-request-sometimes-skips-jsf-phases

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!