Advanced Table in OAFramework.

Hi,
I am trying to personalize the advanced table in OAFramework to make sure that atleast one row is mandatory. I.e. i have a button to add a row and then enter the values in that row. I also have a delete button to delete the row. I made the row mandatory so that atleast one row should not be empty. But eventhough i make the row mandatory, the user can enter a value and then delete the row.
I tried in several ways using personalization but couldn't stop that. I thought of customizing the page but not sure how to capture the property of the advanced table and make it mandatory so that atleast 1 row is not deleted from the table.
Any help is appreciated.
Thank you

Hi Prasanna,
I did like you said but now it doesn't allow to delete any new row which we create in the table. Basically its not allowing the delete functionality.
Below is the seeded function and below that is the modification i have made....
public void callRemove(OAPageContext oapagecontext, OAWebBean oawebbean)
OAViewObject oaviewobject = (OAViewObject)oapagecontext.getApplicationModule(oawebbean).findViewObject("PhoneNumbersUpdateVO");
String s = oapagecontext.getDecryptedParameter("HrPhoneHidden");
for(OARow oarow = (OARow)oaviewobject.first(); oarow != null; oarow = (OARow)oaviewobject.next())
String s1 = oarow.getAttribute("RowIndex").toString();
if(s1.equals(s))
oarow.setAttribute("DeletePhoneId", "Y");
oarow.remove();
return;
public void callRemove(OAPageContext oapagecontext, OAWebBean oawebbean)
OAViewObject oaviewobject = (OAViewObject)oapagecontext.getApplicationModule(oawebbean).findViewObject("PhoneNumbersUpdateVO");
String s = oapagecontext.getDecryptedParameter("HrPhoneHidden");
for(OARow oarow = (OARow)oaviewobject.first(); oarow != null; oarow = (OARow)oaviewobject.next())
String s1 = oarow.getAttribute("RowIndex").toString();
if(!oaviewobject.hasNext())
throw new OAException("Pavan Kotharu Sample", (byte)0);
else
if(s1.equals(s))
oarow.setAttribute("DeletePhoneId", "Y");
oarow.remove();
return;
Thanks

