-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
138d908
commit b71f539
Showing
2 changed files
with
81 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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> |