Quantcast
Channel: SCN : All Content - SAPUI5 Developer Center
Viewing all articles
Browse latest Browse all 6178

How to get User Menus using the NetWeaver UI Services?

$
0
0

Hi

I am trying to get the User Menus using NetWeaver UI Services, however it doesnot return the correct entries. The services are activated in SICF, I can get the User Details but not able to get the Menus

Here is the code,

              var user = sap.ui2.shell.getUser();

              user.load(

                       {

//                       depthAtRoot: 1,

//                       nodeId: " ",

//                       depthAtNode: 1

                       },

                       function() {                            

                             //set user data in the json model

                 Alert(user.getFullName());

        //Get the Menus

                            var menus = user.getMenu().getEntries();

                            var length = menus.length;

 

               alert("length::"+length); //Length returned is Zero

 

             }, 

                       function(sErrorMessage) {

                             /* failure handler: e.g. display load error */             

               alert(sErrorMessage);

             } 

             );

            

            

 

What could be wrong here?

Regards


Viewing all articles
Browse latest Browse all 6178

Trending Articles



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