Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 9076

Bind aggregation for panel?

$
0
0

Hi,

I am trying to bind json data to a panel .

I want to replace the header-text of the panel from the json data({title}).

 

{

    "data": [

        {

            "title": "XYZ"

        },

        {

            "title": "ABC"

        },

        {

            "title": "MVC"

        },

        {

            "title": "TVM"

        }

    ]

}

 

I tried to bind the above json into the panel header text as below,

 

 

var inputList=new sap.m.Panel({

    expandable : true,

  expanded : true,

  headerText : "{title}"

  

    });

   

  

    inputList.bindAggregation("headerToolbar","/data");  

 

 

But i am getting below error

Uncaught Error: Missing template or factory function for aggregation headerToolbar of Element sap.m.Panel#__panel0 !


Please help me to sort out the issue

 

Thanks,

Meera


Viewing all articles
Browse latest Browse all 9076

Trending Articles