7 Replies Latest reply on Jun 26, 2012 5:58 AM by 945761

    Form Validation in OAF . Throw warning message .

    user1140193
      Hi Friends ,

      Here is my requirement .

      User enters the data into OAF page and try to navigate with out saving it , at this instant i want
      throw an pop up message to the user saying " changes you have made has not been saved , do you
      wish to continue " with two option in it "YES" & "NO" .

      If user presses YES , data should be saved and navigate to different page .
      If user presses NO , data should be NOT be save and navigate do different page .

      How do i accomplish this challenge in OAF ? Please give your suggestions .

      Thanks in Advance ,
      Keerthi.k
        • 1. Re: Form Validation in OAF . Throw warning message .
          Gyan Darpan
          Hi,

          On the click of submit button, u need to set a variable value as true. And if the user try to navigate away from that page.....then u need to check whether the said variable is true or not. If not then show the dialog page using below code.
          MessageToken[] tokens = { new MessageToken(null,null)};
          OAException mainMessage = new OAException("AK", "FWK_TBX_T_EMP_DELETE_WARN", tokens);
          
          OADialogPage dialogPage = new OADialogPage(OAException.WARNING, 
          mainMessage, null, "", "");
          
          String yes = pageContext.getMessage("AK", "FWK_TBX_T_YES", null);
          String no = pageContext.getMessage("AK", "FWK_TBX_T_NO", null);
          
          dialogPage.setOkButtonItemName("DeleteYesButton");
          
          dialogPage.setOkButtonToPost(true);
          dialogPage.setNoButtonToPost(true);
          dialogPage.setPostToCallingPage(true);
          
          pageContext.redirectToDialogPage(dialogPage);
          Regards,
          Gyan
          1 person found this helpful
          • 2. Re: Form Validation in OAF . Throw warning message .
            AnilSharma
            You have to implement Dialog page functionality. Please go through the delete exercise shipped in Oracle OAF Tutorials.

            Thanks
            --Anil
            http://oracleanil.blogspot.com
            1 person found this helpful
            • 3. Re: Form Validation in OAF . Throw warning message .
              user1140193
              Thanks for your response Gyan ,

              But in my case the user will click the browser back button or does something (like click on home or return navigation)
              with out saving the data in that instant i wish to throw an warning message .

              This is very similar to oracle standard , eg : In xml publisher while creating a template , once the user enters
              value try to navigate away from the page with out saving it then you might have noticed that there would be
              some standard validation happening , a small popup window opens saying " changes you have made has not beens
              saved do you wish to continue " with two " YES " & " NO " option .

              I wish to have a similar validation . Please let me know how this can be done ?

              Regards ,
              Keerthi
              • 4. Re: Form Validation in OAF . Throw warning message .
                user1140193
                Thanks Anil ,

                But the requirement is quite different , In delete exercise the user will click on the delete icon and try to delete the
                employee based the selection ,each time the user click on icon the warning message get displayed and based on YES
                or NO the record get deleted .

                But in my case i should throw an warning message when ever user try to navigate away from the page with out any commit .

                This is very similar to oracle standard , eg : In xml publisher while creating a template , once the user enters
                value try to navigate away from the page with out saving it then you might have noticed that there would be
                some standard validation happening , a small popup window opens saying " changes you have made has not beens
                saved do you wish to continue " with two " YES " & " NO " option .

                The user wish to have a similar validation . Anil please share you thought on this .

                Thanks in Advance ,
                Keerthi.k
                • 5. Re: Form Validation in OAF . Throw warning message .
                  MeherIrk
                  Hi,
                  user1140193 wrote:
                  But in my case the user will click the browser back button or does something (like click on home or return >navigation)
                  Using below code u can get the back button action:

                  if( oapagecontext.isBackNavigationFired(true))
                  {
                  ---Here u can create dialog page and throw the warning message based on ur req.
                  }

                  Regards
                  Meher Irk
                  1 person found this helpful
                  • 6. Re: Form Validation in OAF . Throw warning message .
                    user1140193
                    Hey Guys ,

                    Thanks for you help and support . I found it and i would love to share with you all .

                    Its pretty simple . We just have to set warn about the changes to "TRUE" in the property inspector .
                    By default this value will be set to false . It will automatically perform the above validation .

                    God Bless :)


                    Thanks ,
                    Keerthi.
                    • 7. Re: Form Validation in OAF . Throw warning message .
                      945761
                      I set set warn about the changes to "TRUE" in the property inspector .But still I'm getting error like


                      Logout


                      Error Page
                      Exception Details.
                      oracle.apps.fnd.framework.OAException: No data found for region (FNDDIALOGPAGE).
                           at oracle.apps.fnd.framework.webui.JRAD2AKMapper.getRootMElement(Unknown Source)
                           at oracle.apps.fnd.framework.webui.OAWebBeanFactoryImpl.getWebBeanTypeDataFromJRAD(Unknown Source)
                           at oracle.apps.fnd.framework.webui.OAWebBeanFactoryImpl.getRootApplicationModuleClass(Unknown Source)
                           at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(Unknown Source)
                           at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(Unknown Source)
                           at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(Unknown Source)
                           at OA.jspService(_OA.java:71)
                           at com.orionserver.http.OrionHttpJspPage.service(OrionHttpJspPage.java:59)
                           at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:462)
                           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:713)
                           at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:370)
                           at com.evermind.server.http.ServletRequestDispatcher.unprivileged_forward(ServletRequestDispatcher.java:259)
                           at com.evermind.server.http.ServletRequestDispatcher.access$100(ServletRequestDispatcher.java:51)
                           at com.evermind.server.http.ServletRequestDispatcher$2.oc4jRun(ServletRequestDispatcher.java:193)
                           at oracle.oc4j.security.OC4JSecurity.doPrivileged(OC4JSecurity.java:283)
                           at com.evermind.server.http.ServletRequestDispatcher.forward(ServletRequestDispatcher.java:198)
                           at com.evermind.server.http.EvermindPageContext.forward(EvermindPageContext.java:392)
                           at OA.jspService(_OA.java:80)
                           at com.orionserver.http.OrionHttpJspPage.service(OrionHttpJspPage.java:59)
                           at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:462)
                           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:713)
                           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.HttpRequestHandler.serveOneRequest(HttpRequestHandler.java:221)
                           at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:122)
                           at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:111)
                           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:595)
                      ## Detail 0 ##
                      oracle.adf.mds.exception.MDSRuntimeException: Unable to find component with absolute reference = /oracle/apps/fnd/framework/webui/OADialogPage,
                      XML Path =C:\JDeveloper\jdevhome\jdev\myclasses\JRADXML;C:\JDeveloper\jdevhome\jdev\myprojects;
                      C:\JDeveloper\jdevbin\jdev\oamdsxml\fwk. Please verify that the reference is valid and the
                      definition of the component exists either on the File System or in the MDS Repository.
                      No oracle.cabo.ui.UINode parser registered for top element;check your namespace declaration.
                      Namespace: http://xmlns.oracle.com/adfm/beanmodel
                      Local name: JavaBean)
                           at oracle.adf.mds.internal.MUnResolvedState.resolveState(MUnResolvedState.java:199)
                           at oracle.adf.mds.internal.ElementData.resolveState(ElementData.java:569)
                           at oracle.adf.mds.internal.ElementData.getUntransAttrVal(ElementData.java:987)
                           at oracle.adf.mds.internal.ElementData.getAttrVal(ElementData.java:900)
                           at oracle.adf.mds.internal.ElementData.getAttributeValue(ElementData.java:312)
                           at oracle.adf.mds.internal.Cache.getAttribute(Cache.java:239)
                           at oracle.adf.mds.internal.MetadataManagerBase.getAttributeValueInternal(MetadataManagerBase.java:1107)
                           at oracle.adf.mds.internal.MElementImpl.getAttrValueOrExpression(MElementImpl.java:620)
                           at oracle.adf.mds.internal.MElementImpl.getAttributeValue(MElementImpl.java:230)
                           at oracle.apps.fnd.framework.webui.JRAD2AKMapper.getRootMElement(Unknown Source)
                           at oracle.apps.fnd.framework.webui.OAWebBeanFactoryImpl.getWebBeanTypeDataFromJRAD(Unknown Source)
                           at oracle.apps.fnd.framework.webui.OAWebBeanFactoryImpl.getRootApplicationModuleClass(Unknown Source)
                           at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(Unknown Source)
                           at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(Unknown Source)
                           at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(Unknown Source)
                           at OA.jspService(_OA.java:71)
                           at com.orionserver.http.OrionHttpJspPage.service(OrionHttpJspPage.java:59)
                           at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:462)
                           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:713)
                           at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:370)
                           at com.evermind.server.http.ServletRequestDispatcher.unprivileged_forward(ServletRequestDispatcher.java:259)
                           at com.evermind.server.http.ServletRequestDispatcher.access$100(ServletRequestDispatcher.java:51)
                           at com.evermind.server.http.ServletRequestDispatcher$2.oc4jRun(ServletRequestDispatcher.java:193)
                           at oracle.oc4j.security.OC4JSecurity.doPrivileged(OC4JSecurity.java:283)
                           at com.evermind.server.http.ServletRequestDispatcher.forward(ServletRequestDispatcher.java:198)
                           at com.evermind.server.http.EvermindPageContext.forward(EvermindPageContext.java:392)
                           at OA.jspService(_OA.java:80)
                           at com.orionserver.http.OrionHttpJspPage.service(OrionHttpJspPage.java:59)
                           at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:462)
                           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:713)
                           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.HttpRequestHandler.serveOneRequest(HttpRequestHandler.java:221)
                           at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:122)
                           at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:111)
                           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:595)
                      oracle.adf.mds.exception.MDSRuntimeException: Unable to find component with absolute reference = /oracle/apps/fnd/framework/webui/OADialogPage, XML Path = C:\JDeveloper\jdevhome\jdev\myclasses\JRADXML;C:\JDeveloper\jdevhome\jdev\myprojects;C:\JDeveloper\jdevbin\jdev\oamdsxml\fwk. Please verify that the reference is valid and the definition of the component exists either on the File System or in the MDS Repository.
                      No oracle.cabo.ui.UINode parser registered for top element;check your namespace declaration. Namespace: http://xmlns.oracle.com/adfm/beanmodel
                      Local name: JavaBean)
                           at oracle.adf.mds.internal.MUnResolvedState.resolveState(MUnResolvedState.java:199)
                           at oracle.adf.mds.internal.ElementData.resolveState(ElementData.java:569)
                           at oracle.adf.mds.internal.ElementData.getUntransAttrVal(ElementData.java:987)
                           at oracle.adf.mds.internal.ElementData.getAttrVal(ElementData.java:900)
                           at oracle.adf.mds.internal.ElementData.getAttributeValue(ElementData.java:312)
                           at oracle.adf.mds.internal.Cache.getAttribute(Cache.java:239)
                           at oracle.adf.mds.internal.MetadataManagerBase.getAttributeValueInternal(MetadataManagerBase.java:1107)
                           at oracle.adf.mds.internal.MElementImpl.getAttrValueOrExpression(MElementImpl.java:620)
                           at oracle.adf.mds.internal.MElementImpl.getAttributeValue(MElementImpl.java:230)
                           at oracle.apps.fnd.framework.webui.JRAD2AKMapper.getRootMElement(Unknown Source)
                           at oracle.apps.fnd.framework.webui.OAWebBeanFactoryImpl.getWebBeanTypeDataFromJRAD(Unknown Source)
                           at oracle.apps.fnd.framework.webui.OAWebBeanFactoryImpl.getRootApplicationModuleClass(Unknown Source)
                           at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(Unknown Source)
                           at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(Unknown Source)
                           at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(Unknown Source)
                           at OA.jspService(_OA.java:71)
                           at com.orionserver.http.OrionHttpJspPage.service(OrionHttpJspPage.java:59)
                           at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:462)
                           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:713)
                           at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:370)
                           at com.evermind.server.http.ServletRequestDispatcher.unprivileged_forward(ServletRequestDispatcher.java:259)
                           at com.evermind.server.http.ServletRequestDispatcher.access$100(ServletRequestDispatcher.java:51)
                           at com.evermind.server.http.ServletRequestDispatcher$2.oc4jRun(ServletRequestDispatcher.java:193)
                           at oracle.oc4j.security.OC4JSecurity.doPrivileged(OC4JSecurity.java:283)
                           at com.evermind.server.http.ServletRequestDispatcher.forward(ServletRequestDispatcher.java:198)
                           at com.evermind.server.http.EvermindPageContext.forward(EvermindPageContext.java:392)
                           at OA.jspService(_OA.java:80)
                           at com.orionserver.http.OrionHttpJspPage.service(OrionHttpJspPage.java:59)
                           at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:462)
                           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:713)
                           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.HttpRequestHandler.serveOneRequest(HttpRequestHandler.java:221)
                           at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:122)
                           at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:111)
                           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:595)

                      Logout


                      Copyright (c) 2006, Oracle. All rights reserved.