Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 8501

Re: OData Binding with XML View

$
0
0

Hi Sakthivel,

 

Yes detail view is being assigned the context. Snippet from code:

 

handleListSelect : function (oControlEvent) {

  var context = oControlEvent.getParameter("listItem").getBindingContext('Project');

  this.nav.to("Detail", context);

}

 

and the detail view controller has (Snippet):

<core:View

controllerName="Project_Collection.controller.Detail"

xmlns="sap.m"

xmlns:core="sap.ui.core" >

<Page

  title="{Project>NAME}"

 

The field NAME is part of the ODATA model. If I remove the name of my model while setting it in the view and use

title="{NAME}

 

and

 

handleListSelect : function (oControlEvent) {

  var context = oControlEvent.getParameter("listItem").getBindingContext();

  this.nav.to("Detail", context);

}

 

it works.

 

So the question is:

1. How to access the element in the detail view if it has been set with an explicit model.

 

Let me know if you need any more inputs.

 

BR,

Ankit


Viewing all articles
Browse latest Browse all 8501

Trending Articles



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