0

I'm currently working with Primefaces, I have a datatable component and I render some records. When I edit inline-edit some records, I want to avoid the customer to click at the header checkbox to select all checkboxes, I like the customer to check the boxes that he wants to use manually.

I'm able to use the datatable configuration:

<composite:datatable disabledSelection="#{bean.disabledSelection}">

If this condition is true, all my checkboxes are disabled, but I just need that the one located at the THead is disabled, like this screen:

The header checkbox is disabled, but I can check the childs

Thanks for any help!

Jasper de Vries
  • 19,370
  • 6
  • 64
  • 102
digoferra
  • 1,001
  • 3
  • 17
  • 33

1 Answers1

0

In chrome you could check the id of the component and then disable it programatically.

UIComponent component = FacesContext.getCurrentInstance().getViewRoot().findComponent(topSelectionId);
if(component!=null && component instanceof SelectOneMenu) {
         ((SelectOneMenu) component).setDisabled(true);
} 
Ralf
  • 43
  • 9