Skip to content

Working shell bar with title mega menu sample #321

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/z2ui5_cl_demo_app_000.clas.abap
Original file line number Diff line number Diff line change
Expand Up @@ -1268,7 +1268,7 @@ CLASS z2ui5_cl_demo_app_000 IMPLEMENTATION.

panel->generic_tile(
header = 'Shell Bar'
* subheader = '7 Areas'
subheader = 'title mega menu'
press = client->_event( 'Z2UI5_CL_DEMO_APP_269' )
mode = 'LineMode'
class = 'sapUiTinyMarginEnd sapUiTinyMarginBottom'
Expand Down
40 changes: 35 additions & 5 deletions src/z2ui5_cl_demo_app_269.clas.abap
Original file line number Diff line number Diff line change
Expand Up @@ -4,21 +4,42 @@

PUBLIC SECTION.
INTERFACES z2ui5_if_app.

PROTECTED SECTION.
DATA check_initialized TYPE abap_bool.

METHODS display_view.
METHODS on_event.

DATA client TYPE REF TO z2ui5_if_client.
ENDCLASS.


CLASS z2ui5_cl_demo_app_269 IMPLEMENTATION.
METHOD z2ui5_if_app~main.
DATA(view) = z2ui5_cl_xml_view=>factory( ).
me->client = client.

IF check_initialized = abap_false.
check_initialized = abap_true.
display_view( ).
ENDIF.

on_event( ).
ENDMETHOD.

METHOD display_view.

DATA(view) = z2ui5_cl_xml_view=>factory( ).

view->shell_bar(
title = `Application Title`
secondTitle = `Short description`
title = `Shell Bar`

Check failure on line 35 in src/z2ui5_cl_demo_app_269.clas.abap

View check run for this annotation

abaplint / abaplint

Method importing parameter "NAVBUTTONPRESSED" does not exist

https://rules.abaplint.org/check_syntax

Check failure on line 35 in src/z2ui5_cl_demo_app_269.clas.abap

View check run for this annotation

abaplint / abaplint / abap_standard_readiness

Method importing parameter "NAVBUTTONPRESSED" does not exist

https://rules.abaplint.org/check_syntax

Check failure on line 35 in src/z2ui5_cl_demo_app_269.clas.abap

View check run for this annotation

abaplint / abaplint / abap_cloud_readiness

Method importing parameter "NAVBUTTONPRESSED" does not exist

https://rules.abaplint.org/check_syntax
secondTitle = `with title mega menu`
homeIcon = `https://sapui5.hana.ondemand.com/sdk/resources/sap/ui/documentation/sdk/images/logo_sap.png`
showCopilot = abap_true
shownavbutton = xsdbool( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL )
showSearch = abap_true
showNotifications = abap_true
notificationsNumber = `2`
navbuttonpressed = client->_event( 'BACK' )
)->_generic( name = `menu`
ns = `f`
)->_generic( name = `Menu`
Expand All @@ -30,10 +51,19 @@
)->get_parent(
)->_generic( name = `profile`
ns = `f`
)->avatar( initials = 'UI' ).
)->avatar( ns = `f`

Check failure on line 54 in src/z2ui5_cl_demo_app_269.clas.abap

View check run for this annotation

abaplint / abaplint

Method importing parameter "NS" does not exist

https://rules.abaplint.org/check_syntax

Check failure on line 54 in src/z2ui5_cl_demo_app_269.clas.abap

View check run for this annotation

abaplint / abaplint / abap_standard_readiness

Method importing parameter "NS" does not exist

https://rules.abaplint.org/check_syntax

Check failure on line 54 in src/z2ui5_cl_demo_app_269.clas.abap

View check run for this annotation

abaplint / abaplint / abap_cloud_readiness

Method importing parameter "NS" does not exist

https://rules.abaplint.org/check_syntax
initials = 'UI' ).

DATA(xml) = view->stringify( ).

client->view_display( xml ).

ENDMETHOD.

METHOD on_event.
CASE client->get( )-event.
WHEN 'BACK'.
client->nav_app_leave( ).
ENDCASE.
ENDMETHOD.
ENDCLASS.