cancel
Showing results for 
Search instead for 
Did you mean: 

Binding entityset for smarttable with named odata model

0 Kudos

Hi All,

I am using multiple odata services in a application, so I mentioned those services in manifest file as shown below.but when i tried to bind the smarttable with 'a' model as shown below.it is not binding the data.Please help me to resolve this issue.

Thanks in Advance

0 Kudos

Hi Raghavendra,

I have same scenario where i need to call additional service from other system and display data in Smart Table. But the data is not getting populate in View. Can i have XML on how to bind data to smart table

Accepted Solutions (1)

Accepted Solutions (1)

Thanks Vaibhav and Jun for quick reply,

var view = this.getView();

view.setModel(this.getOwnerComponent().getModel('a'));

view.byId("LineItemsSmartTable").rebindTable();

on onInit method solved my problem.

Thank You

svelagala
Participant
0 Kudos

Hi Raghvendra,

This does not work with latest libraries. Did you get chance to try it out in the recent time.

Thanks

Answers (4)

Answers (4)

vsingh_mscg
Explorer

set default model of smart table to "a".

this.getView().byId("LineItemsSmartTable").setModel(  <reference to model 'a'>  );

Then tablebindingpath is just "entityset" and not "a>/entityset"

former_member693641
Discoverer
0 Kudos

used this whwn my smart filter and smart table had to be bound to different services. It really helped and worked seamlessly like a single service.

Thanks 🙂

Rama H

ivo_skolek
Explorer
0 Kudos

Hello I recently had the same issue. Specifically I have 2 smart tables in my app, one has responsive table -> using unnamed odata model, one has analytical table -> using another named odata model (with name "headerQuery"). This is what I had to do:

in XML view - not specifying neither entityset nor tableBindingPath

in controller e.g. at "onRouteMatched"

the key things (based on some debugging of inner code of SmartTable)

- the "named oData model" had to become "unnamed model" for the SmartTable - that's achieved on the first yellow line. Because code inside smart table is sometimes simply calling ...getModel()

- setEntitySet is called as well cause that actually triggers some initialization inside SmartTable

tejashwini
Discoverer
0 Kudos

I have same situation like two smart filters and smart tables need to be added in same view so how how can i added two entities with model name for smart table and smart filters.

junwu
Active Contributor
0 Kudos

I think it should be no name