cancel
Showing results for 
Search instead for 
Did you mean: 

Aggregation binding content display problem in Dialog

04-19-2016 2:36 PM
841 views 5 comments Go to solution
0 Likes
SAP Managed Tags
Subscribe

Hi Experts,

My requirement is as shown below,

I am trying this way but text beside the radio button is not being displayed,

  I am using below code:

  var dialog = new Dialog({

  title: "Available Timings",

  contentWidth: "550px",

  contentHeight: "300px",

  content: new sap.m.RadioButton({

  items: {

  path: "/timings",

  template:

  new StandardListItem({

  title: "{slot1}"

  })

  }

  })

  });

Data file:

{

  "timings": [{

  "slot1": "11:30 AM to 12:30 PM",

  "slot2": "02:30 PM TO 03:30 PM"

  }, {

  "slot1": "10:30 AM to 12:30 PM",

  "slot2": "03:30 PM TO 05:30 PM"

  }]

}

Output :

If I use List in place of RadioButton (as shown below), only List data appears but without radio button. I need both to  be displayed.

var dialog = new Dialog({

  title: "Available Timings",

  contentWidth: "550px",

  contentHeight: "300px",

  content: new List({

  items: {

  path: "/timings",

  template:

  new StandardListItem({

  title: "{slot1}"

  })

  }

  })

  });

Please correct me.

0 Likes

Accepted Solutions (1)

Accepted Solutions (1)

saivellanki
Active Contributor
0 Likes

Hi Venkatesh,

If you want to use RadioButtonGroup, will this sample help? JS Bin - Collaborative JavaScript Debugging

If you want to use List, just set the List 'mode' property to 'SingleSelect' where you can see the radio button for selection.

Regards,

Sai Vellanki.

Venkatesh_Machineni
Participant
0 Likes

Thank you,Sai. It worked for me.,

Answers (1)

Answers (1)

saxos
Explorer
0 Likes

try:

path: "timings",

title: "{/slot1}"

and so on..

Venkatesh_Machineni
Participant
0 Likes

Hi Samuel,

I am able to display model data using data binding but the problem is not able to display RadioButton and Text side by side as shown above(my requirement).Only one item is displaying either Radiobutton or Text .

junwu
SAP Champion
SAP Champion
0 Likes

who told you that you can create radio buttons in that way?