below is the code which I am using in my jsp
<select class="form-control custom-dropdown" name="userSelected"
id="ddl">
<option value="" disabled selected>--Select--</option>
<c:forEach items="${users}" var="user" varStatus="status">
<option value="${user.userId}"><c:out
value="${user.userName}"></c:out>
</option>
</c:forEach>
<option value="-1">All</option>
</select>
<c:forEach items="${expenseList}" var="list" varStatus="status">
<tr>
<td><input type="checkbox" name="check" id="check"
value="${list.expenseId}" class="case"></td>
<td>${list.itemDescription}</td>
<td>${list.amount}</td>
<td>${list.expenseDate}</td>
</tr>
</c:forEach>
so the thing is, when a user select option All, he will get to see all the data. But the problem is that, with checkbox option will also be available with each row which should not be happening because checkbox option should be available only for those his records and not for the others. He can select his records and do any operation and not others. So how can I achieve this in spring mvc, spring security so that he can see others records too but that checkbox option for some operation shud available with his records only.
Aucun commentaire:
Enregistrer un commentaire