How To Avoid The JBO-27014 Error During The AutoSubmit


When your ADF Faces page includes a component with the property autoSubmit set to true, you get the following error:

JBO-27014: Field <fieldName> in <AppModule>.<ViewObject> is mandatory

for a component with the property immediate set to true.

This happens f.ex. when you try to populate a Description field as soon as the end user typed the Code value.

This error is raised because of the immediate on the component, what implies that the component's value will
be validated before any input components that do not have the immediate
attribute set to true.
At the time of the validation, this component hasn't got its value yet and the error is raised.


You can easily workaround this problem as the following:

  1. in the backing bean, add a boolean variable ppr true when a Partial Request occurs:
    (...)
    import oracle.adfinternal.view.faces.renderkit.core.xhtml.PartialPageUtils;
    (...)
    private boolean ppr;
    (...)
    public void setPpr(boolean ppr) {
       this.ppr = ppr;
    }

    public boolean isPpr() {
       FacesContext fctx = FacesContext.getCurrentInstance();
       return PartialPageUtils.isPartialRequest(fctx);
    }
    (...)

  2. use it in the required property of the mandatory field:
    <af:inputText ...
                  required="#{! backing_validation.ppr}"
                  immediate="true" ... />

Comments:

i have added same code, in my case i have few 10 fields which distributed in two different tabs. if we keep some manadatory columns in second tab. when i move from first tab to second tab. it showing rquired field error. pls. help us to resolve.

Posted by bmgan on May 14, 2008 at 03:57 PM CEST #

This should work for any PPR (Partial Page Rendering).
The point is that you create a boolean switch in your bean for deciding when the "required" property should be evaluated to true.
This can be, f.ex. when you reach a certain point in your process flow, ...

Regards,

Didier.

Posted by Didier Laurent on May 14, 2008 at 05:33 PM CEST #

In JDeveloper 11g, replace import oracle.adfinternal.view.faces.renderkit.core.xhtml.PartialPageUtils with import org.apache.myfaces.trinidadinternal.renderkit.core.xhtml.PartialPageUtils

Posted by Didier on January 30, 2009 at 04:16 AM CET #

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

Didier Laurent - Sr Principal Support Engineer in the JDeveloper team

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