cancel
Showing results for 
Search instead for 
Did you mean: 

sap.m.ObjectHeader's markFavorite property not working?

Former Member
0 Kudos

Hi,

Somehow my sap.m.ObjectHeader object's markFavorite property is not working i.e. setting it to true does not make it visible in the UI.

Other properties like icon, title are working fine. Has anyone experienced a similar issue?

code snippet:

this.objHeader = new sap.m.ObjectHeader({

       icon : "sap-icon://database",

       title : "{DESCRIPTION}",

      markFavorite : true                         

});

even in the browser's developer console when I check, the property is set to true but the favorite star is not visible.

here _grab is window._grab = sap.ui.getCore().byId; which I defined in my index.html file for debugging purposes.

I even tried :

this.objHeader = new sap.m.ObjectHeader({

       icon : "sap-icon://database",

       title : "{DESCRIPTION}"               

});

this.objHeader.setMarkFavorite(true);

but doesn't work either.

Any suggestions on how to resolve this?

Accepted Solutions (1)

Accepted Solutions (1)

PMarti
Active Participant
0 Kudos

Hi Prabhjot, for show mark icons you need define showMarkers property true

Check it: jsbin example


this.objHeader = new sap.m.ObjectHeader({

      icon : "sap-icon://database",

      title : "{DESCRIPTION}",

      markFavorite : true,

      showMarkers: true     

});

Best regards,

Pau

Answers (0)