Skip to content

Commit d6e3772

Browse files
New Sample: ComboBox Suggestions wrapping (#266)
1 parent 6134e2d commit d6e3772

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: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -400,6 +400,14 @@ CLASS z2ui5_cl_demo_app_000 IMPLEMENTATION.
400400
class = 'sapUiTinyMarginEnd sapUiTinyMarginBottom'
401401
).
402402

403+
panel->generic_tile(
404+
header = 'ComboBox'
405+
subheader = 'Suggestions wrapping'
406+
press = client->_event( 'Z2UI5_CL_DEMO_APP_229' )
407+
mode = 'LineMode'
408+
class = 'sapUiTinyMarginEnd sapUiTinyMarginBottom'
409+
).
410+
403411
panel = page->panel(
404412
expandable = abap_false
405413
expanded = abap_true
Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
class z2ui5_cl_demo_app_229 definition
2+
public
3+
create public .
4+
5+
public section.
6+
7+
interfaces Z2UI5_IF_APP .
8+
9+
data CHECK_INITIALIZED type ABAP_BOOL .
10+
PROTECTED SECTION.
11+
12+
METHODS display_view
13+
IMPORTING
14+
client TYPE REF TO z2ui5_if_client.
15+
METHODS on_event
16+
IMPORTING
17+
client TYPE REF TO z2ui5_if_client.
18+
19+
PRIVATE SECTION.
20+
ENDCLASS.
21+
22+
23+
24+
CLASS z2ui5_cl_demo_app_229 IMPLEMENTATION.
25+
26+
27+
METHOD DISPLAY_VIEW.
28+
29+
DATA(page) = z2ui5_cl_xml_view=>factory( )->shell(
30+
)->page(
31+
title = 'abap2UI5 - Sample: ComboBox - Suggestions wrapping'
32+
navbuttonpress = client->_event( 'BACK' )
33+
shownavbutton = xsdbool( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ) ).
34+
35+
DATA(layout) = page->vertical_layout( class = `sapUiContentPadding` width = `100%` ).
36+
layout->label( text = `Product` labelfor = `wrappingComboBox` ).
37+
layout->combobox( id = `wrappingComboBox`
38+
)->item( key = `1` text = `Wireless DSL/ Repeater and Print Server Lorem ipsum dolar st amet, consetetur sadipscing elitr, ` &&
39+
`sed diam nonumy eirmod tempor incidunt ut labore et dolore magna aliquyam erat, diam nonumy eirmod tempor individunt` &&
40+
`ut labore et dolore magna aliquyam erat, sed justo et ea rebum.`
41+
)->item( key = `2` text = `7" Widescreen Portable DVD Player w MP3, consetetur sadipscing, sed diam nonumy eirmod tempor` &&
42+
`invidunt ut labore et dolore et dolore magna aliquyam erat, sed diam voluptua.` &&
43+
`At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergen, no sea takimata.` &&
44+
`Tortor pretium viverra suspendisse potenti nullam. Congue quisque egestas diam in arcu cursus.` &&
45+
`Rutrum tellus pellentesque eu tincidunt tortor. Nec tincidunt praesent semper feugiat nibh sed.`
46+
)->item( key = `3` text = `Portable DVD Player with 9" LCD Monitor`
47+
).
48+
49+
client->view_display( page->stringify( ) ).
50+
51+
ENDMETHOD.
52+
53+
54+
METHOD ON_EVENT.
55+
56+
CASE client->get( )-event.
57+
WHEN 'BACK'.
58+
client->nav_app_leave( ).
59+
ENDCASE.
60+
61+
ENDMETHOD.
62+
63+
64+
METHOD Z2UI5_IF_APP~MAIN.
65+
66+
IF check_initialized = abap_false.
67+
check_initialized = abap_true.
68+
display_view( client ).
69+
ENDIF.
70+
71+
on_event( client ).
72+
73+
ENDMETHOD.
74+
ENDCLASS.

src/z2ui5_cl_demo_app_229.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_229</CLSNAME>
7+
<LANGU>E</LANGU>
8+
<DESCRIPT>ComboBox - Suggestions wrapping</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)