Monday, November 11, 2013

Calling ADF Action Binding Programmatically

 بسم الله الرحمن الرحيم
اللهم علمنا ما ينفعنا وانفعنا بما علمتنا يا رب العالمين
---------------
Calling ADF Action Binding Programmatically
استدعاء Insert , Update , Delete , Commit ... ect بشكل برمجي

1- انشاء صفحة jspx وداخلها ضيف oracle adf table or form
2- ضيف button واضغط عليه مرتين هيطلب منك انشاء كلاس انشاه
3- وهذا هو كود استدعاء CURD

1:  public String insertAction()  
2:  {  
3:   BindingContainer bindings = BindingContext.getCurrent().getCurrentBindingsEntry();  
4:   OperationBinding operationBinding = bindings.getOperationBinding("CreateInsert");  
5:   Object result = operationBinding.execute();  
6:   // do not forget to handle the errors here.  
7:   if (!operationBinding.getErrors().isEmpty())  
8:   {  
9:   return null;  
10:  }  
11:   return null;  
12:  }  


4- اذهب للصفحة ومن bindings وضيف الاكشن



كما تري هنا تم اختير CreateInsert لو انت عاوز تعمل Delete مثلا هيتم اختيار Delete
وفي الكود يتم تغير كلمة CreateInsert الي Delete وهكذا مع باقي الاكشانز 

والسلام عليكم ورحمته الله وبركاته
<< سبحانك اللهم وبحمدك أشهد أن لا اله الا أنت أستغفرك وأتوب اليك >>

1 comment :

  1. HI im new for oracle ADF can u please help me on reset password functionality...i need from sract like crating project and all stuff

    ReplyDelete

Related Posts Plugin for WordPress, Blogger...