Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
oblomov-dev committed Feb 20, 2024
1 parent 0f30004 commit 503e793
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 18 deletions.
2 changes: 1 addition & 1 deletion src/z2ui5_cl_demo_app_066.clas.abap
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ CLASS z2ui5_cl_demo_app_066 IMPLEMENTATION.
view_display_detail( ).

WHEN 'TEST'.
client->message_toast_display( mv_input_master ).
client->message_toast_display( `output: ` && mv_input_master ).

WHEN `NEST_TEST`.

Expand Down
37 changes: 20 additions & 17 deletions src/z2ui5_cl_demo_app_084.clas.abap
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
CLASS Z2UI5_CL_DEMO_APP_084 DEFINITION
CLASS z2ui5_cl_demo_app_084 DEFINITION
PUBLIC
CREATE PUBLIC .

PUBLIC SECTION.

INTERFACES Z2UI5_if_app .
INTERFACES z2ui5_if_app .

"string - constraints
DATA: mv_maxlength_string TYPE string,
Expand Down Expand Up @@ -54,18 +54,19 @@ CLASS Z2UI5_CL_DEMO_APP_084 DEFINITION
group TYPE string,
END OF ty_msg .

DATA mv_input_master TYPE string.
DATA:
t_msg TYPE STANDARD TABLE OF ty_msg WITH EMPTY KEY .
DATA check_initialized TYPE abap_bool .

METHODS Z2UI5_display_view .
METHODS Z2UI5_display_popup .
METHODS Z2UI5_display_popover
METHODS z2ui5_display_view .
METHODS z2ui5_display_popup .
METHODS z2ui5_display_popover
IMPORTING
!id TYPE string .
PROTECTED SECTION.

DATA client TYPE REF TO Z2UI5_if_client.
DATA client TYPE REF TO z2ui5_if_client.

PRIVATE SECTION.
ENDCLASS.
Expand All @@ -75,9 +76,9 @@ ENDCLASS.
CLASS Z2UI5_CL_DEMO_APP_084 IMPLEMENTATION.


METHOD Z2UI5_display_popover.
METHOD z2ui5_display_popover.

DATA(popup) = Z2UI5_cl_xml_view=>factory_popup( ).
DATA(popup) = z2ui5_cl_xml_view=>factory_popup( ).

popup = popup->popover(
placement = `Top`
Expand All @@ -100,9 +101,9 @@ CLASS Z2UI5_CL_DEMO_APP_084 IMPLEMENTATION.
ENDMETHOD.


METHOD Z2UI5_display_popup.
METHOD z2ui5_display_popup.

DATA(popup) = Z2UI5_cl_xml_view=>factory_popup( ).
DATA(popup) = z2ui5_cl_xml_view=>factory_popup( ).

popup = popup->dialog(
title = `Messages`
Expand Down Expand Up @@ -134,7 +135,7 @@ CLASS Z2UI5_CL_DEMO_APP_084 IMPLEMENTATION.
ENDMETHOD.


METHOD Z2UI5_display_view.
METHOD z2ui5_display_view.

DATA(view) = z2ui5_cl_xml_view=>factory( ).

Expand All @@ -161,8 +162,10 @@ CLASS Z2UI5_CL_DEMO_APP_084 IMPLEMENTATION.
)->label( text = `maxLength (5)`
)->input( id = `testINPUT` value = `{path:'` && client->_bind_edit( val = mv_maxlength_string path = abap_true ) && `',type: 'sap.ui.model.type.String', constraints:{ maxLength: 5 } }`
editable = abap_true
class = `sapUiTinyMarginBeginEnd` )->get_parent(

class = `sapUiTinyMarginBeginEnd`
)->input( id = `inputMain`
value = `{path:'` && client->_bind_edit( val = mv_input_master path = abap_true ) && `',type:'sap.ui.model.type.String', constraints: { maxLength: 3 } }`
)->get_parent(
)->hbox( class = `sapUiTinyMarginTopBottom` alignitems = `Center`
)->label( text = `minLength (3)`
)->input( value = `{path:'` && client->_bind_edit( val = mv_minlength_string path = abap_true ) && `',type: 'sap.ui.model.type.String', constraints:{ minLength: 3 } }`
Expand Down Expand Up @@ -239,20 +242,20 @@ CLASS Z2UI5_CL_DEMO_APP_084 IMPLEMENTATION.
ENDMETHOD.


METHOD Z2UI5_if_app~main.
METHOD z2ui5_if_app~main.

me->client = client.

IF check_initialized = abap_false.
check_initialized = abap_true.
Z2UI5_display_view( ).
z2ui5_display_view( ).
ENDIF.

CASE client->get( )-event.
WHEN 'POPUP'.
Z2UI5_display_popup( ).
z2ui5_display_popup( ).
WHEN 'POPOVER'.
Z2UI5_display_popover( `test` ).
z2ui5_display_popover( `test` ).
WHEN 'BACK'.
client->nav_app_leave( client->get_app( client->get( )-s_draft-id_prev_app_stack ) ).
ENDCASE.
Expand Down

0 comments on commit 503e793

Please sign in to comment.