In RichDocument level there is a property called ‘initialFocusId’ by using this we can set the focus to the field. The Field which one is going to be used in the initialFocusId that must be ‘clientComponent = true’. The initialFocusId will be ignored when accessibility-mode is set to "screenReader".
Before giving the Initial Focus Id, Please refer the below points
- Identifiers are relative to the component, and must account for Naming Containers.
- Use a single colon(:) to start the search from the root.
- Use a multiple colons to move up through the Naming Containers( :: for One Level Up, ::: for two Level Up and etc.,).
Initial Focus in UnBounded Task-flow:
For giving the initial focus Id to the unbounded task-flow is easy by refers the Naming Containers and it doesn’t include any hidden ids for the fields/components. Here used EL Expression for set the Initial focus id.
Initial Focus in Bounded Task-flow:
For giving the initial focus Id to the bounded task-flow is difficult compare to the unbounded task-flow. Bounded task-flow has a combination of Task-flow and Fragments and it is included in the Page by using the Region or Dynamic Region. Because of Region inclusion, it will generate some sequence no along with region id for referring the Fields (For Example pt1:r1:0:it1). Here used EL Expression for set the Initial focus id along with Managed Bean. Managed Bean contains the logic of find the Client component id of the particular component.
For more details check with sample.
[Runs with Oracle JDeveloper 11g R2]
How to run this sample?
Run using the UnBoundedTaskFlowFocus.jspx and check the behavior of unbounded task-flow & BoundedTaskFlowFocus.jspx and check the behavior of bounded task-flow.