-
Notifications
You must be signed in to change notification settings - Fork 16
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
d06df23
commit 4dc7bac
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,90 @@ | ||
CLASS z2ui5_cl_demo_app_165 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_165 IMPLEMENTATION. | ||
|
||
|
||
METHOD ui5_event. | ||
|
||
CASE client->get( )-event. | ||
|
||
WHEN 'POPUP'. | ||
TRY. | ||
DATA(lv_dummy) = 1 / 0. | ||
CATCH cx_root INTO DATA(lx). | ||
ENDTRY. | ||
DATA(lo_app) = z2ui5_cl_popup_error=>factory( lx ). | ||
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 Error' | ||
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_165</CLSNAME> | ||
<LANGU>E</LANGU> | ||
<DESCRIPT>popup - popup_error</DESCRIPT> | ||
<STATE>1</STATE> | ||
<CLSCCINCL>X</CLSCCINCL> | ||
<FIXPT>X</FIXPT> | ||
<UNICODE>X</UNICODE> | ||
</VSEOCLASS> | ||
</asx:values> | ||
</asx:abap> | ||
</abapGit> |