Quantcast
Channel: SCN : All Content - All Communities
Viewing all articles
Browse latest Browse all 3074

How to open the custom application inside Launchpad and Navigate Back to Launchpad from Custom Application

$
0
0

Hello Gurus,

 

I have developed a custom SAPUI5 application using Eclipse and added the application in Launchpad to access the application from Portal.

 

When accessing the application from Launchpad, it is opening in a new window instead open the application within Launchpad (want to implement the functionality similar to Standard Applications).

 

How can i resolve this issue? and how can we go back to Launchpad page from the Custom application?

 

Please help.

 

 

Component.js:

 

jQuery.sap.declare("myTeam.Component");

jQuery.sap.require("sap.ui.model.resource.ResourceModel");

sap.ui.core.UIComponent.extend("myTeam.Component", {

 

 

  createContent : function() {

  // create root view

  var oView = sap.ui.view({

  id : "app",

  viewName : "myTeam.view.App",

  type : "JS",

  viewData : { component : this }

  });

 

  // set i18n model

  var i18nModel = new sap.ui.model.resource.ResourceModel({

  bundleUrl : "i18n/messageBundle.properties"

  });

  oView.setModel(i18nModel, "i18n");

 

 

 

  // Using OData model to connect against a real service    

var sServiceUrl = "/sap/opu/odata/sap/ZNASS_MYTEAM_SRV/";

        var myHeaders = {    "X-Requested-With" : "XMLHttpRequest",

                             "Content-Type" : "application/atom+xml",

//                           "Access-Control-Allow-Origin" : '*',

                             "Pragma" : "no-cache",

                             "Cache-Control" : "no-store",

                             "Accept-Language": "en-US,en;q=0.8,pt-BR;q=0.6,pt;q=0.4",

                             "DataServiceVersion" : "1.0",

                             "xhrFields" : "true",

                             "Accept" : "application/atom+xml"

        };

 

 

 

 

        var oModel = new sap.ui.model.odata.ODataModel(sServiceUrl, true, null, null, myHeaders);

  sap.ui.getCore().setModel(oModel);

  var oJsonModel = new sap.ui.model.json.JSONModel();

 

 

  oModel.read("/OrganizationsListSet?",null,null,true,function(oData,repsonse){

  oJsonModel.setData(oData);

  });

  sap.ui.getCore().setModel(oJsonModel);

  oView.setModel(oModel);

 

        

 

  // set device model

  var deviceModel = new sap.ui.model.json.JSONModel({

  isPhone : jQuery.device.is.phone,

  listMode : (jQuery.device.is.phone) ? "None" : "SingleSelectMaster",

  listItemType : (jQuery.device.is.phone) ? "Active" : "Inactive"

  });

  deviceModel.setDefaultBindingMode("TwoWay");

  oView.setModel(deviceModel, "device");

 

  // done

  return oView;

  }

});

 

Thanks

Shyam


Viewing all articles
Browse latest Browse all 3074

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>