Bonjour,
j'utilise un panelGrid pour afficher les informations sur les lignes d'un richataTable. Je veux que le panelGrid soir caché qu'on charge la page et que cela s'affiche quand on clique sur l'une des ligne de la DataTable.
voici mon code :
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
 
<script type="text/javascript">      
function verifie_form(arg){          
	if(arg==1) {
	document.getElementById('details').style.visibility='visible';           
		}           
	else           
	{                
		document.getElementById('details').style.visibility='hidden';
		}      }
 
 
</script>
 
.............
 
 	<h:form id="mainForm">
 		<a4j:outputPanel >
 
		<rich:scrollableDataTable id="courseTable" binding="#{personnelBean.congeTable}" value="#{personnelBean.congeList}"  
					var="conge" width="301px" height="140px">
 
			event="onRowClick" action="#{personnelBean.viewDetail}"  reRender="details" oncomplete="verifie_form(1)"
 
			<rich:column id="motif" width="100px">
			.....
 
		</rich:scrollableDataTable>
 
		<h:panelGroup>
 
 
 
		</h:panelGroup>
		</a4j:outputPanel>
		</h:form>
 
..................
<h:form id="form" >
 
 
 
		<h:panelGrid  id="details" columns="2" style="visibility:hidden" >
		   <h:outputLabel value="Motif" for="motif" />
		   <h:inputTextarea id="motif" value="#{personnelBean.currentConge.motif}" />
Le problème c'est que le oncomplete="verifie_form(1)" ne marche pas
Quelqu'un aurait un indice à me donner?
Merci.