I have this problem, in one page when I click commandButton "editer" it works : it runs the method in managedBean and it returns me to the target page but in this target page I must double click the link button to send me to the other target page, but if I click only the "annuler" button (it only redirect me to the target page without any changes in the database) I don't have this problem
Here is the page that contains "editer" and "annuler" button :
<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:p="http://primefaces.org/ui"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core">
    <body>
        <ui:composition template="./template_admin.xhtml">
            <ui:define name="content">
                    <p:panel header="Edition d'un utilisateur" id="panel" >
                        <h:panelGrid columns="2" columnClasses="column" cellpadding="5">
                            <h:outputText value="Nom : " />  
                            <p:inplace id="basic" emptyLabel="Veuillez saisir un Nom" editor="true" >  
                                <p:inputText value="#{editUserController.u1.nom}" />  
                            </p:inplace> 
                            <h:outputText value="Prénom : " />  
                            <p:inplace id="basic1">  
                                <p:inputText value="#{editUserController.u1.prenom}" />  
                            </p:inplace>  
                            <h:outputText value="Type (Dlbclick): "/>  
                            <p:inplace id="selectableInplace" label="#{editUserController.u1.type}" effectSpeed="fast" event="dblclick">  
                                <p:selectOneMenu label="Type d'impression" id="rfhfbs" value="#{editUserController.u1.type}" required="true" requiredMessage="veuillez choisir un type d'impression" >
                                    <f:selectItems value="#{editUserController.types}" />
                                </p:selectOneMenu>
                            </p:inplace> 
                            <h:outputText value="Division : " />  
                            <p:inplace id="basic2">  
                                <p:inputText value="#{editUserController.u1.division}" />  
                            </p:inplace>  
                            <h:outputText value="Grade : " />  
                            <p:inplace id="basic3">  
                                <p:inputText value="#{editUserController.u1.grade}" />  
                            </p:inplace>  
                            <h:outputText value="Téléphone du poste : " />  
                            <p:inplace id="basic4">  
                                <p:inputText value="#{editUserController.u1.telPoste}" />  
                            </p:inplace>  
                            <h:outputText value="Email : " />  
                            <p:inplace id="basic5">  
                                <p:inputText value="#{editUserController.u1.email}" />  
                            </p:inplace>  
                            <h:outputText value="Autres : " />  
                            <p:inplace id="basic6">  
                                <p:inputText value="#{editUserController.u1.autres}" />  
                            </p:inplace>  
                            <h:outputText value="Identifiant : " />  
                            <p:inplace id="basic7">  
                                <p:inputText value="#{editUserController.u1.identifiant}" />  
                            </p:inplace>  
                            <h:outputText value="Mot de passe : " />  
                            <p:inplace id="basic8">  
                                <p:inputText value="#{editUserController.u1.motdepasse}" />  
                            </p:inplace>  
                            <h:outputText value="Retapez le Mot de passe : " />  
                            <p:inplace id="basic9">  
                                <p:inputText value="#{editUserController.u1.motdepasse}" />  
                            </p:inplace>
                        </h:panelGrid>  
                        <p:commandButton value="Editer"  action="#{editUserController.updateUser()}" update="panel" ></p:commandButton>
                        <p:commandButton value="Annuler" action="utilisateurs" ajax="false" ></p:commandButton>
                    </p:panel>  
            </ui:define>
        </ui:composition>
    </body>
