Sapui5 如何在project MasterrDetail中使用全屏页面启动detailPage?

Sapui5 如何在project MasterrDetail中使用全屏页面启动detailPage?,sapui5,sap-fiori,Sapui5,Sap Fiori,我创建了一个项目,主屏幕是母版页,第一个屏幕是身份验证,不需要边栏 manifest.json: { "_version": "1.1.0", "start_url": "index.html", "sap.app": { "_version": "1.2.0", "id": "generate.app", "type": "application", "i18n": "i18n/i18n.properti

我创建了一个项目,主屏幕是母版页,第一个屏幕是身份验证,不需要边栏

manifest.json:

{
    "_version": "1.1.0",
    "start_url": "index.html",
    "sap.app": {
        "_version": "1.2.0",
        "id": "generate.app",
        "type": "application",
        "i18n": "i18n/i18n.properties",
        "title": "{{appTitle}}",
        "description": "{{appDescription}}",
        "applicationVersion": {
            "version": "1.0.0"
        },
        "ach": "ach",
        "resources": "resources.json",
        "dataSources": {
            "main": {
                "uri": "/here/goes/your/serviceurl/",
                "type": "OData",
                "settings": {
                    "defaultUpdateMethod": "PUT",
                    "odataVersion": "2.0",
                    "localUri": "localService/metadata.xml"
                }
            }
        },
        "sourceTemplate": {
            "id": "sap.ui.ui5-template-plugin.2masterdetail",
            "version": "1.32.5"
        },
        "crossNavigation": {
            "inbounds": {}
        }
    },
    "sap.ui": {
        "_version": "1.2.0",
        "technology": "UI5",
        "icons": {
            "icon": "sap-icon://detail-view",
            "favIcon": "",
            "phone": "",
            "phone@2": "",
            "tablet": "",
            "tablet@2": ""
        },
        "deviceTypes": {
            "desktop": true,
            "tablet": true,
            "phone": true
        },
        "supportedThemes": []
    },
    "sap.ui5": {
        "_version": "1.1.0",
        "rootView": {
            "viewName": "generated.app.view.App",
            "type": "XML",
            "id": "app"
        },
        "dependencies": {
            "minUI5Version": "1.32.0",
            "libs": {
                "sap.ui.core": {},
                "sap.m": {}
            }
        },
        "contentDensities": {
            "compact": true,
            "cozy": true
        },
        "models": {
            "i18n": {
                "type": "sap.ui.model.resource.ResourceModel",
                "uri": "i18n/i18n.properties"
            },
            "": {
                "dataSource": "main",
                "type": "sap.ui.model.odata.v2.ODataModel",
                "settings": {
                    "loadMetadataAsync": false,
                    "json": true,
                    "bJSON": true,
                    "defaultBindingMode": "TwoWay",
                    "useBatch": true,
                    "refreshAfterChange": false,
                    "disableHeadRequestForToken": true
                }
            }
        },
        "routing": {
            "config": {
                "routerClass": "sap.m.routing.Router",
                "viewType": "XML",
                "viewPath": "generated.app.view",
                "controlId": "idAppControl",
                "controlAggregation": "detailPages",
                "bypassed": {
                    "target": ["login"]
                }
            },
            "routes": [{
                "pattern": "login",
                "name": "login",
                "target": ["login"]
            }, {
                "pattern": "tiles",
                "name": "tiles",
                "target": ["tiles"]
            }, {
                "name": "listainvestimento",
                "pattern": "listainvestimento",
                "titleTarget": "",
                "greedy": false,
                "target": ["detalheinvestimento", "listainvestimento"]
            }, {
                "name": "detalheinvestimento",
                "pattern": "listainvestimento/detalheinvestimento",
                "titleTarget": "",
                "greedy": false,
                "target": ["listainvestimento", "detalheinvestimento"]
            }, {
                "pattern": "listacontrato",
                "name": "listacontrato",
                "target": ["detalhecontrato", "listacontrato"]
            }, {
                "pattern": "listacontrato/detalhecontrato/:context:",
                "name": "detalhecontrato",
                "target": ["listacontrato", "detalhecontrato"]
            }],
            "targets": {
                "login": {
                    "controlAggregation": "detailPages",
                    "viewName": "login",
                    "viewId": "login",
                    "viewLevel": 1
                },
                "tiles": {
                    "controlAggregation": "detailPages",
                    "viewName": "tiles",
                    "viewId": "tiles",
                    "viewLevel": 1
                },
                "listainvestimento": {
                    "controlAggregation": "masterPages",
                    "viewName": "listainvestimento",
                    "viewId": "listainvestimento",
                    "viewLevel": 1
                },
                "listacontrato": {
                    "controlAggregation": "masterPages",
                    "viewName": "listacontrato",
                    "viewId": "listacontrato",
                    "viewLevel": 1
                },
                "novoinvestimento": {
                    "controlAggregation": "detailPages",
                    "viewName": "novoinvestimento",
                    "viewId": "novoinvestimento",
                    "viewLevel": 2
                },
                "detalheinvestimento": {
                    "controlAggregation": "detailPages",
                    "viewName": "detalheinvestimento",
                    "viewId": "detalheinvestimento",
                    "viewLevel": 2
                },
                "detalhecontrato": {
                    "controlAggregation": "detailPages",
                    "viewName": "detalhecontrato",
                    "viewId": "detalhecontrato",
                    "viewLevel": 2
                },
                "novocontrato": {
                    "controlAggregation": "detailPages",
                    "viewName": "novocontrato",
                    "viewId": "novocontrato",
                    "viewLevel": 2
                }
            }
        }
    },
    "sap.fiori": {
        "_version": "1.1.0",
        "registrationIds": [],
        "archeType": "transactional"
    }
}
在登录页面的控制中,我有以下代码:

try{
    sap.ui.getCore().byId("App").setMode(sap.m.SplitAppMode.HideMode);
}
catch(e){
}

但是在路由配置中,
sap.ui.getCore().byId(“App”)
=undefined

我可以看到App id为idAppControl,所以请尝试sap.ui.getCore().byId(“idAppControl”)

请在您的登录页控制器中尝试此代码
onInit

this.getOwnerComponent().getAggregation("rootControl").byId("idAppControl")
添加:“全宽”:真

至“sap.ui”:


sap.ui.getCore()。并从manifest.json中的主路由中删除子例程
"sap.ui": {
    "technology": "UI5",
    "icons": {
        "icon": "sap-icon://detail-view",
        "favIcon": "",
        "phone": "",
        "phone@2": "",
        "tablet": "",
        "tablet@2": ""
    },
    "deviceTypes": {
        "desktop": true,
        "tablet": true,
        "phone": true
    },
    "supportedThemes": ["sap_belize", "sap_hcb", "sap_bluecrystal"],
    "fullWidth": true
},