The problem is when clicking the commandButton that performs the action listUsersController.deleteUser. The method is successfully executed and the user is deleted. But the datatable is not updated. I want the deleted record to not appear anymore in the list with ajax.

It seems you are deleting the user in db, if you use one, and not from the list - #{listUsersController.users}...

You should post the code from the method:userService.removeUserById(id); I can't tell what's happening in there but if you aren't updating the users list, the dataTable won't never be (successfully) updated!

Looks like the datatable is not refreshing, try using update=":userLists" or update=":lists:userLists", the ':' telling it to look for the id starting from root. Currently it looks like it cant find the id to update. Rather, put it in an p:outputPanel, give it an id and then do something like update=":panel". I guess that will work.