mirror of
https://github.com/abap2UI5/abap2UI5.git
synced 2025-04-29 22:09:24 +08:00
parent
641aad97a3
commit
a1ea071907
|
@ -429,7 +429,7 @@ CLASS z2ui5_cl_fw_binding IMPLEMENTATION.
|
|||
|
||||
RAISE EXCEPTION TYPE z2ui5_cx_util_error
|
||||
EXPORTING
|
||||
val = `BINDING_ERROR - No class attribute for binding found - Please check if the binded values are public attributes of your class`.
|
||||
val = `BINDING_ERROR - No class attribute for binding found - Please check if the binded values are public attributes of your class or switch to bind_local`.
|
||||
|
||||
ENDMETHOD.
|
||||
|
||||
|
|
56
src/03/01/z2ui5_cl_popup_file_upload.clas.abap
Normal file
56
src/03/01/z2ui5_cl_popup_file_upload.clas.abap
Normal file
|
@ -0,0 +1,56 @@
|
|||
CLASS z2ui5_cl_popup_file_upload DEFINITION
|
||||
PUBLIC
|
||||
FINAL
|
||||
CREATE PUBLIC.
|
||||
|
||||
PUBLIC SECTION.
|
||||
INTERFACES z2ui5_if_app.
|
||||
|
||||
DATA client TYPE REF TO z2ui5_if_client.
|
||||
data mt_tab type string.
|
||||
METHODS display.
|
||||
|
||||
PROTECTED SECTION.
|
||||
PRIVATE SECTION.
|
||||
ENDCLASS.
|
||||
|
||||
|
||||
|
||||
CLASS Z2UI5_CL_POPUP_FILE_UPLOAD IMPLEMENTATION.
|
||||
|
||||
|
||||
METHOD display.
|
||||
|
||||
DATA(popup) = Z2UI5_cl_xml_view=>factory_popup( client )->dialog( 'abap2UI5 - Popup to select entry'
|
||||
)->table(
|
||||
mode = 'SingleSelectLeft'
|
||||
items = client->_bind_edit( mt_tab )
|
||||
)->columns(
|
||||
)->column( )->text( 'Title' )->get_parent(
|
||||
)->column( )->text( 'Color' )->get_parent(
|
||||
)->column( )->text( 'Info' )->get_parent(
|
||||
)->column( )->text( 'Description' )->get_parent(
|
||||
)->get_parent(
|
||||
)->items( )->column_list_item( selected = '{SELKZ}'
|
||||
)->cells(
|
||||
)->text( '{TITLE}'
|
||||
)->text( '{VALUE}'
|
||||
)->text( '{INFO}'
|
||||
)->text( '{DESCR}'
|
||||
)->get_parent( )->get_parent( )->get_parent( )->get_parent(
|
||||
)->footer( )->overflow_toolbar(
|
||||
)->toolbar_spacer(
|
||||
)->button(
|
||||
text = 'continue'
|
||||
press = client->_event( 'POPUP_TABLE_CONTINUE' )
|
||||
type = 'Emphasized' ).
|
||||
|
||||
client->popup_display( popup->stringify( ) ).
|
||||
|
||||
ENDMETHOD.
|
||||
|
||||
|
||||
METHOD z2ui5_if_app~main.
|
||||
|
||||
ENDMETHOD.
|
||||
ENDCLASS.
|
16
src/03/01/z2ui5_cl_popup_file_upload.clas.xml
Normal file
16
src/03/01/z2ui5_cl_popup_file_upload.clas.xml
Normal file
|
@ -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_POPUP_FILE_UPLOAD</CLSNAME>
|
||||
<LANGU>E</LANGU>
|
||||
<DESCRIPT>ui - popup file upload</DESCRIPT>
|
||||
<STATE>1</STATE>
|
||||
<CLSCCINCL>X</CLSCCINCL>
|
||||
<FIXPT>X</FIXPT>
|
||||
<UNICODE>X</UNICODE>
|
||||
</VSEOCLASS>
|
||||
</asx:values>
|
||||
</asx:abap>
|
||||
</abapGit>
|
|
@ -9,52 +9,35 @@ CLASS z2ui5_cl_popup_to_inform DEFINITION
|
|||
|
||||
CLASS-METHODS factory
|
||||
IMPORTING
|
||||
i_question_text TYPE string
|
||||
i_title TYPE string DEFAULT `Title`
|
||||
i_icon TYPE string DEFAULT 'sap-icon://question-mark'
|
||||
i_button_text_confirm TYPE string DEFAULT `OK`
|
||||
i_button_text_cancel TYPE string DEFAULT `Cancel`
|
||||
i_text TYPE string
|
||||
i_title TYPE string DEFAULT `Title`
|
||||
i_icon TYPE string DEFAULT 'sap-icon://question-mark'
|
||||
i_button_text TYPE string DEFAULT `OK`
|
||||
RETURNING
|
||||
VALUE(r_result) TYPE REF TO z2ui5_cl_popup_to_inform.
|
||||
|
||||
METHODS check_result
|
||||
RETURNING
|
||||
VALUE(result) TYPE abap_bool.
|
||||
VALUE(r_result) TYPE REF TO z2ui5_cl_popup_to_inform.
|
||||
|
||||
PROTECTED SECTION.
|
||||
DATA client TYPE REF TO z2ui5_if_client.
|
||||
|
||||
DATA title TYPE string.
|
||||
DATA icon TYPE string.
|
||||
DATA question_text TYPE string.
|
||||
DATA button_text_confirm TYPE string.
|
||||
DATA button_text_cancel TYPE string.
|
||||
DATA check_initialized TYPE abap_bool.
|
||||
DATA check_result_confirmed TYPE abap_bool.
|
||||
METHODS view_display.
|
||||
PRIVATE SECTION.
|
||||
ENDCLASS.
|
||||
|
||||
|
||||
|
||||
CLASS Z2UI5_CL_POPUP_TO_INFORM IMPLEMENTATION.
|
||||
|
||||
|
||||
METHOD check_result.
|
||||
|
||||
result = check_result_confirmed.
|
||||
|
||||
ENDMETHOD.
|
||||
|
||||
CLASS z2ui5_cl_popup_to_inform IMPLEMENTATION.
|
||||
|
||||
METHOD factory.
|
||||
|
||||
r_result = new #( ).
|
||||
r_result = NEW #( ).
|
||||
r_result->title = i_title.
|
||||
r_result->icon = i_icon.
|
||||
r_result->question_text = i_question_text.
|
||||
r_result->button_text_confirm = i_button_text_confirm.
|
||||
r_result->button_text_cancel = i_button_text_cancel.
|
||||
r_result->question_text = i_text.
|
||||
r_result->button_text_confirm = i_button_text.
|
||||
|
||||
ENDMETHOD.
|
||||
|
||||
|
@ -70,9 +53,6 @@ CLASS Z2UI5_CL_POPUP_TO_INFORM IMPLEMENTATION.
|
|||
)->get_parent( )->get_parent(
|
||||
)->footer( )->overflow_toolbar(
|
||||
)->toolbar_spacer(
|
||||
)->button(
|
||||
text = button_text_cancel
|
||||
press = client->_event( 'BUTTON_CANCEL' )
|
||||
)->button(
|
||||
text = button_text_confirm
|
||||
press = client->_event( 'BUTTON_CONFIRM' )
|
||||
|
@ -95,11 +75,6 @@ CLASS Z2UI5_CL_POPUP_TO_INFORM IMPLEMENTATION.
|
|||
|
||||
CASE client->get( )-event.
|
||||
WHEN `BUTTON_CONFIRM`.
|
||||
check_result_confirmed = abap_true.
|
||||
client->popup_destroy( ).
|
||||
client->nav_app_leave( client->get_app( client->get( )-s_draft-id_prev_app_stack ) ).
|
||||
WHEN `BUTTON_CANCEL`.
|
||||
check_result_confirmed = abap_false.
|
||||
client->popup_destroy( ).
|
||||
client->nav_app_leave( client->get_app( client->get( )-s_draft-id_prev_app_stack ) ).
|
||||
ENDCASE.
|
||||
|
|
Loading…
Reference in New Issue
Block a user