on 02-21-2017 1:19 PM
Hi all,
I have an xml view with some multiComboBoxes, every one of each related with a value help dialog. My issue is when i open a second dialog and reopen the first, the first dialog doesn't remember my choises. It remember the choises only when I open the same dialog without opening others. The dialog is not being destroyed when i open another but it only lose the remember property.
Here is a piece of my code:
if (! this[oDialog[num_dia]]) {
console.log("aperto: "+[oDialog[num_dia]])
this[oDialog[num_dia]] = sap.ui.xmlfragment("sap.ui.core.sample.index.test_catt_abap_crus.tile_regole.regole_planning.controller."+dialog, this);
this[oDialog[num_dia]].setRememberSelections(true);
this[oDialog[num_dia]].setMultiSele
}
console.log("dentro: "+[oDialog[n
this.getView().addDependent(this[oDialog[nu
jQuery.sap.syncStyleClass("sapUiSizeCompact", this.getView(), this[oDialog[num_dia]]);
this[oDialog[num_dia]].open();
},
Has anyone ecountered this issue?
Thanks in advance.
Can you move the addDependent line to inside if condition. Guessing that lifecycle of fragment is reset when adding dependent again.
if (! this[oDialog[num_dia]]) {
console.log("aperto: "+[oDialog[num_dia]])
this[oDialog[num_dia]] = sap.ui.xmlfragment("sap.ui.core.sample.index.test_catt_abap_crus.tile_regole.regole_planning.controller."+dialog, this);
this[oDialog[num_dia]].setRememberSelections(true);
this[oDialog[num_dia]].setMultiSele
this.getView().addDependent(this[oDialog[nu //--->>new line
}
console.log("dentro: "+[oDialog[n
jQuery.sap.syncStyleClass("sapUiSizeCompact", this.getView(), this[oDialog[num_dia]]);
this[oDialog[num_dia]].open();
},
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi KV,
i tried with your suggestion but the issue persist. The dialog doesn't remember the selections if i open another dialog.
the modified code:
if (!this[oDialog[num_dia]]) {
console.log("aperto:" + [oDialog[num_dia]])
this[oDialog[num_dia]] = sap.ui.xmlfragment("sap.ui.core.sample.index.test_catt_abap_crus.tile_regole.regole_planning.controller." + dialog, this);
this[oDialog[num_dia]].setRememberSelections(true);
this[oDialog[num_dia]].setMultiSelect(true);
this.getView().addDependent(this[oDialog[num_dia]]);
}
jQuery.sap.syncStyleClass("sapUiSizeCompact", this.getView(), this[oDialog[num_dia]]);
this[oDialog[num_dia]].open();
}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
85 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.