Skip to Content
avatar image
Former Member

Navigation from Master-Detail view to Full screen view

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)
Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Best Answer
    avatar image
    Former Member
    Nov 06, 2017 at 11:30 AM
    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"
    				}
    			}
    		}
    
    Add comment
    10|10000 characters needed characters exceeded

  • Nov 02, 2017 at 07:41 AM

    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”);
    
    Add comment
    10|10000 characters needed characters exceeded

    • 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.