1
我正在使用jQuery DataTables在同一页中的两个单独的表中填充数据。但是,我收到以下错误:错误与JQuery数据表oCol是未定义对话框
oCol is undefined
..在对话框中。请帮我解决this.This是我的代码:
<table class="assignment">
<tr>
<th>Available Product License Types</th>
<th></th>
<th>Assigned Product License Types</th>
</tr>
<tr>
<td class="leftcontent">
Select: <a href="#" onclick="return ASLM.Datatables.selectAll ($('#availableProductLicenseTypeTable'));">all</a>, <a href="#" onclick="return ASLM.Datatables.selectNone($('#availableProductLicenseTypeTable'));">none</a> <table id="availableProductLicenseTypeTable" class="display small noshadow">
<thead>
<tr>
<th>ID</th>
<th>Name</th>
<th>View Only</th>
</tr>
</thead>
<tbody>
<c:forEach var="availableProductLicenseType" items="${availableProductLicenseType}">
<tr>
<td>
${availableProductLicenseType.id}
</td>
<td>
${availableProductLicenseType.productFamilyName}${' '}${availableProductLicenseType.productName}
<c:choose>
<c:when test="${availableProductLicenseType.needsExplicitAssignment}">*${availableProductLicenseType.licenseTypeName}
</c:when>
<c:otherwise>${availableProductLicenseType.licenseTypeName}
</c:otherwise>
</c:choose>
</td>
<td>${availableProductLicenseType.isViewOnly}
</td>
</tr>
</c:forEach>
</tbody>
</table>
</td>
<td class="buttons">
<input type="button" value=">" onclick="moveProductLicenseTypesAvailableToAssigned()"/></br>
<input type="button" value="<" onclick="moveProductLicenseTypesAssignedToAvailable()"/></br>
</td>
<td class="rightcontent">
Select: <a href="#" onclick="return ASLM.Datatables.selectAll($('#assignedProductLicenseTypeTable'));">all</a>,
<a href="#" onclick="return ASLM.Datatables.selectNone($('#assignedProductLicenseTypeTable'));">none</a>
<table id="assignedProductLicenseTypeTable" class="display small noshadow">
<thead>
<tr>
<th>ID</th>
<th>Name</th>
<th>View Only</th>
</tr>
</thead>
<c:forEach var="assignedProductLicenseType" items="${assignedProductLicenseType}">
<tr>
<td>
${assignedProductLicenseType.id}
</td>
<td>
${assignedProductLicenseType.productFamilyName}${' '}${assignedProductLicenseType.productName}
<c:choose>
<c:when test="${assignedProductLicenseType.needsExplicitAssignment}">*${assignedProductLicenseType.licenseTypeName}
</c:when>
<c:otherwise>${assignedProductLicenseType.licenseTypeName}
</c:otherwise>
</c:choose>
<input type="checkbox" name="isViewOnly" id="isViewOnlyId" value="${assignedProductLicenseType.isViewOnly}" />
</td>
<td>${assignedProductLicenseType.isViewOnly}
</td>
</tr>
</c:forEach>
</table>
</td>
</tr>
</table>
编辑与适当的代码格式化你的问题。 – D4V1D 2015-04-01 15:16:48
在之后添加标签
– cura 2015-04-01 15:18:29我已经添加了
标签,但它仍然给出相同的错误。 – Somekindofcoder 2015-04-01 15:34:43回答
的DataTable希望这种格式:
来源
2015-04-01 15:46:08 JuaRoAl
是的,我只用这种格式: – Somekindofcoder 2015-04-01 16:00:18
您发布的代码并不这么说...编辑代码!你在另一张桌子里有一张桌子,其中有一张是这种格式的! – JuaRoAl 2015-04-01 16:03:48
在上面的代码中,如果我要评论
相关问题