Bonjour,

j'utilise le plugin dataTable pour jquery

voici ma partie html
Code html : 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
		<table id="listMembres" class="display cell-border compact stripe" cellspacing="0" >
			<thead>
				<tr>
					<th>Prenom</th>
					<th>Nom</th>
					<th>Adresse</th>
					<th>Email</th>
					<th>Telephone</th>
					<th>Droits</th>
					<th>Cotisation</th>
				</tr>
			</thead>
 
			<tfoot>
				<tr>
					<th>Prenom</th>
					<th>Nom</th>
					<th>Adresse</th>
					<th>Email</th>
					<th>Telephone</th>
					<th>Droits</th>
					<th>Cotisation</th>
				</tr>
			</tfoot>
		</table>

voici mon code js
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
	$(function() {
		var token = $("meta[name='_csrf']").attr("content");
		var header = $("meta[name='_csrf_header']").attr("content");
		$(document).ajaxSend(function(e, xhr, options) {
			xhr.setRequestHeader(header, token);
		});
		var villeArray= new Array();
 
		function villeLoader(){
		$.ajax({
		  url: contextPath + "/unsecure/getVilles.htm",
		  async: false,
		  dataType: 'json',
		  success: function (json) {
		      for(var i=0;i<json.length;i++){
		        obj= { "label" : json[i].label, "value" : json[i].value};
		        test.push(obj);
		      }
		    }
		});
		return villeArray;
		}
	    editor = new $.fn.dataTable.Editor( {
	        ajax: {
	            create: {
	                type: 'POST',
	                url:  contextPath + "/secure/createMembre.htm"
	            },
	            edit: {
	                type: 'PUT',
	                url:  contextPath + "/secure/updateMembre.htm"
	            },
	            remove: {
	                type: 'DELETE',
	                url:  contextPath + "/secure/deleteMembre.htm"
	            }
	        },
	        table: "#listMembres",
	        fields: [ {
	                label: "Prénom:",
	                name: "prenom"
	            }, {
	                label: "Nom:",
	                name: "nom"
	            }, {
	                label: "Adresse:",
	                name: "adresse"
	            }, {
	                label: "Ville:",
	                name: "idVille",
	                type: "select",
	                options: villeLoader()
	            }, {
	                label: "Pays:",
	                name: "idPays"
	            }, {
	                label: "Email:",
	                name: "email"
	            }, {
	                label: "Telephone:",
	                name: "telephone"
	            }, {
	                label: "Login:",
	                name: "login"
	            }, {
	                label: "Mot de passe:",
	                name: "password"
	            }, {
	                label: "Droits:",
	                name: "droits"
	            }, {
	                label: "Cotisation:",
	                name: "cotisation"
	            }, {
	                label: "Question:",
	                name: "question"
	            }, {
	                label: "Reponse:",
	                name: "reponse"
	            }
	        ]
	    } );	
		$('#listMembres').dataTable({
			"processing" : true,
			"serverSide" : true,
			"autoWidth": true,
			"ajax" : {
				url : contextPath + "/secure/getMembres.htm",
				type : 'POST',
				dataType: 'json'
			},
			columns : [ {
				data : "prenom"
			}, {
				data : "nom"
			}, {
				data : "fullAdresse"
			}, {
				data : "email"
			}, {
				data : "telephone"
			}, {
				data : "droits"
			}, {
				data : "cotisation"
			}, {
				data : "id",
				visible : false
			}, {
				data : "login",
				visible : false
			}, {
				data : "password",
				visible : false
			}, {
				data : "idVille",
				visible : false
			}, {
				data : "adresse",
				visible : false
			}, {
				data : "idPays",
				visible : false
			}, {
				data : "question",
				visible : false
			}, {
				data : "reponse",
				visible : false
			} ],
	        tableTools: {
	            sRowSelect: "os",
	            aButtons: [
	                { sExtends: "editor_create", editor: editor },
	                { sExtends: "editor_edit",   editor: editor },
	                { sExtends: "editor_remove", editor: editor }
	            ]
	        }
		});
 
	});
avec tout ce code, j'arrive à obtenir ma table loadé sans erreur

Mais quand je veux faire apparaitre les 3 boutons "Edit", "Create" et "Delete", je rajoute les fichiers suivants
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
	<link type="text/css" rel="stylesheet"
	href="<c:url value ='/resources/css/dataTables.tableTools.min.css'/>" />
 
	<script type="text/javascript"
	src="<c:url value='/resources/js/dataTables.tableTools.min.js'/>"></script>
j'obtiens une erreur difficile à interpréter
TypeError: i[((h00 + D90) + b)] is undefined dans le fichier "dataTables.editor.js"
je suppose que j'utilise mal la propriété tableTools de ma dataTable. Merci d'avance pour vos suggestions