« Tricks for the New JSF Visual Editor in JDeveloper 11g PS1 | Main | Passing Value Between Pages to Filter a View Object »

A Time/Hour Selector in ADF Faces - Did you know?

I must admit that I wasn't aware of this and I'm guessing that if this is news for me it might be news for other people so I wanted to blog about it.

Turns out that the af:inputDate components in ADF Faces can actually allow your customers to select a time(hour/minutes/seconds) as well as a date.

All you have to do to see it in action is give your ADF BC EO date field the type of Timestemp instead of Date, and possibly add a nice format mask under the UI hints like: yyyy-MM-dd HH:mm:ss
and you should get a calendar popup that looks like this:

datetime.jpg

While we are on the subject of date and time, I'll put another note here that the format mask that you use for an ADF BC date or timestemp format comes from the Java Date type.
Something like the table you can find here.

Comments (1)

Rajbala Makar:

Hi Shay:
Thanks a lot for this post. I have been looking for a time selector for a while and not able to find it in the docs before reading this. I have a question - i only need the time portion and not the date. Can this be done? Ideally the page itself will have the time portion of the popup. I will try editing the mask to see if it works just by doing that.
Thanks,
Raj

Post a comment

(If you haven't left a comment here before, you may need to be approved by the site owner before your comment will appear. Until then, it won't appear on the entry. Thanks for waiting.)

About This Entry

This page contains a single entry from the blog posted on November 20, 2009 4:04 PM.

The previous post in this blog was Tricks for the New JSF Visual Editor in JDeveloper 11g PS1.

The next post in this blog is Passing Value Between Pages to Filter a View Object.

Many more can be found on the main index page or by looking through the archives.

Powered by
Movable Type and Oracle