update binding logic with depth 5 (#618)

* update binding logic with deoth 5

* Update README.md

* Update README.md

* update

* bugfixes
This commit is contained in:
oblomov 2023-11-02 10:12:21 +01:00 committed by GitHub
parent 26767b3fb0
commit 143861689a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 70 additions and 66 deletions

View File

@ -10,14 +10,14 @@
<a href="https://twitter.com/abap2UI5"><img src="https://img.shields.io/twitter/follow/abap2UI5"></a>
</p>
*... offers a pure ABAP approach for developing UI5 apps, eliminating the need for JavaScript, OData and RAP — similar to the past, when only a few lines of ABAP sufficed to display inputs and tables using Selection Screens & ALVs. Designed with a minimal system footprint, it works in both on-premise and cloud environments.*
*... offers a pure ABAP approach for developing UI5 apps without JavaScript, OData and RAP — similar to the past, when only a few lines of ABAP sufficed to display inputs and tables using Selection Screens & ALVs. Designed with a minimal system footprint, it works in both on-premise and cloud environments.*
#### Key Features
* **User-Friendly:** Implement just one interface for a standalone UI5 application
* **100% ABAP:** Developing using pure ABAP (no JavaScript, DDL, EML or Customizing)
* **Minimal System Footprint:** Based on a plain HTTP handler (no BSP, OData, CDS, BOPF or RAP)
* **Cloud and On-Premise Ready:** Works with both language versions (ABAP for Cloud, Standard ABAP)
* **Broad System Compatibility:** Compatible with all ABAP releases (from NW 7.02 to ABAP 2311)
* **Broad System Compatibility:** Runs on all ABAP releases (from NW 7.02 to ABAP 2311)
* **Easy Installation:** abapGit project, no additional app deployment required
#### Compatibility

View File

@ -27,7 +27,8 @@ CLASS z2ui5_cl_fw_binding DEFINITION
check_dissolved TYPE abap_bool,
check_temp TYPE abap_bool,
viewname TYPE string,
pretty_name type string,
pretty_name TYPE string,
depth TYPE i,
END OF ty_s_attri.
TYPES ty_t_attri TYPE SORTED TABLE OF ty_s_attri WITH UNIQUE KEY name.
@ -39,7 +40,7 @@ CLASS z2ui5_cl_fw_binding DEFINITION
data TYPE data OPTIONAL
check_attri TYPE data OPTIONAL
view TYPE string OPTIONAL
pretty_name type clike optional
pretty_name TYPE clike OPTIONAL
RETURNING
VALUE(r_result) TYPE REF TO z2ui5_cl_fw_binding.
@ -123,7 +124,7 @@ ENDCLASS.
CLASS Z2UI5_CL_FW_BINDING IMPLEMENTATION.
CLASS z2ui5_cl_fw_binding IMPLEMENTATION.
METHOD bind.
@ -132,9 +133,10 @@ CLASS Z2UI5_CL_FW_BINDING IMPLEMENTATION.
DATA(lv_name) = `MO_APP->` && bind->name.
ASSIGN (lv_name) TO <attri>.
IF sy-subrc <> 0.
RAISE EXCEPTION TYPE z2ui5_cx_fw_error
EXPORTING
val = `BINDING_ERROR_ATTRIBUTE_NOT_FOUND_WITH_NAME__` && bind->name.
RETURN.
* RAISE EXCEPTION TYPE z2ui5_cx_fw_error
* EXPORTING
* val = `BINDING_ERROR_ATTRIBUTE_NOT_FOUND_WITH_NAME__` && bind->name.
ENDIF.
DATA lr_ref TYPE REF TO data.
@ -209,13 +211,17 @@ CLASS Z2UI5_CL_FW_BINDING IMPLEMENTATION.
LOOP AT mt_attri REFERENCE INTO DATA(lr_bind)
WHERE type_kind = cl_abap_classdescr=>typekind_oref
AND check_dissolved = abap_false.
AND check_dissolved = abap_false
AND depth < 5.
DATA(lt_attri) = get_t_attri_by_oref( val = lr_bind->name ).
IF lt_attri IS INITIAL.
CONTINUE.
ENDIF.
lr_bind->check_dissolved = abap_true.
LOOP AT lt_attri REFERENCE INTO DATA(lr_attri).
lr_attri->depth = lr_bind->depth + 1.
ENDLOOP.
INSERT LINES OF lt_attri INTO TABLE mt_attri.
ENDLOOP.

View File

@ -728,13 +728,13 @@ CLASS z2ui5_cl_xml_view DEFINITION
METHODS barcode_scanner_button
IMPORTING
!id TYPE clike OPTIONAL
!scanSuccess TYPE clike OPTIONAL
!scanFail TYPE clike OPTIONAL
!inputLiveUpdate TYPE clike OPTIONAL
!dialogTitle TYPE clike OPTIONAL
!id TYPE clike OPTIONAL
!scansuccess TYPE clike OPTIONAL
!scanfail TYPE clike OPTIONAL
!inputliveupdate TYPE clike OPTIONAL
!dialogtitle TYPE clike OPTIONAL
RETURNING
VALUE(result) TYPE REF TO z2ui5_cl_xml_view .
VALUE(result) TYPE REF TO z2ui5_cl_xml_view .
METHODS message_popover
@ -2791,19 +2791,6 @@ CLASS z2ui5_cl_xml_view DEFINITION
RETURNING
VALUE(result) TYPE REF TO z2ui5_cl_xml_view.
DATA mv_name TYPE string.
DATA mv_ns TYPE string.
DATA mt_prop TYPE z2ui5_if_client=>ty_t_name_value.
DATA mo_root TYPE REF TO z2ui5_cl_xml_view.
DATA mo_previous TYPE REF TO z2ui5_cl_xml_view.
DATA mo_parent TYPE REF TO z2ui5_cl_xml_view.
DATA mt_child TYPE STANDARD TABLE OF REF TO z2ui5_cl_xml_view WITH EMPTY KEY.
DATA mi_client TYPE REF TO z2ui5_if_client.
METHODS container_content
IMPORTING
!id TYPE clike OPTIONAL
@ -2820,43 +2807,55 @@ CLASS z2ui5_cl_xml_view DEFINITION
VALUE(result) TYPE REF TO z2ui5_cl_xml_view.
METHODS spot
IMPORTING
!id TYPE clike OPTIONAL
!position TYPE clike OPTIONAL
!contentOffset TYPE clike OPTIONAL
!type TYPE clike OPTIONAL
!scale TYPE clike OPTIONAL
!tooltip TYPE clike OPTIONAL
!image TYPE clike OPTIONAL
!icon TYPE clike OPTIONAL
IMPORTING
!id TYPE clike OPTIONAL
!position TYPE clike OPTIONAL
!contentoffset TYPE clike OPTIONAL
!type TYPE clike OPTIONAL
!scale TYPE clike OPTIONAL
!tooltip TYPE clike OPTIONAL
!image TYPE clike OPTIONAL
!icon TYPE clike OPTIONAL
RETURNING
VALUE(result) TYPE REF TO z2ui5_cl_xml_view.
VALUE(result) TYPE REF TO z2ui5_cl_xml_view.
METHODS analytic_map
IMPORTING
!id TYPE clike OPTIONAL
!initialPosition TYPE clike OPTIONAL
!initialZoom TYPE clike OPTIONAL
IMPORTING
!id TYPE clike OPTIONAL
!initialposition TYPE clike OPTIONAL
!initialzoom TYPE clike OPTIONAL
RETURNING
VALUE(result) TYPE REF TO z2ui5_cl_xml_view.
VALUE(result) TYPE REF TO z2ui5_cl_xml_view.
METHODS spots
IMPORTING
!id TYPE clike OPTIONAL
!items TYPE clike OPTIONAL
IMPORTING
!id TYPE clike OPTIONAL
!items TYPE clike OPTIONAL
RETURNING
VALUE(result) TYPE REF TO z2ui5_cl_xml_view.
VALUE(result) TYPE REF TO z2ui5_cl_xml_view.
METHODS vos
RETURNING
VALUE(result) TYPE REF TO z2ui5_cl_xml_view.
RETURNING
VALUE(result) TYPE REF TO z2ui5_cl_xml_view.
PROTECTED SECTION.
DATA mv_name TYPE string.
DATA mv_ns TYPE string.
DATA mt_prop TYPE z2ui5_if_client=>ty_t_name_value.
DATA mo_root TYPE REF TO z2ui5_cl_xml_view.
DATA mo_previous TYPE REF TO z2ui5_cl_xml_view.
DATA mo_parent TYPE REF TO z2ui5_cl_xml_view.
DATA mt_child TYPE STANDARD TABLE OF REF TO z2ui5_cl_xml_view WITH EMPTY KEY.
DATA mi_client TYPE REF TO z2ui5_if_client.
PRIVATE SECTION.
ENDCLASS.
CLASS Z2UI5_CL_XML_VIEW IMPLEMENTATION.
CLASS z2ui5_cl_xml_view IMPLEMENTATION.
METHOD actions.
@ -2881,8 +2880,8 @@ CLASS Z2UI5_CL_XML_VIEW IMPLEMENTATION.
ns = `vbm`
t_prop = VALUE #(
( n = `id` v = id )
( n = `initialPosition` v = initialPosition )
( n = `initialZoom` v = initialZoom )
( n = `initialPosition` v = initialposition )
( n = `initialZoom` v = initialzoom )
) ).
ENDMETHOD.
@ -2961,19 +2960,6 @@ CLASS Z2UI5_CL_XML_VIEW IMPLEMENTATION.
ENDMETHOD.
METHOD barcode_scanner_button.
result = _generic( name = `BarcodeScannerButton`
ns = 'ndc'
t_prop = VALUE #(
( n = `id` v = id )
( n = `scanSuccess` v = scanSuccess )
( n = `scanFail` v = scanFail )
( n = `inputLiveUpdate` v = inputLiveUpdate )
( n = `dialogTitle` v = dialogTitle ) ) ).
ENDMETHOD.
METHOD bars.
result = _generic( name = `bars`
ns = `mchart` ).
@ -3520,6 +3506,18 @@ CLASS Z2UI5_CL_XML_VIEW IMPLEMENTATION.
ENDMETHOD.
METHOD barcode_scanner_button.
result = _generic( name = `BarcodeScannerButton`
ns = 'ndc'
t_prop = VALUE #(
( n = `id` v = id )
( n = `scanSuccess` v = scansuccess )
( n = `scanFail` v = scanfail )
( n = `inputLiveUpdate` v = inputliveupdate )
( n = `dialogTitle` v = dialogtitle ) ) ).
ENDMETHOD.
METHOD end_column_pages.
" todo, implement method
result = me.
@ -5434,7 +5432,7 @@ CLASS Z2UI5_CL_XML_VIEW IMPLEMENTATION.
t_prop = VALUE #(
( n = `id` v = id )
( n = `position` v = position )
( n = `contentOffset` v = contentOffset )
( n = `contentOffset` v = contentoffset )
( n = `type` v = type )
( n = `scale` v = scale )
( n = `tooltip` v = tooltip )