Skip to Content
avatar image
Former Member

how to provide customdata through json for Exactbrowser control

I am trying to replicate the sample given in SAPUI5 explored site. I am binding the below data to Exactbrowser control. I need to attach country code along with the text say "Gry" for Germany. How to achieve the same. I am new to SAPUI5.

var oTestData = {attributes: [
        {name: "Country", selected: true, attributes: [
            {name: "Germany",customData: "Gry", width: 210, attributes: [{name: "Baden-Württemberg"}, {name: "Bayern"}, {name: "Berlin"}, {name: "Brandenburg"}, {name: "Bremen"},
                                                          {name: "Hamburg"}, {name: "Hessen"}, {name: "Mecklenburg-Vorpommern"}, {name: "Niedersachsen"},
                                                          {name: "Nordrhein-Westfalen"}, {name: "Rheinland-Pfalz"}, {name: "Saarland"}, {name: "Sachsen"},
                                                          {name: "Sachsen-Anhalt"}, {name: "Schleswig-Holstein"}, {name: "Thüringen"}]},
            {name: "USA", attributes: [{name: "Alabama"}, {name: "Alaska"}, {name: "Arizona"}, {name: "Arkansas"}, {name: "California"},
                                                      {name: "Colorado"}, {name: "Connecticut"}, {name: "Delaware"}, {name: "Florida"}, {name: "Georgia"},
                                                      {name: "Hawaii"}, {name: "Idaho"}, {name: "Illinois"}, {name: "Indiana"}, {name: "Iowa"},
                                                      {name: "Kansas"}, {name: "Kentucky"}, {name: "Louisiana"}, {name: "Maine"}, {name: "Maryland"},
                                                      {name: "Massachusetts"}, {name: "Michigan"}, {name: "Minnesota"}, {name: "Mississippi"}, {name: "Missouri"},
                                                      {name: "Montana"}, {name: "Nebraska"}, {name: "Nevada"}, {name: "New Hampshire"}, {name: "New Jersey"},
                                                      {name: "New Mexico"}, {name: "New York"}, {name: "North Carolina"}, {name: "North Dakota"}, {name: "Ohio"},
                                                      {name: "Oklahoma"}, {name: "Oregon"}, {name: "Pennsylvania"}, {name: "Rhode Island"}, {name: "South Carolina"},
                                                      {name: "South Dakota"}, {name: "Tennessee"}, {name: "Texas"}, {name: "Utah"}, {name: "Vermont"},
                                                      {name: "Virginia/DC"}, {name: "Washington"}, {name: "West Virginia"}, {name: "Wisconsin"}, {name: "Wyoming"}]},
            {name: "France", selected: true}, {name: "Italy"}, {name: "Sweden"}, {name: "Spain"}, {name: "Canada"}, {name: "India"}, {name: "Japan"}, {name: "Russia"},
            {name: "Australia"}, {name: "Austria"}, {name: "Switzerland"}]
        {name: "Year", attributes: []},
        {name: "Sales Orders", attributes: []}

    for(var i=0; i<100; i++){
        oTestData.attributes[1].attributes.push({name: ""+(1950+i), subVals: false});
            oTestData.attributes[2].attributes.push({name: "SO-003530"+i, subVals: false});
Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

0 Answers