Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

How to get ComboBox's selected item to detail page?

Hi All,

I have created Master Detail demo app,in which I want to get comobox's item to detail page.I have done this thing with JSView but not able to do in XMLView.

Master View

<ComboBox id="combo1" selectionChange="test">

  

  </ComboBox>

Master Controller


test : function(){

alert(this.byId("combo1").getSelectedItem().getText());

}

I am getting Alert value with selected item.But if I write in detail page's controller as below I am not getting value.

onInit : function() {

alert(sap.ui.getCore().byId("combo1").getSelectedItem().getText());

}

Any clue to solve this problem??

Help would be appreciated.

Regards,

Zalak Dalal

Former Member
Not what you were looking for? View more on this topic or Ask a question