Follow by Email

Friday, 23 November 2012

ADF Basics: Set Default Values in Entity Object for every CreateInsert

Sometimes we have to set some same(default) values for each new row for this we use literal value option in EntityObject XML file or we can set that value in EO(EntityObject) Impl class.
EOImpl Class has a method named

 protected void create(AttributeList attributeList) {

You can set default values there
For this we have to create Entity Impl class of EntityObject , Open EntityObject and select Java tab and click on edit icon

Check Accessors and Create Method checkbox

Now set values using accessors like this -

     * Add attribute defaulting logic in this method.
     * @param attributeList list of attribute names/values to initialize the row
    protected void create(AttributeList attributeList) {
        //Setting default values

or can set in Literal Value of EO xml file

Set default value in Entity Object Literal Value

This is how you can set default values in Entity Object


  1. Some time I am not clear idea in Set Default Values in Entity Object,Thank you for help.
    Oracle ADF training in hyderabad.

  2. is there anyway to make sequance of serial without any gape ?