cancel
Showing results for 
Search instead for 
Did you mean: 

SAP UI5 design for mobile and integrating with oData web services

Former Member
0 Kudos

Hi all,

Please provide any sample example for SAPUI5 Mobile app which integrates with oData services and passing the input to the ODATA services to fetch the data from the back-end.

We are struck in between to get the actual syntax from navigating one view to another view by passing the input from the first view and get the output at the second view.Any sample examples or syntax of the source code will help us much.

Thanks and Regards,

Accepted Solutions (1)

Accepted Solutions (1)

prathik
Participant
0 Kudos

Hi Rajeshwari,

Here is the chunk of code to take a value from one view to another

press:function(oEvent)

                  {

  var oContext = oEvent.getSource().getBindingContext();

      

                 var xCore = sap.ui.getCore();

                 var id_inp= xCore.byId("<Id of ur input field>");    

                                                  

                 var value01=oContext.getProperty("<Id of the field from where ur taking ur value from>");

                 var params1 = {param1: value01};

                                

                 id_inp.setValue(value01); // here u r setting the value to an input field(in this case)

   

 

app.back();

              
                
                                }

                })

You should add this code in the action( PRESS)  of your navigation button ( I.e; back navigation OR the button you are using to navigate to another page )

Ragards,

Prathik

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi Prathik,

Thanks for responding.

But I have solved this issue by using JQuery/Ajax call.

// Data is fetched here
  jQuery.ajax("URL", { 
   dataType: "json",

   success: function(data){

  var oModel = new sap.ui.model.json.JSONModel(data);

  view.setModel(oModel);

   }

   });



Thanks,

Rajeshwari Ponnappa

akila_sangili
Explorer
0 Kudos
Former Member
0 Kudos

Hi Akila,

Thanks for responding.

The link you have shared explains SAPUI5 desktop application not mobile.

I'm able to create desktop application and successfully integrate it with back-end, looking forward for SAPUI5 Mobile app.

Thanks,

Rajeshwari Ponnappa