Commit Graph

12 Commits

Author SHA1 Message Date
oblomov-dev
30f8cec526
New frontend test (#1466)
* update

* update ui52abap auto taransformation

* update

* commit changes

* update

* update

* update

* update

* update

* update

* update

* update

* update

* update

* update

* update

* update

* update

* update

* update

* update

* update

* Update abaplint.jsonc

* update

* update

* update

* update

* update

* update

* update

* update

* Update abaplint.jsonc

* update

* update

* update

* update

* update
2024-10-01 00:25:48 +02:00
oblomov-dev
1fba55457c
session-stickyness (#1435)
* Added Component and Session Stateful (#1433)

- Added Component support (TODO refactoring sap.z2ui5 and view handling -> instead of .placeAt use mainView of component manifest)
- Added Session Stateful support

*add the following lines to your REST handler in order to support stateful session handling*
'''abap
    if attributes-stateful-switched = abap_true.
      server->set_session_stateful( stateful = attributes-stateful-active ).
    endif.
'''

And here is an ABAP example class for testing session handling
'''abap
"! <p class="shorttext synchronized" lang="en">Session Demo</p>
class z2ui5_cl_demo_app_session definition
  public
  create public.

  public section.
    interfaces z2ui5_if_app.
    data instance_counter type i read-only.
    data check_initialized type abap_bool read-only.
    data session_is_stateful type abap_bool read-only.
    data session_text type string read-only.
  protected section.
  private section.
    methods initialize_view
      importing
        client type ref to z2ui5_if_client.
    methods on_event
      importing
        client type ref to z2ui5_if_client.

    methods set_session_stateful
      importing
        client   type ref to z2ui5_if_client
        stateful type abap_bool.
endclass.

class z2ui5_cl_demo_app_session implementation.
  method z2ui5_if_app~main.
    if check_initialized = abap_false.
      check_initialized = abap_true.
      initialize_view( client ).
    endif.

    on_event( client ).
  endmethod.

  method initialize_view.
    set_session_stateful( client = client stateful = abap_true ).

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

    data(page) = view->shell( )->page(
      title          = `abap2UI5 - Sample: Sticky Session`
      navbuttonpress = client->_event( 'BACK' )
      shownavbutton  = xsdbool( client->get( )-s_draft-id_prev_app_stack is not initial ) ).

    data(vbox) = page->vbox( ).
    vbox->info_label( text = client->_bind( session_text ) ).

    data(hbox) = vbox->hbox( alignitems = 'Center' ).
    hbox->label( text = 'press button to increment counter in backend session' class = 'sapUiTinyMarginEnd' ).
    hbox->button(
      text  = client->_bind( instance_counter )
      press = client->_event( 'INCREMENT' )
      type = 'Emphasized' ).

    hbox = vbox->hbox( ).
    hbox->button(
      text  = 'End session'
      press = client->_event( 'END_SESSION' ) ).

    hbox->button(
      text  = 'Start session again'
      press = client->_event( 'START_SESSION' ) ).

    client->view_display( view->stringify( ) ).
  endmethod.

  method on_event.
    case client->get( )-event.
      when 'BACK'.
        client->nav_app_leave( ).
      when 'INCREMENT'.
        instance_counter = lcl_static_container=>increment( ).
        client->view_model_update( ).
      when 'END_SESSION'.
        set_session_stateful( client = client stateful = abap_false ).
      when 'START_SESSION'.
        set_session_stateful( client = client stateful = abap_true ).
    endcase.
  endmethod.

  method set_session_stateful.
    client->set_session_stateful( stateful ).
    session_is_stateful = stateful.
    if stateful = abap_true.
      session_text = 'Session ON (stateful)'.
    else.
      session_text = 'Session OFF (stateless)'.
    endif.
    client->view_model_update( ).
  endmethod.
endclass.
'''

* Update z2ui5_cl_core_http_get.clas.abap (#1434)

updated to reflect latest changes (sorry some local changes were los)

* lint fix

* lint fix

* xml fix

---------

Co-authored-by: Michael Zinnöcker <29286643+mzinnoecker@users.noreply.github.com>
2024-09-16 16:45:41 +02:00
oblomov-dev
622c19c8b6
Refactoring (#1417)
* refactoring

* update

* Update README.md

* Update README.md

* Update README.md

* Update README.md

* Update README.md

* Update z2ui5_cl_core_http_get2.clas.abap

* lint fix

* update

* Update abaplint.jsonc
2024-09-12 00:35:07 +02:00
oblomov-dev
8a63b0c601
abaplint rules (#1375) 2024-09-06 15:57:39 +02:00
oblomov-dev
30bcab4843
Update abaplint.jsonc (#1371)
Some checks are pending
build_downport / build_downport (push) Waiting to run
2024-09-05 07:21:05 +02:00
oblomov-dev
a93dd6fc16
Update abaplint.jsonc (#1367)
* Update abaplint.jsonc

* Update abaplint.jsonc

* Update abaplint.jsonc

* update

* update
2024-09-04 22:10:48 +02:00
oblomov-dev
2d1608ccc5
Update abaplint (#1366)
* update abaplint

* update
2024-09-04 21:44:13 +02:00
oblomov
f3aa88ce7d
small_fixes_and_setup (#1343)
Some checks are pending
build_downport / build_downport (push) Waiting to run
* small_fixes_and_setup

* update

* Update abaplint.jsonc
2024-08-27 17:11:07 +02:00
oblomov
65ec575d51
Update abaplint.jsonc (#1194) 2024-06-13 14:52:45 +02:00
abapsheep
64f4315612
New Layout Update (#1183)
* New Layout Update

* Layout Update

* Update new Layout

* Update src/01/01/z2ui5_cl_util_api.clas.abap

Co-authored-by: abaplint[bot] <24845621+abaplint[bot]@users.noreply.github.com>

* Update New Layout

* Update new Layout

* Update and F4-Help

* Update src/02/02/z2ui5_cl_pop_f4_help.clas.abap

Co-authored-by: abaplint[bot] <24845621+abaplint[bot]@users.noreply.github.com>

* Update

* Update

* Update abaplint.jsonc

* Update abaplint.jsonc

* fix unit tests

* fix unit test

* fix

---------

Co-authored-by: Viktor Hoffmann <Viktor.Hoffmann@swisskrono.com>
Co-authored-by: abaplint[bot] <24845621+abaplint[bot]@users.noreply.github.com>
Co-authored-by: oblomov <102328295+oblomov-dev@users.noreply.github.com>
2024-06-12 21:12:24 +02:00
abapsheep
2bba19ad87
New Layout Fix (#1173)
* New Layout Fix

* lint fix

Co-authored-by: abaplint[bot] <24845621+abaplint[bot]@users.noreply.github.com>

* lint fix

Co-authored-by: abaplint[bot] <24845621+abaplint[bot]@users.noreply.github.com>

* New Popup - Fix

* Update src/02/02/z2ui5_cl_pop_layout_v2.clas.abap

Co-authored-by: abaplint[bot] <24845621+abaplint[bot]@users.noreply.github.com>

* New Layout

* Update abaplint.jsonc

---------

Co-authored-by: Viktor Hoffmann <Viktor.Hoffmann@swisskrono.com>
Co-authored-by: oblomov <102328295+oblomov-dev@users.noreply.github.com>
Co-authored-by: abaplint[bot] <24845621+abaplint[bot]@users.noreply.github.com>
2024-06-10 16:57:59 +02:00
oblomov
6bfa580c72
ci config (#1096)
* update ci

* update dependencies

* update

* update
2024-04-22 10:27:54 +02:00