2 Replies Latest reply on Mar 30, 2013 9:22 AM by Chris Muir-Oracle

    ADF Mobile: design suggestion needed for master detail

    Vik Kumar-Oracle
      i created a ADFbc based webservice which returns a List<jbo.server.Row> . In the service implementation the VO rows being returned is having a child VO connected using VL.

      So, the ADF mobile UI is a search page which on entering returns this list which i am showing a ListView component with master details as each list view item.

      On clicking each of these list items views I want to go the next view (in the Task flow) and show the child details.

      So, how this second view should be implemented? Please advise.

      In a regular ADF web app I would have simply dropped the child VO instance from data control on the second page and would have set the current row on the click in the first view for the master VO. Not sure in this case. Plz advise

      Edited by: Vik2 on Mar 29, 2013 9:46 AM
        • 1. Re: ADF Mobile: design suggestion needed for master detail
          You can develop a custom method in adfbc to be consumed in mobile adf as a data contol to display your data in a master-child relationship.

          this is one of the possible ways.


          The above link will help how to use custom methods in adf mobile.
          • 2. Re: ADF Mobile: design suggestion needed for master detail
            Chris Muir-Oracle
            Here's how I'd build it currently, but please realize it's probably one solution of many. My solution here's also suggests you're not caching the results, it relies purely on WS data control to read the data on request.

            Let's assume you're using the Departments -> Employees master detail relationship from the Oracle HR sample databas schema.

            In your external ADF BC project:

            a) Expose the master VO Departments as a top level VO with no detail VO through the AM
            b) Also expose the detail VO Employees as a top level VO through the AM

            In other words in the AM where you would have previously setup a hierarchy relationship between the two VO instances, Departments and Employees don't do that. Instead expose both VOs as top level VOs.

            c) Amend the VO from "b", the Employees VO, such that it has a view criteria that accepts the FK values of "a", this would be DepartmentId in our example.
            d) Expose both VOs as services through the AM. Specifically for "b" ensure to expose the view criteria of "c" as one of the available web service operations

            Now in your VC project of your ADF Mobile app:

            e) On page 1 call the Departments VO. When the user selects a record for the Departments VO, write the #{row.DepartmentId} to #{pageFlowScope.DeptId} using a setPropertyListener
            f) On page 2 call the Employees VO and specifically the view criteria method. When doing so, ensure to pass in #{pageFlowScope.DeptId} into the view criteria DepartmentId VC parameter