This question is a follow - up of the older Language switcher implementation in JSF 2.
The substance of the question is still valid, although PrimeFaces has released
The update="@all"
of all PrimeFaces versions until now (3.4.2) is known to fail in IE. Any JavaScript code delivered along with the ajax response isn't been initialized properly.
This is discussed in this PrimeFaces forum topic and reported as issue 4731.
Until they fix it, your best bet is to workaround it by loading the following piece of JavaScript on every view which (possibly) contains an update="@all"
command:
var originalPrimeFacesAjaxResponseFunction = PrimeFaces.ajax.AjaxResponse;
PrimeFaces.ajax.AjaxResponse = function(responseXML) {
var newViewRoot = $(responseXML.documentElement).find("update[id='javax.faces.ViewRoot']").text();
if (newViewRoot) {
$('head').html(newViewRoot.substring(newViewRoot.indexOf("<head>") + 6, newViewRoot.indexOf("</head>")));
$('body').html(newViewRoot.substring(newViewRoot.indexOf("<body>") + 6, newViewRoot.indexOf("</body>")));
} else {
originalPrimeFacesAjaxResponseFunction.apply(this, arguments);
}
};
Provide this in flavor of a JS file which is loaded by <h:outputScript target="head">
inside the <h:body>
in order to enforce the right loading order.
<h:body>
<h:outputScript name="script.js" target="head" />
...
</h:body>