This discussion is archived
8 Replies Latest reply: Jul 10, 2013 2:24 AM by 984644 RSS

row reference issue in CO

982326 Newbie
Currently Being Moderated
Hi,
My req is on selecting a check box in an advanced table on a seeded page, I had to disable a textinput. personalized the screen, added 2 columns checkbox and textinput. Substituted the standard VO, added 2 attributes for these 2 newly added columns.
extended the controller, added PPR logic on checkbox programatically in PR. In CO PFR, added the PPR handling logic. Inside it, im getting row reference and trying to get the value of one of attributes.

after deploying the code, on selecting check box, it is going inside the PPR handling logic and is erring out while im getting the attribute value.
I checked the standard VO and it neither has a primary key nor a key attribute. Hence while substituting the VO, I marked one of attributes as key attribute, deployed back code and bounced apache.

still im getting null pointer exception, please let me know how to get row reference in this case.

Code:
PR :-
OAMessageCheckBoxBean chkbox = (OAMessageCheckBoxBean)oawebbean.findIndexedChildRecursive("SelectInv");
FirePartialAction firePartialAction = new FirePartialAction();
firePartialAction.setEvent("selectPPR");
firePartialAction.setUnvalidated(true);
chkbox.setPrimaryClientAction(firePartialAction);

PFR :-
if("selectPPR".equals(oapagecontext.getParameter(OAWebBeanConstants.EVENT_PARAM)))
{
String rowRef = oapagecontext.getParameter(OAWebBeanConstants.EVENT_SOURCE_ROW_REFERENCE);
Row currentRow = am.findRowByRef(rowRef);
if("Y".equals(currentRow.getAttribute("Select"))) ---I'm getting null pointer here
{
currentRow.setAttribute("PaymentScheduleId","12345");
}
}

tried using currentRow != null, it didnt go inside the loop in this case.

Thanks!

Legend

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