6 Replies Latest reply: Nov 18, 2012 6:16 PM by Filip Huysmans RSS

    ADF Mobile : ADFUtils equivalent

    Filip Huysmans
      Hello everyone,

      just working on my first ADF Mobile app.
      Wondering whether there is an equivalent for ADFUtils & JSFUtils?
      My current case is to figure out the real ID from a select one choice based on a view object.
      I always get the index back, not the real id. So I need to have access to the view object itself.
      In ADFUtils we had something like findIterator. I'm looking for something similar.

      Thanks in advance.

      Filip
        • 1. Re: ADF Mobile : ADFUtils equivalent
          452071
          Hi Filip,

          Although there are not ADFUtils equivalent for ADF Mobile at the moment. I think that all you need to get the value from your LOV is described here: https://blogs.oracle.com/adf/entry/getting_selected_value_from_selectonechoice

          Juan Camilo
          • 2. Re: ADF Mobile : ADFUtils equivalent
            Joe Huang
            Hi, Filip, just to clarify - while ADF Mobile browser (Trinidad) can leverage ADF BC, ADF Mobile does not have ADF BC support. Are you referring to ADF Mobile browser or ADF Mobile?

            Thanks,

            Joe Huang
            • 3. Re: ADF Mobile : ADFUtils equivalent
              Filip Huysmans
              Hi Juan Camilo,

              thanks a lot for the link, but it is a bit more complicated.
              I've a BC business service exposed as a a webservice.
              In the ADF Mobile application I registered the webservice as a datacontrol.
              From that point on, there is only the index as an id and the label as the label.
              So no more real id's here.

              The only solution I found, was to pass the index to the BC again and let him figure it out.
              While this work for small set of records, it will not work for big ones.

              So I'm looking for a more stable solution here.

              Filip
              • 4. Re: ADF Mobile : ADFUtils equivalent
                Filip Huysmans
                Hi Joe,

                I'm using the technique from Shay Schmeltzer, were we expose the BC layer as a service and use this webservice through the WS datacontrol.
                See my previous answer for more detail.

                Is there a better way of using BC in this case?

                Thank you in advance.

                Filip
                • 5. Re: ADF Mobile : ADFUtils equivalent
                  Joe Huang
                  Hi, Filip, I think you will need to use a programmatic approach to invoke these web services on the client side. Even if you set up LOVs/View Accessors on the server-side ADF BC, these data relationship are not passed to the client via the WSDL. You would need to model these data objects and associated relationship in Java Objects on the client side, and then expose these Java Objects as Bean data controls.

                  The HR Sample app should help - look in the edit.amx page, and see how Dept ID or Manager ID in the Employee data object are handled. Basically, you would create the data structure in data objects, and expose these data as Bean DC. You can then drag/drop the child data objects (like Dept ID in an employeeList DC) to create a selectOneChoice component. ADF Mobile's DT should then correctly create the proper binding for the selectOneChoice control.

                  This may still create some performance issues if you have multiple of these LOVs in one screen - each of the LOVs would require one WS call to server to get the data back. If you have many of these LOVs in one page and the values do not change frequently, you will want to cache the LOVs into a local DB or somehow retrieve the LOV values all at once when app starts up. Otherwise the application will not perform.

                  Building an on-device mobile app has the additional complexity of needing to reduce number of RTs between client and server. For a web application, populating LOVs are all internal to server-side environment, and there are clever server-side caching mechanism to help with the performance. For an ADF Mobile app, any call can require one or more RTs to the server, which can significantly impact overall performance.

                  To ensure flexibility, in general almost all ADF Mobile apsp would require programmatic approach to consume client side services.

                  If you require additional details, please let me know.

                  Thanks,

                  Joe Huang
                  • 6. Re: ADF Mobile : ADFUtils equivalent
                    Filip Huysmans
                    Hi Joe,

                    thanks a lot for the feedback.
                    Let's coding then :-)

                    Filip