on 08-11-2016 12:05 PM
Hi experts,
I have a huge problem because I am not able to find data in order to do that.
This what I need to do:
I have a Table in the View ("view1) wich is displaying data from DataModel. Then I press a button which navigate to another view ("view2) where I have to add new data. Once I have added the data I press a button which call a event ("onAdd") in order to store the data using jQuery.sap.storage.Type.session. (I do this way because I don't want to create new data in the data model unless another confirm button had been pressed).
So now, I would like to know if its possible to add a new row in the table on the view (view1) displaying the new data when onAdd event (which is in the view2 controller) is triggered. When I go back to the view1 I should be able to see the new row with the new data added.
I don't know how to bind the action of a event in the view2 whose results have to be displayed in the view1 and where I have to write the code in order to add the row.
Thanks in advance,
Marcos.
Hi Marcos,
I'm afraid it's not possible to add a row in way you want.
To add row you have to add the new entry to the data model underneath your table but as you described it's not possible due to your confirmation process.
Maybe you can add a whole new 'columns' to your data model indicating the status of each entry so you can add the new entry with a status like 'pending' preventing your business logic to process the new one till it's status has been changed?
Greetz,
Silvio
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Silvio, thanks for your answer.
I would like to ask something.
If I have all in the same view could I asocciate the event of stored the data and the event off adding the new row? Maybe when I press the button to store the new data I add a new row which read the information stored and finally refresh the view to display it.
If not I'll do it what you said before.
Thanks Silvio.
Regards.
Marcos.
just push an element to the array which is bound to the table. that's it.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
87 | |
23 | |
11 | |
9 | |
8 | |
5 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.