Hi...
The following code causes slowness to open the page and execute the event 'onlistchanged'.
My .xhtml
<r:pickList switchByDblClick="true" value="#{managerBean.pickList}">
<f:selectItems value="#{managerBean.list}" />
<a4j:support action="#{managerBean.onchangeTest}" event="onlistchanged" reRender="panel"/>
</r:pickList>
...My Class
@SessionScoped
@ManagedBean
public class ManagerBean{private List<String> pickList = new ArrayList<String>();
private List<SelectItem> list = new ArrayList<SelectItem>();
public ManagerBean() {
for (int i = 0; i < 2000; i++) {
this.list.add(new SelectItem("Label "+i, "Label "+i));
}
}
public void onchangeTest(){
for (String item : this.pickList) {
System.out.println(item);
}
}
public List<SelectItem> getList(){
return this.list;
}
public List<String> getPickList(){
return this.pickList;
}
public void setPickList(List<String> pickList){
this.pickList = pickList;
}
}
Using the following context parameter in web.xml, not resolved the slowness.
<context-param>
<param-name>org.ajax4jsf.xmlparser.ORDER</param-name>
<param-value>NONE</param-value>
</context-param><context-param>
<param-name>org.ajax4jsf.xmlparser.NONE</param-name>
<param-value>.*</param-value>
</context-param>
This is a Bug???
Thank's for help
it is not bug. r:pickList is not designed to handle large number of objects. I guess at most 500 number of objects, the response time is reasonable.