Custom Controls (Obsolete)
Mostly Not Needed Anymore
Earlier versions of abap2UI5 required custom UI5 controls to cover common browser interactions — setting the page title, moving focus, scrolling, copying to the clipboard, opening new tabs, and so on. These are now built into the framework as frontend events, callable from ABAP via client->action->gen( client->cs_event-... ). The custom controls that used to wrap these behaviors are obsolete.
Replaced Custom Controls
The table below lists custom controls that are no longer necessary and the built-in action that replaces each one.
| Old Custom Control Purpose | New Built-in Action | Documentation |
|---|---|---|
| Set the browser tab title | cs_event-set_title | Title |
| Set the launchpad title | cs_event-set_title_launchpad | Title |
| Move input focus | cs_event-set_focus | Focus |
| Scroll to a position | cs_event-scroll_to | Scrolling |
| Scroll an element into view | cs_event-scroll_into_view | Scrolling |
| Start a timer | cs_event-start_timer | Timer |
| Toggle the soft keyboard | cs_event-keyboard_set_mode | Soft Keyboard |
| Read frontend info | client->get( )-s_device, -s_ui5, -s_focus, -s_scroll | Info |
Typical Pattern
Instead of writing a custom control, call the matching action after an event:
abap
client->action->gen( val = client->cs_event-set_title
t_arg = VALUE #( ( `Invoice 4711` ) ) ).See the linked cookbook pages above for the full argument list of each action.
