mirror of
https://github.com/abap2UI5/abap2UI5.git
synced 2025-04-29 16:36:11 +08:00
added template if, else, elseif, then, with, repea (#945)
* added template if, else, elseif, then, with, repea to xml view class * Update abap_transpile.json --------- Co-authored-by: oblomov <102328295+oblomov-dev@users.noreply.github.com>
This commit is contained in:
parent
a308f5903c
commit
b747a388c7
|
@ -3511,6 +3511,41 @@ methods WIZARD
|
|||
returning
|
||||
value(RESULT) type ref to Z2UI5_CL_XML_VIEW .
|
||||
|
||||
methods template_repeat
|
||||
importing
|
||||
!list type CLIKE optional
|
||||
!var type CLIKE optional
|
||||
returning
|
||||
value(RESULT) type ref to Z2UI5_CL_XML_VIEW .
|
||||
|
||||
methods template_with
|
||||
importing
|
||||
!path type CLIKE optional
|
||||
!helper type CLIKE optional
|
||||
!var type CLIKE optional
|
||||
returning
|
||||
value(RESULT) type ref to Z2UI5_CL_XML_VIEW .
|
||||
|
||||
methods template_if
|
||||
importing
|
||||
!test type CLIKE optional
|
||||
returning
|
||||
value(RESULT) type ref to Z2UI5_CL_XML_VIEW .
|
||||
|
||||
methods template_then
|
||||
returning
|
||||
value(RESULT) type ref to Z2UI5_CL_XML_VIEW .
|
||||
|
||||
methods template_else
|
||||
returning
|
||||
value(RESULT) type ref to Z2UI5_CL_XML_VIEW .
|
||||
|
||||
methods template_elseif
|
||||
importing
|
||||
!test type CLIKE optional
|
||||
returning
|
||||
value(RESULT) type ref to Z2UI5_CL_XML_VIEW .
|
||||
|
||||
PROTECTED SECTION.
|
||||
DATA mv_name TYPE string.
|
||||
DATA mv_ns TYPE string.
|
||||
|
@ -7125,6 +7160,71 @@ CLASS Z2UI5_CL_XML_VIEW IMPLEMENTATION.
|
|||
ENDMETHOD.
|
||||
|
||||
|
||||
METHOD template_else.
|
||||
|
||||
result = _generic( name = `else`
|
||||
ns = `template`
|
||||
).
|
||||
|
||||
ENDMETHOD.
|
||||
|
||||
|
||||
METHOD template_elseif.
|
||||
|
||||
result = _generic( name = `elseif`
|
||||
ns = `template`
|
||||
t_prop = VALUE #(
|
||||
( n = `test` v = test )
|
||||
) ).
|
||||
|
||||
ENDMETHOD.
|
||||
|
||||
|
||||
METHOD template_if.
|
||||
|
||||
result = _generic( name = `if`
|
||||
ns = `template`
|
||||
t_prop = VALUE #(
|
||||
( n = `test` v = test )
|
||||
) ).
|
||||
|
||||
ENDMETHOD.
|
||||
|
||||
|
||||
METHOD template_repeat.
|
||||
|
||||
result = _generic( name = `repeat`
|
||||
ns = `template`
|
||||
t_prop = VALUE #(
|
||||
( n = `list` v = list )
|
||||
( n = `var` v = var )
|
||||
) ).
|
||||
|
||||
ENDMETHOD.
|
||||
|
||||
|
||||
METHOD template_then.
|
||||
|
||||
result = _generic( name = `then`
|
||||
ns = `template`
|
||||
).
|
||||
|
||||
ENDMETHOD.
|
||||
|
||||
|
||||
METHOD template_with.
|
||||
|
||||
result = _generic( name = `with`
|
||||
ns = `template`
|
||||
t_prop = VALUE #(
|
||||
( n = `path` v = path )
|
||||
( n = `helper` v = helper )
|
||||
( n = `var` v = var )
|
||||
) ).
|
||||
|
||||
ENDMETHOD.
|
||||
|
||||
|
||||
METHOD text.
|
||||
result = me.
|
||||
_generic( name = `Text`
|
||||
|
@ -7877,6 +7977,7 @@ METHOD wizard.
|
|||
* ( n = `core:require` v = `{ MessageToast: 'sap/m/MessageToast' }` )
|
||||
* ( n = `core:require` v = `{ URLHelper: 'sap/m/library/URLHelper' }` )
|
||||
( n = `xmlns:table` v = `sap.ui.table` )
|
||||
( n = `xmlns:template` v = `http://schemas.sap.com/sapui5/extension/sap.ui.core.template/1` )
|
||||
( n = `xmlns:f` v = `sap.f` )
|
||||
( n = `xmlns:form` v = `sap.ui.layout.form` )
|
||||
( n = `xmlns:editor` v = `sap.ui.codeeditor` )
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
"addFilenames": true,
|
||||
"addCommonJS": true,
|
||||
"unknownTypes": "runtimeError",
|
||||
"keywords": ["return", "in", "class", "for", "delete", "default"],
|
||||
"keywords": ["return", "in", "class", "for", "delete", "default", "var"],
|
||||
"extraSetup": "../test/setup.mjs",
|
||||
"skip": [
|
||||
{"object": "Z2UI5_CL_AJSON", "class": "ltcl_parser_test", "method": "parse_error", "note": "NodeJS 20 does not set position of parsing error"}
|
||||
|
|
Loading…
Reference in New Issue
Block a user