cancel
Showing results for 
Search instead for 
Did you mean: 

Master page not showing upon page refresh in SAPUI5

gichuhimd
Explorer
0 Kudos
687

I am working on an application using Flexible Column Layout. The route is fullscreen->fullscreen->splitapp with flexible column layout using TwoColumnsMidExpanded.

When doing the initial loading of the master page through navigation, the master page has data correctly displayed on it. See image below.

Upon refresh/reload of the whole page, the master page does not show anything. see image below...

Routes and targets are as show below...

						"routes": [
				{
					"pattern": ":layout:",
					"name": "master",
					"target": [
						"master",
						"detail"
					]
				},
				{
					"pattern": "detail/{task}/{layout}",
					"name": "detail",
					"target": [
						"master",
						"detail"
					]
				},
				{
					"pattern": "detail/{task}/detailDetail/{subtasks}/:layout:",
					"name": "detailDetail",
					"target": "detailDetail"
				},
				{
					"pattern": "detail/{task}/detailDetail/{subtasks}/detailDetailDetail/{subtaskdetails}/{layout}",
					"name": "detailDetailDetail",
					"target":	"detailDetailDetail"
				}
			],
			"targets": {
				"master": {
					"name": "Master",
					"controlAggregation": "beginColumnPages"
				},
				"detail": {
					"name": "TaskMaster",
					"controlAggregation": "midColumnPages"
				},
				"detailDetail": {
					"name": "Detail",
					"controlAggregation": "beginColumnPages"
				},
				"detailDetailDetail": {
					"name": "DetailDetailDetail",
					"controlAggregation": "midColumnPages"
				}
			}

What could be the problem.

Accepted Solutions (0)

Answers (2)

Answers (2)

sugendiran
Explorer
0 Kudos

write debugger in your controller and debug the controller where data is missing but after finishing debugging just remove debugger keyword as it is not recommended.

or else place a dynamic breakpoint in debugger mode and check how data flowing.

gichuhimd
Explorer
0 Kudos

The variable this._subtasks upon refresh is undefined. So it appears like the binding context is 'forgotten' upon refresh

	this._subtasks = oEvent.getParameter("arguments").subtasks || this._subtasks || "0";
  this.getView().bindElement({
    path: "/"+this._subtasks,
    model: "odata"
  });
sugendiran
Explorer
0 Kudos

target: ['Master view page', 'Required Details page'] should contain both view master and detail. try after this configuration in the manifest. use routepatternmatched in the init function of both controllers to trigger these two views.

gichuhimd
Explorer

Thank you suge. The page now appears but does not have data. URL still remains the same.