First page Back Continue Last page Text

oracle adf workshop


Deciding Which Type of Parameter to Use

As you have seen in this lesson, the use of one type of parameter does not preclude the use of another, because they all have different functions. Defining parameters is all about providing reusability. Defining parameters on a task flow improves reusability of that task flow. Defining parameters on a page or page fragment improves its reusability. Parameters also make an object much more encapsulated (self-contained).

For example, if you have a bounded task flow that updates customers, you could have it take in as a parameter the CustomerId. The task flow can then make sure that the correct customer is queried up to edit—and there is no reliance on the consumer of that bounded task flow setting the current row in a view object in some application module that this bounded task flow uses. This ensures that the interface between consumer and producer is much better documented and separated from the internal implementation.

If you want to make the page a more reusable component, you may provide a parameter on the page for exactly the same reasons.