You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/advanced/experimental/smart_control.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,7 +1,7 @@
1
1
---
2
2
outline: [2, 4]
3
3
---
4
-
# Smart Controls
4
+
# Smart Control
5
5
6
6
Smart Controls are metadata-driven UI5 controls that build the UI automatically from OData annotations. abap2UI5 supports them on an experimental basis.
Copy file name to clipboardExpand all lines: docs/advanced/extensibility/custom_js.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,7 +3,7 @@ outline: [2, 4]
3
3
---
4
4
# Custom JS
5
5
6
-
If the standard UI5 framework doesn't cover all your needs, define and call your own JavaScript functions. [Barcode Scanning](/development/specific/barcodes), for example, uses this approach to play a sound after a scan.
6
+
If the standard UI5 framework doesn't cover all your needs, define and call your own JavaScript functions. [Barcode Scanning](/cookbook/device_capabilities/barcode_scanning), for example, uses this approach to play a sound after a scan.
7
7
8
8
The idea: send the JavaScript function with the view to the frontend, then call it later when an event fires.
Copy file name to clipboardExpand all lines: docs/cookbook/browser_interaction/clipboard.md
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -31,9 +31,9 @@ CLASS z2ui5_cl_sample_clipboard IMPLEMENTATION.
31
31
)->stringify( ) ).
32
32
33
33
WHEN client->check_on_event( `COPY` ).
34
-
client->follow_up_action( client->_event_client(
34
+
client->action(
35
35
val = client->cs_event-clipboard_copy
36
-
t_arg = VALUE #( ( mv_text ) ) ) ).
36
+
t_arg = VALUE #( ( mv_text ) ) ).
37
37
client->message_toast_display( `copied` ).
38
38
39
39
ENDCASE.
@@ -44,7 +44,7 @@ ENDCLASS.
44
44
45
45
#### Copy the App State URL
46
46
47
-
To share the current app state instead of a custom string, use `clipboard_app_state` — see [App State, Share, Bookmark](../navigation/app_state.md).
47
+
To share the current app state instead of a custom string, use `clipboard_app_state` — see [App State, Share, Bookmark](../expert_more/app_state_share.md).
48
48
49
49
::: warning
50
50
The browser's Clipboard API requires HTTPS (or `localhost`). On plain HTTP the call is silently ignored.
Set the input focus from the backend with the `set_focus` frontend event. Pass the target control's `id` as the first argument — the framework moves the cursor to that field after the next roundtrip.
7
+
8
+
This is useful for guided data entry, barcode scanning, or any flow where the next field to focus depends on backend logic.
9
+
10
+
#### Basic Usage
11
+
12
+
After processing an event, call `client->action( )` with `cs_event-set_focus` and the id of the input to focus next:
After the user presses Enter in `id1`, the backend fires `set_focus` for `id2` and the cursor moves to the second input. The same pattern works for any chain of fields.
61
+
62
+
#### Selection Range
63
+
64
+
To position the caret inside the field or pre-select a range, pass the start and end offsets as additional arguments:
65
+
66
+
```abap
67
+
client->action( val = client->cs_event-set_focus
68
+
t_arg = VALUE #( ( `id1` ) ( `0` ) ( `5` ) ) ).
69
+
```
70
+
71
+
#### Barcode Scanning
72
+
73
+
Most barcode scanner devices emulate a keyboard. Combine `set_focus` with input fields to capture scans into the right field automatically — see [Barcode Scanning](../device_capabilities/barcode_scanning.md) for a full walkthrough.
0 commit comments