JSF 2.0, Mojarra 2.0.1, PrimeFaces 3.4.1
There are similar questions but I need sth. else; javascript function has to wait for the backing bean method, whic
EL in your JavaScript is calculated when page is rendered and you can update its container (if it is in some JSF component), but I would suggest another approach.
As you are making AJAX request, you can add callback parameter in getStatuses() method. You can use Primefaces's RequestContext utility method addCallBackParam() for this:
public void getStatuses() {
this.panelList = fillList();
this.size = panelList.size();
RequestContext.getCurrentInstance().addCallBackParam("size", this.size);
}
and you can use this parameter in xhtml: