1 2 Previous Next 27 Replies Latest reply on Aug 29, 2007 1:04 AM by 497886

    Displaying values dynamically in the MessageChoice..

    452203
      Dear All,

      I am facing problem in one of our requirement like below:

      In UIX page there will be "YEAR", "MAKE" and "MODEL" list boxes (Message Choice).There is relation between those 3 means MAKE values are depending on YEAR.MODEL values are depending on YEAR and MAKE.

      So initially while displaying the page we will display the values in the YEAR keeping first value as blank and rest MAKE and MODEL empty.When user chooses value in YEAR we need to display corresponding values in the MAKE and MODEL.

      I hope you understood my requiremt.It's almost similar to selecting the car Make in the list box below we can see corresponding values in the MODEL.

      TIA
        • 1. Re: Displaying values dynamically in the MessageChoice..
          240015
          You need to use the Partial PAge Rendering (PPR). Define fire Events on Year & Make and in the controller handle these events to query the VO for next MessageChoiceBean by binding the values from the previous MessageChoice (i.e. Year for Make, Year & MAke for Model).

          I did something similar to this and don't have the example code handy right now.

          Srini
          • 2. Re: Displaying values dynamically in the MessageChoice..
            TapashRay
            PPR may be one way of doing it, but there is a limitation in that, in case you want to use it in a OATableBean, you would not get the desired results.

            I would suggest you to work with methods called setListVOBoundTableColumn and setListVOBoundContainerColumn in OAMessageChoiceBean.

            These methods are specifically designed for the scenario you define.

            Thanks
            Tapash
            • 3. Re: Displaying values dynamically in the MessageChoice..
              454377
              Hi
              Is it the case that if we require to give Picklist view defination for a massageChoice and if the Picklist VO contains some bind variables,
              then we need to add the VO to our AM and put the Picklist View instance name for the MessageChoice ?

              Thanks
              Husain
              • 5. Re: Displaying values dynamically in the MessageChoice..
                452203
                In the Message Component Layout I am displaying YEAR MAKE and MODEL.

                Tapash / anyone please elaborate bit more.
                • 6. Re: Displaying values dynamically in the MessageChoice..
                  452203
                  Hi Tapash,

                  Still I am facing problem with this.Can you please elaborate how to solve it?

                  Thanks
                  • 7. Re: Displaying values dynamically in the MessageChoice..
                    TapashRay
                    what problem are you facing now ? is it the same one ?

                    Thanks
                    Tapash
                    • 8. Re: Displaying values dynamically in the MessageChoice..
                      452203
                      Yes same problem.I tried in several ways.But i am not getting values in the "Make" depending on the "Year" dynamically.
                      • 9. Re: Displaying values dynamically in the MessageChoice..
                        TapashRay
                        Okay, here is step by step on how you can do this

                        1. Create 2 VOs YearVO and MakeVO, MakeVO should have a where clause criteria dependent on Year, MakeVO should look something like
                        Select car_model_description, car_model_id from cars where year_of_make=:1

                        2. For YearPickListItem, give
                        Picklist View Definition = mycompany.oracle.apps.module.component.picklist.server.YearVO
                        Set the Picklist Display Attribute
                        Set the Picklist Value Attribute
                        3. For MakePickListItem, give
                        Picklist View Instance = MakeVO
                        Add MakeVO to your root AM
                        Set the Picklist Display Attribute
                        Set the Picklist Value Attribute

                        4. FND: Disable Partial Page Rendering profile option must be set to No
                        5. For the YearPickListItem, Set
                        Action Type - set to firePartialAction
                        Event - makechange
                        Submit - set to True
                        6. In processFormRequest(..)
                        String event = pageContext.getParameter("event");
                        String yearOfMake = pageContext.getParameter("YearPickListItem");

                        Serializable[] params = {yearOfMake} ;
                        if ("makechange".equals(event))
                        {
                        am.invokeMethod("reQueryMakeVO",params);
                        }

                        7. In AMImpl.java , create a method like this
                        public static void reQueryMakeVO(String pYearOfMake)

                        getMakeVO().setWhereClauseParam(0,pYearOfMake);
                        getMakeVO().executeQuery();
                        }


                        Let me know if you face issues in this, call me if it is too urgent - +919886701608

                        Thanks
                        Tapash
                        • 10. Re: Displaying values dynamically in the MessageChoice..
                          452203
                          Thanks alot for your detailed info.

                          I did exactly what you mentioned.But I am getting error like this:

                          oracle.apps.fnd.framework.OAException: oracle.jbo.SQLStmtException: JBO-27122: SQL error during statement preparation. Statement: SELECT DISTINCT MAKE,YEAR FROM XXXXX_ICUST_ABC_YMM_LOV1 WHERE YEAR=:1
                               at oracle.apps.fnd.framework.OAException.wrapperException(OAException.java:888)
                               at oracle.apps.fnd.framework.webui.OAPageErrorHandler.prepareException(OAPageErrorHandler.java:1064)
                               at oracle.apps.fnd.framework.webui.OAPageBean.renderDocument(OAPageBean.java:2651)
                               at oracle.apps.fnd.framework.webui.OAPageBean.renderDocument(OAPageBean.java:2459)
                               at OA.jspService(OA.jsp:48)
                               at com.orionserver.http.OrionHttpJspPage.service(OrionHttpJspPage.java:56)
                               at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:317)
                               at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:465)
                               at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:379)
                               at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
                               at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:727)
                               at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:306)
                               at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:767)
                               at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:259)
                               at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:106)
                               at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:803)
                               at java.lang.Thread.run(Thread.java:534)
                          ## Detail 0 ##
                          java.sql.SQLException: ORA-01008: not all variables bound
                          • 11. Re: Displaying values dynamically in the MessageChoice..
                            452203
                            Tapash,

                            I got it.It's working now.
                            Thanks man.Really Really appreciate your prompt reply.
                            • 12. Re: Displaying values dynamically in the MessageChoice..
                              460425
                              Could you please elaborate what was wrong before that caused the SQLException?
                              • 13. Re: Displaying values dynamically in the MessageChoice..
                                457173
                                Hi all
                                I made use of (trying to make use of) setListVOBoundContainerColumn method of
                                OAMessageChoiceBean. The error mesage I get is:
                                ORA-01008: not all variables bound
                                I know the reason but it lacks me the information how to remedy the illness. I have a table of multiple rows to insert data but not to query and one of the columns is a messageChoice which depends on another column (messageLovInput) in the table..
                                After I choose a value from the LOV, i get the column HrCompetenceId populated and is empty while I initialize my base view object for 5 rows. ( To allow user insert 5 or more rows at a time)
                                So I use
                                OAMessageChoiceBean mcb = (OAMessageChoiceBean)oawebbean.findChildRecursive("HrStepVal");
                                mcb.setListVOBoundContainerColumn(0,oatablebean1,"HrCompetenceId");
                                Where HrCompetenceId is the name of the column ( formValue) and
                                oatablebean1 is the container which contains the messageChoiceBean.
                                The exact error message is as follows
                                oracle.apps.fnd.framework.OAException: oracle.jbo.SQLStmtException: JBO-27122: SQL error during statement preparation. Statement: select c.competence_id
                                ,rl.name
                                ,rl.rating_level_id
                                from per_competences_vl c, per_rating_levels_vl rl
                                where (rl.competence_id = c.competence_id
                                or c.rating_scale_id = rl.rating_scale_id)
                                and c.competence_id = nvl(:1,-1)
                                ----
                                Do you have any recommendations about the solution of this problem?
                                Thanks in advance
                                BR
                                Spartakus
                                • 14. Re: Displaying values dynamically in the MessageChoice..
                                  457173
                                  OK.. I have solved the problem.. Perhaps not so nice but as follows
                                  String compId = "-1";
                                  Serializable[] compParam = { compId };
                                  oapagecontext.getApplicationModule(oawebbean).invokeMethod("initStepValuePop",compParam);

                                  I have initialized the query of the poplist with dummy entries before assigning it to HrCompetenceId field...
                                  BR
                                  spartakus
                                  1 2 Previous Next