Technology Blogs by Members
Explore a vibrant mix of technical expertise, industry insights, and tech buzz in member blogs covering SAP products, technology, and events. Get in the mix!
cancel
Showing results for 
Search instead for 
Did you mean: 
Former Member
0 Kudos

Hi Guys,

Below is the coding for sap.ui.unified.Shell in JS which might help you in the coding.

Code

    

     // Creating the Head Item

     var oHome = new sap.ui.unified.ShellHeadItem("oHomeDashboard", {

                                                                           showSeparator: true,

                                                                           selected:false,

                                                                           icon:"sap-icon://home",

                                                                           tooltip: "Return To Home",

                                                                           press: function(){

                                                                                      oController.handleHomePress();

                                                                                          }

                                                                                 });

       

       // Creating the User Item

       var oEmployee = new sap.ui.unified.ShellHeadUserItem("oEmployee",{

                                                                             username: "My Name",

                                                                             image: "sap-icon://person-placeholder"

                                                                                  })

       // Creating the logout function

       var oLogout = new sap.ui.unified.ShellHeadItem({

                                                       showSeparator: true,

                                                       icon:"sap-icon://log",

                                                       tooltip: "Logout",

                                                       press: function(){

                                                                  oController.handleLogoutPress();

                                                                           }

                                                              });

        //Placing all item to the Shell

       var oHeader = new sap.ui.unified.Shell("oHeaderDashboard",{

                                                        headItems: oHome,

                                                        icon: "http://openui5.org/resources/OpenUI5_logo_only.png",

                                                        user:oEmployee,

                                                        headEndItems:oLogout

                                                              });

Labels in this area