Standard List Item
This list item offers a standardized user interface for list content with only title.
Z2UI5_CL_SMPC_APP_212
Controls
sap.m
UI5 1.71
The facts
- Repository
- abap2UI5/samples-controls
- Class
Z2UI5_CL_SMPC_APP_212- Source file
z2ui5_cl_smpc_app_212.clas.abap↗- Library
- sap.m
- UI5 entity
sap.m.StandardListItem- Demo kit sample
sap.m.sample.StandardListItem- SAP's own sample
- running at sdk.openui5.org ↗
- Minimum UI5
- 1.71 — the floor abap2UI5 holds its samples to
- In the playground
- runs in the browser, with no system and nothing installed
Keywords: standardlistitem, standard, list, item, sap.m
Controls it builds
Read out of the builder chain by the abap2UI5 linter, not from the category this sample is filed under — which is what makes “which samples build one of these” a question the catalogue can answer at all.
Libraries
Run it here
The sample running, in this page — the app on its own, with no editor over it.
Switch to Playground with this code
Nothing is installed and nothing is sent anywhere: the ABAP is compiled to JavaScript in this browser and runs against abap2UI5 itself.
The ABAP
z2ui5_cl_smpc_app_212.clas.abap — 194 lines
Click a number to link to a line — shift-click for a range.
Read it on GitHub ↗
" @keywords standardlistitem standard list item sap.m
" @summary This list item offers a standardized user interface for list content with only title.
CLASS z2ui5_cl_smpc_app_212 DEFINITION PUBLIC.
PUBLIC SECTION.
INTERFACES z2ui5_if_app.
TYPES:
BEGIN OF ty_s_product,
name TYPE string,
END OF ty_s_product.
DATA t_products TYPE STANDARD TABLE OF ty_s_product WITH EMPTY KEY.
PROTECTED SECTION.
DATA client TYPE REF TO z2ui5_if_client.
METHODS view_display.
METHODS model_init.
PRIVATE SECTION.
ENDCLASS.
CLASS z2ui5_cl_smpc_app_212 IMPLEMENTATION.
METHOD z2ui5_if_app~main.
me->client = client.
IF client->check_on_init( ).
model_init( ).
view_display( ).
ELSEIF client->check_on_navigated( ).
view_display( ).
ENDIF.
ENDMETHOD.
METHOD view_display.
DATA(view) = z2ui5_cl_ui5_view_builder=>factory( ).
view->ele( n = `View` ns = `mvc`
)->a( n = `xmlns:mvc` v = `sap.ui.core.mvc`
)->a( n = `xmlns` v = `sap.m`
)->ele( `List`
)->a( n = `id` v = `ShortProductList`
)->a( n = `headerText` v = `Products`
)->a( n = `items` v = |\{ path: '{ client->_bind_path( t_products ) }', sorter: \{ path: 'NAME' \} \}|
)->ele( `items`
)->tag( `StandardListItem`
)->a( n = `title` v = `{NAME}`
)->end(
)->end( ).
client->view_display( view->stringify( ) ).
ENDMETHOD.
METHOD model_init.
" full mock /ProductCollection (sap/ui/demo/mock/products.json)
t_products = VALUE #(
( name = `Notebook Basic 15` )
( name = `Notebook Basic 17` )
( name = `Notebook Basic 18` )
( name = `Notebook Basic 19` )
( name = `ITelO Vault` )
( name = `Notebook Professional 15` )
( name = `Notebook Professional 17` )
( name = `ITelO Vault Net` )
( name = `ITelO Vault SAT` )
( name = `Comfort Easy` )
( name = `Comfort Senior` )
( name = `Ergo Screen E-I` )
( name = `Ergo Screen E-II` )
( name = `Ergo Screen E-III` )
( name = `Flat Basic` )
( name = `Flat Future` )
( name = `Flat XL` )
( name = `Laser Professional Eco` )
( name = `Laser Basic` )
( name = `Laser Allround` )
( name = `Ultra Jet Super Color` )
( name = `Ultra Jet Mobile` )
( name = `Ultra Jet Super Highspeed` )
( name = `Multi Print` )
( name = `Multi Color` )
( name = `Cordless Mouse` )
( name = `Speed Mouse` )
( name = `Track Mouse` )
( name = `Ergonomic Keyboard` )
( name = `Internet Keyboard` )
( name = `Media Keyboard` )
( name = `Mousepad` )
( name = `Ergo Mousepad` )
( name = `Designer Mousepad` )
( name = `Universal card reader` )
( name = `Proctra X` )
( name = `Gladiator MX` )
( name = `Hurricane GX` )
( name = `Hurricane GX/LN` )
( name = `Photo Scan` )
( name = `Power Scan` )
( name = `Jet Scan Professional` )
( name = `Jet Scan Professional` )
( name = `Copymaster` )
( name = `Surround Sound` )
( name = `Blaster Extreme` )
( name = `Sound Booster` )
( name = `Lovely Sound 5.1 Wireless` )
( name = `Lovely Sound 5.1` )
( name = `Lovely Sound Stereo` )
( name = `Smart Office` )
( name = `Smart Design` )
( name = `Smart Network` )
( name = `Smart Multimedia` )
( name = `Smart Games` )
( name = `Smart Internet Antivirus` )
( name = `Smart Firewall` )
( name = `Smart Money` )
( name = `PC Lock` )
( name = `Notebook Lock` )
( name = `Web cam reality` )
( name = `Screen clean` )
( name = `Fabric bag professional` )
( name = `Wireless DSL Router` )
( name = `Wireless DSL Router / Repeater` )
( name = `Wireless DSL Router / Repeater and Print Server` )
( name = `USB Stick` )
( name = `Travel Adapter` )
( name = `Cordless Bluetooth Keyboard, english international` )
( name = `Flat XXL` )
( name = `Pocket Mouse` )
( name = `PC Power Station` )
( name = `Astro Laptop 1516` )
( name = `Astro Phone 6` )
( name = `Benda Laptop 1408` )
( name = `Bending Screen 21HD` )
( name = `Broad Screen 22HD` )
( name = `Cerdik Phone 7` )
( name = `Cepat Tablet 10.5` )
( name = `Cepat Tablet 8` )
( name = `Server Basic` )
( name = `Server Professional` )
( name = `Server Power Pro` )
( name = `Family PC Basic` )
( name = `Family PC Pro` )
( name = `Gaming Monster` )
( name = `Gaming Monster Pro` )
( name = `7" Widescreen Portable DVD Player w MP3` )
( name = `10" Portable DVD player` )
( name = `Portable DVD Player with 9" LCD Monitor` )
( name = `CD/DVD case: 264 sleeves` )
( name = `Audio/Video Cable Kit - 4m` )
( name = `Removable CD/DVD Laser Labels` )
( name = `Beam Breaker B-1` )
( name = `Beam Breaker B-2` )
( name = `Beam Breaker B-3` )
( name = `Play Movie` )
( name = `Record Movie` )
( name = `ITelo MusicStick` )
( name = `ITelo Jog-Mate` )
( name = `Power Pro Player 40` )
( name = `Power Pro Player 80` )
( name = `Flat Watch HD32` )
( name = `Flat Watch HD37` )
( name = `Flat Watch HD41` )
( name = `Copperberry` )
( name = `Silverberry` )
( name = `Goldberry` )
( name = `Platinberry` )
( name = `ITelO FlexTop I4000` )
( name = `ITelO FlexTop I6300c` )
( name = `ITelO FlexTop I9100` )
( name = `ITelO FlexTop I9800` )
( name = `Smartphone Leather Case` )
( name = `Smartphone Alpha` )
( name = `Mini Tablet` )
( name = `Camcorder View` )
( name = `Tablet Pouch` )
( name = `Tablet Pouch` )
( name = `e-Book Reader ReadMe` )
( name = `Smartphone Beta` )
( name = `Maxi Tablet` )
( name = `Flyer` ) ).
ENDMETHOD.
ENDCLASS.
More in sap.m
- Object Header - with Image — An Object Header will also make space for an image if one is specified, via a URL for the…
- List - Items Type — You can use the 'type' property of any list item, which inherits from ListItemBase contro…
- Standard List Item - Info — This list item offers a standardized user interface for list content with title and info.
- Object Header Responsive V — This is a responsive Object Header without a number and with a Title, 3 Statuses/Attribut…
- Table - Alternate Row Colors — Table with alternating light and dark background colors. Note: The effect of this feature…
- SelectList - with icons — A SelectList with icons.
- List - Selection — 'Single selection' forces the user to choose exactly one out of many items. With the 'mul…
- Table - Strict layout — This example demonstrates the Strict layout and the column resizing of the table.
- Popover — The Popover controls allows to show contextual information without leaving the current pa…
- InitialPage Pattern — The initial page floorplan allows the user to navigate to a single object to view or edit…
- Facet Filter - Simple — With the Facet Filter you can offer multiple filters ('facets') to assist the user in nar…
- Feed Input — This sample shows a standalone feed input with different settings.
On this page