Saturday, November 21, 2009

OAF : Partial Page Rendering : PPR

How to Implement PPR into OAF ?

${oa.ABCPVO1.NeelmaniRender} // Set this value for RENDER attribute of the UI Component


Put the below code into ProcessFormRequest
------------------------------------------------------

if ("entityPoplistChange".equals(pageContext.getParameter(OAWebBeanConstants.EVENT_PARAM)))
{
String entitypoplist=pageContext.getParameter("Entitypoplist");
Serializable[] param = {entitypoplist};
am.invokeMethod("handlePositionChangeEvent", param);
}

Put the below code into xxxAMImpl.java
------------------------------------------------

public void handlePositionChangeEvent(String param)
{
OAViewObject vo = (OAViewObject)findViewObject("ABCPVO1");
OARow row = (OARow)vo.first();

if(s.equals("param"))
{
row.setAttribute("NeelmaniRender", Boolean.TRUE);
row.setAttribute("JaiswalRender", Boolean.FALSE);
}
else
{
row.setAttribute("JaiswalRender", Boolean.TRUE);
row.setAttribute("NeelmaniRender", Boolean.FALSE);
}
}