struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andrei Ivanov <andrei.iva...@gmail.com>
Subject Re: stack values in converter
Date Tue, 20 Jan 2009 08:30:10 GMT
On Tue, Jan 20, 2009 at 5:08 AM, dusty <dustin_pearce@yahoo.com> wrote:
>
> Sorry.  I don't think I understand your problem.  When you say the stack is
> being cleared are you seeing nulls in your converter for values that were
> previously populated on the stack by the Parameters Interceptor?
No

My interceptors stack is like this:
I18nInterceptor
...
ParamtersInterceptor
...

The I18nInterceptor does invocation.getInvocationContext().setLocale(locale);

The ParamtersInterceptor calls my DateConverter.
My DateConverter does Locale locale = (Locale)
context.get(ActionContext.LOCALE);
With xwork > 2.0.5, locale is null
Is there any other way to get the current locale from a converter?

>
>
>
> Andrei Ivanov-2 wrote:
>>
>> On Sat, Jan 17, 2009 at 7:30 PM, Andrei Ivanov <andrei.ivanov@gmail.com>
>> wrote:
>>> Hello,
>>> I have a date converter that does something like this:
>>>
>>> String value = values[0];
>>> Locale locale = (Locale) context.get(ActionContext.LOCALE);
>>> DateFormat df = DateFormat.getDateInstance(DateFormat.SHORT, locale);
>>> Date date = df.parse(value);
>>>
>>> The locale is set in the context by the
>>> com.opensymphony.xwork2.interceptor.I18nInterceptor
>>>
>>> After upgrading struts and xwork it seems this code doesn't work
>>> anymore, because of the changes
>>> made in ParametersInterceptor, which clear the stack values (begining
>>> with "boolean clearableStack = newStack instanceof
>>> ClearableValueStack;")
>>>
>>> What can I do to make it work again?
>>>
>>> Thank you
>>>
>>
>> Anyone?
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
>> For additional commands, e-mail: user-help@struts.apache.org
>>
>>
>>
>
> --
> View this message in context: http://www.nabble.com/stack-values-in-converter-tp21518740p21556233.html
> Sent from the Struts - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Mime
View raw message