Reputation: 954
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?
Upvotes: 6
Views: 1797
Reputation: 954
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.
Upvotes: 1
Reputation: 3072
I can't tell you the exact problem based on the amount of code you posted here. But based on your comments, I can suggest you the following:
Hopefully, this can help you.
Upvotes: 0