on 06-27-2019 6:37 AM
Hi all,
I like to transfer several attributes (IDs) to my next UI5 page/view.
Ususally the code will look like this if you transfer one ID:
this.getRouter().navTo("object", { objectId: oItem.getBindingContext().getProperty("ProductID") });
But what are the possibilites if I like to provide additional ProductIDs to the navTo method?
hii,
in the manifest setup your navigation like this where the request number is the value carrier:
{
"name": "master",
"pattern": "MasterPage1/{requestNumber}",
"target": [
"MasterPage1",
"DetailPage1"
]
}
then in your page one code this:
onPress: function(oEvent) {
var that = this;
var oItem;
oItem = oEvent.getParameter("listItem").getProperty("title");
var oRouter = sap.ui.core.UIComponent.getRouterFor(that);
oRouter.navTo("detail", {
requestNumber: oItem
});
},
in page 2 in the onInit function:
var oRouter = sap.ui.core.UIComponent.getRouterFor(that);
oRouter.getRoute("detail").attachPatternMatched(that._onObjectMatched, that);
_onObjectMatched: function(oEvent) {
var that = this;
that.getView().bindElement({
path: "/" + oEvent.getParameter("arguments").requestNumber,
model: "mList"
});
this is for a single value that i had programmed you add more values to it in the manifest and transfer them to the next page
regards
Siddharth
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
68 | |
8 | |
7 | |
6 | |
6 | |
6 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.