3 Replies Latest reply: Sep 11, 2013 2:19 AM by DilipG RSS

    Hiding Region:Urgent

    9d452cf7-d17f-4d1e-8e0e-b22539ea8810

      Hi ,

       

      I have to hide the region when button pressed , can we do that one ?

      I am getting error that webBean properties should not be modified in the PFR or Controller processFormData................

      If we can't change the properties, is there any way to achieve this ?

      Plz..... suggest me ......

       

      Thanks in Advance,

      Jaya

        • 1. Re: Hiding Region:Urgent
          Mahesh112

          Hi,

           

          Use PPR for the  region and when you click on button in PFR, send the control to the same page using "pageContext.setForwardURLToCurrentPage"

          and in PR take the hashmap values and event name and under that event set the rendered property false for the region.

           

          Regards

          Mahesh

          • 2. Re: Hiding Region:Urgent
            9d452cf7-d17f-4d1e-8e0e-b22539ea8810

              Thank u very much  Mahesh.................

             

            I will try  that.....

             

            again Thanks.........

            • 3. Re: Hiding Region:Urgent
              DilipG

              Hi jaya,

               

               

              Here is  custom working solution for  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);

                            }

               

              Let me know for any issue.

               

              Thanks,

              Dilip