Bonjour j'ai un souci avec plusieurs bouton à partir desquels j'appelle des méthodes en ajax, apparemment celle ci ne sont jamais appelée. J'ai ajouter un autre bouton pour tester, lui aussi n'est jamais appelé :

Ma page JSF (form) :
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
                <h:form>
                    <p:commandButton value="Cliquez SVP" update="error-msg" action="#{mobileViewLastTopicsTagManagedBean.action()}"/>
                    <p:growl severity="error" id="error-msg" showDetail="true" showSummary="true" escape="false"/>
                    <div class="align-center">
                        <p:commandButton icon="ui-icon-back" class="inline-block" update="@form" action="#{mobileViewLastTopicsTagManagedBean.initLastTopicsTag(0)}"/>
                        <p:commandButton icon="ui-icon-carat-l" class="inline-block" update="@form" action="#{mobileViewLastTopicsTagManagedBean.initLastTopicsTag(mobileViewLastTopicsTagManagedBean.previousPage)}"/>
                        <p:commandButton icon="ui-icon-carat-r" class="inline-block" update="@form" action="#{mobileViewLastTopicsTagManagedBean.initLastTopicsTag(mobileViewLastTopicsTagManagedBean.nextPage)}"/>
                        <p:commandButton icon="ui-icon-forward" class="inline-block" update="@form" action="#{mobileViewLastTopicsTagManagedBean.initLastTopicsTag(mobileViewLastTopicsTagManagedBean.lastPage)}"/>
                    </div>
                    <br/>
                    <p:dataList id="list" var="topic" value="#{mobileViewLastTopicsTagManagedBean.topics}"
                                first="0">
                        <f:facet name="header">Derniers posts du forum<h:outputText value=" #{mobileViewLastTopicsTagManagedBean.tag.name} Page #{mobileViewLastTopicsTagManagedBean.page+1}"/></f:facet>
                        <p:panel header="#{topic.title}">
                            <br/>
                            <h:outputLink value="#{topic.url}" title="#{topic.title}" class="topicTitle rect-link">
                                <h:outputText value="VOIR LE TOPIC"/>
                            </h:outputLink>
                            <br/>
                            <br/>
                            <br/>
                            <ui:repeat value="#{topic.tags}" var="tag">
                                <a href="#{tag.url}" title="#{tag.name}" class="tag">#{tag.name}</a>
                            </ui:repeat>
                            <br/>
                            <br/>
                            <h:outputText value="#{topic.nbAnswers} intervention(s), Vu : #{topic.views} fois." class="view" />
                            <br/>
                            <h:outputText value="#{topic.presStr}" class="author"/>
                        </p:panel>
                    </p:dataList>
                    <br/>
                    <div class="align-center">
                        <p:commandButton icon="ui-icon-back" class="inline-block" update="@form" action="#{mobileViewLastTopicsTagManagedBean.initLastTopicsTag(0)}"/>
                        <p:commandButton icon="ui-icon-carat-l" class="inline-block" update="@form" action="#{mobileViewLastTopicsTagManagedBean.initLastTopicsTag(mobileViewLastTopicsTagManagedBean.previousPage)}"/>
                        <p:commandButton icon="ui-icon-carat-r" class="inline-block" update="@form" action="#{mobileViewLastTopicsTagManagedBean.initLastTopicsTag(mobileViewLastTopicsTagManagedBean.nextPage)}"/>
                        <p:commandButton icon="ui-icon-forward" class="inline-block" update="@form" action="#{mobileViewLastTopicsTagManagedBean.initLastTopicsTag(mobileViewLastTopicsTagManagedBean.lastPage)}"/>
                    </div>
                </h:form>
Ma methode dans mon ManagedBean
MobileViewLastTopicsTagManagedBean :
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
package beans;
 
import classes.Datas;
import classes.Tag;
import classes.Topics;
import java.io.Serializable;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.logging.Level;
import java.util.logging.Logger;
import javax.annotation.PostConstruct;
import javax.faces.bean.ManagedBean;
import javax.faces.view.ViewScoped;
 
/**
 *
 * @author pj
 */
@ManagedBean
@ViewScoped
public class MobileViewLastTopicsTagManagedBean extends Topics implements Serializable {
 
    /**
     * Creates a new instance of MobileViewLastTopicsTagManagedBean
     */
    public MobileViewLastTopicsTagManagedBean() {
        super();
    }
[...]
    public void action() {
        System.out.println("ça maaaarche !");
        growlError("Salut!", "Ça marche !!");
    }
[...]
}
rien ne s'affiche en console, la méthode n'est jamais appelée.
Pourtant je fait un traitement similaire sur une autre page qui est quasi pareil (a une requête SQL prés) et la ça marche.
Merci.