<mvc:View

xmlns="sap.m"
  xmlns:f="sap.ui.layout.form"
  xmlns:core="sap.ui.core"
xmlns:mvc="sap.ui.core.mvc"
  controllerName="fivea.controller.Parentage_Detail" >
<Page title="Parentage detail "   showNavButton="true"   navButtonPress="onNavBack"   >

      <ObjectHeader title="{cultivar_id} : {ptype_id} : {parent_id}"/>

      <f:SimpleForm editable="true">

      <Label text="Cultivar id"/>

      <Input id="cultivar_id"  type="Text"
             width="40%"
             showValueHelp="true"
             valueHelpRequest="onIdValueHelp"
              name="cultivar_id" enabled="false" value="{cultivar_id}"    />
      <Text id="cultivar_id_descr" text="{cultivar/name}"/>

      <Label text="Parent type"/>

<!–

The path here is an absolute OData path due to the prepended slash
Without slash, the path would be relative to the currently bound
parentage entity, and we would get it's parentage type instead of
the list of all parentage types

–>

<ComboBox id="ptype_id_combo"
  showSecondaryValues= "true"
          width="40%"
          enabled="false"
          value="{ptype_id}"
          items="{path: '/par_type' }"   >
  <core:ListItem key="{id}" text="{id}" additionalText = "{description}"/>
</ComboBox>

<!– now is really relative to the bound parentage entity –>

      <Text text="{path:'par_type/description'}" />

      <Label text="Parent id"/>
      <Input id="parent_id"  type="Text"   name="parent_id"
              width="40%"
             showValueHelp="true"
              valueHelpRequest="onIdValueHelp"
              enabled="false" value="{parent_id}"   />
      <Text id="parent_id_descr" text="{parent/name}"/>
      </f:SimpleForm>

</Page>

</mvc:View>