Hi
I have a list of items *${nameList}* I need to print them in a table as follows. I need to check if the elements are not null before printing:
My code is as follows. But right now it is checking for NULL value. Kindly let me know pls!
<table class="display" border="1" bordercolor=#dddddd >
<tr>
<td>Number</td><td>Sample Name</td><td>Number</td><td>Sample Name</td><td>Number</td><td>Sample Name</td><td>Number</td><td>Sample Name</td>
</tr>
<c:forEach var="x" begin="${0}" end="${11}">
<c:set var="k" value="${x}"/>
<tr>
<c:forEach var="y" begin="${1}" end="${4}">
<c:if test="${k < maxSample}">
<c:if test="${nameList[k] != ''}">
<td><c:out value="${k+1}"/></td><td><c:out value="${nameList[k]}"/></td>
</c:if>
</c:if>
<c:set var="k" value="${k+12}"/>
</c:forEach>
</tr>
</c:forEach>
</table>