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

                                                              });

To report this post you need to login first.

Be the first to leave a comment

You must be Logged on to comment or reply to a post.

Leave a Reply