01 August, 2011

Get sequence next value in ADF

I will present how to use ADF BC to get next value of sequence.

1- Creating Method 

We can create generic method that I will pass to it sequence name and it will return next value.

As we noticed in previous code that I use SequenceImpl to get sequence value.

2- Use that method at Entity Object Attribute to set default value of attribute

 first set value type of attribute to Expression .
 set Value as adf.object.getSequenceValue("My_seq_name").

3- Use getSequenceValue at Entity Object Impl

we can set default value to attribute of  Entity Object in EntityObjectImpl class itself by overriding Create method and set attribute value to sequence value.

Mahmoud A. El-Sayed

OAF :Formatting DateTime Fields

Use the following code to format DateTime feilds in OAF OAWebBean departureDateBean = webBean.findChildRecursive("DepartureDate"...