Skip to content

Commit 44aacda

Browse files
New Demo: Standalone Icon Tab Header (#246)
1 parent c158b36 commit 44aacda

File tree

3 files changed

+98
-0
lines changed

3 files changed

+98
-0
lines changed

src/z2ui5_cl_demo_app_000.clas.abap

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -768,6 +768,13 @@ CLASS z2ui5_cl_demo_app_000 IMPLEMENTATION.
768768
class = 'sapUiTinyMarginEnd sapUiTinyMarginBottom'
769769
).
770770

771+
panel->generic_tile(
772+
header = 'Icon Tab Header'
773+
subheader = 'Standalone Icon Tab Header'
774+
press = client->_event( 'Z2UI5_CL_DEMO_APP_214' )
775+
mode = 'LineMode'
776+
class = 'sapUiTinyMarginEnd sapUiTinyMarginBottom'
777+
).
771778

772779
panel = page->panel(
773780
expandable = abap_false
Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
class z2ui5_cl_demo_app_214 definition
2+
public
3+
create public .
4+
5+
public section.
6+
7+
interfaces IF_SERIALIZABLE_OBJECT .
8+
interfaces Z2UI5_IF_APP .
9+
10+
data:
11+
BEGIN OF screen,
12+
input1 TYPE string,
13+
input2 TYPE string,
14+
input3 TYPE string,
15+
END OF screen .
16+
data CHECK_INITIALIZED type ABAP_BOOL .
17+
PROTECTED SECTION.
18+
19+
METHODS display_view
20+
IMPORTING
21+
client TYPE REF TO z2ui5_if_client.
22+
METHODS on_event
23+
IMPORTING
24+
client TYPE REF TO z2ui5_if_client.
25+
26+
PRIVATE SECTION.
27+
ENDCLASS.
28+
29+
30+
31+
CLASS z2ui5_cl_demo_app_214 IMPLEMENTATION.
32+
33+
34+
METHOD DISPLAY_VIEW.
35+
36+
DATA(page) = z2ui5_cl_xml_view=>factory( )->shell(
37+
)->page(
38+
title = 'abap2UI5 - Sample: Standalone Icon Tab Header'
39+
navbuttonpress = client->_event( 'BACK' )
40+
shownavbutton = xsdbool( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ) ).
41+
42+
DATA(layout) = page->icon_tab_header( mode = `Inline`
43+
)->items(
44+
)->icon_tab_filter( key = `info` text = `Info` )->get_parent(
45+
)->icon_tab_filter( key = `attachments` text = `Attachments` count = `3` )->get_parent(
46+
)->icon_tab_filter( key = `notes` text = `Notes` count = `12` )->get_parent(
47+
)->icon_tab_filter( key = `people` text = `People`
48+
).
49+
50+
client->view_display( page->stringify( ) ).
51+
52+
ENDMETHOD.
53+
54+
55+
METHOD ON_EVENT.
56+
57+
CASE client->get( )-event.
58+
WHEN 'BACK'.
59+
client->nav_app_leave( ).
60+
ENDCASE.
61+
62+
ENDMETHOD.
63+
64+
65+
METHOD Z2UI5_IF_APP~MAIN.
66+
67+
IF check_initialized = abap_false.
68+
check_initialized = abap_true.
69+
display_view( client ).
70+
ENDIF.
71+
72+
on_event( client ).
73+
74+
ENDMETHOD.
75+
ENDCLASS.

src/z2ui5_cl_demo_app_214.clas.xml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<abapGit version="v1.0.0" serializer="LCL_OBJECT_CLAS" serializer_version="v1.0.0">
3+
<asx:abap xmlns:asx="http://www.sap.com/abapxml" version="1.0">
4+
<asx:values>
5+
<VSEOCLASS>
6+
<CLSNAME>Z2UI5_CL_DEMO_APP_214</CLSNAME>
7+
<LANGU>E</LANGU>
8+
<DESCRIPT>Input - Password</DESCRIPT>
9+
<STATE>1</STATE>
10+
<CLSCCINCL>X</CLSCCINCL>
11+
<FIXPT>X</FIXPT>
12+
<UNICODE>X</UNICODE>
13+
</VSEOCLASS>
14+
</asx:values>
15+
</asx:abap>
16+
</abapGit>

0 commit comments

Comments
 (0)