-
1. Re: Why is searchAction of the Booking example Session scoped?
admin.admin.email.tld Mar 11, 2008 10:19 PM (in response to gduq)Probably because of this bug
http://jira.jboss.com/jira/browse/JBSEAM-2501
From my investigation, it appears that the action requires session scope for the pageNo value and to place it in session scope is certainly overkill for one little int. Especially since the bean contains a collection.
-
2. Re: Why is searchAction of the Booking example Session scoped?
pmuir Mar 11, 2008 10:25 PM (in response to gduq)As explained many times, it is session scoped because that WAS THE DESIGN (that the search is remembered whilst the user is logged in).
And there is no bug in Seam in JBSEAM-2501, just in your understanding. How do you expect the search results to be remembered between requests for paging? Btw if you want to not use the session scope, take a look at a sea-gen'd app (it uses the request scope).
-
3. Re: Why is searchAction of the Booking example Session scoped?
gduq Mar 11, 2008 10:55 PM (in response to gduq)
As explained many times, it is session scoped because that WAS THE DESIGN (that the search is remembered whilst the user is logged in).Thanks for explaining that. I can understand that design trade-off but am I correct in thinking that there isn't any reason that this couldn't work as a long running conversation?
I tried doing it this way but experienced some strange behavior that sounds similar to what Mark mentioned.
-
4. Re: Why is searchAction of the Booking example Session scoped?
pmuir Mar 12, 2008 10:50 AM (in response to gduq)Certainly, it would work as a long running conversation. (You might well need to recode some bits).
But bear in mind that you would probably want a new conversation for booking the hotel.
I wouldn't normally use a LRC here as paging hotels doesn't represent a logical unit of work for the user (either it's open ended, so should be done using paramters or it should be session scoped).