Skip to Content
author's profile photo Former Member
Former Member

SAP UI5 design for mobile and integrating with oData web services

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,

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

3 Answers

  • Best Answer
    Posted on Dec 06, 2013 at 05:10 AM

    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

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Dec 05, 2013 at 12:14 PM
    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member

      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

  • author's profile photo Former Member
    Former Member
    Posted on Dec 06, 2013 at 11:57 AM

    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

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.