PDA

View Full Version : conversation scope



chris.lam
Nov 15th, 2007, 09:09 AM
hi all, I have read about the web flow documentation
but i am not quite sure about the conversation scope...

I would like to know when exactly is a bean in conversation scope goes out of scope...
after a bindAndValidate() of the assocaited formAction?

after a form submission with that bean,
i found that subsequent form with the same formAction is populated with the previously entered value...
is it the form still associated with the same bean?
or is it required that i call resetForm() manually after every form submission?

thanks.

Marten Deinum
Nov 15th, 2007, 09:54 AM
hi all, I have read about the web flow documentation

Read closer. The different scopes are clearly explained...

REQUEST - Object destroyed after request
FLASH - Object destroyed after request-response cycle
FLOW - Object destroyed when flow finishes
CONVERSATION - Object destroyed when the conversation finishes.

Request is the shortest lived, Conversation the longest...

lfbarragan
Nov 24th, 2008, 11:49 AM
Hi guys, I think there is a big confusion around the scopes, I've googled around for a couple of days trying to find a spring definition , because the ones in the documentation are not clear enough.

I understand this:

CONVERSATION - Object destroyed when the conversation finishes.

But is there a Spring definition for "conversation" in the documentation?

What's the difference between this scopes and the Seam scopes?

In my case I need a different session for each browser tab, and I'm still not sure how to implement this with Spring Webflow but I've heard that it's possible with Seam.

KDante
Apr 8th, 2009, 11:04 AM
Is there anything more written about it? I'm solving the same problem with session (conversation) for each panel.

InverseFalcon
Apr 8th, 2009, 01:00 PM
I'm assuming you understand how flow scope works. If a flow is invoked explicitly, NOT as a subflow, then it is a top-level flow, and starts a new conversation. The conversation (and attributes in conversation scope) last for the duration of the top-level flow and any subflows it calls. When a top-level flow ends, the conversation ends and conversation scope is cleaned up.

If you do a flow-redirect in the top-level flow's end-state, then you are ending one conversation (and cleaning up conversation scope) and starting another, with a new top-level flow.

Hope this helps.