We can add static values in a XML View by defining the static data in i18n properties file.

in i18n.properties file add the below line

Notifications=Notifications

In XML View add similar code like this:

count=”{parts:[‘NotificationCount’,’i18n>Notifications’],formatter:’.formatter.hideZeroCount’}”

 

Note: ‘NotificationCount’ comes from oData model and i18n>Notifications is the static text from i18n.

You could access both values in formatter as below

 

hideZeroCount:function(count,id) {

if(id==”Notifications”) {

if(count==0) {

return null;

} else {

return count;

}

}

},

New NetWeaver Information at SAP.com

Very Helpfull

User Rating: Be the first one !