I have a page to which I added an embedded popup on an image item in an advanced table.There are two regions in this popup, header region and another region with advanced table. The header region, I am rendering items with base page VO attributes. For the table, I have a separate VO. The table has only one column which is an LOV. I am using same AM for both popup and base page. I want to be able to access base page VO row in the popup Controller. How do I access base page VO row.
getFetchedRowCount() is returning 0 and getRowCount() for base page VO is giving a high number which is not correct when I check in the AM method which is called from PR of popup CO.
I just want to know how do I access basepage VO row from popup. Can somebody provide me an idea on this?
Please go through the below link:
Please share how you are using the base page VO in your popup CO, share the code.
and how it is initialized in AM
I need to set base page VO attribute with a value from popup. That is the reason, I need to access base page VO row. I am able to assign base page VO attributes to items in popup and they are getting rendered correctly. It means they can be accessed in popup. I want to know how to programmatically get the base page VO row.
In your CO(Whereever you want the VO, in that page CO)
OAApplicationModule am = (OAApplicationModule)pageContext.getApplicationModule(webBean);
OAViewObject cusVO= (OAViewObject)am.findViewObject(VOName);
OARow empRow = (OARow)cusVO.getCurrentRow(); ///get the vo row here
String position = (String)empRow.getAttribute("Vo attirbute name"); ///get the perticular column from the vo
if((position == null) || ("YES".equalsIgnoreCase(position)))
empRow.setAttribute("EnableList4", Boolean.FALSE);//Whatever setting you want do it
Let me know if you need any other help
getCurrentRow() is returning null. Basically, I have an advanced table in which there is a column for image item on which this popup is enabled. As I click on the image icon for the table row in the main page, popup opens. In this popup, I want to access the main page VO row.
How do I get reference to main page VOrow ?
I am using same AM for both page and popup. In the popup controller process request(), I am calling AM init method for popup. In the AM method, I can use main page VO row class as it is the same AM for both popup and page. But I am not able to get reference to main page VO row. getFetchedRowCount() is returning 0 and getRowCount() for main page VO is giving a high number which is not correct, getCurrentRow() is returning null.