Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
oblomov-dev committed Feb 21, 2024
1 parent d050117 commit bb5f151
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 126 deletions.
140 changes: 36 additions & 104 deletions src/z2ui5_cl_demo_app_175.clas.abap
Original file line number Diff line number Diff line change
@@ -1,131 +1,63 @@
class Z2UI5_CL_DEMO_APP_175 definition
public
final
create public .

public section.

interfaces IF_SERIALIZABLE_OBJECT .
interfaces Z2UI5_IF_APP .

data MV_CHECK_INITIALIZED type ABAP_BOOL .
protected section.

methods ON_RENDERING
importing
!IR_CLIENT type ref to Z2UI5_IF_CLIENT .
methods ON_INIT
importing
!IR_CLIENT type ref to Z2UI5_IF_CLIENT .
private section.

methods ON_EVENT
importing
!IR_CLIENT type ref to Z2UI5_IF_CLIENT .
ENDCLASS.
CLASS z2ui5_cl_demo_app_175 DEFINITION
PUBLIC
FINAL
CREATE PUBLIC .

PUBLIC SECTION.

INTERFACES if_serializable_object .
INTERFACES z2ui5_if_app .

CLASS Z2UI5_CL_DEMO_APP_175 IMPLEMENTATION.
DATA mv_check_initialized TYPE abap_bool .
PROTECTED SECTION.

METHODS on_rendering
IMPORTING
!ir_client TYPE REF TO z2ui5_if_client .

METHOD ON_EVENT.
PRIVATE SECTION.
ENDCLASS.

* CASE ir_client->get( )-event.
* WHEN ''.
*
* ENDCASE.
ENDMETHOD.


method ON_INIT.
endmethod.
CLASS z2ui5_cl_demo_app_175 IMPLEMENTATION.


METHOD ON_RENDERING.
* ---------- Set view -----------------------------------------------------------------------------
DATA(lr_view) = z2ui5_cl_xml_view=>factory( t_ns = VALUE #( ( n = `xmlns:table` v = `sap.ui.table` ) ) ).
METHOD on_rendering.

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

* ---------- Set dynamic page ---------------------------------------------------------------------
DATA(lr_dyn_page) = lr_view->dynamic_page(
showfooter = abap_false
" headerExpanded = abap_true
" toggleHeaderOnTitleClick = client->_event( 'ON_TITLE' )
).
showfooter = abap_false ).

* ---------- Get header title ---------------------------------------------------------------------
DATA(lr_header_title) = lr_dyn_page->title( ns = 'f' )->get( )->dynamic_page_title( ).

* ---------- Set header title text ----------------------------------------------------------------
lr_header_title->heading( ns = 'f' )->title( TEXT-t00 ).

* ---------- Get page header area ----------------------------------------------------------------
lr_header_title->heading( ns = 'f' )->title( `Demo - Wizard Control` ).
DATA(lr_header) = lr_dyn_page->header( ns = 'f' )->dynamic_page_header( pinnable = abap_true )->content( ns = 'f' ).

* ---------- Get page content area ----------------------------------------------------------------
DATA(lr_content) = lr_dyn_page->content( ns = 'f' ).
DATA(lr_wizard) = lr_content->wizard( ).
DATA(lr_wiz_step1) = lr_wizard->wizard_step( title = 'Step1' validated = abap_true ).
lr_wiz_step1->message_strip( text = 'STEP1' ).
DATA(lr_wiz_step2) = lr_wizard->wizard_step( title = 'Step2'
validated = abap_true ).

* -------------------------------------------------------------------------------------------------
* WIZARD
* -------------------------------------------------------------------------------------------------
data(lr_wizard) = lr_content->wizard( ).

* -------------------------------------------------------------------------------------------------
* WIZARD Step 1
* -------------------------------------------------------------------------------------------------
data(lr_wiz_step1) = lr_wizard->wizard_step( title = 'Step1'
validated = abap_true ).

