How do I submit two forms from a single page in adf?

389 Views Asked by At

I am using ADF to build the front end and Toplink for DB transactions. I wanted to show 2 create forms on a single jspx page. Both the forms are from two different objects i.e it doesn't have a parent child relationship. How can I submit the values of both the forms to the backend when the user clicks on the single submit button using ADF? Any tutorials or examples would be appreciated.

Thanks

2

There are 2 best solutions below

0
Florin Marcus On

ADF doesn’t work the way you think it does: each page is a single form. You may, however use two distinct af:panelFormLayout components that look as two different forms from UI perspective. But an af:button button will submit the the entire page as a single form. Check some examples of ADF pages. You will see that the structure goes like: <af:document><af:view><af:form> ... any other components .

0
Shay Shmeltzer On

You need to overwrite the button method to call the two methods you want it to execute. Here are the basics of how to overwrite a declarative button: https://blogs.oracle.com/shay/doing-two-declarative-operations-with-one-button