1 2 Previous Next 23 Replies Latest reply on Mar 31, 2008 11:02 AM by 583651 Go to original post
      • 15. Re: Problem in Advaced Table Sorting
        557833
        Check the VALUE_PARAM value when EVENT_PARAM is SORT_EVENT.

        --Shiv                                                                                                                                                                                           
        • 16. Re: Problem in Advaced Table Sorting
          583651
          Hi shiv

          I have used the following code
          if("sort".equals(pageContext.getParameter(EVENT_PARAM)))
          {
          HashMap param=new HashMap(1);
          param.put("SortEvent","yes");
          pageContext.setForwardURL("OA.jsp?page=/oracle/apps/xxdl/cms/employee/webui/ManagePeoplePG",
          null,
          OAWebBeanConstants.KEEP_MENU_CONTEXT,
          null,
          param,
          true, // Retain AM
          OAWebBeanConstants.ADD_BREAD_CRUMB_YES,
          OAWebBeanConstants.IGNORE_MESSAGES);
          }
          i am able to catch the sort event and forwarding to the same page and in processRequest i am executing the vo with setorderbyclause, even then its taking the vo query..


          Thanks
          Babu
          • 17. Re: Problem in Advaced Table Sorting
            557833
            Babu,

            Use method public void queryData(OAPageContext pageContext,
            boolean checkForExecuted)

            passing true for checkForExecuted where checkForExecuted determines whether the OA Framework should internally check whether the associated view instance is already executed or not before executing the query. Passing in true ensures the check; and false bypasses the check.

            --Shiv                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       
            • 18. Re: Problem in Advaced Table Sorting
              557833
              Use queryData method instead of directly calling executeQuery() on the view instance.

              --Shiv                                                                                                                                                                                               
              • 19. Re: Problem in Advaced Table Sorting
                583651
                Hi shiv

                Can u explain where exactly i need to use queryData Method, is that i need to call this method inside sort event method?

                Thanks
                Babu
                • 20. Re: Problem in Advaced Table Sorting
                  583651
                  i am able to sort table with transient attributes, but the warning message
                  Warning - The table cannot be sorted because it has pending changes which would be lost.
                  is displaying after sorting.(i am redirecting to the same page on sort event)
                  is there any way to remove that message,


                  Thanks
                  Babu
                  • 21. Re: Problem in Advaced Table Sorting
                    553097
                    Hi,
                    There is a work around but don't know how good its for u.
                    Handle the sorting event in the controller and commit the trnsaction inside it.
                    Thanks
                    • 22. Re: Problem in Advaced Table Sorting
                      557833
                      Check the Advanced tables section in Dev guide. They have discussed this scenario.

                      --Shiv                                                                                                                                                                                       
                      • 23. Re: Problem in Advaced Table Sorting
                        583651
                        Shiv,
                        I tried whatever steps given in Dev guide. But still i am getting same message.

                        Can you tell me how to do the below logic?
                        Encapsulate the logic to populate transient columns (view attributes) in a method.

                        Below is the code i am using to handle sort event..

                        //ProcessFormRequest method

                        if("sort".equals(pageContext.getParameter(EVENT_PARAM)))
                        {     

                        String orderByClause = "";
                        if(pageContext.getParameter(VALUE_PARAM).equals("0"))
                        orderByClause = "po_number";
                        else if(pageContext.getParameter(VALUE_PARAM).equals("2"))
                        orderByClause = "po_type";
                        else if(pageContext.getParameter(VALUE_PARAM).equals("3"))
                        orderByClause = "exp_type";
                        else if(pageContext.getParameter(VALUE_PARAM).equals("4"))
                        orderByClause = "commit_date";
                        else if(pageContext.getParameter(VALUE_PARAM).equals("5"))
                        orderByClause = "commit_desc";
                        else if(pageContext.getParameter(VALUE_PARAM).equals("6"))
                        orderByClause = "supplier_name";
                        else if(pageContext.getParameter(VALUE_PARAM).equals("7"))
                        orderByClause = "po_outstanding";
                        else if(pageContext.getParameter(VALUE_PARAM).equals("8"))
                        orderByClause = "paid_to_date";
                        else if(pageContext.getParameter(VALUE_PARAM).equals("9"))
                        orderByClause = "total_amount";
                        else if(pageContext.getParameter(VALUE_PARAM).equals("10"))
                        orderByClause = "total_amount";
                        else if(pageContext.getParameter(VALUE_PARAM).equals("11"))
                        orderByClause = "paid_to_date";
                        else if(pageContext.getParameter(VALUE_PARAM).equals("12"))
                        orderByClause = "po_outstanding";

                        pageContext.putSessionValue("orderByClause",orderByClause);
                        //Serializable[] sortParam = {orderByClause};
                        //am.invokeMethod("getSortableData",null);


                        HashMap param=new HashMap(1);
                        param.put("search","yes");

                        pageContext.setForwardURL("OA.jsp?page=/oracle/apps/xxdl/cms/po/webui/ManageGoodsServicesPG",
                        null,
                        OAWebBeanConstants.KEEP_MENU_CONTEXT,
                        null,
                        param,
                        true, // Retain AM
                        OAWebBeanConstants.ADD_BREAD_CRUMB_YES,
                        OAWebBeanConstants.IGNORE_MESSAGES);
                        }


                        Can you please tell me how to solve this issue?


                        Regards,
                        Babu
                        1 2 Previous Next