abap2UI5/src/z2ui5_cl_app_hello_world.clas.abap
oblomov fdd14c41cb
new version (#309)
* updates

* abaplint

* update

* commit

* abaplint update

* update

* cursor

* popups

* popover

* illsutrated message

* error

* update

* Update README.md

* Update README.md

* update

* update

* update

* update

* update

* update

* update

* update

* update

* update

* update

* update

* update

* update

* update

* update

* update

* update

* update table

* update

* Create LINKS.md

* Update LINKS.md

* update

* Update LINKS.md

* Update LINKS.md

* Update LINKS.md

* Update LINKS.md

* update

* Update LINKS.md

* popups

* update

* update

* update

* update

* abaplint

* update

* Update README.md

* Update LINKS.md

* Update LINKS.md

* update

* update

* update

* Update abaplint.jsonc

* update downport ready

* update

* Update LINKS.md

* Update LINKS.md

* Update README.md

* update
2023-06-26 19:17:19 +02:00

47 lines
1.3 KiB
ABAP

CLASS z2ui5_cl_app_hello_world DEFINITION PUBLIC.
PUBLIC SECTION.
INTERFACES z2ui5_if_app.
DATA product TYPE string.
DATA quantity TYPE string.
DATA check_initialized TYPE abap_bool.
ENDCLASS.
CLASS z2ui5_cl_app_hello_world IMPLEMENTATION.
METHOD z2ui5_if_app~main.
IF check_initialized = abap_false.
check_initialized = abap_true.
product = 'tomatos'.
quantity = '500'.
ENDIF.
CASE client->get( )-event.
WHEN 'BUTTON_POST'.
client->message_toast_display( |{ product } { quantity } - send to the server| ).
ENDCASE.
client->view_display( z2ui5_cl_xml_view=>factory( client
)->shell(
)->page( title = 'abap2UI5 - z2ui5_cl_app_hello_world'
)->simple_form( title = 'Hello World' editable = abap_true
)->content( ns = `form`
)->title( 'Make an input here and send it to the server...'
)->label( 'quantity'
)->input( value = client->_bind_edit( quantity )
)->label( 'product'
)->input( value = product
enabled = abap_false
)->button( text = 'post'
press = client->_event( 'BUTTON_POST' )
)->stringify( ) ).
ENDMETHOD.
ENDCLASS.