1 Reply Latest reply: Jul 10, 2013 1:02 AM by 984644 RSS

    Unable to get RowReference in Advanced Table

    984644

      Hi,

       

      We are trying to extend a seeded controller. The region contains an advanced table. The table contains flexfield segment columns which get displayed programmatically depending on the flexfield context.

       

      We have added a PPR event programmatically to one of the flexfield segment columns displayed on the table. When tabbing out from that column row we are expecting row reference to get the VO row of that table.

       

      But the Rowreference is coming as null and we are unable to fetch current row. Below is the code we are using in PFR for adding the PPR and fetching the RowReference:

       

       

           public void processFormRequest(OAPageContext pageContext,

      OAWebBean webBean) {

      logEntry(pageContext, "ExtComponentSerialRNCO.processFormRequest()");

      super.processFormRequest(pageContext, webBean);

      OAApplicationModule am = pageContext.getApplicationModule(webBean);

       

      String event =

      pageContext.getParameter(OAWebBeanConstants.EVENT_PARAM);

      String flexevent = pageContext.getParameter(FLEX_FORM_EVENT);

       

       

      if ("scanSerialMultiTable".equals(event)) {

       

      OAAdvancedTableBean multiScantbl =

      (OAAdvancedTableBean)pageContext.getPageLayoutBean().findChildRecursive("MultiScanTable");

      if (multiScantbl != null) {

       

      int count = multiScantbl.getIndexedChildCount();

      for (int i = 0; i < count; i++) {

      OAWebBean flexfieldbean2 =

      (OAWebBean)multiScantbl.getIndexedChild(i);

      String xcolumn = flexfieldbean2.getID();

      System.out.println(flexfieldbean2.getID());

      if ("FlexSerialAttr1_column".equals(xcolumn)) {

      System.out.println(flexfieldbean2.getID());

      int count2 = flexfieldbean2.getIndexedChildCount();

      for (int j = 0; j < count2; j++) {

      OAWebBean flexfieldbean3 =

      (OAWebBean)flexfieldbean2.getIndexedChild(j);

      String xcolumn1 =

      flexfieldbean3.getID(); //qfindIndexedChildRecursive("FlexSerialAttr1");

      String columnName =

      (String)flexfieldbean3.getAttributeValue(FLEXFIELD_COLUMN_NAME);

       

      if ("FlexSerialAttr1".equals(xcolumn1) &&

      "C_ATTRIBUTE10".equals(columnName)) {

      // add ppr

      {

      FireAction fprA = new FireAction();

      fprA.setEvent("macAddressEvent");

      fprA =

      OAWebBeanUtils.getFireActionForSubmit(flexfieldbean3, "macAddressEvent", null,

      null, true, true);

      flexfieldbean3.setAttributeValue(oracle.cabo.ui.UIConstants.PRIMARY_CLIENT_ACTION_ATTR,

      fprA);

      }

       

      // find spmac

      for (int k = 0; k < count; k++) {

       

      OAWebBean flexfieldbean4 =

      (OAWebBean)multiScantbl.getIndexedChild(k);

      System.out.println(flexfieldbean4.getID());

      int count3 =

      flexfieldbean4.getIndexedChildCount();

       

      for (int l = 0; l < count3; l++) {

      String xcolumnName = null;

      String xfoucsId = null;

      OAWebBean flexfieldbean5 =

      (OAWebBean)flexfieldbean4.getIndexedChild(l);

      xcolumnName =

      (String)flexfieldbean5.getAttributeValue(FLEXFIELD_COLUMN_NAME);

      xfoucsId = flexfieldbean5.getID();

       

      if ("C_ATTRIBUTE18".equals(xcolumnName))

       

      { //setting SP Mac Id as Read-Only

      flexfieldbean5.setAttributeValue(READ_ONLY_ATTR,

      true);

       

      pageContext.putTransactionValue("spExists",

      "yes");

       

      break;

      } //end if SP MAC ID label

      } // end of for loop l

      } // end of for loop k

      break;

      } // end if C_ATTRIBUTE10

      } // end of for j

      break;

      } //"FlexSerialAttr1_column

      } //end of loop i

      /*   } //end of try

      catch (Exception e) {

      throw new OAException(e.getMessage(),OAException.ERROR); }*/

      } // End of multiScantbl

      }

       

       

      if ("macAddressEvent".equals(event)) {

       

      System.out.println("Inside Mac address event");

       

      String rowRef = pageContext.getParameter(OAWebBeanConstants.EVENT_SOURCE_ROW_REFERENCE);

      Serializable[] params1 = {rowRef};

      if(rowRef != null)

      System.out.println("Inside rowref ");

      ScanComponentSerialVOImpl scanCompVO =

      (ScanComponentSerialVOImpl)am.findViewObject("ScanComponentSerialVO1");

      ScanComponentSerialVORowImpl scanCompVORow =

      (ScanComponentSerialVORowImpl)scanCompVO.first();

      ScanComponentSerialVOImpl multiScanTableVO =

      (ScanComponentSerialVOImpl)am.findViewObject("ScanComponentSerialVO2");

       

      ScanComponentSerialVORowImpl row = (ScanComponentSerialVORowImpl)am.findRowByRef(rowRef);

       

       

      Please let me know how to get the rowreference in this case.


      Thanks in Advance!