cancel
Showing results for 
Search instead for 
Did you mean: 

Access List in Controller [MVC]

Former Member
0 Kudos

hi all.

my xml view;


<core:View xmlns:core="sap.ui.core" xmlns:mvc="sap.ui.core.mvc" xmlns="sap.m"

  controllerName="sapui5.appView" xmlns:html="http://www.w3.org/1999/xhtml">

  <Page title="UI5 Telefon Rehberi">

  <content>

          <List

            id="contactList"

     items="{/}"

     >

     <StandardListItem

       type="Navigation"

       press="handlePress"

       />

   </List>

  </content>

  </Page>

</core:View>

i try access this list;

var list = sap.ui.getCore().byId("contactList");

list undefined.please help me.i will be set data this list.

var list = new sap.m.List();

   list.bindAggregation("items",{path:'/', template : oItemTemplate,

  sorter : oNameSorter});

bla bla.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

solution;

var list = this.getView().byId("contactList");

  list.bindAggregation("items",{path:'/', template : oItemTemplate,

  sorter : oNameSorter});

Answers (0)