Skip to Content

Output is not appearing in list in SAP UI5 application

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)
Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Best Answer
    avatar image
    Former Member
    Jul 07, 2017 at 07:44 PM

    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}"/>
    Add comment
    10|10000 characters needed characters exceeded

  • Jul 05, 2017 at 12:00 PM

    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

    Add comment
    10|10000 characters needed characters exceeded