title: How to do "Navigation Property binding of aggregations" in xml
body: <p>I'm developing a UI5 application.</p>
  
  <p>I have the following odata entity:</p>
  
  <pre><code>&lt;EntityType Name="order"&gt;
      &lt;Key&gt;
          &lt;PropertyRef Name="id"/&gt;
      &lt;/Key&gt;
      &lt;Property Name="id" Nullable="false" Type="Edm.Guid"/&gt;
      &lt;Property Name="creatorId" Type="Edm.Guid"/&gt;
      &lt;NavigationProperty FromRole="To_Order" Name="Creator" Relationship="bwm.UserOrder" ToRole="From_User"/&gt;
  &lt;/EntityType&gt;
  &lt;EntityType Name="User"&gt;
      &lt;Key&gt;
          &lt;PropertyRef Name="id"/&gt;
      &lt;/Key&gt;
      &lt;Property Name="id" Nullable="false" Type="Edm.Guid"/&gt;
      &lt;Property Name="name" Type="Edm.String"/&gt;
      &lt;Property Name="phone" Type="Edm.String"/&gt;
      &lt;Property Name="avatar" Type="Edm.String"/&gt;
      &lt;NavigationProperty FromRole="From_User" Name="OrderSet" Relationship="bwm.UserOrder" ToRole="To_Order"/&gt;
  &lt;/EntityType&gt;
  </code></pre>
  
  <p>I've simplified the entity model. Basically there's the <code>Order</code> and <code>User</code> entity, on <code>Order</code> entity, there's a <strong>navigation property</strong> <code>Creator</code> which reference to <code>User</code> entity.</p>
  
  <p>I want to define a fragment which displays user information, I want to bind the UI elements relatively to a user :</p>
  
  <pre><code>&lt;HBox  xmlns="sap.m"&gt;
      &lt;items&gt;
          &lt;Image src="{avatar}"/&gt;
          &lt;VBox&gt;
              &lt;items&gt;
                  &lt;Label text="{name}"/&gt;
                  &lt;Label text="{phone}"/&gt;
              &lt;/items&gt;
          &lt;/VBox&gt;
      &lt;/items&gt;
  &lt;/HBox&gt;
  </code></pre>
  
  <p>Now I have the page which is displaying a list of Orders, but I <strong>don't know how to element binding the fragment to the <code>Creator</code> navigation property</strong>:</p>
  
  <pre><code>&lt;GrowingList threshold="10"
              items="{
                  path: '/OrderSet'
              }"&gt;
      &lt;items&gt;
          &lt;CustomListItem &gt;
              &lt;content&gt;
                  &lt;core:Fragment fragmentName="xxx.fragment.User" type="XML"/&gt;
              &lt;/content&gt;
          &lt;/CustomListItem &gt;
      &lt;/items&gt;
  &lt;/GrowingList&gt;
  </code></pre>
  
  <p>How can I set the binding path of the fragment to the navigation property <code>Creator</code>?</p>
  
  <p>=============================================================<br>
  <strong>PS</strong>: I googled around and find some solution, these solution is not what I want, because it bound the fragment's data binding tightly to the data model, how the solution works: </p>
  
  <p>first, when binding items path, expand the <code>Creator</code> navigation property:</p>
  
  <pre><code>&lt;GrowingList threshold="10"
              items="{
                  path: '/OrderSet',
                  paramters: {expand: 'Creator'}
              }"&gt;
      &lt;items&gt;
          &lt;CustomListItem &gt;
              &lt;content&gt;
                  &lt;core:Fragment fragmentName="xxx.fragment.User" type="XML"/&gt;
              &lt;/content&gt;
          &lt;/CustomListItem &gt;
      &lt;/items&gt;
  &lt;/GrowingList&gt;
  </code></pre>
  
  <p>second, change the data binding of the fragment to <code>Creator/xxx</code>:</p>
  
  <pre><code> &lt;HBox  xmlns="sap.m"&gt;
      &lt;items&gt;
          &lt;Image src="{Creator/avatar}"/&gt;
          &lt;VBox&gt;
              &lt;items&gt;
                  &lt;Label text="{Creator/name}"/&gt;
                  &lt;Label text="{Creator/phone}"/&gt;
              &lt;/items&gt;
          &lt;/VBox&gt;
      &lt;/items&gt;
  &lt;/HBox&gt;
  </code></pre>
  
  <p>This makes the fragment useless, if I want to use it in a page displaying a user list because in <code>UserSet</code>, a <code>User</code> doesn't have a property <code>Creator/name</code>. What I want is the fragment to be general, it can be used anywhere as long as the root binding path is a user entity instance. </p>