cancel
Showing results for 
Search instead for 
Did you mean: 

Step:20 Aggregation Binding. How to bind data without Descriptor.

sudarshan_d29
Active Participant
0 Kudos

Dear friends,

Working with Ui5 tutorial step 20: Aggregation Binding.

I have no clue to start as mention below.

This message is described in Step 20 walkthrough.

Please help me to come through.

Thanks in advance,

sudarshan

Accepted Solutions (1)

Accepted Solutions (1)

jamie_cawley
Advisor
Advisor
0 Kudos

You just need to define the model in the onit of the component.js as

var myModel = new JSONModel();

myModel.loadData("filepath.json");

this.setModel(myModel,"invoice");

Regards,

Jamie

SAP - Technology RIG

sudarshan_d29
Active Participant
0 Kudos

Hi Jamie,

Thanks for ur kind reply.

I am not able to visible the data into View.

below is my app structure.

Below is my View.

The output is like in below..

Compnent added as you said,

please help me to come out this... stucked for long time here.

Thanks and regards,

sudarshan

jamie_cawley
Advisor
Advisor
0 Kudos

Can you add a screenshot showing your InvoiceList view?

Regards,

Jamie

SAP - Technology RIG

junwu
Active Contributor
0 Kudos

your code of the two included view

did u debug? any data for the model?

Answers (3)

Answers (3)

sudarshan_d29
Active Participant
0 Kudos

Hi Jun,

I understand why we are using the line in our code.

But its not changing the output,

Any suggestion brother.

sudarshan

sudarshan_d29
Active Participant
0 Kudos

Hi Friends,

Thank a lot friends. I have got the Output.

This is my final question.

Below line get the output

Output

but If I add below line, it not displaying data.

It show the blank Output.

<<<this question I had from since step 8 walkthrough>>>

This question is final..I will make the final statement, which will help other in Future.

Thanks Friends,

sudarshan

agentry_src
Active Contributor
0 Kudos

Please mark this Discussion with a Correct Answer (closes, but does not lock the Discussion) and Helpful Answer where appropriate. See http://scn.sap.com/community/support/blog/2013/04/03/how-to-close-a-discussion-and-why   Even if you discovered the solution without any outside contributions, it helps others to understand what the solution turned out to be. 

Do not use Assumed Answered as it confuses anyone looking for the specific answer.  If you dig into the Getting Started link (top right of each SCN page), you are only instructed to mark Helpful or Correct Answers to Discussion responses. 

Thanks, Mike (Moderator)

SAP Technology RIG

junwu
Active Contributor
0 Kudos

data-sap-ui-bindingSyntax="complex"

check if putting this in your html will help or not

former_member185414
Active Contributor
0 Kudos

Hi,

If the model has data then do as suggested by Jun i.e. add the shown line in index.html file where you are loading the SAPUI5 core.

BR.

sudarshan_d29
Active Participant
0 Kudos

Hi friends,

Jamie this is my InvoiceList view below.

Jun Wu, I tried to insert the data model inside the hello pannel View which is the first view, it show "NO DATA".

The is output is below,

Thanks & Regards,

sudarshan

junwu
Active Contributor
0 Kudos

your model name is Invoices

items="{Invoices>/Invoices}"

jamie_cawley
Advisor
Advisor
0 Kudos

Correct your model alias in the component.js

this.setModel(myModel,"invoice");


Regards,

Jamie

SAP - Technology RIG