-
1. Re: Ending or destroying a conversation
andygibson.contact.andygibson.net May 6, 2008 6:02 PM (in response to wark2007)I don't believe you can end a conversation if the user enters a new URL. You can't do anything if the user enters a URL since your site never receives notification that they are moving off the page (hence the whole need for session (and conversation) timeout).
Cheers,
Andy Gibson
-
2. Re: Ending or destroying a conversation
wark2007 May 13, 2008 6:07 PM (in response to wark2007)Thanks for your answer! I think I described my problem to short. I will give you a small example of what I want to do:
The user opens a page which displays a list of employees (using @DataModel and @DataModelSelection). Now, the user wants to edit some details of an employee and clicks on a link in the specific row in the data table. The link invokes an action which is annotated with @Begin. The selected employee object/entity will be put in the conversation context and the user will be redirected to the page employeeDetails.xhtml.
On that page all attributes and depending objects (maybe department, list of skills, etc.) will be displayed. The user can edit the attributes or a add skill. These save/update/add actions are not annotaed with @End since I don't know if the user wants to manipulate further information on that page. After he has finished with manipulating employee data he goes back to employee overview.
Here comes the problem - if the user uses a link
back to overview
everything works fine (the action ends the conversation). But if the user uses the back button in the browser (and a lot of users do so), he comes also back to the employee overview but all stored objects still resides in the conversation context. I have the same problem as if I had used session scope. -
3. Re: Ending or destroying a conversation
wark2007 May 13, 2008 7:03 PM (in response to wark2007)Addition: Sorry, my mistake! For the back button it works (of course). I does not work if the user selects the employee overview url from the adressbar in the browser. I guess since he did not have the conversation id available there, am I right? I think this problem is unsolvable.
I am looking for a possibility to say: If the user browses to any page (in my seam webapp) which is not defined in a given pageflow, the conversation shall be destroyed.
Simple pageflow:
employeeOverview.xhtml transition to employeeDetails.xhtmlIf the user browses to any other page after employeeDetails.xhtml, the conversation shall be destroyed.