You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Vincent Oostindië <vi...@ordina.nl> on 2005/11/08 09:05:34 UTC

[2.1.7] LocaleAction and Cookie expiration

Hi, 
 
I use the LocaleAction to manipulate the user's locale. I want this locale to 
be kept in the cookie after the session ends, so that it is still available if 
the user accesses the application at a later date. 
 
Examining the code for the LocaleAction and the I18nUtils I noticed that the 
cookie is stored for the current session only. There's no way to change this 
(other than patching the code, that is). 
 
By the way: I read elsewhere that using the LocaleAction is 'out of fashion'. 
However this is the only i18n example I could find in the Cocoon 2.1.7 
examples. That's why I use it anyhow. 
 
Is there a simple way to persist the locale in a cookie for a longer period? A 
bit of Cocoon Flow maybe? 
 
TIA, 
 
Vincent 


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Re: [2.1.7] LocaleAction and Cookie expiration

Posted by Vincent Oostindië <vi...@ordina.nl>.
Torsten Curdt <tcurdt <at> apache.org> writes: 
> svn co http://... 
> change it 
> svn diff > output 
> send us the output 
 
I'm halfway there. The patch is surely coming, but probably no earlier than 
Saturday or Sunday. 
 
Vincent 


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Re: [2.1.7] LocaleAction and Cookie expiration

Posted by Vincent Oostindië <vi...@ordina.nl>.
Torsten Curdt <tcurdt <at> apache.org> writes:  
  
> svn co http://...  
> change it  
> svn diff > output  
> send us the output  
>   
> If it's a lot like the original it sounds like you should submit a    
> patch ;)  
  
I've just submitted a patch for issue COCOON-1592 in ASF JIRA  
(http://issues.apache.org/jira/browse/COCOON-1592)  
  
Have fun! 
  
Vincent  


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Re: [2.1.7] LocaleAction and Cookie expiration

Posted by Torsten Curdt <tc...@apache.org>.
> To be honest I'm not really 'into' Cocoon development. I've browsed  
> the
> website, the Wiki and parts of the code and that's about it. I'm  
> not very
> familiar with the procedures for submitting patches and such. I'll  
> have to find
> some time to look into that.

There is not much to it.

svn co http://...
change it
svn diff > output
send us the output

> I currently implemented a second LocaleAction  
> (PersistentCookieLocaleAction)
> that looks a lot like the original one (C&P) with some minor tweaks  
> (an extra
> setting called 'cookie-expiration').

If it's a lot like the original it sounds like you should submit a  
patch ;)

cheers
--
Torsten


Re: [2.1.7] LocaleAction and Cookie expiration

Posted by Vincent Oostindië <vi...@ordina.nl>.
Torsten Curdt <tcurdt <at> apache.org> writes: 
> 
> [snip!] 
>  
> Guys, feel free to submit a patch ;) 
>  
> cheers 
> -- 
> Torsten 
 
To be honest I'm not really 'into' Cocoon development. I've browsed the 
website, the Wiki and parts of the code and that's about it. I'm not very 
familiar with the procedures for submitting patches and such. I'll have to find 
some time to look into that. 
 
I currently implemented a second LocaleAction (PersistentCookieLocaleAction) 
that looks a lot like the original one (C&P) with some minor tweaks (an extra 
setting called 'cookie-expiration'). In the project I'm working on (in a team 
of 4) I can't really touch the Cocoon source - we're developing against a 
vanilla 2.1.7 distribution. 
 
But again, I'll see what I can do. 
 
Greetings, 
 
Vincent 
 
 


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Re: [2.1.7] LocaleAction and Cookie expiration

Posted by Torsten Curdt <tc...@apache.org>.
On 08.11.2005, at 13:20, Andrew Stevens wrote:

>> From: Vincent Oostindië <vi...@ordina.nl>
>> Date: Tue, 8 Nov 2005 08:05:34 +0000 (UTC)
>>
>> Hi,
>>
>> I use the LocaleAction to manipulate the user's locale. I want  
>> this locale to
>> be kept in the cookie after the session ends, so that it is still  
>> available if
>> the user accesses the application at a later date.
>>
>> Examining the code for the LocaleAction and the I18nUtils I  
>> noticed that the
>> cookie is stored for the current session only. There's no way to  
>> change this
>> (other than patching the code, that is).
>
> Sounds similar to the problem I had a few months ago.
>
> http://marc.theaimsgroup.com/?l=xml-cocoon-users&m=112195657011152&w=2
> http://marc.theaimsgroup.com/?l=xml-cocoon-dev&m=112384156925799&w=2
> http://issues.apache.org/bugzilla/show_bug.cgi?id=36524
> http://issues.apache.org/jira/browse/COCOON-1592
>
> I never did get any answer.  Hope you have better luck...

Guys, feel free to submit a patch ;)

cheers
--
Torsten


RE: [2.1.7] LocaleAction and Cookie expiration

Posted by Andrew Stevens <at...@hotmail.com>.
>From: Vincent OostindiĂŤ <vi...@ordina.nl>
>Date: Tue, 8 Nov 2005 08:05:34 +0000 (UTC)
>
>Hi,
>
>I use the LocaleAction to manipulate the user's locale. I want this locale 
>to
>be kept in the cookie after the session ends, so that it is still available 
>if
>the user accesses the application at a later date.
>
>Examining the code for the LocaleAction and the I18nUtils I noticed that 
>the
>cookie is stored for the current session only. There's no way to change 
>this
>(other than patching the code, that is).

Sounds similar to the problem I had a few months ago.

http://marc.theaimsgroup.com/?l=xml-cocoon-users&m=112195657011152&w=2
http://marc.theaimsgroup.com/?l=xml-cocoon-dev&m=112384156925799&w=2
http://issues.apache.org/bugzilla/show_bug.cgi?id=36524
http://issues.apache.org/jira/browse/COCOON-1592

I never did get any answer.  Hope you have better luck...


Andrew.



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org