ValidateEntity() is executed on autosubmit in 11.1.2.1.0

Hi,
I am implementing a page in 11.1.2.1.0 with similar functionality as the one described in “Defining the LOV on a Reference Attribute in Oracle ADF 11g” (http://andrejusb.blogspot.com/2009/11/defining-lov-on-reference-attribute-in.html) with the following difference.
The JobTitle LOV has autosubmit = “true” in order to refresh a visible Job ID on value change.
The overridden validateEntity() method is executed on lost focus of the JobTitle causing error messages of irrelevant required fields. As far as i know it should be called on record change or commit transaction.
I tried the same code in 11.1.1.4 with no problem at all.
Please advice me
Yiannis

Yiannis,
I just did a test in 11.1.2.1.0, and I cannot reproduce what you are seeing. I created an EO/VO on the standard HR.DEPARTMENTS table, overrode validateEntity in the EO and created a simple page. I put autoSubmit=true on the department name for testing. Result: no validateEntity firing on autosubmit, but it does fire when I click the Submit button. There seems to be something more going on in your case.
Code:
Page:
<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<f:view xmlns:f="http://java.sun.com/jsf/core" xmlns:af="http://xmlns.oracle.com/adf/faces/rich">
  <af:document title="untitled1.jsf" id="d1">
    <af:messages id="m1"/>
    <af:form id="f1">
      <af:panelFormLayout id="pfl1">
        <af:inputText value="#{bindings.DepartmentId.inputValue}" label="#{bindings.DepartmentId.hints.label}"
                      required="#{bindings.DepartmentId.hints.mandatory}"
                      columns="#{bindings.DepartmentId.hints.displayWidth}"
                      maximumLength="#{bindings.DepartmentId.hints.precision}"
                      shortDesc="#{bindings.DepartmentId.hints.tooltip}" id="it1">
          <f:validator binding="#{bindings.DepartmentId.validator}"/>
          <af:convertNumber groupingUsed="false" pattern="#{bindings.DepartmentId.format}"/>
        </af:inputText>
        <af:inputText value="#{bindings.DepartmentName.inputValue}" label="#{bindings.DepartmentName.hints.label}"
                      required="#{bindings.DepartmentName.hints.mandatory}"
                      columns="#{bindings.DepartmentName.hints.displayWidth}"
                      maximumLength="#{bindings.DepartmentName.hints.precision}"
                      shortDesc="#{bindings.DepartmentName.hints.tooltip}" id="it2" autoSubmit="true">
          <f:validator binding="#{bindings.DepartmentName.validator}"/>
        </af:inputText>
        <af:inputText value="#{bindings.ManagerId.inputValue}" label="#{bindings.ManagerId.hints.label}"
                      required="#{bindings.ManagerId.hints.mandatory}"
                      columns="#{bindings.ManagerId.hints.displayWidth}"
                      maximumLength="#{bindings.ManagerId.hints.precision}"
                      shortDesc="#{bindings.ManagerId.hints.tooltip}" id="it3">
          <f:validator binding="#{bindings.ManagerId.validator}"/>
          <af:convertNumber groupingUsed="false" pattern="#{bindings.ManagerId.format}"/>
        </af:inputText>
        <af:inputText value="#{bindings.LocationId.inputValue}" label="#{bindings.LocationId.hints.label}"
                      required="#{bindings.LocationId.hints.mandatory}"
                      columns="#{bindings.LocationId.hints.displayWidth}"
                      maximumLength="#{bindings.LocationId.hints.precision}"
                      shortDesc="#{bindings.LocationId.hints.tooltip}" id="it4">
          <f:validator binding="#{bindings.LocationId.validator}"/>
          <af:convertNumber groupingUsed="false" pattern="#{bindings.LocationId.format}"/>
        </af:inputText>
        <f:facet name="footer">
          <af:panelGroupLayout layout="vertical" id="pgl1">
            <af:panelGroupLayout layout="horizontal" id="pgl2">
              <f:facet name="separator">
                <af:spacer width="10" height="1" id="s1"/>
              </f:facet>
              <af:commandButton actionListener="#{bindings.First.execute}" text="First"
                                disabled="#{!bindings.First.enabled}" partialSubmit="true" id="cb1"/>
              <af:commandButton actionListener="#{bindings.Previous.execute}" text="Previous"
                                disabled="#{!bindings.Previous.enabled}" partialSubmit="true" id="cb2"/>
              <af:commandButton actionListener="#{bindings.Next.execute}" text="Next"
                                disabled="#{!bindings.Next.enabled}" partialSubmit="true" id="cb3"/>
              <af:commandButton actionListener="#{bindings.Last.execute}" text="Last"
                                disabled="#{!bindings.Last.enabled}" partialSubmit="true" id="cb4"/>
            </af:panelGroupLayout>
            <af:commandButton text="Submit" id="cb5"/>
          </af:panelGroupLayout>
        </f:facet>
      </af:panelFormLayout>
    </af:form>
  </af:document>
</f:view>EO:
  private static ADFLogger _LOG = ADFLogger.createADFLogger("model.DepartmentsImpl");
  protected void validateEntity()
    _LOG.severe("In ValidateEntity");
    super.validateEntity();
  }John

