5 Replies Latest reply on Nov 11, 2008 9:11 AM by brachie

    dataTable sorting and form inputs

    andrei_123

      Hello All

      My page has form which includes input fields and dataTable with sorting columns. After sorting any column all form inputs also submit. dataTable hasn't such attributes as ajaxSingle, process..

      How to make dataTable doesn't submit any form inputs?

        • 1. Re: dataTable sorting and form inputs
          eicki

          Try a4j:region around your datatable.

          • 2. Re: dataTable sorting and form inputs
            ilya_shaikovsky

            build your own sorting (external sorting example)

            Yes out-of-the-box version has this behaviour.

            • 3. Re: dataTable sorting and form inputs
              brachie

              Hi,

              we have a serious problem with this out-of-the-box behaviour (the values of the input-fields in the table-rows are submitted when sorting the table).

              The problem is: When the user clicks really fast (e.g. double click) on a column header to sort the table, the input fields (combo boxes) are submitted immediately and hibernate updates the data in the database (even though no input field was changed in the table!).
              Even worse after the update, the assignments of the input-fields to the table rows are totally messed up!!

              Is there really no way to make the sorting ajaxSingle or at least prevent doubleclicking on a column-header? Besides, I think this is a really problem which makes the richfaces:datatable unuseable for us :(


              Regards,

              Alexander

              • 4. Re: dataTable sorting and form inputs
                ilya_shaikovsky

                Built-in sorting could not satisfy all the developers for sure. Just use external sorting in order to get full control under the sorting. Example at livedemo.

                • 5. Re: dataTable sorting and form inputs
                  brachie

                  Hi,

                  ok thanks. I implemented external sorting now and put the sorting links in the column headers with ajaxSingle="true" :)