Mitkees & Webcenter

Into the charm of Oracle Webcenter and ADF

Category Archives: Java

Getting selected time in ADF calendar


It took me about 6 hrs to know how ADF calendar component set the time in the popup form the project posted here.

But it didn’t satisfy the implementation needs as it passes the time automatically through the calendarModel behind the scene,after some investigations , i found that there are some events associated with the calendar that can helps.

I used the Calendar event  listener property and created a method that takes CalendarEvent as a parameter and used the CalendarEvent object to get the triggered time as below.

 

 

    public void calEvent(CalendarEvent ce){
       System.out.println(ce.getTriggerDate().clone());
        
    }

    <af:calendar value="#{bindings.CalendarView1.calendarModel}" id="c1" availableViews="all"
                         view="month" startDayOfWeek="mon" startHour="9"
                         listCount="356"
                         calendarActivityListener="#{Business.activityListener}"
               calendarListener="#{Business.calEvent}"/>

Advertisements
%d bloggers like this: