I have what must be a fairly typical usecase.
1. User starts at search / list page.
2. Selects an object from list and modifies it
3. Returns to search / list page.
Now, I can get this to work with something similar to the Booking example.
SFSB
@DataModel
private List sessions;
@Factory("playerSessions")
@Observer("dataChanged")
public String find() {
query();
return null;
}
Another SFSB:
public String create() {
...
events.raiseEvent("dataChanged");
...
}
The problem lies when the backing data is modified outside the application or by another
user and hence the "dataChanged" event is never fired, the @Observer on the
find() method is never triggered and the data is stale upon subsequent requests.
Now, this problem goes away if I stick the SFSB that outjects the @DataModel into Event
Scope, but then things like sort order and number of rows gets lost between requests.
So, I thought maybe using PAGE scope for the @DataModel and Session Scope for the SFSB
that outjects the @DataModel, but the factory method on the @DataModel still doesnt get
invoked when the page is loaded the 2nd time. And, obviously, a paged scoped Action bean
cannot be stateful.
So, I'm not quite sure what to do. I know I can , for example, put an object in
session scope that tracks sort order, etc for each list but that feels pretty ugly.
Is there an excepted pattern for this?
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3986274#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...