1 2 Previous Next 22 Replies Latest reply on Feb 2, 2011 8:24 AM by Gyan Darpan

    how to get a value standad page to custom page

    725826
      Hi All,

      i have developed one custom page and also i deployed in EBS after that i created one button in seeded page by using personalization there i given Destination URI. whenever click on custom button it will open custom page. but my requirement is want pass standard page value to custom page. Could you please help one this..


      Thanks in Advance


      Thanks,
      Narayana
        • 1. Re: how to get a value standad page to custom page
          781651
          You can pass parameter value using view attributes in seeded page.

          For sample code refer :

          Info - Passing parameters in destination URI

          -Anand
          • 2. Re: how to get a value standad page to custom page
            725826
            Hi Anand,

            i have extended standard controller. I wrote below code in process request. i got a header id. But i want to pass header id value to custom page while click on custom button. i have created custom button by using personalization. Could you please help on this

            String wcHeader = pageContext.getParameter("WcHeaderId");
            pageContext.writeDiagnostics(this,"XXXXXXXXX"+wcHeader,1);
            pageContext.putTransactionTransientValue("WcHeaderId",wcHeader);






            Thanks,
            Narayana
            • 3. Re: how to get a value standad page to custom page
              Braj Pratap
              Hi ,

              when u were clicking on custom button of standard page ,then it will be taking you to the custom page right ?

              so

              1.) Root AM must be same on both the pages(standard page and custom page).

              2.) in custom page controller u can get this value either in PR or PFR method) using the

              String sMyValue=(String)pageContext.getTransactionTransientValue("WcHeaderId");



              thanks
              Pratap
              • 4. Re: how to get a value standad page to custom page
                725826
                Hi Pratap,

                Thanks for your suggestions. now it is working fine. i got want value based on your inputs. but i want to set that value to messageTextinput.



                Thanks,
                Narayana
                • 5. Re: how to get a value standad page to custom page
                  Gyan Darpan
                  Narayana,

                  You can achieve this by using the below code in your

                  import oracle.apps.fnd.framework.webui.beans.message.OAMessageTextInputBean;

                  OAMessageTextInputBean  cusBean= (OAMessageTextInputBean)webBean.findChildRecursive("BeanName");
                  cusBean.setValue(pageContext,Name); //Name will be your Fetched Value

                  Regards,
                  Gyan
                  • 6. Re: how to get a value standad page to custom page
                    Braj Pratap
                    Hi ,

                    1.) get the underlying VO object ,of the field (message text input )

                    and set the value

                    OAViewObject oav =(OAViewObject)am.findViewObject("VO NAME");
                    OARow row=oav.getCurrentRow();
                    row.setAttribute("Attribute name of that field ",value);

                    thanks
                    Pratap
                    • 7. Re: how to get a value standad page to custom page
                      725826
                      Hi All,

                      i tired both ways but i got a NullPointerException.

                      oracle.apps.fnd.framework.OAException: java.lang.NullPointerException
                           at oracle.apps.fnd.framework.OAException.wrapperException(OAException.java:912)
                           at oracle.apps.fnd.framework.webui.OAPageErrorHandler.prepareException(OAPageErrorHandler.java:1169)
                           at oracle.apps.fnd.framework.webui.OAPageErrorHandler.processErrors(OAPageErrorHandler.java:1435)
                           at oracle.apps.fnd.framework.webui.OAPageBean.processFormRequest(OAPageBean.java:2978)
                           at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:1875)
                           at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:543)
                           at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:431)
                           at OA.jspService(_OA.java:212)
                           at com.orionserver.http.OrionHttpJspPage.service(OrionHttpJspPage.java:59)
                           at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:379)
                           at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:594)
                           at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:518)
                           at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
                           at com.evermind.server.http.ResourceFilterChain.doFilter(ResourceFilterChain.java:64)
                           at oracle.apps.jtf.base.session.ReleaseResFilter.doFilter(ReleaseResFilter.java:26)
                           at com.evermind.server.http.EvermindFilterChain.doFilter(EvermindFilterChain.java:15)
                           at oracle.apps.fnd.security.AppsServletFilter.doFilter(AppsServletFilter.java:318)
                           at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:621)
                           at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:370)
                           at com.evermind.server.http.HttpRequestHandler.doProcessRequest(HttpRequestHandler.java:871)
                           at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:453)
                           at com.evermind.server.http.AJPRequestHandler.run(AJPRequestHandler.java:313)
                           at com.evermind.server.http.AJPRequestHandler.run(AJPRequestHandler.java:199)
                           at oracle.oc4j.network.ServerSocketReadHandler$SafeRunnable.run(ServerSocketReadHandler.java:260)
                           at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:303)
                           at java.lang.Thread.run(Thread.java:619)
                      ## Detail 0 ##
                      java.lang.NullPointerException
                           at xxbb.oracle.apps.pos.wc.webui.xxWcRespondCO.processFormRequest(xxWcRespondCO.java:45)
                           at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequest(OAWebBeanHelper.java:819)
                           at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processFormRequest(OAWebBeanContainerHelper.java:385)
                           at oracle.apps.fnd.framework.webui.OAPageLayoutHelper.processFormRequest(OAPageLayoutHelper.java:1205)
                           at oracle.apps.fnd.framework.webui.beans.layout.OAPageLayoutBean.processFormRequest(OAPageLayoutBean.java:1579)
                           at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequestChildren(OAWebBeanHelper.java:1031)
                           at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequestChildren(OAWebBeanHelper.java:997)
                           at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequest(OAWebBeanHelper.java:852)
                           at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processFormRequest(OAWebBeanContainerHelper.java:385)
                           at oracle.apps.fnd.framework.webui.beans.form.OAFormBean.processFormRequest(OAFormBean.java:395)
                           at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequestChildren(OAWebBeanHelper.java:1031)
                           at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequestChildren(OAWebBeanHelper.java:997)
                           at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequest(OAWebBeanHelper.java:852)
                           at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processFormRequest(OAWebBeanContainerHelper.java:385)
                           at oracle.apps.fnd.framework.webui.beans.OABodyBean.processFormRequest(OABodyBean.java:363)
                           at oracle.apps.fnd.framework.webui.OAPageBean.processFormRequest(OAPageBean.java:2974)
                           at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:1875)
                           at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:543)
                           at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:431)
                           at OA.jspService(_OA.java:212)
                           at com.orionserver.http.OrionHttpJspPage.service(OrionHttpJspPage.java:59)
                           at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:379)
                           at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:594)
                           at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:518)
                           at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
                           at com.evermind.server.http.ResourceFilterChain.doFilter(ResourceFilterChain.java:64)
                           at oracle.apps.jtf.base.session.ReleaseResFilter.doFilter(ReleaseResFilter.java:26)
                           at com.evermind.server.http.EvermindFilterChain.doFilter(EvermindFilterChain.java:15)
                           at oracle.apps.fnd.security.AppsServletFilter.doFilter(AppsServletFilter.java:318)
                           at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:621)
                           at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:370)
                           at com.evermind.server.http.HttpRequestHandler.doProcessRequest(HttpRequestHandler.java:871)
                           at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:453)
                           at com.evermind.server.http.AJPRequestHandler.run(AJPRequestHandler.java:313)
                           at com.evermind.server.http.AJPRequestHandler.run(AJPRequestHandler.java:199)
                           at oracle.oc4j.network.ServerSocketReadHandler$SafeRunnable.run(ServerSocketReadHandler.java:260)
                           at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:303)
                           at java.lang.Thread.run(Thread.java:619)
                      java.lang.NullPointerException
                           at xxbb.oracle.apps.pos.wc.webui.xxWcRespondCO.processFormRequest(xxWcRespondCO.java:45)
                           at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequest(OAWebBeanHelper.java:819)
                           at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processFormRequest(OAWebBeanContainerHelper.java:385)
                           at oracle.apps.fnd.framework.webui.OAPageLayoutHelper.processFormRequest(OAPageLayoutHelper.java:1205)
                           at oracle.apps.fnd.framework.webui.beans.layout.OAPageLayoutBean.processFormRequest(OAPageLayoutBean.java:1579)
                           at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequestChildren(OAWebBeanHelper.java:1031)
                           at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequestChildren(OAWebBeanHelper.java:997)
                           at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequest(OAWebBeanHelper.java:852)
                           at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processFormRequest(OAWebBeanContainerHelper.java:385)
                           at oracle.apps.fnd.framework.webui.beans.form.OAFormBean.processFormRequest(OAFormBean.java:395)
                           at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequestChildren(OAWebBeanHelper.java:1031)
                           at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequestChildren(OAWebBeanHelper.java:997)
                           at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequest(OAWebBeanHelper.java:852)
                           at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processFormRequest(OAWebBeanContainerHelper.java:385)
                           at oracle.apps.fnd.framework.webui.beans.OABodyBean.processFormRequest(OABodyBean.java:363)
                           at oracle.apps.fnd.framework.webui.OAPageBean.processFormRequest(OAPageBean.java:2974)
                           at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:1875)
                           at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:543)
                           at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:431)
                           at OA.jspService(_OA.java:212)
                           at com.orionserver.http.OrionHttpJspPage.service(OrionHttpJspPage.java:59)
                           at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:379)
                           at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:594)
                           at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:518)
                           at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
                           at com.evermind.server.http.ResourceFilterChain.doFilter(ResourceFilterChain.java:64)
                           at oracle.apps.jtf.base.session.ReleaseResFilter.doFilter(ReleaseResFilter.java:26)
                           at com.evermind.server.http.EvermindFilterChain.doFilter(EvermindFilterChain.java:15)
                           at oracle.apps.fnd.security.AppsServletFilter.doFilter(AppsServletFilter.java:318)
                           at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:621)
                           at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:370)
                           at com.evermind.server.http.HttpRequestHandler.doProcessRequest(HttpRequestHandler.java:871)
                           at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:453)
                           at com.evermind.server.http.AJPRequestHandler.run(AJPRequestHandler.java:313)
                           at com.evermind.server.http.AJPRequestHandler.run(AJPRequestHandler.java:199)
                           at oracle.oc4j.network.ServerSocketReadHandler$SafeRunnable.run(ServerSocketReadHandler.java:260)
                           at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:303)
                           at java.lang.Thread.run(Thread.java:619)

                      Thanks,
                      Narayana
                      • 8. Re: how to get a value standad page to custom page
                        Gyan Darpan
                        Narayana,

                        Did you try the way suggested by me....

                        If yes then had you been able to find the MessageTextInput Bean objects.

                        Try to put some SOP's like below and get the output for the same...

                        <H6>OAMessageTextInputBean cusBean= (OAMessageTextInputBean)webBean.findChildRecursive("BeanName");

                        System.out.println("CusBean True");

                        System.out.println("Value you want to set in bean : "+Name);//Replace the name by your exact variable name

                        cusBean.setValue(pageContext,Name); //Name will be your Fetched Value

                        System.out.println("set Value");</H6>

                        Regards,
                        Gyan
                        • 9. Re: how to get a value standad page to custom page
                          Braj Pratap
                          hi
                          pls share the line 45 of xxWcRespondCO

                          if possible pls share the complete code .


                          thanks
                          Pratap
                          • 10. Re: how to get a value standad page to custom page
                            725826
                            Hi All,

                            Below is my controller code.


                            import oracle.apps.fnd.framework.OAApplicationModule;
                            import oracle.apps.fnd.framework.OARow;
                            import oracle.apps.fnd.framework.OAViewObject;
                            import oracle.apps.fnd.framework.webui.OAPageContext;
                            import oracle.apps.fnd.framework.webui.OAWebBeanConstants;
                            import oracle.apps.fnd.framework.webui.beans.OAWebBean;
                            import oracle.apps.fnd.framework.webui.beans.form.OASubmitButtonBean;
                            import oracle.apps.fnd.framework.webui.beans.message.OAMessageTextInputBean;
                            import oracle.apps.fnd.framework.webui.beans.nav.OAButtonBean;
                            import oracle.apps.pos.wc.webui.WcRespondCO;

                            import oracle.jbo.domain.Number;

                            public class xxWcRespondCO extends WcRespondCO {
                            public xxWcRespondCO() {
                            }
                            public void processRequest(OAPageContext pageContext, OAWebBean webBean)
                            {
                            super.processRequest(pageContext, webBean);
                            String wcHeader = pageContext.getParameter("WcHeaderId");
                            pageContext.writeDiagnostics(this,"XXXXXXXXX"+wcHeader,1);
                            pageContext.putTransactionTransientValue("WcHeaderId",wcHeader);
                            // pageContext.putSessionValue("wcHeader",wcHeader);
                            //now create new button programatically
                            OASubmitButtonBean oasb= (OASubmitButtonBean)pageContext.getWebBeanFactory().createWebBean(pageContext,"BUTTON_SUBMIT");
                            oasb.setID("XXbbWithhold");
                            oasb.setUINodeName("XXbbWithhold");
                            oasb.setEvent("XXbbWithhold");
                            oasb.setText("Withholding/Contra");
                            webBean.addIndexedChild(oasb);


                            }
                            public void processFormRequest(OAPageContext pageContext, OAWebBean webBean)
                            {
                            super.processFormRequest(pageContext, webBean);
                            OAApplicationModule am = pageContext.getApplicationModule(webBean);
                            OAMessageTextInputBean item=(OAMessageTextInputBean)webBean.findIndexedChildRecursive("item3");
                            String wcHeader=(String)pageContext.getTransactionTransientValue("WcHeaderId");
                            pageContext.writeDiagnostics(this,"YYYYYYYYY"+wcHeader,1);
                            pageContext.putTransactionTransientValue("WcHeaderId",wcHeader);
                            OAViewObject oav =(OAViewObject)am.findViewObject("WcHdrResponseVO");
                            OARow row= (OARow)oav.getCurrentRow();
                            row.setAttribute("item",wcHeader);


                            String strEvent= pageContext.getParameter(EVENT_PARAM) ;
                            if(strEvent.equals("XXbbWithhold"))
                            {
                            pageContext.setForwardURL("OA.jsp?page=/xxbb/oracle/apps/pos/xxwc/webui/WithholdPG"
                            ,null
                            ,OAWebBeanConstants.KEEP_MENU_CONTEXT
                            ,null
                            ,null
                            ,true
                            ,OAWebBeanConstants.ADD_BREAD_CRUMB_YES
                            ,OAWebBeanConstants.IGNORE_MESSAGES);


                            }

                            }
                            }
                            • 11. Re: how to get a value standad page to custom page
                              Braj Pratap
                              hi

                              did u check that

                              oav is not null ,pls tell which line is 45 in the entire code ?

                              thanks
                              Pratap
                              • 12. Re: how to get a value standad page to custom page
                                725826
                                Hi Gyan.

                                i tired as per your suggestion agin i got a nullpointerexception. below is my controller code.
                                import oracle.apps.fnd.framework.OAApplicationModule;
                                import oracle.apps.fnd.framework.OARow;
                                import oracle.apps.fnd.framework.OAViewObject;
                                import oracle.apps.fnd.framework.webui.OAPageContext;
                                import oracle.apps.fnd.framework.webui.OAWebBeanConstants;
                                import oracle.apps.fnd.framework.webui.beans.OAWebBean;
                                import oracle.apps.fnd.framework.webui.beans.form.OASubmitButtonBean;
                                import oracle.apps.fnd.framework.webui.beans.message.OAMessageTextInputBean;
                                import oracle.apps.fnd.framework.webui.beans.nav.OAButtonBean;
                                import oracle.apps.pos.wc.webui.WcRespondCO;

                                import oracle.jbo.domain.Number;

                                public class xxWcRespondCO extends WcRespondCO {
                                public xxWcRespondCO() {
                                }
                                public void processRequest(OAPageContext pageContext, OAWebBean webBean)
                                {
                                super.processRequest(pageContext, webBean);
                                String wcHeader = pageContext.getParameter("WcHeaderId");
                                pageContext.writeDiagnostics(this,"XXXXXXXXX"+wcHeader,1);
                                pageContext.putTransactionTransientValue("WcHeaderId",wcHeader);
                                // pageContext.putSessionValue("wcHeader",wcHeader);
                                //now create new button programatically
                                OASubmitButtonBean oasb= (OASubmitButtonBean)pageContext.getWebBeanFactory().createWebBean(pageContext,"BUTTON_SUBMIT");
                                oasb.setID("XXbbWithhold");
                                oasb.setUINodeName("XXbbWithhold");
                                oasb.setEvent("XXbbWithhold");
                                oasb.setText("Withholding/Contra");
                                webBean.addIndexedChild(oasb);


                                }
                                public void processFormRequest(OAPageContext pageContext, OAWebBean webBean)
                                {
                                super.processFormRequest(pageContext, webBean);
                                OAApplicationModule am = pageContext.getApplicationModule(webBean);
                                OAMessageTextInputBean item=(OAMessageTextInputBean)webBean.findIndexedChildRecursive("item3");
                                String wcHeader=(String)pageContext.getTransactionTransientValue("WcHeaderId");
                                pageContext.writeDiagnostics(this,"YYYYYYYYY"+wcHeader,1);
                                pageContext.putTransactionTransientValue("WcHeaderId",wcHeader);
                                /*OAViewObject oav =(OAViewObject)am.findViewObject("WcHdrResponseVO");
                                OARow row= (OARow)oav.getCurrentRow();
                                row.setAttribute("item",ShipmentHeaderId);*/
                                item.setValue(pageContext,wcHeader*);//*here Passing Null value**
                                String strEvent= pageContext.getParameter(EVENT_PARAM) ;
                                if(strEvent.equals("XXbbWithhold"))
                                {
                                pageContext.setForwardURL("OA.jsp?page=/xxbb/oracle/apps/pos/xxwc/webui/WithholdPG"
                                ,null
                                ,OAWebBeanConstants.KEEP_MENU_CONTEXT
                                ,null
                                ,null
                                ,true
                                ,OAWebBeanConstants.ADD_BREAD_CRUMB_YES
                                ,OAWebBeanConstants.IGNORE_MESSAGES);


                                }

                                }
                                }
                                • 13. Re: how to get a value standad page to custom page
                                  Gyan Darpan
                                  Narayana,

                                  you need to set the value on WithholdPG. The code given by me must be used with the controller associated with your WithholdPG.

                                  I hope u need to get the value from the previous page and set the same in the WithholdPG page.

                                  If this is the case then put the value pageContext.putTransactionTransientValue("WcHeaderId",wcHeader);

                                  And get it into the next page controller and set it the way i have suggested.

                                  I hope i am clear with your requirement.

                                  Regards,
                                  Gyan
                                  • 14. Re: how to get a value standad page to custom page
                                    725826
                                    Hi Gyan,

                                    Yes your Clear my requirement. while click on custom button it will open WithholdPG here i want set previous page value. As per your suggestion i tried but i got a null value. below code i wrote another controller.

                                    pageContext.putTransactionTransientValue("WcHeaderId",wcHeader).


                                    Thanks,
                                    Narayana
                                    1 2 Previous Next