Can you *convert* it to TimeZone?

By wrapping w/ TimeZone.getTimeZone("GMT-05:00");  ?


Inside if setConverterTimeZone the CCE happens.
When you are using *hard coded* Strings, the else {} is executed.
By using EL / ValueBinding (timeZone="#{phrQueryManager.timeZone}") the if {}
is executed.

HTH,
Matthias

<snip>
private static void setConverterTimeZone(FacesContext facesContext,
                                            DateTimeConverter converter,
                                            String value)
   {
       if (value == null) return;
       if (UIComponentTag.isValueReference(value))
       {
           ValueBinding vb =
facesContext.getApplication().createValueBinding(value);
           converter.setTimeZone((TimeZone)vb.getValue(facesContext));
       }
       else
       {
           converter.setTimeZone(TimeZone.getTimeZone(value));
       }
   }
</snip>

On 5/31/06, Paul Spencer <[EMAIL PROTECTED]> wrote:
The type is string
   public String getTimeZone()
   {
     return "GMT-05:00";
   }

Paul Spencer

Matthias Wessendorf wrote:
>>    <f:convertDateTime type="time"
>> timeZone="#{phrQueryManager.timeZone}"/>
>
> Is this type of TimeZone ?
>
> *snip*
>       if (UIComponentTag.isValueReference(value))
>        {
>            ValueBinding vb =
> facesContext.getApplication().createValueBinding(value);
>            converter.setTimeZone((TimeZone)vb.getValue(facesContext));
>        }
> *snip*
>
> Regards,
> Matthias
>





--
Matthias Wessendorf
Aechterhoek 18
48282 Emsdetten
blog: http://jroller.com/page/mwessendorf
mail: mwessendorf-at-gmail-dot-com

Reply via email to