</html>
This above works well
Here is the target page in both cases:
<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:p="http://primefaces.org/ui"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:h="http://java.sun.com/jsf/html">
    <body>
        <ui:composition template="./template_admin.xhtml">
            <ui:define name="content">
                    <p:commandButton value="ajouter" style="margin-bottom: 20px;" />
                    <p:dataTable id="carsTable" var="car" value="#{utilisateursController.lu}">  
                        <f:facet name="header">  
                            Expand rows to see detailed information  
                        </f:facet>  
                        <p:column style="width:4%">  
                            <p:rowToggler />  
                        </p:column>  
                        <p:column style="width:48%">  
                            <f:facet name="header">  
                                Id  
                            </f:facet>  
                            <h:outputText value="#{car.id}" />  
                        </p:column>  
                        <p:column style="width:48%">  
                            <f:facet name="header">  
                                Nom et prénom
                            </f:facet>  
                            <h:outputText value="#{car.nom}   #{car.prenom}" />  
                        </p:column>  
                        <p:column>
                            <p:commandLink ajax="false" value="Editer" action="updateUser_v1" >
                                <f:setPropertyActionListener value="#{car}" target="#{editUserController.u1}" />  
                            </p:commandLink>
                        </p:column>
                        <p:column>
                            <p:commandLink value="supprimer"  />
                        </p:column>            
                        <p:rowExpansion>  
                            <h:panelGrid id="display" columns="2" cellpadding="4" style="width:300px;"  
                                         styleClass=" ui-widget-content grid">  
                                <h:outputText value="Division : " />  
                                <h:outputText id="model" value="#{car.division}" />  
                                <h:outputText value="Grade : " />  
                                <h:outputText id="year" value="#{car.grade}" /> 
                                <h:outputText value="Type : " />  
                                <h:outputText value="#{car.type}"/>  
                                <h:outputText value="Télephone du poste : " />  
                                <h:outputText value="#{car.telPoste}"/>  
                                <h:outputText value="Email : " />  
                                <h:outputText value="#{car.email}"/>  
                                <h:outputText value="Autres : " />  
                                <h:outputText value="#{car.autres}"/>  
                                <h:outputText value="Identifiant : " />  
                                <h:outputText value="#{car.identifiant}"/>  
                                <h:outputText value="Mot de passe : " />  
                                <h:outputText value="#{car.motdepasse}"/>  
                            </h:panelGrid>  
                            <h:commandLink value="liste des commandes" ></h:commandLink><br></br>
                            <h:commandLink value="liste des messages" ></h:commandLink>
                        </p:rowExpansion>  
                    </p:dataTable>  
            </ui:define>
        </ui:composition>
    </body>
</html>
In this page just above I have the problem
And here is all managedBean :
@ManagedBean
@ViewScoped
public class utilisateursController  implements Serializable{
    utilisateursHelper uh;
    List<Utilisateur> lu;
    public List<Utilisateur> getLu() {
        return lu;
    }
    /**
     * Creates a new instance of utilisateurs
     */
    public utilisateursController() {
        uh = new utilisateursHelper();
        lu = uh.getUtilisateurs();
    }
}
And here is the other managedBean :
@ManagedBean
@SessionScoped
public class editUserController implements Serializable{
    utilisateursHelper uh;
    Utilisateur u1;
    String[] Types = {"utilisateur", "operateur", "admin"};
    public String[] getTypes() {
        return Types;
    }
    public Utilisateur getU1() {
        return u1;
    }
    public void setU1(Utilisateur u1) {
        this.u1 = u1;
    }
    /**
     * Creates a new instance of editUserController
     */
    public editUserController() {
        u1 = new Utilisateur();
        uh = new utilisateursHelper();
    }
    public String updateUser() {
        uh.updateUtilisateur(u1);
        return "utilisateurs";
    }
}
And here is the facelet template :
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:p="http://primefaces.org/ui"
      xmlns:ui="http://java.sun.com/jsf/facelets">
    <h:head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
        <h:outputStylesheet name="style.css" library="css" />
        <h:outputStylesheet name="styleTableExpansion.css" library="css" />
    </h:head>
    <h:body>
        <div id="page">
            <div id="bloc-principal">
                 <h:form prependId="false">
                 <div id="templatemo_header_wrapper">
                    <div id="templatemo_header">
                        <div id="site_title">
                            <h1>
                                <span>vous etes connect en tant qu' #{userController.u1.nom} mais le newNum #{commmandeController.nouvelId}</span>
                            </h1>
                        </div>
                        <ul class="social_network">
                            <li><a id="ident">1dd</a></li>
                            <li><a href="login.xhtml" class="identifiant">on voie celle ci</a></li>
                            <li><a class="identifiant">#{userController.identifiant}2ddd</a></li>
                            <li><h:commandLink action="#{userController.deconnecter}"><h:graphicImage library="images" name="facebook.png" /></h:commandLink></li>
                        </ul>
                    </div> <!-- end of templatemo_header -->
                </div> <!-- end of templatemo_header_wrapper -->   
                <div id="templatemo_banner_wrapper">
                    <div id="templatemo_banner">
                    </div> <!-- end of templatemo_banner -->
                </div> <!-- end of templatemo_banner_wrapper -->
                <div id="templatemo_content_wrapper">
                    <div id="templatemo_content">
                         <ui:insert name="content">content</ui:insert>
                    </div> <!-- end of templatemo_content -->
                </div> <!-- end of templatemo_content_wrapper -->    
                </h:form>
            </div>
            <div id="templatemo_footer_wrapper">
                <div id="templatemo_footer">
                    <center>
                    </center>
                </div> <!-- end of footer -->
            </div>
        </div>
    </h:body>
</html>
I hope I have explained well my problem. Thank you in advance.