Flexible Column Layout Landmark Info For Columns
Flexible Column Layout where the first and the last columns have custom Landmark Info
- Class
z2ui5_cl_smpc_app_449- Repository
- abap2UI5/samples-controls
- Ports
sap.f.sample.FlexibleColumnLayoutLandmarkInfo- UI5 libraries
- sap.f, sap.m, sap.ui.core
- Lowest UI5 release
- 1.95
- In the browser
- Runs in the playground
- Controls it builds
- sap.f.FlexibleColumnLayout, sap.f.FlexibleColumnLayoutAccessibleLandmarkInfo, sap.m.Button, sap.m.Page, sap.m.VBox, sap.ui.core.mvc.View
The class
" @keywords flexiblecolumnlayout flexible column layout sap.f flexiblecolumnlayoutlandmarkinfo flexiblecolumnlayoutaccessiblelandmarkinfo button vbox
" @summary Flexible Column Layout where the first and the last columns have custom Landmark Info
" @origin sap.f.sample.FlexibleColumnLayoutLandmarkInfo - https://sdk.openui5.org/entity/sap.f.FlexibleColumnLayout/sample/sap.f.sample.FlexibleColumnLayoutLandmarkInfo (status: generated - machine-written, not yet reviewed)
CLASS z2ui5_cl_smpc_app_449 DEFINITION PUBLIC.
PUBLIC SECTION.
INTERFACES z2ui5_if_app.
DATA layout TYPE string VALUE `OneColumn`.
PROTECTED SECTION.
DATA client TYPE REF TO z2ui5_if_client.
METHODS view_display.
METHODS on_event.
PRIVATE SECTION.
ENDCLASS.
CLASS z2ui5_cl_smpc_app_449 IMPLEMENTATION.
METHOD z2ui5_if_app~main.
me->client = client.
IF client->check_on_navigated( ).
view_display( ).
ELSEIF client->check_on_event( ).
on_event( ).
ENDIF.
ENDMETHOD.
METHOD view_display.
" the three column views (List/Detail/DetailDetail) are inlined into one view;
" the original's nested mvc:XMLView reference in beginColumnPages is dropped
" (app 234 precedent)
DATA(view) = z2ui5_cl_ui5_view_builder=>factory( ).
view->ele( n = `View` ns = `mvc`
)->a( n = `xmlns` v = `sap.m`
)->a( n = `xmlns:mvc` v = `sap.ui.core.mvc`
)->a( n = `xmlns:f` v = `sap.f`
)->a( n = `displayBlock` v = `true`
)->a( n = `height` v = `100%`
" the controller's setLayout( ) calls become one two-way bound layout property
)->ele( n = `FlexibleColumnLayout` ns = `f`
)->a( n = `id` v = `fcl`
)->a( n = `layout` v = client->_bind( layout )
)->ele( n = `landmarkInfo` ns = `f`
)->tag( n = `FlexibleColumnLayoutAccessibleLandmarkInfo` ns = `f`
)->a( n = `firstColumnLabel` v = `Custom Label For First Column`
)->a( n = `lastColumnLabel` v = `Test Label for Last Column`
)->end(
)->ele( n = `beginColumnPages` ns = `f`
)->ele( `Page`
)->a( n = `id` v = `listPage`
)->a( n = `title` v = `First Column`
)->tag( `Button`
)->a( n = `class` v = `sapUiTinyMargin`
)->a( n = `text` v = `Navigate to Middle Column`
)->a( n = `press` v = client->_event( `SET_DETAIL_PAGE` )
)->end(
)->end(
)->ele( n = `midColumnPages` ns = `f`
)->ele( `Page`
)->a( n = `id` v = `detailPage`
)->a( n = `title` v = `Middle Column`
)->ele( `VBox`
)->tag( `Button`
)->a( n = `class` v = `sapUiTinyMargin`
)->a( n = `text` v = `Navigate To First Column`
)->a( n = `press` v = client->_event( `SET_LIST_PAGE` )
)->tag( `Button`
)->a( n = `class` v = `sapUiTinyMargin`
)->a( n = `text` v = `Navigate To Last Column`
)->a( n = `press` v = client->_event( `SET_DETAIL_DETAIL_PAGE` )
)->end(
)->end(
)->end(
)->ele( n = `endColumnPages` ns = `f`
)->ele( `Page`
)->a( n = `id` v = `detailDetailPage`
)->a( n = `title` v = `Last Column`
)->a( n = `backgroundDesign` v = `Transparent`
)->tag( `Button`
)->a( n = `class` v = `sapUiTinyMargin`
)->a( n = `text` v = `Navigate to Middle Column`
)->a( n = `press` v = client->_event( `SET_DETAIL_PAGE` ) ).
client->view_display( view->stringify( ) ).
ENDMETHOD.
METHOD on_event.
CASE client->get_event( ).
WHEN `SET_LIST_PAGE`.
layout = `OneColumn`.
WHEN `SET_DETAIL_PAGE`.
layout = `TwoColumnsMidExpanded`.
WHEN `SET_DETAIL_DETAIL_PAGE`.
layout = `ThreeColumnsEndExpanded`.
ENDCASE.
ENDMETHOD.
ENDCLASS.