Skip to Content
author's profile photo Former Member
Former Member

Extending my fiori inbox app.

Hi everyone,

I am new to SAP UI5 development and my first engagement with this new tech is with fiori my inbox app. My team and I already did some changes with the app via extensions but there's one thing left we want to do: to create an additional view to be used in the detail page(ie:s4.view.xml). Is this possible? If yes, how are we gonna add the view in the routes of the component.js of my extended app given that it is only an extended app? We already tried the standard route configuration below but ofcourse it didn't work:

jQuery.sap.declare('hpc.extend.myinbox.Component');
var compPath = jQuery.sap.getModulePath('hpc.extend.myinbox');
jQuery.sap.registerModulePath('cross.fnd.fiori.inbox',compPath+'/../ca_fiori_inbox'); //Setting the path /sap/bc/ui5_ui5/sap/ca_fiori_inbox
//jQuery.sap.require('cross.fnd.fiori.inbox.Component'); // - To load Component.js and all subsequent js and xml files as separate files
sap.ui.component.load({name:'cross.fnd.fiori.inbox'}); // - To load Component-preload.js which contains everything cross.fnd.fiori.inbox.Component.extend('hpc.extend.myinbox.Component', {
metadata : {
name: 'Custom Component extended from cross.fnd.fiori.inbox.Component',
version : '1',
includes: ['css/pldtStyles.css'],
config: {resourceBundle:jQuery.sap.getModulePath('cross.fnd.fiori.inbox')+'/i18n/i18n.properties', //To avoid the i18n files refered under ZCA_F_INBOX_EXT
serviceConfig : {
name: "ZGWFI_VIEWACCTGDOC_SRV",
serviceUrl: "/sap/opu/odata/sap/ZGWFI_VIEWACCTGDOC_SRV/"
}
}, //To avoid the i18n files refered under ZCA_F_INBOX_EXT
customizing: {
"sap.ui.viewExtensions": {
"cross.fnd.fiori.inbox.view.S3": {
"CustomerExtensionForInfoTabContent": { //Extension point name
className: "sap.ui.core.Fragment",
fragmentName: "hpc.extend.myinbox.view.S3Extn",
type: "XML"
},
"CustomerExtensionForObjectHeader": { //Extension point name
className: "sap.ui.core.Fragment",
fragmentName: "hpc.extend.myinbox.view.S3ExtnHdr",
type: "XML"
}
}
},

"sap.ui.controllerExtensions": {
"cross.fnd.fiori.inbox.view.S3": {
controllerName: "hpc.extend.myinbox.view.S3Extn"
},
"cross.fnd.fiori.inbox.view.S2": {
controllerName: "hpc.extend.myinbox.view.S2Extn"
}
}


},
routing : {
// The default values for routes
config : {
"viewType" : "XML",
"viewPath" : "hpc.extend.myinbox.view",
"targetControl" : "fioriContent", // This is the control in which new views are placed
"targetAggregation" : "pages", // This is the aggregation in which the new views will be placed
"clearTarget" : false
},
routes : [
{
pattern : "samplePattern",
name : "S4",
view : "S4"
}
]
}

} });

Basically i just need the proper implementation of adding view to the routes of component.js of my extended app if adding view to standard apps if possible. Hope to get feedback re my concern. Thanks!

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

2 Answers

  • Posted on Sep 22, 2015 at 09:54 AM

    Maybe you can extend the detail controller and add logic there that will navigate to a new view?

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member

      Hi Michal,

      I cannot do the navigation thing in the detail controller if i haven't add the s4 view yet in the routes. I guess i am missing a certain config in my routes since when i open the my inbox app, it directly goes to the s4 view instead to the master/detail view.

  • Posted on Sep 22, 2015 at 03:48 PM

    so what exactly is not working? when you have "#samplePattern" pattern, it doesnt navigate to s4?

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.