-
Notifications
You must be signed in to change notification settings - Fork 18
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
7c0f9a2
commit 8b65698
Showing
3 changed files
with
113 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
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,89 @@ | ||
CLASS z2ui5_cl_demo_app_149 DEFINITION PUBLIC. | ||
|
||
PUBLIC SECTION. | ||
|
||
INTERFACES z2ui5_if_app. | ||
|
||
DATA client TYPE REF TO z2ui5_if_client. | ||
|
||
METHODS ui5_display. | ||
METHODS ui5_event. | ||
METHODS ui5_callback. | ||
|
||
PROTECTED SECTION. | ||
PRIVATE SECTION. | ||
ENDCLASS. | ||
|
||
|
||
|
||
CLASS z2ui5_cl_demo_app_149 IMPLEMENTATION. | ||
|
||
|
||
METHOD ui5_event. | ||
|
||
CASE client->get( )-event. | ||
|
||
WHEN 'POPUP'. | ||
DATA(lo_app) = z2ui5_cl_popup_html=>factory( `<h2>HTML Links</h2>` && |\n| && | ||
`<p>HTML links are defined with the a tag:</p>` && |\n| && | ||
|\n| && | ||
`<a href="https://www.w3schools.com">This is a link</a>` ). | ||
client->nav_app_call( lo_app ). | ||
|
||
WHEN 'BACK'. | ||
client->nav_app_leave( client->get_app( client->get( )-s_draft-id_prev_app_stack ) ). | ||
|
||
ENDCASE. | ||
|
||
ENDMETHOD. | ||
|
||
|
||
METHOD ui5_display. | ||
|
||
DATA(view) = z2ui5_cl_xml_view=>factory( ). | ||
view->shell( | ||
)->page( | ||
title = 'abap2UI5 - Popup HTML' | ||
navbuttonpress = client->_event( val = 'BACK' ) | ||
shownavbutton = xsdbool( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ) | ||
)->header_content( | ||
)->link( | ||
text = 'Source_Code' | ||
target = '_blank' | ||
|
||
)->get_parent( | ||
)->button( | ||
text = 'Open Popup...' | ||
press = client->_event( 'POPUP' ) ). | ||
|
||
client->view_display( view->stringify( ) ). | ||
|
||
ENDMETHOD. | ||
|
||
|
||
METHOD z2ui5_if_app~main. | ||
|
||
me->client = client. | ||
|
||
IF client->get( )-check_on_navigated = abap_true. | ||
ui5_display( ). | ||
ui5_callback( ). | ||
RETURN. | ||
ENDIF. | ||
|
||
ui5_event( ). | ||
|
||
ENDMETHOD. | ||
|
||
METHOD ui5_callback. | ||
|
||
TRY. | ||
DATA(lo_prev) = client->get_app( client->get( )-s_draft-id_prev_app ). | ||
DATA(lo_dummy) = CAST z2ui5_cl_popup_to_inform( lo_prev ). | ||
client->message_box_display( `callback after popup to inform` ). | ||
CATCH cx_root. | ||
ENDTRY. | ||
|
||
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_DEMO_APP_149</CLSNAME> | ||
<LANGU>E</LANGU> | ||
<DESCRIPT>popup - popup_html</DESCRIPT> | ||
<STATE>1</STATE> | ||
<CLSCCINCL>X</CLSCCINCL> | ||
<FIXPT>X</FIXPT> | ||
<UNICODE>X</UNICODE> | ||
</VSEOCLASS> | ||
</asx:values> | ||
</asx:abap> | ||
</abapGit> |