How to develop a submit form based on master-detail & where Details table have a composite key (table_id,line item) as explain below?
My submit form should be like this:
Child_Table_Id LineItem Debit Credit Particulars Amount
JV060001 01 2001001 5001001 ADJ MADE 5,000.00
JV060001 02 3001001 1001001 ADJ MADE 6,000.00
JV060001 03 4001001 6001001 ADJ MADE 7,000.00
JV060001 04 1001001 7001001 ADJ MADE 8,000.00
26,000.00 Submit Delete Edit Cancel Commit
This form is based on two tables.
The Master table consists of two columns master_table_id and date.The primary key is master_table_id.
The Child table consists of six columns child_table_id,lineItem,debit,credit,particulars and amount.The Child table's primary key is a composite of child_table_id and lineItem.
The child_table_id = master_table_id that is it is also the foreign key refering to master table primary key.
Now, I want that when first row of child table completes that is first LineItem is filled by the user then next row is availbale to user to enter new data and it goes so and so until the user ends data entry.
Then all rows are submitted together by the user by clicking the Submit Button only once.
The default submit form provided by the adf fusion application has onely one row at a time.But I neet more than one rows as I explain above.
Please elp me by giving some small application or any useful tips.
Regards with Heart
- Guest asked July 12, 2014
You have to create a command button to create Detail table row and write following code on actionListener Method of button
BindingContext bindingctx=BindingContext.getCurrent(); BindingContainer binding=bindingctx.getCurrentBindingsEntry(); DCBindingContainer bindingsImpl = (DCBindingContainer) binding; DCIteratorBinding dciter = bindingsImpl.findIteratorBinding(iterName); ViewObject locvo=dciter.getViewObject(); Row r=locvo.createRow(); locvo.insertRow(r);
now create a Commit button to save transaction.
Please login first to submit.