on 02-01-2018 2:03 PM
Hello All,
I am trying to develop a SAP UI5 application with two views i,e HeaderView and DetailsView.
HeaderView has a list containing personnel numbers.When I click on any personnel number in this list,it takes me to the second view i,e DetailsView where I get the details for that personnel number in a Table.
Now for the first time,the personnel number that i choose from the list,it shows me the correct item details in the DetailsView.
But when I navigate back to the HeaderView and select any other personnel number,it shows me the same data as before in the DetailsView i,e data doesnot get updated.
Data only gets updated if i manually refresh the page.
I have tried using
this.getView().byId("THE_ID_OF_YOUR_VIEW").getModel().refresh(true);,
sap.ui.getCore().byId("THE_ID_OF_YOUR_VIEW").getModel().refresh(true);.
in the navigateToHeader() event as well in the onInit() event of the controller of the second view.
Tried refreshing the table as well.
But nothing works.
Any idea on this issue and how to solve it would be appreciated.
check if the model has the data you selected
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Please check the topic routing / navigation and pass the personal number as a parameter to the second view.
Here you need to register the event "patternMatch"
Step 31: Routing with Parameters - Documentation - Demo Kit - SAPUI5 SDK (ondemand.com)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
show me the code that prepare the model/data for your detail view and when that code is executed.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I am quite new to SAPUI5 and Odata.
Can you please help me so as how I should check that the model has the data that I selected?
Thanks in advance.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi SUBHAJIT DAS,
You can try using map function
User | Count |
---|---|
95 | |
11 | |
11 | |
10 | |
9 | |
8 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.