Skip to Content
0

Navigation from Master-Detail view to Full screen view

Nov 02, 2017 at 06:37 AM

348

avatar image
Former Member

Hi,

I have been trying to navigate from a master detail view to a full screen view on click of a button, but i am unable to get it. I will attach my code and output images can anyone help me out with the mistake

output.png

routes.png

controller.png

output.png (120.3 kB)
routes.png (18.8 kB)
controller.png (4.7 kB)
10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

2 Answers

Best Answer
avatar image
Former Member Nov 06, 2017 at 11:30 AM
0
I found the solution by using the below routing code. I did hide the master and detail page and then navigated to the full screen view.

"routing": {
			"config": {
				"routerClass": "sap.m.routing.Router",
				"viewPath": "com.assignMaster_Detail_Assignment.view",
				"viewType": "XML",
				"controlId": "splitapp",
				"controlAggregation": "detailPages",
				"bypassed": {
					"target": ["master", "notFound"]
				}
			},
			"routes": [{
				"name": "master",
				"pattern": "",
				"target": ["master"],
				"subroutes": [{
					"pattern": "fullScreen",
					"name": "fullScreen",
					"target": ["fullScreen"]
				}]
			}, {
				"name": "detail",
				"pattern": "/{detailsPath}",
				"target": ["master", "detail"]
			}],
			"targets": {
				"master": {
					"viewName": "master",
					"viewType": "XML",
					"transition": "slide",
					"clearAggregation": true,
					"viewLevel": "1",
					"controlAggregation": "masterPages",
					"controlId": "splitapp"
				},
				"detail": {
					"viewName": "detail",
					"viewType": "XML",
					"transition": "slide",
					"viewLevel": "1",
					"controlAggregation": "detailPages",
					"controlId": "splitapp"
				},
				"fullScreen": {
					"viewName": "full_screen",
					"viewType": "XML",
					"viewLevel": "1",
					"controlId": "splitapp",
					"controlAggregation": "detailPages"
				}
			}
		}
Share
10 |10000 characters needed characters left characters exceeded
Irfan Gokak Nov 02, 2017 at 07:41 AM
1

Hi,

I have also tried to do this and it is very hard process. So I’ll suggest you to hide master page when you click on button and load your page in Detail part. Please use below code.

// To hide master
this.getView().getParent().getParent().setMode(“HideMode”);

// To make visible 
this.getView().getParent().getParent().setMode(“ShowHideMode”);
Show 3 Share
10 |10000 characters needed characters left characters exceeded
Former Member

Hi Irfan,

I will try this.And how to load my content of the full screen page in the detail page after hiding my master?

0
Former Member

Hi,

Routing option makes your life easy to do these types of things just by configuring your routes properly. You can do all sorts of things like to split to full and full to split with mix and match.

Thanks,

Dheeram

0

Hi Arun,

Do like this in manifest.json

// under roots

{
    "pattern": "CreateModel",
    "name": "createModel",
    "target": [
         "createModel"
     ]
}

// under target

"createModel": {
                    "viewName": "CreateModel",
                    "viewId": "createModel",
                    "viewLevel": 2,
                    "title": "{i18n>TITLE}"
                },

// after that use navTo() function. that's it.
0