Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A is undefined

Hello all,

            I have created two views and now i want to navigate from first view to second view.I have return the code for it but its showing an error

  i.e.TypeError: this.nav is undefined

can any1 please help me my code is written below


sap.ui.controller("toggle.toggle", {

    OnPress : function (evt) {

        var context = evt.getSource().getBindingContext();"toggle1", context);



               first view

<core:View xmlns:core="sap.ui.core" xmlns:mvc="sap.ui.core.mvc" xmlns="sap.m"

        controllerName="toggle.toggle" xmlns:html="">

    <Page title="Title1">

<!--         <content> -->


                    text=" Button"


<!--         </content> -->




     2nd view

<core:View xmlns:core="sap.ui.core" xmlns:mvc="sap.ui.core.mvc" xmlns="sap.m"

        controllerName="toggle.toggle1" xmlns:html="">




  navButtonPress="handleNavBack" >







         2nd controller

ap.ui.controller("toggle.toggle1", {


    handleNavBack : function (evt) {




Former Member
Not what you were looking for? View more on this topic or Ask a question