• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

SelectAll checkbox in header column

 
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Im using datatable and i got a requirement to have a checkbox in the header section along with the label "Action"
on select it should select all the checkboxes under that column and on uncheck it should
uncheck all the selected checkboxes below ..

Could someone suggest the approach to be taken for this scenario.
is it possible to add another checkbox alongside header label under same facet tag?
 
Ranch Hand
Posts: 39
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Yes, it is perfectly valid you can use panelGrid inside the facet and have the header checkbox along with the header label.



simply you can java script to select and un select all the other rows checkboxes.
 
Charles Ben
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks Rajneesh

I made the header column as Command link and called the action to do the select/deselect functionality in backing bean class.
Javascript was slowing down when the data was more in datatable and so went wth java implementation.



 
reply
    Bookmark Topic Watch Topic
  • New Topic