After a click on a button, an action is called and create an object after that it must redirect for another application (url) and in the same time do an update for the first page with the new object. Actually i succeed to do redirection but the update doesn't work, Thanks for help.
Controleur.actionBtn
FacesContext.getCurrentInstance().addMessage(FORMULAIRE_ID,
new FacesMessage(FacesMessage.SEVERITY_INFO, "message", "message"));
HttpServletResponse response = (HttpServletResponse) FacesContext.getCurrentInstance().getExternalContext().getResponse();
response.setStatus(HttpServletResponse.SC_MOVED_PERMANENTLY);
response.setHeader("Location", url);
response.sendRedirect(url);
RequestContext.getCurrentInstance().update(FORMULAIRE_ID);
In my page I have :
<p:commandButton id="btn" value="action" target="_blank"
actionListener="#{controleur.actionBtn}"
ajax="false">
</p:commandButton>