Bonsoir, je me suis mis à primefaces 3 concernant le jeu de composants qui m'a l'air bien fourni et bien écrit.

J'ai commencé à bricoler un truc pour tester tout ça, mais comme dit dans le titre, j'ai un premier <p:commandButton qui fonctionne, et qui me permet d'initialiser mes objets dans ma base, un autre est destiné à enregistrer les gruopes de l'utilisateur sélectionné, le code ne réalise pas la sauvegarde mais j'affiche un retour dans le log pour débuger, mais la méthode n'est jamais atteinte... et je tourne en rond
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
public void groupListSaveBtnAction() {
        log.trace("groupListSaveBtnAtion ...");
        JsfUtil.addInfoMessage("INFO", "Group list saved");
        //force reload user's groups in database
        log.trace("force load user's group in database (groupes = null)");
        groupes = null;
    }
Le code est simple, j'affiche la liste des utilisateurs, j'en sélectionne un, update auto qui affiche un <p:picklist avec les groupes de l'utilisateur. On modifie les groupes et on clique sur Save, qui est le 2eme ^<p:commandButton, il est bien dans un formulaire, il me semble bien écrit mais dans le log que j'ai détaillé, l'action n'est jamais déclenchée.
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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
      <h:form id="userListForm">
            <p:panel id="userListPanel" style="width:640px">
                <p:dataTable value="#{utilisateurBean.userList}" var="user" style="width:340px" 
                             selection="#{utilisateurBean.selectedUser}" selectionMode="single"
                             rowEditListener="#{utilisateurBean.indexRowEditListener}" 
                             onRowEditUpdate="growl"
                             rowSelectListener="#{utilisateurBean.indexRowSelectListener}"
                             onRowSelectUpdate="userGroupForm growl"
                             rowUnselectListener="#{utilisateurBean.indexRowUnselectListener}"
                             onRowUnselectUpdate="userGroupForm growl">
 
                    <f:facet name="header">
                        In-Cell Editing
                    </f:facet>
 
                    <p:column headerText="Login" style="width:80px">
                        <h:outputText value="#{user.login}"/>
                    </p:column>
 
                    <p:column headerText="Password" style="width:80px">
                        <p:cellEditor>
                            <f:facet name="output">
                                <h:outputText value="#{user.password}"/>
                            </f:facet>
                            <f:facet name="input">
                                <p:inputText value="#{user.password}" style="width:100%"/>
                            </f:facet>
                        </p:cellEditor>
                    </p:column>
 
                    <p:column headerText="Roles" style="width:80px">
                        <ui:repeat value="#{user.groupes}" var="groupe">
                            <h:outputText value="#{groupe.groupName}" />
                            <br />
                        </ui:repeat>
                    </p:column>
 
 
                    <p:column headerText="Options" style="width:20px">
                        <p:rowEditor />
                    </p:column>
 
                    <f:facet name="footer">
                        footer
                    </f:facet>
 
                </p:dataTable>
            </p:panel>
        </h:form>
        <br />
        <h:form id="userGroupForm" >
            <p:panel id="userGroupListPanel" style="width:640px" rendered="#{utilisateurBean.selectedUser!=null}">
                <p:pickList id="userGroupPickList" value="#{utilisateurBean.groupes}" 
                            var="groupe" 
                            itemLabel="#{groupe.groupNameString}" 
                            itemValue="#{groupe.groupNameString}" 
 
                            >
                    <f:facet name="sourceCaption">Others roles</f:facet>
                    <f:facet name="targetCaption">User's roles</f:facet>
                </p:pickList>
                <p:commandButton value="Save" update="userGroupForm:userGroupListPanel growl" action="#{utilisateurBean.groupListSaveBtnAction}" />
 
 
 
            </p:panel>
        </h:form>
