cancel
Showing results for 
Search instead for 
Did you mean: 

How to do binding for sap.m.ObjectHeader control?

Former Member
0 Kudos

Hello,

I have json model with data structure a below :

{"Notification" : [ {

  "NotificationNo" : "10000128",

  "Desc" : "Wire broken down in Unit 551A",

  "StartDate" : "2015/06/24",

  "EndDate" : "2015/07/30",

  "Status" : "In Progress",

  "NotificationType" : true,

  "PUnitStatus" : "Error"

  }

  ]

  }

How do i do binding for sap.m.ObjectHeader ?

Please note that I am using jsview. I tried using binding property

but it is not working .

var oObjectHeader = new sap.m.ObjectHeader(

  "oh1", {

  binding : "/Notification/0",

  number : "{NotificationNo}",

  title : "{Desc}"

});

please help.

Accepted Solutions (1)

Accepted Solutions (1)

saivellanki
Active Contributor
0 Kudos

Hey Ajinkya


How are you? When you're doing a property binding, you have to provide full path.


I have made few changes to your code, please check the working sample -


JS Bin - Collaborative JavaScript Debugging


Regards,

Sai Vellanki.

Former Member
0 Kudos

thanks Sai.

It worked perfectly fine.

Now next time we meet beer is on me

I had been calling you in the morning..buzz me when you r free.

Former Member
0 Kudos

Hi Sai,

I have a similar requirement, but for column headers of a table. I have the following Model:

var otabledata = {

    ColHeader: {

     ColH1: "ColH1text",

     ColH2: "ColH2text"

    },

    Values: [

            {Col1: "test1" ,

             Col2: "test2"

            }

          ]

   

  };

Using above model, I want to bind the ColHeader node to the column headers of the table. How can I do this?

Regards,

Shashi

0 Kudos

Hi Shashi,

New question, New Discussion please!

The Rules of Engagement and other documents in the Getting Started link at the top right will help you get the most out of SCN postings.

Regards, Mike (Moderator)

SAP Technology RIG

Answers (0)