Skip to Content
0

create and edit table in ui5

Sep 29, 2017 at 08:45 AM

138

avatar image
Former Member

Hello everyone,

i am trying to create a sapui5 application that generates an empty table and saves user input for later display.

i i have searched forum but couldnt find exactly what i am looking for.

any help would be appricated.

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

4 Answers

Joseph BERTHE Sep 29, 2017 at 03:51 PM
0

Hello,

Your first question is which model do you use ? Odata Model or JSon ? is your table connected ?

Then, you have to attach you table to your model. If it is JSon, then it will be a Javascript array manipulation. If it is ODataModel, you will have play with Odata API (setProperty and submitChange).

Regards

Show 1 Share
10 |10000 characters needed characters left characters exceeded
Former Member

Hello Joseph,

i want to create table myself. At first table will have cells but will be empty, user will fill the table then save it.

I know how to create a table based on Odata but i need to know how to define a table myself and then populate it.

How can i do that ?

Thank you for your answer.

0
Sharath M G Oct 01, 2017 at 08:20 AM
0

You can generate the table using the Javascript code.

Then, link a local json model to the table. Ensure that the model is similar to the oData model structure.

Now, when you wish to save it to backend, map the values from local model to oData model and execute the service which will save it in backend.

Regards,

Sharath

Show 2 Share
10 |10000 characters needed characters left characters exceeded
Former Member

Is there an example for that ? I am new to ui5 and i need to see a complete example to understand

0

Check this blog for examples of the code using JS.

As a practice, define the table in the XML view and use the JS to bind the model.

Check link: https://sapui5.hana.ondemand.com/explored.html

or Blog for JS examples: https://blogs.sap.com/2015/06/13/ui5-programming-examples/

0
Jun Wu Sep 30, 2017 at 10:45 PM
0

you can only do that with jsonmodel

Share
10 |10000 characters needed characters left characters exceeded
avatar image
Former Member Oct 04, 2017 at 11:22 AM
0
Share
10 |10000 characters needed characters left characters exceeded