Doing two Declarative Operations with One Button

You can file the below video under "things that get asked on OTN a lot".
With ADF it is very easy to drag an operation to a page to create a button that activate it.
But what if you want a single button to invoke two operations? For example have a button that does a "Delete" as well as a "Commit".

The way to do it is to add an action binding, and then overwrite the button function in a backing bean to call the additional action.

The nice thing is that JDeveloper will create all the binding code for you in the backing bean - all you need to do is duplicate it.

Here is a quick demo:

Comments:

Hello,
Very useful post. Thank you !

I have 2 tables
create table Master1 (key number, headerdesc varchar2(10));
create table detail1 (head_key number, sequence number, detaildesc varchar2(10));

Need is to display/insert/edit/delete all the (2 from master+3 from detail) 5 fields in one shot.

Created 2 EOs/VOs for Master1 and detail1 and (VO1,VO2)
created an association between master1 and detail
on master1.key = detail1.head_key (1 to many)
and also created a updatable view link.

Then created another VO combining both master+detail entities VO3.

Added this VO3 (has 5 fields from EO1 and EO2) from data control to test.jspx
and added a "CreateInsert" button from VO3 also.

When I run
> all 5 fields are editable and get committed nicely
> BUT when I click on the "CreateInsert" button only 3 fields of the total 5 are enterable.

Why please? How can I make all the 5 fields enterable so that I can insert them?

Thanks

Posted by guest on August 07, 2011 at 12:40 AM PDT #

Hi, Good day. I also stack that point for a very long time. The way that I could solve that issue

" BUT when I click on the "CreateInsert" button only 3 fields of the total 5 are enterable."

Kindly follow the below steps :
1. Create a task flow.
2. At the Start Page of the task flow, drag Method Call (Component Palette)
3. In that task flow then drag the 'Create' / 'Create Insert' operation from the respective Data Controls.

Should you have any inquiry, kindly don't hesitate to contact or mail me.
Thanks, ziner80@yahoo.com

Posted by Ziner on January 29, 2013 at 07:54 PM PST #

Post a Comment:
  • HTML Syntax: NOT allowed
About

me
I'm a Director of Product Management for the Oracle Java Development Tools.
Follow me:
Search

Archives
« April 2014
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
8
9
10
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
   
       
Today