Skip to content

Commit b94e9b8

Browse files
committed
cleanup
1 parent f49f376 commit b94e9b8

4 files changed

+22
-13
lines changed

src/z2ui5_cl_demo_app_009.clas.abap

+1-1
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,7 @@ CLASS Z2UI5_CL_DEMO_APP_009 IMPLEMENTATION.
213213
CLEAR screen.
214214
client->message_box_display( 'View initialized' ).
215215
WHEN 'BACK'.
216-
client->nav_app_leave( client->get_app( client->get( )-s_draft-id_prev_app_stack ) ).
216+
client->nav_app_leave( ).
217217

218218
ENDCASE.
219219

src/z2ui5_cl_demo_app_010.clas.abap

+3-3
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,9 @@ CLASS Z2UI5_CL_DEMO_APP_010 IMPLEMENTATION.
2121

2222
DATA(page) = z2ui5_cl_xml_view=>factory( )->shell(
2323
)->page(
24-
title = 'abap2UI5 - Demo Layout'
25-
navbuttonpress = client->_event( 'BACK' )
26-
shownavbutton = abap_true
24+
title = 'abap2UI5 - Demo Layout'
25+
navbuttonpress = client->_event( 'BACK' )
26+
shownavbutton = xsdbool( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL )
2727
).
2828

2929
page->header_content(

src/z2ui5_cl_demo_app_180.clas.abap

+8-5
Original file line numberDiff line numberDiff line change
@@ -38,12 +38,12 @@ CLASS z2ui5_cl_demo_app_180 IMPLEMENTATION.
3838
mv_url = `https://www.google.com`.
3939

4040
client->view_model_update( ).
41-
4241
client->follow_up_action( custom_js = client->_event_client( val = client->cs_event-open_new_tab t_arg = VALUE #( ( mv_url ) ) ) ).
4342

4443
WHEN 'BACK'.
45-
client->nav_app_leave( client->get_app( client->get( )-s_draft-id_prev_app_stack ) ).
44+
client->nav_app_leave( ).
4645
RETURN.
46+
4747
ENDCASE.
4848

4949
ENDMETHOD.
@@ -54,17 +54,20 @@ CLASS z2ui5_cl_demo_app_180 IMPLEMENTATION.
5454
DATA(view) = z2ui5_cl_xml_view=>factory( ).
5555
view->_generic( name = `script` ns = `html` )->_cc_plain_xml( `sap.z2ui5.afterBE = () => { alert("afterBE triggered !!"); }` ).
5656

57-
DATA(page) = view->shell( )->page( title = `Client->FOLLOW_UP_ACTION use cases` class = `sapUiContentPadding` ).
57+
DATA(page) = view->shell( )->page(
58+
title = `Client->FOLLOW_UP_ACTION use cases`
59+
class = `sapUiContentPadding`
60+
navbuttonpress = client->_event( 'BACK' )
61+
shownavbutton = xsdbool( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL )
62+
).
5863
page = page->vbox( ).
5964
page->button( text = `call frontend event from backend event` press = client->_event( `CALL_EF` ) ).
6065
page->label( text = `MV_URL was set AFTER backend event and model update to:` ).
6166
page->label( text = client->_bind_edit( mv_url ) ).
6267

6368
page->get_parent( )->hbox( class = `sapUiSmallMargin` ).
64-
* page = page->vbox( ).
6569
page->button( text = `call custom JS from EB` press = client->_event( 'CUSTOM_JS_FROM_EB' ) ).
6670

67-
6871
client->view_display( view->stringify( ) ).
6972

7073
ENDMETHOD.

src/z2ui5_cl_demo_app_181.clas.abap

+10-4
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ CLASS Z2UI5_CL_DEMO_APP_181 IMPLEMENTATION.
5151
client->message_toast_display( 'BOOKED !!! ENJOY' ).
5252

5353
WHEN 'BACK'.
54-
client->nav_app_leave( client->get_app( client->get( )-s_draft-id_prev_app_stack ) ).
54+
client->nav_app_leave( ).
5555
RETURN.
5656
ENDCASE.
5757

@@ -62,7 +62,14 @@ CLASS Z2UI5_CL_DEMO_APP_181 IMPLEMENTATION.
6262

6363
DATA(view) = z2ui5_cl_xml_view=>factory( ).
6464

65-
DATA(card_1) = view->card( width = `300px` class = `sapUiMediumMargin`
65+
data(page) = view->page(
66+
title = `Cards Demo`
67+
class = `sapUiContentPadding`
68+
navbuttonpress = client->_event( 'BACK' )
69+
shownavbutton = xsdbool( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL )
70+
).
71+
72+
DATA(card_1) = page->card( width = `300px` class = `sapUiMediumMargin`
6673
)->header( ns = `f`
6774
)->card_header( title = `Buy bus ticket on-line`
6875
subtitle = `Buy a single-ride ticket for a date`
@@ -105,7 +112,7 @@ CLASS Z2UI5_CL_DEMO_APP_181 IMPLEMENTATION.
105112
class = `sapUiTinyMarginBegin` ).
106113

107114

108-
DATA(card_2) = view->card( width = `300px` class = `sapUiMediumMargin`
115+
DATA(card_2) = page->card( width = `300px` class = `sapUiMediumMargin`
109116
)->header( ns = `f`
110117
)->card_header( title = `Project Cloud Transformation`
111118
subtitle = `Revenue per Product | EUR`
@@ -121,7 +128,6 @@ CLASS Z2UI5_CL_DEMO_APP_181 IMPLEMENTATION.
121128
)->custom_list_item(
122129
)->hbox( alignitems = `Center` justifycontent = `SpaceBetween`
123130
)->vbox( class = `sapUiSmallMarginBegin sapUiSmallMarginTopBottom`
124-
* )->label( text = `{TITLE}`
125131
)->title( text = `{TITLE}` titlestyle = `H3`
126132
)->text( text = `{SUBTITLE}`
127133
)->get_parent(

0 commit comments

Comments
 (0)