on 09-26-2017 1:55 PM
Hello Community,
I am facing a strange issue and I think I am stucked.
I open a MessageBox.confirm with a close method.
I want to get a specific id from the source view: "plugin_table"
In the main controller it is easy, this.getView().byId("plugin_table").
But in the method of the MessageBox, this is related to the confirmbox.
I get the value via the sap core:
sap.ui.getCore().getComponent("__component0").byId("AdminPage").byId("plugin_table")
This works in my trial station, but if i publish it to Fiori Launchpad the component will be renamed and the access doesn't work anymore.
I tried everything, either to set my own component id, but no success.
And I don't get the component in a flexible way, I always need to know the component id.
I thought with getRootComponent() I will get it, but it is always undefined.
How can I handle this, I am facing this issue at serveral places.
Please help,
BR
Marcel
Thanks,
that was a perfect suggestion.
This eventbus function is cool and useful for many other usecases.
BR
Marcel
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
use eventbus to fire event to inform the controller to delete the record.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Maybe my logic is wrong, but the idea is.
A User klicks on a delete Button. With the confirm Message Box I want to ask if the user eally wants to delete.
And in the close method I check for the answer, if the user click close, do nothing if the user click "OK" then I will delete the selected records, therefore I need to know with:
sap.ui.getCore().byId("plugin_table").getSelectedItem()
Which record I need to delete.
I think thats a normal usecase. What other possibilities I have?
BR
Marcel
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
why you want it?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
75 | |
9 | |
8 | |
7 | |
7 | |
6 | |
6 | |
6 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.