You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Stefan Simik <st...@gmail.com> on 2008/06/06 18:17:18 UTC

PackageResource - why does'nt get Locale directly from Session ?

Hi boys,

I would like to ask, why PackageResource doesn't take the Locale 
from the session, but in constructor ?
It could be comfortable, if no Locale specified in constructor, 
then it could be taken directly from the session.

Thanx for the answer.
Stefan Simik
-- 
View this message in context: http://www.nabble.com/PackageResource---why-does%27nt-get-Locale-directly-from-Session---tp17696134p17696134.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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


Re: PackageResource - why does'nt get Locale directly from Session ?

Posted by Stefan Simik <st...@gmail.com>.
yes, sure :)
It's OK, it is really my preference only ;)



Eelco Hillenius wrote:
> 
> We'd have to have a good reason the break the API. And it's just
> something you'd prefer to be different, but it doesn't give you
> troubles you can't get around, right? :-)
> 
> Eelco
> 
> On Mon, Jun 9, 2008 at 3:21 AM, Stefan Simik <st...@gmail.com>
> wrote:
>>
>> Oh yes :-)
>> I think, that taking Locale from session could be the most used => the
>> most
>> suitable default strategy.
>> Session is the most used place for storing Locale.
>> I think, that preferred way should be getting Locale from Session as
>> default.
>> Passing Locale parameter to the PackageResource constructor does'nt seem
>> to
>> me like a better way.
>> Who wants, can subclass PackageResource and override in you own specific
>> way.
>> What do you think about it ?
>>
>> Stefan
>>
>>
>>
>>
>> That's just by design to not make the assumption where the locale
>> comes from. But you can override the class and pass
>> Session.get().getLocale() and you're done :-)
>>
>> Eelco
>>
>> --
>> View this message in context:
>> http://www.nabble.com/PackageResource---why-does%27nt-get-Locale-directly-from-Session---tp17696134p17730001.html
>> Sent from the Wicket - User mailing list archive at Nabble.com.
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>> For additional commands, e-mail: users-help@wicket.apache.org
>>
>>
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/PackageResource---why-does%27nt-get-Locale-directly-from-Session---tp17696134p17737813.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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


Re: PackageResource - why does'nt get Locale directly from Session ?

Posted by Eelco Hillenius <ee...@gmail.com>.
We'd have to have a good reason the break the API. And it's just
something you'd prefer to be different, but it doesn't give you
troubles you can't get around, right? :-)

Eelco

On Mon, Jun 9, 2008 at 3:21 AM, Stefan Simik <st...@gmail.com> wrote:
>
> Oh yes :-)
> I think, that taking Locale from session could be the most used => the most
> suitable default strategy.
> Session is the most used place for storing Locale.
> I think, that preferred way should be getting Locale from Session as
> default.
> Passing Locale parameter to the PackageResource constructor does'nt seem to
> me like a better way.
> Who wants, can subclass PackageResource and override in you own specific
> way.
> What do you think about it ?
>
> Stefan
>
>
>
>
> That's just by design to not make the assumption where the locale
> comes from. But you can override the class and pass
> Session.get().getLocale() and you're done :-)
>
> Eelco
>
> --
> View this message in context: http://www.nabble.com/PackageResource---why-does%27nt-get-Locale-directly-from-Session---tp17696134p17730001.html
> Sent from the Wicket - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>

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


Re: PackageResource - why does'nt get Locale directly from Session ?

Posted by Stefan Simik <st...@gmail.com>.
Oh yes :-) 
I think, that taking Locale from session could be the most used => the most
suitable default strategy.
Session is the most used place for storing Locale.
I think, that preferred way should be getting Locale from Session as
default.
Passing Locale parameter to the PackageResource constructor does'nt seem to
me like a better way.
Who wants, can subclass PackageResource and override in you own specific
way.
What do you think about it ? 

Stefan




That's just by design to not make the assumption where the locale
comes from. But you can override the class and pass
Session.get().getLocale() and you're done :-)

Eelco

-- 
View this message in context: http://www.nabble.com/PackageResource---why-does%27nt-get-Locale-directly-from-Session---tp17696134p17730001.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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


Re: PackageResource - why does'nt get Locale directly from Session ?

Posted by Eelco Hillenius <ee...@gmail.com>.
That's just by design to not make the assumption where the locale
comes from. But you can override the class and pass
Session.get().getLocale() and you're done :-)

Eelco

On Fri, Jun 6, 2008 at 9:17 AM, Stefan Simik <st...@gmail.com> wrote:
>
> Hi boys,
>
> I would like to ask, why PackageResource doesn't take the Locale
> from the session, but in constructor ?
> It could be comfortable, if no Locale specified in constructor,
> then it could be taken directly from the session.
>
> Thanx for the answer.
> Stefan Simik
> --
> View this message in context: http://www.nabble.com/PackageResource---why-does%27nt-get-Locale-directly-from-Session---tp17696134p17696134.html
> Sent from the Wicket - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>

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