5 Replies Latest reply: Jun 14, 2012 5:30 AM by Ronny Eelen RSS

    pageContext.getParameter in processFormRequest in CO does not return value

    Ronny Eelen
      Hi,

      It seems that fields which are not rendered can not be retrieved using pageContext.getParameter.
      I did find a thread where it aid that a field needs to be 'Read Only: False' for this, but my fields are Read Only: False.
      Is there another setting that needs to be set?
      The fields are messageTextInput style.

      I tried with setting them to rendered and then they I do get a value.

      Or do I need to use something else for these fields?

      thanks for your help

      Ronny
        • 1. Re: pageContext.getParameter in processFormRequest in CO does not return value
          JayaManasa
          Hi Ronny,

          Are u trying to hide the fields on the page by making redenred false and still get the value?

          if so please set the item style as formvalue which hides the field as well as retreives value with pageContext.getParameter
          • 2. Re: pageContext.getParameter in processFormRequest in CO does not return value
            Ronny Eelen
            Yes, that is indeed what I am trying to achieve.

            In order to put the field to formValue style, I had to palce it outside my search region which is of style messageComponentLayout.
            So it is now inside the searchHdr region wich is of style 'header'.
            Field style set to formValue, but still the pageContext.getParameter returns null.

            Other options?
            thanks
            Ronny


            extract of code in CO:

            public void processFormRequest(OAPageContext pageContext, OAWebBean webBean)
            {
            super.processFormRequest(pageContext, webBean);

            //
            // Added custom code
            //

            // Check for the Go button
            if (pageContext.getParameter("Go") != null)
            {

            OAQueryUtils.checkSelectiveSearchCriteria(pageContext, webBean);

            String ledgerId             = pageContext.getParameter("SearchLedgerId");
            String ledgerName = pageContext.getParameter("SearchLedgerName");
            String budgetVersionId = pageContext.getParameter("SearchBudgetVersionId");
            String budgetName = pageContext.getParameter("SearchBudgetName");
            String periodName = pageContext.getParameter("SearchPeriodName");
            String acctCompany = pageContext.getParameter("SearchAcctCompany");
            String acctCorporateAccount = pageContext.getParameter("SearchAcctCorporateAccount");
            String acctCostCentre = pageContext.getParameter("SearchAcctCostCentre");
            String acctActivity = pageContext.getParameter("SearchAcctActivity");
            String acctControlling = pageContext.getParameter("SearchAcctControlling");
            String acctProduct = pageContext.getParameter("SearchAcctProduct");
            String acctSource = pageContext.getParameter("SearchAcctSource");
            String acctDestination = pageContext.getParameter("SearchAcctDestination");
            String acctSpare = pageContext.getParameter("SearchAcctSpare");
            String accountLevel = pageContext.getParameter("AccountLevelRG");

            Boolean executeQuery = BooleanUtils.getBoolean(false);

            System.out.println("in FundsAvailableCO, processFormRequest : accountLevel : " + accountLevel);
            System.out.println("in FundsAvailableCO, processFormRequest : ledgerId            : " + ledgerId);
            System.out.println("in FundsAvailableCO, processFormRequest : ledgerName : " + ledgerName);
            System.out.println("in FundsAvailableCO, processFormRequest : budgetVersionId : " + budgetVersionId);
            System.out.println("in FundsAvailableCO, processFormRequest : budgetName : " + budgetName);
            • 3. Re: pageContext.getParameter in processFormRequest in CO does not return value
              Ronny Eelen
              Hi,

              Solution found. Although it is not clear to me all the way.

              As said I moved the fields I didn't want to see to the header region above, out of the region of style messageComponentLayout.
              But the values still weren't available to pageContext.getParameter().

              The solution was to also set them Rendered True again. I just tried that and it seemed to work.
              I did want to hide them, so not show them on the page... and they didn't.
              And that is where I am still confused now. They are rendered True, but they don't appear on the page.
              Is that because they are style formValue or because they are now in a region of style header... I have no idea.
              But... it works.

              regards
              Ronny
              • 4. Re: pageContext.getParameter in processFormRequest in CO does not return value
                JayaManasa
                Hi Ronny,

                FormValue style is to hide the item on the page.Even if its form value we have to set rendered to true so that the values is retained in the field.

                Region style header has nothing to do with the hidden field.

                Thanks