Skip to Content

Conditional Data Binding with XML Model for sap.m.Select

Hello All,

I have three Drop downs.

Drop down 1 contains list of countries

Dropdown 2 contains list of cities

Dropdown 3 contains List of the famous places in the City.

Now i need to create the xml Model for the above requirement.

<?xml version="1.0"?>










<Country>Hong Kong</Country>






<Country>New Zealand</Country>





<Country>Saudi Arabia</Country>


<Country>United Arab Emirates</Country>





var oModelXML = new sap.ui.model.xml.XMLModel();


var mTable = new sap.m.Table();

mTable.addColumn(new sap.m.Column({header : new sap.m.Label({text : "Product Name"})}));

var colItems = new sap.m.ColumnListItem({type : "Active"});

// mTable.bindAggregation("items","/value",colItems);

var productName = new sap.m.Text({text : "{heading}"});




var selectTemplate = new sap.ui.core.Item({text : "{text()}"})

var countryDropDown = new sap.m.Select("countryDropDown",{

items :{

path : "/Country",

template : selectTemplate



var cityDropDown = new sap.m.Select("cityDropDown",{

items :{

path : "/Country",

template : selectTemplate



var localAreaDropDown = new sap.m.Select("localAreaDropDown",{

items :{

path : "/Country",

template : selectTemplate



var selectModel = new sap.ui.model.xml.XMLModel();





Could anybody please help me to create the xml file for the above mentioned requirement.

Your help will be appreciated.

Thanks in Advance.


Add a comment
10|10000 characters needed characters exceeded

Related questions

1 Answer

  • Best Answer
    Posted on Sep 15, 2016 at 03:19 AM

    Hi Shekar,

    Will this sample help? Plunker



    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.