Skip to content

Commit cec688d

Browse files
authored
demo fixes (#182)
1 parent ba37ecb commit cec688d

File tree

2 files changed

+59
-59
lines changed

2 files changed

+59
-59
lines changed

src/z2ui5_cl_demo_app_038.clas.abap

Lines changed: 58 additions & 58 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
CLASS Z2UI5_CL_DEMO_APP_038 DEFINITION PUBLIC.
1+
CLASS z2ui5_cl_demo_app_038 DEFINITION PUBLIC.
22

33
PUBLIC SECTION.
44

5-
INTERFACES Z2UI5_if_app.
5+
INTERFACES z2ui5_if_app.
66

77
TYPES:
88
BEGIN OF ty_msg,
@@ -16,15 +16,15 @@ CLASS Z2UI5_CL_DEMO_APP_038 DEFINITION PUBLIC.
1616
DATA t_msg TYPE STANDARD TABLE OF ty_msg WITH EMPTY KEY.
1717
DATA check_initialized TYPE abap_bool.
1818

19-
METHODS Z2UI5_display_view.
20-
METHODS Z2UI5_display_popup.
21-
METHODS Z2UI5_display_popover
19+
METHODS z2ui5_display_view.
20+
METHODS z2ui5_display_popup.
21+
METHODS z2ui5_display_popover
2222
IMPORTING
2323
id TYPE string.
2424

2525
PROTECTED SECTION.
2626

27-
DATA client TYPE REF TO Z2UI5_if_client.
27+
DATA client TYPE REF TO z2ui5_if_client.
2828

2929
PRIVATE SECTION.
3030
ENDCLASS.
@@ -34,9 +34,9 @@ ENDCLASS.
3434
CLASS Z2UI5_CL_DEMO_APP_038 IMPLEMENTATION.
3535

3636

37-
METHOD Z2UI5_display_popover.
37+
METHOD z2ui5_display_popover.
3838

39-
DATA(popup) = Z2UI5_cl_xml_view=>factory_popup( ).
39+
DATA(popup) = z2ui5_cl_xml_view=>factory_popup( ).
4040

4141
* popup = popup->popover(
4242
* placement = `Top`
@@ -49,7 +49,7 @@ CLASS Z2UI5_CL_DEMO_APP_038 IMPLEMENTATION.
4949
groupitems = abap_true
5050
placement = `Top`
5151
initiallyexpanded = abap_true
52-
beforeclose = client->_event( val = 'POPOVER_CLOSE' s_ctrl = value #( check_view_destroy = abap_true ) )
52+
beforeclose = client->_event( val = 'POPOVER_CLOSE' s_ctrl = VALUE #( check_view_destroy = abap_false ) )
5353
)->message_item(
5454
type = `{TYPE}`
5555
title = `{TITLE}`
@@ -62,59 +62,59 @@ CLASS Z2UI5_CL_DEMO_APP_038 IMPLEMENTATION.
6262
ENDMETHOD.
6363

6464

65-
METHOD Z2UI5_display_popup.
65+
METHOD z2ui5_display_popup.
6666

67-
* DATA(popup) = Z2UI5_cl_xml_view=>factory_popup( client ).
68-
*
69-
* popup = popup->dialog(
70-
* title = `Messages`
71-
* contentheight = '50%'
72-
* contentwidth = '50%' ).
73-
*
74-
* popup->message_view(
75-
* items = client->_bind_edit( val = t_msg
76-
* )
77-
* groupitems = abap_true
78-
* )->message_item(
79-
* type = `{TYPE}`
80-
* title = `{TITLE}`
81-
* subtitle = `{SUBTITLE}`
82-
* description = `{DESCRIPTION}`
83-
* groupname = `{GROUP}` ).
84-
*
85-
* popup->footer( )->overflow_toolbar(
86-
* )->toolbar_spacer(
87-
* )->button(
88-
* id = `test2`
89-
* text = 'test'
90-
* press = client->_event( `TEST` )
91-
* )->button(
92-
* text = 'close'
93-
* press = client->_event_client( client->cs_event-popup_close ) ).
94-
*
95-
* client->popup_display( popup->stringify( ) ).
67+
DATA(popup) = z2ui5_cl_xml_view=>factory_popup( ).
68+
69+
popup = popup->dialog(
70+
title = `Messages`
71+
contentheight = '50%'
72+
contentwidth = '50%' ).
73+
74+
popup->message_view(
75+
items = client->_bind_edit( val = t_msg
76+
)
77+
groupitems = abap_true
78+
)->message_item(
79+
type = `{TYPE}`
80+
title = `{TITLE}`
81+
subtitle = `{SUBTITLE}`
82+
description = `{DESCRIPTION}`
83+
groupname = `{GROUP}` ).
84+
85+
popup->footer( )->overflow_toolbar(
86+
)->toolbar_spacer(
87+
)->button(
88+
id = `test2`
89+
text = 'test'
90+
press = client->_event( `TEST` )
91+
)->button(
92+
text = 'close'
93+
press = client->_event_client( client->cs_event-popup_close ) ).
94+
95+
client->popup_display( popup->stringify( ) ).
9696

9797
ENDMETHOD.
9898

9999

100-
METHOD Z2UI5_display_view.
100+
METHOD z2ui5_display_view.
101101

102102
DATA(view) = z2ui5_cl_xml_view=>factory( ).
103-
103+
view->_generic( ns = `html` name = `style` )->_cc_plain_xml( `.sapMDialogScroll { height:100%; }` ).
104104
DATA(page) = view->shell(
105105
)->page(
106106
title = 'abap2UI5 - List'
107107
navbuttonpress = client->_event( val = 'BACK' )
108-
shownavbutton = abap_true
109-
)->header_content(
110-
)->link(
111-
text = 'Demo' target = '_blank'
112-
href = `https://twitter.com/abap2UI5/status/1647246029828268032`
113-
)->link(
114-
115-
116-
)->get_parent( ).
117-
* page->button( text = 'Messages in Popup' press = client->_event( 'POPUP' ) ).
108+
shownavbutton = abap_true ).
109+
* )->header_content(
110+
* )->link(
111+
* text = 'Demo' target = '_blank'
112+
* href = `https://twitter.com/abap2UI5/status/1647246029828268032`
113+
* )->link(
114+
*
115+
*
116+
* )->get_parent( ).
117+
page->button( text = 'Messages in Popup' press = client->_event( 'POPUP' ) ).
118118
page->message_view(
119119
items = client->_bind_edit( t_msg )
120120
groupitems = abap_true
@@ -142,7 +142,7 @@ CLASS Z2UI5_CL_DEMO_APP_038 IMPLEMENTATION.
142142
ENDMETHOD.
143143

144144

145-
METHOD Z2UI5_if_app~main.
145+
METHOD z2ui5_if_app~main.
146146

147147
me->client = client.
148148

@@ -155,19 +155,19 @@ CLASS Z2UI5_CL_DEMO_APP_038 IMPLEMENTATION.
155155
( description = 'descr' subtitle = 'subtitle' title = 'title' type = 'Information' group = 'group 02' )
156156
( description = 'descr' subtitle = 'subtitle' title = 'title' type = 'Success' group = 'group 03' ) ).
157157

158-
Z2UI5_display_view( ).
158+
z2ui5_display_view( ).
159159

160160
ENDIF.
161161

162162
CASE client->get( )-event.
163163
WHEN 'POPOVER_CLOSE'.
164164
client->popover_destroy( ).
165-
* WHEN 'POPUP'.
166-
* Z2UI5_display_popup( ).
167-
WHEN 'TEST'.
168-
Z2UI5_display_popover( `test2` ).
165+
WHEN 'POPUP'.
166+
z2ui5_display_popup( ).
167+
WHEN 'TEST'.
168+
z2ui5_display_popover( `test2` ).
169169
WHEN 'POPOVER'.
170-
Z2UI5_display_popover( `test` ).
170+
z2ui5_display_popover( `test` ).
171171
WHEN 'BACK'.
172172
client->nav_app_leave( client->get_app( client->get( )-s_draft-id_prev_app_stack ) ).
173173
ENDCASE.

src/z2ui5_cl_demo_app_141.clas.abap

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ CLASS Z2UI5_CL_DEMO_APP_141 IMPLEMENTATION.
106106
press = client->_event( 'BUTTON_TEXTAREA_CANCEL' )
107107
)->button(
108108
text = 'Confirm'
109-
press = client->_event( client->cs_event-popup_close )
109+
press = client->_event_client( client->cs_event-popup_close )
110110
type = 'Emphasized' ).
111111

112112
dialog->_generic( name = `HTML` ns = `core` t_prop = VALUE #( ( n = `content` v = `<script> sap.z2ui5.setBlackColor(); </script>` )

0 commit comments

Comments
 (0)