Discussions
Categories
- 196.7K All Categories
- 2.2K Data
- 234 Big Data Appliance
- 1.9K Data Science
- 449.8K Databases
- 221.5K General Database Discussions
- 3.8K Java and JavaScript in the Database
- 31 Multilingual Engine
- 549 MySQL Community Space
- 477 NoSQL Database
- 7.9K Oracle Database Express Edition (XE)
- 3K ORDS, SODA & JSON in the Database
- 532 SQLcl
- 4K SQL Developer Data Modeler
- 186.8K SQL & PL/SQL
- 21.2K SQL Developer
- 295.3K Development
- 17 Developer Projects
- 138 Programming Languages
- 292K Development Tools
- 104 DevOps
- 3.1K QA/Testing
- 645.9K Java
- 27 Java Learning Subscription
- 37K Database Connectivity
- 153 Java Community Process
- 105 Java 25
- 22.1K Java APIs
- 138.1K Java Development Tools
- 165.3K Java EE (Java Enterprise Edition)
- 17 Java Essentials
- 157 Java 8 Questions
- 85.9K Java Programming
- 79 Java Puzzle Ball
- 65.1K New To Java
- 1.7K Training / Learning / Certification
- 13.8K Java HotSpot Virtual Machine
- 94.2K Java SE
- 13.8K Java Security
- 203 Java User Groups
- 24 JavaScript - Nashorn
- Programs
- 389 LiveLabs
- 37 Workshops
- 10.2K Software
- 6.7K Berkeley DB Family
- 3.5K JHeadstart
- 5.6K Other Languages
- 2.3K Chinese
- 170 Deutsche Oracle Community
- 1K Español
- 1.9K Japanese
- 230 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,243 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?