Similar Messages

  • Urgent : Timezone conversion issue

    Hi,
    I am having an issue in timezone conversion.Im trying to convert a date type value to server timzone before insert into table. Im writing the conversion code in validateEntity(). Im using OANLSServices methods for conversion.Since i have to pass java.util.Date to this convertTimezone() as first parameter(date to be converted),im converting the reqd date which is in oracle Date type to java util Date type. Function is returing java.util.date type, which is again converted to oracle Date type. then im passing this value to the setMethod, ie., setJoiningDate(Date ) in my case.
    the code is compiled with 0 errors. But wen i run the page and after entering date value and click save button , its throwing some exception like "oracle.jbo.ValidationException: JBO-28200: Validation threshold limit reached. Invalid Entities still in cache"
    and in the debug console, this code in the validateEntity() is executed 10 times. First time it is converting the date time value to date only format, then same this is executed 9 more times. Can anyone help to resolve this issue? Its very urgent.
    Thanks
    Harsha

    Harsha,
    Use this code and try again...!
    oracle.jbo.domain.Date join = getJoiningDate();
    // to convert oracle Date to Java util Date
    java.sql.Date joinSql =(java.sql.Date)join.dateValue();
    java.util.Date jdateUtil =
    getOADBTransaction().getOANLSServices().convertTimezone(joinSql,
    getOADBTransaction().getOANLSServices().getUserTimeZoneCode(),
    getOADBTransaction().getOANLSServices().getServerTimeZoneCode());
    // to convert back to oracle Date
    java.sql.Date jdateSql = new java.sql.Date(jdateUtil.getTime());
    oracle.jbo.domain.Date jdate = new oracle.jbo.domain.Date(jdateSql);
    setJoiningDate(jdate);
    --Mukul                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • Adf valueChangeListener autosubmit=true, execute code after update model

    Hello.
    I'm working with the valueChangeListener and autosubmit="true". I'll try to explain my situation
    with an example.
    jsp:
    <af:form>
         <af:panelForm>
              <af:inputText
                   id="value1"
                   label="Value1"
                   value="#{index.myObject.value1}"
                   autoSubmit="true"
                   valueChangeListener="#{index.changeListener1}"/>
              <af:inputText
                   id="value2"
                   label="Value2"
                   value="#{index.myObject.value2}"/>
         </af:panelForm>
    </af:form>
    backing:
    public class Index {
        private MyObject myObject;
        public Index() {
            myObject = new MyObject();
        public void changeListener1(ValueChangeEvent valueChangeEvent){
              doSomethingWithMyObject(myObject);
        // ... get/set of myObject
    MyObject:
    public class MyObject {
        private String value1;
        private String value2;
        public MyObject() {}
         //getters/setters...
    }In the line doSomethingWithMyObject(myObject) i need myObject with the actual values in the user form.
    in the example above, the first time the page is rendered and shows the inputs
    if the user captures something in the 1st input and then hits the tab to go to the other input
    the valueChangeEvent is fired, and the code in "index.changeListener1" executed, but at this moment
    the model (myObject) hasn't been updated with the data that the user entered (Validation Phase).
    So i need a way to execute my code called from the "valueChangeEvent" but after the model has been updated
    Some notes about my problem:
         - The doSomethingWithMyObject(myObject) could update data in myObject
         - About binding="#{x.y}":
         I know i can use the binding attribute in the tag <af:inputText binding="#{x.y}"> and then in the code of
         the changelistener the binded component always have the most recent value from the user,
         but i cant' use that, the method needs a MyObject instance.
         - I don't think create a new instance of MyObject and populate it every time the event fires is a good way
         - doSomethingWithMyObject" is a black box, so i don't know what is going to do with myObject
         - In my problem there are more than 2 inputs there will be N components M listeners.
    What I'm trying:
         PhaseListener:
         I have been implementing a solution with a PhaseListener like
         public void afterPhase(PhaseEvent phaseEvent) {
              // just after UPDATE_MODEL_VALUES phase
              FacesContext f = FacesContext.getCurrentInstance();
            Index i = (Index) f.getApplication().createValueBinding("#{index}").getValue(f);
              // at this point the model is updated
              doSomethingWithMyObject(i.getMyObject);
         public PhaseId getPhaseId() {
            return PhaseId.UPDATE_MODEL_VALUES;
              this works but i don't know if this is the answer according to this post (unanswered at this time):
              http://forums.oracle.com/forums/thread.jspa?threadID=611643
         says something about that PhaseListener is not thread safe and blocks the application with more
         than 1 user.
         A wrapper:
         using the controls binded to the backing
         public class Index {
              private MyObject myObject;
              private CoreInputText inputValue1;
              private CoreInputText inputValue2;
              //listener
              //getters/setters
         }     make a wraper like
         public class MyObjectW {
             private Index index; // wrap the backing index
             public MyObjectW(Index index) {
                 this.index = index;
             public String getValue1(){
                 return (String) index.getInputValue1().getValue();
             public String getValue2(){
                 return (String) index.getInputValue2().getValue();
             public void setValue1(Object v){
                 index.getInputValue1().setValue(v);
             public void setValue2(Object v){
                 index.getInputValue2().setValue(v);
        }and then call in the index backing:
    doSomethingWithMyObject( new MyObjectW(this)); so it will access to the most actual values from user at the valueChangeEvent
    But i really would like some way to execute my code called from the "valueChangeEvent" but after the model has been updated
    so i dont need to wrap or implement PhaseListener
    what do you think, what do you suggest, have any solution or a way to do what I'm trying?
    thank you for your help...
    Message was edited by:
    akanewsted

    Hello Frank, thanks for the response.
    When you say
    "If you need an updated object in this listener then you can update it from the value change listener as well"
    you mean i can update the object by myself with the value from getNewValue()? or is there another way
    to call to update the models at this time ?
    I know i have the methods "getOldValue()" and "getNewValue()" in the "ValueChangeEvent" but what if i need
    the actual value from the user in other control than the one that fires the event
    example
    Two inputs:
    in the input1 the user enters some data
    in the input2 when some data is entered it fires valueChangeListener (autosubmit=true)
    in that case what if i need the value the user just entered in the input1 in the valueChangeListener of
    the input2.
    In general the app I'm working must do:
    dynamically generate the controls in the form (inputs, selects etc)
    Attach the control values to a model ( <af:inputText value=#{model.x}"/>
    sometimes execute some script when a value change in a control (valueChangeListener)
    those scripts uses the model (and needs to be an updated model)
              script = " if (value2 = 'xyz') then value1='abc'; return true;";
    if the model is not updated
    the script will use old values and will be wrong
    or if the script change some value in the model, when the update model phase occurs the value from
    the script is lost.
    that's why i need to work directly with the model and not the values in the ValueChangeEvent
    Is there a way to use something like an action in the change of a control value?
    that way the code will execute in the invoke application phase, can this be done ?
    how i can execute code in the invoke application when a valueChangeEvent occurs ?
    hope this help to explain more my situation.
    Thank you for your help and time.

  • Error while autoSubmit = true in table row fields.

    I am having a data table bonded with a VO object. Table contains records in a inputText. When clicking on Add button adds a new blank row in the table. I need to update this row input fields and need to retrieve the latest Vo on server side. For that I am trying to set autoSubmit value to true on each text field of the column.
    However I am getting following error.
    Target Unreachable, identifier 'row' resolved to null
    ADF_FACES-60097:For more information, please see the server's error log for an entry beginning with: ADF_FACES-60096:Server Exception during PPR, #9
    Can you please help.

    jspx page*
    <af:commandImageLink text="> Advance View" id="cil1" useWindow="true"
    windowEmbedStyle="inlineDocument" windowHeight="475" windowWidth="325"
    action="lov" returnListener="#{browseEmployeesBean.onDialogReturn}"
    launchListener="#{browseEmployeesBean.launchHandler}"
    immediate="true"/>
    <af:panelFormLayout>
    <af:commandButton actionListener="#{bindings.CreateInsert.execute}"
    text="Add Row"
    disabled="#{!bindings.CreateInsert.enabled}"
    id="cb1"/>
    <af:table value="#{bindings.departmentsLookup.collectionModel}"
    binding="#{browseEmployeesBean.dataTable}"
    var="row" rows="#{bindings.departmentsLookup.rangeSize}"
    emptyText="#{bindings.departmentsLookup.viewable ? 'No data to display.' : 'Access Denied.'}"
    fetchSize="#{bindings.departmentsLookup.rangeSize}"
    rowBandingInterval="0" id="t1">
    <af:column sortProperty="DepartmentId" sortable="false"
    headerText="#{bindings.departmentsLookup.hints.DepartmentId.label}"
    id="c1">
    <af:inputText value="#{row.bindings.DepartmentId.inputValue}" autoSubmit="true"
    label="#{bindings.departmentsLookup.hints.DepartmentId.label}"
    required="#{bindings.departmentsLookup.hints.DepartmentId.mandatory}"
    columns="#{bindings.departmentsLookup.hints.DepartmentId.displayWidth}"
    maximumLength="#{bindings.departmentsLookup.hints.DepartmentId.precision}"
    shortDesc="#{bindings.departmentsLookup.hints.DepartmentId.tooltip}"
    id="it7">
    <f:validator binding="#{row.bindings.DepartmentId.validator}"/>
    <af:convertNumber groupingUsed="false"
    pattern="#{bindings.departmentsLookup.hints.DepartmentId.format}"/>
    </af:inputText>
    </af:column>
    <af:column sortProperty="DepartmentName" sortable="false"
    headerText="#{bindings.departmentsLookup.hints.DepartmentName.label}"
    id="c3">
    <af:inputText value="#{row.bindings.DepartmentName.inputValue}" autoSubmit="true"
    label="#{bindings.departmentsLookup.hints.DepartmentName.label}"
    required="#{bindings.departmentsLookup.hints.DepartmentName.mandatory}"
    columns="#{bindings.departmentsLookup.hints.DepartmentName.displayWidth}"
    maximumLength="#{bindings.departmentsLookup.hints.DepartmentName.precision}"
    shortDesc="#{bindings.departmentsLookup.hints.DepartmentName.tooltip}"
    id="it6">
    <f:validator binding="#{row.bindings.DepartmentName.validator}"/>
    </af:inputText>
    </af:column>
    <af:column sortProperty="ManagerId" sortable="false"
    headerText="#{bindings.departmentsLookup.hints.ManagerId.label}"
    id="c2">
    <af:inputText value="#{row.bindings.ManagerId.inputValue}" autoSubmit="true"
    label="#{bindings.departmentsLookup.hints.ManagerId.label}"
    required="#{bindings.departmentsLookup.hints.ManagerId.mandatory}"
    columns="#{bindings.departmentsLookup.hints.ManagerId.displayWidth}"
    maximumLength="#{bindings.departmentsLookup.hints.ManagerId.precision}"
    shortDesc="#{bindings.departmentsLookup.hints.ManagerId.tooltip}"
    id="it8">
    <f:validator binding="#{row.bindings.ManagerId.validator}"/>
    <af:convertNumber groupingUsed="false"
    pattern="#{bindings.departmentsLookup.hints.ManagerId.format}"/>
    </af:inputText>
    </af:column>
    <af:column sortProperty="LocationId" sortable="false"
    headerText="#{bindings.departmentsLookup.hints.LocationId.label}"
    id="c4">
    <af:inputText value="#{row.bindings.LocationId.inputValue}" autoSubmit="true"
    label="#{bindings.departmentsLookup.hints.LocationId.label}"
    required="#{bindings.departmentsLookup.hints.LocationId.mandatory}"
    columns="#{bindings.departmentsLookup.hints.LocationId.displayWidth}"
    maximumLength="#{bindings.departmentsLookup.hints.LocationId.precision}"
    shortDesc="#{bindings.departmentsLookup.hints.LocationId.tooltip}"
    id="it3">
    <f:validator binding="#{row.bindings.LocationId.validator}"/>
    <af:convertNumber groupingUsed="false"
    pattern="#{bindings.departmentsLookup.hints.LocationId.format}"/>
    </af:inputText>
    </af:column>
    </af:table>
    </af:panelFormLayout>
    <!--<f:facet name="footer">
    Exception_
    <LifecycleImpl> <_handleException> ADF_FACES-60098:Faces lifecycle receives unhandled exceptions in phase APPLY_REQUEST_VALUES 2
    javax.el.PropertyNotFoundException: Target Unreachable, identifier 'row' resolved to null
         at com.sun.el.parser.AstValue.getTarget(Unknown Source)
         at com.sun.el.parser.AstValue.isReadOnly(Unknown Source)
         at com.sun.el.ValueExpressionImpl.isReadOnly(Unknown Source)
         at oracle.adfinternal.view.faces.renderkit.rich.EditableValueRenderer._getUncachedReadOnly(EditableValueRenderer.java:486)
         at oracle.adfinternal.view.faces.renderkit.rich.EditableValueRenderer.getReadOnly(EditableValueRenderer.java:400)
         at oracle.adfinternal.view.faces.renderkit.rich.EditableValueRenderer.wasSubmitted(EditableValueRenderer.java:343)
         at oracle.adfinternal.view.faces.renderkit.rich.EditableValueRenderer.decodeInternal(EditableValueRenderer.java:116)
         at oracle.adfinternal.view.faces.renderkit.rich.LabeledInputRenderer.decodeInternal(LabeledInputRenderer.java:56)
         at oracle.adf.view.rich.render.RichRenderer.decode(RichRenderer.java:293)
         at org.apache.myfaces.trinidad.component.UIXComponentBase.__rendererDecode(UIXComponentBase.java:1118)
         at org.apache.myfaces.trinidad.component.UIXComponentBase.decode(UIXComponentBase.java:717)
         at org.apache.myfaces.trinidad.component.UIXComponentBase.processDecodes(UIXComponentBase.java:800)
         at org.apache.myfaces.trinidad.component.UIXEditableValue.processDecodes(UIXEditableValue.java:236)
         at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl$ApplyRequestValuesCallback.invokeContextCallback(LifecycleImpl.java:1255)
         at org.apache.myfaces.trinidad.component.UIXComponentBase.invokeOnComponent(UIXComponentBase.java:1410)
         at org.apache.myfaces.trinidad.component.UIXComponentBase.invokeOnChildrenComponents(UIXComponentBase.java:1330)
         at org.apache.myfaces.trinidad.component.UIXComponentBase.invokeOnComponent(UIXComponentBase.java:1424)
         at org.apache.myfaces.trinidad.component.UIXComponentBase.invokeOnChildrenComponents(UIXComponentBase.java:1330)
         at org.apache.myfaces.trinidad.component.UIXCollection.invokeOnComponent(UIXCollection.java:1073)
         at org.apache.myfaces.trinidad.component.UIXComponentBase.invokeOnChildrenComponents(UIXComponentBase.java:1330)
         at org.apache.myfaces.trinidad.component.UIXComponentBase.invokeOnComponent(UIXComponentBase.java:1424)
         at org.apache.myfaces.trinidad.component.UIXComponentBase.invokeOnChildrenComponents(UIXComponentBase.java:1330)
         at org.apache.myfaces.trinidad.component.UIXComponentBase.invokeOnComponent(UIXComponentBase.java:1424)
         at org.apache.myfaces.trinidad.component.UIXComponentBase.invokeOnChildrenComponents(UIXComponentBase.java:1330)
         at org.apache.myfaces.trinidad.component.UIXComponentBase.invokeOnComponent(UIXComponentBase.java:1424)
         at org.apache.myfaces.trinidad.component.UIXComponentBase.invokeOnChildrenComponents(UIXComponentBase.java:1330)
         at org.apache.myfaces.trinidad.component.UIXComponentBase.invokeOnComponent(UIXComponentBase.java:1424)
         at oracle.adf.view.rich.component.rich.RichDocument.invokeOnComponent(RichDocument.java:168)
         at javax.faces.component.UIComponent.invokeOnComponent(UIComponent.java:720)
         at javax.faces.component.UIComponentBase.invokeOnComponent(UIComponentBase.java:678)
         at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._executePhase(LifecycleImpl.java:333)
         at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:185)
         at javax.faces.webapp.FacesServlet.service(FacesServlet.java:265)
         at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
         at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
         at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:300)
         at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at oracle.adf.model.servlet.ADFBindingFilter.doFilter(ADFBindingFilter.java:205)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at oracle.adfinternal.view.faces.webapp.rich.RegistrationFilter.doFilter(RegistrationFilter.java:106)
         at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:446)
         at oracle.adfinternal.view.faces.activedata.AdsFilter.doFilter(AdsFilter.java:60)
         at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:446)
         at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl._doFilterImpl(TrinidadFilterImpl.java:271)
         at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl.doFilter(TrinidadFilterImpl.java:177)
         at org.apache.myfaces.trinidad.webapp.TrinidadFilter.doFilter(TrinidadFilter.java:92)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at oracle.security.jps.ee.http.JpsAbsFilter$1.run(JpsAbsFilter.java:111)
         at java.security.AccessController.doPrivileged(Native Method)
         at oracle.security.jps.util.JpsSubject.doAsPrivileged(JpsSubject.java:313)
         at oracle.security.jps.ee.util.JpsPlatformUtil.runJaasMode(JpsPlatformUtil.java:413)
         at oracle.security.jps.ee.http.JpsAbsFilter.runJaasMode(JpsAbsFilter.java:94)
         at oracle.security.jps.ee.http.JpsAbsFilter.doFilter(JpsAbsFilter.java:161)
         at oracle.security.jps.ee.http.JpsFilter.doFilter(JpsFilter.java:71)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at oracle.dms.servlet.DMSServletFilter.doFilter(DMSServletFilter.java:136)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at weblogic.servlet.internal.RequestEventsFilter.doFilter(RequestEventsFilter.java:27)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.wrapRun(WebAppServletContext.java:3715)
         at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3681)
         at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
         at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120)
         at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2277)
         at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2183)
         at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1454)
         at weblogic.work.ExecuteThread.execute(ExecuteThread.java:207)
         at weblogic.work.ExecuteThread.run(ExecuteThread.java:176)

  • VO is not getting executed or retains the previous state of execution

    Hi,
    We have a UI for the Party Site. Under this UI, you see the address for the party. When u change the address for the party, the old party site is inactivated and a new party site would be created. Assume that all the possible set of locations already exists in the system.
    Structure of the Business Components
    Page is linked to PartyAM
    PartySitesVO -> Linked to PartySiteEO
    PartySiteVO is linked to PartyAM
    Validation VO - PartySiteInCustomerAccountSiteVVO is part of AM - PartyVAM
    In the PartySiteEO - When we double click, open the EO and go to Properties section, we see the below.
    Properties
    ======
    VAMDef : xxx.oracle.apps.xxad.schema.server.PartyVAM
    We call partysiterow.validate() to call the validateEntity() function of the PartySiteEO which is overridden.
    protected void validateEntity()
    super.validateEntity();
    PartyEntityExpert expert = PartySiteEOImpl.getEntityExpert(getOADBTransaction());
    if (expert.isPartySiteInCustomerAccountSite(getPartySiteId().toString())
    System.out.println("Throwing the exception");
    else
    System.out.println("Not Throwing the exception");
    Package xxx.oracle.apps.xxad.schema.server;
    public class PartyEntityExpert extends OAEntityExpert
    public boolean isPartySiteInCustomerAccountSite(String partySiteId)
    PartySiteInCustomerAccountSiteVVOImpl vvo =
    (PartySiteInCustomerAccountSiteVVOImpl)
    findValidationViewObject("PartySiteInCustomerAccountSiteVVO");
    vvo.initQuery(partySiteId);
    return vvo.hasNext();
    public class PartySiteInCustomerAccountSiteVVOImpl extends OAViewObjectImpl
    public void initQuery(String partySiteId)
    setWhereClauseParams(null); // Always reset
    setWhereClauseParam(0, partySiteId);
    executeQuery();
    PartySiteInCustomerAccountSiteVVO
    =======================
    SELECT 1
    FROM hz_cust_accounts a, hz_cust_account_sites_all b
    where a.cust_account_id = b.cust_account_id
    AND a.status = 'A'
    AND b.status = 'A'
    AND b.party_site_id = :1
    Using this VO we want to check, if we have an active account site linked to party site or not.
    Assume we have two party site Ids 100, 200
    PS - 100 is not linked to AccountSite
    PS - 200 is linked to Active Account Site.
    Now the problem is, we have a FOR loop where we loop through all the PartySiteIDs fetched.
    When the partySiteRow.validate() is called for the first time with say PartySiteID = 100, the PartySiteInCustomerAccountSiteVVO gets executed and no rows will be fetched, so false would be returned.
    When the next itteration happens and partysiteRow,validate() is called, PartySiteID = 200 is passed to PartySiteInCustomerAccountSiteVVO and still no row is returned. Ideally, I should get a row. When I run the same PartySiteInCustomerAccountSiteVVO query in toad for PartySiteUD = 200, I get 1 as the output.
    I am not quite sure, if using the PartyVAM and PartyAM and something around transaction state or VO state has anything to do with the VO cache.
    Please let me know, if you see any logical error into the above kind of setup. Aslo, let me know, if you have any questions in understanding this.
    Thanks
    Saurabh
    Edited by: SaurabhAg on Mar 7, 2012 10:43 AM

    Hi,
    I am just pasting the log messages near to the VO execution. What I have done is, I have hard coded the same PartySiteID, just before calling the executeQuery in VOImpl. If you look at the log message, when the first time the VO executes, it fetches the row which is correct. But when the VO is executed again for the same or different party site id, to me it looks like, it is not at all executing the query.
    In this case, since the PartySiteID is hard coded, it should return 1 row each time the executeQuery is called from VOImpl.
    public void initQuery(String partySiteId)
    partySiteId = "25880390";
    System.out.println("party site id in initQuery : " + partySiteId);
    setWhereClauseParams(null); // Always reset
    setWhereClauseParam(0, partySiteId);
    executeQuery();
    [2254] Loading from /xxx/oracle/apps/xxad/schema/server/PartySiteInCustomerAccountSiteVVO.xml file
    party site id in initQuery : 25880390
    [2255] Column count: 1
    [2256] ViewObject : Created new QUERY statement
    [2257] PartySiteInCustomerAccountSiteVVO>#q computed SQLStmtBufLen: 274, actual=234, storing=264
    [2258] select party_site_id cust_account_site_exists
    from ar.hz_cust_accounts ca
    , ar.hz_cust_acct_sites_all cas
    where CA.STATUS = 'A'
    and CA.CUST_ACCOUNT_ID = CAS.CUST_ACCOUNT_ID
    and CAS.STATUS = 'A'
    and cas.party_site_id = :1
    [2259] Binding param 1: 25880390
    Row party site id : 25880390
    Row is not null, Account Site exists : 1
    party site id in initQuery : 25880390
    [2356] Column count: 1
    [2357] ViewObject : Reusing defined prepared Statement
    [2358] Binding param 1: 25880390
    Please see, if you can provide me some directions or approaches which I can try.
    Thanks
    Saurabh
    Edited by: SaurabhAg on Mar 8, 2012 1:33 AM

  • How to autosubmit a form within Taglibs

    Hello,
    i have some choicelist which i want to autosubmit onchange.
    For example, list of carTypes, should be reloaded after changing the type of car.
    I know to handle this with JS; document.form.submit() , but this isn�t really working, struts always wants to execute a forward ...
    isn�t there some standard implementation for this? thnx ren�

    You will be able to close the form but you will not be able to close the Reader application. The command you want is event.target.closeDoc(). This will close the currently active Document. Note that if you are diosplaying in a browser then it will not close the doc ....it will only work form the Reader/Acrobat applications.
    Paul

  • Execute command button after user tabs out of inputtext

    All,
    I have a command button which is used to call a webservice. This works fine.
    I also have an Inputtext field. What I want is to execute the action when the user tabs out of the inputtext.
    Does any one have the solution for me ? I've not yet been able to achieve this for instance in a backing bean.
    My code:
    <af:inputText
    value="#{bindings.pEan.inputValue}"
    label="Ean-code"
    required="#{bindings.pEan.mandatory}"
    columns="#{bindings.pEan.displayWidth}"
    autoSubmit="true">
    <af:validator binding="#{bindings.pEan.validator}"/>
    </af:inputText>
    <af:commandButton id="BepaalVoorraad"
    actionListener="#{bindings.GetStockQuote.execute}"
    text="Bepaal Voorraad"
    disabled="#{!bindings.GetStockQuote.enabled}"/>
    The binding from my pageDef.xml:
    <methodAction id="GetStockQuote" MethodName="GetStockQuote"
    RequiresUpdateModel="true" Action="999" DataControl="GetStock"
    InstanceName="GetStock" ReturnName="GetStock.methodResults.GetStock_GetStockQuote_result">
    <NamedData NDName="pEan" NDType="java.math.BigDecimal"
    NDValue="${bindings.GetStockQuote_pEan}"/>
    </methodAction>

    Set the inputText to have autosubmit on, and add a valueChangeListener to it.
    <af:inputText label="Label 1"
    binding="#{backing_untitled1.inputText1}"
    id="inputText1"
    valueChangeListener="#{backing_untitled1.valchange}"
    autoSubmit="true"/>
    In the method of the valueChangeListener call the method that is associated with the button.

  • How to execute action on row change automatically?

    Hi all,
    Is it possible to trigger an action when a different row is displayed on the screen?
    This is what I have
    - An iteratator (materialsIter) bounded to a table containing material details
    - On a jspx page, I Have a dropdown list containing the materials discription (bounded the materialsIterator) I created this list by drag/drop the view object from the data controls and drop it as an ADF Navigation List.
    - I created a form displaying the details of the selected material. The form is related to the same Iterator
    - I added a partial trigger on the form referencing the selectBox
    So, when I select a material in the dropdown box, the corresponding details are displayed.
    Now, I want to execute some code at the moment a new material is selected. How can I do this?
    I was thinking to use the valueChangeListener on the dropdownbox, and find the currentent row with a DCIteratorBinding. But when doing this, I found the old row and not the new row. In other words, the valueChangeListener is executed before the iterator changes to the new row.
    How can I add a method somewhere in my backingbean that is executed when an other row is selected from the dropdownlist?
    Thanks in advance.

    Hi,
    I already use a valueChangeListener on this with autosubmit on true.
    To give you an example of what happens.
    - Suppose I have two rows in the materials table, A and B.
    - In the valueChange listener on the select box I add code to print the material of the current row using the DCIteratorBinding
    - If I run the program, by default, the first material (A) is selected in the box.
    - If I now select material B, in the console is printed "Selected material A" immediatly after I select it. Just a moment later, the details of material B on the form are shown.
    So, first it executes the ValueChangeListener and afterwards, the new current row is selected.

  • SelectInputText With AutoSubmit, does not submit when used with LOV.

    Hi,
    I am using ADF with ADFBC (Jdeveloper 10.1.3.3). I have a selectinputText (With AutoSubmit = true and immediate = true) component that links to a LOV dialog. When I enter values by hand and navigate out of SelectInputText, it submits the form and everything works well. But When I choose to use LOV, although its value is changed, it does not submit the form. I tried on Return Listener to set its value with no avail. I tried field.setSubmittedValue(null) and field.setValue, field.resetValue, But I couldn't get the same behaviour when I enter values by hand. So my problem is When return from LOV selectinputText does not submit the form. How can I have the form submitted when returned from LOV? Any help is appreciated.
    Best Regards,
    Salim

    Well I was a bit to impatient to create a test case and wait what might come out. So I investigated a bit and found out:
    The code in my managed bean for the value change listener is executed, when I change the field content directly. There is code placed like this:
    public void invoiceAddressPartnerNrChange(ValueChangeEvent valueChangeEvent) {
    int no = (Integer)this.getEditInvoiceAddressPartnerNo().getValue();
    //valueChangeEvent.getNewValue() maybe use this in future...
    this.getEditInvoiceAddressPartnerId().resetValue();
    AttributeBinding ab =
    (AttributeBinding)getBindings().getControlBinding("AllPartnersInvoiceAddressId");
    int id;
    // 1. Access the FacesContext
    FacesContext fc = FacesContext.getCurrentInstance();
    // 2. Create value binding for the #{data} EL expression
    ValueBinding vb = fc.getApplication().createValueBinding("#{data}");
    // 3. Evaluate the value binding, casting the result to BindingContext
    BindingContext bc = (BindingContext)vb.getValue(fc);
    // 4. Find the data control by name from the binding context
    DCDataControl dc = bc.findDataControl("HdsServiceDataControl");
    // 5. Access the application module data provider
    ApplicationModule am = (ApplicationModule)dc.getDataProvider();
    // 6. Cast the ApplicationModule to its client interface
    HdsServiceImpl service = (HdsServiceImpl)am;
    // 7. Call a method on the client interface
    id = service.getPartnerId(no);
    //return "SomeNavigationRule";
    ab.setInputValue(id);
    this.getEditInvoiceAddressPartnerId().setValue(id);
    But this method will NOT be executed when the field content is changed by the LOV's returning value.
    So I searched for another method and found the return listener of the field to be adequate. There I placed similar code by use of the return value:
    public void test(ReturnEvent returnEvent) {
    Object o = returnEvent.getReturnValue();
    int no = Integer.parseInt(o.toString());
    this.getEditInvoiceAddressPartnerId().resetValue();
    this.getEditInvoiceAddressPartnerNo().resetValue();
    AttributeBinding ab = (AttributeBinding)getBindings().getControlBinding("AllPartnersInvoiceAddressId");
    int id;
    // 1. Access the FacesContext
    FacesContext fc = FacesContext.getCurrentInstance();
    // 2. Create value binding for the #{data} EL expression
    ValueBinding vb = fc.getApplication().createValueBinding("#{data}");
    // 3. Evaluate the value binding, casting the result to BindingContext
    BindingContext bc = (BindingContext)vb.getValue(fc);
    // 4. Find the data control by name from the binding context
    DCDataControl dc = bc.findDataControl("HdsServiceDataControl");
    // 5. Access the application module data provider
    ApplicationModule am = (ApplicationModule)dc.getDataProvider();
    // 6. Cast the ApplicationModule to its client interface
    HdsServiceImpl service = (HdsServiceImpl)am;
    // 7. Call a method on the client interface
    id = service.getPartnerId(no);
    //return "SomeNavigationRule";
    ab.setInputValue(id);
    this.getEditInvoiceAddressPartnerId().setValue(id);
    Since this method is executed, my calulation works both ways: Directly entered values and values coming back from the LOV.
    Maybe this is kind of trivial and my code is a bit crappy, but it is a solution.
    What I don't like is the redundance in the code I needed to implement twice..

  • Autosubmit and CRUD

    Hi.
    JDeveloper 11.1.1.2, jsff, bc4j
    From a field with Autosubmit and a valueChangeListener I want to do a SELECT and based on the result perhaps an UPDATE. Hence I need a database connection.
    QUESTION:
    What is the best way to get access to the database in the above scenario:
    a)
    by writing the code into the ApplicationModuleImpl and execute this code.
    b)
    by writing a managed bean that do a create/get an ApplicationModuleImpl and then in turn get the dbConnection from there.
    Best regards
    Erik

    Put any DB code in your model layer, so in that respect, option A.
    Then, expose the service method in your AM to the client interface and create a method binding for it in your page definition and call it through the binding layer.
    In general, if you are using ADF binding, don't ever deal with AMs directly in your view layer.
    John

  • ValidateEntity functionality in Create vs Update

    I have the following code in validateEntity() method in EO
    if ( (startDate != null) && (endDate != null) && (empNum != null) && (enabledFlag == "Y") )
    throw error message
    If the IF condition satisfies I throw a validation error message.
    Now this is working fine when I create a record but when I do try to update data in a record of the same EO it is not working.
    I debugged and found that the IF condition is not getting executed even though it satisifes the condtiion (ie. all the values are NOT NULL and
    enabledFlag = 'Y')
    I followed the Tutorial examples for the Create and Update functionality on the EO/VO.
    Any help is appreciated.

    don't compare string with == condition..
    Always use "XXX".equals(string) format...
    --Prasanna                                                                                                                                                                                                   

  • ValidateEntity ADF BC

    Hello
    I have the following code to execute my validations, I made the validateEntity method in one of my Entity Objects because I was facing some problems which this method solves.
    public void validateEntity() {
    try {
    method1();
    method2;
    } finally {
    super.validateEntity();
    Now I am facing the following problem: when I insert a new row all these validations works fine. But when I update I row none of these validations work. I have also tried the method beforeCommit(TransactionEvent e) but this also brings the same problem.
    Has anybody an idea/solution how to solve this problem?
    Thanks in advance!

    I am currently using JDeveloper 11.1,1.3.0 and creating a JDeveloper ADF Swing application. My problem is the following:
    I have a master-detail page. In the detail page you have to provide numbers in a specific sequence. Because I can't check this in the entity object it self (the detail object) the master object checks this validation. I solved this with a validateEntity() method because else I get a nullpointer exception (when I say in the detail object to go to the master object and do the specific validation).
    So now It is working fine when I create a new master objects with the specific details. But now I should find a solution to xecute the same validations when one of the details is updated.
    Thanks in advance!

  • Execute on change field

    Hi All,
    I want to execute a piece of java code after changing the value of a dropdownlist. How can I achieve this?
    Regards

    Set autoSubmit property to true, and use the valueChangeListener property to call out to a java bean method that follows the valueChangeListener signature:
    public void doSomething(ValueChangeEvent valueChangeEvent)
    You can use a custom template for the drop down list to keep your app 100% generatable.
    Steven Davelaar,
    JHeadstart Team.

  • Error while executing a DTP

    Hi All ,
    I got  an error while executing a DTP. Short Dump analysis points this error. :   DBIF_REPO_SQL_ERROR.
    Please provide in your valuable inputs to resolve this error.
    Thank & Regards,
    Rohit Garg

    This error comes majorly when you have a deadlock in  your code. Check ST22 if you have any short dump corresponding to it and see the source code where it is getting stuck.
    If you find this dump explaining table space issue, then contact Basis, they will be able to help you with table space problem.
    Edited by: Deepmala Agarwal on Aug 18, 2009 7:40 AM

  • Built-in: Execute procedure - delete statement

    Hi,
    I am trying to delete rejected invoices from AP_INVOICES_INTERFACE and AP_INVOICE_LINES_INTERFACE tables each time form is opened. I am not developer so I have not access to form design, but I am allowed to use forms personalization, however I am really suprised by behaviour of this.
    Below code is triggered when form is opened:
    delete from ap_invoice_lines_interface where invoice_id in (select invoice_id from ap_invoices_interface where (source = 'INTERCOMPANY2' or source = 'AGENCY COMMISSIONS') and description like '%Agency%Commissions%' and org_id = 63 and status = 'REJECTED')
    and second proc:
    delete from ap_invoices_interface where (source = 'INTERCOMPANY2' or source = 'AGENCY COMMISSIONS') and description like '%Agency%Commissions%' and org_id = 63 and status = 'REJECTED'
    I had to put them in separate actions as I was receiving error when I had them in one statement together, however this is completly different story. My problem is that althought these invoices are not visible when I open Quick Invoices form (this is were personalization is applied), when I go to other form showing interface invoices, but without this personalization I still can see them. I had similar problem when I was actually executing update statement, however when I have chosen to create invoices with Payables Open Interface (when did not and closed the form values were going back to previous state) it was updating the values to the ones changed.
    Anyone has any idea what is wrong here?

    I just want to delete (or remove) it from the VO. Data for this VO is not on the database.
    The function is doing what I want it to do (delete from the VO), its just always deleting the first row, versus the selected row. I select the command button next on a column next to an item further down in the list and it deletes the first row. The problem is setting the selected row to be removed - I thought setting the current row would be taken care of by the SelectListener?
    selectionState="#{bindings.MyIspListView1.collectionModel.selectedRow}"
    selectionListener="#{bindings.MyIspListView1.collectionModel.makeCurrent}"

Maybe you are looking for