Wednesday, 11 September 2013

Hide and Show region in PFR on Event

Here is  custom working solution for  Hide and Show region in PFR .


Step1: Declare global variable.

private static int chk = 0;


Step2: Write below code in PR

//Here im hiding Advanced Table Region


OAAdvancedTableBean table2 = (OAAdvancedTableBean)webBean.findChildRecursive("Table2RN");

     table2.queryData(pageContext, true);

    if (chk==1)

           {

             table2.setRendered(Boolean.TRUE);

           }

           if(chk==0){

             table2.setRendered(Boolean.FALSE);

           }


Step3: Write below code in PFR

if (pageContext.getParameter("SaveBtn") != null) //Show Table

              {
                chk = 1;

                pageContext.setForwardURLToCurrentPage(null, // no parameters to pass

                true, // retain the AM

                OAWebBeanConstants.ADD_BREAD_CRUMB_NO,

                OAWebBeanConstants.IGNORE_MESSAGES);

              }

 Thanks,
 Dilip

No comments: