how to create list of object at client side and render in list view.

Hello,   i want to create multiple object at client side as follows.       when i click on add more button it create one form below the existing form, and when i click on save button to save all objects in database.   add more button create new object each time on client side, close button show on second object not the first object and click on close button object remove from the list.   any one having idea behind this how can i implement this
1 answers

Hi Hiamnshu,


You can use a non-persistable entity with a many-to-many reference to the Address entity:



On the page you can use a listview to show all the objects.

When you add an address: Create an object and add it to the list

When you remove an address: Delete the object from the list

When you save the addresses: Retrieve all the address objects connected to the non-persistable entity and commit the list.


Hope this helps!