-
1. Re: Refreshing Datamodel
vasana May 7, 2008 3:41 AM (in response to viniciuscarvalho.viniciusccarvalho.gmail.com)Are you using factory or Datemodel annotated methods to populate your table? If so try calling that method explicitly after your update is complete
-
2. Re: Refreshing Datamodel
andygibson.contact.andygibson.net May 7, 2008 6:18 AM (in response to viniciuscarvalho.viniciusccarvalho.gmail.com)There's a couple of ways of getting around this problem. The simplest is to clear the datamodel if it is in a shared conversation with the update process.
Or you can use events to signal to the datamodel that one of the objects has changed and it needs to refreshed.
If you are using entityHome, then by default, they raise an event whenever you update an item. From the seam documentation :
org.jboss.seam.afterTransactionSuccess.<name> — called when a transaction succeeds in the Seam
Application Framework which manages an entity called <name>However, raising your own event is simple too.
The other option is to make the list stateless so it is fetched each time the page is rendered. I'm guessing you don't want to go that route because you want want to use the datamodel and datamodel selection features. The alternative to that is to pass Ids as parameters and use a stateless list that is fetched each time that page is rendered.
Cheers,
Andy Gibson