Commit ec1efe0
Refactor demo apps: improve naming, add new examples, fix bugs (#680)
* demo_app_160: cell-level events over a ui.Table with rich output model
Rebuild the "Events on Cell Level" sample: a wider ty_s_output row type,
a 10-row model, and a sap.ui.Table whose PL_TOTAL Input submits the
cell/row identifiers (source id, event.oSource.sId, row index,
oParent.sId, parameters.value) to PL_TOTAL_CHANGE, shown via
message_box_display.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01YAnf42GPU5rnh9A7pRpYQe
* fix
* demo_app_445: sample for the device> model (views + popups)
New "framework - use cases" sample showing how to apply the device>
model (a one-way JSONModel over sap.ui.Device):
- a panel binding the raw device state field by field (system type,
orientation, live window size, touch, browser, OS)
- an expression binding that switches a MessageStrip by device type
- an IconTabBar collapsed on phones via expanded="{= !${device>/system/phone} }"
- a dialog that binds the same state (and its own width) - proving the
device> model now reaches popups, not just the main view
The device_form( ) helper builds the label/value rows once and is reused
for both the main view and the popup. Overview (sample_app_001)
regenerated.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01YAnf42GPU5rnh9A7pRpYQe
* demo_app_445: open the IconTabBar items aggregation
IconTabBar has no default aggregation, so IconTabFilter children must go
into <items>. Add ->items( ) after icon_tab_bar( ), matching app_117;
without it UI5 raises "Cannot add direct child without default
aggregation defined for control sap.m.IconTabBar".
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01YAnf42GPU5rnh9A7pRpYQe
* demo_app_052: fixed popover width to stop the open-time resize jump
contentWidth="50%" is a percentage, so the popover first renders at the
content's natural width, positions, then resolves 50% and repositions -
a visible size jump, compounded by SimpleForm's post-render relayout. Use
a fixed 20rem so the popover computes its geometry once.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01YAnf42GPU5rnh9A7pRpYQe
* demo_app_052: display-only ColumnLayout form to remove residual wobble
The popover form only shows text, so render it read-only
(editable = abap_false) with ColumnLayout instead of the default
ResponsiveGridLayout - ColumnLayout does not re-measure and re-lay-out on
render, removing the second reflow that could still nudge the popover.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01YAnf42GPU5rnh9A7pRpYQe
* demo_app_120: read-only inputs and backend geolocation error handling
- Render the geo fields read-only (editable = abap_false) - they only
display the values the Geolocation control writes.
- Bind the control's new `error` event to a GEOLOCATION_ERROR roundtrip,
passing code + message via ${$parameters>/...}, and show the reason
from the backend with message_box_display.
- Collapse the duplicated init/MAP_CONTAINER_DISPLAY views into one
view_display( ) method.
Note: the geolocation `error` parameter needs the matching abap2UI5
framework change; abaplint flags it until that is deployed to main.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01YAnf42GPU5rnh9A7pRpYQe
* fixes
* fixes
* demo_app_065: add a button that isolates nest_view_model_update
New "Update only nested MODEL" button changes a nest-bound field
(mv_input_nest) and calls nest_view_model_update( ) - refreshing only the
nested view's model copy without re-rendering its XML, so the effect of
the method is visible on its own. A counter makes the value change on each
press.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01YAnf42GPU5rnh9A7pRpYQe
* demo_app_009: make the value-help demo friendlier to test
- Enable the "Clear" and "Send to Server" buttons - both were
enabled=abap_false, so their handlers could never be triggered.
- Add an intro MessageStrip explaining the four value-help patterns.
- Give "Send" a paper-plane icon to match "Clear".
- The two popup "continue" handlers now toast "please select exactly one
..." instead of silently doing nothing when the selection is not a
single row.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01YAnf42GPU5rnh9A7pRpYQe
* demo_app_120: remove the dead MapContainer "Display" button
The MAP_CONTAINER_DISPLAY handler is gone, so the button only fired an
empty roundtrip. Drop the button and its label; the form ends at Speed.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01YAnf42GPU5rnh9A7pRpYQe
* demo_app_074: adopt the show-content upload variant and clean it up
Take the simpler uploader flow (decode the file and show its text in a
message box). Cleanups: drop the identical-branch COND (both sides were
_bind_edit) and the two unused check flags; remove Hungarian prefixes per
the style guide; put main first and merge the init/navigated branches;
clear the bound fields before re-rendering; merge the duplicated column /
cell loops into one.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01YAnf42GPU5rnh9A7pRpYQe
* sample_context: don't dump on an empty search value
itab_filter_by_val ran find( sub = lv_search ) with an empty search
string, which raises CX_SY_STRG_PAR_VAL ("value '' not permitted for
parameter SUB of FIND") - hit in demo_app_059 when the search field is
cleared to empty. An empty search matches everything, so return early and
leave the table unfiltered.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01YAnf42GPU5rnh9A7pRpYQe
* fix template
* demo_app_446/447: samples for control_call and control_call_by_id
Two "framework - action" samples:
- 446 "Action - control_call": buttons that let the backend call global
frontend objects (MessageToast.show, MessageBox.show, Theming.setTheme).
- 447 "Action - control_call_by_id": focus() an input and scrollToIndex()
a 30-row table, both by control id.
Overview regenerated.
Note: both use the new client->control_call / control_call_by_id methods;
samples abaplint flags them as "method not found" until the abap2UI5
framework change is deployed to main.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01YAnf42GPU5rnh9A7pRpYQe
---------
Co-authored-by: Claude <noreply@anthropic.com>1 parent c21b8fe commit ec1efe0
25 files changed
Lines changed: 719 additions & 310 deletions
File tree
- src
- 00/06
- 01
- 01
- 02
- 05
- 06
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
104 | 104 | | |
105 | 105 | | |
106 | 106 | | |
107 | | - | |
108 | | - | |
109 | | - | |
| 107 | + | |
| 108 | + | |
110 | 109 | | |
111 | 110 | | |
112 | 111 | | |
| |||
154 | 153 | | |
155 | 154 | | |
156 | 155 | | |
157 | | - | |
158 | | - | |
159 | | - | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
160 | 159 | | |
161 | 160 | | |
162 | 161 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
132 | 132 | | |
133 | 133 | | |
134 | 134 | | |
| 135 | + | |
| 136 | + | |
135 | 137 | | |
136 | 138 | | |
137 | 139 | | |
| |||
142 | 144 | | |
143 | 145 | | |
144 | 146 | | |
| 147 | + | |
| 148 | + | |
145 | 149 | | |
146 | 150 | | |
147 | 151 | | |
| |||
164 | 168 | | |
165 | 169 | | |
166 | 170 | | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
167 | 178 | | |
168 | 179 | | |
169 | 180 | | |
| |||
210 | 221 | | |
211 | 222 | | |
212 | 223 | | |
213 | | - | |
214 | | - | |
215 | | - | |
216 | | - | |
217 | | - | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
218 | 228 | | |
219 | | - | |
220 | | - | |
221 | | - | |
222 | | - | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
223 | 233 | | |
224 | 234 | | |
225 | 235 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
38 | 38 | | |
39 | 39 | | |
40 | 40 | | |
41 | | - | |
42 | | - | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
43 | 44 | | |
44 | 45 | | |
45 | 46 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| 8 | + | |
8 | 9 | | |
9 | 10 | | |
10 | 11 | | |
| |||
34 | 35 | | |
35 | 36 | | |
36 | 37 | | |
| 38 | + | |
| 39 | + | |
37 | 40 | | |
38 | 41 | | |
39 | 42 | | |
40 | 43 | | |
41 | 44 | | |
42 | 45 | | |
43 | | - | |
44 | | - | |
45 | 46 | | |
46 | 47 | | |
47 | 48 | | |
| |||
67 | 68 | | |
68 | 69 | | |
69 | 70 | | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
70 | 80 | | |
71 | 81 | | |
72 | 82 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| 8 | + | |
8 | 9 | | |
9 | 10 | | |
10 | 11 | | |
| |||
57 | 58 | | |
58 | 59 | | |
59 | 60 | | |
60 | | - | |
| 61 | + | |
61 | 62 | | |
62 | 63 | | |
63 | 64 | | |
| |||
123 | 124 | | |
124 | 125 | | |
125 | 126 | | |
126 | | - | |
127 | | - | |
128 | | - | |
129 | | - | |
130 | 127 | | |
| 128 | + | |
131 | 129 | | |
132 | 130 | | |
133 | 131 | | |
134 | 132 | | |
135 | 133 | | |
136 | 134 | | |
137 | 135 | | |
138 | | - | |
| 136 | + | |
| 137 | + | |
139 | 138 | | |
140 | 139 | | |
141 | 140 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
83 | 83 | | |
84 | 84 | | |
85 | 85 | | |
86 | | - | |
| 86 | + | |
87 | 87 | | |
88 | 88 | | |
89 | 89 | | |
| |||
149 | 149 | | |
150 | 150 | | |
151 | 151 | | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
152 | 155 | | |
153 | 156 | | |
154 | 157 | | |
| |||
165 | 168 | | |
166 | 169 | | |
167 | 170 | | |
168 | | - | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
169 | 174 | | |
170 | 175 | | |
171 | 176 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
8 | | - | |
| 8 | + | |
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
44 | 44 | | |
45 | 45 | | |
46 | 46 | | |
47 | | - | |
| 47 | + | |
48 | 48 | | |
49 | | - | |
| 49 | + | |
50 | 50 | | |
51 | 51 | | |
52 | 52 | | |
53 | 53 | | |
54 | 54 | | |
55 | 55 | | |
56 | 56 | | |
57 | | - | |
| 57 | + | |
58 | 58 | | |
59 | 59 | | |
60 | 60 | | |
| |||
0 commit comments