lr_wiz_step1->message_strip( text = 'STEP1' ).
lr_wiz_step2->message_strip( text = 'STEP2' ).
DATA(lr_wiz_step3) = lr_wizard->wizard_step( title = 'Step3'
validated = abap_true ).

* -------------------------------------------------------------------------------------------------
* WIZARD Step 2
* -------------------------------------------------------------------------------------------------
data(lr_wiz_step2) = lr_wizard->wizard_step( title = 'Step2'
validated = abap_true ).
lr_wiz_step3->message_strip( text = 'STEP3' ).
DATA(lr_wiz_step4) = lr_wizard->wizard_step( title = 'Step4'
validated = abap_true ).

lr_wiz_step2->message_strip( text = 'STEP2' ).
lr_wiz_step4->message_strip( text = 'STEP4' ).

* -------------------------------------------------------------------------------------------------
* WIZARD Step 3
* -------------------------------------------------------------------------------------------------
data(lr_wiz_step3) = lr_wizard->wizard_step( title = 'Step3'
validated = abap_true ).

lr_wiz_step3->message_strip( text = 'STEP3' ).

* -------------------------------------------------------------------------------------------------
* WIZARD Step 4
* -------------------------------------------------------------------------------------------------
data(lr_wiz_step4) = lr_wizard->wizard_step( title = 'Step4'
validated = abap_true ).

lr_wiz_step4->message_strip( text = 'STEP4' ).


* ---------- Set View -----------------------------------------------------------------------------
ir_client->view_display( lr_view->stringify( ) ).
ENDMETHOD.

ENDMETHOD.

method Z2UI5_IF_APP~MAIN.
* -------------------------------------------------------------------------------------------------
* INITIALIZATION
* -------------------------------------------------------------------------------------------------
IF me->mv_check_initialized = abap_false.
me->mv_check_initialized = abap_true.
me->on_init( ir_client = client ).

* -------------------------------------------------------------------------------------------------
* RENDERING
* -------------------------------------------------------------------------------------------------
me->on_rendering( ir_client = client ).
ENDIF.
METHOD z2ui5_if_app~main.

* -------------------------------------------------------------------------------------------------
* EVENTS
* -------------------------------------------------------------------------------------------------
me->on_event( ir_client = client ).
me->on_rendering( ir_client = client ).

endmethod.
ENDMETHOD.
ENDCLASS.
22 changes: 0 additions & 22 deletions src/z2ui5_cl_demo_app_175.clas.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,35 +20,13 @@
</item>
</TPOOL>
<DESCRIPTIONS>
<SEOCOMPOTX>
<CMPNAME>ON_EVENT</CMPNAME>
<LANGU>E</LANGU>
<DESCRIPT>on event</DESCRIPT>
</SEOCOMPOTX>
<SEOCOMPOTX>
<CMPNAME>ON_INIT</CMPNAME>
<LANGU>E</LANGU>
<DESCRIPT>on init</DESCRIPT>
</SEOCOMPOTX>
<SEOCOMPOTX>
<CMPNAME>ON_RENDERING</CMPNAME>
<LANGU>E</LANGU>
<DESCRIPT>on rendering trigger</DESCRIPT>
</SEOCOMPOTX>
</DESCRIPTIONS>
<DESCRIPTIONS_SUB>
<SEOSUBCOTX>
<CMPNAME>ON_EVENT</CMPNAME>
<SCONAME>IR_CLIENT</SCONAME>
<LANGU>E</LANGU>
<DESCRIPT>abap2UI5 - client</DESCRIPT>
</SEOSUBCOTX>
<SEOSUBCOTX>
<CMPNAME>ON_INIT</CMPNAME>
<SCONAME>IR_CLIENT</SCONAME>
<LANGU>E</LANGU>
<DESCRIPT>abap2UI5 - client</DESCRIPT>
</SEOSUBCOTX>
<SEOSUBCOTX>
<CMPNAME>ON_RENDERING</CMPNAME>
<SCONAME>IR_CLIENT</SCONAME>
Expand Down

0 comments on commit bb5f151

Please sign in to comment.