Quantcast
Channel: SCN : All Content - All Communities
Viewing all articles
Browse latest Browse all 3523

data binding

$
0
0

hi experts,

am getting problem in data binding

 

where my controller.js is

 

sap.ui.controller("check1.MyView", {

  onInit: function() {

  var oModel = new sap.ui.model.json.JSONModel("model/madhu.json");

  sap.ui.getCore().setModel(oModel);

 

  var oModel1 = new sap.ui.model.json.JSONModel("model/emp.json");

  sap.ui.getCore().setModel(oModel1, "madhu");

  },

     

 

  }

 

 

);

 

my View is

 

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

  controllerName="check1.MyView" xmlns:html="http://www.w3.org/1999/xhtml">

  <Page title="Title">

  <l:VerticalLayout

  class="sapUiContentPadding"

  id="oVerticalContent"

  width="100%">

  <l:content>

 

  <Label text="Postal Code"/>

  <Input  width="50%" id="idinput1"/>

  </l:content>

  </l:VerticalLayout>

  <Button

  text="Click"

  class="sapUiSmallMarginBottom"

  press="showMsgStrip"

  width="250px"/>

  <Table items="{path : '/d/del'}" id="idDelhiMatches">

   <columns>

  <Column>

    <Label text="No." />

    </Column>

   <Column>

    <Label text="Player Name" />

    </Column>

   <Column>

    <Label text="Nationality" />

   </Column>

   <Column>

    <Label text="Role" />

   </Column>

   <Column>

    <Label text="Capped/Uncapped player" />

   </Column>

  </columns>

    <items>

  <ColumnListItem>

    <cells>

    <Text text="{No}" />

     <Text text="{PlayerName}" />

     <Text text="{Role}" />

     <Text text="{Nationality}" />

     <Text text="{Capuncap}" />

    </cells>

     </ColumnListItem>

     </items>

    </Table>

    <Table items="{path : '/d/de'}" >

   <columns>

  <Column>

    <Label text="No." />

    </Column>

   <Column>

    <Label text="Player Name" />

    </Column>

   <Column>

    <Label text="Nationality" />

   </Column>

   <Column>

    <Label text="Role" />

   </Column>

   <Column>

    <Label text="Capped/Uncapped player" />

   </Column>

  </columns>

    <items>

  <ColumnListItem>

    <cells>

    <Text text="{madhu>No}" />

     <Text text="{madhu>PlayerName}" />

     <Text text="{madhu>Role}" />

     <Text text="{madhu>Nationality}" />

     <Text text="{madhu>Capuncap}" />

    </cells>

     </ColumnListItem>

     </items>

    </Table>

  </Page>

</core:View>

 

please help me


Viewing all articles
Browse latest Browse all 3523

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>