Similar Messages

  • Problem with Advanced Table

    Hi All,
    I am trying to use Advanced Table in my custom page. When I try to run the page, i got an exception.
    I am new to OA Framework. I am looking forward for help.
    Thanks
    Amit
    Error Page
    Exception Details.
    oracle.apps.fnd.framework.OAException: Application: FND, Message Name: FND_NO_REGION_DATA. Tokens: REGIONCODE = /amit/oracle/apps/ak/invoicedetails/webui/invoicedetails.PageRN; (Could not lookup message because there is no database connection)
         at oracle.apps.fnd.framework.webui.JRAD2AKMapper.getRootMElement(JRAD2AKMapper.java:519)
         at oracle.apps.fnd.framework.webui.OAWebBeanFactoryImpl.getWebBeanTypeDataFromJRAD(OAWebBeanFactoryImpl.java:3782)
         at oracle.apps.fnd.framework.webui.OAWebBeanFactoryImpl.getRootApplicationModuleClass(OAWebBeanFactoryImpl.java:3459)
         at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:988)
         at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:497)
         at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:418)
         at OA.jspService(OA.jsp:40)
         at com.orionserver.http.OrionHttpJspPage.service(OrionHttpJspPage.java:56)
         at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:317)
         at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:465)
         at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:379)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:727)
         at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:306)
         at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:767)
         at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:259)
         at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:106)
         at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:803)
         at java.lang.Thread.run(Thread.java:534)
    ## Detail 0 ##
    Exception:
    oracle.adf.mds.MetadataDefException: Unable to find component with absolute reference = /amit/oracle/apps/ak/invoicedetails/webui/invoicedetails.PageRN, XML Path = D:\OAFramework\jdevhome\jdev\myclasses\JRADXML;D:\OAFramework\jdevhome\jdev\myprojects;D:\OAFramework\jdevbin\jdev\oamdsxml\fwk. Please verify that the reference is valid and the definition of the component exists either on the File System or in the MDS Repository.
         at oracle.adf.mds.internal.MetadataManagerBase.findElement(MetadataManagerBase.java:1343)
         at oracle.adf.mds.MElement.findElement(MElement.java:97)
         at oracle.apps.fnd.framework.webui.JRAD2AKMapper.getRootMElement(JRAD2AKMapper.java:493)
         at oracle.apps.fnd.framework.webui.OAWebBeanFactoryImpl.getWebBeanTypeDataFromJRAD(OAWebBeanFactoryImpl.java:3782)
         at oracle.apps.fnd.framework.webui.OAWebBeanFactoryImpl.getRootApplicationModuleClass(OAWebBeanFactoryImpl.java:3459)
         at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:988)
         at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:497)
         at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:418)
         at OA.jspService(OA.jsp:40)
         at com.orionserver.http.OrionHttpJspPage.service(OrionHttpJspPage.java:56)
         at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:317)
         at

    I am not sure if you are refering to JDEV_USER_HOME variable as apps path, if yes then yes your page should be present in proper directory structure under the jdev user home.
    Typically you would set the jdev user home as D:\OAFramework\jdevhome\jdev\myprojects and not D:\OAFramework\jdevhome\jdev\myprojects\oracle\apps.
    It is not mandatory that the pages should always start with the package /oracle/apps. You can prepend any directory structure before /oracle/apps but make sure that your directory structure contains /../../oracle/apps/<product shortname>/....
    How are you calling this page or running this page from jdev ? If you are calling it from a jsp what is the a href you are using to call this page ?

  • Advanced Table does not refresh after database level action

    Hi,
    I have a page which has an advanced table. I update the advanced table from the page do some validations, update some DB level columns(also part of advanced table) and see that the changes are saved to the DB but the advanced table does not show the updates done at the DB level.
    I tried clearing the VO Cache and re-executing the VO but still it does not refresh the Advanced table data.
    This is very critical requirement for the client, any inputs will be greatly appreciated.
    Thanks a lot in Advance.
    Here is the code snippet from my CO's processRequest:
    OAApplicationModule am = pageContext.getApplicationModule(webBean);
    OAAdvancedTableBean tblbean = (OAAdvancedTableBean)webBean.findChildRecursive("recasttable");
    if(tblbean!=null)
    tblbean.setRendered(true);
    OAApplicationModule tblam = (OAApplicationModule)am.findApplicationModule("RecastLineAM1");
    tblam.invokeMethod("initQuery");
    tblbean.getTableData();
    Here is my AM - initQuery() code:
    public void initQuery()
    //clearVOCaches("RecastLineEO",true);
    clearVOCaches(null,true);
    getRecastLineVO1().init();
    Here is the VO - init() code:
    public void init()
    System.out.println("****************************executing...");
    OADBTransaction tx = (OADBTransaction) getApplicationModule().getTransaction();
    if (tx.getTransientValue("RECAST_ID") !=null)
    Number recastId = (Number) tx.getTransientValue("RECAST_ID");
    System.out.println("recastId: "+ recastId);
    setWhereClause("RECAST_HDR_ID = :1");
    setWhereClauseParams(null); // Always reset
    setWhereClauseParam(0, recastId);
    executeQuery();
    }

    hi,
    This is how I am calling a DB package. the package does updates on the table. once done I am issueing a commit and requerying the data, however the vo is not getting refreshed.... Can someone point out what am I missing... why is the VO not getting refreshed....
    This is very critical...
    Thanks
    Srini
    public void validateRecast(String respKey)
    OADBTransaction tx = (OADBTransaction)getApplicationModule().getTransaction();
    Number recastId = (Number) tx.getTransientValue("RECAST_ID");
    System.out.println("*********************validateRecast().RecastId: " + recastId);
    OracleCallableStatement ocs = null;
    Connection conn = tx.getJdbcConnection();
    String strOut="", strErr="";
    Number respId = null;
    try
    respId = new Number(respKey);
    catch(Exception e)
    throw new OAException("Invalid Responsibility");
    String stmt = "BEGIN " +
    "GE_RECAST_UTILS_PKG.validate_recast(:1,:2,:3,:4); " +
    "END;";
    try
    ocs = (OracleCallableStatement)conn.prepareCall(stmt);
    ocs.setNUMBER(1,recastId);
    ocs.setNUMBER(2,respId);
    ocs.registerOutParameter(3,OracleTypes.VARCHAR);
    ocs.registerOutParameter(4,OracleTypes.VARCHAR);
    ocs.execute();
    strOut = ocs.getString(3);
    strErr = ocs.getString(4);
    ocs.close();
    System.out.println("Returned with: " + strOut);
    if(strOut.equalsIgnoreCase("ERROR"))
    //throw new OAException(strErr);
    tx.putTransientValue("ERROR",strErr);
    tx.commit();
    getApplicationModule().clearVOCaches("RecastLineEO",true);
    RecastLineVOImpl lineVo = (RecastLineVOImpl)getApplicationModule().findViewObject("RecastLineVO1");
    lineVo.init();
    System.out.println("===============RecastLnId: " +lineVo.first().getAttribute("RecastLnId"));
    System.out.println("===============Product Line: " +lineVo.first().getAttribute("ProductLine"));
    catch(SQLException e)
    tx.rollback();
    if(ocs!=null)
    try
    ocs.close();
    }catch(SQLException e1)
    throw OAException.wrapperException(e1);
    throw OAException.wrapperException(e);
    }

  • Unable to show error message in Advanced Table

    Hi All,
    I have an requirement to show a pdf ouput when user clicks on image or button in advanced table. I have created a new button in advanced table and when user clicks on button, I am showing an error message for testing. i used below code for CO extn, but when I click on button, I can see the diagnostic message but the error message is not showing in the page.
    Need your assistance.
    package XXJava.oracle.apps.ar.program.webui;
    import java.io.BufferedInputStream;
    import java.io.File;
    import java.io.FileInputStream;
    import java.io.IOException;
    import java.io.InputStream;
    import java.util.Hashtable;
    import javax.servlet.ServletOutputStream;
    import javax.servlet.http.HttpServletResponse;
    import oracle.apps.ar.irec.common.webui.CustomCustSearchCO;
    import oracle.apps.fnd.framework.OAException;
    import oracle.apps.fnd.framework.webui.OADataBoundValueFireActionURL;
    import oracle.apps.fnd.framework.webui.OAPageContext;
    import oracle.apps.fnd.framework.webui.beans.OAImageBean;
    import oracle.apps.fnd.framework.webui.beans.OAWebBean;
    import oracle.apps.fnd.framework.webui.beans.OAWebBeanData;
    import oracle.apps.fnd.framework.webui.beans.nav.OAButtonBean;
    import oracle.apps.fnd.framework.webui.beans.table.OAAdvancedTableBean;
    import oracle.cabo.ui.UIConstants;
    import oracle.cabo.ui.action.FireAction;
    public class XX_CustomCustSearchCO extends CustomCustSearchCO {
    public XX_CustomCustSearchCO() {
    public void processRequest(OAPageContext paramOAPageContext, OAWebBean paramOAWebBean)
    super.processRequest(paramOAPageContext, paramOAWebBean);
    OAAdvancedTableBean CustomCustSearchTable= (OAAdvancedTableBean)paramOAWebBean.findChildRecursive("CustomCustSearchTable");
              OAImageBean XX_Attach =(OAImageBean)CustomCustSearchTable.findChildRecursive("XX_Attach");
              /*Hashtable params = new Hashtable (1);
              //params.put ("XX_ACTION","XXX");
              params.put ("XX_ACTION","ATTACHMENT");
              Hashtable paramsWithBinds = new Hashtable(1);
              //paramsWithBinds.put ("XX_PRIMARY",new OADataBoundValueFireActionURL((OAWebBeanData) XX_Attach, "{$ConsInvId}"));
              paramsWithBinds.put ("CONS_ID",new OADataBoundValueFireActionURL((OAWebBeanData) XX_Attach, "{$ConsInvId}"));
              //paramsWithBinds.put ("CONS_ID",new OADataBoundValueFirePartialActionURL((OAWebBeanData) XX_Attach, "{$ConsInvId}"));
    XX_Attach.setFireActionForSubmit("addnInfoEvent",params,paramsWithBinds,false,false);*/
    FireAction localaction = new FireAction("tempEvent");
    OAButtonBean XX_Button1 =(OAButtonBean)CustomCustSearchTable.findChildRecursive("XX_Button1");
    XX_Button1.setAttributeValue(UIConstants.PRIMARY_CLIENT_ACTION_ATTR, localaction);
    public void processFormRequest(OAPageContext paramOAPageContext, OAWebBean paramOAWebBean)
         super.processFormRequest(paramOAPageContext, paramOAWebBean);
    String flaction = paramOAPageContext.getParameter("event");
    if (flaction.equalsIgnoreCase("tempEvent"))
    paramOAPageContext.writeDiagnostics(this, "XX_CustomCustSearchCO :Inside the event ", 1);
    throw new OAException("The file path is invalid. Please check the value of the profile option",OAException.ERROR);
    Regards,
    Ram

    You are throwing the message and then catching it yourself, and then printing the stack, which is what java is doing.
    So, you need to
    remove
    }catch(Exception e)
    e.printStackTrace();
    and you would need to place the try block appropriately, since some methods you have used want exceptions caught.
    Tapash

  • Records Not Getting Displayed in Advanced Table

    Hi All ,
    I am rendering an advanced table that displays some records . i have created a VO that is tagged to this Table . The Table was displaying the records satisfactorily initially . Now suddenly the table shows no Search Conducted .
    I checked the VO and the AM . I found out that the query gets executed when the executeQuery() Method is called . The records are also fetched . (i verified this using methods like getRowCount() , getFetchedRowCount() , getRowCountInRange )
    But the records dont get displayed on the page . What could be the problem . Kindly Help !
    Thanks
    Chirag Shah

    Did you make any change to VO later on which might have change the column aliases?
    If you are sure of VO returning the rows during page call, then I will suggest to delete the mapping from table and do that again.
    --Shiv                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • Get Total of a Column of Advanced Table and use it in Controller in OAF

    I have an advanced table on my custom page. I am calculating total of a column in my footer. I am acheiving this using the standard functionality of advanced table by setting total value property of my column to "TRUE" and displaying the total in the tablefooter components.
    In addition to this I want to retreive the total value from my footer and use it in my Controller for further validations but I am not able to acheive this.
    I tried some code already present in the Community for the same but nothing turned out right for me.
    Can anyone please help me on this.

       Hi there ,
      You can manually add the values of each row of a  column and make use of the value obtained in your controller .
    Here is the logic ,
    1) get the vo instnace attached to that table .
    2) Loop through every single row in the table .
    3) get the value and sum up the value and use it in your controller .
    int fetchRowCount = vo.getFetchRowCount();  
    voRowImpl row = null;  
    int count =0;
    if (fetchRowCount  > 0) { 
    RowSetIterator iter = vo.createRowSetIterator("Iter"); 
    iter.setRangeStart(0);
      iter.setRangeSize(fetchBidderRowCount);
       for (int i = 0; i < fetchBidderRowCount; i++) {
      row = voRowImpl iter.getRowAtRangeIndex(i);
       //use RowImpl getters   10.   
             Number personId = row.getPersonId();
    count =personId+count;         // add each and every value and have in variable
    iter.closeRowSetIterator();
    Regards ,
    Keerthi

  • Question regarding Classic and Advance table

    Hi,
    I have classic and advance table. I am populating with VO that brings 100 record. When i render page i see last record being displayed. How can i show my first record by defult on both tables?

    By default the first record will be displayed, if you are seeing the last one instead, you probably did a vo.last() in the code.
    Thanks
    Tapash

  • How to get the value from Advanced table

    Hi,
    In the Advanced table have 2 LOV fields, I need LOV field value dynamically in the controller to validate the save button, if iam not selected any value in lov save button will not allow to save the data. In the table i am using 'Add another row'. How to get the lov field value in the process form request??? and how to do this requirement
    Thanks
    Naresh

    1. You can specify required property on LOV field to "yes". For events where you wish to disable the client side validations, set the property disable client side validation to "true".
    2. If above behavior is not what you are looking for, then you need to handle in AM and not CO.
    a. Call an AM method from CO.
    b. In that AM method, get handle of VO.
    c. Iterate the VO Rows and check for your validation rules.
    -Prince
    http://www.princekapoor82.blogspot.com

  • Not able to get the handle of picklist which exists in the advanced table

    Hi all,
    I have a pick list called usageName in the advanced table when i am trying handle that picklst it is not giving me the correct value.
    The valuess in the pick are
    1)MFP Scan
    2)MFP B&W,Copy,Scan
    3)MFP B&W and Colour
    4)Fixed
    5)MFP B&W, Colour, Scan and Copy
    6)Mono Printing - Per Catridge/Toner
    7)Mono Printing - Per Page
    to handle the pick list i am using the code as
    OAMessageChoiceBean usagenameevent =(OAMessageChoiceBean)webBean.findChildRecursive("UsageName");
    usagenameevent.setFireActionForSubmit("xxReasonEvent",null,null,true,true);
    pageContext.writeDiagnostics("IN XxwepServiceContractSearchCO Process Request ","usagenameevent:"+usagenameevent ,1);
    String usnmae = pageContext.getParameter("UsageName");
    pageContext.writeDiagnostics("IN XxwepServiceContractSearchCO Process Request ","usnmae:"+usnmae ,1);
    OAApplicationModule am = pageContext.getApplicationModule(webBean);
    if("xxReasonEvent".equalsIgnoreCase(pageContext.getParameter("event"))||pageContext.getParameter("UsageName")!= null)
    OAViewObject vo = (OAViewObject)am.findViewObject("XxwepUsageNameVO");
    // usagenameevent.get
    // OAApplicationModule am = pageContext.getApplicationModule(webBean);
    //OAViewObject vo = (OAViewObject)am.findViewObject("XxwepUsageNameVO");
    if(vo != null )
    //XxwepUsageNameVORowImpl vo1=(XxwepUsageNameVORowImpl)am.findViewObject("XxwepUsageNameVO");
    String usagename = null;
    Row row = vo.getCurrentRow();
    if( row != null )
    usagename = (String)row.getAttribute("UsageName");
    if(usagename!=null)
    pageContext.putSessionValue("UsagenameParam",usagename);
    pageContext.writeDiagnostics("IN XxwepServiceContractSearchCO Process Form Request ","usagenamein event:"+usagename ,1);
    pageContext.writeDiagnostics("IN XxwepServiceContractSearchCO Process Form Request ","row:"+row ,1);
    pageContext.writeDiagnostics("IN XxwepServiceContractSearchCO Process Form Request ","vo:"+vo ,1);
    If i choose any value from the picklist out of those 7 items
    Row row = vo.getCurrentRow(); is giving me the last value only
    for ex i have choosed
    2)MFP B&W,Copy,Scan
    but the vo.getCurrent Row is giving me the value as
    7)Mono Printing - Per Page
    could please let me know what the mistake could be helpful
    Thanks
    Ajay

    Hi,
    As stated above if you need to check the message or message properties then you would need to enable tracking, depending on where you want it to be and what you want to track, below are two articles which should help you understand more:
    BizTalk Server: Tracking Data Using BizTalk Admin Console
    BizTalk Server: Checking Tracked Data Using Admin Console
    Maheshkumar
    S Tiwari|User
    Page|Blog|BizTalk
    Server: Multiple XML files to Single FlatFile Using File Adapter

  • How to get the values of all rows in advanced table

    HI All,
    I am using an advanced table to enter the values for the service contract line (its a custom page)in that advanced table i ahave column with lov called task number for that task number once i had choosed one task number and creating one more row using add anethor row button i want to restrict the user to not to choose the task number which was entered in the previus row.
    Or if this is not possible i want to restrict the user by showing an error message when click on the submit button by saying you have choosed the duplicate task number please choose a uniqu task number
    please give some hints
    thanks
    ajay

    Hi
    your approach will have two steps
    1.) use the row refernce and get the value of task number of the row which is enterd by user .
    2.) use getRows in range and compare values of task number of every row with the user selected value ,if value match then throw error.
    Thanks
    Pratap

  • How to get handle to a MST bean for a particular row in an advanced table

    Hi
    Requirement:
    My advanced table has 2 columns, the 1st one has a LOV and the 2nd one is a switcher which toggles from LOV to MST depending on the value in the 1st column.
    Implementation Steps:
    1) Trap LOV event in 1st column and pass row index to the AM
    2) Get the VO row from the row index (EVENT_SOURCE_ROW_REFERENCE), set the switcher attribute to MST/LOV depending on Business Logic
    3) Get the view attribute value of the 2nd column (to which LOV/MST is mapped).
    My LOV/MST gets rendered correctly on the page. However, when the LOV renders in the 2nd column, the view attribute is correctly populated in the LOV. But the MST renders with no value.
    I understand that the MST loses value on form submission and that this value needs to be set in the PR of the CO. For that how do I get a handle to the MST bean of the particular row?
    This is urgent!!
    Thanks
    Ritu

    Pointers?
    Anyway I can make the MST in the row return the correct view attribute?

  • Create a new Row in an advanced table in an advanced table

    Hi,
    I am handling the master detail relationship. For this i have used advanced table in an advanced table. I am facing a problem while creating a new row in the inner advanced table.
    I have a Display Sequence column in the inner advanced table. I want to handle the logic for displaying the value of this attribute. As per dev guide i have attached the view link and for handling the Add New row event i am using the below code
    OAAdvancedTableBean sublineDetailsTableBean = (OAAdvancedTableBean) webBean.findChildRecursive("SublineAdvTableRN");
    OATableFooterBean sublineTableFooterBean = (OATableFooterBean) sublineDetailsTableBean.getFooter();
    if (sublineDetailsTableBean.getName().equals(pageContext.getParameter(SOURCE_PARAM))
    && ADD_ROWS_EVENT.equals(pageContext.getParameter(EVENT_PARAM)))
    This is working fine. The challenge i am facing is for creating a new row. Below is the code given in dev guide
    // get a handle to inner tableOATableBean innerTable =
    (OATableBean)webBean.findChildRecursive("InnerTableBean");
    // create an enumeratorOAInnerDataObjectEnumerator enum =
    new OAInnerDataObjectEnumerator(pageContext, innerTable);
    while (enum.hasMoreElements())
    RowSet innerRowSet = (RowSet) enum.nextElement();
    // get all rows
    Row []rowsInRange = innerRowSet.getAllRowsInRange();
    for (int i = 0; i < rowsInRange.length; i++)
    Row nextRow = (Row) rowsInRange;
    // In case you want to add new rows in this RowSet, you can do the same
    OARow newRow = (OARow) innerRowSet.createRow();
    // initialize value for some attribute and insert the row
    newRow.setAttribute("SomeAttr", "SomeValue");
    innerRowSet.insertRow(newRow);
    The Above code creates a new Row in all the master records.
    How do i identify that the add new Row event has been triggered for which master record?
    Can any body please help me on this. I am stuck from a long time and am unable to find the appropriate solution.
    Thanks in advance
    Raj Papdeja

    Hi,
    Following is the code written in PFR,
    OAAdvancedTableBean sublineDetailsTableBean = (OAAdvancedTableBean) webBean.findChildRecursive("SublineAdvTableRN");
    System.out.println("sublineDetailsTableBean::"+sublineDetailsTableBean);
    OATableFooterBean sublineTableFooterBean = (OATableFooterBean) sublineDetailsTableBean.getFooter();
    System.out.println("lineTableFooterBean::"+sublineTableFooterBean);
    if (sublineDetailsTableBean.getName().equals(pageContext.getParameter(SOURCE_PARAM))
    && ADD_ROWS_EVENT.equals(pageContext.getParameter(EVENT_PARAM)))
    System.out.println("Inside Add New Row Button Event for the Sub Lines");
    strValueParam = (String) pageContext.getParameter(VALUE_PARAM);
    System.out.println("strValueParam=>"+strValueParam);
    ViewLink vl = am.findViewLink("GEPSCSTaskLineToSublineVL1");
    System.out.println("View Link=>"+vl);
    if(vl != null)
    OAViewObject vo = (OAViewObject) vl.getSource();
    if(null != vo)
    GEPSCSTaskLineItemsVORowImpl voRow =
    (GEPSCSTaskLineItemsVORowImpl) vo.getCurrentRow();
    Number LineNo = voRow.getLineNo();
    System.out.println("Source Row Line No::"+LineNo);
    /*OAViewObject vo = (OAViewObject) am.findViewObject("GEPSCSTaskLineItemsVO1");
    GEPSCSTaskLineItemsVORowImpl voRow = (GEPSCSTaskLineItemsVORowImpl) vo.getCurrentRow();
    Number LineNo = voRow.getLineNo();
    System.out.println("Line No::"+LineNo);*/
    // Getting the LineNo as null
    /*int intRowCount = vo.getRowCount();
    if(intRowCount > 0)
    System.out.println("Sublines are already present");
    GEPSCSTaskLineItemsVORowImpl tasklineVORow =
    (GEPSCSTaskLineItemsVORowImpl)vo.getCurrentRow();
    Number lineNo = (Number) tasklineVORow.getLineNo();
    System.out.println("LineNo=>"+lineNo);
    Number lastLineDispSequence = null;
    // Method to set the display sequence
    //am.invokeMethod("createNewSublineRow");
    // create an enumerator*/
    OAInnerDataObjectEnumerator enum =
    new OAInnerDataObjectEnumerator(pageContext, sublineDetailsTableBean);
    while (enum.hasMoreElements())
    RowSet innerRowSet = (RowSet) enum.nextElement();
    // get all rows
    Row []rowsInRange = innerRowSet.getAllRowsInRange();
    intRowCount = rowsInRange.length;
    System.out.println("intRowCount=>"+intRowCount);
    if(intRowCount == 0)
    System.out.println("No Rows present");
    OARow newRow = (OARow) innerRowSet.createRow();
    // initialize value for some attribute and insert the row
    newRow.setAttribute("DisplaySequence", new Number(1));
    innerRowSet.insertRow(newRow);
    else if(intRowCount > 0)
    System.out.println("Rows are already present");
    Row nextRow = (Row) rowsInRange[intRowCount-1];
    lastLineDispSequence = (Number) nextRow.getAttribute("DisplaySequence");
    OARow newRow = (OARow) innerRowSet.createRow();
    // initialize value for some attribute and insert the row
    newRow.setAttribute("DisplaySequence", new Number(lastLineDispSequence.intValue()+1));
    innerRowSet.insertRow(newRow);
    break;
    When i try to fetch the Line No which is the primary ID of the Parent VO, it always returns me the LineNO of the first Row and not of the parent row for which i have clicked the Add new Subline button of the Child record
    Number LineNo = voRow.getLineNo();
    System.out.println("Source Row Line No::"+LineNo);
    Is there any way to fetch the primary ID of the row for which i have selected the Add new Subline button
    Thanks
    Raj Papdeja

  • How can I defualt a value in a formValue field in an advance table

    Hi,
    I am developing 3 custom master detail OAF Pages. All of these pages have one advance table region(Detail Region). Master Region is a message component layout. All these pages share same AM.
    Source for advance table on all the pages is same database table.
    Vo for the advance table has a query as below:
    select * from XXTABLE where textid = &ref_id and rf_code ='PAGE1'
    select * from XXTABLE where textid = &ref_id and rf_code ='PAGE2'
    select * from XXTABLE where textid = &ref_id and rf_code ='PAGE3'
    I have created one EO and one VO on XXTABLE.
    I want to create 3AO and 3VL's for each master detail relationship.
    My requirement is to default "PAGE1", "PAGE2" and "PAGE3" respectively in the refcode filed in VO when it is called from there respective pages.
    Thanks!
    Ritu

    Hi Sanu,
    Thanks for addressing the issue.
    I can create multiple rows in advance table and with the click of a button all the rows are saved in one go. If I take a handle of VO in controller, I will still have to interate through each row in VOROwImpl to set ref_code for each row.(This would also need a logic to find which row is new and which is updated)
    Is there any way where I dont have to do any interation and set a default.
    Thanks!
    Ritu

  • How to get current row from advanced table

    Hi,
    I have the following code to pick the value of columnA from one of the columns of an advanced table:
    OAViewObject vo = (OAViewObject)am.findViewObject("AAALineVO2");
    if (vo != null)
    OARow vorow = (OARow)vo.getCurrentRow();
    String ColA = (String)vorow.getAttribute("ColumnA");
    String message = ColA; //to throw message so i can verify the value of ColumnA
    throw new OAException(message, OAException.INFORMATION);
    }It's picking up the first value of ColumnA of the first record correctly, however when I add a new row, it's not picking up the value of columnA anymore.
    What am I doing wrong?
    Thanks in advance,
    N

    Try with this:
    import oracle.apps.fnd.lookups.server.LookupCodeVORowImpl;
    public void aaa (String row)
        LookupCodeVORowImpl laborcreateeovorowimpl = (LookupCodeVORowImpl)findRowByRef(row);
    }Thanks
    --Anil                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • How to get current row of Advanced table with no submit

    I have an advanced table with an 'Add another button'. When an empty row is created by clicking this button, LOV is used on the first column to populate other fields of the row. The rows of the table carry a button called "Add dependencies" whose functionality is to take the user to a different table to add rows to a different VO. This button is just a button and not a submitButton. I am passing the row's primary key as part of the URI as Vo attribute FdTaskId={@FdTaskId}
    The button works perfectly fine for database fetched rows (rows already present in the database), but, for the rows created using 'Add Another button', though LOV populates all fields including the primary key, the URI parameter passes null to the next page. That means, the VO attribute is not set. This works fine only when a 'submit' happens in the first page. For example, if I click Add another row again, then the previously inserted row passes the primary key fine as part of {@FdTaskId}.
    Could you please help me how I can resolve this issue?
    Thanks,
    Datta

    I am doing exactly that. My issues is that, VO attribute is passed correct for the table rows which are fetched from the database. For the table rows which got created through 'Add Another button', the VO attribute passed through URI as {@FdTaskId} is returning null. The VO attribute sets only when a form submit happens. For example, after adding a row through 'Add another row' button, click the same button again to add one more row and now go back to previously added row and now you can see that its VO attribute is set ({@FdTaskId} carries value )

Maybe you are looking for

  • Ipod to tv  issue

    Jeff/anyone, I can't get videos on my New 80g ipod classic to play on my tv. I have the AV composite cable from APPLE and all of my settings are set correctly. I have tried every thing and have even talked to Apple Customer Service. After an hour and

  • A ChangeListener on a javabean with a JSlider

    I'm trying to figure out event handling. ColorSelector and LabelSliderText are beans. There are two instances of the ColorSelector bean in my JFrame, "foreground" and "background". Whenever a slider is moved, that LabelSliderText instance will print

  • Find people who wants to learn Korean

    Hi, I'm Korean college students, and I can speak Korean and English. It can be a great challenge to use skype to learn foreign language, both you and me. But if you want to talk about various topics, please contact me please. I want to learn Vietname

  • Since upgrading to Lion, applications are opening multiple files, how do I stop that?

    When I open pretty much ANY file, the application for that file will open not only the intended file, but also between one and three previously opened files.  Not sure how to stop that.  Once I've opened the file (and the unintended files), any other

  • I think I was cheated on the 645E Max-C

    I was hoping someone could answer a question. I just purchased a 645E Max-c (well thats what the box and all said).  But when I inspected it further the motherboard had been restickered with the 645E Max-C sticker being placed over the actual board s