Forum Stats

  • 3,836,885 Users
  • 2,262,201 Discussions
  • 7,900,133 Comments

Discussions

Webservice Call and get value to display in table

Varun Dhondea
Varun Dhondea Member Posts: 163 Blue Ribbon
edited Mar 27, 2018 4:03AM in JDeveloper and ADF

     Hi,

I have a requirement to display data from a webservice in the table below

pastedImage_0.png

The column ESS Status is retrieved from the job id ErpIntegrationService.GetESSJobStatus. I have created a transcient attribute in the table for the column Job Status.

Is it possible to call a WS directly from the table?

Jdev 12.2.1.1.0

Regards

Answers

  • PedroGabriel
    PedroGabriel Member Posts: 244 Bronze Badge
    edited Mar 26, 2018 12:28PM

    Hi Varun,

    What you want to do can be accomplish on the front-end layer (ViewController) or back-end layer (ADF-BC). Here are the way to do it and the pros and cons of each approach.

    • Front-End Layer (ViewController)

    To accomplish your requirement on this layer you can:

    1. Bind your table data to a getter and setter method on your Task Flow Managed Bean.
      • You need to override "value" attribute of table's component.
      • You manage the all set of data that is currently rendered on your table (A new set of data is collect when a scroll is done or we request a new page)
      • This happens before page rendering
    2. Bind you column to a getter and setter method on your Task Flow Managed Bean.
      • During page rendering you need to have the cell binding reference on your Managed Bean and set the value.
      • You are intercepting each cell for each row.

    In both approaches all data logic is on your front-end page and if you need this logic in another page you need to redo it or make it generic.

    • Back-End Layer (ADF-BC)

    To accomplish your requirement on this layer you can edit your VO using java code, invoke the WS and the transient value for each row.

    Usin this approach you have all the logic in a centralized place and is "generic" since you can use it without to much work in the future.

    Best Regards,

    Pedro Gabriel

  • Varun Dhondea
    Varun Dhondea Member Posts: 163 Blue Ribbon
    edited Mar 26, 2018 2:20PM

    Hi Pedro,

    You mean to code the Webservice in the VORowImpl.java class?

    Regards

  • PedroGabriel
    PedroGabriel Member Posts: 244 Bronze Badge
    edited Mar 27, 2018 4:03AM

    Hi Varun,

    You need to manage it on VOImpl otherwise you would have to call your WS multiple times.

    On the VOImpl you have access to the all set of data and you can set the transient value for each returned row.

    This example is for a full programatic VO, but you can take have a look on how it works.

    http://adfpractice-fedor.blogspot.lu/2011/01/adf-bc-programmatically-populated-vo.html

    Best Regards,

    Pedro Gabriel

This discussion has been closed.