[Catalyst] session issue

mla maurice.aubrey at gmail.com
Thu May 24 09:30:44 GMT 2007


Bernhard Graf wrote:
> Gaurav Talwar wrote:
> 
>> I am using session to store all his details he is filling in the
>> form. When he goes back to the previous pages, i take the information
>> from the session and i fill them in the pages. Now the problem is
>> that if users opens two forms together and fills some data and then
> 
> I suppose you mean the same user opens two instances of the same form...
> 
>> goes back to previous page, the session shows him the data (he filled
>> in the second form )in the first form.
>>
>> I know the problem is that they are using same session. But how to
>> avoid this? Any help will be highly appreciated!
> 
> Actually this isn't a Catalyst issue. You will always have this problem 
> when using sessions that share the same store for multiple requests.
> 
> Two options to avoid the problem:
> - Store already received data in hidden fields of the subsequent forms.

This is almost always the best approach, IMO. The state of the form is
kept with the form, where it belongs. There are no synchronization 
issues with the session.

Maurice



More information about the Catalyst mailing list