Salut,
je travaille sur un projet en utilisant rich faces hibernate spring ,j'ai un souci lors de navigation sur l'application il m'affiche l'erreur suivante "duplicated id" pour l'id "recherche": je décompose ma page en deux parties une partie qui contient le critère de recherche et une autre pour le résultat de recherche j'ai un problème au niveau de id "recherche"
Un exemple de page jsf (interface rich faces)
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
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283 <?xml version="1.0" encoding="ISO-8859-1" ?> <html xmlns:f="http://java.sun.com/jsf/core" xmlns:h="http://java.sun.com/jsf/html" xmlns:rich="http://richfaces.org/rich" xmlns:a4j="http://richfaces.org/a4j" xmlns:ui="http://java.sun.com/jsf/facelets" xmlns:csf="http://www.cylande.com/csf"> <ui:composition template="/faces/templates/layoutTemplate.xhtml"> <ui:define name="content"> <ui:include src="/faces/export.xhtml"> <ui:param name="beanTypeExport" value="#{gestionSspBean.typeExport}"/> <ui:param name="beanExport" value="gestionSspBean"/> </ui:include> <ui:decorate template="/faces/templates/rechercheTemplate.xhtml"> <ui:param name="rechercheLabel" value="Critères de sélection des phases"/> <ui:param name="rechercheOpen" value="#{gestionSspBean.rechOpen}"/> <ui:define name="recherche"> <table class="rechercheChamps"> <tr> <td class="libelle" nowrap="nowrap">Libelle Projet : </td> <td> <h:inputText id="nmprtPhase" value="#{PhaseBean.nmPrt}" size="16" /> </td> <td class="libelle" nowrap="nowrap"> Libelle Phase : </td> <td> <h:inputText id="nmPhsPhase" value="#{PhaseBean.nmPh}" size="16" /> </td> </tr> <tr> </tr> <tr> <td class="libelle" nowrap="nowrap"> </td> <td class="libelle" nowrap="nowrap"> </td> <td> </td> <td width="100%" align="right"> <h:commandButton id="rchePhase" reRender="result" action="#{PhaseBean.getListPhaseAction}" value="Valider" styleClass="rsButton"/> <a4j:commandButton id="efePhase" reRender="donneesRecherche" action="#{gestionSspBean.erase}" value="Effacer" styleClass="rsButton"/> </td> </tr> </table> </ui:define> <ui:define name="resultat"> <h:panelGroup id="resultPhase"> <rich:dataTable var="item" value="#{PhaseBean.listIdentPhase}" binding="#{gestionSspBean.dataTable}" id="recherTablePhase" rows="5" width="100%" rendered="#{PhaseBean.afRest}" rowClasses="even-row,odd-row" > <f:facet name="header"> <rich:columnGroup> <rich:column id="c0Phase" colspan="8"> <h:outputText value="Les Phases trouvées" /> </rich:column> <rich:column id="c1Phase" breakBefore="true"> <a4j:commandLink id="s1dPhase" styleClass="textHeaderDatatable" reRender="result"> <h:outputText value="LebellePhase" />  <h:graphicImage styleClass="imgHeaderDatatable" value='#{gestionSspBean.sortImgs["col1"]}'/> </a4j:commandLink> </rich:column> <rich:column id="c2Phase"> <a4j:commandLink id="s2dPhase" styleClass="textHeaderDatatable" reRender="result"> <h:outputText value="LibelProjet" />  <h:graphicImage styleClass="imgHeaderDatatable" value='#{gestionSspBean.sortImgs["col2"]}'/> </a4j:commandLink> </rich:column> <rich:column id="c3Phase"> <a4j:commandLink id="s3dPhase" styleClass="textHeaderDatatable" reRender="result"> <h:outputText value="Date debut" />  <h:graphicImage styleClass="imgHeaderDatatable" value='#{gestionSspBean.sortImgs["col3"]}'/> </a4j:commandLink> </rich:column> <rich:column id="c4Phase"> <a4j:commandLink id="s4dPhase" styleClass="textHeaderDatatable" reRender="result"> <h:outputText value="date fin" />  <h:graphicImage styleClass="imgHeaderDatatable" value='#{gestionSspBean.sortImgs["col4"]}'/> </a4j:commandLink> </rich:column> <rich:column id="c5Phase"> <a4j:commandLink id="s5dPhase" styleClass="textHeaderDatatable" reRender="result"> <h:outputText value="Etat phase" />  <h:graphicImage styleClass="imgHeaderDatatable" value='#{gestionSspBean.sortImgs["col5"]}'/> </a4j:commandLink> </rich:column> <rich:column id="c6Phase"> <a4j:commandLink id="s6dPhase" styleClass="textHeaderDatatable" reRender="result"> <h:outputText value="Budget phase" />  <h:graphicImage styleClass="imgHeaderDatatable" value='#{gestionSspBean.sortImgs["col5"]}'/> </a4j:commandLink> </rich:column> <rich:column id="cod8Phase"> <rich:spacer/> </rich:column> </rich:columnGroup> </f:facet> <!-- Création d'une colonne --> <rich:column id="co1Phase" > <h:outputText value="#{item.nomPhase}"/> </rich:column> <rich:column id="co2Phase"> <h:outputText value="#{item.nomProjet}"/> </rich:column> <rich:column id="co3Phase"> <h:outputText value="#{item.dateDebut}"/> </rich:column> <rich:column id="co4Phase"> <h:outputText value="#{item.deteFin}"/> </rich:column> <rich:column id="co5Phase"> <h:outputText value="#{item.etatPhase}"/> </rich:column> <rich:column id="co6Phase"> <h:outputText value="#{item.budPhase}"/> </rich:column> <rich:column id="coln8Phase" style="text-align:left"> <rich:dropDownMenu id="aBonPhase" direction="top-left" value="Actions" styleClass="btnAction" jointPoint="bl"> <rich:menuItem value="Supprimer" action="#{gestionSspBean.delete}" id="snPhase" icon="#{a4jSkin.nameSkin}/images/delete16.png" rendered="{item.droitSup}" > <f:param name="sspId" value=""/> </rich:menuItem> <rich:menuItem value="Modifier" action="#{gestionSspBean.visuModif}" id="morBtnPhase" icon="#{a4jSkin.nameSkin}/images/edit16.png"> <f:param name="sspId" value=""/> <f:param name="editMode" value="true"/> </rich:menuItem> <rich:menuItemvalue="Visualiser" action="#{gestionSspBean.visuModif}" id="vstnPhase" icon="#{a4jSkin.nameSkin}/images/view16.png"> <f:param name="sspId" value=""/> <f:param name="editMode" value="false"/> </rich:menuItem> </rich:dropDownMenu> </rich:column> </rich:dataTable> <!-- pagination --> <rich:dataTable width="100%" rendered="true"> <f:facet name="footer"> <h:panelGrid columns="2"> <rich:datascroller id="sResatTablePhase" for="recherTablePhase" maxPages="5" binding="#{gestionSspBean.scrollerTable}" pageIndexVar="pageIndex" pagesVar="pages" align="left"/> <h:outputText value="#{gestionSspBean.paginateMessage}"/> </h:panelGrid> </f:facet> </rich:dataTable> <rich:jQuery selector="recherTablePhase tr:odd" query="addClass('odd-row')" /> <rich:jQuery selector="recherTablePhase tr:even" query="addClass('even-row')" /> <rich:jQuery selector="recherTablePhase tr" query="mouseover(function(){jQuery(this).addClass('active-row')})"/> <rich:jQuery selector="recherTablePhase tr" query="mouseout(function(){jQuery(this).removeClass('active-row')})"/> </h:panelGroup> </ui:define> </ui:decorate> </ui:define> </ui:composition> </html>
Et le ode d'erreur généré.
Merci
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 java.lang.IllegalStateException: duplicate Id for a component rechercheForm:recheTableTache:j_id255 org.ajax4jsf.application.TreeStructureNode.apply(TreeStructureNode.java:50) org.ajax4jsf.application.TreeStructureNode.apply(TreeStructureNode.java:72) org.ajax4jsf.application.TreeStructureNode.apply(TreeStructureNode.java:72) org.ajax4jsf.application.TreeStructureNode.apply(TreeStructureNode.java:72) org.ajax4jsf.application.TreeStructureNode.apply(TreeStructureNode.java:72) org.ajax4jsf.application.TreeStructureNode.apply(TreeStructureNode.java:72) org.ajax4jsf.application.TreeStructureNode.apply(TreeStructureNode.java:72) org.ajax4jsf.application.TreeStructureNode.apply(TreeStructureNode.java:72) org.ajax4jsf.application.TreeStructureNode.apply(TreeStructureNode.java:72) org.ajax4jsf.application.AjaxStateManager.getTreeStructureToSave(AjaxStateManager.java:188) org.ajax4jsf.application.AjaxStateManager.buildViewState(AjaxStateManager.java:469) org.ajax4jsf.application.AjaxStateManager.saveSerializedView(AjaxStateManager.java:427) com.sun.facelets.FaceletViewHandler.renderView(FaceletViewHandler.java:615) org.ajax4jsf.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:108) org.ajax4jsf.application.AjaxViewHandler.renderView(AjaxViewHandler.java:204) com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:106) com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:251) com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:144) javax.faces.webapp.FacesServlet.service(FacesServlet.java:245) org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:177) org.ajax4jsf.webapp.BaseFilter.handleRequest(BaseFilter.java:267) org.ajax4jsf.webapp.BaseFilter.processUploadsAndHandleRequest(BaseFilter.java:380) org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:507) com.cylande.filter.FilterUTF8.doFilter(FilterUTF8.java:20)
Partager