3 Replies Latest reply on Jun 10, 2013 9:46 AM by Lukáš Fryč

    rich:datatable multi selection

    Antonis Katsikadamos Newbie

      Hello guys,

       

      Is it possible to achieve multi select funcionality by using the lightweight rich:datatable ??

       

      Could you please provide a best practice snapshot demonstrating this implementation ??

       

      Or the usage of the rich:extendedDataTable is the only way i have...

       

      Thanks in advance.

       

      With regards to the Community!!!

        • 1. Re: rich:datatable multi selection
          Juraj Húska Master

          Hello Antonis,

           

          the selection functionality is available for rich:extendedDataTable only.

          • 2. Re: rich:datatable multi selection
            Antonis Katsikadamos Newbie

            Hello Juraj,

             

            Thanks for your reply.

             

            I've known that multi selection functionality is provided "out of the box" for the extended datatable component, but unfortunatelly i refer to an application which uses the rich:datatatable,

            so i prefer to find a solution to implement a custom multi select feauture to rich:datatable, instead of replacing all the application grids, from rich:datatable to rich:extendedDatatable.

             

            Any workarounds would be appreciated.

            • 3. Re: rich:datatable multi selection
              Lukáš Fryč Master

              Hey Antonis,

               

              if you would do that JSF way, you should probably stick with a h:booleanCheckbox in each row.

               

              You can provide nice styling - when checkbox's value is true, the row is highlighted and vice versa.

              However you will need to deal with all the JavaScript code which will make this happen like support for Ctrl+click, Shift+click for multiselection, etc.

               

              I think Juraj is correct that it should be more appropriate to use more advanced JSF table component like rich:extendedDataTable.