<mvc:View

controllerName="fivea.controller.ParentageList"
xmlns="sap.ui.table"
xmlns:mvc="sap.ui.core.mvc"
xmlns:u="sap.ui.unified"
  xmlns:co="sap.ui.commons"
xmlns:c="sap.ui.core"
xmlns:m="sap.m">

  <m:Toolbar class="sapUiMediumMarginTop" id="toolbar1">

<!–

<m:Button text="Create record" press="onCreatePress"/>

–>

  <m:Button text="Delete record" press="onDeletePress"/>
</m:Toolbar>

  <Table id="parentage_table"
         selectionMode="Single"
         rowSelectionChange = "onSelectionChange"
         visibleRowCount="20"
         visibleRowCountMode="Auto"
         selectionBehavior="Row"
         rows="{
        path: '/parentage',
        parameters: {expand: 'cultivar,parent/breeder,par_type',
                               operationMode: 'Server'}
      }">
  <columns>
    <Column  autoResizable="true"
               sortProperty="cultivar/name" filterProperty="cultivar/name" >
      <m:Label text="Cultivar" />
      <template>
          <m:Text text="{cultivar/name}"/>
      </template>
   </Column>
     <Column  width="10%" autoResizable="true">
          <m:Label text="Par. Type"/>
          <template>
          <m:Text text="{par_type/description}" />
    </template>
      </Column>
     <Column  autoResizable="true" sortProperty="parent/name" filterProperty="parent/name">
        <m:Label text="Parent"/>
          <template>
          <m:Text text="{parent/name}"/>
      </template>
      </Column>
          <Column autoResizable="true" >
              <m:Label text="Breeder"/>
              <template>
                  <m:Text text="{parent/breeder/last_name}" />
              </template>
          </Column>
  </columns>
</Table>

</mvc:View>