3 Replies Latest reply: Sep 9, 2013 1:56 AM by user13424229 RSS

    issue with table selection and display the seleted rows in another page as a table data

    user13424229

      Dear ALL,

      I have a  requirement as below:

      I have a custom OAF  page having one button, on pressing the button it will open a popup window, in that i am doing search operation and data would populate in table region below.

      Then from the table i am doing multiple selection of rows and i have a button, on pressing the button the seleted rows should display in the base page where i called this popup window and popup window should close.

       

      so i am able to perform multiple selection of row  from the table but how i can display the seleted rows in my base page  and how i can close the poup window after the seleted rows displayed in the base page, please help me on this.

       

       

       

      Thanks

      Deb

        • 1. Re: issue with table selection and display the seleted rows in another page as a table data
          Shddn

          Deb

           

          On your popup page, you need to develop a StringBuilder object. append it in row.getAttr1+"$"+row.getAttr2... +@+row.getAttr1+"$"+row.getAttr2...

           

          Store it in some session parameter.

           

          Where @ would be for new line.

           

          You can create a javaScrit.Close button with submit option. Once you close popup in base page split the StringBuilder object with @ for every line and $ for each column. Create a OAF table with transient virew attr view object. fill this view object with data from StringBuilder.

           

          You should clear the trans vo every time you open popup

           

          Regards

           

          Shobhit S

          • 2. Re: issue with table selection and display the seleted rows in another page as a table data
            DilipG

            Hi,

             

            For navigation data from one page to another  you can use  a hashmap that contains the parameters.

             

             

            // processFormRequest()

            HashMap hsp = new HashMap(1);

            hsp.put("myParam", "myParamVal");

             

            pagecontext.setForwardURL("MY_FUNCTION", (byte)0, null, hsp,true, "N", (byte)0);

             

            You can then retrieve this parameter in processRequest() via:

            pagecontext.getParameter("myParam")

             

             

            //Code for redirect to base page with commit

             

             

             

            Refer to the setPostToCallingPage method, from OADialogPage Class how to make the dialog page action buttons submit back to the calling page. In the example, the OK button commits the changes on the dialog page and the NO button rolls back the changes.

             

             

            OADialogPage dialogPage = new OADialogPage(OAException.*, mainMessage, null, "", "");

            dialogPage.setOkButtonItemName("okButton");

                       dialogPage.setOkButtonToPost(true);

                       dialogPage.setNoButtonToPost(true);

                       dialogPage.setPostToCallingPage(true);

                       dialogPage.setOkButtonLabel(yes);

                       dialogPage.setNoButtonLabel(no);

             

            Thanks,

            Dilip

            • 3. Re: issue with table selection and display the seleted rows in another page as a table data
              user13424229

              Hi Dilip,

              Thanks for the reply, actually from the popup search page whatever results it is showing in table region the same data i need to display in base page after pressing one button.

               

              please help me out.

               

              Thanks

              Deb