You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using p:dataTable with attributes selectionPageOnly="false" and disabledSelection when request is submitted on serverside every element from value is set to selection (both disabled and enabled).
You can observer that in selection's setter already.
This does not happen if selectionPageOnly="true"
Edit: I forgot to say this is specific to "select all" checkbox that is generated in header in <p:column selectionMode="multiple" />, if enabled rows are clicked "one-by-one" it is working fine ofcourse.
Reproducer
ViewScoped bean:
import java.io.Serializable;
import java.util.Arrays;
import java.util.List;
import javax.faces.view.ViewScoped;
import javax.inject.Named;
@Named
@ViewScoped
public class MyBean implements Serializable {
private static final long serialVersionUID = 1L;
private List<String> all = Arrays.asList("string1","string2","string3","string4","string5");
private List<String> selected;
public void doSomething() {
System.out.println("Size of selected rows is " + selected.size());
}
public List<String> getAll() {
return all;
}
public List<String> getSelected() {
return selected;
}
public void setSelected(List<String> selected) {
this.selected = selected;
}
}
Describe the bug
When using
p:dataTable
with attributesselectionPageOnly="false"
anddisabledSelection
when request is submitted on serverside every element fromvalue
is set toselection
(both disabled and enabled).You can observer that in
selection
's setter already.This does not happen if
selectionPageOnly="true"
Edit: I forgot to say this is specific to "select all" checkbox that is generated in header in
<p:column selectionMode="multiple" />
, if enabled rows are clicked "one-by-one" it is working fine ofcourse.Reproducer
ViewScoped bean:
XHTML:
Expected behavior
Only enabled rows to be selected.
PrimeFaces edition
Community
PrimeFaces version
12.0.0
Theme
Saga
JSF implementation
MyFaces
JSF version
2.2
Java version
1.8
Browser(s)
No response
The text was updated successfully, but these errors were encountered: