2 weeks ago
Hi, I'm developing a SAPUI5 application and I need to instantiate a fragment (F) within a view (V).
The issue is that the view (V) can be closed by the user. To ensure good performance, I simply destroy it using:
V.destroyDependents();
V.destroyContent();
V.destroy();
However, the user can reopen the same view, which means I need to re-instantiate it, and with it, the fragment. I'm using this code:
Fragment.load({
name: "webapp.fragment.DocumentaleDialog",
id: this.createId("dialogDocumentale"),
controller: this
}).then((oFragment) => {
that.oDocumentaleDialog = oFragment;
that.oView.addDependent(that.oDocumentaleDialog);
openDocumentaleDialog();
});
The problem I'm encountering is a duplicate ID error when I try to instantiate the fragment again.
Request clarification before answering.
anyway you are destroying the view, why not destroy the fragment by your code?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
30 | |
21 | |
16 | |
8 | |
7 | |
7 | |
5 | |
4 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.