Skip to Content
0
Former Member
May 29, 2015 at 11:35 AM

Named json Model binding problem in xml list to form?

394 Views

hi all

i am developing an sapui5 application data comes from an oData requset i am putting my odata into a named json model and i ambinding this named model to the list in detail page

now i am having the list of attribute in detail page attribute tab

now user clicks on any attribute i want navigate to another page for editing for this what i did is

in detail.controller

this.getRouter().navTo("attribute",{path:slectedrecid},false);

here i am passing the id of selected record and in attribute.controller

var jsonmodel = sap.ui.getCore().getModel("attributeJson");

this.getView().setModel(jsonmodel);

sEntityPath = "/attributes/0";

var context = {oModel: jsonmodel, sPath: sEntityPath};

oView.setBindingContext(context);

for testing ia am fixing the context path as attribute/0 and setting this model to this view and in attributes view

<f:content>

<Label text="ListNumber"/>

<Text text="{ListNumber}"/>

<Label text="Counter"/>

<Text text="{Counter}"/>

<Label text="MaintenanceLevel"/>

<Text text="{MaintenanceLevel}"/>

<Label text="AttributeProvided"/>

<Text text="{AttributeProvided}"/>

but the adata is not displayed .

thanks in advance.