简体   繁体   中英

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

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.

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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