NetBeans Forums
| View previous topic :: View next topic |
| Author |
Message |
farhad
Joined: 19 May 2012 Posts: 2
|
Posted: Fri May 25, 2012 11:25 am Post subject: how to reinstantiate a managed bean to show updated data? |
|
|
hey guys,
I am showing the data from a VIEW, then getting this data trying to update the database tables related to the view. it is perfectly working and the database gets updated. but the View still showing the same data retrieved previously, I have a session scoped managed bean and the data is retrieved from view with the following method and passing the list to the JSF datatable.
| Code: | public List getProducts() {
return productsSessions.getProducts();
} |
the session bean is stateless and local. the for the session bean is like:
| Code: |
public List<VProducts> getProducts() {
try {
Query query = em.createNamedQuery("VProducts.findByDELIndicator").setParameter("dELIndicator", 0);
return query.getResultList();
} catch (Exception e) {
throw new EJBException(e.getMessage());
}
} |
So, now I want to find a way to show the updated data in the page. the main problem here seems to be different between tables and View. tables are updated but the view show same data. but when you clean and build the application, the changes are displayed
I appreciate your help. |
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You can attach files in this forum You can download files in this forum
|
|