Skip to Content
0

Output is not appearing in list in SAP UI5 application

Jul 03, 2017 at 01:20 PM

100

avatar image

Hi All,

I am working on API UI5 development.

Please find the attachment which is code of controller and main view.

Everything goes fine but output is not appearing in list but in debugger, I can see data retrieved from API call.

Please suggest.

Thanks & Regards,

Praveen

output.jpg (52.3 kB)
mainviewxml.txt (1.6 kB)
controller.txt (1.2 kB)
10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

2 Answers

Best Answer
Dennis Seah
Jul 07, 2017 at 07:44 PM
0

I believe

    <ObjectIdentifier title="{Name}" text="{results>/ExtAddressInfo}"/>
    <Text text="{results>/addressId}"/>
    <Text text="{results>/addressType}"/>
    <Text text="{results>/city}"/>
    <Text text="{results>/zipCode}"/>

should be

    <ObjectIdentifier title="{Name}" text="{results>ExtAddressInfo}"/>
    <Text text="{results>addressId}"/>
    <Text text="{results>addressType}"/>
    <Text text="{results>city}"/>
    <Text text="{results>zipCode}"/>
Show 2 Share
10 |10000 characters needed characters left characters exceeded

Thanks Dennis!!

I didn't noticed this.

You made my day.

Have a nice weekend!

Regards,

Praveen

0

you are welcome. You may want someone to look at your controller implementation. You can simplify to may 5-8 lines of code.

0
VIPLOVE KHUSHALANI Jul 05, 2017 at 12:00 PM
0

Hi Praveen Singh ,

1. Remove this code below , not require to initialize the model to the view with empty data .

var data = null;
			var userResults = new JSONModel({
				"data": {}
			});
			var self = this;
			self.getView().setModel(userResults, "results");

2. Instead of this you can attach the model inside the ready state event , just replace self.getView().getModel("results").setProperty("/data", jsonResults); to below code :

var userResults = new JSONModel({
				"data": jsonResults
			});
			self.getView().setModel(userResults, "results");

Thanks

Viplove

Show 1 Share
10 |10000 characters needed characters left characters exceeded

Hi Viplav,

Thanks for your reply but seems this is not working.

No output is coming.

Please let me know if I have done it correctly or not.

Thanks & Regards,

Praveen

issue.jpg (41.6 kB)
0