3 Replies Latest reply: Feb 11, 2013 3:56 AM by Marcin RSS

    How to make custom data validation on standard form.

      I have some little OAF experience. I have extended VO so far but I am still newbie.

      I need to make custom data validation on standard form.

      I Oracle Credit Management module on "Create Credit Application: Applicant" form I need
      to validate chosen currency against customer setup (whether there is customer profile amount for the currency).

      The page is /oracle/apps/ar/creditmgt/application/webui/ARCMCREDITAPPPAGE

      There are controllers on the page:
      oracle.apps.ar.creditmgt.application.webui.creditAppContentFooterCO 115.14.15104.2
      oracle.apps.ar.creditmgt.application.webui.creditApplicationPageCO 115.6
      oracle.apps.ar.creditmgt.application.webui.creditAppRegion2CO 115.13.15104.2
      oracle.apps.ar.creditmgt.application.webui.creditApplicationCO 115.8.15104.3
      oracle.apps.ar.creditmgt.application.webui.creditAppRegion1CO 115.28.15104.4
      oracle.apps.ar.creditmgt.application.webui.creditAppBusBackCO 115.6
      oracle.apps.ar.creditmgt.application.webui.OCMApplicantInfoRNCO 115.4

      creditApplicationPageCO is pageLayout controller.

      Please direct me how to achieve it.

      Which controller should I extend (if any)?
      How to get values from the page (customer site id, currency) and how to run custom sql in my CO class ?

        • 1. Re: How to make custom data validation on standard form.

          I extend creditApplicationCO.

          I need to catch an event when user enter or choose a currency from LOV and when user press "Submit" button.

          How to find out and catch the event?

          if (oapagecontext.getParameter("Go") != null)

          Kind regards,
          • 2. Re: How to make custom data validation on standard form.
            Kalimuthu V-Oracle
            Hi Marcin,
            You have to find your GO button is handled in which standard controller, (if you click on the about this page, you should be able to identify the controller,
            or you can download all the controller .class files and decompile and check the logic).
            Then extend that controller(which has the Go button logic, you can see how it has been handled.),
            The usual way to check is
            if(pageContext.getParameter('<Go button name>') !=null)

            Since you want to validate first your custom validation, in the extended controller ProcessFormRequest
            dont call the super.processFormRequest unless your validation is success.

            Call the super at the end.

            Inside your extended controller you have to find your AM and then your required ViewObject to get the user entered values.


            With regards,
            • 3. Re: How to make custom data validation on standard form.
              Hi Kali,

              I decompiled controller *.class and find out how Submit button even is handled.
              It base on FORMSUBMIT_BUTTON parameter.

              Thank you for your hints.