Bonjour j'utilise ce programme qui créé un menu à onglets.
Visuellement, tout fonctionne très bien.
Par contre, à chaque fois que je clique sur un onglet, les méthodes beans des onglets non sélectionnés sont exécutés. Par contre seul le code de mise à jour de l'onglet sélectionné est ramené (ce qui est comportement attendu).
Comment faire pour éviter cela ?
Merci.
Source :
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 <%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %> <%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %> <!-- RichFaces tag library declaration --> <%@ taglib uri="http://richfaces.org/a4j" prefix="a4j"%> <%@ taglib uri="http://richfaces.org/rich" prefix="rich"%> <html xmlns="http://www.w3.org/1999/xhtml"> <f:view> <f:loadBundle basename="ressources.biblioRessources" var="msg" /> <head> <title><h:outputText value="#{msg.biblio_titre}" /></title> <link href="styles/style.css" rel="stylesheet" type="text/css" /> </head> <body topmargin="0" leftmargin="0" bgcolor="#DDFFDD"> <%-- Panneau d'onglets --%> <rich:tabPanel switchType="Ajax" width="100%" height="100%" selectedTab="#{ongletBean.onglet}"> <%-- 1er onglet --%> <rich:tab name="accueil" label="Accueil"> <f:subview id="sv_accueil"> <jsp:include page="accueil.jsp" /> </f:subview> </rich:tab> <%-- 2ème onglet --%> <rich:tab name="listedemo" label="Listedemo"> <f:subview id="sv_listedemo"> <jsp:include page="listeDemo.jsp" /> </f:subview> </rich:tab> <rich:tab name="liste" label="Liste livres"> <f:subview id="sv_liste"> <jsp:include page="liste.jsp" /> </f:subview> </rich:tab> </rich:tabPanel> </body> </f:view> </html>
Partager