Showing posts with the label POJO

Programmatic DVT charts in Oracle ADF

Source: GitHub

This article talks about programmatic approach of creating dvt components or charts, using Java objects, and more importantly, without ADF bindings. This is quite helpful when you deal with data which does not change often and can be pre-loaded into Java objects. The biggest advantage of this is of course, performance, since you do away with any database interaction.

The sample code has a table based on Department pojo. Each department object has a List of Employee pojo. On table row selection, I retrieve the list of employees, and I use this list to create the Object array required for each chart type.

There are a couple of key points to this approach:
1) Your Java data model should be prepared to provide all the required information to the chart.
2) You need to know the "Tabular Data" format for each graph.

My data-model consists of a Department object, having a list of Employee objects.

Each graph's tabular data format is an array of O…

Pass custom objects across ADF taskflows (by value or reference)

JDev: Source: GitHub
We usually pass along parameters of native data types across ADF task-flow calls. We set up input and output parameters for the source and target task-flows, and we access the variables from the pageFlowScope map.
Absolutely nothing wrong with this approach.
But how about a scenario where we process and populate a POJO variable from the source task-flow, and expect a POJO variable on the target task-flow to be populated via a declarative route?
The Parameters section of a bounded task-flow allows you to set a specific property on its managed bean to which the object being passed across will be assigned.
While passing along an object across task-flows, ADF lets you choose whether you want to pass the object by value or by reference. Let us examine the difference between the two approaches.

This is what we want to achieve: Initialize an Employee variable (employeeInTarget) in the source task-flow and pass this variable as input to a target task-flow. Thi…

Complex datatypes for ADF AM/VO client service methods

JDev: Source: GitHub
One very recent work-related requirement was to pass and return complex data types from an Application Module Implementation class method.