Javascript SAPUI5:具有不同标题和数据的同一视图。如何在此类视图中导航。
我创建了一个基于条件的视图,该视图使用不同的标题显示不同的数据。说查看1。从视图1,如果我导航到另一个视图视图2。如何使用所需的数据和正确的标题导航回View1 定义路由器:Javascript SAPUI5:具有不同标题和数据的同一视图。如何在此类视图中导航。,javascript,sapui5,Javascript,Sapui5,我创建了一个基于条件的视图,该视图使用不同的标题显示不同的数据。说查看1。从视图1,如果我导航到另一个视图视图2。如何使用所需的数据和正确的标题导航回View1 定义路由器: new Router( // Routes [ { // no view creation related properties are in the route name: "appRouter", //no h
new Router(
// Routes
[
{
// no view creation related properties are in the route
name: "appRouter",
//no hash
pattern: "samplePattern",
// you can find this target in the targetConfig
target: "view1"
}
],
// Default values shared by routes and Targets
{
viewNamespace: "your.app.namespace",
viewType: "XML"
},
null,
// Target config
{
//same name as in the route called 'startRoute'
view1: {
// All properties for creating and placing a view
//go here or in the config
viewName: "view1",
controlId: "app",
controlAggregation: "pages"
}
})
如果您已经安装了路由器:
var oRouter = sap.ui.core.routing.Router.getRouter("appRouter");
//can also use directly oRouter.navTo if you're extending
//scaffloding OR base controllers of SAP UI5.
oRouter.navTo("samplePattern",oContext,false);
你说的“头衔”是什么意思?HTML文档标题还是sap.m.Page
的标题?视图是如何构造的?你用什么样的?请给我们看一些代码。