Showing posts with label current date and time in adf. Show all posts
Showing posts with label current date and time in adf. Show all posts

Saturday 30 August 2014

Current Date and Time in ADF

Hello fellas,
today i'm sharing my learning to how to show current date and time in adf

First take a JSF(jspx) page and take a output field, 
create a managed bean, of the type Date(by extending java.util.Date),
make, value of the output field of the type of your bean



output will be like this,

use a convert date and time in the output field used. by searching it from component pallete and choose this one as we are using jspx.



use poll from the operations under component palette, set interval of the poll to 1000,



make a bind variable name,  create getters and setters.
select the poll from the structure, and go to the poll listner, and connect this listener to this  refreshPage method
bind the output text to the dates variable provided. 



code to be provided.
    public void refreshPage(PollEvent pollEvent) {
        refresh();
        AdfFacesContext.getCurrentInstance().addPartialTarget(dates);
    }
        protected void refresh() {
            FacesContext ctx = FacesContext.getCurrentInstance();
            String refreshpage = ctx.getViewRoot().getViewId();
            ViewHandler views = ctx.getApplication().getViewHandler();
            UIViewRoot view = views.createView(ctx, refreshpage);
            view.setViewId(refreshpage);
            ctx.setViewRoot(view);
        }


run the page.
you can download the application from here App 

thank you :)

A Guide to Installing Oracle HR Schema on an Existing Docker Container

  Hi Reader, Today I want to share my learning on how to install Oracle HR schema on a existing docker container. Step 1: Download the verif...