Markup:
Code: Select all
<h:form>
<p:dataTable value="#{userController.users}" var="user" >
<p:column headerText="Login" sortBy="#{user.login}">
#{user.login}
</p:column>
</p:dataTable>
</h:form>
Code: Select all
@Named
@ViewScoped
public class UserController implements Serializable{
private static final long serialVersionUID = 1;
@Inject SessionController sessionController;
@Inject UserBean userBean;
private List<User> users;
public UserController() {
}
public List<User> getUsers() {
if(users == null)
users = userBean.findAllUsers();
return users;
}
}
Any idea of what can cause this? No javascript error occurs. I've used sorting without problem in earlier projects (without CDI and seam though, and using glassfish instead of jboss). I tried switching to the old @ManagedBean instead, without success.