You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by David Geary <sa...@tri-lakesonline.net> on 2000/08/13 00:54:36 UTC

ActionBase.setLocale()

Perhaps there should be an ActionBase.setLocale method to complement
getLocale. As far as I can tell, setting the locale must be done like
so:

// in an action ...
session.setAttribute(Action.LOCALE_KEY, locale);

This use of Action.LOCALE_KEY seems a little out of step with the other
Action constants such as Action.MAPPINGS and Action.FORWARDS because
they are not typically directly accessed by developers.


david


Re: ActionBase.setLocale()

Posted by "Craig R. McClanahan" <Cr...@eng.sun.com>.
David Geary wrote:

> Perhaps there should be an ActionBase.setLocale method to complement
> getLocale. As far as I can tell, setting the locale must be done like
> so:
>
> // in an action ...
> session.setAttribute(Action.LOCALE_KEY, locale);
>
> This use of Action.LOCALE_KEY seems a little out of step with the other
> Action constants such as Action.MAPPINGS and Action.FORWARDS because
> they are not typically directly accessed by developers.
>

That makes sense.  This will be added in a round of patches that I will be
doing later today.

>
> david

Craig



Re: ActionBase.setLocale()

Posted by "Craig R. McClanahan" <Cr...@eng.sun.com>.
David Geary wrote:

> Perhaps there should be an ActionBase.setLocale method to complement
> getLocale. As far as I can tell, setting the locale must be done like
> so:
>
> // in an action ...
> session.setAttribute(Action.LOCALE_KEY, locale);
>
> This use of Action.LOCALE_KEY seems a little out of step with the other
> Action constants such as Action.MAPPINGS and Action.FORWARDS because
> they are not typically directly accessed by developers.
>

That makes sense.  This will be added in a round of patches that I will be
doing later today.

>
> david

Craig