mirror of
https://github.com/abap2UI5/abap2UI5.git
synced 2025-04-29 16:46:10 +08:00
Tree (#1621)
* tree * Update App.controller.js * update * update * update
This commit is contained in:
parent
47337ef381
commit
b884c2ae1e
|
@ -187,6 +187,34 @@ sap.ui.define("z2ui5/History", ["sap/ui/core/Control"], (Control) => {
|
|||
}
|
||||
);
|
||||
|
||||
sap.ui.define("z2ui5/Tree", ["sap/ui/core/Control"], (Control) => {
|
||||
"use strict";
|
||||
|
||||
return Control.extend("z2ui5.Tree", {
|
||||
metadata: {
|
||||
properties: {
|
||||
tree_id: {
|
||||
type: "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
setBackend() {
|
||||
z2ui5.treeState = z2ui5.oView.byId( this.getProperty("tree_id") ).getBinding('items').getCurrentTreeState();
|
||||
},
|
||||
|
||||
init() {
|
||||
z2ui5.onBeforeRoundtrip.push(this.setBackend.bind(this));
|
||||
},
|
||||
|
||||
renderer(oRm, oControl) {
|
||||
setTimeout(() => {
|
||||
z2ui5.oView.byId( this.getProperty("tree_id") ).setTreeState( z2ui5.treeState );
|
||||
}, 100);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
sap.ui.define("z2ui5/Scrolling", ["sap/ui/core/Control"], (Control) => {
|
||||
"use strict";
|
||||
|
||||
|
|
|
@ -207,6 +207,35 @@ CLASS z2ui5_cl_app_app_js IMPLEMENTATION.
|
|||
`}` && |\n| &&
|
||||
`);` && |\n| &&
|
||||
`` && |\n| &&
|
||||
`sap.ui.define("z2ui5/Tree", ["sap/ui/core/Control"], (Control) => {` && |\n| &&
|
||||
` "use strict";` && |\n| &&
|
||||
`` && |\n| &&
|
||||
` return Control.extend("z2ui5.Tree", {` && |\n| &&
|
||||
` metadata: {` && |\n| &&
|
||||
` properties: {` && |\n| &&
|
||||
` tree_id: {` && |\n| &&
|
||||
` type: "string"` && |\n| &&
|
||||
` }` && |\n| &&
|
||||
` }` && |\n| &&
|
||||
` },` && |\n| &&
|
||||
`` && |\n| &&
|
||||
` setBackend() {` && |\n| &&
|
||||
` z2ui5.treeState = z2ui5.oView.byId( this.getProperty("tree_id") ).getBinding('items').getCurrentTreeState();` && |\n| &&
|
||||
` },` && |\n| &&
|
||||
`` && |\n| &&
|
||||
` init() {` && |\n| &&
|
||||
` z2ui5.onBeforeRoundtrip.push(this.setBackend.bind(this));` && |\n| &&
|
||||
` },` && |\n| &&
|
||||
`` && |\n| &&
|
||||
` renderer(oRm, oControl) {` && |\n| &&
|
||||
` if (!z2ui5.treeState) return;` && |\n| &&
|
||||
` setTimeout((id) => {` && |\n| &&
|
||||
` z2ui5.oView.byId( id ).getBinding('items').setTreeState( z2ui5.treeState );` && |\n| &&
|
||||
` }, 100, oControl.getProperty("tree_id") );` && |\n| &&
|
||||
` }` && |\n| &&
|
||||
` });` && |\n| &&
|
||||
`});` && |\n| &&
|
||||
`` && |\n| &&
|
||||
`sap.ui.define("z2ui5/Scrolling", ["sap/ui/core/Control"], (Control) => {` && |\n| &&
|
||||
` "use strict";` && |\n| &&
|
||||
`` && |\n| &&
|
||||
|
@ -490,6 +519,8 @@ CLASS z2ui5_cl_app_app_js IMPLEMENTATION.
|
|||
` defaultValue: true` && |\n| &&
|
||||
` },` && |\n| &&
|
||||
` checkDirectUpload: {` && |\n| &&
|
||||
|\n|.
|
||||
result = result &&
|
||||
` type: "boolean",` && |\n| &&
|
||||
` defaultValue: false` && |\n| &&
|
||||
` }` && |\n| &&
|
||||
|
@ -518,8 +549,6 @@ CLASS z2ui5_cl_app_app_js IMPLEMENTATION.
|
|||
` var file = z2ui5.oUpload.oFileUpload.files[0];` && |\n| &&
|
||||
` var reader = new FileReader();` && |\n| &&
|
||||
`` && |\n| &&
|
||||
|\n|.
|
||||
result = result &&
|
||||
` reader.onload = function (evt) {` && |\n| &&
|
||||
` var vContent = evt.currentTarget.result;` && |\n| &&
|
||||
` this.setProperty("value", vContent);` && |\n| &&
|
||||
|
|
|
@ -2579,6 +2579,7 @@ CLASS z2ui5_cl_xml_view DEFINITION
|
|||
multiselectmode TYPE clike OPTIONAL
|
||||
nodatatext TYPE clike OPTIONAL
|
||||
shownodata TYPE clike OPTIONAL
|
||||
PREFERRED PARAMETER items
|
||||
RETURNING
|
||||
VALUE(result) TYPE REF TO z2ui5_cl_xml_view.
|
||||
|
||||
|
@ -4450,8 +4451,20 @@ CLASS z2ui5_cl_xml_view DEFINITION
|
|||
IMPORTING sourceAggregation TYPE clike OPTIONAL
|
||||
RETURNING VALUE(result) TYPE REF TO z2ui5_cl_xml_view.
|
||||
|
||||
METHODS Drag_Drop_Info
|
||||
IMPORTING
|
||||
sourceAggregation TYPE clike OPTIONAL
|
||||
targetAggregation TYPE clike OPTIONAL
|
||||
dragStart TYPE clike OPTIONAL
|
||||
drop TYPE clike OPTIONAL
|
||||
RETURNING
|
||||
VALUE(result) TYPE REF TO z2ui5_cl_xml_view.
|
||||
|
||||
METHODS drag_drop_config
|
||||
RETURNING VALUE(result) TYPE REF TO z2ui5_cl_xml_view.
|
||||
IMPORTING
|
||||
ns TYPE clike DEFAULT `f`
|
||||
RETURNING
|
||||
VALUE(result) TYPE REF TO z2ui5_cl_xml_view.
|
||||
|
||||
METHODS html_map
|
||||
IMPORTING
|
||||
|
@ -6127,6 +6140,18 @@ CLASS z2ui5_cl_xml_view IMPLEMENTATION.
|
|||
( n = `visible` v = z2ui5_cl_util=>boolean_abap_2_json( visible ) ) ) ).
|
||||
ENDMETHOD.
|
||||
|
||||
METHOD Drag_Drop_Info.
|
||||
result = me.
|
||||
_generic( name = `DragDropInfo`
|
||||
ns = `dnd`
|
||||
t_prop = VALUE #(
|
||||
( n = `sourceAggregation` v = sourceAggregation )
|
||||
( n = `targetAggregation` v = targetAggregation )
|
||||
( n = `dragStart` v = dragStart )
|
||||
( n = `drop` v = drop )
|
||||
) ).
|
||||
ENDMETHOD.
|
||||
|
||||
METHOD drag_info.
|
||||
result = me.
|
||||
_generic( name = `DragInfo`
|
||||
|
@ -6136,7 +6161,8 @@ CLASS z2ui5_cl_xml_view IMPLEMENTATION.
|
|||
|
||||
METHOD drag_drop_config.
|
||||
result = _generic( name = `dragDropConfig`
|
||||
ns = `f` ).
|
||||
ns = ns
|
||||
).
|
||||
ENDMETHOD.
|
||||
|
||||
METHOD dynamic_page.
|
||||
|
@ -10906,7 +10932,7 @@ CLASS z2ui5_cl_xml_view IMPLEMENTATION.
|
|||
|
||||
|
||||
METHOD viz_frame.
|
||||
data(lv_vizproperties) = ``.
|
||||
DATA(lv_vizproperties) = ``.
|
||||
IF vizproperties IS INITIAL.
|
||||
lv_vizproperties = `{` && |\n| &&
|
||||
`"plotArea": {` && |\n| &&
|
||||
|
|
|
@ -159,6 +159,12 @@ CLASS z2ui5_cl_xml_view_cc DEFINITION
|
|||
RETURNING
|
||||
VALUE(result) TYPE REF TO z2ui5_cl_xml_view.
|
||||
|
||||
METHODS tree
|
||||
IMPORTING
|
||||
tree_id TYPE clike OPTIONAL
|
||||
RETURNING
|
||||
VALUE(result) TYPE REF TO z2ui5_cl_xml_view.
|
||||
|
||||
METHODS timer
|
||||
IMPORTING
|
||||
finished TYPE clike OPTIONAL
|
||||
|
@ -303,7 +309,8 @@ CLASS z2ui5_cl_xml_view_cc IMPLEMENTATION.
|
|||
|
||||
DATA(lv_class) = 'Z2UI5_CL_CC_DEMO_OUT'.
|
||||
CALL METHOD (lv_class)=>('GET_STYLE')
|
||||
RECEIVING result = lv_style.
|
||||
RECEIVING
|
||||
result = lv_style.
|
||||
result = mo_view->_cc_plain_xml( lv_style )->html( val ).
|
||||
|
||||
ENDMETHOD.
|
||||
|
@ -435,6 +442,16 @@ CLASS z2ui5_cl_xml_view_cc IMPLEMENTATION.
|
|||
|
||||
ENDMETHOD.
|
||||
|
||||
METHOD tree.
|
||||
|
||||
result = mo_view.
|
||||
mo_view->_generic( name = `Tree`
|
||||
ns = `z2ui5`
|
||||
t_prop = VALUE #( ( n = `tree_id` v = tree_id )
|
||||
) ).
|
||||
|
||||
ENDMETHOD.
|
||||
|
||||
METHOD scrolling.
|
||||
|
||||
result = mo_view.
|
||||
|
|
Loading…
Reference in New Issue
Block a user