cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Binding entityset for smarttable with named odata model

0 Likes
14,333

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

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

SrinathVelagala
Participant
0 Likes

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 Member
0 Likes

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
Participant
0 Likes

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 Likes

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
SAP Champion
SAP Champion
0 Likes

I think it should be no name