Hi ! This post is about creating a Time Selector component in ADF. The component has dazzling view and can be easily altered to fit into your usecases.
I have created this with the help of instructions given at http://www.oracle.com/technetwork/developer-tools/jdev/adf-dvt-graph-howto-082848.html
Although, instruction provided are easy to understand but the component may start goofing around just because you make different choices of data types.
Steps:
1. Create a View Object from a table having a date column which you may want to display on the x-axis.
2. Now create another View object which will get executed on moving the time window.
Add two bind variables of type date.
3. Create a simple line graph with the date column in x axis.
4. Now search and add Time Selector component from palette into your line graph. It is this tag which makes the graph different from other line graphs.
5. Create a managed bean and add two variables of type sql.Date along with their accessor methods.
6. Select Explicit mode for time selector, add value to ExplicitStart and ExplicitEnd property. These field will determine the initial position of selector on the axis. Also create timeSelectorListener.
7. Write the execution logic for the dependent view object inside the timeSelectorListener in managed bean.
Although, instruction provided are easy to understand but the component may start goofing around just because you make different choices of data types.
Steps:
1. Create a View Object from a table having a date column which you may want to display on the x-axis.
2. Now create another View object which will get executed on moving the time window.
Add two bind variables of type date.
3. Create a simple line graph with the date column in x axis.
4. Now search and add Time Selector component from palette into your line graph. It is this tag which makes the graph different from other line graphs.
5. Create a managed bean and add two variables of type sql.Date along with their accessor methods.
6. Select Explicit mode for time selector, add value to ExplicitStart and ExplicitEnd property. These field will determine the initial position of selector on the axis. Also create timeSelectorListener.
7. Write the execution logic for the dependent view object inside the timeSelectorListener in managed bean.
Hello,
ReplyDeleteThank you for your helpful tutorial. I was following it step by step, but i am not able yet to display the time selector. Could you please provide more information, on how do you display in regular intervals the y axis of the first graph ( the lineGraph), and what version of jDeveloper are you using for this tutorial. Thanks in advance
set TimeRangeMode for your dvt:line graph as TRM_EXPLICIT
DeleteThanks for your hint. I have already tried that, but still the time axes aren't in a regular interval. I have also added the TimeRangeStart/End, that was suggested in the oracle documentation. It would be very nice if you could give the app so we can download it and test it, so I could see more properly what I'm missing. Thank you
DeleteYes sure ! please leave your email Id.
Deletelindseydevel@gmail.com
DeleteThanks again
Thanks for all...
ReplyDeleteCould you send me your jdev project by email?
khalid.adfdev@gmail.com