In Oracle Apex, dynamic action can be created to set focus to a particular item, button, etc. on a particular condition.
For example, you want to set focus to a particular item on page load or on list change event if the list item value is equal to something specific. Below is an example:
Dynamic Action Set Focus Example
Suppose you have a select list for Job and you want to set focus to a page item P6_CLERK
if the select list value is CLERK.
To do this, create a dynamic action on the select list and set the following properties:
- Name: daSetFocus
- Event: Change
- Selection Type: Item(s)
- Item(s): P6_LIST
Client-Side condition
- Type: Item = Value
- Item: P6_LIST
- Value: CLERK
True Action
- Action: Set Focus
- Selection Type: Item(s)
- Item(s): P6_CLERK
- Fire on Initialization: Set On if you want to execute this action on page initialization.
Now save changes and run the page to test.
Leave a comment