i am exprimenting with the RequestFactory and managed to get Data from it and it worked like it should and i get all my data.
But when i refresh the page it doesn't get new data from the server. It looks like it cache the data and use the old. My EclipseLink JPA don't tell me new database queries , also i changed the data in the DB and i only get the old data.
I use that query:
requestFactory.projectRequest().findAllProjects().fire(new Receiver<List<ProjectProxy>>() {
@Override
public void onSuccess(List<ProjectProxy> response) {
view.setProjects(response);
}
});
on the server side:
public static List<Project> findAllProjects() {
EntityManager em = entityManager();
try {
List<Project> list = em.createQuery("select p from Project p").getResultList();
// force to get all
list.size();
return list;
} finally {
em.close();
}
}
Where am i wrong? onModuleLoad gets called on refresh.