Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 8451

Data binding issue

$
0
0

Hello all,

          I want to display the data from odata to my sapui5 screen i have done the coding part.its not displaying the data its showing following error

ERROR:-

Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at http://ecceh4.********/sap/opu/odata/SAP/ZCALL_CENTER_SRV/$metadata. This can be fixed by moving the resource to the same domain or enabling CORS.

 

 

my controller code is

onPress:function()

    {

        debugger;

        var url = "http://ecceh.***********/sap/opu/odata/SAP/ZCALL_CENTER_SRV";

        var oModel = new sap.ui.model.odata.ODataModel(url,true);

     

        var form = this.getView().byId("Homeform");

     

        form.setModel(oModel);

        form.bindElement("/TabRequestCustSet('0002')");

 

         

     

    },

 

and view code is

 

<content>

            <l:Grid defaultSpan="L12 M12 S12" width="auto" hSpacing="0">

                <l:content>

                    <f:SimpleForm id="Homeform" minWidth="1024"

                        maxContainerCols="2" editable="true" layout="ResponsiveGridLayout"

                        title="Purchase Order Header Details" labelSpanL="4" labelSpanM="4"

                        emptySpanL="0" emptySpanM="0" columnsL="3" columnsM="3" class="editableForm">

                        <f:content>

                            <core:Title text="" />

                            <core:Title text="" />

                            <Label text="customer details" />

 

                            <Text id="id1" text="{CustId}" />

                            <Label text="Company code" />

                            <Text id="id2" text="{TsrId}" />

 

                           

                            <Label text="" />

 

 

                          

 

 

 

                        </f:content>

 

                    </f:SimpleForm>

 

                </l:content>

 

 

Please help me with this


Viewing all articles
Browse latest Browse all 8451

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>