Voici un bout du log qui décrit ce qui se passe, quand je clique sur Save il déclenche 4 fois getSelectedUser et une dizaine de fois getUser, mais pas mon action groupListSaveBtnAction.
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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
INFO: 22:06:48.899 DEBUG [http-thread-pool-8080(5)] fr.espheria.bean.UserBean                - getUser ...
INFO: 22:06:48.950 TRACE [http-thread-pool-8080(5)] fr.espheria.bean.UtilisateurBean         - getSelectedUser !
INFO: 22:06:48.950 TRACE [http-thread-pool-8080(5)] fr.espheria.bean.UtilisateurBean         - getUserList ...
INFO: 22:06:48.950 DEBUG [http-thread-pool-8080(5)] fr.espheria.ejb.UtilisateurManager       - findEntities : fr.espheria.domain.Utilisateur ...
INFO: 22:06:48.960 DEBUG [http-thread-pool-8080(5)] fr.espheria.ejb.UtilisateurManager       - findEntities : fr.espheria.domain.Utilisateur SUCCESSFUL
INFO: 22:06:48.960 TRACE [http-thread-pool-8080(5)] fr.espheria.bean.UtilisateurBean         - getUserList DONE
INFO: 22:06:48.993 TRACE [http-thread-pool-8080(5)] fr.espheria.bean.UtilisateurBean         - getSelectedUser !
INFO: 22:06:48.993 DEBUG [http-thread-pool-8080(5)] fr.espheria.bean.UserBean                - getUser ...
INFO: 22:06:48.993 DEBUG [http-thread-pool-8080(5)] fr.espheria.bean.UserBean                - getUser ...
INFO: 22:06:49.003 DEBUG [http-thread-pool-8080(5)] fr.espheria.bean.UserBean                - getUser ...
INFO: 22:06:49.003 DEBUG [http-thread-pool-8080(5)] fr.espheria.bean.UserBean                - getUser ...
INFO: 22:06:49.014 DEBUG [http-thread-pool-8080(5)] fr.espheria.bean.UserBean                - getUser ...
INFO: 22:06:49.016 DEBUG [http-thread-pool-8080(5)] fr.espheria.bean.UserBean                - getUser ...
INFO: 22:06:49.016 DEBUG [http-thread-pool-8080(5)] fr.espheria.bean.UserBean                - getUser ...
INFO: 22:06:49.016 DEBUG [http-thread-pool-8080(5)] fr.espheria.bean.UserBean                - getUser ...
INFO: 22:06:49.027 DEBUG [http-thread-pool-8080(5)] fr.espheria.bean.UserBean                - getUser ...
INFO: 22:06:49.028 DEBUG [http-thread-pool-8080(5)] fr.espheria.bean.UserBean                - getUser ...
INFO: 22:06:49.028 DEBUG [http-thread-pool-8080(5)] fr.espheria.bean.UserBean                - getUser ...
INFO: 22:06:49.039 DEBUG [http-thread-pool-8080(5)] fr.espheria.bean.UserBean                - getUser ...
INFO: 22:07:03.032 DEBUG [http-thread-pool-8080(4)] fr.espheria.bean.UserBean                - getUser ...
INFO: 22:07:03.042 TRACE [http-thread-pool-8080(4)] fr.espheria.bean.UtilisateurBean         - getUserList ...
INFO: 22:07:03.042 DEBUG [http-thread-pool-8080(4)] fr.espheria.ejb.UtilisateurManager       - findEntities : fr.espheria.domain.Utilisateur ...
INFO: 22:07:03.052 DEBUG [http-thread-pool-8080(4)] fr.espheria.ejb.UtilisateurManager       - findEntities : fr.espheria.domain.Utilisateur SUCCESSFUL
INFO: 22:07:03.052 TRACE [http-thread-pool-8080(4)] fr.espheria.bean.UtilisateurBean         - getUserList DONE
INFO: 22:07:03.063 TRACE [http-thread-pool-8080(4)] fr.espheria.bean.UtilisateurBean         - getUserList ...
INFO: 22:07:03.064 TRACE [http-thread-pool-8080(4)] fr.espheria.bean.UtilisateurBean         - getUserList DONE
INFO: 22:07:03.064 TRACE [http-thread-pool-8080(4)] fr.espheria.bean.UtilisateurBean         - getUserList ...
INFO: 22:07:03.075 TRACE [http-thread-pool-8080(4)] fr.espheria.bean.UtilisateurBean         - getUserList DONE
INFO: 22:07:03.076 TRACE [http-thread-pool-8080(4)] fr.espheria.bean.UtilisateurBean         - getUserList ...
INFO: 22:07:03.096 TRACE [http-thread-pool-8080(4)] fr.espheria.bean.UtilisateurBean         - getUserList DONE
INFO: 22:07:03.096 TRACE [http-thread-pool-8080(4)] fr.espheria.bean.UtilisateurBean         - getUserList ...
INFO: 22:07:03.107 TRACE [http-thread-pool-8080(4)] fr.espheria.bean.UtilisateurBean         - getUserList DONE
INFO: 22:07:03.108 TRACE [http-thread-pool-8080(4)] fr.espheria.bean.UtilisateurBean         - getUserList ...
INFO: 22:07:03.108 TRACE [http-thread-pool-8080(4)] fr.espheria.bean.UtilisateurBean         - getUserList DONE
INFO: 22:07:03.119 TRACE [http-thread-pool-8080(4)] fr.espheria.bean.UtilisateurBean         - getUserList ...
INFO: 22:07:03.121 TRACE [http-thread-pool-8080(4)] fr.espheria.bean.UtilisateurBean         - getUserList DONE
INFO: 22:07:03.121 TRACE [http-thread-pool-8080(4)] fr.espheria.bean.UtilisateurBean         - getUserList ...
INFO: 22:07:03.131 TRACE [http-thread-pool-8080(4)] fr.espheria.bean.UtilisateurBean         - getUserList DONE
INFO: 22:07:03.131 TRACE [http-thread-pool-8080(4)] fr.espheria.bean.UtilisateurBean         - getUserList ...
INFO: 22:07:03.143 TRACE [http-thread-pool-8080(4)] fr.espheria.bean.UtilisateurBean         - getUserList DONE
INFO: 22:07:03.143 TRACE [http-thread-pool-8080(4)] fr.espheria.bean.UtilisateurBean         - getUserList ...
INFO: 22:07:03.153 TRACE [http-thread-pool-8080(4)] fr.espheria.bean.UtilisateurBean         - getUserList DONE
INFO: 22:07:03.153 TRACE [http-thread-pool-8080(4)] fr.espheria.bean.UtilisateurBean         - getUserList ...
INFO: 22:07:03.164 TRACE [http-thread-pool-8080(4)] fr.espheria.bean.UtilisateurBean         - getUserList DONE
INFO: 22:07:03.165 TRACE [http-thread-pool-8080(4)] fr.espheria.bean.UtilisateurBean         - getUserList ...
INFO: 22:07:03.165 TRACE [http-thread-pool-8080(4)] fr.espheria.bean.UtilisateurBean         - getUserList DONE
INFO: 22:07:03.177 TRACE [http-thread-pool-8080(4)] fr.espheria.bean.UtilisateurBean         - getUserList ...
INFO: 22:07:03.177 TRACE [http-thread-pool-8080(4)] fr.espheria.bean.UtilisateurBean         - getUserList DONE
INFO: 22:07:03.177 TRACE [http-thread-pool-8080(4)] fr.espheria.bean.UtilisateurBean         - getUserList ...
INFO: 22:07:03.188 TRACE [http-thread-pool-8080(4)] fr.espheria.bean.UtilisateurBean         - getUserList DONE
INFO: 22:07:03.190 TRACE [http-thread-pool-8080(4)] fr.espheria.bean.UtilisateurBean         - getUserList ...
INFO: 22:07:03.190 TRACE [http-thread-pool-8080(4)] fr.espheria.bean.UtilisateurBean         - getUserList DONE
INFO: 22:07:03.190 TRACE [http-thread-pool-8080(4)] fr.espheria.bean.UtilisateurBean         - getUserList ...
INFO: 22:07:03.201 TRACE [http-thread-pool-8080(4)] fr.espheria.bean.UtilisateurBean         - getUserList DONE
INFO: 22:07:03.202 TRACE [http-thread-pool-8080(4)] fr.espheria.bean.UtilisateurBean         - setSelectedUser ...
INFO: 22:07:03.202 TRACE [http-thread-pool-8080(4)] fr.espheria.bean.UtilisateurBean         - setSelectedUser DONE
INFO: 22:07:03.213 TRACE [http-thread-pool-8080(4)] fr.espheria.bean.UtilisateurBean         - getUserList ...
INFO: 22:07:03.215 TRACE [http-thread-pool-8080(4)] fr.espheria.bean.UtilisateurBean         - getUserList DONE
INFO: 22:07:03.215 TRACE [http-thread-pool-8080(4)] fr.espheria.bean.UtilisateurBean         - getUserList ...
INFO: 22:07:03.225 TRACE [http-thread-pool-8080(4)] fr.espheria.bean.UtilisateurBean         - getUserList DONE
INFO: 22:07:03.225 TRACE [http-thread-pool-8080(4)] fr.espheria.bean.UtilisateurBean         - indexRowSelectListener ...
INFO: 22:07:03.236 TRACE [http-thread-pool-8080(4)] fr.espheria.bean.UtilisateurBean         - loadGroupOfSelectedUser ...
INFO: 22:07:03.237 TRACE [http-thread-pool-8080(4)] fr.espheria.bean.UtilisateurBean         - selectedUser != null
INFO: 22:07:03.237 TRACE [http-thread-pool-8080(4)] fr.espheria.bean.UtilisateurBean         - getOtherGroups ...
INFO: 22:07:03.248 TRACE [http-thread-pool-8080(4)] fr.espheria.bean.UtilisateurBean         - getOtherGroups DONE
INFO: 22:07:03.249 TRACE [http-thread-pool-8080(4)] fr.espheria.bean.UtilisateurBean         - loadGroupOfSelectedUser DONE
INFO: 22:07:03.249 TRACE [http-thread-pool-8080(4)] fr.espheria.bean.UtilisateurBean         - indexRowSelectListener DONE
INFO: 22:07:03.262 DEBUG [http-thread-pool-8080(4)] fr.espheria.bean.UserBean                - getUser ...
INFO: 22:07:03.272 TRACE [http-thread-pool-8080(4)] fr.espheria.bean.UtilisateurBean         - getSelectedUser !
INFO: 22:07:03.272 TRACE [http-thread-pool-8080(4)] fr.espheria.bean.UtilisateurBean         - getSelectedUser !
INFO: 22:07:03.272 TRACE [http-thread-pool-8080(4)] fr.espheria.bean.UtilisateurBean         - getSelectedUser !
INFO: 22:07:03.283 TRACE [http-thread-pool-8080(4)] fr.espheria.bean.UtilisateurBean         - getSelectedUser !
INFO: 22:07:03.284 TRACE [http-thread-pool-8080(4)] fr.espheria.bean.UtilisateurBean         - getGroups !
INFO: 22:07:06.708 DEBUG [http-thread-pool-8080(5)] fr.espheria.bean.UserBean                - getUser ...
INFO: 22:07:06.708 TRACE [http-thread-pool-8080(5)] fr.espheria.bean.UtilisateurBean         - getSelectedUser !
INFO: 22:07:06.718 DEBUG [http-thread-pool-8080(5)] fr.espheria.bean.UserBean                - getUser ...
INFO: 22:07:06.718 DEBUG [http-thread-pool-8080(5)] fr.espheria.bean.UserBean                - getUser ...
INFO: 22:07:06.730 TRACE [http-thread-pool-8080(5)] fr.espheria.bean.UtilisateurBean         - getSelectedUser !
INFO: 22:07:06.731 DEBUG [http-thread-pool-8080(5)] fr.espheria.bean.UserBean                - getUser ...
INFO: 22:07:06.731 DEBUG [http-thread-pool-8080(5)] fr.espheria.bean.UserBean                - getUser ...
INFO: 22:07:06.741 TRACE [http-thread-pool-8080(5)] fr.espheria.bean.UtilisateurBean         - getSelectedUser !
INFO: 22:07:06.741 DEBUG [http-thread-pool-8080(5)] fr.espheria.bean.UserBean                - getUser ...
INFO: 22:07:06.752 DEBUG [http-thread-pool-8080(5)] fr.espheria.bean.UserBean                - getUser ...
INFO: 22:07:06.753 DEBUG [http-thread-pool-8080(5)] fr.espheria.bean.UserBean                - getUser ...
INFO: 22:07:06.763 TRACE [http-thread-pool-8080(5)] fr.espheria.bean.UtilisateurBean         - getSelectedUser !
INFO: 22:07:06.763 DEBUG [http-thread-pool-8080(5)] fr.espheria.bean.UserBean                - getUser ...
INFO: 22:07:06.774 DEBUG [http-thread-pool-8080(5)] fr.espheria.bean.UserBean                - getUser ...
Z'avez une idée du truc qui fait que mon action se déclenche jamais ??