Skip to Content
Author's profile photo Former Member

sap.ui.unified.Shell in JS

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

                                                              });

Assigned Tags

      Be the first to leave a comment
      You must be Logged on to comment or reply to a post.