af:subform, required fields and immediate="true"

The component tag documentation for the af:subform component states that ...

"the rich subform represents an independently submittable region of a page. The contents of a subform will only be validated (or otherwise processed) if a component inside of the subform is responsible for submitting the page or if the default attribute is set to true. This allows for comparatively fine-grained control of which components will be validated and pushed into the model without the compromises of using entirely separate form elements"

A known limitation, which is not yet documented, is for when input components within any of the sub forms of a page have their "immediate" property set to true. In this case validation is performed even if the component is not located in the submitted af:subform. The reason for this behavior is within the JSF lifecycle: Each af:subform tries to determine whether it has been submitted or not in a later part of the apply request phase. So if one of the input field components has its "immediate" property set to true, its validation is processed before the af:subform I is in has a chance to detect whether it has been submitted or not. As a result validation errors are shown. So when using af:subform, ensure none of the contained fields has its immediate property set to true.





Comments:

Post a Comment:
Comments are closed for this entry.
About

The Oracle JDeveloper forum ranks in the Top 5 of the most active forums on the Oracle Technology Network (OTN).



The OTN Harvest blog is a summary of selected topics posted on the OTN Oracle JDeveloper forum.



It is an effort to turn knowledge exchange into an interesting read for developers who enjoy little nuggets of wisdom





Frank Nimphius

Search

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