Skip to Content

"Move" content of table to a new view

Hi experts,

playing around with table and popups.


What I haave at the moment:

a table (sap.ui.table.Table), binded to a gateway service (oTable.bindRows("/HeaderSet"), with a ODataModel (sap.ui.getCore().byId("Header").setModel(oModel);)

Now I have added a column to this table where I can enter some data (in my case quantity).

Top of the table,I have a button "Save", which opens a new view in a popup (sap.ui.ux3.OverlayDialog).

This Popup also includes a table.

What I want - show in this new view all data from view1, where something is entered in my column.

The data is not in SAP, something internal, I just want to show these lines where I have entered a quantity.

How to do this?

Thanks

Michael

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

3 Answers

  • Best Answer
    Posted on Jan 21, 2015 at 07:43 PM

    Is that new column input field for qty bound to the model?

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Jan 21, 2015 at 04:30 PM

    Hi Micheal,

    As Kai Helferich said you could loop through the table in view1 and populate the same into a empty JSON model and then bind this model to the table in view2.

    Hope this helps.

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Jan 21, 2015 at 04:13 PM

    In this case, I would generate new data, by looping the data of the model from view1 and select only those rows which you mentioned. Then set this new data to the model of view2/dialog.

    Maybe there is a better way.

    EDIT: To the community: Something like XPATH would be nice for oData Path. Or is there already a functionality like that?

    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.