[jboss-user] [JBoss Seam] - How to refresh datamodel in EntityQuery
karolkarol
do-not-reply at jboss.com
Sun Sep 2 05:11:35 EDT 2007
A need to refresh datatable/datamodel from database. I want to do this from component that removes one of entity from the list.
I tried several ways:
1) reset to null datamodel on injected EntityQuery (userList) component
|
| public class EntityH<E> extends EntityHome<E> {
|
| @In(required = false)
| @Out(required = false)
| UserList userList;
| (........)
| @Override
| public String remove() {
|
| super.remove();
|
| if (userList!=null)
| {
| userList.entityDM = null;
| }
| userList.refresh();
| (........)
|
2) remove userList component from all context to force recreation
- this method was suggested on that forum
| Contexts.removeFromAllContexts("userList");
|
No one works - when redirecting to list page, deleted entity is still present.
All components are in one conversation scope becouse I really need to propagate faces messages.
Please help.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4080276#4080276
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4080276
More information about the jboss-user
mailing list