-
1. Re: Context Management
nickarls Jan 22, 2009 10:02 AM (in response to diegocoronel)The specs speaketh:
• By default, a conversation is transient
• A transient conversation may be marked long-running by calling Conversation.begin()So it will be seamish as I understand it.
-
2. Re: Context Management
diegocoronel Jan 23, 2009 2:59 AM (in response to diegocoronel)Hi Nicklas,
What i really wanna know is when i do a
web submit
will my variables in event context be associated to current conversation context? Because with seam i tried to outject or use a component in event scope and end conversation before redirect... it seems that i cant use my event variables on render phase, just because my conversation was ended before redirect. Is it expected ?Sry about english. :)
-
3. Re: Context Management
nickarls Jan 26, 2009 8:31 AM (in response to diegocoronel)Ummm. I must confess that it exceeds my seam-knowledge.
I do know that the seam-team will try to make Seam3 as backward compatible to Seam2 as possible (increasing functionality where possible under the new core). Perhaps Pete has a comment if he happens to read this.
-
4. Re: Context Management
pmuir Jan 28, 2009 1:14 PM (in response to diegocoronel)Sounds like strange behaviour in Seam. Most of the conversation stuff in Seam will eventually end up in Web Beans.
-
5. Re: Context Management
diegocoronel Feb 5, 2009 6:47 PM (in response to diegocoronel)Hey Peter,
We should expect same behaviour in web beans ?
Im asking because i wanna to do something like this in my code:
myBean { Entity sample; public String save(){ persist(sample); FacesMessages.get..().addMessage ("success"); conversation.end(); } }
where i wanna FacesMessages in my event context, this way is possible to show to user the success message and developer dont need to make any kind of method to clear variables... because he is going to redirect to start page of conversation. Getting a new conversation id with success message showing.
So, i tried this in Seam and it not work.. in web beans will this be possible ?
sry. about english
-
6. Re: Context Management
pmuir Feb 6, 2009 1:21 AM (in response to diegocoronel)Actually, I probably misread your message, what you are trying to do won't work, the event context isn't propagated across a redirect.
In JSF2 the faces message are stored in a flash scope anyway.
-
7. Re: Context Management
diegocoronel Feb 6, 2009 1:52 PM (in response to diegocoronel)Hi Pete,
It sounds perfect, is it a new kind of context to be used ? can we put any of our variables in this flash context? Can we have this on seam ?
ty.
-
8. Re: Context Management
pmuir Feb 7, 2009 8:40 PM (in response to diegocoronel)
Diego Coronel wrote on Feb 06, 2009 13:52:
Hi Pete,
It sounds perfect, is it a new kind of context to be used ? can we put any of our variables in this flash context? Can we have this on seam ?
ty.Yes, yes and no, just use JSF2.
-
9. Re: Context Management
dan.j.allen Apr 30, 2009 7:46 PM (in response to diegocoronel)Actually, there is a problem in JSF 2, which we can easily work around in Seam (what else is new?). The default behavior in JSF 2 is to not bind FacesMessages to the flash scope on a redirect. You have to explicitly call FacesContext.getCurrentInstance().getExternalContext().getFlash().setKeepMessages(true). I know. My thought too. So anyway, it is ludicrous not to want to do this all the time, so guess what? We will revert this default in Seam. I'm testing it now in the booking example in Seam 3.