I am send Sending a list from server to thymeleaf through model attribute
friendsOnlineModel.setFriendsOnline(defaultFriendRequestService.getFriendsOnline(user) == null ? Collections.EMPTY_LIST : defaultFriendRequestService.getFriendsOnline(user));
chatModel.setChats(defaultChatService.getUnreadChats() == null ? Collections.EMPTY_LIST : defaultChatService.getUnreadChats());
model.addAttribute("friends_online", friendsOnlineModel);
model.addAttribute("chats", chatModel);
I dont want to display them straight in an "li" tag, but rather pass it to a js function which displays them. Is it possible?