5 Replies Latest reply: Dec 7, 2012 6:24 AM by AnilO RSS

    change text of header region dynamically

    AnilO
      Hello,

      I am new in OAF. I created a View Object, an Application Module and a Page. In this page, i used a header region and below it, i created a table which shows an information from VO.

      What i really want to do is change the title of header region dynamically. This info get from a function in database. i invoke a method from AM in process request and get the result of function in string but i can not change the title. ı use this;

      OATableBean headerBean = (OATableBean)webBean.findChildRecursive();

      Sorry for bad english but can you experts help me?
        • 1. Re: change text of header region dynamically
          D.Ram
          You are using wrong class.
          You should use OAHeaderBean class.

          import oracle.apps.fnd.framework.webui.beans.layout.OAHeaderBean;

          OAHeaderBean headerBean = (OAHeaderBean)webBean.findChildRecursive("<ur header region id>");
          headerBean.setText(dynamicText);




          Regards,
          Ram
          • 2. Re: change text of header region dynamically
            AnilO
            It gives NullPointerException
            • 3. Re: change text of header region dynamically
              AnilO
              Thanks for the reply.

              I tried but it gave 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.OAWebBeanHelper.processRequest(OAWebBeanHelper.java:616)
                   at oracle.apps.fnd.framework.webui.OAWebBeanTableHelper.processRequest(OAWebBeanTableHelper.java:2144)
                   at oracle.apps.fnd.framework.webui.beans.table.OATableBean.processRequest(OATableBean.java:1035)
                   at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:968)
                   at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:935)
                   at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequest(OAWebBeanHelper.java:659)
                   at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processRequest(OAWebBeanContainerHelper.java:252)
                   at oracle.apps.fnd.framework.webui.beans.layout.OAHeaderBean.processRequest(OAHeaderBean.java:391)
                   at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:968)
                   at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:935)
                   at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequest(OAWebBeanHelper.java:659)
                   at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processRequest(OAWebBeanContainerHelper.java:252)
                   at oracle.apps.fnd.framework.webui.beans.layout.OAStackLayoutBean.processRequest(OAStackLayoutBean.java:350)
                   at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:968)
                   at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:935)
                   at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequest(OAWebBeanHelper.java:659)
                   at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processRequest(OAWebBeanContainerHelper.java:252)
                   at oracle.apps.fnd.framework.webui.OAPageLayoutHelper.processRequest(OAPageLayoutHelper.java:1182)
                   at oracle.apps.fnd.framework.webui.beans.layout.OAPageLayoutBean.processRequest(OAPageLayoutBean.java:1569)
                   at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:968)
                   at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:935)
                   at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequest(OAWebBeanHelper.java:659)
                   at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processRequest(OAWebBeanContainerHelper.java:252)
                   at oracle.apps.fnd.framework.webui.beans.form.OAFormBean.processRequest(OAFormBean.java:385)
                   at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:968)
                   at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:935)
                   at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequest(OAWebBeanHelper.java:659)
                   at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processRequest(OAWebBeanContainerHelper.java:252)
                   at oracle.apps.fnd.framework.webui.beans.OABodyBean.processRequest(OABodyBean.java:353)
                   at oracle.apps.fnd.framework.webui.OAPageBean.processRequest(OAPageBean.java:2607)
                   at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:1940)
                   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:209)
                   at com.orionserver.http.OrionHttpJspPage.service(OrionHttpJspPage.java:59)
                   at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:473)
                   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.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:734)
                   at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:391)
                   at com.evermind.server.http.ServletRequestDispatcher.unprivileged_forward(ServletRequestDispatcher.java:280)
                   at com.evermind.server.http.ServletRequestDispatcher.access$100(ServletRequestDispatcher.java:68)
                   at com.evermind.server.http.ServletRequestDispatcher$2.oc4jRun(ServletRequestDispatcher.java:214)
                   at oracle.oc4j.security.OC4JSecurity.doPrivileged(OC4JSecurity.java:284)
                   at com.evermind.server.http.ServletRequestDispatcher.forward(ServletRequestDispatcher.java:219)
                   at com.evermind.server.http.EvermindPageContext.forward(EvermindPageContext.java:395)
                   at RF.jspService(_RF.java:222)
                   at com.orionserver.http.OrionHttpJspPage.service(OrionHttpJspPage.java:59)
                   at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:473)
                   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:642)
                   at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:391)
                   at com.evermind.server.http.HttpRequestHandler.doProcessRequest(HttpRequestHandler.java:908)
                   at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:458)
                   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:662)
              ## Detail 0 ##
              java.lang.NullPointerException
                   at xxpwc.oracle.apps.per.selfservice.specialinformation.webui.PersonalTrainingsCO.processRequest(PersonalTrainingsCO.java:47)
                   at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequest(OAWebBeanHelper.java:600)
                   at oracle.apps.fnd.framework.webui.OAWebBeanTableHelper.processRequest(OAWebBeanTableHelper.java:2144)
                   at oracle.apps.fnd.framework.webui.beans.table.OATableBean.processRequest(OATableBean.java:1035)
                   at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:968)
                   at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:935)
                   at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequest(OAWebBeanHelper.java:659)
                   at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processRequest(OAWebBeanContainerHelper.java:252)
                   at oracle.apps.fnd.framework.webui.beans.layout.OAHeaderBean.processRequest(OAHeaderBean.java:391)
                   at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:968)
                   at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:935)
                   at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequest(OAWebBeanHelper.java:659)
                   at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processRequest(OAWebBeanContainerHelper.java:252)
                   at oracle.apps.fnd.framework.webui.beans.layout.OAStackLayoutBean.processRequest(OAStackLayoutBean.java:350)
                   at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:968)
                   at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:935)
              • 4. Re: change text of header region dynamically
                keerthioaf
                Hi ,

                Try this ,

                OAHeaderBean headerBean = (OAHeaderBean)webBean.findChildRecursive("<ur header region id>");//replace your correct header id
                if( headerBean != null)
                {
                headerBean.setText(dynamicText);
                }


                Note : your error is @ PersonalTrainingsCO.java:47( line 47 ) , try to figure out what is causing the issue .

                Keerthi

                Edited by: keerthioaf on Dec 7, 2012 4:13 AM
                • 5. Re: change text of header region dynamically
                  AnilO
                  I forgot to set Controller Class name to region now it runs succesfully.

                  Thanks