on 2021 Jan 14 11:51 AM
Dear Fiori Elements Experts,
I developed 2 Fiori elements apps with Fiori elements tools for an OData v2 service built on CAP.
App A is an LROP, where I deleted the OP. App B is an LROP.
My goal is to navigate from app A to B when selecting a row in A, setting a (hidden) property from A as a filter in B.
How should I configure the navigation parameters? Let me summarize my tests.
If I set the following crossNavigation parameters in app A, I get the value as expected:
"outbounds": {
"operation-display": {
"semanticObject" : "operation",
"action" : "display",
"parameters": {
"toWorkCenter_ID": {
"value": {
"value": "blablabla",
"format": "plain"
}
}
}
}
}
Ok, so “toWorkCenter_ID” seems to be the parameter I need to fix.
As mentioned here by expanding sap.app section, I should use format = ‘binding’ and a binding path to my model as value, so I set the following configuration:
"outbounds": {
"operation-display": {
"semanticObject" : "operation",
"action" : "display",
"parameters": {
"toWorkCenter_ID": {
"value": {
"value": "ID",
"format": "binding"
}
}
}
}
}
But I get an unexpected result:
I also tested with format = 'binding' and the following values without getting success:
"value": "{/ID}",
"value": "{ID}",
"value": ">/ID",
"value": "{>/ID}",
"value": "code", //another property
My model is defined like this:
"": {
"dataSource": "mainService",
"preload": true,
"settings": {
"defaultBindingMode": "TwoWay",
"defaultCountMode": "Inline",
"refreshAfterChange": false,
"metadataUrlParams": {
"sap-value-list": "none"
}
}
}
Does anyone know how the set up binding here?
Thanks in advance.
Best regards,
Marc
Hello,
final post 🙂
it looks Mapping addition for annotation DataFieldWithIntentBasedNavigation is not working.
Anyways, there is an event you can use and it gets triggered when you press on your property annotated with DataFieldWithIntentBasedNavigation:
adaptNavigationParameterExtension
Note: pay attention to the manifest.json part.
In adaptNavigationParameterExtension you can rename(mapping) select options, and play in general with the request to App2.
So, your annotations stay as they are and it the event you do the mapping/renaming like:
adaptNavigationParameterExtension: function (oSelectionVariant, oObjectInfo) {
if (oObjectInfo.action === 'Display' && oObjectInfo.semanticObject === 'MyProduct') {
var productPropertyName
const product_ID = oSelectionVariant.getSelectOption('product_ID')
if (product_ID !== undefined) {
productPropertyName = 'product_ID' //clicked on a product from Product assignement history LineItem facet(table)
} else {
productPropertyName = 'productId' //clicked on the product from Product FieldGroup facet
}
oSelectionVariant.getSelectOptionsPropertyNames().forEach(function (sSelectOptionName) {
//Remove all select options except productId/product_ID, as it is the only needed
//Rename it to ID in order to fit ID property name on MyProducts side
if (sSelectOptionName !== productPropertyName) {
oSelectionVariant.removeSelectOption(sSelectOptionName)
} else {
oSelectionVariant.renameSelectOption(productPropertyName, 'ID')
}
})
}
},
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 | |
11 | |
10 | |
10 | |
9 | |
9 | |
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.