Skip to content

Commit a3a67fc

Browse files
New Demo: Z2UI5_CL_DEMO_APP_330 (#516)
* New Demo: Z2UI5_CL_DEMO_APP_330 * New Demo: Z2UI5_CL_DEMO_APP_330 (2)
1 parent 1df1a90 commit a3a67fc

File tree

3 files changed

+373
-1
lines changed

3 files changed

+373
-1
lines changed

src/z2ui5_cl_demo_app_000.clas.abap

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,10 @@ CLASS z2ui5_cl_demo_app_000 DEFINITION PUBLIC.
2929
ENDCLASS.
3030

3131

32+
3233
CLASS z2ui5_cl_demo_app_000 IMPLEMENTATION.
3334

35+
3436
METHOD z2ui5_if_app~main.
3537

3638
CONSTANTS c_title TYPE string VALUE ` abap2UI5 - Samples`.
@@ -486,6 +488,14 @@ CLASS z2ui5_cl_demo_app_000 IMPLEMENTATION.
486488
class = 'sapUiTinyMarginEnd sapUiTinyMarginBottom'
487489
).
488490

491+
panel->generic_tile( header = 'ObjectPage '
492+
subheader = 'with Hidden Section Titles'
493+
press = client->_event( 'Z2UI5_CL_DEMO_APP_330' )
494+
mode = 'LineMode'
495+
class = 'sapUiTinyMarginEnd sapUiTinyMarginBottom'
496+
).
497+
498+
489499
panel = page->panel( expandable = abap_false
490500
expanded = abap_true
491501
headertext = 'Input'
@@ -2036,6 +2046,7 @@ CLASS z2ui5_cl_demo_app_000 IMPLEMENTATION.
20362046

20372047
ENDMETHOD.
20382048

2049+
20392050
METHOD expand_all.
20402051

20412052
DO.
@@ -2047,5 +2058,4 @@ CLASS z2ui5_cl_demo_app_000 IMPLEMENTATION.
20472058
ENDDO.
20482059

20492060
ENDMETHOD.
2050-
20512061
ENDCLASS.

src/z2ui5_cl_demo_app_330.clas.abap

Lines changed: 346 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,346 @@
1+
class z2ui5_cl_demo_app_330 definition
2+
public
3+
create public .
4+
5+
public section.
6+
7+
interfaces IF_SERIALIZABLE_OBJECT .
8+
interfaces Z2UI5_IF_APP .
9+
10+
data CHECK_INITIALIZED type ABAP_BOOL .
11+
PROTECTED SECTION.
12+
13+
DATA client TYPE REF TO z2ui5_if_client.
14+
15+
METHODS display_view
16+
IMPORTING
17+
client TYPE REF TO z2ui5_if_client.
18+
METHODS on_event
19+
IMPORTING
20+
client TYPE REF TO z2ui5_if_client.
21+
METHODS z2ui5_display_popover
22+
IMPORTING
23+
id TYPE string.
24+
25+
PRIVATE SECTION.
26+
ENDCLASS.
27+
28+
29+
30+
CLASS z2ui5_cl_demo_app_330 IMPLEMENTATION.
31+
32+
33+
METHOD DISPLAY_VIEW.
34+
35+
DATA(view) = z2ui5_cl_xml_view=>factory( ).
36+
DATA(object_page_layout) = view->object_page_layout( uppercaseanchorbar = abap_false ).
37+
38+
DATA(header_title) = object_page_layout->header_title(
39+
)->object_page_dyn_header_title( ).
40+
41+
header_title->expanded_heading(
42+
)->title( text = `Robot Arm Series 9` ).
43+
44+
header_title->snapped_heading(
45+
)->hbox(
46+
)->avatar( src = `https://sapui5.hana.ondemand.com/test-resources/sap/uxap/images/robot.png`
47+
class = `sapUiMediumMarginEnd`
48+
displayshape = `Square`
49+
)->vbox(
50+
)->title( text = `Robot Arm Series 9`
51+
)->label( text = `PO-48865` ).
52+
53+
header_title->expanded_content( ns = `uxap`
54+
)->label( text = `PO-48865` ).
55+
56+
header_title->snapped_title_on_mobile(
57+
)->title( text = `Robot Arm Series 9` ).
58+
59+
header_title->actions( 'uxap'
60+
)->button( text = `Edit` type = `Emphasized`
61+
)->button( text = `Delete`
62+
)->button( text = `Simulate Assembly` ).
63+
64+
DATA(header_content) = object_page_layout->header_content( ns = `uxap`
65+
)->flex_box( wrap = `Wrap` fitcontainer = abap_true ).
66+
67+
header_content->avatar( src = `https://sapui5.hana.ondemand.com/test-resources/sap/uxap/images/robot.png`
68+
class = `sapUiMediumMarginEnd`
69+
displayshape = `Square`
70+
displaysize = `L`
71+
72+
)->vbox( class = `sapUiLargeMarginEnd sapUiSmallMarginBottom`
73+
)->hbox( class = `sapUiTinyMarginBottom` rendertype = `Bare`
74+
)->label( text = `Manufacturer:` class = `sapUiTinyMarginEnd`
75+
)->text( text = `Robotech`
76+
)->get_parent(
77+
78+
)->hbox( class = `sapUiTinyMarginBottom` rendertype = `Bare`
79+
)->label( text = `Factory:` class = `sapUiTinyMarginEnd`
80+
)->text( text = `Orlando, Florida`
81+
)->get_parent(
82+
83+
)->hbox(
84+
)->label( text = `Supplier:` class = `sapUiTinyMarginEnd`
85+
)->link( text = `Robotech (234242343)`
86+
)->get_parent(
87+
)->get_parent(
88+
89+
)->vbox( class = `sapUiLargeMarginEnd sapUiSmallMarginBottom`
90+
)->title( text = `Status` class = `sapUiTinyMarginBottom`
91+
)->object_status( text = `Delivery`
92+
state = `Success`
93+
class = `sapMObjectStatusLarge`
94+
)->get_parent(
95+
)->get_parent(
96+
97+
)->vbox( class = `sapUiSmallMarginEnd sapUiSmallMarginBottom`
98+
)->title( text = `Delivery Time` class = `sapUiTinyMarginBottom`
99+
)->object_status( text = `12 Days`
100+
icon = `sap-icon://shipping-status`
101+
class = `sapMObjectStatusLarge`
102+
)->get_parent(
103+
)->get_parent(
104+
105+
)->vbox( class = `sapUiSmallMarginEnd sapUiSmallMarginBottom`
106+
)->title( text = `Assembly Option` class = `sapUiTinyMarginBottom`
107+
)->object_status( text = `To Be Selected`
108+
state = `Error`
109+
class = `sapMObjectStatusLarge`
110+
)->get_parent(
111+
)->get_parent(
112+
113+
)->vbox( class = `sapUiLargeMarginEnd`
114+
)->title( text = `Monthly Leasing Instalment` class = `sapUiTinyMarginBottom`
115+
)->object_number( number = `379.99`
116+
unit = `USD`
117+
emphasized = abap_false
118+
class = `sapMObjectNumberLarge`
119+
)->get_parent(
120+
)->get_parent( ).
121+
122+
DATA(section) = object_page_layout->sections( ).
123+
124+
section->object_page_section( titleuppercase = abap_false title = `General Information`
125+
)->sub_sections(
126+
)->object_page_sub_section( title = `Order Details` showTitle = abap_false
127+
)->blocks(
128+
)->simple_form( class = `sapUxAPObjectPageSubSectionAlignContent`
129+
layout = `ColumnLayout`
130+
columnsm = `2`
131+
columnsl = `3`
132+
columnsxl = `4`
133+
)->title( ns = `core` text = `Order Details`
134+
135+
)->label( text = `Order ID`
136+
)->text( text = `589946637`
137+
138+
)->label( text = `Contract`
139+
)->link( text = `10045876`
140+
141+
)->label( text = `Transaction Date`
142+
)->text( text = `May 6, 2018`
143+
144+
)->label( text = `Expected Delivery Date`
145+
)->text( text = `June 23, 2018`
146+
147+
)->label( text = `Factory`
148+
)->text( text = `Orlando, FL`
149+
150+
)->label( text = `Supplier`
151+
)->text( text = `Robotech`
152+
153+
)->title( ns = `core` text = `Configuration Accounts`
154+
155+
)->label( text = `Model`
156+
)->text( text = `Robot Arm Series 9`
157+
158+
)->label( text = `Color`
159+
)->text( text = `White (default)`
160+
161+
)->label( text = `Socket`
162+
)->text( text = `Default Socket 10`
163+
164+
)->label( text = `Leasing Instalment`
165+
)->text( text = `379.99 USD per month`
166+
167+
)->label( text = `Axis`
168+
)->text( text = `6 Axis`
169+
)->get_parent(
170+
)->get_parent(
171+
)->get_parent(
172+
173+
)->object_page_sub_section( title = `Products` showtitle = abap_false
174+
)->blocks(
175+
)->table( class = `sapUxAPObjectPageSubSectionAlignContent` width = `auto`
176+
)->header_toolbar(
177+
)->overflow_toolbar(
178+
)->title( text = `Products` level = `H2`
179+
)->toolbar_spacer(
180+
)->search_field( width = `17.5rem`
181+
)->overflow_toolbar_button( tooltip = `Sort`
182+
text = `Sort`
183+
icon = `sap-icon://sort`
184+
)->overflow_toolbar_button( tooltip = `Filter`
185+
text = `Filter`
186+
icon = `sap-icon://filter`
187+
)->overflow_toolbar_button( tooltip = `Group`
188+
text = `Group`
189+
icon = `sap-icon://group-2`
190+
)->overflow_toolbar_button( tooltip = `Settings`
191+
text = `Settings`
192+
icon = `sap-icon://action-settings`
193+
)->get_parent(
194+
)->get_parent(
195+
196+
)->columns(
197+
)->column(
198+
)->text( text = `Document Number`
199+
)->get_parent(
200+
)->column( minScreenWidth = `Tablet` demandpopin = abap_true
201+
)->text( text = `Company`
202+
)->get_parent(
203+
)->column( minScreenWidth = `Tablet` demandpopin = abap_true
204+
)->text( text = `Contact Person`
205+
)->get_parent(
206+
)->column( minScreenWidth = `Tablet` demandpopin = abap_true
207+
)->text( text = `Posting Date`
208+
)->get_parent(
209+
)->column( halign = `End`
210+
)->text( text = `Amount (Local Currency)`
211+
)->get_parent(
212+
)->get_parent(
213+
214+
)->items(
215+
)->column_list_item(
216+
)->link( text = `10223882001820`
217+
)->text( text = `Jologa`
218+
)->text( text = `Denise Smith`
219+
)->text( text = `11/15/19`
220+
)->text( text = `12,897.00 EUR`
221+
)->get_parent(
222+
)->column_list_item(
223+
)->link( text = `10223882001820`
224+
)->text( text = `Jologa`
225+
)->text( text = `Denise Smith`
226+
)->text( text = `11/15/19`
227+
)->text( text = `12,897.00 EUR`
228+
)->get_parent(
229+
)->column_list_item(
230+
)->link( text = `10223882001820`
231+
)->text( text = `Jologa`
232+
)->text( text = `Denise Smith`
233+
)->text( text = `11/15/19`
234+
)->text( text = `12,897.00 EUR`
235+
)->get_parent(
236+
)->column_list_item(
237+
)->link( text = `10223882001820`
238+
)->text( text = `Jologa`
239+
)->text( text = `Denise Smith`
240+
)->text( text = `11/15/19`
241+
)->text( text = `12,897.00 EUR`
242+
)->get_parent(
243+
)->column_list_item(
244+
)->link( text = `10223882001820`
245+
)->text( text = `Jologa`
246+
)->text( text = `Denise Smith`
247+
)->text( text = `11/15/19`
248+
)->text( text = `12,897.00 EUR`
249+
)->get_parent(
250+
)->get_parent(
251+
)->get_parent(
252+
)->get_parent(
253+
)->get_parent(
254+
)->get_parent(
255+
).
256+
257+
section->object_page_section( titleuppercase = abap_false title = `Contact Information`
258+
)->sub_sections(
259+
)->object_page_sub_section( title = `Contact information`
260+
)->blocks(
261+
)->simple_form( layout = `ColumnLayout`
262+
columnsm = `2`
263+
columnsl = `3`
264+
columnsxl = `4`
265+
)->title( ns = `core` text = `Phone Numbers`
266+
267+
)->label( text = `Home`
268+
)->text( text = `+ 1 415-321-1234`
269+
270+
)->label( text = `Office phone`
271+
)->text( text = `+ 1 415-321-5555`
272+
273+
)->title( ns = `core` text = `Social Accounts`
274+
275+
)->label( text = `LinkedIn`
276+
)->text( text = `/DeniseSmith`
277+
278+
)->label( text = `Twitter`
279+
)->text( text = `@DeniseSmith`
280+
281+
)->title( ns = `core` text = `Addresses`
282+
283+
)->label( text = `Home Address`
284+
)->text( text = `2096 Mission Street`
285+
286+
)->label( text = `Mailing Address`
287+
)->text( text = `PO Box 32114`
288+
289+
)->title( ns = `core` text = `Mailing Address`
290+
291+
)->label( text = `Work`
292+
)->text( text = `DeniseSmith@sap.com`
293+
294+
)->get_parent(
295+
)->get_parent(
296+
)->get_parent(
297+
)->get_parent(
298+
).
299+
300+
client->view_display( view->stringify( ) ).
301+
302+
ENDMETHOD.
303+
304+
305+
METHOD ON_EVENT.
306+
307+
CASE client->get( )-event.
308+
WHEN 'BACK'.
309+
client->nav_app_leave( ).
310+
WHEN 'CLICK_HINT_ICON'.
311+
z2ui5_display_popover( `button_hint_id` ).
312+
ENDCASE.
313+
314+
ENDMETHOD.
315+
316+
317+
METHOD Z2UI5_DISPLAY_POPOVER.
318+
319+
DATA(view) = z2ui5_cl_xml_view=>factory_popup( ).
320+
view->quick_view( placement = `Bottom` width = `auto`
321+
)->quick_view_page( pageid = `sampleInformationId`
322+
header = `Sample information`
323+
description = `ObjectPage sample that demonstrates the combination of header facets and showTitle properties of sections and subsections.` ).
324+
325+
client->popover_display(
326+
xml = view->stringify( )
327+
by_id = id
328+
).
329+
330+
ENDMETHOD.
331+
332+
333+
METHOD Z2UI5_IF_APP~MAIN.
334+
335+
me->client = client.
336+
337+
IF check_initialized = abap_false.
338+
check_initialized = abap_true.
339+
display_view( client ).
340+
341+
ENDIF.
342+
343+
on_event( client ).
344+
345+
ENDMETHOD.
346+
ENDCLASS.

0 commit comments

Comments
 (0)