You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by Damar Thapa <th...@gmail.com> on 2006/10/29 13:18:05 UTC

Time field in JSF - what and how to use?

Hi

I am creating my first JSF application, using Myfaces1.1.4, tomahawk
and facelets.  In the application, I have to have one date field and
one time filed, and for both fields, I am using java.util.Date and
tomahawk inputeDate  component to receive user input. No problem with
date field, but I am having problem with Time field -- when I input
time, the output comes as the GMT equivalent of input time.  If I
input, for example, 11pm, the output (outputText) comes as 3pm (exact
time difference of HKT (where Iam) and GMT!).

Is this the righe behaviour of Date class? Can somebody on the list
gives me some pointers on what and how to use for time field?

Any pointers would be highly appreciated.

with regards,

Damar

Re: Time field in JSF - what and how to use?

Posted by Damar Thapa <th...@gmail.com>.
Hi Jeff,

Thanks for the link.  Now, I am using <h:/inputText, instead of
<t:inputedate, and is working fine.

Damar



On 10/31/06, Jeff Bischoff <jb...@klkurz.com> wrote:
> Damar,
>
> There was a thread [1] similar to this a couple weeks ago. I don't know
> if it will help or not.
>
> [1]
> http://www.nabble.com/DataConverter-Initializazion-tf2459978.html#a6857607
>
> Regards,
>
> Jeff Bischoff
> Kenneth L Kurz & Associates, Inc.
>
> Damar Thapa wrote:
> > Hi
> >
> > I am creating my first JSF application, using Myfaces1.1.4, tomahawk
> > and facelets.  In the application, I have to have one date field and
> > one time filed, and for both fields, I am using java.util.Date and
> > tomahawk inputeDate  component to receive user input. No problem with
> > date field, but I am having problem with Time field -- when I input
> > time, the output comes as the GMT equivalent of input time.  If I
> > input, for example, 11pm, the output (outputText) comes as 3pm (exact
> > time difference of HKT (where Iam) and GMT!).
> >
> > Is this the righe behaviour of Date class? Can somebody on the list
> > gives me some pointers on what and how to use for time field?
> >
> > Any pointers would be highly appreciated.
> >
> > with regards,
> >
> > Damar
> >
> >
> >
>
>
>


-- 
With regards,

Damar Thapa

Re: Time field in JSF - what and how to use?

Posted by Jeff Bischoff <jb...@klkurz.com>.
Damar,

There was a thread [1] similar to this a couple weeks ago. I don't know 
if it will help or not.

[1] 
http://www.nabble.com/DataConverter-Initializazion-tf2459978.html#a6857607

Regards,

Jeff Bischoff
Kenneth L Kurz & Associates, Inc.

Damar Thapa wrote:
> Hi
> 
> I am creating my first JSF application, using Myfaces1.1.4, tomahawk
> and facelets.  In the application, I have to have one date field and
> one time filed, and for both fields, I am using java.util.Date and
> tomahawk inputeDate  component to receive user input. No problem with
> date field, but I am having problem with Time field -- when I input
> time, the output comes as the GMT equivalent of input time.  If I
> input, for example, 11pm, the output (outputText) comes as 3pm (exact
> time difference of HKT (where Iam) and GMT!).
> 
> Is this the righe behaviour of Date class? Can somebody on the list
> gives me some pointers on what and how to use for time field?
> 
> Any pointers would be highly appreciated.
> 
> with regards,
> 
> Damar
> 
> 
>