Mitkees & Webcenter

Into the charm of Oracle Webcenter and ADF

Monthly Archives: December 2013

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}"/>

Updating Bunises components with the Database Tables.


I used to work hibernate & JPA before developing ADF business components and i was wondering why As ADF business components based on the ORM (object relational mapping) and does not  have reverse mapping from objects to database.

I figured out a way to do it , but it is not directly wizard steps.

  1. create your entity objects
  2. Create database connection to your empty database.
  3. Create An application module based on the database connection and add your entity objects in its XML
  4. make sure the package of the entity objects are the same in the application module
  5. right click on the package and synchronize with the database.

Create Vs. CreateInsert


Most of ADF developers asked about the idea behind CreateInsert and what is the difference between it and Create . I will discuss the difference in 2 points referring to Andrejus Baranovskis’s Blog.

  1. Create works with forms only,but CreateInsert works with ADF tables and Forms.
  2. you can’t create new record without finishing the previous record in a Form ( ie: won’t bypass Validations) but you can createInsert a record at any time .
%d bloggers like this: