Skip to content

Commit 488feae

Browse files
oblomov-devclaude
andauthored
Add three new demo apps and reorganize catalog structure (#695)
* Add Navigation routing-modes demo (default / fresh / keep) New sample z2ui5_cl_demo_app_468 ("Navigation - Routing modes") demonstrates the three modes of client->set_nav_routing( ) so the difference is observable with the browser Back button: pick a mode, add some state (type / raise a counter), open the detail page via nav_app_call, then press the browser Back button and watch the page: - default : no #/app route - browser Back leaves the app (in-app Back returns) - fresh : route by class only - browser Back restarts the app empty - keep : route by class + draft - browser Back restores the exact state z2ui5_cl_demo_app_469 is the hidden detail page it navigates to (ZZZ helper). Both live in 01/02 (framework use cases). Regenerated the overview catalogs; the regeneration also synced pre-existing DESCRIPT drift (apps 139, 346, 421, 466). Note: relies on set_nav_routing( mode ) / cs_nav_mode from abap2UI5; samples CI lints against abap2UI5 main and will be green once that framework change lands. * fix * Add Popup aggregation-binding sample (element bind) New sample z2ui5_cl_demo_app_470 ("Popup - Aggregation binding") shows how to bind a popup to one row of an aggregation with client->follow_up_action( cs_event-bind_element, view = cs_view-popup ): the main table is bound to the product aggregation, and pressing a row's "components" button opens a popup that uses relative bindings only ({NAME}, {CATEGORY}, and the nested aggregation {T_ITEM}). The element bind points the whole popup slot at /T_PRODUCT/<index> (the index arrives as the event arg from the pressed control's binding context), so the popup - including its component list's aggregation binding - resolves against the selected product without copying any data into event args. Regenerated the overview catalog: adds the app_470 tile and syncs the catalog to the tree (the preceding file moves to src/01/01 had left it stale). * fixes * Build out app_319 into a full SmartMultiInput SELECT-OPTIONS demo Turns the WIP SmartMultiInput sample into an end-to-end demo of the control's strength: define conditions on Product Type via the OData value help (contains, between, greater-than, exclude, several at once) and the backend translates the returned ranges into a real ABAP RANGE (do_search: Contains -> CP *x*, StartsWith/EndsWith -> CP, BT, GT/GE/LT/LE, exclude -> SIGN 'E') and filters a local demo product list with `... WHERE product_type IN <range>`. The derived SELECT-OPTIONS (SIGN/OPTION/LOW/HIGH) and the matching rows are both shown, plus a live match count. Removed the debug range-content message box; kept the ProductType / UI_PRODUCTLIST OData wiring. Also regenerated the overview catalog to mirror the current tree. * fix * Fix abaplint omit_parameter_name in samples 470 and 315 - app_470: vbox( class = ... ) -> vbox( ... ) (class is the PREFERRED parameter) - app_315: view_display( val = ... ) -> view_display( ... ) (val is the first, mandatory parameter) These only surface with full framework symbol resolution (CI), not in a formatting-only lint. The remaining ABAP_STANDARD errors on app_468 (cs_nav_mode / set_nav_routing) are the cross-repo dependency on abap2UI5#2476 and clear once that framework change is on main. --------- Co-authored-by: Claude <noreply@anthropic.com>
1 parent 7b5f96a commit 488feae

47 files changed

Lines changed: 799 additions & 163 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 42 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,42 @@ CLASS z2ui5_cl_demo_app_313 IMPLEMENTATION.
3030

3131
IF client->check_on_init( ).
3232

33+
* DATA(view) = z2ui5_cl_xml_view=>factory( ).
34+
*
35+
* DATA(page) = view->shell(
36+
* )->page(
37+
* title = `abap2UI5 - Smart Controls with Variants`
38+
* navbuttonpress = client->_event_nav_app_leave( )
39+
* shownavbutton = client->check_app_prev_stack( ) ).
40+
*
41+
* page->smart_filter_bar(
42+
* id = `smartFilterBar`
43+
* persistencykey = `SmartFilterPKey`
44+
* entityset = `BookingSupplement`
45+
* )->_control_configuration(
46+
* )->control_configuration(
47+
* previnitdatafetchinvalhelpdia = abap_false
48+
* visibleinadvancedarea = abap_true
49+
* key = `TravelID`
50+
* )->get_parent(
51+
* )->smart_table(
52+
* id = `smartFiltertable`
53+
* smartfilterid = `smartFilterBar`
54+
* tabletype = `ResponsiveTable`
55+
* editable = abap_false
56+
* initiallyvisiblefields = `TravelID,BookingID`
57+
* entityset = `BookingSupplement`
58+
* usevariantmanagement = abap_true
59+
* useexporttoexcel = abap_true
60+
* usetablepersonalisation = abap_true
61+
* header = `Test`
62+
* showrowcount = abap_true
63+
* enableexport = abap_false
64+
* enableautobinding = abap_true ).
65+
*
66+
* client->view_display( val = view->stringify( )
67+
* switch_default_model_path = `/sap/opu/odata/DMO/API_TRAVEL_U_V2/` ).
68+
3369
DATA(view) = z2ui5_cl_xml_view=>factory( ).
3470

3571
DATA(page) = view->shell(
@@ -41,30 +77,30 @@ CLASS z2ui5_cl_demo_app_313 IMPLEMENTATION.
4177
page->smart_filter_bar(
4278
id = `smartFilterBar`
4379
persistencykey = `SmartFilterPKey`
44-
entityset = `BookingSupplement`
80+
entityset = `ProductType_2`
4581
)->_control_configuration(
4682
)->control_configuration(
4783
previnitdatafetchinvalhelpdia = abap_false
4884
visibleinadvancedarea = abap_true
49-
key = `TravelID`
85+
key = `ProductType`
5086
)->get_parent(
5187
)->smart_table(
5288
id = `smartFiltertable`
5389
smartfilterid = `smartFilterBar`
5490
tabletype = `ResponsiveTable`
5591
editable = abap_false
56-
initiallyvisiblefields = `TravelID,BookingID`
57-
entityset = `BookingSupplement`
92+
initiallyvisiblefields = `ProductType,ProductType_Text`
93+
entityset = `ProductType_2`
5894
usevariantmanagement = abap_true
5995
useexporttoexcel = abap_true
6096
usetablepersonalisation = abap_true
6197
header = `Test`
6298
showrowcount = abap_true
6399
enableexport = abap_false
64-
enableautobinding = abap_true ).
100+
enableautobinding = abap_false ).
65101

66102
client->view_display( val = view->stringify( )
67-
switch_default_model_path = `/sap/opu/odata/DMO/API_TRAVEL_U_V2/` ).
103+
switch_default_model_path = `/sap/opu/odata/sap/UI_PRODUCTLIST/` ).
68104

69105
ENDIF.
70106

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<VSEOCLASS>
66
<CLSNAME>Z2UI5_CL_DEMO_APP_313</CLSNAME>
77
<LANGU>E</LANGU>
8-
<DESCRIPT>tab - smart controls</DESCRIPT>
8+
<DESCRIPT>EXPERIMENTAL - Smart Table and Variants</DESCRIPT>
99
<STATE>1</STATE>
1010
<CLSCCINCL>X</CLSCCINCL>
1111
<FIXPT>X</FIXPT>

src/00/00/z2ui5_cl_demo_app_314.clas.abap

Lines changed: 19 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -75,33 +75,36 @@ CLASS z2ui5_cl_demo_app_314 IMPLEMENTATION.
7575
)->text( `{http>DESCR}`).
7676

7777
tab = page->table(
78-
items = `{/BookingSupplement}`
78+
items = `{/BusinessPartnerSet}`
7979
growing = abap_true ).
8080

8181
tab->header_toolbar(
8282
)->toolbar(
8383
)->title( `table with odata model` ).
8484

8585
tab->columns(
86-
)->column( )->text( `TravelID` )->get_parent(
87-
)->column( )->text( `BookingID` )->get_parent(
88-
)->column( )->text( `BookingSupplementID` )->get_parent(
89-
)->column( )->text( `SupplementID` )->get_parent(
90-
)->column( )->text( `SupplementText` )->get_parent(
91-
)->column( )->text( `Price` )->get_parent(
92-
)->column( )->text( `CurrencyCode` )->get_parent( ).
86+
)->column( )->text( `BusinessPartnerID` )->get_parent(
87+
)->column( )->text( `CompanyName` )->get_parent(
88+
)->column( )->text( `WebAddress` )->get_parent(
89+
* )->column( )->text( `SupplementID` )->get_parent(
90+
* )->column( )->text( `SupplementText` )->get_parent(
91+
* )->column( )->text( `Price` )->get_parent(
92+
* )->column( )->text( `CurrencyCode` )->get_parent( ).
93+
).
9394

9495
tab->items( )->column_list_item( )->cells(
95-
)->text( `{TravelID}`
96-
)->text( `{BookingID}`
97-
)->text( `{BookingSupplementID}`
98-
)->text( `{SupplementID}`
99-
)->text( `{SupplementText}`
100-
)->text( `{Price}`
101-
)->text( `{CurrencyCode}` ).
96+
)->text( `{BusinessPartnerID}`
97+
)->text( `{CompanyName}`
98+
)->text( `{WebAddress}`
99+
* )->text( `{SupplementID}`
100+
* )->text( `{SupplementText}`
101+
* )->text( `{Price}`
102+
* )->text( `{CurrencyCode}`
103+
).
102104

103105
client->view_display( val = view->stringify( )
104-
switch_default_model_path = `/sap/opu/odata/DMO/API_TRAVEL_U_V2/` ).
106+
switch_default_model_path = `/sap/opu/odata/iwbep/gwsample_basic/` ).
107+
* switch_default_model_path = `/sap/opu/odata/DMO/API_TRAVEL_U_V2/` ).
105108

106109
ENDIF.
107110

src/00/00/z2ui5_cl_demo_app_314.clas.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<VSEOCLASS>
66
<CLSNAME>Z2UI5_CL_DEMO_APP_314</CLSNAME>
77
<LANGU>E</LANGU>
8-
<DESCRIPT>tab - odata, device, http</DESCRIPT>
8+
<DESCRIPT>EXPERIMENTAL - Switch default Model</DESCRIPT>
99
<STATE>1</STATE>
1010
<CLSCCINCL>X</CLSCCINCL>
1111
<FIXPT>X</FIXPT>

0 commit comments

Comments
 (0)