jeudi 12 février 2015


I work with JSF2.2 and Richfaces 4 and i try to create a table by using the Datatables of Jquery. Because all my datas are dynamic so i have to use and the too. But it gives me an empty table in the jsf.


this is my jsf page:



<ui:composition xmlns="http://ift.tt/lH0Osb"
xmlns:h="http://ift.tt/HjFrZb"
xmlns:f="http://ift.tt/HcrI1S"
xmlns:ui="http://ift.tt/KsEgXx"
xmlns:a4j="http://ift.tt/1bQZSbL"
xmlns:p="http://ift.tt/12SQGDX"
xmlns:rich="http://ift.tt/1epd4sD">
<h:head>
<script type="text/javascript" src="js/jquery.dataTables.min.js"></script>
<link rel="stylesheet" type="text/css" href="css/jquery.dataTables.css"/>
<script>
$(document).ready(function() {
$('#example').dataTable();
} );
</script>
</h:head>
<h:body>
<h:form>
<h:panelGroup id="tableau">
<table id="example" class="display compact" cellspacing="0"
width="100%">


<a4j:repeat value="#{auditController.findAllEntityList()}"
var="entity" rowKeyVar="rowentity">


<thead>
<tr>
<a4j:repeat
value="#{Controller.findP(entity).entrySet().toArray()}"
var="entete1">
<th><h:outputLabel value="#{entete1.key}"
rendered="#{rowentity eq 0 and entete1.key !='class'}" /></th>
</a4j:repeat>
</tr>
</thead>
<tbody>
<tr>
<a4j:repeat
value="#{Controller.findP(entity).entrySet().toArray()}"
var="entete">
<td><h:outputLabel value="#{entete.value}"/></td>
</a4j:repeat>
</tr>
</tbody>
</a4j:repeat>

</table>
</h:panelGroup>
</h:form>
</h:body>


Without Jquery it works perfectly.





Aucun commentaire:

Enregistrer un commentaire