First page Back Continue Last page Text

oracle adf workshop


Using Task Flow Parameters

Building well-defined, parameterized task flows that can be used as regions on pages is a good way to provide reusable and highly maintainable segments of functionality across your application.

Parameters and page events are how different regions and portlets on a single page can communicate with each other and pass context to each other without being hard-wired together, or even knowing if the other one is present on the page. For example, a region that shows a graph of types of goods sold for a particular country could take a parameter into the region that specifies the country. That same region could also take in a parameter that specifies whether or not it should display the results as a graph or as a pie chart. Having these parameters to the region enables that same region to be reused in a variety of different situations.

You define task flow parameters in the task flow’s .xml file. You can define a task flow parameter declaratively, as shown in the slide. The slide shows an example of an input parameter with name pname, value #{pageFlowScope.pname}. The parameter works as follows:

1. When the parameter pname is passed into the task flow, its value is assigned to the page- flow-scoped variable pname.

2. Inside the task flow, activities and pages can get the value of the parameter using the EL