3 Replies Latest reply: Jan 29, 2014 2:40 PM by oracle_developer RSS

Error: "The search cannot be executed because the table has pending changes that would be lost."

oracle_developer Newbie
Currently Being Moderated

Hello,

I'm working a developing an OA page that will displays the contents of an Oracle table and allows the user to update records in a table as needed.

 

When I hit submit button to save the changes in the update page, the control goes back to main page (where all the table records are displayed). It displays the updated record with the new information.However when I hit "Go" button on the mainPG, I get the error "The search cannot be executed because the table has pending changes that would be lost. and the changes are not committed.

 

ANy suggestions on where I should look will be greatly appreciated.

 

Posting code for my controller

=======================

          if ( pageContext.getParameter("saveRate") != null )

          {              

          personam.invokeMethod("saveRateToDatabase");

         }

Code from my AM

=============

    public void saveRateToDatabase()

      {

      getOADBTransaction().commit();

      System.out.println("40--After commit has been executed");

      }

Code from my VORowImpl

===================

package cggv.oracle.apps.gl.server;

 

 

import oracle.apps.fnd.framework.server.OAViewRowImpl;

 

 

import oracle.jbo.domain.Date;

import oracle.jbo.domain.Number;

import oracle.jbo.server.AttributeDefImpl;

// ---------------------------------------------------------------------

// ---    File generated by Oracle ADF Business Components Design Time.

// ---    Custom code may be added to this class.

// ---    Warning: Do not modify method signatures of generated methods.

// ---------------------------------------------------------------------

public class xxCggGlRatesVORowImpl extends OAViewRowImpl {

    public static final int RATEID = 0;

    public static final int FROMCURRENCY = 1;

    public static final int TOCURRENCY = 2;

    public static final int FROMCONVERSIONDATE = 3;

    public static final int TOCONVERSIONDATE = 4;

    public static final int USERCONVERSIONTYPE = 5;

    public static final int CONVERSIONRATE = 6;

    public static final int MODEFLAG = 7;

 

 

    /**This is the default constructor (do not remove)

     */

    public xxCggGlRatesVORowImpl() {

    }

 

 

    /**Gets the attribute value for the calculated attribute RateId

     */

    public Number getRateId() {

        return (Number) getAttributeInternal(RATEID);

    }

 

 

    /**Sets <code>value</code> as the attribute value for the calculated attribute RateId

     */

    public void setRateId(Number value) {

        setAttributeInternal(RATEID, value);

        //populateAttribute(RATEID, value);

    }

 

 

    /**Gets the attribute value for the calculated attribute FromCurrency

     */

    public String getFromCurrency() {

        return (String) getAttributeInternal(FROMCURRENCY);

    }

 

 

    /**Sets <code>value</code> as the attribute value for the calculated attribute FromCurrency

     */

    public void setFromCurrency(String value) {

        setAttributeInternal(FROMCURRENCY, value);      

    }

 

 

    /**Gets the attribute value for the calculated attribute ToCurrency

     */

    public String getToCurrency() {

        return (String) getAttributeInternal(TOCURRENCY);

    }

 

 

    /**Sets <code>value</code> as the attribute value for the calculated attribute ToCurrency

     */

    public void setToCurrency(String value) {

        setAttributeInternal(TOCURRENCY, value);

    }

 

 

    /**Gets the attribute value for the calculated attribute FromConversionDate

     */

    public Date getFromConversionDate() {

        return (Date) getAttributeInternal(FROMCONVERSIONDATE);

    }

 

 

    /**Sets <code>value</code> as the attribute value for the calculated attribute FromConversionDate

     */

    public void setFromConversionDate(Date value) {

        setAttributeInternal(FROMCONVERSIONDATE, value);      

    }

 

 

    /**Gets the attribute value for the calculated attribute ToConversionDate

     */

    public Date getToConversionDate() {

        return (Date) getAttributeInternal(TOCONVERSIONDATE);

    }

 

 

    /**Sets <code>value</code> as the attribute value for the calculated attribute ToConversionDate

     */

    public void setToConversionDate(Date value) {

        setAttributeInternal(TOCONVERSIONDATE, value);       

    }

 

 

    /**Gets the attribute value for the calculated attribute UserConversionType

     */

    public String getUserConversionType() {

        return (String) getAttributeInternal(USERCONVERSIONTYPE);

    }

 

 

    /**Sets <code>value</code> as the attribute value for the calculated attribute UserConversionType

     */

    public void setUserConversionType(String value) {

        setAttributeInternal(USERCONVERSIONTYPE, value);

      

    }

 

 

    /**Gets the attribute value for the calculated attribute ConversionRate

     */

    public Number getConversionRate() {

        return (Number) getAttributeInternal(CONVERSIONRATE);

    }

 

 

    /**Sets <code>value</code> as the attribute value for the calculated attribute ConversionRate

     */

    public void setConversionRate(Number value) {

        setAttributeInternal(CONVERSIONRATE, value);

      

    }

 

 

    /**Gets the attribute value for the calculated attribute ModeFlag

     */

    public String getModeFlag() {

        return (String) getAttributeInternal(MODEFLAG);

    }

 

 

    /**Sets <code>value</code> as the attribute value for the calculated attribute ModeFlag

     */

    public void setModeFlag(String value) {

        setAttributeInternal(MODEFLAG, value);      

    }

 

 

    /**getAttrInvokeAccessor: generated method. Do not modify.

     */

    protected Object getAttrInvokeAccessor(int index,

                                           AttributeDefImpl attrDef) throws Exception {

        switch (index) {

        case RATEID:

            return getRateId();

        case FROMCURRENCY:

            return getFromCurrency();

        case TOCURRENCY:

            return getToCurrency();

        case FROMCONVERSIONDATE:

            return getFromConversionDate();

        case TOCONVERSIONDATE:

            return getToConversionDate();

        case USERCONVERSIONTYPE:

            return getUserConversionType();

        case CONVERSIONRATE:

            return getConversionRate();

        case MODEFLAG:

            return getModeFlag();

        default:

            return super.getAttrInvokeAccessor(index, attrDef);

        }

    }

 

 

    /**setAttrInvokeAccessor: generated method. Do not modify.

     */

    protected void setAttrInvokeAccessor(int index, Object value,

                                         AttributeDefImpl attrDef) throws Exception {

        switch (index) {

        case RATEID:

            setRateId((Number)value);

            return;

        case FROMCURRENCY:

            setFromCurrency((String)value);

            return;

        case TOCURRENCY:

            setToCurrency((String)value);

            return;

        case FROMCONVERSIONDATE:

            setFromConversionDate((Date)value);

            return;

        case TOCONVERSIONDATE:

            setToConversionDate((Date)value);

            return;

        case USERCONVERSIONTYPE:

            setUserConversionType((String)value);

            return;

        case CONVERSIONRATE:

            setConversionRate((Number)value);

            return;

        case MODEFLAG:

            setModeFlag((String)value);

            return;

        default:

            super.setAttrInvokeAccessor(index, value, attrDef);

            return;

        }

    }

 

 

    /**Gets xxCggGlRatesEO entity object.

     */

    public xxCggGlRatesEOImpl getxxCggGlRatesEO() {

        return (xxCggGlRatesEOImpl)getEntity(0);

    }

}

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points