Primefacs复选框无法在引导表中正常工作

时间:2019-04-02 07:00:50

标签: jsf bootstrap-4

我在我的项目中使用带有引导的质数。在我的引导分页表中使用质数复选框。在UI orgMultiCheckBoxId id中 单击以调用动作Java来检查所有singlecheckbox id都很好。但是当我按Save按钮时,当前页面数据仅发送到服务器。

<table id="testingId" class="table table-striped table-bordered responsive">
<thead>
<tr>
<th>                                  
<c:forEach items="#{student.classList}"
varStatus="varsta" var="text">
<p:selectBooleanCheckbox id="orgMultiCheckBoxId" 
value="#{VALUE}" 
itemLabel="#{text}">
<p:ajax event="change" listener="#{action}" 
global="false"/>
<f:param  name="index" value="#{value.index}"/>
</p:selectBooleanCheckbox>
</c:forEach>
</p:panelGrid>
</th>
</tr>
</thead>
<ui:repeat value="#{student.List}"
var="vartxt" 
varStatus="varindex">
<tr>
<td>
<c:forEach items="#{student.classList}"
varStatus="varsta" var="text">
<p:selectBooleanCheckbox id="singlecheckid" 
value="#{VALUE}" 
itemLabel="#{text}">
<p:ajax event="change" listener="#{action}" 
global="false"/>
<f:param  name="index" value="#{value.index}"/>
</p:selectBooleanCheckbox>
</c:forEach>
</td>
</tr>
</ui:repeat>
</table>

ButtonAction:

 <p:commandButton id="saveButtonId" 
     icon="fa fa-fw fa-save"
     value="#{student.SaveButton}"
     action="#{student.saveButtonAction}" 
     update="updated/> 

脚本:

<script type = "text/javascript" >
//<![CDATA[ 
jQuery(document).ready(function()
{
generatetestingIdDataTable();
});
function generatetestingIdDataTable()
{
$('#testingId').DataTable({
"bPaginate": true,
"responsive": true,
"bLengthChange": false,
"bFilter": false,
"bSort": false,
"bInfo": false,
"bAutoWidth": true,
"pageLength": 10,
"aoColumns": [
null
});
}
//]]>
</script>

0 个答案:

没有答案