Disable row selection for a few rows only in a p:dataTable

Since 4.0 version, Primefaces datatable comes with a disabledSelection property. <p:dataTable var=”foo” value=”#{bean.foos}” selection=”#{bean.selectedFoo}” disabledSelection=”#{foo.bar == 1}”> <p:column selectionMode=”single” /> <p:column> <h:outputText value=”#{foo.bar}” /> </p:column> <p:dataTable> Then, when foo.bar == 1 is true, checkbox will be disabled.

How to decrease request payload of p:ajax during e.g. p:dataTable pagination

Indeed, when you submit a form in HTML, by default every single HTML input element will be sent as request parameter. PrimeFaces ajax components therefore offer the partialSubmit=”true” attribute which will then send only the HTML input elements covered by the process attribute, which defaults in <p:ajax> to @this and in <p:commandXxx> to @form. So, … Read more