删除或更新项目后数据表未刷新

我试图在primefaces上实现排序functiondataTable.Sorting正在运行。 但是当我删除时,更新dataTable项,dataTable没有效果(没有任何变化)。 这是dataTable没有被清除或刷新。但是在数据库删除,更新正在发生任何问题。当我注销并重新登录时,新列表(dataTable)没问题。

employeeView.jsf:

EmployeeList.java:

 @Component("employeeList") @SessionScoped @Repository public class EmployeeList implements Serializable { private static final long serialVersionUID = -2417394435764260084L; public static HibernateTemplate hibernateTemplate; private List employees = new ArrayList(); @Autowired public void setSessionFactory(SessionFactory sessionFactory) { this.hibernateTemplate = new HibernateTemplate(sessionFactory); } public List getEmployees() { if(employees.isEmpty()){ employees.addAll(empList()); } return employees; } @SuppressWarnings("unchecked") public List empList() { try { List  result = hibernateTemplate.find("from Employee"); return result; } finally { //close the session and user-supplied JDBC connection } } } 

我试过@RequestScope,@ ViewScope等但没有效果。我哪里出错了?

使用JSF2和Google Cloud SQL的Primefaces-3.0.M3