Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
oblomov-dev committed Sep 29, 2024
1 parent 138d908 commit b71f539
Show file tree
Hide file tree
Showing 2 changed files with 81 additions and 0 deletions.
65 changes: 65 additions & 0 deletions src/01/z2ui5_cl_cc_sample_favicon.clas.abap
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
CLASS z2ui5_cl_cc_sample_favicon DEFINITION PUBLIC.

PUBLIC SECTION.

INTERFACES z2ui5_if_app.

DATA favicon TYPE string.
DATA check_initialized TYPE abap_bool.

PROTECTED SECTION.
data client type ref to z2ui5_if_client.
METHODS display_view.
PRIVATE SECTION.
ENDCLASS.



CLASS Z2UI5_CL_CC_SAMPLE_FAVICON IMPLEMENTATION.


METHOD display_view.

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

DATA(tmp) = view->_z2ui5( )->favicon( favicon = client->_bind_edit( favicon )
)->shell(
)->page(
title = 'abap2UI5 - Change Tab Favicon'
navbuttonpress = client->_event( val = 'BACK' )
shownavbutton = xsdbool( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL )
)->simple_form( title = 'Form Title' editable = abap_true
)->content( 'form'
)->label( 'favicon'
)->input( client->_bind_edit( favicon )
).

client->view_display( tmp->stringify( ) ).

ENDMETHOD.


METHOD z2ui5_if_app~main.

me->client = client.

IF check_initialized = abap_false.
check_initialized = abap_true.
favicon = `https://cdn.jsdelivr.net/gh/abap2UI5/abap2UI5/resources/abap2ui5.png`.

display_view( ).

ENDIF.

CASE client->get( )-event.

WHEN 'SET_VIEW'.
display_view( ).

WHEN 'BACK'.
client->nav_app_leave( client->get_app( client->get( )-s_draft-id_prev_app_stack ) ).

ENDCASE.

ENDMETHOD.
ENDCLASS.
16 changes: 16 additions & 0 deletions src/01/z2ui5_cl_cc_sample_favicon.clas.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<?xml version="1.0" encoding="utf-8"?>
<abapGit version="v1.0.0" serializer="LCL_OBJECT_CLAS" serializer_version="v1.0.0">
<asx:abap xmlns:asx="http://www.sap.com/abapxml" version="1.0">
<asx:values>
<VSEOCLASS>
<CLSNAME>Z2UI5_CL_CC_SAMPLE_FAVICON</CLSNAME>
<LANGU>E</LANGU>
<DESCRIPT>basic - favicon</DESCRIPT>
<STATE>1</STATE>
<CLSCCINCL>X</CLSCCINCL>
<FIXPT>X</FIXPT>
<UNICODE>X</UNICODE>
</VSEOCLASS>
</asx:values>
</asx:abap>
</abapGit>

0 comments on commit b71f539

Please sign in to comment.