Skip to Content

How to bind Selected table row content to the form in next page?

Hi,

I am new to SAPUI5, have a requirement.

In view1 need to display the table, on selection of any one row navigate to the another view ( view2) and display contents in form and need to input enable for certain fields and after changes save to database.

I can able to display the table and upon selection of table row navigating to view2, but having problem that not able to bind the contents to the form.

I am using the XML views.

Can anyone help me how to bind the context.

Thanks,

prakash.

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Feb 14 at 03:34 AM

    Hi Jun,

    Getting the following error.

    Table.controller.js:89 Uncaught TypeError: Cannot read property 'getBindingContext' of undefined

    Here is the code

    var oContext = oEvent.getParameter("rowContext");

    var oModel = oContext.getBindingContext().getObject();

    var page = sap.ui.view({

    /viewName : "Demo.Update", type : sap.ui.core.mvc.ViewType.XML

    }); app.addPage(page2); app.to(page2, "flip");

    Thanks,

    Prakash.

    Add comment
    10|10000 characters needed characters exceeded

  • Feb 13 at 08:17 PM

    from the selected row, get the bindingcontext, set the same context to your form.

    Add comment
    10|10000 characters needed characters exceeded