Discussions
Categories
- 197.1K All Categories
- 2.5K Data
- 546 Big Data Appliance
- 1.9K Data Science
- 450.7K Databases
- 221.9K General Database Discussions
- 3.8K Java and JavaScript in the Database
- 31 Multilingual Engine
- 552 MySQL Community Space
- 479 NoSQL Database
- 7.9K Oracle Database Express Edition (XE)
- 3.1K ORDS, SODA & JSON in the Database
- 555 SQLcl
- 4K SQL Developer Data Modeler
- 187.2K SQL & PL/SQL
- 21.3K SQL Developer
- 296.3K Development
- 17 Developer Projects
- 139 Programming Languages
- 293K Development Tools
- 109 DevOps
- 3.1K QA/Testing
- 646.1K Java
- 28 Java Learning Subscription
- 37K Database Connectivity
- 158 Java Community Process
- 105 Java 25
- 22.1K Java APIs
- 138.2K Java Development Tools
- 165.3K Java EE (Java Enterprise Edition)
- 19 Java Essentials
- 162 Java 8 Questions
- 86K Java Programming
- 81 Java Puzzle Ball
- 65.1K New To Java
- 1.7K Training / Learning / Certification
- 13.8K Java HotSpot Virtual Machine
- 94.3K Java SE
- 13.8K Java Security
- 204 Java User Groups
- 24 JavaScript - Nashorn
- Programs
- 466 LiveLabs
- 39 Workshops
- 10.2K Software
- 6.7K Berkeley DB Family
- 3.5K JHeadstart
- 5.7K Other Languages
- 2.3K Chinese
- 175 Deutsche Oracle Community
- 1.1K Español
- 1.9K Japanese
- 233 Portuguese
Subform submits data from other subforms

Hey all,
I'm playing around with subforms in a listView and I realized that clicking a button in one of the subforms was actually submitting the form data in all the subforms. I thought that perhaps this was because the subform was inside a iterator component like listView. However, I created a very basic page with two subforms and the same thing occurred.
Here is my page:
<f:view xmlns:f="http://java.sun.com/jsf/core" xmlns:af="http://xmlns.oracle.com/adf/faces/rich"> <af:document title="Test" id="d1"> <af:form id="f1"> <af:subform id="subForm1" default="true"> <af:panelFormLayout id="pfl5"> <f:facet name="footer"/> <af:inputText label="Label 1" id="it5"/> <af:button text="button 1" id="b6"/> </af:panelFormLayout> </af:subform> <af:subform id="subForm2" default="true"> <af:panelFormLayout id="pfl6"> <f:facet name="footer"/> <af:inputText label="Label 2" id="it4"/> <af:button text="button 2" id="b4"/> </af:panelFormLayout> </af:subform> </af:form> </af:document></f:view>
And as you can see from the browser's network inspector, after clicking "button 2", it submits the values from both subforms:
https://drive.google.com/file/d/1IdHREfEAbCyF4Az_mLOgj1MFRR9ojhYJ/view?usp=sharing
What am I doing wrong here? Also do you guys see an issue with putting a subform in a listView? Because that is my ultimate goal.
I'm on JDeveloper 12.2.1.4
Thanks,
BIll
Answers
-
Timo Hahn Senior Principal Technical Consultant - Oracle ACE Director Member, Moderator Posts: 38,551 Red Diamond
Both your subforms have set the default property set to true. This doesn't make sense as now submitting the data of one form submits the whole page (meaning every other form too).
Timo
-
Hey Timo,
Thanks for the reply. I tried all permutations of the default property (both false, one true the other false, visa versa) but the outcome is all the same - both values are submitted.
-
The document gets submitted, which submits all sub forms.
-
Hi @dvohra21,
So is there a way to submit the data in the subform only?
-
Any ideas anyone?