1 Reply Latest reply on Dec 17, 2009 8:49 AM by user1234

    Insert or remove a row without trigger validation and without loose data entered

    averri
      I have a rich:dataTable where user can change data directly in the table and all the properties is required.
      Supose that we have inserted two new lines. We populate both and them remove one of them.
      Question is: how to remove one row without trigger validation and them refresh the table (reRender) without loose the data that you have entered?

       

      The problem when you use immediate=true and reRender=true (to re render the table) on the remove button is that the data you entered is missed after the ajax response.

        • 1. Re: Insert or remove a row without trigger validation and without loose data entered

          Suppose DataTable has a value binding with  collection list in bean class which is a collection of table bean object. Now when you are adding a row create a new table bean object and add to the data table binded list.

          Now onchange of data table field [like while inserting / populating ] fire a a4j action so that bean value will be also updated. so in that case whatever you have enter in clent side will be updated in serverside , and changed data will not go after rerender of data table.