I have a display tag in my jsp file. Its like..
<display:table id="currentRow" name="${ListObj}" requestURI="" sort="page" defaultsort="2"
pagesize="5" class="displayTable">
<display:caption><font color="red">Users List</font></display:caption>
<display:column property="ID" title="Role" ></display:column>
<display:column property="Name" title="User Name" sortable="true"></display:column>
<c:if test="%{currentRow.ID ne '1'}">
<display:column >
<a href="javascript:editUserJS('editUser.jav?id=${currentRow.ID}');"><i>edit</i></a>
</display:column>
</c:if>
</display:table>
i had wrote the code <c:if test="%{currentRow.ID ne '1'}"> for that i didnt want to show the edit link for user with ID 1. But that condition is not working. Ie no rows in display tag shows edit link. But if i give <c:if test="%{currentRow.ID eq '1'}">, edit link will be displayed.
How can i make it displayed for all the rows except the one with ID=1???
You should put the if statement inside the
<display:column>tag as you will always want the<td>tag rendered in the table even if it is empty.If the id attribute is an integer you will want to perform equals on it as an int.