Professional Documents
Culture Documents
Agenda Reusability requirements - generic Addressing generic reusability requirements Reusability requirements taskflow specific Task flow reuse cases
Reusability Requirements - Generic Use with traditional menu structure Use with dynamic tabs Use with human workflow task list Use as WebCenter portlet Add at runtime using WebCenter Composer
Using Dynamic ADF Regions Additional complexity You can no longer use standard JSF navigation
No pages to go to, only regions
Addressing the complexity Use DynamicRegionManager to provide current task flow and params Task flow details provided by TaskflowConfigBean Subclass NavigationHandlerImpl to allow your developers to use JSF-like navigation to regions Subclass XMLMenuModel to add support for regions Use parameter map for dynamic region binding Keep track of changed parameters
Refresh=ifNeeded does not work with param map
UI Shell at Runtime
UIShell.jsf Dynamic Region
<af:region value=#{bindings.mainRegion.regionModel />
UIShellPageDef
<taskFlow id="mainRegion taskFlowId="${pageFlowScope.dynamicRegionManager.currentTaskFlowId}" parametersMap="${pageFlowScope.dynamicRegionManager.currentParamMap}" RefreshCondition="{pageFlowScope.dynamicRegionManager.currentParamMapChanged} />
DynamicRegionManager
get/setCurrentTaskFlowName getCurrentTaskflowId getCurrentParamMap
TaskFlowConfigBean
name taskflowId paramMap
10
TaskFlowConfigBean - Jobs
11
12
13
Reusability Requirements Taskflow Specific Configure to show in read-only mode Configure to show one specific row (deeplinking) Configure to go to summary or detail page Configure to start in create mode (new row) Configure to hide UI components buttons (Save, Cancel, Nav. Buttons, Search region) Configure to use both as parent or as child within another region Configure to use in popup / details lookup
14
15
Reuse Case 1 Adding Menu Entry to View Jobs Enable jobs task flow to run in read-only mode
Add readOnly parameter to the jobs task flow Set job fields readOnly based on readOnly param hide save button based on readOnly param Set title to View Job in readOnly mode
16
17
18
Reuse Case 2 Add Deeplinking to Edit Job Prepare Jobs task flow: Add rowKeyValue parameter Create method activity SetCurrentRow
DnD SetCurrentRowWithKeyValue method, or DnD custom queryByKeyValue AM method Navigate to EditJob page
19
20
21
Reuse Case 2 Add Deeplinking to Edit Job Prepare Employees task flow: Add task flow call activity CallJob to Employees TF Create Page Definition for CallJob Set rowKeyValue param to current JobId:
Reuse EditEmployee Page Def for CallJob activity How: Change usage in PageMap in Databindings.cpx, delete newly created page def
Add control flow rule from EditEmployee to CallJob Add editJob command link to EditEmployee page
22
23
24
Reuse Case 3 View Job Details in Popup Two implementation strategies: Jobs TF Call with Run as Dialog option
This option cannot be used with page fragments! Need PopupShell TF with PopupShell page that embeds Jobs region Too complex ....
Add popup component, and drag and drop Jobs TF as region inside popup
25
Reuse Case 3 View Job Details in Popup (Add readOnly param to Jobs TF) Add Popup with Dialog to EditEmployee
Set childCreation=deferred to prevent premature region loading Set contentDelivery=lazyUncached
Set rowKeyValue param to current JobId Add ViewJob command link to invoke Popup
Or use contextFacet on JobId
27
28
Reuse Case 4 Employees TF as Child in Department Page Restrict query employees based on department
Set up view criteria with departmentId bind var, or Use dynamic iterator to bind to EmployeesView3
29
30
31
32
Reuse Case 5 Deeplinking from External Source DynamicRegionManager checks request params
PostConstruct method looking for taskFlowName param Set current taskflow Map other request params to TF params ../faces/UIShell?taskFlowName=Jobs&rowKeyValue=AC_MGR
33
Transaction Scope
With isolated data control scope each TF has own transaction With shared data control scope, transaction is shared by default, but can be changed using Transaction setting
34
Data Control Scope and Transactions Data Control Scope and Transaction are defined at task flow definition level
Limits reuse options! Isolated transactions needed for dynamic tabs Shared transaction needed for child region
Enhancement request: set DC scope and transaction on TF Call activity and TF binding Work around:
Create complete TF as template (templates can be nested) Create one TF with isolated transaction based on this template Create one TF with shared transaction based on this template
35
36
Summary Use bounded task flows with page fragments Set up infrastructure to use ADF regions in UIShell Think about possible reuse cases
Define required input parameters Add router activity for reuse-case-based conditional flows Configure use of dynamic iterator binding Configure conditional display of UI components
Think carefully about data control scope and transaction settings Use the ADF EMG Task Flow Tester
37
Useful Resources Blog post: UIShell with Menu Driving a Dynamic Region
Contains links to presentation and sample application blogs.oracle.com/jheadstart/entry/core_adf11_uishell_with_menu
38
39