Hello Volker,

Here is one problem... java.util.Date can hold date-time values. So if
formatting process always take java.util.Date values to format as Date
then time part of value always will be unaccessable.

I agree with you - java.util.Date values must be converted as Date
values too. But how do we switch between Date, Time and Date-Time
values?

I view one way to solve such problem - add formatKey attribute to hold
key to retrieve format string from resources.

Wednesday, December 12, 2001, 5:23:37 PM, you wrote:

VK> Volker Krebs wrote:

>> Hello,
>> 
>> I wanted to use the new <bean:write> format mechanism,
>> I specified my format strings in the message resources.
>> So far so good ... everything was fine, but when I changed the
>> user locale with Action.setLocale() nothing happend for
>> FLOAT_FORMAT_KEY.
>> The Problem is in
>> org.apache.struts.taglib.bean.WriteTag.formatValue(...)
>> after line 318.

VK> Ok thanks for fixing that, I found somethig else,
VK> if we have a java.util.Date a toString is printed.

VK> } else if ((value instanceof java.sql.Date) ||
VK>       value instanceof java.util.Date) { //check also for util.Date
VK>    formatStr = RequestUtils.message(pageContext, this.bundle,
VK>                this.localeKey, DATE_FORMAT_KEY);
VK> }

VK> You also have to check if the type is java.util.Date and
VK> use the DATE_FORMAT_KEY for this type.

VK> thanks

VK> Volker


VK> --
VK> To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
VK> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>



-- 
Best regards,
 Oleg                            mailto:[EMAIL PROTECTED]



--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to