I recently updated my primefaces-project to the new version of primefaces.
Everything seems to work fine but the picklist is very slow when clicking the "add all"-button. I have a huge data-set (about 130 items) in the list. The problem is also described in this forum post.
UPDATE: A very basic example should demonstrate the problem:
<p:pickList value="#{testForm.dualList}"
var="id"
itemLabel="#{id}"
itemValue="#{id}" />
The form (in session scope):
@Component("testForm")
@Scope("session")
public class TestForm implements Serializable {
private DualListModel<Integer> dualList;
//getter & setter methods
}
Method which creates the DualListModel:
prepareForm() {
List<Integer> source = Lists.newLinkedList();
List<Integer> target = Lists.newLinkedList();
//add 100 integers as source:
for(int i = 0; i <= 99; i++) {
source.add(i);
}
DualListModel<Integer> model = new DualListModel<Integer>(source, target);
testForm.setDualList(model);
}
Is there something i could do to make it faster?
It seems to be a bug in primefaces-version. I have found a few other posts in the primefaces forum about this topic.
I have implemented my own picklist and everything works fine now.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With