Search code examples
javajqueryspringextjsjsp-tags

How to display list of user with account status in spring


I want to display list of user with account status as a locked or unlocked. also admin able to search user from list of users. how to implement this functionality using spring, java ? or any jquery component provide this functionality?


Solution

  • From what i can tell, inside your JSPs you should use JSTL

    you can use that to iterate through all the users in your list. Also you can add extra logic, like if the user is active highlight it green (or something like that). example:

    <table> <c:foreach var="user" item="${users}"> <tr><td>${user.firstName}</td></tr> </c:foreach>

    This is a quick example (sorry not formatted) that will take all the users in the list and display the first name in a table. Its really quite simple to use. The only thing you need to know is at the begining you need to is : and I use the prefix C because it is the standard for "Core". <%@ taglib uri = "http://java.sun.com/jstl/core" prefix = "c"%> Hoep this helps,