-
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
15f6b1d
commit efff523
Showing
5 changed files
with
105 additions
and
23 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
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,66 @@ | ||
CLASS z2ui5_cl_demo_app_071 DEFINITION PUBLIC. | ||
|
||
PUBLIC SECTION. | ||
|
||
INTERFACES z2ui5_if_app. | ||
|
||
TYPES: | ||
BEGIN OF s_combobox, | ||
key TYPE string, | ||
text TYPE string, | ||
END OF s_combobox. | ||
TYPES ty_t_combo TYPE STANDARD TABLE OF s_combobox WITH EMPTY KEY. | ||
|
||
DATA mv_set_size_limit TYPE i VALUE 100. | ||
DATA mv_combo_number TYPE i VALUE 105. | ||
DATA check_initialized TYPE abap_bool. | ||
|
||
PROTECTED SECTION. | ||
PRIVATE SECTION. | ||
ENDCLASS. | ||
|
||
|
||
|
||
CLASS z2ui5_cl_demo_app_071 IMPLEMENTATION. | ||
|
||
|
||
METHOD z2ui5_if_app~main. | ||
|
||
CASE client->get( )-event. | ||
WHEN 'BACK'. | ||
client->nav_app_leave( ). | ||
RETURN. | ||
ENDCASE. | ||
|
||
client->message_toast_display( `View updated` ). | ||
|
||
DATA(lt_combo) = VALUE ty_T_combo( ). | ||
DO mv_combo_number TIMES. | ||
INSERT VALUE #( key = sy-index text = sy-index ) INTO TABLE lt_combo. | ||
ENDDO. | ||
|
||
DATA(view) = z2ui5_cl_xml_view=>factory( ). | ||
client->view_display( val = view->shell( | ||
)->page( | ||
title = 'abap2UI5 - First Example' | ||
navbuttonpress = client->_event( val = 'BACK' s_ctrl = VALUE #( check_view_destroy = abap_true ) ) | ||
shownavbutton = xsdbool( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ) | ||
)->simple_form( title = 'Form Title' editable = abap_true | ||
)->content( 'form' | ||
)->title( 'Input' | ||
)->label( 'Link' | ||
)->label( 'setSizeLimit' | ||
)->input( value = client->_bind_edit( mv_set_size_limit ) | ||
)->label( 'Number of Entries' | ||
)->input( value = client->_bind_edit( mv_combo_number ) | ||
)->label( 'demo' | ||
)->combobox( items = client->_bind_local( lt_combo ) | ||
)->item( key = '{KEY}' text = '{TEXT}' | ||
)->get_parent( )->get_parent( | ||
)->button( | ||
text = 'update' | ||
press = client->_event( val = 'UPDATE' ) | ||
)->stringify( ) t_config = VALUE #( ( n = `setSizeLimit` v = mv_set_size_limit ) ) ). | ||
|
||
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_071</CLSNAME> | ||
<LANGU>E</LANGU> | ||
<DESCRIPT>setSizeLimit</DESCRIPT> | ||
<STATE>1</STATE> | ||
<CLSCCINCL>X</CLSCCINCL> | ||
<FIXPT>X</FIXPT> | ||
<UNICODE>X</UNICODE> | ||
</VSEOCLASS> | ||
</asx:values> | ||
</asx:abap> | ||
</abapGit> |