Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

How to achive multi-line editing (CRUD) with a table-UI on a ejb-model

Hello community,

i'm working on an prototype. we want to migrate an existing web-application to nw 7.1 with web-dynpro as ui-technology. the old application often uses javascript-/ajax- driven table-grid-controls. this table controls allowed editing the data in it. the conrol "records" every action. for example which rows were deleted, which were updated and which were appended.

when the user has finished editing, he simply clicks a save-button. the table-grid control then sends the changes via ajax-calls to the server.

now i want the achive such behavior in web-dynpro (7.1)

for getting the data to be edited, i wrote an ejb and created an ejb-model in web-dynpro. so viewing the data works fine so far. the view-controller with the table-ui-element is bound to the view-controllers context, which is mapped to the context-controller to which again a model-object is bound, which retrieves the data from the ejb.

inserting, updating and deleting single rows with a detail-view-controller also works, using additional context nodes (again mapped to addtional model-classes for crudp.

but i know want to have all rows and cells to be editable. the user should be able to insert, update and delete in that table without neccessarily using a detail-view-controller.

how would you achive this? holding every creates, update, deletes in single nodes? and when clicking a button to fire the save action to go to that nodes and apply that action? Or would you create an addtional flag-attribute in the node that shows what was done with that row? after pressing save also iterating the nodes, checking for the flag and doing the appropriate actions (but this maybee is performance critical when having a lot of rows)?

any ideas how to achieve multiple crud-operations on a context-node, viewed with a table-ui-element would be welcome.

regards

Matthias

Former Member

Helpful Answer

by
Not what you were looking for? View more on this topic or Ask a question